summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/libc/gen/getpwent.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/libc/gen/getpwent.c b/lib/libc/gen/getpwent.c
index eb1825f..f00b20b 100644
--- a/lib/libc/gen/getpwent.c
+++ b/lib/libc/gen/getpwent.c
@@ -623,8 +623,12 @@ fin:
(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);
}
OpenPOWER on IntegriCloud