OS: RH9.0 Platform: i386 FreeRadius Version: 0.9.3 Problem Summary: radiusd: radiusd: Couldn't open syslog/radius.log for logging: Not a directory
Problem Detials: It appears that freeradius is attempting to log to a file when asked to to log to the syslog. Listed below is the config settings and init script to confirm correct settings. In looking at the source, it appears that RADLOG_SYSLOG is never defined and as such has a null value when being evaluated in the following code snippets: *************radiusd.c********************** #if HAVE_SYSLOG_H /* * If they asked for syslog, then give it to them. * Also, initialize the logging facility with the * configuration that they asked for. */ if (strcmp(radlog_dir, "syslog") == 0) { openlog(progname, LOG_PID, syslog_facility); radlog_dest = RADLOG_SYSLOG; } /* Do you want a warning if -g is used without a -l to activate it? */ #endif if (strcmp(radlog_dir, "stdout") == 0) { radlog_dest = RADLOG_STDOUT; } else if (strcmp(radlog_dir, "stderr") == 0) { radlog_dest = RADLOG_STDERR; } *************log.c********************** if (radlog_dest == RADLOG_NULL) { return 0; } if (debug_flag || (radlog_dest == RADLOG_STDOUT) || (radlog_dir == NULL)) { msgfd = stdout; } else if (radlog_dest == RADLOG_STDERR) { msgfd = stderr; } else if (radlog_dest != RADLOG_SYSLOG) { /* * No log file set. It must go to stdout. */ if (!mainconfig.log_file) { msgfd = stdout; /* * Else try to open the file. */ } else if ((msgfd = fopen(mainconfig.log_file, "a")) == NULL) { fprintf(stderr, "%s: Couldn't open %s for logging: %s\n", progname, mainconfig.log_file, strerror(errno)); fprintf(stderr, " ("); vfprintf(stderr, fmt, ap); /* the message that caused the log */ fprintf(stderr, ")\n"); return -1; } } #if HAVE_SYSLOG_H if (radlog_dest == RADLOG_SYSLOG) { *buffer = '\0'; len = 0; } else #endif *********CONFIGURATION FILE SETTINGS************************* prefix = /usr/local exec_prefix = ${prefix} sysconfdir = ${prefix}/etc localstatedir = ${prefix}/var sbindir = ${exec_prefix}/sbin #logdir = ${localstatedir}/log/radius logdir = syslog raddbdir = ${sysconfdir}/raddb #radacctdir = ${logdir}/radacct confdir = ${raddbdir} run_dir = ${localstatedir}/run/radiusd libdir = ${exec_prefix}/lib pidfile = ${run_dir}/radiusd.pid #user = nobody #group = nobody max_request_time = 30 delete_blocked_requests = no cleanup_delay = 5 max_requests = 1024 bind_address = XX.XX.XX.XX port = 0 hostname_lookups = no allow_core_dumps = no regular_expressions = yes extended_expressions = yes log_stripped_names = yes log_auth = yes log_auth_badpass = yes log_auth_goodpass = no *********INIT SCRIPT************************* # Source function library. . /etc/rc.d/init.d/functions RADIUSD=/usr/local/sbin/radiusd LOCKF=/var/lock/subsys/radiusd CONFIG=/usr/local/etc/raddb/radiusd.conf [ -f $RADIUSD ] || exit 0 [ -f $CONFIG ] || exit 0 RETVAL=0 case "$1" in start) echo -n $"Starting RADIUS server: " daemon $RADIUSD RETVAL=$? echo [ $RETVAL -eq 0 ] && touch $LOCKF && ln -s /var/run/radiusd/radiusd.pid /var/run/radiusd.pid 2>/dev/null ;; stop) - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html