mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-12-03 19:08:58 +00:00
Unbreak PAP-only authentication.
PR: i386/34607 Not objected by: peter Approved by: ru Obtained from: ppp-2.4.1b2 MFC after: 1 week
This commit is contained in:
parent
21147bea38
commit
7b65fef03a
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=91675
@ -676,11 +676,17 @@ check_passwd(unit, auser, userlen, apasswd, passwdlen, msg, msglen)
|
||||
check_access(f, filename);
|
||||
remote = ipwo->accept_remote? 0: ipwo->hisaddr;
|
||||
if (scan_authfile(f, user, our_name, remote,
|
||||
secret, &addrs, filename) < 0
|
||||
|| (secret[0] != 0 && (cryptpap || strcmp(passwd, secret) != 0)
|
||||
&& strcmp(crypt(passwd, secret), secret) != 0)) {
|
||||
syslog(LOG_WARNING, "PAP authentication failure for %s", user);
|
||||
ret = UPAP_AUTHNAK;
|
||||
secret, &addrs, filename) < 0) {
|
||||
warn("no PAP secret found for %s", user);
|
||||
} else {
|
||||
if (secret[0] != 0) {
|
||||
/* password given in pap-secrets - must match */
|
||||
if ((cryptpap || strcmp(passwd, secret) != 0)
|
||||
&& strcmp(crypt(passwd, secret), secret) != 0) {
|
||||
ret = UPAP_AUTHNAK;
|
||||
warn("PAP authentication failure for %s", user);
|
||||
}
|
||||
}
|
||||
}
|
||||
fclose(f);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user