[PATCH] chown user: w/o group

Tito farmatito at tiscali.it
Sat Sep 23 19:18:51 UTC 2006


On Saturday 23 September 2006 16:19, Luciano Miguel Ferreira Rocha wrote:
> On Fri, Sep 22, 2006 at 09:10:52PM +0100, Luciano Miguel Ferreira Rocha wrote:
> > Anyway, I don't mind where it ends. I'll make a version w/o that
> > function and send it.
> 
> Actually, the new version ended up being cleaner and shorter. The only
> think i'm unhappy is with the second parse of passwd if the first get of
> the new file's uid was with getpwnam. I now use the result of get_ug_id
> for a getpwuid.
> 
> But I now prefer this version over my first one.
> 
> Regards,
> Luciano Rocha
> 
Looks good,
maybe this error message could be shortened:

+                               bb_error_msg_and_die("unknown user name/uid: %s", *argv);
+                               bb_error_msg_and_die("unknown uid: %s", *argv);

Ciao,
Tito



More information about the busybox mailing list