]> granicus.if.org Git - apache/commitdiff
Set the LDAP protocol before setting extended LDAP options. [PR38146]
authorBradley Nicholes <bnicholes@apache.org>
Fri, 20 Jan 2006 16:53:43 +0000 (16:53 +0000)
committerBradley Nicholes <bnicholes@apache.org>
Fri, 20 Jan 2006 16:53:43 +0000 (16:53 +0000)
Submitted by: Aaron Richton <richton nbcs.rutgers.edu>

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@370856 13f79535-47bb-0310-9956-ffa450edef68

modules/ldap/util_ldap.c

index 9d7b6c5c1279901dc459035344c7e9207ecdb50f..d1c1cc3202288d62bb428a804c8374426eb45036 100644 (file)
@@ -264,6 +264,9 @@ static int uldap_connection_open(request_rec *r,
             return(result->rc);
         }
 
+        /* always default to LDAP V3 */
+        ldap_set_option(ldc->ldap, LDAP_OPT_PROTOCOL_VERSION, &version);
+
         /* set client certificates */
         if (!apr_is_empty_array(ldc->client_certs)) {
             apr_ldap_set_option(ldc->pool, ldc->ldap, APR_LDAP_OPT_TLS_CERT,
@@ -293,9 +296,6 @@ static int uldap_connection_open(request_rec *r,
         /* Set the alias dereferencing option */
         ldap_set_option(ldc->ldap, LDAP_OPT_DEREF, &(ldc->deref));
 
-        /* always default to LDAP V3 */
-        ldap_set_option(ldc->ldap, LDAP_OPT_PROTOCOL_VERSION, &version);
-
 /*XXX All of the #ifdef's need to be removed once apr-util 1.2 is released */
 #ifdef APR_LDAP_OPT_VERIFY_CERT
         apr_ldap_set_option(ldc->pool, ldc->ldap,