From: Alan T. DeKok Date: Mon, 1 Jun 2015 13:04:43 +0000 (-0400) Subject: Remove redundant "open log files" X-Git-Tag: release_3_0_9~302 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=27dd73933e6f669c8d84b4fe5a816fb8c0c4147a;p=thirdparty%2Ffreeradius-server.git Remove redundant "open log files" --- diff --git a/src/main/mainconfig.c b/src/main/mainconfig.c index 35a57079262..730bcb390b8 100644 --- a/src/main/mainconfig.c +++ b/src/main/mainconfig.c @@ -840,22 +840,6 @@ do {\ if (!switch_users(cs)) fr_exit(1); #endif - /* - * Open the log file AFTER switching uid / gid. If we - * did switch uid/gid, then the code in switch_users() - * took care of setting the file permissions correctly. - */ - if ((default_log.dst == L_DST_FILES) && - (default_log.fd < 0)) { - default_log.fd = open(main_config.log_file, - O_WRONLY | O_APPEND | O_CREAT, 0640); - if (default_log.fd < 0) { - fprintf(stderr, "radiusd: Failed to open log file %s: %s\n", main_config.log_file, fr_syserror(errno)); - cf_file_free(cs); - return -1; - } - } - /* * This allows us to figure out where, relative to * radiusd.conf, the other configuration files exist.