diff options
author | Guillem Jover <guillem@debian.org> | 2008-01-21 07:02:04 +0200 |
---|---|---|
committer | Guillem Jover <guillem@debian.org> | 2008-01-21 07:02:04 +0200 |
commit | ca4146598ea3bb8f079786b6c97856fdb1862b62 (patch) | |
tree | fbac5b2ae8315c65961a2a158ddb7a99963d8eb9 /utils | |
parent | 29671807e2f2f02c6699b19639a0747b5f6bf5f7 (diff) | |
download | dpkg-ca4146598ea3bb8f079786b6c97856fdb1862b62.tar.gz |
s-s-d: Fix signed vs unsigned warning when comparing to getuid and getgid
Diffstat (limited to 'utils')
-rw-r--r-- | utils/start-stop-daemon.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/utils/start-stop-daemon.c b/utils/start-stop-daemon.c index cf34c6d5a..ed21c3c26 100644 --- a/utils/start-stop-daemon.c +++ b/utils/start-stop-daemon.c @@ -1413,11 +1413,12 @@ main(int argc, char **argv) if (chdir(changedir) < 0) fatal("Unable to chdir() to %s", changedir); - if (changeuser != NULL && getuid() != runas_uid) { + if (changeuser != NULL && getuid() != (uid_t)runas_uid) { if (setuid(runas_uid)) fatal("Unable to set uid to %s", changeuser); } - if (changegroup != NULL && *changegroup != '\0' && getgid() != runas_gid) { + if (changegroup != NULL && *changegroup != '\0' && + getgid() != (gid_t)runas_gid) { if (!gid_in_current_groups(runas_gid)) if (initgroups(changeuser, runas_gid)) fatal("Unable to set initgroups() with gid %d", |