소스 검색

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.