--- ./sysklogd-1.4.1_orig/klogd.c 2010-10-25 12:24:07.000000000 +0000 +++ ./sysklogd-1.4.1_orig/klogd.c 2010-10-26 20:37:04.000000000 +0000 @@ -246,6 +246,10 @@ * Thu Apr 29 15:24:07 2004: Solar Designer * Prevent potential buffer overflow in reading messages from the * kernel log rinbuffer. + * + * Tue Oct 26 20:32:44 GMT 2010 + * Corresponding corrections due to renaming syslog() and vsyslog() from + * syslog.c and moving into klogd.h */ @@ -258,7 +262,6 @@ #if !defined(__GLIBC__) #include #endif /* __GLIBC__ */ -#include #include #include #include @@ -637,7 +640,7 @@ } argl += 3; } - syslog(priority, fmt, argl); + syslog_own(priority, fmt, argl); va_end(ap); #ifdef TESTING putchar('\n'); @@ -646,7 +649,7 @@ } va_start(ap, fmt); - vsyslog(priority, fmt, ap); + vsyslog_own(priority, fmt, ap); va_end(ap); #ifdef TESTING printf ("\n"); @@ -1205,7 +1208,7 @@ } if (server_user && drop_root()) { - syslog(LOG_ALERT, "klogd: failed to drop root"); + syslog_own(LOG_ALERT, "klogd: failed to drop root"); Terminate(); } --- ./sysklogd-1.4.1_orig/klogd.h 1997-06-13 09:35:54.000000000 +0000 +++ ./sysklogd-1.4.1_orig/klogd.h 2010-10-26 20:39:40.000000000 +0000 @@ -24,12 +24,17 @@ * * Thu Nov 16 12:45:06 CST 1995: Dr. Wettstein * Initial version. + * + * Tue Oct 26 20:32:44 GMT 2010 + * Move here from klogd.c in order to declare vsyslog_own() + * here. */ /* Useful include files. */ #include #include #include +#include /* Function prototypes. */ @@ -38,3 +43,5 @@ extern char * ExpandKadds(char *, char *); extern void SetParanoiaLevel(int); extern void Syslog(int priority, char *fmt, ...); +extern void syslog_own(int, const char *, ...); +extern void vsyslog_own(int, const char *, va_list); --- ./sysklogd-1.4.1_orig/ksym.c 2010-10-25 12:23:46.000000000 +0000 +++ ./sysklogd-1.4.1_orig/ksym.c 2010-10-26 20:43:28.000000000 +0000 @@ -114,6 +114,9 @@ * Added boundary check for fscanf() in InitKsyms() and * CheckMapVersion() to prevent an unintended crash when reading * an incorrect System.map. + * + * Tue Oct 26 20:32:44 GMT 2010 + * Remove because it included from klogd.h. */ --- ./sysklogd-1.4.1_orig/ksym_mod.c 2010-10-25 12:24:08.000000000 +0000 +++ ./sysklogd-1.4.1_orig/ksym_mod.c 2010-10-26 20:42:04.000000000 +0000 @@ -83,6 +83,9 @@ * Removed references to since it doesn't work * anymore with its recent content from Linux 2.4/2.6, created * module.h locally instead. + * + * Tue Oct 26 20:32:44 GMT 2010 + * Remove because it included from klogd.h. */ @@ -95,7 +98,6 @@ #include #include #include "module.h" -#include #include #include --- ./sysklogd-1.4.1_orig/syslog.c 2010-10-25 12:23:46.000000000 +0000 +++ ./sysklogd-1.4.1_orig/syslog.c 2010-10-26 20:37:04.000000000 +0000 @@ -50,6 +50,10 @@ * Wed Aug 27 17:48:16 CEST 2003: Martin Schulze * Improved patch by Michael Pomraning to * reconnect klogd to the logger after it went away. + * + * Tue Oct 26 20:32:44 GMT 2010 + * Rename syslog() and vsyslog() to avoid conflicts with corresponding + * C library's functions. */ #include @@ -75,6 +79,10 @@ #define _PATH_LOGNAME "/dev/log" + +void syslog_own(int, const char *, ...); +void vsyslog_own(int, const char *, va_list); + static int LogFile = -1; /* fd for log */ static int connected; /* have done connect */ static int LogStat = 0; /* status bits, set by openlog() */ @@ -82,17 +90,17 @@ static int LogFacility = LOG_USER; /* default facility code */ void -syslog(int pri, const char *fmt, ...) +syslog_own(int pri, const char *fmt, ...) { va_list ap; va_start(ap, fmt); - vsyslog(pri, fmt, ap); + vsyslog_own(pri, fmt, ap); va_end(ap); } void -vsyslog(pri, fmt, ap) +vsyslog_own(pri, fmt, ap) int pri; const char *fmt; va_list ap;