(main): Fixed up a bug reported by Oswald Buddenha where the log file was being initially created with the initial user's permissions, which is obviously a problem if tinyproxy is not running as the initial user. This is now fixed by delaying the creation of the log file until _after_ tinyproxy has been switched to the user it will run as. Confused yet?
This commit is contained in:
parent
632f689209
commit
f8b5fe53e7
@ -1,4 +1,4 @@
|
||||
/* $Id: tinyproxy.c,v 1.37 2002-06-15 17:35:03 rjkaes Exp $
|
||||
/* $Id: tinyproxy.c,v 1.38 2002-07-12 17:02:02 rjkaes Exp $
|
||||
*
|
||||
* The initialize routine. Basically sets up all the initial stuff (logfile,
|
||||
* listening socket, config options, etc.) and then sits there and loops
|
||||
@ -170,6 +170,8 @@ main(int argc, char **argv)
|
||||
}
|
||||
#endif /* HAVE_SETRLIMIT */
|
||||
|
||||
log_message(LOG_INFO, "Initializing " PACKAGE " ...");
|
||||
|
||||
/*
|
||||
* Process the various options
|
||||
*/
|
||||
@ -236,11 +238,6 @@ main(int argc, char **argv)
|
||||
openlog("tinyproxy", LOG_PID, LOG_USER);
|
||||
}
|
||||
|
||||
processed_config_file = TRUE;
|
||||
log_message(LOG_INFO, PACKAGE " " VERSION " starting...");
|
||||
|
||||
send_stored_logs();
|
||||
|
||||
/*
|
||||
* Set the default values if they were not set in the config file.
|
||||
*/
|
||||
@ -355,6 +352,9 @@ main(int argc, char **argv)
|
||||
exit(EX_SOFTWARE);
|
||||
}
|
||||
|
||||
processed_config_file = TRUE;
|
||||
send_stored_logs();
|
||||
|
||||
/*
|
||||
* These signals are only for the parent process.
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user