Fix fallback implementaion of getpeereid, from Pino Toscano.

pull/3313/head
Nicholas Marriott 2022-08-22 08:20:49 +01:00
parent 9c34aad21c
commit 19344efa78
1 changed files with 4 additions and 1 deletions

View File

@ -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
}