summaryrefslogtreecommitdiffstats
path: root/compat/getpeereid.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 03:34:56 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 03:34:56 +0000
commit671f456761fc66649260e831ceee36ec3d4ba9ca (patch)
tree033c56bded071f681e1304311ba0bff449d477cc /compat/getpeereid.c
parentAdding debian version 3.3a-5. (diff)
downloadtmux-671f456761fc66649260e831ceee36ec3d4ba9ca.tar.xz
tmux-671f456761fc66649260e831ceee36ec3d4ba9ca.zip
Merging upstream version 3.4.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'compat/getpeereid.c')
-rw-r--r--compat/getpeereid.c5
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
}