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/auth.c | |
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/auth.c')
-rw-r--r-- | usr.sbin/ppp/auth.c | 15 |
1 files changed, 12 insertions, 3 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 |