summaryrefslogtreecommitdiff
path: root/bin/chmod/chmod.c
diff options
context:
space:
mode:
authorAdam Wolk <awolk@cvs.openbsd.org>2017-05-28 08:03:37 +0000
committerAdam Wolk <awolk@cvs.openbsd.org>2017-05-28 08:03:37 +0000
commit8f51275e3ede0363f674870313d1e3c20e3a963b (patch)
treeae4d437f6e43f977266d719ab79382c5b70a23f3 /bin/chmod/chmod.c
parent80b3699faee46385a13d0b188c8a0725663aeb08 (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@
Diffstat (limited to 'bin/chmod/chmod.c')
-rw-r--r--bin/chmod/chmod.c10
1 files changed, 6 insertions, 4 deletions
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