+2008-01-21 Guillem Jover <guillem@debian.org>
+
+ * utils/start-stop-daemon.c (main): Cast runas_uid and runas_gid to
+ uid_t and gid_t when comparing to getuid() and getgid().
+
2008-01-21 Guillem Jover <guillem@debian.org>
* configure.ac (AC_CHECK_FUNCS): Merge arguments from both macro
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",