]> granicus.if.org Git - apache/commitdiff
Copy the enum into an integer before sending off to the LDAP SDK, to avoid
authorEric Covener <covener@apache.org>
Thu, 19 Jul 2007 21:13:36 +0000 (21:13 +0000)
committerEric Covener <covener@apache.org>
Thu, 19 Jul 2007 21:13:36 +0000 (21:13 +0000)
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

modules/ldap/util_ldap.c

index 459a0cdb01ac94b63d1e1803b2e10661a2f45347..a416ed27f2cf5fda10e6bb273b979a4b74b1afe8 100644 (file)
@@ -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