[uClibc-cvs] [uClibc 0000195]: syslog.c does not use the facility set with openlog

bugs at busybox.net bugs at busybox.net
Sat Apr 16 03:02:35 UTC 2005


The following issue has been CLOSED
======================================================================
<http://busybox.net/bugs/view.php?id=195> 
======================================================================
Reported By:                cbachman
Assigned To:                uClibc
======================================================================
Project:                    uClibc
Issue ID:                   195
Category:                   Standards Compliance
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     closed
Resolution:                 open
Fixed in Version:           
======================================================================
Date Submitted:             03-28-2005 11:46 PST
Last Modified:              04-15-2005 20:02 PDT
======================================================================
Summary:                    syslog.c does not use the facility set with openlog
Description: 
On Tue Apr 6 2004, there were several lines removed from syslog.c because:

  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.

While the above might fix the case listed, it breaks standard
functionality with 
the openlog call.  Here's what Solaris/NetBSD say about the openlog call:

     The facility argument  encodes  a  default  facility  to  be
     assigned to all messages that do not have an explicit facil-
     ity  already  encoded.   The  initial  default  facility  is
     LOG_USER.

  In short, the "bug" is expected behavior.  If a program wishes to log
as
kern then it should call openlog with the facility set to kern. In order
to
reset LogFacility to LOG_KERN instead of LOG_USER.  Yes, this is ugly,
but
it appears to be the standard.

  btw, for more discussion on this see: 

http://sources.redhat.com/ml/libc-alpha/2000-03/msg00060.html

  The current release of glibc follows this "standard" and contains the
lines
that were removed.


======================================================================

----------------------------------------------------------------------
 vapier - 04-15-05 20:02 
----------------------------------------------------------------------
added back into svn ... thanks for the references :)

Issue History
Date Modified  Username       Field                    Change              
======================================================================
03-28-05 11:46 cbachman       New Issue                                    
04-15-05 20:02 vapier         Status                   assigned => closed  
04-15-05 20:02 vapier         Note Added: 0000147                          
======================================================================




More information about the uClibc-cvs mailing list