From: Eric Covener Date: Thu, 19 Jul 2007 21:13:36 +0000 (+0000) Subject: Copy the enum into an integer before sending off to the LDAP SDK, to avoid X-Git-Tag: 2.3.0~1711 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=78539704411441310d1b6f70172934ba46379632;p=apache Copy the enum into an integer before sending off to the LDAP SDK, to avoid passing the address of a short (seen on z/OS) git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@557778 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/ldap/util_ldap.c b/modules/ldap/util_ldap.c index 459a0cdb01..a416ed27f2 100644 --- a/modules/ldap/util_ldap.c +++ b/modules/ldap/util_ldap.c @@ -203,7 +203,7 @@ static apr_status_t uldap_connection_cleanup(void *param) static int uldap_connection_init(request_rec *r, util_ldap_connection_t *ldc ) { - int rc = 0; + int rc = 0, ldap_option = 0; int version = LDAP_VERSION3; apr_ldap_err_t *result = NULL; struct timeval timeOut = {10,0}; /* 10 second connection timeout */ @@ -266,7 +266,8 @@ static int uldap_connection_init(request_rec *r, } /* Set the alias dereferencing option */ - ldap_set_option(ldc->ldap, LDAP_OPT_DEREF, &(ldc->deref)); + ldap_option = ldc->deref; + ldap_set_option(ldc->ldap, LDAP_OPT_DEREF, &ldap_option); /*XXX All of the #ifdef's need to be removed once apr-util 1.2 is released */ #ifdef APR_LDAP_OPT_VERIFY_CERT