[comp.bugs.4bsd] 4.3BSD-tahoe syslog routine ignores setlogmask calls

tas@mcnc.org (Tim Seaver) (04/15/89)

Subject: 4.3BSD-tahoe syslog routine ignores setlogmask calls
Index:	lib/libc/gen/syslog.c 4.3BSD-tahoe

Description:
	The 4.3BSD-tahoe setlogmask library routine has no effect due to
	a coding error in the syslog routine.

Repeat-By:
	Set the syslog log mask to something other than the default
	with a call to setlogmask. Log something at a disabled priority
	with syslog. Note that the message is logged.
	
Fix:
	*** /usr/src/lib/libc/gen/syslog.c	Fri Apr 14 15:16:40 1989
	--- /tahoe/usr/src/lib/libc/gen/syslog.c	Mon Jun 27 20:34:24 1988
	***************
	*** 76,82 ****
	  
	  	/* see if we should just throw out this message */
	  	if ((unsigned) LOG_FAC(pri) >= LOG_NFACILITIES ||
	! 	    (LOG_MASK(LOG_PRI(pri)) & LogMask) == 0 ||
	  	    (pri &~ (LOG_PRIMASK|LOG_FACMASK)) != 0)
	  		return;
	  	if (LogFile < 0 || !connected)
	--- 76,82 ----
	  
	  	/* see if we should just throw out this message */
	  	if ((unsigned) LOG_FAC(pri) >= LOG_NFACILITIES ||
	! 	    LOG_MASK(LOG_PRI(pri)) == 0 ||
	  	    (pri &~ (LOG_PRIMASK|LOG_FACMASK)) != 0)
	  		return;
	  	if (LogFile < 0 || !connected)