Date: Tue, 7 Oct 2008 00:30:05 GMT From: Royce Williams <royce@alaska.net> To: freebsd-bugs@FreeBSD.org Subject: Re: conf/100616: [patch] syslog.conf: lines after exclamation point ignored Message-ID: <200810070030.m970U5Jb001424@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR conf/100616; it has been noted by GNATS. From: Royce Williams <royce@alaska.net> To: David Malone <dwmalone@maths.tcd.ie> Cc: bug-followup@FreeBSD.org Subject: Re: conf/100616: [patch] syslog.conf: lines after exclamation point ignored Date: Mon, 06 Oct 2008 16:08:08 -0800 Hello, David - thanks for the informative response! Looking back at the commits, I see that you're familiar with syslogd.c. David Malone wrote, on 10/3/2008 12:18 PM: > I think this is a consequence of the program specification feature > of syslogd - have a look at the syslog.conf man page and search for > "program specification". Ah, I think that I get it. I do think that there's still a remaining bug, though; I talk about that near the end. > As a documented feature, it is probably not something that we can > change. The syslog.conf manpage says that respecting '#!' is to maintain compatibility with a previous version of syslog. Looking back at syslog.conf and syslogd.c, it looks like support for this was added in rev 1.3 back in December 1994, but I don't see anything that shows when the previous version of syslog was replaced. It may be difficult to gauge how many people are using this legacy functionality, but my instinct is that giving some warning and then dropping support for '#!' (while keeping support for '!' without the '#' in front of it) may be warranted. The syslog.conf comments mention cross-platform compatibility, and I don't know if any other OSes still use '#!', so that may be an issue. That being said, having the same single character be both a comment character and a functional one seems like a significant POLA violation to me. I'm not aware of any other instance of that. > However, we could add a warning to syslog.conf. Agreed. Perhaps just above the examples themselves, as in: --- syslog.conf 2005-03-12 03:31:16.000000000 -0900 +++ syslog.conf.new 2008-10-06 16:02:09.000000000 -0800 @@ -26,6 +26,10 @@ # news.crit /var/log/news/news.crit # news.err /var/log/news/news.err # news.notice /var/log/news/news.notice +# Commenting out program specifications will not work as expected. +# For backwards compatibility with the previous syslog, lines +# starting with '#!' have a purpose and are NOT commented out. +# See 'program specification' in the syslog.conf(5) manpage. !startslip *.* /var/log/slip.log !ppp ... or something less chatty. Is sending this to you sufficient, or should I add it to the PR? Now about the possible bug. Even if commenting out the !startslip doesn't really comment it out, but instead triggers this legacy support, why would all subsequent unrelated configuration lines get ignored? From my testing, any lines added after the example '!' lines are ignored entirely. Surely that's not part of the functionality? Or am I missing something? Are you able to recreate the symptom that I'm seeing, as described in the PR? Royce -- Royce D. Williams - http://royce.ws/ Adding manpower to a late software project makes it later. - Brooks
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200810070030.m970U5Jb001424>