[prev in list] [next in list] [prev in thread] [next in thread]
List: busybox
Subject: "deprecated?" code causing chown to not support "." in username
From: "Matthew Slowe" <foo () mafoo ! org ! uk>
Date: 2024-04-10 15:44:57
Message-ID: 9c1630ca6da94d61897a61d7383eeeeb6efe2159 () mafoo ! org ! uk
[Download RAW message or body]
In uidgid_get.c there is a parse_chown_usergroup_or_die() function which continues to \
implement a very old BSD(?) notation of user.group as well as user:group -- the code \
assumes that the first "." is a separater.
I don't know what else calls it but, for the chown applet, the implementation \
precludes support of users with "."s in (such as "test.test") when invoked with \
"chown test.test file":
# chown test.test /tmp/test
chown: unknown user/group test:test
https://github.com/mirror/busybox/blame/master/libpwdgrp/uidgid_get.c#L96
There is no reference to this interpretation in the code comment of the usage string:
Usage: chown [-RhLHPcvf]... USER[:[GRP]] FILE...
The best (dirtiest?) workaround for this appears to be:
chown $(getent passwd test.test | cut -d: -f 3,4) /tmp/test
Given that this notation appears to have been deprecated back in 2001, is now the \
time to remove this?
--
Matthew
_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic