blob: 81f608a4d8774002e5b40d55436a271809eb2160 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
/* ISC license. */
#include <sys/types.h>
#include <skalibs/getpeereid.h>
#include <skalibs/webipc.h>
int ipc_eid (int s, unsigned int *u, unsigned int *g)
{
uid_t dummyu ;
gid_t dummyg ;
if (getpeereid(s, &dummyu, &dummyg) < 0) return -1 ;
*u = (unsigned int)dummyu ;
*g = (unsigned int)dummyg ;
return 0 ;
}
|