瀏覽代碼

Fix a bug noticed by Oleg I. Vdovikin, oleg at cs dot msu dot su.
This code in uClibc would attempt to set the default facility if
none was specified. Except none being specified is 0, which is
also LOG_KERN, therefore klogd could never get kernel messages
logged as LOG_KERN.

Eric Andersen 21 年之前
父節點
當前提交
7cea35ec0b
共有 1 個文件被更改,包括 0 次插入4 次删除
  1. 0 4
      libc/misc/syslog/syslog.c

+ 0 - 4
libc/misc/syslog/syslog.c

@@ -173,10 +173,6 @@ 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.