X-Git-Url: https://git.exim.org/exim.git/blobdiff_plain/a97b88d511b436f13d95f3e92d5a4018cef2d2f0..e74376d84aa63876c9a3b240513b8f38920733b7:/src/src/lookups/ldap.c diff --git a/src/src/lookups/ldap.c b/src/src/lookups/ldap.c index 698928a6a..5c1ea0b56 100644 --- a/src/src/lookups/ldap.c +++ b/src/src/lookups/ldap.c @@ -523,7 +523,12 @@ if (!lcp->bound || /* The Oracle LDAP libraries (LDAP_LIB_TYPE=SOLARIS) don't support this: */ if (eldap_start_tls) { - ldap_start_tls_s(lcp->ld, NULL, NULL); + if ( (rc = ldap_start_tls_s(lcp->ld, NULL, NULL)) != LDAP_SUCCESS) { + *errmsg = string_sprintf("failed to initiate TLS processing on an " + "LDAP session to server %s%s - ldap_start_tls_s() returned %d:" + " %s", host, porttext, rc, ldap_err2string(rc)); + goto RETURN_ERROR; + } } #endif if ((msgid = ldap_bind(lcp->ld, CS user, CS password, LDAP_AUTH_SIMPLE))