Revert "main: drop privileges right after reading the config"
This reverts commit 7a9abc2a04. It should
fix the issue in bug #87.
This commit is contained in:
1 parent
1e0ad98f7f
commit
d30ee746a7
1 file changed
+7
-8
+7
-8
@@ -393,14 +393,6 @@ main (int argc, char **argv)
|
||||
exit (EX_SOFTWARE);
|
||||
}
|
||||
|
||||
/* Switch to a different user if we're running as root */
|
||||
if (geteuid () == 0) {
|
||||
change_user (argv[0]);
|
||||
} else {
|
||||
log_message (LOG_WARNING,
|
||||
"Not running as root, so not changing UID/GID.");
|
||||
}
|
||||
|
||||
ret = setup_logging ();
|
||||
if (ret != 0) {
|
||||
exit (EX_SOFTWARE);
|
||||
@@ -446,6 +438,13 @@ main (int argc, char **argv)
|
||||
exit (EX_OSERR);
|
||||
}
|
||||
|
||||
/* Switch to a different user if we're running as root */
|
||||
if (geteuid () == 0)
|
||||
change_user (argv[0]);
|
||||
else
|
||||
log_message (LOG_WARNING,
|
||||
"Not running as root, so not changing UID/GID.");
|
||||
|
||||
if (child_pool_create () < 0) {
|
||||
fprintf (stderr,
|
||||
"%s: Could not create the pool of children.\n",
|
||||
|
||||
Reference in new issue
Block a user