Return correct error status when setuid() or setgid() fails
This commit is contained in:
parent
56748c5e65
commit
1d744eb4c9
@ -228,7 +228,7 @@ change_user (const char *program)
|
|||||||
fprintf (stderr,
|
fprintf (stderr,
|
||||||
"%s: Unable to change to group \"%s\".\n",
|
"%s: Unable to change to group \"%s\".\n",
|
||||||
program, config.group);
|
program, config.group);
|
||||||
exit (EX_CANTCREAT);
|
exit (EX_NOPERM);
|
||||||
}
|
}
|
||||||
|
|
||||||
log_message (LOG_INFO, "Now running as group \"%s\".",
|
log_message (LOG_INFO, "Now running as group \"%s\".",
|
||||||
@ -255,7 +255,7 @@ change_user (const char *program)
|
|||||||
fprintf (stderr,
|
fprintf (stderr,
|
||||||
"%s: Unable to change to user \"%s\".\n",
|
"%s: Unable to change to user \"%s\".\n",
|
||||||
program, config.user);
|
program, config.user);
|
||||||
exit (EX_CANTCREAT);
|
exit (EX_NOPERM);
|
||||||
}
|
}
|
||||||
|
|
||||||
log_message (LOG_INFO, "Now running as user \"%s\".",
|
log_message (LOG_INFO, "Now running as user \"%s\".",
|
||||||
|
Loading…
Reference in New Issue
Block a user