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:
parent
74ec951deb
commit
c04526324b
@ -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);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user