We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c3c65bc commit fc2f867Copy full SHA for fc2f867
2 files changed
src/prot.c
@@ -3,7 +3,11 @@
3
#include "hasshsgr.h"
4
#include "prot.h"
5
6
-int prot_gid(int gid)
+#include <sys/types.h>
7
+#include <unistd.h>
8
+#include <grp.h>
9
+
10
+int prot_gid(gid_t gid)
11
{
12
#ifdef HASSHORTSETGROUPS
13
short x[2];
@@ -15,7 +19,7 @@ int prot_gid(int gid)
15
19
return setgid(gid); /* _should_ be redundant, but on some systems it isn't */
16
20
}
17
21
18
-int prot_uid(int uid)
22
+int prot_uid(uid_t uid)
23
24
return setuid(uid);
25
src/prot.h
@@ -3,7 +3,9 @@
#ifndef PROT_H
#define PROT_H
-extern int prot_gid(int);
-extern int prot_uid(int);
+extern int prot_gid(gid_t);
+extern int prot_uid(uid_t);
#endif
0 commit comments