Red Hat Bugzilla – Bug 110547
Schema mapping broken in nss_ldap
Last modified: 2015-01-07 19:06:53 EST
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)
Description of problem:
The nss_ldap module ignores any nss_map_objectclass or
nss_map_attribute directives in ldap.conf. I looked at the SRPM and
the configure script is run with the right directives (--enable-
schema-mapping and --enable-rfc2307bis) but something breaks in the
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Configure nsswitch.conf to use ldap.
2. Set nss_map_objectclass in ldap.conf.
3. Watch network traffic when running getent passwd queries (filter
ojbectClass=posixAccount will always be used regardless of value set
Problem is that RPM build forces nss_ldap to use db.h.
(See nss_ldap-207-db.patch in nss_ldap-207-2.src.rpm)
For some reason this breaks nss_ldap.
If you change the patch to force the include of db_185.h
nss_ldap starts working fine.
(See attached modified nss_ldap-207-db.patch)
Created attachment 96128 [details]
Force include of dh_185.h rather than db.h
That's not actually the right fix. The documentation for DB
recommends that applications initialize DBT structures to zero before
using them so that unused fields don't get passed to libdb functions
with garbage data in them. Not doing that is what causes the problem
to appear with DB 4.
This is fixed upstream in version 210 and later, and I expect to have
a patch in the 207 package soonish.
The nss_ldap-207-6 update in FC1 testing should fix this bug. Please
test it and follow up here (even if it works, which is what I expect).
Works as expected for me... Thanks.
Works for me as well. Thanks.
Fixed attribute mapping for me too. Thanks.
An errata 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 the 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.
According to https://rhn.redhat.com/errata/RHBA-2003-339.html this is
fixed by nss_ldap-207-5 in RHEL3. It doesn't work for me. My
Attempting to log in as firstname.lastname@example.org results in
conn=37 op=1 SRCH base="dc=dot" scope=2
Am I missing something or should this be re-opened? Wrong package
posted in the RHEL errata perhaps?