diff options
Diffstat (limited to '')
-rw-r--r-- | compat/getpeereid.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/compat/getpeereid.c b/compat/getpeereid.c index c194e88..b79f420 100644 --- a/compat/getpeereid.c +++ b/compat/getpeereid.c @@ -18,6 +18,7 @@ #include <sys/socket.h> #include <stdio.h> +#include <unistd.h> #ifdef HAVE_UCRED_H #include <ucred.h> @@ -49,6 +50,8 @@ getpeereid(int s, uid_t *uid, gid_t *gid) ucred_free(ucred); return (0); #else - return (getuid()); + *uid = geteuid(); + *gid = getegid(); + return (0); #endif } |