summaryrefslogtreecommitdiff
path: root/prot.c
diff options
context:
space:
mode:
Diffstat (limited to 'prot.c')
-rw-r--r--prot.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/prot.c b/prot.c
index 79a88c5..1ffd20c 100644
--- a/prot.c
+++ b/prot.c
@@ -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
6int prot_gid(int gid) 9int 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