Fix deadlock in init_ldap_connection()

From: Leonardo Chiquitto <leonardo.lists@gmail.com>

Commit 9fc20db13 ("fix crash due to thread unsafe use of libldap")
introduced a deadlock in init_ldap_connection(). When TLS is on,
this function will call itself recursively and try to lock a mutex
that's already owned by the thread. Fix the problem by using the
lockless version.
---
 CHANGELOG             |    1 +
 modules/lookup_ldap.c |    2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/CHANGELOG b/CHANGELOG
index da83d17..1eba6ca 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -15,6 +15,7 @@
 - fix rpc_getrpcbport() when libtirpc is disabled.
 - don't reset errno.
 - extend fix for crash due to thread unsafe use of libldap.
+- fix deadlock in init_ldap_connection.
 
 17/10/2013 autofs-5.0.8
 =======================
diff --git a/modules/lookup_ldap.c b/modules/lookup_ldap.c
index fd96d1d..3591f9b 100644
--- a/modules/lookup_ldap.c
+++ b/modules/lookup_ldap.c
@@ -300,7 +300,7 @@ LDAP *__init_ldap_connection(unsigned logopt, const char *uri, struct lookup_con
 				return NULL;
 			}
 			ctxt->use_tls = LDAP_TLS_DONT_USE;
-			ldap = init_ldap_connection(logopt, uri, ctxt);
+			ldap = __init_ldap_connection(logopt, uri, ctxt);
 			if (ldap)
 				ctxt->use_tls = LDAP_TLS_INIT;
 			return ldap;