فهرست منبع

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.