From 30697061f2630543cccb9648e14b1fe7fa1d93ee Mon Sep 17 00:00:00 2001 From: Bart Schaefer Date: Fri, 30 Mar 2001 16:20:03 +0000 Subject: Refuse to setopt noexec when interactive --- Src/options.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'Src/options.c') diff --git a/Src/options.c b/Src/options.c index 7223b1d59..139926428 100644 --- a/Src/options.c +++ b/Src/options.c @@ -647,6 +647,9 @@ dosetopt(int optno, int value, int force) for (s = rparams; *s; s++) restrictparam(*s); } + } else if(!force && optno == EXECOPT && !value && interact) { + /* cannot set noexec when interactive */ + return -1; } else if(!force && (optno == INTERACTIVE || optno == SHINSTDIN || optno == SINGLECOMMAND)) { if (opts[optno] == value) -- cgit 1.4.1