mod_ldap: Optional function uldap_ssl_supported(r) always returned false
authorEric Covener <covener@apache.org>
Thu, 8 Sep 2011 17:37:46 +0000 (17:37 +0000)
committerEric Covener <covener@apache.org>
Thu, 8 Sep 2011 17:37:46 +0000 (17:37 +0000)
if called from a virtual host with mod_ldap directives in it.  Did not
affect mod_authnz_ldap's usage of mod_ldap.  [Eric Covener]

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

CHANGES
modules/ldap/util_ldap.c

diff --git a/CHANGES b/CHANGES
index f43a3cb725aa6fe74c06882f2a519689dca06875..c9e5c50fc32f51340750603ff8635111893ed01a 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -7,6 +7,10 @@ Changes with Apache 2.3.15
      the original file, ignore the ranges and send the complete file.
      PR 51714. [Stefan Fritsch, Jim Jagielski, Ruediger Pluem, Eric Covener]
 
+  *) mod_ldap: Optional function uldap_ssl_supported(r) always returned false
+     if called from a virtual host with mod_ldap directives in it.  Did not
+     affect mod_authnz_ldap's usage of mod_ldap.  [Eric Covener]
+
   *) mod_filter: Instead of dropping the Accept-Ranges header when a filter
      registered with AP_FILTER_PROTO_NO_BYTERANGE is present,
      set the header value to "none". [Eric Covener, Ruediger Pluem]
index 075e9d8c870519baa7e2dd91357fa3d4e31fa71e..d0b76a2b98a257b743def4b9b7b77da349085b86 100644 (file)
@@ -2757,7 +2757,7 @@ static void *util_ldap_merge_config(apr_pool_t *p, void *basev,
     st->util_ldap_cache_lock = base->util_ldap_cache_lock; 
 
     st->connections = NULL;
-    st->ssl_supported = 0;
+    st->ssl_supported = 0; /* not known until post-config and re-merged */
     st->global_certs = apr_array_append(p, base->global_certs,
                                            overrides->global_certs);
     st->secure = (overrides->secure_set == 0) ? base->secure
@@ -2938,6 +2938,16 @@ static int util_ldap_post_config(apr_pool_t *p, apr_pool_t *plog,
                      result_err ? result_err->reason : "");
     }
 
+    /* ssl_supported is really a global setting */
+    s_vhost = s->next;
+    while (s_vhost) {
+        st_vhost = (util_ldap_state_t *)
+                   ap_get_module_config(s_vhost->module_config,
+                                        &ldap_module);
+
+        st_vhost->ssl_supported = st->ssl_supported;
+    }
+
     /* Initialize the rebind callback's cross reference list. */
     apr_ldap_rebind_init (p);