Bug 248175 - Include maps not working correctly with LDAP
Include maps not working correctly with LDAP
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: autofs (Show other bugs)
All Linux
low Severity medium
: ---
: ---
Assigned To: Jeff Moyer
Brock Organ
Depends On:
  Show dependency treegraph
Reported: 2007-07-13 14:04 EDT by Steve Rigler
Modified: 2007-11-16 20:14 EST (History)
1 user (show)

See Also:
Fixed In Version: RHBA-2007-0734
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2007-11-15 11:02:49 EST
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 14:04 EDT, Steve Rigler
no flags Details
Don't reset the basedn for included maps. (601 bytes, patch)
2007-07-13 14:22 EDT, Jeff Moyer
no flags Details | Diff

  None (edit)
Description Steve Rigler 2007-07-13 14:04:17 EDT
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 14:04:17 EDT
Created attachment 159223 [details]
tgz file with ldif of included map, and other relevant info.
Comment 2 Jeff Moyer 2007-07-13 14:20:15 EDT
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 14:22:42 EDT
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 14:40:42 EDT
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 16:08:14 EDT
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 17:39:11 EDT
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 11:02:49 EST
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.