speed problem with 'valid users' and nss_ldap

Gerald (Jerry) Carter jerry at samba.org
Mon Nov 11 04:05:01 GMT 2002


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Fri, 8 Nov 2002 mhaverka at kcp.com wrote:

> We are using Samba 2.2.6 at our site on Solaris 8 in conjunction with
> nss_ldap from padl.com.  We often use the "valid users" option in our
> smb.conf to restrict access to a given share to members of a certain group.
> This causes the "get_users_in_group" function in lib/util_getent.c to use
> getgrent to enumerate the entire list of groups.  This is extremely slow
> with nss_ldap (about 3 minutes for us).
> 
> Looking at the code for "get_users_in_group," I see that there is a "fast"
> path for winbindd users that uses "getgrnam", and a "slow" path for
> everyone else that uses "getgrent."  Is there any reason why the "fast"
> path can't be uses all the time?  I made this change to the code here, and
> I solved my problem.  Is there any reason I should not do this?  Is there
> any reason this shouldn't be changed in the Samba source?

I was just looking at this and the comment says that it is a workaround 
for True64.  I'm not sure this is a valid statement anymore and am
checking in on it. The change you made is probably just fine.




cheers, jerry

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.0 (GNU/Linux)
Comment: For info see http://quantumlab.net/pine_privacy_guard/

iD8DBQE9zyHyIR7qMdg1EfYRAn1yAJ9p4x3tHL6A18hMG7GL5Zp/M6dXlgCfUQyP
yJmXeoQwOAbuOLSTRlZvTOw=
=OaUs
-----END PGP SIGNATURE-----




More information about the samba-technical mailing list