[patch] get rlm_linelog syslog working with Solaris9

Hermann Lauer Hermann.Lauer at iwr.uni-heidelberg.de
Tue Mar 3 14:38:34 CET 2009


Dear Developers,

according to the syslog call manpage (checked in Linux and Solaris 9)
LOG_PID is only usable in the openlog call, so the current code
needs the attached patch to get rlm_linelog syslog logging working 
under Solaris 9.

Hardcoding LOG_AUTHPRIV also makes not too much sense for me,
as the syslog facility can be configured in the log section anyways.

Best of course would be to make it configurable per linelog instance using the
 static const FR_NAME_NUMBER str2fac
array defined in the src/main/mainconfig.c file.

Please comment,
  greetings
    Hermann

-- 
Netzwerkadministration/Zentrale Dienste, Interdiziplinaeres 
Zentrum fuer wissenschaftliches Rechnen der Universitaet Heidelberg
IWR; INF 368; 69120 Heidelberg; Tel: (06221)54-8236 Fax: -5224
Email: Hermann.Lauer at iwr.uni-heidelberg.de
-------------- next part --------------
--- freeradius-server-2.1.3/src/modules/rlm_linelog/rlm_linelog.c.syslog	2009-03-02 11:48:07.000000000 +0100
+++ freeradius-server-2.1.3/src/modules/rlm_linelog/rlm_linelog.c	2009-03-03 14:16:34.000000000 +0100
@@ -34,14 +34,6 @@
 #ifdef HAVE_SYSLOG_H
 #include <syslog.h>
 
-#ifndef LOG_AUTHPRIV
-#define LOG_AUTHPRIV LOG_USER
-#endif
-
-#ifndef LOG_PID
-#define LOG_PID (0)
-#endif
-
 #ifndef LOG_INFO
 #define LOG_INFO (0)
 #endif
@@ -270,7 +262,7 @@
 
 #ifdef HAVE_SYSLOG_H
 	} else {
-		syslog(LOG_AUTHPRIV | LOG_PID | LOG_INFO, "%s", line);
+		syslog(LOG_INFO, "%s", line);
 #endif
 	}
 


More information about the Freeradius-Devel mailing list