Bug 110547 - Schema mapping broken in nss_ldap
Schema mapping broken in nss_ldap
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: nss_ldap (Show other bugs)
3.0
i386 Linux
high Severity medium
: ---
: ---
Assigned To: Nalin Dahyabhai
Jay Turner
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2003-11-20 19:34 EST by Mark Leary
Modified: 2015-01-07 19:06 EST (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-01-16 12:16:28 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Force include of dh_185.h rather than db.h (1.08 KB, text/plain)
2003-11-21 14:40 EST, air_ogi
no flags Details

  None (edit)
Description Mark Leary 2003-11-20 19:34:09 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 
build.

Version-Release number of selected component (if applicable):
207-2

How reproducible:
Always

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 
in ldap.conf)
Comment 1 air_ogi 2003-11-21 14:40:10 EST
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) 


Comment 2 air_ogi 2003-11-21 14:40:38 EST
Created attachment 96128 [details]
Force include of dh_185.h rather than db.h
Comment 3 Nalin Dahyabhai 2003-11-21 14:48:41 EST
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.
Comment 4 Nalin Dahyabhai 2003-12-18 15:09:17 EST
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).
 Thanks!
Comment 5 Mark Leary 2003-12-18 15:21:29 EST
Works as expected for me...  Thanks.
Comment 6 air_ogi 2003-12-19 18:15:21 EST
Works for me as well. Thanks.
Comment 7 Jason Heiss 2003-12-24 19:25:04 EST
Fixed attribute mapping for me too.  Thanks.
Comment 8 Jay Turner 2004-01-16 12:16:28 EST
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.

http://rhn.redhat.com/errata/RHBA-2003-339.html
Comment 9 Zenon Panoussis 2004-01-23 20:05:58 EST
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
/etc/ldap.conf says 
  pam_login_attribute mail
Attempting to log in as user@domain.dom results in 
  conn=37 op=1 SRCH base="dc=dot" scope=2
filter="(&(objectClass=posixAccount)(uid=user@domain.dom))"

Am I missing something or should this be re-opened? Wrong package
posted in the RHEL errata perhaps? 

Note You need to log in before you can comment on or make changes to this bug.