summaryrefslogtreecommitdiffstats
path: root/usr.sbin
diff options
context:
space:
mode:
authorbrian <brian@FreeBSD.org>1997-06-25 02:04:35 +0000
committerbrian <brian@FreeBSD.org>1997-06-25 02:04:35 +0000
commit082cf8524ff18a51b66789e4d618b82ffd423b8f (patch)
tree8e3ef5bbf97920087c6fa8009ad2ff05ca7d9d06 /usr.sbin
parentc756cf9cdf6dd4520edd6ba6b5770071a768e17f (diff)
downloadFreeBSD-src-082cf8524ff18a51b66789e4d618b82ffd423b8f.zip
FreeBSD-src-082cf8524ff18a51b66789e4d618b82ffd423b8f.tar.gz
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 <tdwyer@omen.net.au>
Diffstat (limited to 'usr.sbin')
-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 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 <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;
OpenPOWER on IntegriCloud