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.
This commit is contained in:
mpp 1997-04-02 06:20:04 +00:00
parent 74ec951deb
commit c04526324b

View File

@ -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);
}