Return correct error status when setuid() or setgid() fails

This commit is contained in:
Mukund Sivaraman 2009-09-15 01:54:26 +05:30
parent 56748c5e65
commit 1d744eb4c9

View File

@ -228,7 +228,7 @@ change_user (const char *program)
fprintf (stderr,
"%s: Unable to change to group \"%s\".\n",
program, config.group);
exit (EX_CANTCREAT);
exit (EX_NOPERM);
}
log_message (LOG_INFO, "Now running as group \"%s\".",
@ -255,7 +255,7 @@ change_user (const char *program)
fprintf (stderr,
"%s: Unable to change to user \"%s\".\n",
program, config.user);
exit (EX_CANTCREAT);
exit (EX_NOPERM);
}
log_message (LOG_INFO, "Now running as user \"%s\".",