Make ldap_require_cert work (not segfault).
authorPhil Pennock <pdp@exim.org>
Tue, 22 Mar 2011 10:43:34 +0000 (06:43 -0400)
committerPhil Pennock <pdp@exim.org>
Tue, 22 Mar 2011 10:43:34 +0000 (06:43 -0400)
The clang complaint, which also triggered a gcc complaint, was
legitimate. My first test, which suggested no problem, was flawed.

This:
  ldap_start_tls
  ldap_require_cert = demand
would cause a segfault on LDAP lookup.

fixes bug 230

doc/doc-txt/ChangeLog
src/src/lookups/ldap.c

index 853f3a57321881ccb6b3e827616532f4c8d2aea5..94952afa5bf09e28624fe21ab0a31eabf8f53834 100644 (file)
@@ -3,6 +3,12 @@ $Cambridge: exim/doc/doc-txt/ChangeLog,v 1.632 2010/06/12 15:21:25 jetmore Exp $
 Change log file for Exim from version 4.21
 -------------------------------------------
 
+Exim version 4.76
+-----------------
+
+PP/01 The new ldap_require_cert option would segfault if used.  Fixed.
+
+
 Exim version 4.75
 -----------------
 
index ddf803e21047da98a3ce5141fa9171d15b5fa812..06b74946912ff5d9ecc25930103f519d0f56db64 100644 (file)
@@ -481,7 +481,7 @@ if (lcp == NULL)
       {
       cert_option = LDAP_OPT_X_TLS_TRY;
       }
-    ldap_set_option(ld, LDAP_OPT_X_TLS_REQUIRE_CERT, cert_option);
+    ldap_set_option(ld, LDAP_OPT_X_TLS_REQUIRE_CERT, &cert_option);
     }
   #endif