From 05f246f4b10a04a43447b6f2ddded31e66ea3e17 Mon Sep 17 00:00:00 2001 From: Eric Covener Date: Sun, 11 Jul 2010 14:52:10 +0000 Subject: [PATCH] backport r951235 and r951237 from trunk: *) 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 | 4 ++++ STATUS | 10 ---------- modules/ldap/util_ldap.c | 4 ++++ modules/ldap/util_ldap_cache_mgr.c | 3 ++- 4 files changed, 10 insertions(+), 11 deletions(-) diff --git a/CHANGES b/CHANGES index d1a2055e508..b8e0fc11b40 100644 --- 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 a00b7330e52..e68d5a7e035 100644 --- 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 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: diff --git a/modules/ldap/util_ldap.c b/modules/ldap/util_ldap.c index a894b6ea0a9..08f21496117 100644 --- a/modules/ldap/util_ldap.c +++ b/modules/ldap/util_ldap.c @@ -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, diff --git a/modules/ldap/util_ldap_cache_mgr.c b/modules/ldap/util_ldap_cache_mgr.c index 6bb066ab357..b0283715948 100644 --- a/modules/ldap/util_ldap_cache_mgr.c +++ b/modules/ldap/util_ldap_cache_mgr.c @@ -605,7 +605,8 @@ char *util_ald_cache_display(request_rec *r, util_ldap_state_t *st) if (!util_ldap_cache) { - return "Cache has not been enabled/initialised."; + ap_rputs("Cache has not been enabled/initialised.", r); + return NULL; } if (r->args && strlen(r->args)) { -- 2.47.2