diff options
Diffstat (limited to 'prot.c')
-rw-r--r-- | prot.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -1,12 +1,15 @@ | |||
1 | /* Public domain. */ | 1 | /* Public domain. */ |
2 | 2 | ||
3 | #include <sys/types.h> | ||
4 | #include <unistd.h> | ||
5 | #include <grp.h> | ||
3 | #include "hasshsgr.h" | 6 | #include "hasshsgr.h" |
4 | #include "prot.h" | 7 | #include "prot.h" |
5 | 8 | ||
6 | int prot_gid(int gid) | 9 | int prot_gid(gid_t gid) |
7 | { | 10 | { |
8 | #ifdef HASSHORTSETGROUPS | 11 | #ifdef HASSHORTSETGROUPS |
9 | short x[2]; | 12 | gid_t x[2]; |
10 | x[0] = gid; x[1] = 73; /* catch errors */ | 13 | x[0] = gid; x[1] = 73; /* catch errors */ |
11 | if (setgroups(1,x) == -1) return -1; | 14 | if (setgroups(1,x) == -1) return -1; |
12 | #else | 15 | #else |