Return PAM_SERVICE_ERR rather than PAM_USER_UNKNOWN if getpwnam() fails, as
PAM_USER_UNKNOWN will break the chain, revealing to an attacker that the user does not exist. Sponsored by: DARPA, NAI Labs
This commit is contained in:
parent
ae739ec469
commit
b4b56d051a
@ -73,7 +73,7 @@ pam_sm_authenticate(pam_handle_t *pamh, int flags, int argc, const char **argv)
|
||||
|
||||
pwent = getpwnam(luser);
|
||||
if (pwent == NULL)
|
||||
PAM_RETURN(PAM_USER_UNKNOWN);
|
||||
PAM_RETURN(PAM_SERVICE_ERR);
|
||||
|
||||
if (opielookup(&opie, luser) != 0)
|
||||
PAM_RETURN(PAM_IGNORE);
|
||||
|
Loading…
x
Reference in New Issue
Block a user