fehQlibs
26
Qlibs
Loading...
Searching...
No Matches
fehQlibs-26
src
prot.c
Go to the documentation of this file.
1
#include <sys/types.h>
2
#include <unistd.h>
3
#include <grp.h>
4
//#include "hasshsgr.h"
5
#include "
prot.h
"
6
14
/* XXX: there are more portability problems here waiting to leap out at me */
15
16
int
prot_gid
(
int
gid)
17
{
18
//#ifdef HASSHORTSETGROUPS
19
// short x[2];
20
// x[0] = gid; x[1] = 73; /* catch errors */
21
// if (setgroups(1,x) == -1) return -1;
22
//#else
23
if
(setgroups(1,(gid_t *)&gid) == -1)
return
-1;
24
//#endif
25
return
setgid(gid);
/* _should_ be redundant, but on some systems it isn't */
26
}
27
28
int
prot_uid
(
int
uid)
29
{
30
return
setuid(uid);
31
}
prot_gid
int prot_gid(int gid)
Definition:
prot.c:16
prot_uid
int prot_uid(int uid)
Definition:
prot.c:28
prot.h
Generated on Sat Nov 2 2024 13:01:06 for fehQlibs by
1.9.6