[libc-coord] syslog and LOG_KERN - Re: [PATCH] Bug 3604: fix calls to openlog() with LOG_KERN facility

Alan Coopersmith alan.coopersmith@oracle.com
Wed Mar 31 19:44:57 GMT 2021


On 3/31/21 12:27 PM, Adhemerval Zanella wrote:
> 
> 
> On 27/03/2021 17:07, Dan Raymond wrote:
>>  From 93683928886a563a4740e2b42b53752a4a7d431f Mon Sep 17 00:00:00 2001
>> From: Dan Raymond <draymond@foxvalley.net>
>> Date: Sat, 27 Mar 2021 13:51:16 -0600
>> Subject: [PATCH] Bug 3604: fix calls to openlog() with LOG_KERN facility
>>
> 
> Not allowing LOG_KERN by any user process seems to be de facto behavior
> on all systems I am aware of:
> 
>    * FreeBSD and MUSL explicit set to previous log facility (they check
>      if the priority against a mask and since on both LOG_KERN is 0 is
>      set to the previous/default value).
> 
>    * Solaris 11.4 man page explicit says:
> 
>         LOG_KERN      Messages generated by the kernel. These cannot be  gener-
>                       ated by any user processes.

The Solaris implementation is similar to FreeBSD & MUSL - LOG_KERN is 0,
so appears the same to syslog() as not specifying a facility and letting
the default value be used.

-- 
	-Alan Coopersmith-               alan.coopersmith@oracle.com
	 Oracle Solaris Engineering - https://blogs.oracle.com/alanc


More information about the Libc-alpha mailing list