*BSD News Article 9358


Return to BSD News archive

Received: by minnie.vk1xwt.ampr.org with NNTP
	id AA5631 ; Fri, 01 Jan 93 01:51:21 EST
Path: sserve!manuel.anu.edu.au!munnari.oz.au!ariel.ucs.unimelb.EDU.AU!werple.apana.org.au!news
From: andrew@werple.apana.org.au (Andrew Herbert)
Newsgroups: comp.unix.bsd
Subject: syslog() library function bug - FIX
Date: 28 Dec 1992 23:43:58 +1100
Organization: werple public-access unix, Melbourne
Lines: 27
Message-ID: <1hmsqeINN1kg@werple.apana.org.au>
NNTP-Posting-Host: werple.apana.org.au

The syslog library function in 386BSD has a bug that prevents logging to the
authpriv and cron facilities by /usr/bin/login and crond (if you've enabled
this) respectively.  No doubt other combinations of facility and priority were
also affected.

enjoy,
Andrew

*** /usr/src/lib/libc/gen/syslog.c.unhacked	Thu Jun 27 11:53:08 1991
--- /usr/src/lib/libc/gen/syslog.c	Mon Dec 28 23:37:36 1992
***************
*** 99,105 ****
  
  	/* check for invalid bits or no priority set */
  	if (!LOG_PRI(pri) || (pri &~ (LOG_PRIMASK|LOG_FACMASK)) ||
! 	    !(LOG_MASK(pri) & LogMask))
  		return;
  
  	saved_errno = errno;
--- 99,105 ----
  
  	/* check for invalid bits or no priority set */
  	if (!LOG_PRI(pri) || (pri &~ (LOG_PRIMASK|LOG_FACMASK)) ||
! 	    !(LOG_MASK(LOG_PRI(pri)) & LogMask))
  		return;
  
  	saved_errno = errno;