Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 8 Apr 2014 21:41:04 +0000 (UTC)
From:      Olli Hauer <ohauer@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r350647 - in head/www/apache24: . files
Message-ID:  <201404082141.s38Lf4Dk031194@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ohauer
Date: Tue Apr  8 21:41:03 2014
New Revision: 350647
URL: http://svnweb.freebsd.org/changeset/ports/350647
QAT: https://qat.redports.org/buildarchive/r350647/

Log:
  - 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

Added:
  head/www/apache24/files/patch-mod_authn_socache.c   (contents, props changed)
Modified:
  head/www/apache24/Makefile

Modified: head/www/apache24/Makefile
==============================================================================
--- head/www/apache24/Makefile	Tue Apr  8 21:05:09 2014	(r350646)
+++ head/www/apache24/Makefile	Tue Apr  8 21:41:03 2014	(r350647)
@@ -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=${LOCALBAS
 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}

Added: head/www/apache24/files/patch-mod_authn_socache.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/www/apache24/files/patch-mod_authn_socache.c	Tue Apr  8 21:41:03 2014	(r350647)
@@ -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) {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201404082141.s38Lf4Dk031194>