diff options
author | mpp <mpp@FreeBSD.org> | 1997-04-02 06:20:04 +0000 |
---|---|---|
committer | mpp <mpp@FreeBSD.org> | 1997-04-02 06:20:04 +0000 |
commit | c04526324b8ca45a7cb2892d49e508066568a072 (patch) | |
tree | 8beaa73d1b0a39a7384368c5fe10decdcd55da9b /lib/libc | |
parent | 74ec951debfa4c038fe32f4101ec961d4d781e73 (diff) | |
download | FreeBSD-src-c04526324b8ca45a7cb2892d49e508066568a072.zip FreeBSD-src-c04526324b8ca45a7cb2892d49e508066568a072.tar.gz |
The user_from_{uid,gid} routines would return garbage if the
uid/gid in question was in the cache, but did not exist
in the password file. This causes the -nouser and -nogroup
options to find(1) to only print the first file owned by
an unknown user/group in some cases.
Diffstat (limited to 'lib/libc')
-rw-r--r-- | lib/libc/gen/pwcache.c | 4 |
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); } |