Current-Users archive

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

Re: passwd processing broken in amd64 (time_t probably)



On Wed, Jan 14, 2009 at 01:36:38PM +0100, Julio M. Merino Vidal wrote:
> Hello,
> 
> I have installed a fresh build of NetBSD/amd64 and I cannot change the
> user information of the root user.  In fact, sysinst complained about
> not being able to set the shell, and the user does not even have a
> home directory set.  Running chfn shows that the expiry date for root
> is set to something random (Oct 14, 2021) and attempting to change any
> field results in:
> 
>     chfn: /etc/master.passwd: entry root inconsistent expire
>     chfn: /etc/master.passwd: unchanged
> 
> A simple test program that calls getpwent to show the uid and expiry
> values for all users shows that everyone has an expiry date of 0
> except root, which has a random number in it.  After running pwd_mkdb
> manually, all users end up with random values.
> 
> Adding a printf in the _pw_opendb function tells me that the databases
> have a version of 0, but due to the time_t changes I'd expect them to
> be a different version number explicitly set in them.  I suspect the
> problem comes from here, but I don't know and don't have more time to
> investigate it now.

Effectively, hardcoding a '*version = 1' in _pw_opendb before returning
makes getpwent work again.  So it looks like the version field is not
being stored in the database properly.

-- 
Julio M. Merino Vidal <jmmv%NetBSD.org@localhost>


Home | Main Index | Thread Index | Old Index