Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 13 Jul 2001 17:41:59 +0900 (JST)
From:      Takanori Saneto <sanewo@ba2.so-net.ne.jp>
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   bin/28935: syslogd -u doesn't treat * as "all levels"
Message-ID:  <200107130841.f6D8fxk30069@ba2.so-net.ne.jp>

next in thread | raw e-mail | index | archive | help

>Number:         28935
>Category:       bin
>Synopsis:       syslogd -u doesn't treat * as "all levels"
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Jul 13 01:50:01 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     Takanori Saneto
>Release:        FreeBSD 4.3-STABLE i386
>Organization:
an individual
>Environment:
System: FreeBSD muse.sanewo 4.3-STABLE FreeBSD 4.3-STABLE #3: Fri Jul 6 01:38:21 JST 2001 sanewo@muse.sanewo:/export/usr.obj/usr/src/sys/MUSE i386

4.3-stable CVSup'ed as of today.
Same problem seems to exist in -current as well.

>Description:

When invoked with -u, syslogd logs nothing to all.log with following
syslog.conf entry:

*.*	/var/log/all.log

 In syslogd.c, '*' is converted to priority level LOG_PRIMASK+1.
 Without -u, default comparison is '>=' and LOG_PRIMASK+1 is larger
than any actual priority level, comparison always succeeds (as
intended).
 With -u, comparison is '==' and no actual priority level is equal to
LOG_PRIMASK+1, comparison always fails.

>How-To-Repeat:

Invoke syslogd with -u and see all.log doesn't grow.

>Fix:

A quick hack patch is as follows:

--- syslogd.c.orig	Fri Jul 13 17:30:46 2001
+++ syslogd.c	Fri Jul 13 17:31:55 2001
@@ -809,6 +809,7 @@
 		if (!(((f->f_pcmp[fac] & PRI_EQ) && (f->f_pmask[fac] == prilev))
 		     ||((f->f_pcmp[fac] & PRI_LT) && (f->f_pmask[fac] < prilev))
 		     ||((f->f_pcmp[fac] & PRI_GT) && (f->f_pmask[fac] > prilev))
+		     ||(f->f_pmask[fac] == LOG_PRIMASK+1)
 		     )
 		    || f->f_pmask[fac] == INTERNAL_NOPRI)
 			continue;

>Release-Note:
>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200107130841.f6D8fxk30069>