From owner-freebsd-bugs Wed Oct 7 17:20:10 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id RAA01959 for freebsd-bugs-outgoing; Wed, 7 Oct 1998 17:20:10 -0700 (PDT) (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 RAA01878 for ; Wed, 7 Oct 1998 17:20:03 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.8.8/8.8.5) id RAA19188; Wed, 7 Oct 1998 17:20:01 -0700 (PDT) Received: from whistle.com (s205m131.whistle.com [207.76.205.131]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id RAA00682 for ; Wed, 7 Oct 1998 17:14:33 -0700 (PDT) (envelope-from archie@whistle.com) Received: (from smap@localhost) by whistle.com (8.7.5/8.6.12) id RAA06015 for ; Wed, 7 Oct 1998 17:14:25 -0700 (PDT) Received: from bubba.whistle.com(207.76.205.7) by whistle.com via smap (V1.3) id sma006011; Wed Oct 7 17:14:22 1998 Received: (from archie@localhost) by bubba.whistle.com (8.8.7/8.6.12) id RAA23434; Wed, 7 Oct 1998 17:14:22 -0700 (PDT) Message-Id: <199810080014.RAA23434@bubba.whistle.com> Date: Wed, 7 Oct 1998 17:14:22 -0700 (PDT) From: Archie Cobbs Reply-To: archie@whistle.com To: FreeBSD-gnats-submit@FreeBSD.ORG X-Send-Pr-Version: 3.2 Subject: bin/8196: patch to make syslog.conf tolerate space as field delimiter Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Number: 8196 >Category: bin >Synopsis: patch to make syslog.conf tolerate space as field delimiter >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Wed Oct 7 17:20:00 PDT 1998 >Last-Modified: >Originator: Archie Cobbs >Organization: Whistle Communications, Inc. >Release: FreeBSD 2.2.6-RELEASE i386 >Environment: FreeBSD 2.2.7 and -current >Description: syslog.conf requires a TAB separating the LHS and RHS. There's no reason a SPACE should not also work, except in the unlikely scenario of existing syslog.conf's that have spaces within the LHS. >How-To-Repeat: >Fix: >From owner-freebsd-security@FreeBSD.ORG Tue Oct 6 20:04:38 1998 Received: from whistle.com (whistle.com [207.76.205.131]) by bubba.whistle.com (8.8.7/8.6.12) with ESMTP id UAA10160 for ; Tue, 6 Oct 1998 20:04:38 -0700 (PDT) Received: (from smap@localhost) by whistle.com (8.7.5/8.6.12) id UAA23359; Tue, 6 Oct 1998 20:04:38 -0700 (PDT) Received: from gatekeeper.whistle.com(207.76.204.2) by whistle.com via smap (V1.3) id sma023357; Tue Oct 6 20:04:29 1998 Received: (from smap@localhost) by gatekeeper.whistle.com (8.7.5/8.6.12) id UAA28570; Tue, 6 Oct 1998 20:04:29 -0700 (PDT) Received: from sarip.sol.net( 169.207.30.120) by gatekeeper via smap (V2.0) id xma028565; Tue, 6 Oct 98 20:04:14 -0700 Received: from hub.freebsd.org (hub.FreeBSD.ORG [204.216.27.18]) by sarip.sol.net (8.8.8/8.8.8/SNNS-1.02) with ESMTP id WAA16438; Tue, 6 Oct 1998 22:03:42 -0500 (CDT) Received: from localhost (daemon@localhost) by hub.freebsd.org (8.8.8/8.8.8) with SMTP id RAA14896; Tue, 6 Oct 1998 17:53:04 -0700 (PDT) (envelope-from owner-freebsd-security) Received: by hub.freebsd.org (bulk_mailer v1.6); Tue, 6 Oct 1998 17:45:43 -0700 Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id RAA13031 for freebsd-security-outgoing; Tue, 6 Oct 1998 17:45:21 -0700 (PDT) (envelope-from owner-freebsd-security@FreeBSD.ORG) Received: from whistle.com (s205m131.whistle.com [207.76.205.131]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id RAA12961 for ; Tue, 6 Oct 1998 17:44:53 -0700 (PDT) (envelope-from archie@whistle.com) Received: (from smap@localhost) by whistle.com (8.7.5/8.6.12) id RAA21578; Tue, 6 Oct 1998 17:44:49 -0700 (PDT) Received: from bubba.whistle.com(207.76.205.7) by whistle.com via smap (V1.3) id sma021576; Tue Oct 6 17:44:26 1998 Received: (from archie@localhost) by bubba.whistle.com (8.8.7/8.6.12) id RAA07611; Tue, 6 Oct 1998 17:44:26 -0700 (PDT) From: Archie Cobbs Message-Id: <199810070044.RAA07611@bubba.whistle.com> Subject: Re: The necessary steps for logging (the problem is fixed) In-Reply-To: <361A5812.90244D76@dal.net> from Studded at "Oct 6, 98 10:49:06 am" To: Studded@dal.net (Studded) Date: Tue, 6 Oct 1998 17:44:26 -0700 (PDT) Cc: dan@dpcsys.com, freebsd-security@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL38 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-security@FreeBSD.ORG X-Loop: FreeBSD.org Status: RO Studded writes: > > Unless someone can demonstrate a valid use of spaces on the LHS > > crontab style checking would work though. (spaces are only legal > > in the last field of crontab as well) > > Works for me. :) Here's a patch that makes space a separator between LHS and RHS just like tab is.. -Archie ___________________________________________________________________________ Archie Cobbs * Whistle Communications, Inc. * http://www.whistle.com Index: syslogd.c =================================================================== RCS file: /cvs/freebsd/src/usr.sbin/syslogd/syslogd.c,v retrieving revision 1.41 diff -u -u -r1.41 syslogd.c --- syslogd.c 1998/08/25 21:16:47 1.41 +++ syslogd.c 1998/10/07 00:44:08 @@ -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,7 +1402,7 @@ ; /* collect priority name */ - for (bp = buf; *q && !strchr("\t,;", *q); ) + for (bp = buf; *q && !strchr(" \t,;", *q); ) *bp++ = *q++; *bp = '\0'; @@ -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) To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-security" in the body of the message >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message