On platforms with no way to get peer UID, use getuid(), also fix some failure

checks.
This commit is contained in:
Nicholas Marriott
2022-04-06 16:47:59 +01:00
parent 3a6d82b7c8
commit 8bcd392ee7
3 changed files with 8 additions and 5 deletions

View File

@ -53,7 +53,6 @@ getpeereid(int s, uid_t *uid, gid_t *gid)
return (0);
}
#else
errno = EOPNOTSUPP;
return (-1);
return (getuid());
#endif
}