Bug#502089: /etc/default/autofs: specifying LDAPURI and LDAPBASE no longer works
-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.0 +0100 +++ 065_fix_master_map_in_ldap.dpatch 2010-03-24 12:43:25.0 +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.0 + +++ .A/samples/rc.autofs.in 2007-01-07 21:36:35.0 + @@ -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 }
Bug#502089: /etc/default/autofs: specifying LDAPURI and LDAPBASE no longer works
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 tags 502089 + patch thanks On Mon, 13 Oct 2008, Arthur de Jong wrote: There seems to be a problem with the LDAPURI and LDAPBASE environment variables that can be set from /etc/default/autofs. The problem is that they don't end up in the automounter process any more (my guess is that start-stop-daemon cleans the environment). After some more digging the problem was in the init script. The place where the export was done was apparently in a subshell (probably started because the use of pipes throughout the script). The attached patch fixes the problem and ensures that the LDAPURI and LDAPBASE environment variables will be exported to any subprocess. A replacement for debian/patches/065_fix_master_map_in_ldap.dpatch is also attached. - -- - -- arthur - [EMAIL PROTECTED] - http://people.debian.org/~adejong -- -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQFI9E50VYan35+NCKcRAojJAKCSJK5op0YX3CKYuEQlNYCu9FB+vgCgxTlT HIpCFUsYbAj0wHqLICyNgLI= =I+TL -END PGP SIGNATURE /etc/init.d/autofs.orig 2008-03-08 11:19:48.0 +0100 +++ /etc/init.d/autofs 2008-10-14 09:10:46.0 +0200 @@ -116,6 +116,10 @@ daemonoptions=$daemonoptions --timeout=$TIMEOUT fi +# ensure that the LDAP settings are available to sub-processes +[ ! -z $LDAPURI ] export LDAPURI=$LDAPURI +[ ! -z $LDAPBASE ] export LDAPBASE=$LDAPBASE + # # Check for all maps that are to be loaded # @@ -185,8 +189,6 @@ function getldapmounts() { if [ -x /usr/lib/autofs/autofs-ldap-auto-master ]; then - [ ! -z $LDAPURI ] export LDAPURI=$LDAPURI - [ ! -z $LDAPBASE ] export LDAPBASE=$LDAPBASE /usr/lib/autofs/autofs-ldap-auto-master 2 /dev/null /usr/lib/autofs/autofs-ldap-auto-master -m automountMap \ -e automount -n ou -k cn -v automountInformation 2 /dev/null #!/bin/sh /usr/share/dpatch/dpatch-run ## 065_fix_master_map_in_ldap.dpatch ## ## DP: No description. @DPATCH@ diff -urNad autofs-4.1.4+debian~/samples/rc.autofs.in autofs-4.1.4+debian/samples/rc.autofs.in --- autofs-4.1.4+debian~/samples/rc.autofs.in 2008-10-14 09:41:10.0 +0200 +++ autofs-4.1.4+debian/samples/rc.autofs.in2008-10-14 09:42:00.0 +0200 @@ -106,6 +106,10 @@ daemonoptions=$daemonoptions --timeout=$TIMEOUT fi +# ensure that the LDAP settings are available to sub-processes +[ ! -z $LDAPURI ] export LDAPURI=$LDAPURI +[ ! -z $LDAPBASE ] export LDAPBASE=$LDAPBASE + # # Check for all maps that are to be loaded # @@ -176,6 +180,8 @@ { if [ -x @@autofslibdir@@/autofs-ldap-auto-master ]; then @@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 }
Bug#502089: /etc/default/autofs: specifying LDAPURI and LDAPBASE no longer works
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Subject: /etc/default/autofs: specifying LDAPURI and LDAPBASE no longer works Package: autofs-ldap Version: 4.1.4+debian-2.1 Severity: normal There seems to be a problem with the LDAPURI and LDAPBASE environment variables that can be set from /etc/default/autofs. The problem is that they don't end up in the automounter process any more (my guess is that start-stop-daemon cleans the environment). - -- System Information: Debian Release: lenny/sid APT prefers testing APT policy: (500, 'testing') Architecture: i386 (i686) Kernel: Linux 2.6.26-1-686 (SMP w/2 CPU cores) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_GB (charmap=ISO-8859-1) Shell: /bin/sh linked to /bin/bash Versions of packages autofs-ldap depends on: ii autofs 4.1.4+debian-2.1 kernel-based automounter for Linux ii ldap-utils 2.4.10-3 OpenLDAP utilities ii libc6 2.7-13 GNU C Library: Shared libraries ii libldap-2.4-2 2.4.10-3 OpenLDAP libraries - -- - -- arthur - [EMAIL PROTECTED] - http://people.debian.org/~adejong -- -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQFI81IVVYan35+NCKcRAoLqAJ9bxNo0kRtQjXgE7wQmg4gSwh+ArQCg6y/z 5UFjkN0XVpfHFmiUDt1Lwqg= =xcQI -END PGP SIGNATURE- -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]