[openldap/f16] fix: Re-binding to a failed connection can segfault
jsynacek
jsynacek at fedoraproject.org
Mon Mar 26 12:03:26 UTC 2012
commit 03c82d7a20133864e37c16785a337c6a403b143a
Author: Jan Synacek <jsynacek at redhat.com>
Date: Mon Mar 26 13:41:40 2012 +0200
fix: Re-binding to a failed connection can segfault
Resolves: #784989
openldap-ld_defconn-rebind.patch | 19 +++++++++++++++++++
openldap.spec | 7 ++++++-
2 files changed, 25 insertions(+), 1 deletions(-)
---
diff --git a/openldap-ld_defconn-rebind.patch b/openldap-ld_defconn-rebind.patch
new file mode 100644
index 0000000..102fd10
--- /dev/null
+++ b/openldap-ld_defconn-rebind.patch
@@ -0,0 +1,19 @@
+commit dcf94e25f57c2f24936c3ce66d2350c391354da1
+Author: Howard Chu <hyc at openldap.org>
+Date: Mon Mar 26 03:32:11 2012 -0700
+
+ ITS#7207 check for ld->ld_defconn
+
+diff --git a/libraries/libldap/cyrus.c b/libraries/libldap/cyrus.c
+index 0248101..2475a87 100644
+--- a/libraries/libldap/cyrus.c
++++ b/libraries/libldap/cyrus.c
+@@ -419,7 +419,7 @@ ldap_int_sasl_bind(
+ LDAP_MUTEX_LOCK( &ld->ld_conn_mutex );
+ ber_sockbuf_ctrl( ld->ld_sb, LBER_SB_OPT_GET_FD, &sd );
+
+- if ( sd == AC_SOCKET_INVALID ) {
++ if ( sd == AC_SOCKET_INVALID || !ld->ld_defconn ) {
+ /* not connected yet */
+
+ rc = ldap_open_defconn( ld );
diff --git a/openldap.spec b/openldap.spec
index 0be9d2a..90ed8ae 100644
--- a/openldap.spec
+++ b/openldap.spec
@@ -9,7 +9,7 @@
Name: openldap
Version: 2.4.26
-Release: 6%{?dist}
+Release: 7%{?dist}
Summary: LDAP support libraries
Group: System Environment/Daemons
License: OpenLDAP
@@ -44,6 +44,7 @@ Patch18: openldap-nss-handshake-threadsafe.patch
Patch19: openldap-syncrepl-unset-tls-options.patch
Patch20: openldap-nss-deferred-init-copy-params.patch
Patch21: openldap-nss-segfault-key-not-set.patch
+Patch22: openldap-ld_defconn-rebind.patch
# patches for the evolution library (see README.evolution)
Patch200: openldap-evolution-ntlm.patch
@@ -158,6 +159,7 @@ pushd openldap-%{version}
%patch19 -p1 -b .syncrepl-unset-tls-options
%patch20 -p1 -b .nss-deferred-init-copy-params
%patch21 -p1 -b .nss-segfault-key-not-set
+%patch22 -p1 -b .ld_defconn-rebind
cp %{_datadir}/libtool/config/config.{sub,guess} build/
@@ -683,6 +685,9 @@ exit 0
%attr(0644,root,root) %{evolution_connector_libdir}/*.a
%changelog
+* Mon Mar 26 2012 Jan Synáček <jsynacek at redhat.com> 2.4.26-7
+- fix: Re-binding to a failed connection can segfault (#784989)
+
* Tue Jan 31 2012 Jan Vcelak <jvcelak at redhat.com> 2.4.26-6
- fix requires of main package to include %%{?_isa}
- fix: replication (syncrepl) with TLS causes segfault (#783431)
More information about the scm-commits
mailing list