Hunting down bottlenecks in samba 2.2.5 + OpenLDAP
ohrn at chl.chalmers.se
Wed Jul 31 05:43:02 GMT 2002
On Tue, 30 Jul 2002, Fredrik Ohrn wrote:
> On Tue, 30 Jul 2002, Fredrik Ohrn wrote:
> > source don't print anything. Does anyone have suggestions why/how samba
> > triggers this lengthy search?
> As always: Use Google first, ask questions later.
> The crulpit here is the initgroups function, apparently nss_ldap is
> borked on Solaris. I'll move over to the correct mailinglist. :)
Correction: Use Google first, read the source, read the source again, make
sure you understand the source, ask questions later.
The fault lies within Samba. A comment about Tru64 threw me off at first,
that piece of code doesn't apply to me, right? :)
In lib/util_getent.c we find this little gem: get_users_in_group(*name)
According to the comment above the function getgrnam is broken on Tru64
and thus it must use getgrent, with the side effect that it enumerates the
complete list of groups.
Congrats, it is painfully to enumerate groups on a LDAP server.
Someone has already put in a workaround for nss_winbind, since enumerating
groups is slow in that case too.
I'd say this needs to be fixed so that the default is to use getgrnam and
only use a getgrent-loop on platforms known to be broken.
"It is easy to be blinded to the essential uselessness of computers by
the sense of accomplishment you get from getting them to work at all."
- Douglas Adams
Fredrik Öhrn Chalmers University of Technology
ohrn at chl.chalmers.se Sweden
More information about the samba-technical