diff options
author | Adam Wolk <awolk@cvs.openbsd.org> | 2017-05-28 08:03:37 +0000 |
---|---|---|
committer | Adam Wolk <awolk@cvs.openbsd.org> | 2017-05-28 08:03:37 +0000 |
commit | 8f51275e3ede0363f674870313d1e3c20e3a963b (patch) | |
tree | ae4d437f6e43f977266d719ab79382c5b70a23f3 | |
parent | 80b3699faee46385a13d0b188c8a0725663aeb08 (diff) |
chown: Remove SUPPORT_DOT ifdef - it's on by default for 22 years
The old syntax was deprecated 25 years ago when the utility was
first standardised in IEEE Std 1003.2-1992 ("POSIX.2"). There was
no POSIX version of chown with the dot separator.
Let's stop pretending that it will ever go away.
OK jung@, deraadt@, jmc@
-rw-r--r-- | bin/chmod/Makefile | 3 | ||||
-rw-r--r-- | bin/chmod/chmod.c | 10 | ||||
-rw-r--r-- | bin/chmod/chown.8 | 13 |
3 files changed, 15 insertions, 11 deletions
diff --git a/bin/chmod/Makefile b/bin/chmod/Makefile index 27d54920d81..82854bae3a3 100644 --- a/bin/chmod/Makefile +++ b/bin/chmod/Makefile @@ -1,7 +1,6 @@ -# $OpenBSD: Makefile,v 1.8 2016/09/11 07:06:29 natano Exp $ +# $OpenBSD: Makefile,v 1.9 2017/05/28 08:03:36 awolk Exp $ PROG= chmod -CFLAGS+=-DSUPPORT_DOT MAN= chmod.1 chgrp.1 chown.8 chflags.1 LINKS= ${BINDIR}/chmod ${BINDIR}/chgrp \ ${BINDIR}/chmod /sbin/chown diff --git a/bin/chmod/chmod.c b/bin/chmod/chmod.c index 9e5cd1b0711..62ad272f262 100644 --- a/bin/chmod/chmod.c +++ b/bin/chmod/chmod.c @@ -1,4 +1,4 @@ -/* $OpenBSD: chmod.c,v 1.41 2017/02/17 10:14:12 tb Exp $ */ +/* $OpenBSD: chmod.c,v 1.42 2017/05/28 08:03:36 awolk Exp $ */ /* $NetBSD: chmod.c,v 1.12 1995/03/21 09:02:09 cgd Exp $ */ /* @@ -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 diff --git a/bin/chmod/chown.8 b/bin/chmod/chown.8 index f4339778698..d7ff3056c47 100644 --- a/bin/chmod/chown.8 +++ b/bin/chmod/chown.8 @@ -1,4 +1,4 @@ -.\" $OpenBSD: chown.8,v 1.20 2015/12/31 23:38:16 guenther Exp $ +.\" $OpenBSD: chown.8,v 1.21 2017/05/28 08:03:36 awolk Exp $ .\" .\" Copyright (c) 1990, 1991, 1993, 1994 .\" The Regents of the University of California. All rights reserved. @@ -29,7 +29,7 @@ .\" .\" from: @(#)chown.8 8.3 (Berkeley) 3/31/94 .\" -.Dd $Mdocdate: December 31 2015 $ +.Dd $Mdocdate: May 28 2017 $ .Dt CHOWN 8 .Os .Sh NAME @@ -166,7 +166,10 @@ 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 was 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 to allow user and group names to contain the dot +character, though the dot separator still remains supported +due to widely required backwards compatibility. |