From dbb4b1c83d511fe29dfba3973c43c4498f867d76 Mon Sep 17 00:00:00 2001 From: Jonathan Chen Date: Wed, 21 Apr 2004 21:15:08 +0000 Subject: [PATCH] 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. --- lib/libc/gen/getpwent.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/libc/gen/getpwent.c b/lib/libc/gen/getpwent.c index d0e4bf3fb02..96aee2e3741 100644 --- a/lib/libc/gen/getpwent.c +++ b/lib/libc/gen/getpwent.c @@ -1136,6 +1136,7 @@ fin: pwd->pw_fields |= _PWF_NIS; if (retval != NULL) *(struct passwd **)retval = pwd; + rv = NS_SUCCESS; } return (rv); erange: