Date: Sun, 27 Dec 1998 22:30:01 -0800 (PST) From: skynyrd@opus.cts.cwu.edu To: freebsd-bugs@FreeBSD.ORG Subject: Re: bin/8447: syslogd doesn't implement documented feature (!* for all programs) Message-ID: <199812280630.WAA13635@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199812280630.WAA13635>