s/qmail
4.3.20
Next generation secure email transport
Loading...
Searching...
No Matches
4.3
sqmail-4.3.20
src
prot.c
Go to the documentation of this file.
1
#include "hasshsgr.h"
2
#include "
prot.h
"
3
4
/* XXX: there are more portability problems here waiting to leap out at me */
5
6
int
prot_gid
(
int
gid)
7
{
8
#ifdef HASSHORTSETGROUPS
9
short
x[2];
10
x[0] = gid; x[1] = 73;
/* catch errors */
11
if
(setgroups(1,x) == -1)
return
-1;
12
#else
13
if
(setgroups(1,&gid) == -1)
return
-1;
14
#endif
15
return
setgid(gid);
/* _should_ be redundant, but on some systems it isn't */
16
}
17
18
int
prot_uid
(
int
uid
)
19
{
20
return
setuid(
uid
);
21
}
uid
ulongalloc uid
Definition:
matchup.c:59
prot_gid
int prot_gid(int gid)
Definition:
prot.c:6
prot_uid
int prot_uid(int uid)
Definition:
prot.c:18
prot.h
Generated on Thu Jan 16 2025 17:42:04 for s/qmail by
1.9.6