mirror of
https://github.com/AuxXxilium/eudev.git
synced 2024-12-21 06:03:39 +07:00
util: skip incomplete ucred information in getpeersec()
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
This commit is contained in:
parent
805a4489ec
commit
e6511db5d5
@ -1480,6 +1480,10 @@ int getpeercred(int fd, struct ucred *ucred) {
|
||||
* to namespacing issues */
|
||||
if (u.pid <= 0)
|
||||
return -ENODATA;
|
||||
if (u.uid == (uid_t) -1)
|
||||
return -ENODATA;
|
||||
if (u.gid == (gid_t) -1)
|
||||
return -ENODATA;
|
||||
|
||||
*ucred = u;
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user