Bug 110547 - Schema mapping broken in nss_ldap
Summary: Schema mapping broken in nss_ldap
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: nss_ldap
Version: 3.0
Hardware: i386
OS: Linux
high
medium
Target Milestone: ---
Assignee: Nalin Dahyabhai
QA Contact: Jay Turner
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2003-11-21 00:34 UTC by Mark Leary
Modified: 2015-01-08 00:06 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2004-01-16 17:16:28 UTC
Target Upstream Version:
Embargoed:


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


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2003:339 0 normal SHIPPED_LIVE Updated nss_ldap packages available 2003-11-11 05:00:00 UTC

Description Mark Leary 2003-11-21 00:34:09 UTC
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 19:40:10 UTC
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 19:40:38 UTC
Created attachment 96128 [details]
Force include of dh_185.h rather than db.h

Comment 3 Nalin Dahyabhai 2003-11-21 19:48:41 UTC
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 20:09:17 UTC
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 20:21:29 UTC
Works as expected for me...  Thanks.

Comment 6 air_ogi 2003-12-19 23:15:21 UTC
Works for me as well. Thanks.

Comment 7 Jason Heiss 2003-12-25 00:25:04 UTC
Fixed attribute mapping for me too.  Thanks.


Comment 8 Jay Turner 2004-01-16 17:16:28 UTC
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-24 01:05:58 UTC
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 results in 
  conn=37 op=1 SRCH base="dc=dot" scope=2
filter="(&(objectClass=posixAccount)(uid=user))"

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.