From 082cf8524ff18a51b66789e4d618b82ffd423b8f Mon Sep 17 00:00:00 2001 From: brian Date: Wed, 25 Jun 1997 02:04:35 +0000 Subject: Allow shell commands (still run as original user) unless defined out - including while a telnet session with a -auto ppp is in effect. If you don't create ppp.secrets, you deserve what you get. telnet connection capabilities will be configurable per system soon. Suggested by: Terry Dwyer --- usr.sbin/ppp/command.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/usr.sbin/ppp/command.c b/usr.sbin/ppp/command.c index 18c9206..b9ffcfc 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.60 1997/06/23 19:18:13 brian Exp $ + * $Id: command.c,v 1.61 1997/06/23 23:10:07 brian Exp $ * */ #include @@ -191,11 +191,17 @@ char **argv; FILE *oVarTerm; #ifdef SHELL_ONLY_INTERACTIVELY + /* we're only allowed to shell when we run ppp interactively */ if (mode != MODE_INTER) { LogPrintf(LogWARN, "Can only start a shell in interactive mode\n"); return 1; } -#else +#endif +#ifdef NO_SHELL_IN_AUTO_INTERACTIVE + /* + * we want to stop shell commands when we've got a telnet connection + * to an auto mode ppp + */ if ((mode & (MODE_AUTO|MODE_INTER)) == (MODE_AUTO|MODE_INTER)) { LogPrintf(LogWARN, "Shell is not allowed interactively in auto mode\n"); return 1; -- cgit v1.1