diff options
author | brian <brian@FreeBSD.org> | 1997-11-09 18:51:23 +0000 |
---|---|---|
committer | brian <brian@FreeBSD.org> | 1997-11-09 18:51:23 +0000 |
commit | 1fb35097709343deb39e78c2a838bf9a64df4996 (patch) | |
tree | 5d2c8783b7b1f7eb9f5adb4a9560f5960cfe3eea /usr.sbin/ppp | |
parent | e1f7ff985c856b099d9dee943c37ce87a974f1de (diff) | |
download | FreeBSD-src-1fb35097709343deb39e78c2a838bf9a64df4996.zip FreeBSD-src-1fb35097709343deb39e78c2a838bf9a64df4996.tar.gz |
Don't ask for a password if it's specified as empty.
Diffstat (limited to 'usr.sbin/ppp')
-rw-r--r-- | usr.sbin/ppp/auth.c | 15 | ||||
-rw-r--r-- | usr.sbin/ppp/command.c | 5 | ||||
-rw-r--r-- | usr.sbin/ppp/main.c | 4 |
3 files changed, 17 insertions, 7 deletions
diff --git a/usr.sbin/ppp/auth.c b/usr.sbin/ppp/auth.c index 516f92c..6b01669 100644 --- a/usr.sbin/ppp/auth.c +++ b/usr.sbin/ppp/auth.c @@ -17,7 +17,7 @@ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. * - * $Id: auth.c,v 1.18 1997/10/26 01:02:07 brian Exp $ + * $Id: auth.c,v 1.19 1997/11/09 14:18:32 brian Exp $ * * TODO: * o Implement check against with registered IP addresses. @@ -62,8 +62,17 @@ LocalAuthInit() /* We're allowed in interactive and direct */ VarLocalAuth = LOCAL_AUTH; else - VarLocalAuth = LocalAuthValidate(SECRETFILE, VarShortHost, "") - == NOT_FOUND ? LOCAL_DENY : LOCAL_NO_AUTH; + switch (LocalAuthValidate(SECRETFILE, VarShortHost, "")) { + case NOT_FOUND: + VarLocalAuth = LOCAL_DENY; + break; + case VALID: + VarLocalAuth = LOCAL_AUTH; + break; + case INVALID: + VarLocalAuth = LOCAL_NO_AUTH; + break; + } } LOCAL_AUTH_VALID diff --git a/usr.sbin/ppp/command.c b/usr.sbin/ppp/command.c index da084a1..c4fbb26 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.92 1997/11/09 06:22:39 brian Exp $ + * $Id: command.c,v 1.93 1997/11/09 17:51:24 brian Exp $ * */ #include <sys/param.h> @@ -67,6 +67,7 @@ #include "ccp.h" #include "ip.h" #include "slcompress.h" +#include "auth.h" struct in_addr ifnetmask; @@ -760,7 +761,7 @@ QuitCommand(struct cmdtab const * list, int argc, char **argv) Cleanup(EX_NORMAL); } else if (VarTerm) { LogPrintf(LogPHASE, "Client connection closed.\n"); - VarLocalAuth = LOCAL_NO_AUTH; + LocalAuthInit(); mode &= ~MODE_INTER; oVarTerm = VarTerm; VarTerm = 0; diff --git a/usr.sbin/ppp/main.c b/usr.sbin/ppp/main.c index efe5e0a..3e80471 100644 --- a/usr.sbin/ppp/main.c +++ b/usr.sbin/ppp/main.c @@ -17,7 +17,7 @@ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. * - * $Id: main.c,v 1.89 1997/11/09 06:22:43 brian Exp $ + * $Id: main.c,v 1.90 1997/11/09 14:18:45 brian Exp $ * * TODO: * o Add commands for traffic summary, version display, etc. @@ -560,7 +560,7 @@ ReadTty() Prompt(); } else { LogPrintf(LogPHASE, "client connection closed.\n"); - VarLocalAuth = LOCAL_NO_AUTH; + LocalAuthInit(); mode &= ~MODE_INTER; oVarTerm = VarTerm; VarTerm = 0; |