]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Remove redundant "open log files"
authorAlan T. DeKok <aland@freeradius.org>
Mon, 1 Jun 2015 13:04:43 +0000 (09:04 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Mon, 1 Jun 2015 13:05:28 +0000 (09:05 -0400)
src/main/mainconfig.c

index 35a570792628c97ef5559ab340d7d7e36570d9c8..730bcb390b81e83fe1c41f5fbc10ab86bc857230 100644 (file)
@@ -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.