summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbrian <brian@openbsd.org>1998-01-23 04:34:26 +0000
committerbrian <brian@openbsd.org>1998-01-23 04:34:26 +0000
commit0f05307ee70d43c90ab786e2ccca282809f6646b (patch)
tree3bfb0bfdb1d452ad6e06da727a1ac6e920052661
parentFix usage of select(2) to deal correctly with a high-numbered fd. (diff)
downloadwireguard-openbsd-0f05307ee70d43c90ab786e2ccca282809f6646b.tar.xz
wireguard-openbsd-0f05307ee70d43c90ab786e2ccca282809f6646b.zip
Don't allow manual dialing unless in auto or interactive mode.
-rw-r--r--usr.sbin/ppp/command.c8
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;