diff --git a/lib/libc/gen/getpwent.c b/lib/libc/gen/getpwent.c index 1d10a0b2aff2..a3bfed869d7a 100644 --- a/lib/libc/gen/getpwent.c +++ b/lib/libc/gen/getpwent.c @@ -966,6 +966,9 @@ _compat_getpw(rv, cb_data, ap) break; } break; + default: + _pw_passwd.pw_fields &= ~_PWF_SOURCE; + _pw_passwd.pw_fields |= _PWF_FILES; } if ((search == _PW_KEYBYNAME && strcmp(_pw_passwd.pw_name, name) == 0)