diff options
author | Robert James Kaes <rjkaes@users.sourceforge.net> | 2002-07-12 17:02:02 +0000 |
---|---|---|
committer | Robert James Kaes <rjkaes@users.sourceforge.net> | 2002-07-12 17:02:02 +0000 |
commit | f8b5fe53e7319d1003273525543689edd91c1cfb (patch) | |
tree | b1890e5a4729da6538b3ba4c3cb71887f7d9d0ec /src/tinyproxy.c | |
parent | 632f689209dc48ea9142e826ccd670024782d0ed (diff) | |
download | tinyproxy-f8b5fe53e7319d1003273525543689edd91c1cfb.tar.gz tinyproxy-f8b5fe53e7319d1003273525543689edd91c1cfb.zip |
(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?
Diffstat (limited to 'src/tinyproxy.c')
-rw-r--r-- | src/tinyproxy.c | 12 |
1 files changed, 6 insertions, 6 deletions
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. */ |