diff options
Diffstat (limited to 'guts/setresgid.c')
-rw-r--r-- | guts/setresgid.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/guts/setresgid.c b/guts/setresgid.c index 455fe62..b6491ad 100644 --- a/guts/setresgid.c +++ b/guts/setresgid.c @@ -4,27 +4,27 @@ * 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 (pseudo_euid != 0 && sgid != -1 && + if (pseudo_euid != 0 && sgid != (gid_t) -1 && sgid != pseudo_egid && sgid != pseudo_rgid && sgid != 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; - if (sgid != -1) + if (sgid != (gid_t) -1) pseudo_sgid = sgid; pseudo_fgid = pseudo_egid; pseudo_client_touchuid(); |