Fix a bug that could result in getpw*() incorrectly returning NULL when NIS

adjunct maps are used.  One symtom of this bug is sshd saying:
	login_get_lastlog: Cannot find account for uid X
when logging in.  The problem here is caused by an incorrect reuse of the rv
variable when previous values are needed later.
This commit is contained in:
Jonathan Chen 2004-04-21 21:15:08 +00:00
parent f0c8cb0022
commit dbb4b1c83d
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=128537

View File

@ -1136,6 +1136,7 @@ nis_passwd(void *retval, void *mdata, va_list ap)
pwd->pw_fields |= _PWF_NIS;
if (retval != NULL)
*(struct passwd **)retval = pwd;
rv = NS_SUCCESS;
}
return (rv);
erange: