Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 27 Jul 1999 17:11:49 +0200
From:      Sheldon Hearn <sheldonh@uunet.co.za>
Cc:        Tim Vanderhoek <vanderh@ecf.utoronto.ca>, obrien@freebsd.org, hackers@freebsd.org
Subject:   Re: newsyslog owner.group -> owner:group 
Message-ID:  <19755.933088309@axl.noc.iafrica.com>
In-Reply-To: Your message of "Tue, 27 Jul 1999 13:43:33 %2B0200." <4792.933075813@axl.noc.iafrica.com> 

next in thread | previous in thread | raw e-mail | index | archive | help


On Tue, 27 Jul 1999 13:43:33 +0200, Sheldon Hearn wrote:

> Sorry for bringing this up without doing all my homework. Diffs in the
> pipeline. :-)

Ha!

Diffs that produce a win in the midst of an apparent lose-lose. We now
continue to support the dot as a separator without breaking user- and
groupnames which include dots. I took my lead from chown(8).

Ciao,
Sheldon.

Index: Makefile
===================================================================
RCS file: /home/ncvs/src/usr.sbin/newsyslog/Makefile,v
retrieving revision 1.6
diff -u -d -r1.6 Makefile
--- Makefile	1999/01/22 19:38:39	1.6
+++ Makefile	1999/07/27 15:04:37
@@ -1,7 +1,7 @@
 #	$Id: Makefile,v 1.6 1999/01/22 19:38:39 wollman Exp $
 
 PROG=	newsyslog
-
+CFLAGS+=-DSUPPORT_DOT
 MAN8=	newsyslog.8
 
 .include <bsd.prog.mk>
Index: newsyslog.8
===================================================================
RCS file: /home/ncvs/src/usr.sbin/newsyslog/newsyslog.8,v
retrieving revision 1.19
diff -u -d -r1.19 newsyslog.8
--- newsyslog.8	1999/06/28 03:15:01	1.19
+++ newsyslog.8	1999/07/27 14:18:12
@@ -275,12 +275,12 @@
 .Pp
 Copyright 1987, Massachusetts Institute of Technology
 .Sh COMPATIBILITY
-Previous versions of the chown utility used the dot (``.'') character to
-distinguish the group name.  
-Begining with 
-.Fx 4.0 ,
-this has been changed to be a colon (``:'') character so that user and group
-names may contain the dot character.
+Previous versions of the
+.Nm
+utility used the dot (``.'') character to distinguish the group name.  
+This has been changed to the colon (``:'') character so that user and group
+names may contain the dot character. Future versions may not provide
+backward compatibility.
 .Sh "SEE ALSO"
 .Xr gzip 1 ,
 .Xr syslog 3 ,
Index: newsyslog.c
===================================================================
RCS file: /home/ncvs/src/usr.sbin/newsyslog/newsyslog.c,v
retrieving revision 1.23
diff -u -d -r1.23 newsyslog.c
--- newsyslog.c	1999/06/28 03:15:02	1.23
+++ newsyslog.c	1999/07/27 15:06:24
@@ -286,7 +286,13 @@
 		if (!*parse)
                   errx(1, "malformed line (missing fields):\n%s", errline);
                 *parse = '\0';
+#ifdef SUPPORT_DOT
+                /* Older configurations used '.' between user and group */
+                if ((group = strchr(q, ':')) != NULL ||
+                    (group = strchr(q, '.')) != NULL) {
+#else
                 if ((group = strchr(q, ':')) != NULL) {
+#endif
                     *group++ = '\0';
                     if (*q) {
                         if (!(isnumber(*q))) {


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




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