Bug 113780 - init script doesnt work for LDAP maps
init script doesnt work for LDAP maps
Product: Fedora
Classification: Fedora
Component: autofs (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Nalin Dahyabhai
Brock Organ
Depends On:
  Show dependency treegraph
Reported: 2004-01-17 16:13 EST by Paul Jakma
Modified: 2007-11-30 17:10 EST (History)
0 users

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

Attachments (Terms of Use)
Fix for autofs init script LDAP problem (363 bytes, patch)
2004-01-17 16:14 EST, Paul Jakma
no flags Details | Diff

  None (edit)
Description Paul Jakma 2004-01-17 16:13:01 EST
Description of problem:

The autofs init script screws up in the presence of ldap maps:

[root@fogarty plugins]# /etc/init.d/autofs.rpmnew status
Configured Mount Points:
/usr/sbin/automount /misc file /etc/auto.misc  
/usr/sbin/automount /home yp auto.home  

This is because /usr/lib/autofs/autofs-ldap-auto-master does not returns:

 <mount point> <map name> 

rather than:

  <mount point> <type>:<map name>

And hence the autofs init script then attempts to guess the map type
in getmounts() where it says "# Handle degenerate map specifiers".

A quick fix is to make the getldapmounts() function prepend "ldap:" to
the mapname. See attached diff.

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

How reproducible:


Steps to Reproduce:
1. edit nsswitch.conf to include ldap as source for automount
2. configure LDAP automount maps
3. run the init script, eg with status argument
Actual results:

init script incorrectly attempts to guess the map type.

Expected results:

init script detects ldap maps.

Additional info:

See attached diff to /etc/init.d/autofs which fixes the problem.
Comment 1 Paul Jakma 2004-01-17 16:14:28 EST
Created attachment 97077 [details]
Fix for autofs init script LDAP problem

This makes getldapmounts() prepend the maptype "ldap:" to the mapname and hence
allows getmounts to correctly work with ldap maps.
Comment 2 Paul Jakma 2004-01-17 21:20:09 EST
Actually, this is i think not a bug.

The error was in my ldap information, I had specified the maps simply
by name, where i should have specified <maptype>:<name>.

Attempting to set resolved/notabug on this bug report. Please close if
i do not privileges to close it myself.

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