aboutsummaryrefslogtreecommitdiffstats
path: root/guts/setregid.c
diff options
context:
space:
mode:
Diffstat (limited to 'guts/setregid.c')
-rw-r--r--guts/setregid.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/guts/setregid.c b/guts/setregid.c
index 2444390..0be0146 100644
--- a/guts/setregid.c
+++ b/guts/setregid.c
@@ -4,20 +4,20 @@
* int rc = -1;
*/
rc = 0;
- if (pseudo_euid != 0 && rgid != -1 &&
+ if (pseudo_euid != 0 && rgid != (gid_t) -1 &&
rgid != pseudo_egid && rgid != pseudo_rgid && rgid != pseudo_sgid) {
rc = -1;
errno = EPERM;
}
- if (pseudo_euid != 0 && egid != -1 &&
+ if (pseudo_euid != 0 && egid != (gid_t) -1 &&
egid != pseudo_egid && egid != pseudo_rgid && egid != pseudo_sgid) {
rc = -1;
errno = EPERM;
}
if (rc != -1) {
- if (rgid != -1)
+ if (rgid != (gid_t) -1)
pseudo_rgid = rgid;
- if (egid != -1)
+ if (egid != (gid_t) -1)
pseudo_egid = egid;
pseudo_fgid = pseudo_egid;
pseudo_client_touchuid();