[PATCH] improve checks on usernames V3.

Harald Becker ralda at gmx.de
Wed Aug 3 21:06:14 UTC 2011


 Hallo Ralf!

> Tar never creates user when extracting. It should just treat whatever
> comes as a string and pass it to getpwnam, which should also not care
> and use something like strcmp. I would just call that tar program broken.

Call them broken, but still such implementations exist :-( ... I had
some trouble on an older HP system, where a tar created files owned by
user number -1, if the untared user name contained UTF-8 characters ...
files that even root couldn't access or delete!


>> ... just to throw that in. Beside this I like to use User Names with
>> German Umlauts (ÄÖÜäöü) as regular German names may contain those. And I
>> did this successfully on Linux/GNU systems for years ... but know about
>> incompatibility and try to handle properly.
>>   
> I wouldn't want busybox to to tell me what names I can use just to
> avoid potential problems with some obscure system that I don't connect
> to anyway.

As long as this is a configureable option (which it has been told to be)
I won't complain for that. I even think the option for portability check
shall be on by default ... but it would be fine if the check for non
ASCII characters can be disabled by a command line option (at least by
root). All other checks shall be done by default and always. IMHO ... if
an admin needs to create an obscure user it can always be done by
editing /etc/passwd by hand.

--
Harald


More information about the busybox mailing list