From: Bradley Nicholes Date: Fri, 20 Jan 2006 16:53:43 +0000 (+0000) Subject: Set the LDAP protocol before setting extended LDAP options. [PR38146] X-Git-Tag: 2.3.0~2589 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=407ef2a3f5d282db62833d903b30e11e9d637663;p=apache Set the LDAP protocol before setting extended LDAP options. [PR38146] Submitted by: Aaron Richton git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@370856 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/ldap/util_ldap.c b/modules/ldap/util_ldap.c index 9d7b6c5c12..d1c1cc3202 100644 --- a/modules/ldap/util_ldap.c +++ b/modules/ldap/util_ldap.c @@ -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,