From f8b5fe53e7319d1003273525543689edd91c1cfb Mon Sep 17 00:00:00 2001 From: Robert James Kaes Date: Fri, 12 Jul 2002 17:02:02 +0000 Subject: (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? --- src/tinyproxy.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/tinyproxy.c b/src/tinyproxy.c index c8487c8..ded63c7 100644 --- a/src/tinyproxy.c +++ b/src/tinyproxy.c @@ -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. */ -- cgit v1.2.3