Bug 117297

Summary: autofs ldap failure to separate on colon breaks compatibility
Product: [openSUSE] SUSE LINUX 10.0 Reporter: Leah Cunningham <leah>
Component: BasesystemAssignee: Ralf Haferkamp <ralf>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P5 - None CC: krause
Version: RC 1   
Target Milestone: ---   
Hardware: Other   
OS: All   
URL: https://heinous.org/wiki/OpenLDAP_Notes#Autofs
Whiteboard:
Found By: Other Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: ldif of a broken under SUSE but working under Red Hat autofs ldap entries
ldif of work-around so we can have same entries for both SUSE and Red Hat

Description Leah Cunningham 2005-09-15 18:18:43 UTC
This was also a problem in SUSE 9.3.  If you have an an entries like in LDAP for
auto.master: 

dn: nisMapName=auto.master,dc=canadaequity,dc=com
objectClass: top
objectClass: nisMap
nisMapName: auto.master

dn: cn=/mounts/tea,nisMapName=auto.master,dc=canadaequity,dc=com
objectClass: top
objectClass: nisObject
cn: /mounts/tea
nisMapName: auto.master
nisMapEntry: ldap:nisMapName=auto.tea,dc=canadaequity,dc=com

You will the SUSE autofs does not break on the
ldap:nisMapName=auto.tea,dc=canadaequity,dc=com part of each nisMapEntry so when
you start the automounter you get something like this in /var/log/messages:

linux automount[18208]: cannot open lookup module ldap:nisMapName=auto.tea
(/usr/lib/autofs/lookup_ldap:nisMapName=auto.tea.so: cannot open shared object
file: No such file or directory)

The status on autofs will show:

/usr/sbin/automount  /mounts/tea ldap:nisMapName=auto.tea,dc=canadaequity,dc=com ""

Instead of what it should look like:

/usr/sbin/automount /mounts/tea ldap nisMapName=auto.tea,dc=canadaequity,dc=com

The work-around is to change the nisMapEntry lines to have a space instead of a
colon like this:

nisMapEntry: ldap nisMapName=auto.tea,dc=canadaequity,dc=com

However, doing so seems to break support for autofs on other systems that expect
the colon (so far seen with RHEL 4 SP1).  I will attach a full ldif of the
broken configuration that works for other clients, but not for SUSE.
Comment 1 Leah Cunningham 2005-09-15 18:20:21 UTC
Created attachment 50063 [details]
ldif of a broken under SUSE but working under Red Hat autofs ldap entries
Comment 2 Leah Cunningham 2005-09-15 18:22:51 UTC
Created attachment 50065 [details]
ldif of work-around so we can have same entries for both SUSE and Red Hat

This is ugly, but allows both the SUSE and Red Hat clients to mount the same
directories.  This also demonstrates the subtle difference.  This LDIF is only
of the auto.master entries, as nothing else changes.
Comment 3 Carsten Hoeger 2005-09-16 09:44:06 UTC
Ralf, please take care
Comment 4 Markus Krause 2006-01-01 09:55:23 UTC
i have the same problem using opensuse 10.0, with debian woody and sarge the automout maps (similar to them mentioned in the first post) are working without problems.

as a work-around i modified the function "getmounts_ldap()" in /etc/init.d/autofs (added the line starting with "+"):
-------
#
# Get list of ldap mounts.
#
function getmounts_ldap()
{
  /usr/lib/autofs/autofs-ldap-auto-master | (
  while read dir prog map; do
+     prog=$( echo "$prog" | sed "s/:/ /" )
     echo "$DAEMON $daemonoptions $dir $prog \"$map\""
  done
  )
}
------

it's not "nice" but it's working, a fix would be much appreciated!
Comment 5 Ralf Haferkamp 2006-02-01 16:41:38 UTC
Fixed for 10.1.