mirror of
https://github.com/tmux/tmux.git
synced 2025-04-10 02:58:50 +00:00
Fix fallback implementaion of getpeereid, from Pino Toscano.
This commit is contained in:
parent
9c34aad21c
commit
19344efa78
@ -18,6 +18,7 @@
|
|||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
|
||||||
#ifdef HAVE_UCRED_H
|
#ifdef HAVE_UCRED_H
|
||||||
#include <ucred.h>
|
#include <ucred.h>
|
||||||
@ -49,6 +50,8 @@ getpeereid(int s, uid_t *uid, gid_t *gid)
|
|||||||
ucred_free(ucred);
|
ucred_free(ucred);
|
||||||
return (0);
|
return (0);
|
||||||
#else
|
#else
|
||||||
return (getuid());
|
*uid = geteuid();
|
||||||
|
*gid = getegid();
|
||||||
|
return (0);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user