Port-amiga archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: new NetBSD user dummy questions - change root password problem



Supernobby wrote:
But ok. If I look at the source of pw_getpwconf() I conclude, that the function has a problem if the "key" for pw_getconf() can not be found in the /etc/passwd.conf file. pw_getpwconf() will not return the config for "default" as the last resort.
Hmm, I see only one important change in this function, between NetBSD 3 and 4. Call to getgrgid was changed into getgrgid_r in 2005, and this stuff went into NetBSD 4.

http://cvsweb.netbsd.org/bsdweb.cgi/src/lib/libutil/passwd.c.diff?r1=1.41&r2=1.42&f=h

getgrgid_r is a reentrant version of getgrgid, which was used before.
Yes, somehow this is a bug. But I can not imagine, that this should be a general bug. It is so obvious and easy to observe and should be known already, if it would be so general.
This bug may or may not be platform-depended, but on most platforms /etc/passwd.conf is populated by sysinst, so this bug is not _that_ easy to observe.
If you run NetBSD/amiga, can you reproduce this on your machine with NetBSD 4.0.1 on 68060 CPU and an empty passwd.conf file
I have 3.0.1 installed on my A1200 with 68030, and can't reproduce this behaviour (with empty root password and empty /etc/passwd.conf). Also tried this on amd64 running 4.0 - no problem there.

Can anyone else running NetBSD 4 on Amiga comment on this problem?

Regards
Radek

BTW. I stumbled upon interesting fact. If you'll look at CVS log for src/lib/libutil/passwd.c, you'll see that similar problem was fixed in 2005 (rev. 1.39).



Home | Main Index | Thread Index | Old Index