aboutsummaryrefslogtreecommitdiffstats
path: root/www
diff options
context:
space:
mode:
authorohauer <ohauer@FreeBSD.org>2014-04-09 05:41:03 +0800
committerohauer <ohauer@FreeBSD.org>2014-04-09 05:41:03 +0800
commit54b225947a53f779fed227e29f991a915dac93f0 (patch)
tree7ef6a1c13e913165c1a6b862565b0a8bbff4db76 /www
parent47c12dc71d45dd974f7407ffa76417f68778fc47 (diff)
downloadfreebsd-ports-gnome-54b225947a53f779fed227e29f991a915dac93f0.tar.gz
freebsd-ports-gnome-54b225947a53f779fed227e29f991a915dac93f0.tar.zst
freebsd-ports-gnome-54b225947a53f779fed227e29f991a915dac93f0.zip
- 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
Diffstat (limited to 'www')
-rw-r--r--www/apache24/Makefile5
-rw-r--r--www/apache24/files/patch-mod_authn_socache.c41
2 files changed, 45 insertions, 1 deletions
diff --git a/www/apache24/Makefile b/www/apache24/Makefile
index 7c13afede7d3..b69eee48bb4d 100644
--- a/www/apache24/Makefile
+++ b/www/apache24/Makefile
@@ -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}
diff --git a/www/apache24/files/patch-mod_authn_socache.c b/www/apache24/files/patch-mod_authn_socache.c
new file mode 100644
index 000000000000..a0d6c2fbf1ec
--- /dev/null
+++ b/www/apache24/files/patch-mod_authn_socache.c
@@ -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) {