aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2024-07-08 17:53:32 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2024-07-08 17:53:32 +0200
commiteba9b33b4595fbb5f2a64148b1ff3daeab9b3813 (patch)
tree2024024879f04b08e9475a02de20f48220356eb4
parent9f262698cc7e6a8b5621f018645f3c1fa06b226f (diff)
downloadbusybox-w32-eba9b33b4595fbb5f2a64148b1ff3daeab9b3813.tar.gz
busybox-w32-eba9b33b4595fbb5f2a64148b1ff3daeab9b3813.tar.bz2
busybox-w32-eba9b33b4595fbb5f2a64148b1ff3daeab9b3813.zip
chown: stop accepting deprecated USER.GROUP syntax, only : separator is allowed
function old new delta parse_chown_usergroup_or_die 115 94 -21 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r--libpwdgrp/uidgid_get.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/libpwdgrp/uidgid_get.c b/libpwdgrp/uidgid_get.c
index 283ac78fc..d76eb8298 100644
--- a/libpwdgrp/uidgid_get.c
+++ b/libpwdgrp/uidgid_get.c
@@ -93,11 +93,7 @@ void FAST_FUNC parse_chown_usergroup_or_die(struct bb_uidgid_t *u, char *user_gr
93 u->uid = u->gid = (gid_t)-1L; 93 u->uid = u->gid = (gid_t)-1L;
94 94
95 /* Check if there is a group name */ 95 /* Check if there is a group name */
96 group = strchr(user_group, '.'); /* deprecated? */ 96 group = strchr(user_group, ':');
97 if (!group)
98 group = strchr(user_group, ':');
99 else
100 *group = ':'; /* replace '.' with ':' */
101 97
102 /* Parse "user[:[group]]" */ 98 /* Parse "user[:[group]]" */
103 if (!group) { /* "user" */ 99 if (!group) { /* "user" */