diff options
author | Nicholas Marriott <nicholas.marriott@gmail.com> | 2022-08-22 08:20:49 +0100 |
---|---|---|
committer | Nicholas Marriott <nicholas.marriott@gmail.com> | 2022-08-22 08:21:42 +0100 |
commit | 19344efa78be23a02008be9da0991f54455c9f9e (patch) | |
tree | 3abf5d9db5113b670f87c996b88a92470f6d36a4 | |
parent | 9c34aad21c0837123a51a5a4233a016805d3e526 (diff) | |
download | rtmux-19344efa78be23a02008be9da0991f54455c9f9e.tar.gz rtmux-19344efa78be23a02008be9da0991f54455c9f9e.tar.bz2 rtmux-19344efa78be23a02008be9da0991f54455c9f9e.zip |
Fix fallback implementaion of getpeereid, from Pino Toscano.
-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 c194e886..b79f420a 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 } |