aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/ppp/command.c
diff options
context:
space:
mode:
authorBrian Somers <brian@FreeBSD.org>1997-06-25 02:04:35 +0000
committerBrian Somers <brian@FreeBSD.org>1997-06-25 02:04:35 +0000
commit2126fb65a3f86b53a28f30362f296b00839b458d (patch)
tree1e138ef1f90c7db07306ad075e1461d7eecc9254 /usr.sbin/ppp/command.c
parent61ef57aaf242e3d5dac5cd2b55527a685199cf4b (diff)
Notes
Diffstat (limited to 'usr.sbin/ppp/command.c')
-rw-r--r--usr.sbin/ppp/command.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/usr.sbin/ppp/command.c b/usr.sbin/ppp/command.c
index 18c9206c8e566..b9ffcfc65cd5e 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 <sys/types.h>
@@ -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;