diff options
-rw-r--r-- | src/shared/util.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/shared/util.c b/src/shared/util.c index 0a9696f424..dbb425b050 100644 --- a/src/shared/util.c +++ b/src/shared/util.c @@ -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; |