getent passwd timeouts on samba 3.5.1
Jeremy Allison
jra at samba.org
Thu Aug 19 16:52:22 MDT 2010
On Wed, Aug 18, 2010 at 10:24:02PM -0700, Nagaraj Shyam wrote:
>
> Did the "enumerate" approach have to do with starting with a flat
> newline delimited passwd file J, old ideas die hard.
Indeed. Google has an interesting fix for this. I'll
check if it's been published.
> It is either a sequential search or enumerate for this case.
> There is no need to enumerate all users, however if a new user that the
> server has never seen before comes in we should be able to getpwent()
> for the particular user
getpwent() is an enumeration function. In order to get the specific
entry for a particular user, you need getpwnam(), not getpwent().
> and this does not work reliably all the time
> either when idmap backend is ldap and we cold start from nothing in the
> ldap idmap db, i.e. winbind has to generate the mapping and stick it
> into ldap.
I still don't see why you need to do an enumeration for a new
user. A getpwnam() call on the specific name is all you need
to verify if a new user exists.
What specific application is making the getpwent() call ? Why is it
doing this ?
Jeremy.
More information about the samba-technical
mailing list