]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
backport r951235 and r951237 from trunk:
authorEric Covener <covener@apache.org>
Sun, 11 Jul 2010 14:52:10 +0000 (14:52 +0000)
committerEric Covener <covener@apache.org>
Sun, 11 Jul 2010 14:52:10 +0000 (14:52 +0000)
  *) mod_ldap: LDAP caching was suppressed (and ldap-status handler returns
     title page only) when any mod_ldap directives were used in VirtualHost
     context.  [Eric Covener]

Reviewed By: covener, wrowe, trawick

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@963086 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
STATUS
modules/ldap/util_ldap.c
modules/ldap/util_ldap_cache_mgr.c

diff --git a/CHANGES b/CHANGES
index d1a2055e5088807660166da42decefee03c3a059..b8e0fc11b40999718d8deaf70a5e18b1f00f096b 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -5,6 +5,10 @@ Changes with Apache 2.2.16
      mod_proxy_ajp, mod_proxy_http, mod_reqtimeout: Fix timeout detection
      for platforms Windows, Netware and OS2.  PR: 49417. [Rainer Jung]
 
+  *) mod_ldap: LDAP caching was suppressed (and ldap-status handler returns
+     title page only) when any mod_ldap directives were used in VirtualHost
+     context.  [Eric Covener]
+
   *) mod_ssl: Fix segfault at startup if proxy client certs are shared
      across multiple vhosts.  PR 39915.  [Joe Orton]
 
diff --git a/STATUS b/STATUS
index a00b7330e52ef73dc77acf676bfaedff943ee78d..e68d5a7e03596c4a5406388c18c75e9acd838f51 100644 (file)
--- a/STATUS
+++ b/STATUS
@@ -114,16 +114,6 @@ PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
            option in the docs page, like e.g. we did for SSLInsecureRenegotiation.
     wrowe asks; you mean <Compatibility> tag?  Yes, of course.
 
-  *) mod_ldap: LDAP caching was suppressed (and ldap-status handler returns
-     title page only) when any mod_ldap directives were used in VirtualHost
-     context.
-     Trunk Patch: http://svn.apache.org/viewvc?rev=951235&view=rev (actual fix)
-                  http://svn.apache.org/viewvc?rev=951237&view=rev (error msg not displayed)
-     2.2.x patch: http://people.apache.org/~covener/2.2.x-ldap_serverconfig.diff
-         note: No actual per-server directives in 2.2.x mod_ldap, but per-directory 
-         mod_ldap directives under a virtualhost are sufficient to trigger this merge issue)
-     +1: covener, wrowe, trawick
-
   *) mod_proxy_ajp: Ensure that we only return a non fatal error if the request
      is idempotent and if we did not sent any request body so far.
       Trunk version of patch:
index a894b6ea0a9bfb9c42bfb0755d0dc8e914126ead..08f21496117ce4a5b93f9f16dfdb8c65863da449 100644 (file)
@@ -1837,6 +1837,9 @@ static void *util_ldap_create_config(apr_pool_t *p, server_rec *s)
     return st;
 }
 
+/* cache-related settings are not merged here, but in the post_config hook,
+ * since the cache has not yet sprung to life
+ */
 static void *util_ldap_merge_config(apr_pool_t *p, void *basev,
                                     void *overridesv)
 {
@@ -1983,6 +1986,7 @@ static int util_ldap_post_config(apr_pool_t *p, apr_pool_t *plog,
             st_vhost->cache_shm = st->cache_shm;
             st_vhost->cache_rmm = st->cache_rmm;
             st_vhost->cache_file = st->cache_file;
+            st_vhost->util_ldap_cache = st->util_ldap_cache;
             ap_log_error(APLOG_MARK, APLOG_DEBUG, result, s,
                          "LDAP merging Shared Cache conf: shm=0x%pp rmm=0x%pp "
                          "for VHOST: %s", st->cache_shm, st->cache_rmm,
index 6bb066ab357fb2f04514d02367a811c13b904c88..b0283715948ca7580fbaf2be9c987c8e084c9859 100644 (file)
@@ -605,7 +605,8 @@ char *util_ald_cache_display(request_rec *r, util_ldap_state_t *st)
 
 
     if (!util_ldap_cache) {
-        return "<tr valign='top'><td nowrap colspan=7>Cache has not been enabled/initialised.</td></tr>";
+        ap_rputs("<tr valign='top'><td nowrap colspan=7>Cache has not been enabled/initialised.</td></tr>", r);
+        return NULL;
     }
 
     if (r->args && strlen(r->args)) {