From owner-freebsd-audit Sun Aug 11 9:32: 5 2002 Delivered-To: freebsd-audit@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CB26637B400; Sun, 11 Aug 2002 09:32:01 -0700 (PDT) Received: from salmon.maths.tcd.ie (salmon.maths.tcd.ie [134.226.81.11]) by mx1.FreeBSD.org (Postfix) with SMTP id A802143E6E; Sun, 11 Aug 2002 09:32:00 -0700 (PDT) (envelope-from dwmalone@maths.tcd.ie) Received: from walton.maths.tcd.ie by salmon.maths.tcd.ie with SMTP id ; 11 Aug 2002 17:31:59 +0100 (BST) To: freebsd-gnats-submit@FreeBSD.org, sanewo@ba2.so-net.ne.jp Cc: freebsd-audit@FreeBSD.org Subject: Re: bin/28935: syslogd -u doesn't treat * as "all levels" X-Request-Do: Date: Sun, 11 Aug 2002 17:31:58 +0100 From: David Malone Message-ID: <200208111731.aa70079@salmon.maths.tcd.ie> Sender: owner-freebsd-audit@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG This is a possible patch for: http://www.freebsd.org/cgi/query-pr.cgi?pr=bin/28935 which points out that "*" means completly the wrong thing if you run syslogd -u. It would seem to make more sense to consider "*" as having an explicit set of comparison flags "<=>". This also patch adds a "!" comparison flag which should be compatable with the same flag in the Linux version of syslogd. I'm not sure I find the linux semtics that intuative, but there is little point in being incompatable. David. Index: syslog.conf.5 =================================================================== RCS file: /cvs/FreeBSD-CVS/src/usr.sbin/syslogd/syslog.conf.5,v retrieving revision 1.26 diff -u -r1.26 syslog.conf.5 --- syslog.conf.5 16 May 2002 02:28:39 -0000 1.26 +++ syslog.conf.5 11 Aug 2002 16:20:16 -0000 @@ -85,7 +85,7 @@ a period .Pq Dq \&. , an optional set of comparison flags -.Pq Bq <=> , +.Pq Bo ! Bc Bq <=> , and a .Em level , with no intervening white-space. @@ -123,6 +123,15 @@ level equal or greater than .Em level will be logged. +Comparison flags beginning with +.Do ! Dc +will have their logical sense inverted. +Thus +.Dq !=info +means all levels except info and +.Dq !notice +has the same meaning as +.Dq