On second thought, getpwnam() failure should be treated just as if the user
existed, but had no OPIE key, i.e. PAM_IGNORE. Pointed out by: ache Sponsored by: DARPA, NAI Labs
This commit is contained in:
parent
aeaf48654b
commit
ac843e8b75
@ -72,10 +72,7 @@ pam_sm_authenticate(pam_handle_t *pamh, int flags, int argc, const char **argv)
|
||||
PAM_RETURN(PAM_SERVICE_ERR);
|
||||
|
||||
pwent = getpwnam(luser);
|
||||
if (pwent == NULL)
|
||||
PAM_RETURN(PAM_SERVICE_ERR);
|
||||
|
||||
if (opielookup(&opie, luser) != 0)
|
||||
if (pwent == NULL || opielookup(&opie, luser) != 0)
|
||||
PAM_RETURN(PAM_IGNORE);
|
||||
|
||||
r = pam_get_item(pamh, PAM_RHOST, (const void **)&rhost);
|
||||
|
Loading…
Reference in New Issue
Block a user