diff options
author | Federico G. Schwindt <fgsch@cvs.openbsd.org> | 2001-02-07 06:15:47 +0000 |
---|---|---|
committer | Federico G. Schwindt <fgsch@cvs.openbsd.org> | 2001-02-07 06:15:47 +0000 |
commit | 8b83337803e1a4971975d28642c4eec409a0a31f (patch) | |
tree | 1dbdeed0cb263843eac7b52bcd5d8bdda8c67f00 /usr.sbin | |
parent | 93bf3bb3ff29d521fbf66d2a26601b8d2452a30b (diff) |
Remove support for #!. It's not intuitive and if you happen to add
lines as the end of a stock syslog.conf you're going to spend some time
figuring why is not working as it should; problem found by
riq@core-sdi.com, millert@ ok.
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/syslogd/syslog.conf.5 | 17 | ||||
-rw-r--r-- | usr.sbin/syslogd/syslogd.c | 13 |
2 files changed, 6 insertions, 24 deletions
diff --git a/usr.sbin/syslogd/syslog.conf.5 b/usr.sbin/syslogd/syslog.conf.5 index b54ebe07203..545f34de067 100644 --- a/usr.sbin/syslogd/syslog.conf.5 +++ b/usr.sbin/syslogd/syslog.conf.5 @@ -30,7 +30,7 @@ .\" SUCH DAMAGE. .\" .\" from: @(#)syslog.conf.5 8.1 (Berkeley) 6/9/93 -.\" $OpenBSD: syslog.conf.5,v 1.7 2000/03/19 17:57:16 aaron Exp $ +.\" $OpenBSD: syslog.conf.5,v 1.8 2001/02/07 06:15:46 fgsch Exp $ .\" $NetBSD: syslog.conf.5,v 1.4 1996/01/02 17:41:46 perry Exp $ .\" .Dd June 9, 1993 @@ -107,11 +107,7 @@ library routine. .Pp Each block of lines is separated from the previous block by a tag. The tag is a line beginning with -.Em #!prog -or .Em !prog -(the former is for compatibility with the previous syslogd, if one is sharing -syslog.conf files, for example) and each block will be associated with calls to syslog from that specific program. .Pp @@ -215,16 +211,7 @@ Selected messages are written to all logged-in users. .Pp Blank lines and lines whose first non-blank character is a hash .Pq Ql # -character are ignored with the exception of lines beginning with -.Ql #! . -These lines are treated as section headers in the same way as lines -beginning with -.Ql ! . -This allows -.Nm -files to be shared with systems that don't recognise the -.Ql ! -syntax. +character are ignored. .Sh EXAMPLES A configuration file might appear as follows: .Bd -literal diff --git a/usr.sbin/syslogd/syslogd.c b/usr.sbin/syslogd/syslogd.c index 35d698c3752..d33ab82924d 100644 --- a/usr.sbin/syslogd/syslogd.c +++ b/usr.sbin/syslogd/syslogd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: syslogd.c,v 1.39 2001/01/19 17:53:19 deraadt Exp $ */ +/* $OpenBSD: syslogd.c,v 1.40 2001/02/07 06:15:46 fgsch Exp $ */ /* * Copyright (c) 1983, 1988, 1993, 1994 @@ -43,7 +43,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)syslogd.c 8.3 (Berkeley) 4/4/94"; #else -static char rcsid[] = "$OpenBSD: syslogd.c,v 1.39 2001/01/19 17:53:19 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: syslogd.c,v 1.40 2001/02/07 06:15:46 fgsch Exp $"; #endif #endif /* not lint */ @@ -1012,18 +1012,13 @@ init(signo) while (fgets(cline, sizeof(cline), cf) != NULL) { /* * check for end-of-section, comments, strip off trailing - * spaces and newline character. #!prog and !prog are treated + * spaces and newline character. !prog is treated * specially: the following lines apply only to that program. */ for (p = cline; isspace(*p); ++p) continue; - if (*p == '\0') + if (*p == '\0' || *p == '#') continue; - if (*p == '#') { - p++; - if (*p != '!') - continue; - } if (*p == '!') { p++; while (isspace(*p)) |