mirror of
https://github.com/tmux/tmux.git
synced 2024-12-25 19:08:58 +00:00
Remove extra definition of getpeereid. From Eric N Vander Weele in GitHub issue
3209.
This commit is contained in:
parent
988e59cf3e
commit
6a9bb2a622
@ -38,9 +38,6 @@ getpeereid(int s, uid_t *uid, gid_t *gid)
|
|||||||
*gid = uc.gid;
|
*gid = uc.gid;
|
||||||
return (0);
|
return (0);
|
||||||
#elif defined(HAVE_GETPEERUCRED)
|
#elif defined(HAVE_GETPEERUCRED)
|
||||||
int
|
|
||||||
getpeereid(int s, uid_t *uid, gid_t *gid)
|
|
||||||
{
|
|
||||||
ucred_t *ucred = NULL;
|
ucred_t *ucred = NULL;
|
||||||
|
|
||||||
if (getpeerucred(s, &ucred) == -1)
|
if (getpeerucred(s, &ucred) == -1)
|
||||||
@ -51,7 +48,6 @@ getpeereid(int s, uid_t *uid, gid_t *gid)
|
|||||||
return (-1);
|
return (-1);
|
||||||
ucred_free(ucred);
|
ucred_free(ucred);
|
||||||
return (0);
|
return (0);
|
||||||
}
|
|
||||||
#else
|
#else
|
||||||
return (getuid());
|
return (getuid());
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user