From owner-freebsd-bugs Sun Dec 27 22:30:12 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id WAA28369 for freebsd-bugs-outgoing; Sun, 27 Dec 1998 22:30:12 -0800 (PST) (envelope-from owner-freebsd-bugs@FreeBSD.ORG) Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id WAA28361 for ; Sun, 27 Dec 1998 22:30:10 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.8.8/8.8.5) id WAA13635; Sun, 27 Dec 1998 22:30:01 -0800 (PST) Date: Sun, 27 Dec 1998 22:30:01 -0800 (PST) Message-Id: <199812280630.WAA13635@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.ORG From: skynyrd@opus.cts.cwu.edu Subject: Re: bin/8447: syslogd doesn't implement documented feature (!* for all programs) Reply-To: skynyrd@opus.cts.cwu.edu Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org The following reply was made to PR bin/8447; it has been noted by GNATS. From: skynyrd@opus.cts.cwu.edu To: FreeBSD-gnats-submit@FreeBSD.org Cc: Subject: Re: bin/8447: syslogd doesn't implement documented feature (!* for all programs) Date: Sun, 27 Dec 1998 22:25:55 -0800 (PST) There is a discrepency between the documenation (syslog.conf(5)) and the code in syslogd.c. From the man page: 69 An asterisk (``*'') can be used to specify all facilities all levels or 70 all programs. Where would you specify a program name in a syslog.conf file? In a tag line, which is described in the man page to be either of: #!prog !prog So it would follow that an all-programs tag line would look like this: !* However, per the code in syslogd.c, the all-programs tag line must be: ! since the "*" is only copied into prog when the first non-whitespace character following the '!' is the terminating '\0' (1273) 1270 if(*p=='!') { 1271 p++; 1272 while(isspace(*p)) p++; 1273 if(!*p) { 1274 strcpy(prog, "*"); 1275 continue; 1276 } 1277 for(i = 0; i < NAME_MAX; i++) { 1278 if(!isalnum(p[i])) 1279 break; 1280 prog[i] = p[i]; 1281 } 1282 prog[i] = 0; 1283 continue; 1284 } The question is, should we fix the code to match the documentation, or fix the code to match the documenation while still allowing the single-! all-program tag line. Rather than risk breaking historical mystical BSD syslog.conf semantics I think it would be reasonable to simply change the expression on line 1273 to "if ( (!*p) || (*p == '*') )". To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message