17327781 Upgrade ModSecurity to version 2.7.5 s11-update
authorPetr Sumbera <petr.sumbera@oracle.com>
Mon, 26 Aug 2013 06:44:25 -0700
branchs11-update
changeset 2743 8320b4eb4ca7
parent 2742 fbb36943b6b5
child 2745 c2e0dae26655
17327781 Upgrade ModSecurity to version 2.7.5 17173416 problem in UTILITY/APACHE 17184164 problem in UTILITY/APACHE
components/apache2-modules/mod_security2/Makefile
components/apache2-modules/mod_security2/apache-security.p5m
components/apache2-modules/mod_security2/patches/fix_lua.patch
--- a/components/apache2-modules/mod_security2/Makefile	Fri Aug 23 11:53:57 2013 -0700
+++ b/components/apache2-modules/mod_security2/Makefile	Mon Aug 26 06:44:25 2013 -0700
@@ -23,13 +23,13 @@
 include ../../../make-rules/shared-macros.mk
 
 COMPONENT_NAME=		mod_security2
-COMPONENT_VERSION=	2.7.2
+COMPONENT_VERSION=	2.7.5
 COMPONENT_PROJECT_URL=	http://www.modsecurity.org/
 COMPONENT_SRC_NAME=	modsecurity-apache
 COMPONENT_SRC=		$(COMPONENT_SRC_NAME)_$(COMPONENT_VERSION)
 COMPONENT_ARCHIVE=	$(COMPONENT_SRC).tar.gz
 COMPONENT_ARCHIVE_HASH=	\
-    sha256:2fa43264e3aa024d29869eada3171a2aba19fc05180860fd84c7a6ebfd1f2854
+    sha256:9e907536278d8da80d3dbb29aeffe9c4ec37ce9b641035b2da64e993135647a2
 COMPONENT_ARCHIVE_URL= \
     $(COMPONENT_PROJECT_URL)tarball/$(COMPONENT_VERSION)/$(COMPONENT_ARCHIVE)
 COMPONENT_BUGDB=	utility/apache
--- a/components/apache2-modules/mod_security2/apache-security.p5m	Fri Aug 23 11:53:57 2013 -0700
+++ b/components/apache2-modules/mod_security2/apache-security.p5m	Mon Aug 26 06:44:25 2013 -0700
@@ -27,7 +27,7 @@
 set name=pkg.description \
     value="Mod Security plugin for Apache Web Server Version 2.2"
 set name=com.oracle.info.description value="the Mod Security plugin for Apache Web Server V2.2"
-set name=com.oracle.info.tpno value=12876
+set name=com.oracle.info.tpno value=14454
 set name=info.classification \
     value="org.opensolaris.category.2008:Web Services/Application and Web Servers"
 set name=info.upstream-url value=$(COMPONENT_PROJECT_URL)
@@ -39,15 +39,6 @@
 
 license LICENSE license="Apache v2.0"
 
-dir path=etc
-dir path=etc/apache2
-dir path=etc/apache2/2.2
-dir path=etc/apache2/2.2/samples-conf.d
-dir path=usr
-dir path=usr/apache2
-dir path=usr/apache2/2.2
-dir path=usr/apache2/2.2/libexec
-dir path=usr/apache2/2.2/libexec/$(MACH64)
 file modsecurity.conf-recommended path=etc/apache2/2.2/samples-conf.d/security2.conf
 file build/$(MACH32)/apache2/.libs/mod_security2.so path=usr/apache2/2.2/libexec/mod_security2.so
 file build/$(MACH64)/apache2/.libs/mod_security2.so path=usr/apache2/2.2/libexec/$(MACH64)/mod_security2.so
--- a/components/apache2-modules/mod_security2/patches/fix_lua.patch	Fri Aug 23 11:53:57 2013 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,84 +0,0 @@
-https://github.com/SpiderLabs/ModSecurity/commit/452177c437cdefeb6e8b773b5865af356a1c9e2d.patch
-
-From 452177c437cdefeb6e8b773b5865af356a1c9e2d Mon Sep 17 00:00:00 2001
-From: Breno Silva <[email protected]>
-Date: Wed, 30 Jan 2013 22:04:21 -0400
-Subject: [PATCH] ModSecurity: fixed compiling with lua 5.2
-
----
- apache2/mod_security2.c |    4 ++++
- apache2/msc_lua.c       |   17 +++++++++++++++++
- 2 files changed, 21 insertions(+)
-
-diff --git a/apache2/mod_security2.c b/apache2/mod_security2.c
-index 6b41088..849ca9d 100644
---- a/apache2/mod_security2.c
-+++ b/apache2/mod_security2.c
-@@ -440,7 +440,11 @@ static modsec_rec *create_tx_context(request_rec *r) {
- 
- #if defined(WITH_LUA)
-     #ifdef CACHE_LUA
-+#if LUA_VERSION_NUM > 501
-+    msr->L = luaL_newstate();
-+#else
-     msr->L = lua_open();
-+#endif
-     luaL_openlibs(msr->L);
-     #endif
- #endif
-diff --git a/apache2/msc_lua.c b/apache2/msc_lua.c
-index 4abf7e5..6450e77 100644
---- a/apache2/msc_lua.c
-+++ b/apache2/msc_lua.c
-@@ -94,7 +94,11 @@ char *lua_compile(msc_script **script, const char *filename, apr_pool_t *pool) {
-     msc_lua_dumpw_t dump;
- 
-     /* Initialise state. */
-+#if LUA_VERSION_NUM > 501
-+    L = luaL_newstate();
-+#else
-     L = lua_open();
-+#endif
-     luaL_openlibs(L);
- 
-     /* Find script. */
-@@ -158,7 +162,11 @@ static apr_array_header_t *resolve_tfns(lua_State *L, int idx, modsec_rec *msr,
-     if (lua_isuserdata(L, idx) || lua_isnoneornil(L, idx)) { /* No second parameter */
-         return tfn_arr;
-     } else if (lua_istable(L, idx)) { /* Is the second parameter an array? */
-+#if LUA_VERSION_NUM > 501
-+        int i, n = lua_rawlen(L, idx);
-+#else
-         int i, n = lua_objlen(L, idx);
-+#endif
- 
-         for(i = 1; i <= n; i++) {
-             lua_rawgeti(L, idx, i);
-@@ -415,7 +423,11 @@ int lua_execute(msc_script *script, char *param, modsec_rec *msr, msre_rule *rul
-         lua_pop(L, rc);
- #else
-     /* Create new state. */
-+#if LUA_VERSION_NUM > 501
-+    L = luaL_newstate();
-+#else
-     L = lua_open();
-+#endif
-     luaL_openlibs(L);
- #endif
- 
-@@ -433,7 +445,12 @@ int lua_execute(msc_script *script, char *param, modsec_rec *msr, msre_rule *rul
-     }
- 
-     /* Register functions. */
-+#if LUA_VERSION_NUM > 501
-+    luaL_setfuncs(L,mylib,0);
-+    lua_setglobal(L,"m");
-+#else
-     luaL_register(L, "m", mylib);
-+#endif
- 
-     rc = lua_restore(L, script);
-     if (rc) {
--- 
-1.7.10
-