summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ppp
diff options
context:
space:
mode:
authorbrian <brian@FreeBSD.org>1997-11-12 16:34:51 +0000
committerbrian <brian@FreeBSD.org>1997-11-12 16:34:51 +0000
commit4feb2f9c7555b299d299f3c7ff031623987361ac (patch)
treef8e347cdff406f3e332d19e3d4cb7fe0607e346b /usr.sbin/ppp
parent75ca1ecd86f747e8a807de275ff5708de0b23064 (diff)
downloadFreeBSD-src-4feb2f9c7555b299d299f3c7ff031623987361ac.zip
FreeBSD-src-4feb2f9c7555b299d299f3c7ff031623987361ac.tar.gz
Don't attempt to dial if "dial label" has specified
a restricted label.
Diffstat (limited to 'usr.sbin/ppp')
-rw-r--r--usr.sbin/ppp/command.c6
-rw-r--r--usr.sbin/ppp/systems.c7
2 files changed, 7 insertions, 6 deletions
diff --git a/usr.sbin/ppp/command.c b/usr.sbin/ppp/command.c
index 83d426d..f08421c 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.98 1997/11/11 22:58:10 brian Exp $
+ * $Id: command.c,v 1.99 1997/11/12 02:10:05 brian Exp $
*
*/
#include <sys/param.h>
@@ -155,8 +155,8 @@ DialCommand(struct cmdtab const * cmdlist, int argc, char **argv)
return 0;
}
- if (argc > 0 && LoadCommand(cmdlist, argc, argv) == -1)
- return -1;
+ if (argc > 0 && (res = LoadCommand(cmdlist, argc, argv)) != 0)
+ return res;
tries = 0;
do {
diff --git a/usr.sbin/ppp/systems.c b/usr.sbin/ppp/systems.c
index a070535..b7ed109 100644
--- a/usr.sbin/ppp/systems.c
+++ b/usr.sbin/ppp/systems.c
@@ -17,7 +17,7 @@
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
- * $Id: systems.c,v 1.23 1997/11/11 22:58:13 brian Exp $
+ * $Id: systems.c,v 1.24 1997/11/12 15:50:38 brian Exp $
*
* TODO:
*/
@@ -350,9 +350,10 @@ LoadCommand(struct cmdtab const * list, int argc, char **argv)
else
name = "default";
- if (!ValidSystem(name))
+ if (!ValidSystem(name)) {
LogPrintf(LogERROR, "%s: Label not allowed\n", name);
- else if (SelectSystem(name, CONFFILE) < 0) {
+ return 1;
+ } else if (SelectSystem(name, CONFFILE) < 0) {
LogPrintf(LogWARN, "%s: not found.\n", name);
return -1;
} else
OpenPOWER on IntegriCloud