Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 6 Oct 1998 17:44:26 -0700 (PDT)
From:      Archie Cobbs <archie@whistle.com>
To:        Studded@dal.net (Studded)
Cc:        dan@dpcsys.com, freebsd-security@FreeBSD.ORG
Subject:   Re: The necessary steps for logging (the problem is fixed)
Message-ID:  <199810070044.RAA07611@bubba.whistle.com>
In-Reply-To: <361A5812.90244D76@dal.net> from Studded at "Oct 6, 98 10:49:06 am"

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199810070044.RAA07611>