From owner-freebsd-bugs Thu Nov 19 08:19:57 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id IAA15180 for freebsd-bugs-outgoing; Thu, 19 Nov 1998 08:19:57 -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 IAA15173 for ; Thu, 19 Nov 1998 08:19:56 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.8.8/8.8.5) id IAA25613; Thu, 19 Nov 1998 08:20:01 -0800 (PST) Received: from giganda.komkon.org (giganda.komkon.org [209.125.17.66]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id IAA14779 for ; Thu, 19 Nov 1998 08:16:34 -0800 (PST) (envelope-from str@giganda.komkon.org) Received: (from str@localhost) by giganda.komkon.org (8.8.5/8.7.3) id LAA24067; Thu, 19 Nov 1998 11:16:06 -0500 (EST) Message-Id: <199811191616.LAA24067@giganda.komkon.org> Date: Thu, 19 Nov 1998 11:16:06 -0500 (EST) From: Igor Roshchin Reply-To: str@giganda.komkon.org To: FreeBSD-gnats-submit@FreeBSD.ORG X-Send-Pr-Version: 3.2 Subject: bin/8762: syslogd.conf shell accept spaces in addition to TABs Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Number: 8762 >Category: bin >Synopsis: syslogd.conf shell accept spaces in addition to TABs >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Thu Nov 19 08:20:00 PST 1998 >Last-Modified: >Originator: Igor Roshchin >Organization: KomKon >Release: FreeBSD 2.2.7-RELEASE i386 >Environment: >Description: As discussed on freebsd-security and freebsd-current, having spaces accepted by syslogd in syslog.conf will simplify life of many admins. At the same time the backwards compatibility is preserved >How-To-Repeat: >Fix: --- syslogd.c.orig Thu Aug 6 00:58:10 1998 +++ syslogd.c Thu Oct 8 22:19:27 1998 @@ -1365,12 +1365,12 @@ } /* scan through the list of selectors */ - for (p = line; *p && *p != '\t';) { + for (p = line; *p && *p != '\t' && *p != ' ';) { int pri_done; int pri_cmp; /* find the end of this facility name list */ - for (q = p; *q && *q != '\t' && *q++ != '.'; ) + for (q = p; *q && *q != '\t' && *q != ' ' && *q++ != '.'; ) continue; /* get the priority comparison */ @@ -1402,12 +1402,12 @@ ; /* collect priority name */ - for (bp = buf; *q && !strchr("\t,;", *q); ) + for (bp = buf; *q && !strchr("\t,; ", *q); ) *bp++ = *q++; *bp = '\0'; /* skip cruft */ - while (strchr(", ;", *q)) + while (strchr(",;", *q)) q++; /* decode priority name */ @@ -1424,8 +1424,8 @@ } /* scan facilities */ - while (*p && !strchr("\t.;", *p)) { - for (bp = buf; *p && !strchr("\t,;.", *p); ) + while (*p && !strchr("\t.; ", *p)) { + for (bp = buf; *p && !strchr("\t,;. ", *p); ) *bp++ = *p++; *bp = '\0'; @@ -1454,7 +1454,7 @@ } /* skip to action part */ - while (*p == '\t') + while (*p == '\t' || *p == ' ') p++; switch (*p) --- syslog.conf.5.orig Thu Aug 6 00:58:10 1998 +++ syslog.conf.5 Wed Oct 14 20:17:40 1998 @@ -62,7 +62,19 @@ .Em selector field is separated from the .Em action -field by one or more tab characters. +field by one or more tab characters or spaces. +.Pp +Note that if you use spaces as separators, your +.Em syslog.conf +might be incompatible with other Unices or Unix-like systems. +This functionality was added for the ease of configuration +(e.g. it is possible to cut-and-paste into +.Em syslog.conf +), +and to avoid possible mistakes. This change however preserves +backwards compatibility with the old style of the +.Em syslog.conf +(i.e. tab characters only). .Pp The .Em Selectors >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message