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:
des 2002-01-21 19:05:45 +00:00
parent aeaf48654b
commit ac843e8b75

View File

@ -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);