summaryrefslogtreecommitdiffstats
path: root/lib/libc
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc')
-rw-r--r--lib/libc/gen/pwcache.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libc/gen/pwcache.c b/lib/libc/gen/pwcache.c
index a4328ae..3213f4b 100644
--- a/lib/libc/gen/pwcache.c
+++ b/lib/libc/gen/pwcache.c
@@ -79,7 +79,7 @@ user_from_uid(uid, nouser)
return (NULL);
}
}
- return (cp->name);
+ return (cp->found ? cp->name : NULL);
}
char *
@@ -115,5 +115,5 @@ group_from_gid(gid, nogroup)
return (NULL);
}
}
- return (cp->name);
+ return (cp->found ? cp->name : NULL);
}
OpenPOWER on IntegriCloud