Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 8 Mar 1996 08:41:21 +0100 (MET)
From:      guido@gvr.win.tue.nl (Guido van Rooij)
To:        ache@astral.msk.su (=?KOI8-R?Q?=E1=CE=C4=D2=C5=CA_=FE=C5=D2=CE=CF=D7?=)
Cc:        julian@ref.tfs.com, rashid@rk.ios.com, hackers@FreeBSD.org
Subject:   Re: pwd_mkdb - really slow :(
Message-ID:  <199603080741.IAA24948@gvr.win.tue.nl>
In-Reply-To: <199603051212.PAA01715@ache.dialup.ru> from "=?KOI8-R?Q?=E1=CE=C4=D2=C5=CA_=FE=C5=D2=CE=CF=D7?=" at Mar 5, 96 03:12:27 pm

next in thread | previous in thread | raw e-mail | index | archive | help
> 
> Do you solve order problems with different login names per same uid?
> 

Yes. That is in fact quite easy to solve. But only because my patches
give the opportunity to add/change *one* user to the password file
via chpass/chsh/chfn, passwd and yppasswdd. These utilities do not
allow the uid to be changed. In those cases you can getpwuid() the
uid to change/add, do a getpwnam on the result and check if the
uid you get back equals the uid of the user to add/change. You then
know what to do.
It will be harder when you can also change the uid. That is because
you have to do two things
1) Make sure the old uid of the user to change is not still used
2) Test if the new uid of the user to change is not in use.
In both cases when the uid is in use, you have to find out which user
with that uid comes first in the password file.

This is not at all easy to solve. Testing in file that is passed
to pwd_mkdb for a uid change of the given user is the only solution.
That would take a lot of time though.

In my case, I demand that the uid did not change. And that is gurantueed
by the limited set of commands supporting it.

-Guido



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199603080741.IAA24948>