From d1abf5ce4c95c2a38f9ac92ae6805a0344de9c7d Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Sat, 16 Apr 2005 03:02:25 +0000 Subject: cbachman writes Bug 195: Add back in the code which sets the default facility if none specified. This may cause issues with klogd when it tries to use the libc's syslog(), but klogd comes with its own syslog() implementation so that's a none issue. For more info, please see the following: http://sources.redhat.com/ml/libc-alpha/2000-03/msg00059.html --- libc/misc/syslog/syslog.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'libc') diff --git a/libc/misc/syslog/syslog.c b/libc/misc/syslog/syslog.c index e39e63a05..2b478e13d 100644 --- a/libc/misc/syslog/syslog.c +++ b/libc/misc/syslog/syslog.c @@ -173,6 +173,10 @@ vsyslog( int pri, const char *fmt, va_list ap ) if (LogFile < 0 || !connected) openlog(LogTag, LogStat | LOG_NDELAY, 0); + /* Set default facility if none specified. */ + if ((pri & LOG_FACMASK) == 0) + pri |= LogFacility; + /* Build the message. We know the starting part of the message can take * no longer than 64 characters plus length of the LogTag. So it's * safe to test only LogTag and use normal sprintf everywhere else. -- cgit v1.2.3