Patch for adduser: Create a system user

Ralf Friedl Ralf.Friedl at online.de
Wed Oct 24 13:41:48 PDT 2007


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++;

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.

Regards
Ralf Friedl


More information about the busybox mailing list