diff options
author | brian <brian@FreeBSD.org> | 1997-09-09 23:13:31 +0000 |
---|---|---|
committer | brian <brian@FreeBSD.org> | 1997-09-09 23:13:31 +0000 |
commit | fab65993a1ae76fcbb9d088abb37a9c8d5ef2098 (patch) | |
tree | 8a202182a8e453c31db54084fbf3c4988ddb4196 /usr.sbin/ppp/command.c | |
parent | a3513c6deea05987d74ccabf2c51c5f5b1875548 (diff) | |
download | FreeBSD-src-fab65993a1ae76fcbb9d088abb37a9c8d5ef2098.zip FreeBSD-src-fab65993a1ae76fcbb9d088abb37a9c8d5ef2098.tar.gz |
Don't start an interactive shell from a
telnet prompt.
Diffstat (limited to 'usr.sbin/ppp/command.c')
-rw-r--r-- | usr.sbin/ppp/command.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/usr.sbin/ppp/command.c b/usr.sbin/ppp/command.c index 9974993..7e5311e 100644 --- a/usr.sbin/ppp/command.c +++ b/usr.sbin/ppp/command.c @@ -17,7 +17,7 @@ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. * - * $Id: command.c,v 1.76 1997/08/31 22:59:20 brian Exp $ + * $Id: command.c,v 1.77 1997/09/04 00:38:18 brian Exp $ * */ #include <sys/types.h> @@ -241,6 +241,10 @@ ShellCommand(struct cmdtab const * cmdlist, int argc, char **argv, int bg) LogPrintf(LogWARN, "Can only start an interactive shell in" " the foreground mode\n"); return 1; + } else if (mode&(MODE_AUTO|MODE_DEDICATED|MODE_DIRECT)) { + LogPrintf(LogWARN, "Can't start an interactive shell from" + " a telnet session\n"); + return 1; } if ((shell = getenv("SHELL")) == 0) shell = _PATH_BSHELL; |