diff options
author | Nicholas Marriott <nicholas.marriott@gmail.com> | 2022-04-06 16:47:59 +0100 |
---|---|---|
committer | Nicholas Marriott <nicholas.marriott@gmail.com> | 2022-04-06 16:47:59 +0100 |
commit | 8bcd392ee79996f828fd40c52198071ec0f273dd (patch) | |
tree | 5bef646118a218f281e7ff9764c301f117da6f50 /compat | |
parent | 3a6d82b7c8d4254fa87959d8cf19b313f5e05480 (diff) |
On platforms with no way to get peer UID, use getuid(), also fix some failure
checks.
Diffstat (limited to 'compat')
-rw-r--r-- | compat/getpeereid.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/compat/getpeereid.c b/compat/getpeereid.c index 5a593c07..c4988438 100644 --- a/compat/getpeereid.c +++ b/compat/getpeereid.c @@ -53,7 +53,6 @@ getpeereid(int s, uid_t *uid, gid_t *gid) return (0); } #else - errno = EOPNOTSUPP; - return (-1); + return (getuid()); #endif } |