Correctly set _PWF_FILES in pw_fields when appropriate.

(_PWF_NIS and _PWF_HESIOD were already being set.)

Reported by:	Shizuka Kudo <shizukakudo_99@yahoo.com>
Sponsored by:	DARPA, Network Associates Laboratories
This commit is contained in:
Jacques Vidrine 2003-04-18 16:24:25 +00:00
parent 97f9172896
commit 71cc8f0764
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=113670

View File

@ -623,8 +623,12 @@ files_passwd(void *retval, void *mdata, va_list ap)
(void)st->db->close(st->db);
st->db = NULL;
}
if (rv == NS_SUCCESS && retval != NULL)
*(struct passwd **)retval = pwd;
if (rv == NS_SUCCESS) {
pwd->pw_fields &= ~_PWF_SOURCE;
pwd->pw_fields |= _PWF_FILES;
if (retval != NULL)
*(struct passwd **)retval = pwd;
}
return (rv);
}