diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/listen.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/listen.c b/src/listen.c index 9fb60edcb..3028b9476 100644 --- a/src/listen.c +++ b/src/listen.c @@ -416,7 +416,13 @@ static int get_remote_uid(int fd) return cred.uid; #else - (void)fd; +#ifdef HAVE_GETPEEREID + uid_t euid; + gid_t egid; + + if (getpeereid(fd, &euid, &egid) == 0) + return euid; +#endif return -1; #endif } |