summaryrefslogtreecommitdiff
path: root/libc/misc
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2005-04-16 03:02:25 +0000
committerMike Frysinger <vapier@gentoo.org>2005-04-16 03:02:25 +0000
commitd1abf5ce4c95c2a38f9ac92ae6805a0344de9c7d (patch)
tree35921eac19bd7ecca50af7f7f97fdb28a6556654 /libc/misc
parent637cb2dd8b34fffb17b77169e49b792015022b5b (diff)
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
Diffstat (limited to 'libc/misc')
-rw-r--r--libc/misc/syslog/syslog.c4
1 files changed, 4 insertions, 0 deletions
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.