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.