[Bug 16039] New: chown misinterprets "." as group separator
bugzilla at busybox.net
bugzilla at busybox.net
Wed Apr 17 15:57:16 UTC 2024
https://bugs.busybox.net/show_bug.cgi?id=16039
Bug ID: 16039
Summary: chown misinterprets "." as group separator
Product: Busybox
Version: 1.36.x
Hardware: All
OS: Linux
Status: NEW
Severity: normal
Priority: P5
Component: Other
Assignee: unassigned at busybox.net
Reporter: foo at mafoo.org.uk
CC: busybox-cvs at busybox.net
Target Milestone: ---
Created attachment 9736
--> https://bugs.busybox.net/attachment.cgi?id=9736&action=edit
possible fix
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?
Possible patch to fix attached
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the busybox-cvs
mailing list