Blame SOURCES/autofs-5.0.8-fix-deadlock-in-init-ldap-connection.patch

304803
Fix deadlock in init_ldap_connection()
304803
304803
From: Leonardo Chiquitto <leonardo.lists@gmail.com>
304803
304803
Commit 9fc20db13 ("fix crash due to thread unsafe use of libldap")
304803
introduced a deadlock in init_ldap_connection(). When TLS is on,
304803
this function will call itself recursively and try to lock a mutex
304803
that's already owned by the thread. Fix the problem by using the
304803
lockless version.
304803
---
304803
 CHANGELOG             |    1 +
304803
 modules/lookup_ldap.c |    2 +-
304803
 2 files changed, 2 insertions(+), 1 deletion(-)
304803
304803
--- autofs-5.0.7.orig/CHANGELOG
304803
+++ autofs-5.0.7/CHANGELOG
304803
@@ -106,6 +106,7 @@
304803
 - fix mistake in assignment.
304803
 - use open(2) instead of access(2) to trigger dependent mounts.
304803
 - fix crash due to thread unsafe use of libldap.
304803
+- fix deadlock in init_ldap_connection.
304803
 
304803
 25/07/2012 autofs-5.0.7
304803
 =======================
304803
--- autofs-5.0.7.orig/modules/lookup_ldap.c
304803
+++ autofs-5.0.7/modules/lookup_ldap.c
304803
@@ -288,7 +288,7 @@ LDAP *__init_ldap_connection(unsigned lo
304803
 				return NULL;
304803
 			}
304803
 			ctxt->use_tls = LDAP_TLS_DONT_USE;
304803
-			ldap = init_ldap_connection(logopt, uri, ctxt);
304803
+			ldap = __init_ldap_connection(logopt, uri, ctxt);
304803
 			if (ldap)
304803
 				ctxt->use_tls = LDAP_TLS_INIT;
304803
 			return ldap;