X-Git-Url: https://git.ozlabs.org/?a=blobdiff_plain;f=pppd%2Fauth.c;h=c51a67d975501cad52673bb38b1f43cb357f538c;hb=971319042d43d6d079842f88622caf721a47805b;hp=de3ae645ff0c84daa78a5a5d636b9b0590dc59bb;hpb=8592783058509b5493a42f3b0432fcbaab55c994;p=ppp.git diff --git a/pppd/auth.c b/pppd/auth.c index de3ae64..c51a67d 100644 --- a/pppd/auth.c +++ b/pppd/auth.c @@ -33,7 +33,7 @@ */ #ifndef lint -static char rcsid[] = "$Id: auth.c,v 1.52 1999/05/12 06:19:46 paulus Exp $"; +static char rcsid[] = "$Id: auth.c,v 1.53 1999/05/13 00:33:05 paulus Exp $"; #endif #include @@ -790,7 +790,8 @@ check_passwd(unit, auser, userlen, apasswd, passwdlen, msg, msglen) } else { check_access(f, filename); if (scan_authfile(f, user, our_name, secret, &addrs, filename) < 0 - || (secret[0] != 0 && (cryptpap || strcmp(passwd, secret) != 0) + || (!uselogin && secret[0] != 0 + && (cryptpap || strcmp(passwd, secret) != 0) && strcmp(crypt(passwd, secret), secret) != 0)) { warn("PAP authentication failure for %s", user); ret = UPAP_AUTHNAK;