On Sat, May 27, 2017 at 11:01:29PM +0200, Adam Wolk wrote:
> On Sat, May 27, 2017 at 01:42:45PM -0600, Theo de Raadt wrote:
> > I agree with you.  Maybe change the comment
> > 
> >                 /* UID and GID are separated by a dot and UID exists. */
> > 
> > to say a bit more on the matter, to prevent a zealot from arriving 2-3
> > years from now and proposing removal. Just a few words to hint . support
> > will stay forever.
> > 
> > It seems the sentences in the man page could be changed a bit.  Rather
> > than speaking about Previous versions, it could say POSIX (rev?)
> > deprecated '.' and introduced ':' as the default seperator, however '.'
> > seperator support remains for widely required backwards compat.  The current
> > sentences speak a bit too strongly about '.' actually being gone.
> > 
> > 
> 
> Updated the man page and expanded the comment in code.
> 
> Attaching updated diffs, OK?
> 

- style(9) the chmod.c comment
- use .St syntax to mark the standard in the man page instead of manually
  hard coding the name

both issues pointed out by brynet@, thanks!

Index: Makefile
===================================================================
RCS file: /cvs/src/bin/chmod/Makefile,v
retrieving revision 1.8
diff -u -p -r1.8 Makefile
--- Makefile    11 Sep 2016 07:06:29 -0000      1.8
+++ Makefile    27 May 2017 21:37:48 -0000
@@ -1,7 +1,6 @@
 #      $OpenBSD: Makefile,v 1.8 2016/09/11 07:06:29 natano Exp $
 
 PROG=  chmod
-CFLAGS+=-DSUPPORT_DOT
 MAN=   chmod.1 chgrp.1 chown.8 chflags.1
 LINKS= ${BINDIR}/chmod ${BINDIR}/chgrp \
        ${BINDIR}/chmod /sbin/chown
Index: chmod.c
===================================================================
RCS file: /cvs/src/bin/chmod/chmod.c,v
retrieving revision 1.41
diff -u -p -r1.41 chmod.c
--- chmod.c     17 Feb 2017 10:14:12 -0000      1.41
+++ chmod.c     27 May 2017 21:37:48 -0000
@@ -197,14 +197,16 @@ done:
                        *cp++ = '\0';
                        gid = a_gid(cp);
                }
-#ifdef SUPPORT_DOT
-               /* UID and GID are separated by a dot and UID exists. */
+               /*
+                * UID and GID are separated by a dot and UID exists.
+                * required for backwards compatibility pre-dating POSIX.2
+                * likely to stay here forever
+                */
                else if ((cp = strchr(*argv, '.')) != NULL &&
                    (uid = a_uid(*argv, 1)) == (uid_t)-1) {
                        *cp++ = '\0';
                        gid = a_gid(cp);
                }
-#endif
                if (uid == (uid_t)-1)
                        uid = a_uid(*argv, 0);
        } else
Index: chown.8
===================================================================
RCS file: /cvs/src/bin/chmod/chown.8,v
retrieving revision 1.20
diff -u -p -r1.20 chown.8
--- chown.8     31 Dec 2015 23:38:16 -0000      1.20
+++ chown.8     27 May 2017 21:37:48 -0000
@@ -166,7 +166,12 @@ Previous versions of the
 utility used the dot
 .Pq Sq \&.
 character to distinguish the group name.
-This has been changed to be a colon
+This has been changed when the utility was first
+standardised in
+.St -p1003.2-92
+to be a colon
 .Pq Sq \&:
-character so that user and
-group names may contain the dot character.
+character so that user and group names may contain the dot
+character, however the dot separator still remains supported
+due to widely required backwards compatibility.
+
? netstart.diff
Index: netstart
===================================================================
RCS file: /cvs/src/etc/netstart,v
retrieving revision 1.183
diff -u -p -r1.183 netstart
--- netstart    7 May 2017 09:40:15 -0000       1.183
+++ netstart    27 May 2017 18:47:51 -0000
@@ -99,7 +99,7 @@ ifstart() {
        if [[ "${_stat[0]}${_stat[2]}${_stat[3]}" != *---00 ]]; then
                echo "WARNING: $_file is insecure, fixing permissions"
                chmod -LR o-rwx $_file
-               chown -LR root.wheel $_file
+               chown -LR root:wheel $_file
        fi
 
        # Check for ifconfig'able interface, except if -n option is specified.

Reply via email to