From owner-freebsd-hackers Tue Jul 27 8:16:53 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from axl.noc.iafrica.com (axl.noc.iafrica.com [196.31.1.175]) by hub.freebsd.org (Postfix) with ESMTP id 5EA6F153D2; Tue, 27 Jul 1999 08:12:57 -0700 (PDT) (envelope-from sheldonh@axl.noc.iafrica.com) Received: from sheldonh (helo=axl.noc.iafrica.com) by axl.noc.iafrica.com with local-esmtp (Exim 3.02 #1) id 1198tR-00058e-00; Tue, 27 Jul 1999 17:11:49 +0200 From: Sheldon Hearn Cc: Tim Vanderhoek , obrien@freebsd.org, hackers@freebsd.org Subject: Re: newsyslog owner.group -> owner:group In-reply-to: Your message of "Tue, 27 Jul 1999 13:43:33 +0200." <4792.933075813@axl.noc.iafrica.com> Date: Tue, 27 Jul 1999 17:11:49 +0200 Message-ID: <19755.933088309@axl.noc.iafrica.com> Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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 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