Patch for adduser: Create a system user

Tito farmatito at tiscali.it
Wed Oct 24 20:45:37 UTC 2007


On Wednesday 24 October 2007 22:41:48 Ralf Friedl wrote:
> Tito wrote:
> > maybe this could fix the problem you report:
> > ...
> > 		/* create new gid always = uid and re-check if the uid is free */
> > 		while (getgrgid(p->pw_uid) && getpwuid(p->pw_uid))
> > 			p->pw_uid++;
> >   
> I think this shoud use "or", not "and":
> 
> 		while (getgrgid(p->pw_uid) || getpwuid(p->pw_uid))
> 			p->pw_uid++;

Ops....  :-(

> Personally, I don't use this feature, it was only an observation that it 
> might be possible to create duplicate ids if this feature is used.

Ok, then let's see what Denis thinks about it...
 
> Regards
> Ralf Friedl

Ciao,
Tito






More information about the busybox mailing list