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

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