4 /* XXX: there are more portability problems here waiting to leap out at me */
6 int prot_gid(gid) int gid;
8 #ifdef HASSHORTSETGROUPS
10 x[0] = gid; x[1] = 73; /* catch errors */
11 if (setgroups(1,x) == -1) return -1;
13 if (setgroups(1,&gid) == -1) return -1;
15 return setgid(gid); /* _should_ be redundant, but on some systems it isn't */
18 int prot_uid(uid) int uid;