Bug 113780 - init script doesnt work for LDAP maps
Summary: init script doesnt work for LDAP maps
Alias: None
Product: Fedora
Classification: Fedora
Component: autofs (Show other bugs)
(Show other bugs)
Version: 1
Hardware: All Linux
Target Milestone: ---
Assignee: Nalin Dahyabhai
QA Contact: Brock Organ
Depends On:
TreeView+ depends on / blocked
Reported: 2004-01-17 21:13 UTC by Paul Jakma
Modified: 2007-11-30 22:10 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-01-18 02:20:09 UTC
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 21:14 UTC, Paul Jakma
no flags Details | Diff

Description Paul Jakma 2004-01-17 21:13:01 UTC
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 21:14:28 UTC
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-18 02:20:09 UTC
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.