From 00d9b6b8d64f4e4706fb372082dcede7740a98c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dag-Erling=20Sm=C3=B8rgrav?= Date: Mon, 15 Apr 2002 00:21:25 +0000 Subject: [PATCH] Missed a spot in previous commit. Sponsored by: DARPA, NAI Labs --- lib/libc/gen/getpwent.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/libc/gen/getpwent.c b/lib/libc/gen/getpwent.c index 235aa2b17634..1d10a0b2aff2 100644 --- a/lib/libc/gen/getpwent.c +++ b/lib/libc/gen/getpwent.c @@ -408,7 +408,7 @@ _local_getpw(rv, cb_data, ap) (void)(_pw_db->close)(_pw_db); _pw_db = (DB *)NULL; } - if (rval == 0) { + if (rval == NS_SUCCESS) { _pw_passwd.pw_fields &= ~_PWF_SOURCE; _pw_passwd.pw_fields |= _PWF_FILES; } @@ -558,6 +558,8 @@ _nis_getpw(rv, cb_data, ap) free(data); if (__pwparse(&_pw_passwd, line)) return NS_UNAVAIL; + _pw_passwd.pw_fields &= ~_PWF_SOURCE; + _pw_passwd.pw_fields |= _PWF_NIS; return NS_SUCCESS; }