diff --git a/autofs-5.0.5-fix-reconnect-get-base-dn.patch b/autofs-5.0.5-fix-reconnect-get-base-dn.patch new file mode 100644 index 0000000..bb8a8d0 --- /dev/null +++ b/autofs-5.0.5-fix-reconnect-get-base-dn.patch @@ -0,0 +1,37 @@ +autofs-5.0.5 - fix reconnect get base dn + +From: Ian Kent + +If connect to an LDAP server but fail to find a valid query dn a +subsequent reconnect succeeds without setting the schema fields +used for constructing queries. A segfault then occurs when we try +to construct a query using the schema values that should have been +set during the query dn validation. +--- + + CHANGELOG | 1 + + modules/lookup_ldap.c | 2 +- + 2 files changed, 2 insertions(+), 1 deletion(-) + + +--- autofs-5.0.5.orig/CHANGELOG ++++ autofs-5.0.5/CHANGELOG +@@ -21,6 +21,7 @@ + - fix random selection option. + - fix disable timeout. + - fix strdup() return value check (Leonardo Chiquitto). ++- fix reconnect get base dn. + + 03/09/2009 autofs-5.0.5 + ----------------------- +--- autofs-5.0.5.orig/modules/lookup_ldap.c ++++ autofs-5.0.5/modules/lookup_ldap.c +@@ -556,7 +556,7 @@ static int do_bind(unsigned logopt, LDAP + } + } + +- if (!need_base) ++ if (ctxt->schema && !need_base) + return 1; + + /* diff --git a/autofs.spec b/autofs.spec index e7aa123..79d79c8 100644 --- a/autofs.spec +++ b/autofs.spec @@ -4,7 +4,7 @@ Summary: A tool for automatically mounting and unmounting filesystems Name: autofs Version: 5.0.5 -Release: 17%{?dist} +Release: 19%{?dist} Epoch: 1 License: GPLv2+ Group: System Environment/Daemons @@ -31,6 +31,7 @@ Patch18: autofs-5.0.5-dont-connect-at-ldap-lookup-module-init.patch Patch19: autofs-5.0.5-fix-random-selection-option.patch Patch20: autofs-5.0.5-fix-disable-timeout.patch Patch21: autofs-5.0.5-fix-strdup-return-value-check.patch +Patch22: autofs-5.0.5-fix-reconnect-get-base-dn.patch Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: autoconf, hesiod-devel, openldap-devel, bison, flex, libxml2-devel, cyrus-sasl-devel, openssl-devel module-init-tools util-linux nfs-utils e2fsprogs libtirpc-devel Requires: kernel >= 2.6.17 @@ -93,6 +94,7 @@ echo %{version}-%{release} > .version %patch19 -p1 %patch20 -p1 %patch21 -p1 +%patch22 -p1 %build #CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=/usr --libdir=%{_libdir} @@ -145,6 +147,9 @@ fi %{_libdir}/autofs/ %changelog +* Thu Feb 11 2010 Ian Kent - 1:5.0.5-19 +- fix segfault upon reconnect cannot find valid base dn. + * Mon Feb 1 2010 Ian Kent - 1:5.0.5-17 - dont connect at ldap lookup module init. - fix random selection option.