-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I see the patch was applied in 4.1.4-6. Anyway, there is a problem with the patch that can be easily fixed. It doesn't work correctly when mutliple LDAP servers are used, e.g.:

  LDAPURI="ldap://server1 ldap://server2";

Attached is a patch (fix_multi_ldap_uris.patch) that fixes this. Also a replacement 065_fix_master_map_in_ldap.dpatch is attached.

- -- - -- arthur - adej...@debian.org - http://people.debian.org/~adejong --
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEARECAAYFAkup+xEACgkQVYan35+NCKfvQgCg5WKlfzXWuENTmOyHNz1gT3iu
bMYAn3YfuhmT0GaTD/BRqM9cC0IWRRsJ
=i5YS
-----END PGP SIGNATURE-----
--- 065_fix_master_map_in_ldap.dpatch.orig	2010-03-24 12:43:07.000000000 +0100
+++ 065_fix_master_map_in_ldap.dpatch	2010-03-24 12:43:25.000000000 +0100
@@ -12,11 +12,11 @@
  function getldapmounts()
  {
      if [ -x @@autofslibdir@@/autofs-ldap-auto-master ]; then
-+	[ ! -z $LDAPURI ] && export LDAPURI="$LDAPURI"
-+	[ ! -z $LDAPBASE ] && export LDAPBASE="$LDAPBASE"
++	[ ! -z "$LDAPURI" ] && export LDAPURI="$LDAPURI"
++	[ ! -z "$LDAPBASE" ] && export LDAPBASE="$LDAPBASE"
          @@autofslibdir@@/autofs-ldap-auto-master 2> /dev/null
 +	@@autofslibdir@@/autofs-ldap-auto-master -m automountMap \
 +	    -e automount -n ou -k cn -v automountInformation 2> /dev/null
      fi
  }
- 
+
#!/bin/sh /usr/share/dpatch/dpatch-run
## 065_fix_master_map_in_ldap.dpatch
##
## DP: No description.

@DPATCH@

diff -Naur .B/samples/rc.autofs.in .A/samples/rc.autofs.in
--- .B/samples/rc.autofs.in     2007-01-07 21:36:35.000000000 +0000
+++ .A/samples/rc.autofs.in     2007-01-07 21:36:35.000000000 +0000
@@ -175,7 +175,11 @@
 function getldapmounts()
 {
     if [ -x @@autofslibdir@@/autofs-ldap-auto-master ]; then
+       [ ! -z "$LDAPURI" ] && export LDAPURI="$LDAPURI"
+       [ ! -z "$LDAPBASE" ] && export LDAPBASE="$LDAPBASE"
         @@autofslibdir@@/autofs-ldap-auto-master 2> /dev/null
+       @@autofslibdir@@/autofs-ldap-auto-master -m automountMap \
+           -e automount -n ou -k cn -v automountInformation 2> /dev/null
     fi
 }

Reply via email to