chown misinterprets "." as group separator
Denys Vlasenko
vda.linux at googlemail.com
Mon Jul 8 15:55:08 UTC 2024
Fixed now, please try current git.
On Thu, Jul 4, 2024 at 3:10 PM Matthew Slowe <foo at mafoo.org.uk> wrote:
>
> Afternoon,
>
> A few months ago I raised a bug against the "chown" applet https://bugs.busybox.net/show_bug.cgi?id=16039 as I was hitting a problem with users with a "." in their username.
>
> 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...
>
> Given that this notation appears to have been deprecated back in 2001, is now the time to remove this?
>
> There's a potential patch attached to the bug report.
>
> --
> Matthew
> _______________________________________________
> busybox mailing list
> busybox at busybox.net
> http://lists.busybox.net/mailman/listinfo/busybox
More information about the busybox
mailing list