Red Hat Bugzilla – Bug 488857
nss_ldap bug causes nscd to crash with `ldap_result: Assertion `ld != ((void *)0)' failed.'
Last modified: 2010-10-23 04:08:05 EDT
Description of problem:
When using nss_ldap with user accounts in LDAP and the `nss_connect_policy oneshot' directive in /etc/ldap.conf, running `id <LDAP user>' causes id to fail and nscd to crash.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. service nscd start
2. Enable `nss_connect_policy oneshot' in /etc/ldap.conf
3. id <existing LDAP user>
# id josb
id: ../../../libraries/libldap/result.c:113: ldap_result: Assertion `ld != ((void *)0)' failed.
[firstname.lastname@example.org src]# ./id josb
uid=1001(josb) gid=1000(eng) groups=10000(ldap_other)
The fix is available in http://bugzilla.padl.com/show_bug.cgi?id=350. See attachment.
Created attachment 334233 [details]
Patch to ldap-nss.c fixing issue
Please consider applying this patch; it fixes this problem for me.
Sorry, I spoke too soon. The attached patch causes any LDAP entries to be omitted, which is almost as bad as crashing. Further inspection of PADLs Bugzilla reveals two other bugs:
which indicates that this problem is NOT solved upstream.
Please consider shipping http://ch.tudelft.nl/~arthur/nss-ldapd/ in extras, because as it stands nss_ldap is unusable.
I can verify this bug on RHEL 5.2 server and desktop using:
This can be a major issue if you are administrating thousands of ldap clients and need to keep them from having persistent connections.
A thought might be that setting:
in /etc/nscd.conf may solve this issue..
I'm going to try that out and see what happens.
in /etc/nscd.conf didn't do the trick..
Actually, after some testing nscd started to crash at boot.
Created attachment 343505 [details]
The most recent - alternate patch (id=343505) solves the issue for me.
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.