Bug 248175 - Include maps not working correctly with LDAP
Summary: Include maps not working correctly with LDAP
Alias: None
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: autofs   
(Show other bugs)
Version: 4.5
Hardware: All
OS: Linux
Target Milestone: ---
: ---
Assignee: Jeff Moyer
QA Contact: Brock Organ
Depends On:
TreeView+ depends on / blocked
Reported: 2007-07-13 18:04 UTC by Steve Rigler
Modified: 2007-11-17 01:14 UTC (History)
1 user (show)

Fixed In Version: RHBA-2007-0734
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2007-11-15 16:02:49 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
tgz file with ldif of included map, and other relevant info. (2.63 KB, application/x-compressed-tar)
2007-07-13 18:04 UTC, Steve Rigler
no flags Details
Don't reset the basedn for included maps. (601 bytes, patch)
2007-07-13 18:22 UTC, Jeff Moyer
no flags Details | Diff

External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2007:0734 normal SHIPPED_LIVE autofs bug fix update 2007-11-14 16:46:54 UTC

Description Steve Rigler 2007-07-13 18:04:17 UTC
Description of problem:
I am attempting to include an LDAP map within a file map.  The LDAP map is
included, however so are all of our other LDAP maps.

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

How reproducible:
Every time

Steps to Reproduce:
1. Configure /etc/auto.master to use a file map
2. Configure file map to include a LDAP map
Actual results:
Maps other than the desired LDAP map are included.

Expected results:
Only the included LDAP map should be used.

Additional info:

Comment 1 Steve Rigler 2007-07-13 18:04:17 UTC
Created attachment 159223 [details]
tgz file with ldif of included map, and other relevant info.

Comment 2 Jeff Moyer 2007-07-13 18:20:15 UTC
lookup_map_included does this:
	ctxt = context_init(map);
	if (!ctxt)
		return 0;
which sets up the base dn, as shown in the logs:
Jul 13 12:41:21 houl11 automount[9120]: lookup(ldap): server = "(default)", port
 = 389, base dn = "automountmapname=auto_int,dc..."

but then we do this:

	ctxt->base = NULL;

hmmm.  I'll have to give some thought to the reason for this piece of code.  In
this case, if we hadn't set the base pointer to NULL, the query would have
worked as desired.

I'll attach a preliminary patch in a few minutes.

Comment 3 Jeff Moyer 2007-07-13 18:22:42 UTC
Created attachment 159226 [details]
Don't reset the basedn for included maps.

Please give this a try.  If you are unable to build packages, then please let
me know what architecture you are running and I will provide packages for you.

Comment 4 Steve Rigler 2007-07-13 18:40:42 UTC
Just tried it and it works good.  With the patch only the requested map is being

Comment 6 RHEL Product and Program Management 2007-07-20 20:08:14 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update

Comment 7 Jeff Moyer 2007-07-20 21:39:11 UTC
A fix for this issue was committed to autofs-4_1_3-225.  An RHTS test was added
under /CoreOS/autofs/bugzillas, subtest bz248175.

Comment 12 errata-xmlrpc 2007-11-15 16:02:49 UTC
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 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.


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