- mod_authn_socache.c: fix creation of default socache_instance.
- add Note how the OpenSSL version used to build httpd is found (apr-1-config) Upstream r1576233 commit message ================================ In pre_config, default socache_provider is created, but socache_instance initialization is missing. This leads to crash on startup if default socache_provider is used (AuthnCacheSOCache is not called) and AuthnCacheEnable or AuthnCacheProvideFor is used. Submitted by: Michael Bennett (per PM) Obtained from: http://svn.apache.org/viewvc?view=revision&revision=1576233
This commit is contained in:
parent
d1fa782ee6
commit
db416181b5
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=350647
2 changed files with 45 additions and 1 deletions
|
@ -2,7 +2,7 @@
|
|||
|
||||
PORTNAME= apache24
|
||||
PORTVERSION= 2.4.9
|
||||
#PORTREVISION= 1
|
||||
PORTREVISION= 1
|
||||
CATEGORIES= www ipv6
|
||||
MASTER_SITES= ${MASTER_SITE_APACHE_HTTPD}
|
||||
DISTNAME= httpd-${PORTVERSION}
|
||||
|
@ -58,6 +58,9 @@ LUA_CONFIGURE_ON= --with-lua=${LOCALBASE}
|
|||
SOCACHE_DC_CONFIGURE_ON= --with-distcache=${LOCALBASE}
|
||||
SOCACHE_DC_LIB_DEPENDS= distcache:${PORTSDIR}/security/distcache
|
||||
|
||||
# Note:
|
||||
# OpenSSL version (base/ports) depends how devel/apr1 was build
|
||||
# apu-1-config --(includes|ldflags) and apr_rules.mk
|
||||
SSL_CFLAGS= -I${OPENSSLINC}
|
||||
SSL_CONFIGURE_ON= --with-ssl=${OPENSSLBASE}
|
||||
SSL_LDFLAGS= -L${OPENSSLLIB}
|
||||
|
|
41
www/apache24/files/patch-mod_authn_socache.c
Normal file
41
www/apache24/files/patch-mod_authn_socache.c
Normal file
|
@ -0,0 +1,41 @@
|
|||
mod_authn_socache.c: fix creation of default socache_instance.
|
||||
|
||||
In pre_config, default socache_provider is created, but socache_instance
|
||||
initialization is missing. This leads to crash on startup if default
|
||||
socache_provider is used (AuthnCacheSOCache is not called) and
|
||||
AuthnCacheEnable or AuthnCacheProvideFor is used.
|
||||
|
||||
|
||||
Optained from: http://svn.apache.org/viewvc?view=revision&revision=1576233
|
||||
======================================================================================
|
||||
--- ./modules/aaa/mod_authn_socache.c 2014/03/11 08:51:11 1576232
|
||||
+++ ./modules/aaa/mod_authn_socache.c 2014/03/11 08:52:54 1576233
|
||||
@@ -86,6 +86,7 @@
|
||||
{
|
||||
apr_status_t rv;
|
||||
static struct ap_socache_hints authn_cache_hints = {64, 32, 60000000};
|
||||
+ const char *errmsg;
|
||||
|
||||
if (!configured) {
|
||||
return OK; /* don't waste the overhead of creating mutex & cache */
|
||||
@@ -98,6 +99,20 @@
|
||||
return 500; /* An HTTP status would be a misnomer! */
|
||||
}
|
||||
|
||||
+ /* We have socache_provider, but do not have socache_instance. This should
|
||||
+ * happen only when using "default" socache_provider, so create default
|
||||
+ * socache_instance in this case. */
|
||||
+ if (socache_instance == NULL) {
|
||||
+ errmsg = socache_provider->create(&socache_instance, NULL,
|
||||
+ ptmp, pconf);
|
||||
+ if (errmsg) {
|
||||
+ ap_log_perror(APLOG_MARK, APLOG_CRIT, rv, plog, APLOGNO(02612)
|
||||
+ "failed to create mod_socache_shmcb socache "
|
||||
+ "instance: %s", errmsg);
|
||||
+ return 500;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
rv = ap_global_mutex_create(&authn_cache_mutex, NULL,
|
||||
authn_cache_id, NULL, s, pconf, 0);
|
||||
if (rv != APR_SUCCESS) {
|
Loading…
Reference in a new issue