Current CVS logging issue

Dinko Korunic kreator at esa.fer.hr
Mon Jun 20 11:28:19 CEST 2005


Hi. I believe that it might be a bug in current CVS. I've encountered an
issue that FreeRADIUS does not log nor into files, nor into syslog, no
matter what the configuration says [always dumps on stdout/stderr]. I've
tried to track down the cause, and it might be this:

arwen:~/work/cvs/radiusd-cvs/src/main# cvs diff -u mainconfig.c
Index: mainconfig.c
===================================================================
RCS file: /source/radiusd/src/main/mainconfig.c,v
retrieving revision 1.63
diff -u -r1.63 mainconfig.c
--- mainconfig.c        26 May 2005 21:26:29 -0000      1.63
+++ mainconfig.c        20 Jun 2005 09:17:45 -0000
@@ -945,8 +945,8 @@
         *
         *      This really is a hack, but it works...
         */
-       if ((debug_flag < 2) &&
-           (mainconfig.radlog_dest != RADLOG_STDOUT)) {
+       if (debug_flag < 2)
+           {
                mainconfig.radlog_dest = lrad_str2int(str2dest, radlog_dest, RADLOG_NULL);
                if (mainconfig.radlog_dest == RADLOG_NULL) {
                        fprintf(stderr, "radiusd: Error: Unknown log_destination %s\n",

I believe that mainconfig.radlog_dest doesn't get initialised, since local
radlog_dest is used:

static char *radlog_dest = NULL;

as well as:

{ "log_destination", PW_TYPE_STRING_PTR, -1, &radlog_dest, "files" },

That would mean that (mainconfig.radlog_dest != RADLOG_STDOUT) is
obviously a bogus check, since it should check radlog_dest, rather than
mainconfig.radlog_dest.

-- 
NAME:Dinko.kreator.Korunic   NOTE:Standard.disclaimer.applies
URL:kreator.esa.fer.hr  IRC:kre  ICQ:16965294  PGP:0xea160d0b



More information about the Freeradius-Users mailing list