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): 253-13.el5_2.1 How reproducible: Steps to Reproduce: 1. service nscd start 2. Enable `nss_connect_policy oneshot' in /etc/ldap.conf 3. id <existing LDAP user> Actual results: # id josb id: ../../../libraries/libldap/result.c:113: ldap_result: Assertion `ld != ((void *)0)' failed. uid=1001(josb) gid=1000(eng)Aborted # Expected results: [root src]# ./id josb uid=1001(josb) gid=1000(eng) groups=10000(ldap_other) [root src]# Additional info: 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: http://bugzilla.padl.com/show_bug.cgi?id=322 http://bugzilla.padl.com/show_bug.cgi?id=375 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: nss_ldap-254-5.el5. nscd-2.5-18 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: paranoia yes restart-interval 3600 in /etc/nscd.conf may solve this issue.. I'm going to try that out and see what happens.
Setting paranoia yes restart-interval 3600 in /etc/nscd.conf didn't do the trick.. Actually, after some testing nscd started to crash at boot.
Created attachment 343505 [details] alternate patch
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. http://rhn.redhat.com/errata/RHBA-2009-1379.html