Do not call ldap_start_tls_s on ldapi:// connections.
authorYmrDtnJu <YmrDtnJu@users.noreply.github.com>
Sat, 31 Dec 2016 12:57:49 +0000 (13:57 +0100)
committerYmrDtnJu <YmrDtnJu@users.noreply.github.com>
Sat, 31 Dec 2016 12:57:49 +0000 (13:57 +0100)
The code already skips the initialisation of TLS on LDAP connections over unix
sockets but the call to ldap_start_tls_s is done nonetheless.

src/src/lookups/ldap.c

index 3db787ccee372ba01205afa89e0da628e8a5bc86..b8a326834f498a550d33596e1881fb73f6528ce8 100644 (file)
@@ -580,7 +580,7 @@ if (!lcp->bound ||
   {
   DEBUG(D_lookup) debug_printf("%sbinding with user=%s password=%s\n",
     (lcp->bound)? "re-" : "", user, password);
-  if (eldap_start_tls && !lcp->is_start_tls_called)
+  if (eldap_start_tls && !lcp->is_start_tls_called && !ldapi)
     {
 #if defined(LDAP_OPT_X_TLS) && !defined(LDAP_LIB_SOLARIS)
     /* The Oracle LDAP libraries (LDAP_LIB_TYPE=SOLARIS) don't support this.