diff options
author | brian <brian@cvs.openbsd.org> | 1998-01-23 04:34:27 +0000 |
---|---|---|
committer | brian <brian@cvs.openbsd.org> | 1998-01-23 04:34:27 +0000 |
commit | c4c85ea0c914717b909c30e0f83852077fc72f9f (patch) | |
tree | 280bdd0d252cf46efd909715de3b1c049bdca8bf | |
parent | 7d4f9e2237e8e3847688484b4fe81181eef7ac6b (diff) |
Don't allow manual dialing unless in auto or interactive mode.
-rw-r--r-- | usr.sbin/ppp/command.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/usr.sbin/ppp/command.c b/usr.sbin/ppp/command.c index c36ea1a4d6c..bd5ee7040ae 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.24 1998/01/20 22:46:23 brian Exp $ + * $Id: command.c,v 1.25 1998/01/23 04:34:26 brian Exp $ * */ #include <sys/param.h> @@ -172,6 +172,12 @@ DialCommand(struct cmdargs const *arg) return 0; } + if ((mode & MODE_DAEMON) && !(mode & MODE_AUTO)) { + LogPrintf(LogWARN, + "Manual dial is only available in auto and interactive mode\n"); + return 1; + } + if (arg->argc > 0 && (res = LoadCommand(arg)) != 0) return res; |