2010-01-19 11:40:12 +01:00
|
|
|
--- fortify.h
|
|
|
|
+++ fortify.h 2008-05-30 10:18:14.874490898 +0000
|
2008-05-31 12:14:01 +02:00
|
|
|
@@ -0,0 +1,17 @@
|
|
|
|
+#if defined(__USE_FORTIFY_LEVEL)
|
|
|
|
+# undef syslog
|
|
|
|
+# undef vsyslog
|
|
|
|
+# undef openlog
|
|
|
|
+# undef closelog
|
|
|
|
+# undef setlogmask
|
|
|
|
+extern void priv_syslog(int, const char *, ...);
|
|
|
|
+extern void priv_vsyslog(int, const char *, va_list);
|
|
|
|
+extern void priv_openlog(const char *, int, int);
|
|
|
|
+extern void priv_closelog(void);
|
|
|
|
+extern int priv_setlogmask(int);
|
|
|
|
+# define syslog priv_syslog
|
|
|
|
+# define vsyslog priv_vsyslog
|
|
|
|
+# define openlog priv_openlog
|
|
|
|
+# define closelog priv_closelog
|
|
|
|
+# define setlogmask priv_setlogmask
|
|
|
|
+#endif
|
2010-01-19 11:40:12 +01:00
|
|
|
--- klogd.c
|
|
|
|
+++ klogd.c 2008-05-30 10:19:59.501151202 +0000
|
2008-05-31 12:14:01 +02:00
|
|
|
@@ -286,6 +286,8 @@ static char *PidFile = "/etc/klogd.pid";
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
+#include "fortify.h"
|
|
|
|
+
|
|
|
|
static int kmsg,
|
|
|
|
change_state = 0,
|
|
|
|
terminate = 0,
|
2010-01-19 11:40:12 +01:00
|
|
|
--- syslog.c
|
|
|
|
+++ syslog.c 2008-05-30 10:20:24.799728870 +0000
|
2008-05-31 12:14:01 +02:00
|
|
|
@@ -72,6 +72,8 @@ static char sccsid[] = "@(#)syslog.c 5.2
|
|
|
|
|
|
|
|
#define _PATH_LOGNAME "/dev/log"
|
|
|
|
|
|
|
|
+#include "fortify.h"
|
|
|
|
+
|
|
|
|
static int LogFile = -1; /* fd for log */
|
|
|
|
static int connected; /* have done connect */
|
|
|
|
static int LogStat = 0; /* status bits, set by openlog() */
|