mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-08-13 13:26:01 +03:00
Second part of IIS/nginx merge into M2 trunk.
This commit is contained in:
parent
f3e31c75a4
commit
2dbe4ab4f0
79
Makefile.am
79
Makefile.am
@ -1,39 +1,40 @@
|
||||
ACLOCAL_AMFLAGS = -I build
|
||||
SUBDIRS = @TOPLEVEL_SUBDIRS@ tests
|
||||
|
||||
CLEANFILES =
|
||||
MAINTAINERCLEANFILES =
|
||||
|
||||
CLEANFILES += tests/regression/server_root/conf/*.t_*.conf \
|
||||
tests/regression/server_root/logs/*.log
|
||||
|
||||
MAINTAINERCLEANFILES += $(CLEANFILES) \
|
||||
Makefile.in \
|
||||
aclocal.m4 \
|
||||
alp2/Makefile.in \
|
||||
apache2/Makefile.in \
|
||||
build/config.guess \
|
||||
build/config.sub \
|
||||
build/depcomp \
|
||||
build/libtool.m4 \
|
||||
build/ltmain.sh \
|
||||
build/ltoptions.m4 \
|
||||
build/ltsugar.m4 \
|
||||
build/ltversion.m4 \
|
||||
build/lt~obsolete.m4 \
|
||||
build/missing \
|
||||
configure \
|
||||
ext/Makefile.in \
|
||||
mlogc/Makefile.in \
|
||||
modsecurity_config_auto.h.in~ \
|
||||
config.log \
|
||||
Makefile \
|
||||
config.status
|
||||
|
||||
# Alias for "check"
|
||||
test: check
|
||||
|
||||
test-regression:
|
||||
(cd tests && $(MAKE) test-regression)
|
||||
|
||||
.PHONY: test
|
||||
ACLOCAL_AMFLAGS = -I build
|
||||
SUBDIRS = @TOPLEVEL_SUBDIRS@ tests
|
||||
|
||||
CLEANFILES =
|
||||
MAINTAINERCLEANFILES =
|
||||
|
||||
CLEANFILES += tests/regression/server_root/conf/*.t_*.conf \
|
||||
tests/regression/server_root/logs/*.log
|
||||
|
||||
MAINTAINERCLEANFILES += $(CLEANFILES) \
|
||||
Makefile.in \
|
||||
aclocal.m4 \
|
||||
alp2/Makefile.in \
|
||||
apache2/Makefile.in \
|
||||
standalone/Makefile.in \
|
||||
build/config.guess \
|
||||
build/config.sub \
|
||||
build/depcomp \
|
||||
build/libtool.m4 \
|
||||
build/ltmain.sh \
|
||||
build/ltoptions.m4 \
|
||||
build/ltsugar.m4 \
|
||||
build/ltversion.m4 \
|
||||
build/lt~obsolete.m4 \
|
||||
build/missing \
|
||||
configure \
|
||||
ext/Makefile.in \
|
||||
mlogc/Makefile.in \
|
||||
modsecurity_config_auto.h.in~ \
|
||||
config.log \
|
||||
Makefile \
|
||||
config.status
|
||||
|
||||
# Alias for "check"
|
||||
test: check
|
||||
|
||||
test-regression:
|
||||
(cd tests && $(MAKE) test-regression)
|
||||
|
||||
.PHONY: test
|
||||
|
@ -21,7 +21,7 @@ CC = CL
|
||||
|
||||
MT = mt
|
||||
|
||||
DEFS = /nologo /O2 /LD /W3 /wd4244 /wd4018 -DWIN32 -DWINNT -Dinline=APR_INLINE
|
||||
DEFS = /nologo /O2 /LD /W3 /wd4244 /wd4018 -DWIN32 -DWINNT -Dinline=APR_INLINE -D$(VERSION)
|
||||
|
||||
DLL = mod_security2.so
|
||||
|
||||
|
@ -222,7 +222,7 @@ int perform_interception(modsec_rec *msr) {
|
||||
/* ENH This does not seem to work on Windows. Is there a
|
||||
* better way to drop a connection anyway?
|
||||
*/
|
||||
#ifndef WIN32
|
||||
#if !defined(WIN32) && defined(ALLOW_ACTION_DROP)
|
||||
{
|
||||
extern module core_module;
|
||||
apr_socket_t *csd = ap_get_module_config(msr->r->connection->conn_config,
|
||||
|
@ -49,7 +49,19 @@
|
||||
MODSEC_VERSION_SUFFIX
|
||||
|
||||
/* Apache Module Defines */
|
||||
#ifdef VERSION_IIS
|
||||
#define MODSEC_MODULE_NAME "ModSecurity for IIS"
|
||||
#else
|
||||
#ifdef VERSION_NGINX
|
||||
#define MODSEC_MODULE_NAME "ModSecurity for nginx"
|
||||
#else
|
||||
#ifdef VERSION_STANDALONE
|
||||
#define MODSEC_MODULE_NAME "ModSecurity Standalone"
|
||||
#else
|
||||
#define MODSEC_MODULE_NAME "ModSecurity for Apache"
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#define MODSEC_MODULE_VERSION MODSEC_VERSION
|
||||
#define MODSEC_MODULE_NAME_FULL MODSEC_MODULE_NAME "/" MODSEC_MODULE_VERSION " (http://www.modsecurity.org/)"
|
||||
|
||||
|
@ -30,8 +30,15 @@
|
||||
|
||||
#ifdef WIN32
|
||||
#include <ws2tcpip.h>
|
||||
// This is a trick: for ModSecurity modules this will declare inet_pton,
|
||||
// but for mymodule.cpp (IIS module) this will skip, because we include
|
||||
// windows.h before including msc_util.h
|
||||
// Without the trick we have redefinition conflict.
|
||||
//
|
||||
#if !(NTDDI_VERSION >= NTDDI_VISTA)
|
||||
int DSOLOCAL inet_pton(int family, const char *src, void *dst);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
char DSOLOCAL *m_strcasestr(const char *haystack, const char *needle);
|
||||
|
||||
|
@ -1209,7 +1209,7 @@ static apr_status_t msre_action_ctl_execute(modsec_rec *msr, apr_pool_t *mptmp,
|
||||
p2 = apr_strtok(NULL,";",&savedptr);
|
||||
|
||||
if (msr->txcfg->debuglog_level >= 4) {
|
||||
msr_log(msr, 4, "Ctl: ruleUpdateTargetById id=%s targets=%s", p1, p2);
|
||||
msr_log(msr, 4, "Ctl: ruleRemoveTargetById id=%s targets=%s", p1, p2);
|
||||
}
|
||||
re = apr_pcalloc(msr->mp, sizeof(rule_exception));
|
||||
re->type = RULE_EXCEPTION_REMOVE_ID;
|
||||
@ -1251,7 +1251,7 @@ static apr_status_t msre_action_ctl_execute(modsec_rec *msr, apr_pool_t *mptmp,
|
||||
p2 = apr_strtok(NULL,";",&savedptr);
|
||||
|
||||
if (msr->txcfg->debuglog_level >= 4) {
|
||||
msr_log(msr, 4, "Ctl: ruleUpdateTargetByMsg msg=%s targets=%s", p1, p2);
|
||||
msr_log(msr, 4, "Ctl: ruleRemoveTargetByMsg msg=%s targets=%s", p1, p2);
|
||||
}
|
||||
|
||||
re = apr_pcalloc(msr->mp, sizeof(rule_exception));
|
||||
|
23
configure.ac
23
configure.ac
@ -163,6 +163,26 @@ if test "$build_apache2_module" -eq 1; then
|
||||
fi
|
||||
|
||||
|
||||
# Standalone Module
|
||||
AC_ARG_ENABLE(standalone-module,
|
||||
AS_HELP_STRING([--disable-standalone-module],
|
||||
[Disable building standalone module.]),
|
||||
[
|
||||
if test "$enableval" != "no"; then
|
||||
build_standalone_module=1
|
||||
else
|
||||
build_standalone_module=0
|
||||
fi
|
||||
],
|
||||
[
|
||||
build_standalone_module=1
|
||||
])
|
||||
AM_CONDITIONAL([BUILD_STANDALONE_MODULE], [test "$build_standalone_module" -eq 1])
|
||||
if test "$build_standalone_module" -eq 1; then
|
||||
TOPLEVEL_SUBDIRS="$TOPLEVEL_SUBDIRS standalone"
|
||||
fi
|
||||
|
||||
|
||||
# Extensions
|
||||
AC_ARG_ENABLE(extentions,
|
||||
AS_HELP_STRING([--enable-extentions],
|
||||
@ -662,6 +682,9 @@ fi
|
||||
if test "$build_apache2_module" -ne 0; then
|
||||
AC_CONFIG_FILES([apache2/Makefile])
|
||||
fi
|
||||
if test "$build_standalone_module" -ne 0; then
|
||||
AC_CONFIG_FILES([standalone/Makefile])
|
||||
fi
|
||||
if test "$build_extentions" -ne 0; then
|
||||
AC_CONFIG_FILES([ext/Makefile])
|
||||
fi
|
||||
|
81
standalone/Makefile.am
Normal file
81
standalone/Makefile.am
Normal file
@ -0,0 +1,81 @@
|
||||
pkglibdir = $(prefix)/lib
|
||||
pkglib_LTLIBRARIES = standalone.la
|
||||
#include_HEADERS = re.h modsecurity.h msc_logging.h msc_multipart.h \
|
||||
# msc_parsers.h msc_pcre.h msc_util.h msc_xml.h \
|
||||
# persist_dbm.h apache2.h msc_geo.h acmp.h utf8tables.h \
|
||||
# msc_lua.h msc_release.h
|
||||
|
||||
standalone_la_SOURCES = ../apache2/mod_security2.c \
|
||||
../apache2/apache2_config.c ../apache2/apache2_io.c ../apache2/apache2_util.c \
|
||||
../apache2/re.c ../apache2/re_operators.c ../apache2/re_actions.c ../apache2/re_tfns.c \
|
||||
../apache2/re_variables.c ../apache2/msc_logging.c ../apache2/msc_xml.c \
|
||||
../apache2/msc_multipart.c ../apache2/modsecurity.c ../apache2/msc_parsers.c \
|
||||
../apache2/msc_util.c ../apache2/msc_pcre.c ../apache2/persist_dbm.c ../apache2/msc_reqbody.c \
|
||||
../apache2/msc_geo.c ../apache2/msc_gsb.c ../apache2/msc_unicode.c \
|
||||
../apache2/acmp.c ../apache2/msc_lua.c ../apache2/msc_release.c \
|
||||
../apache2/msc_crypt.c ../apache2/msc_tree.c \
|
||||
api.c buckets.c \
|
||||
config.c filters.c \
|
||||
hooks.c \
|
||||
regex.c server.c
|
||||
|
||||
standalone_la_CFLAGS = @APXS_CFLAGS@ @APR_CFLAGS@ @APU_CFLAGS@ \
|
||||
@PCRE_CFLAGS@ @LIBXML2_CFLAGS@ @LUA_CFLAGS@ @MODSEC_EXTRA_CFLAGS@ @CURL_CFLAGS@ -DVERSION_NGINX
|
||||
standalone_la_CPPFLAGS = @APR_CPPFLAGS@ @PCRE_CPPFLAGS@ @LIBXML2_CPPFLAGS@
|
||||
standalone_la_LIBADD = @APR_LDADD@ @APU_LDADD@ @PCRE_LDADD@ @LIBXML2_LDADD@ @LUA_LDADD@
|
||||
|
||||
if AIX
|
||||
standalone_la_LDFLAGS = -module -avoid-version \
|
||||
@APR_LDFLAGS@ @APU_LDFLAGS@ @APXS_LDFLAGS@ \
|
||||
@PCRE_LDFLAGS@ @LIBXML2_LDFLAGS@ @LUA_LDFLAGS@
|
||||
endif
|
||||
|
||||
if HPUX
|
||||
standalone_la_LDFLAGS = -module -avoid-version \
|
||||
@APR_LDFLAGS@ @APU_LDFLAGS@ @APXS_LDFLAGS@ \
|
||||
@PCRE_LDFLAGS@ @LIBXML2_LDFLAGS@ @LUA_LDFLAGS@
|
||||
endif
|
||||
|
||||
if MACOSX
|
||||
standalone_la_LDFLAGS = -module -avoid-version \
|
||||
@APR_LDFLAGS@ @APU_LDFLAGS@ @APXS_LDFLAGS@ \
|
||||
@PCRE_LDFLAGS@ @LIBXML2_LDFLAGS@ @LUA_LDFLAGS@
|
||||
endif
|
||||
|
||||
if SOLARIS
|
||||
standalone_la_LDFLAGS = -module -avoid-version \
|
||||
@APR_LDFLAGS@ @APU_LDFLAGS@ @APXS_LDFLAGS@ \
|
||||
@PCRE_LDFLAGS@ @LIBXML2_LDFLAGS@ @LUA_LDFLAGS@
|
||||
endif
|
||||
|
||||
if LINUX
|
||||
standalone_la_LDFLAGS = -no-undefined -module -avoid-version \
|
||||
@APR_LDFLAGS@ @APU_LDFLAGS@ @APXS_LDFLAGS@ \
|
||||
@PCRE_LDFLAGS@ @LIBXML2_LDFLAGS@ @LUA_LDFLAGS@
|
||||
endif
|
||||
|
||||
if FREEBSD
|
||||
standalone_la_LDFLAGS = -no-undefined -module -avoid-version \
|
||||
@APR_LDFLAGS@ @APU_LDFLAGS@ @APXS_LDFLAGS@ \
|
||||
@PCRE_LDFLAGS@ @LIBXML2_LDFLAGS@ @LUA_LDFLAGS@
|
||||
endif
|
||||
|
||||
if OPENBSD
|
||||
standalone_la_LDFLAGS = -no-undefined -module -avoid-version \
|
||||
@APR_LDFLAGS@ @APU_LDFLAGS@ @APXS_LDFLAGS@ \
|
||||
@PCRE_LDFLAGS@ @LIBXML2_LDFLAGS@ @LUA_LDFLAGS@
|
||||
endif
|
||||
|
||||
if NETBSD
|
||||
standalone_la_LDFLAGS = -no-undefined -module -avoid-version \
|
||||
@APR_LDFLAGS@ @APU_LDFLAGS@ @APXS_LDFLAGS@ \
|
||||
@PCRE_LDFLAGS@ @LIBXML2_LDFLAGS@ @LUA_LDFLAGS@
|
||||
endif
|
||||
|
||||
install-exec-hook: $(pkglib_LTLIBRARIES)
|
||||
@echo "Removing unused static libraries..."; \
|
||||
for m in $(pkglib_LTLIBRARIES); do \
|
||||
base=`echo $$m | sed 's/\..*//'`; \
|
||||
rm -f $(DESTDIR)$(pkglibdir)/$$base.*a; \
|
||||
cp -p $(DESTDIR)$(pkglibdir)/$$base.so $(APXS_MODULES); \
|
||||
done
|
933
standalone/Makefile.in
Normal file
933
standalone/Makefile.in
Normal file
@ -0,0 +1,933 @@
|
||||
# Makefile.in generated by automake 1.11.1 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
|
||||
# Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
|
||||
VPATH = @srcdir@
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
pkglibexecdir = $(libexecdir)/@PACKAGE@
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
subdir = standalone
|
||||
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/build/find_apr.m4 \
|
||||
$(top_srcdir)/build/find_apu.m4 \
|
||||
$(top_srcdir)/build/find_curl.m4 \
|
||||
$(top_srcdir)/build/find_lua.m4 \
|
||||
$(top_srcdir)/build/find_pcre.m4 \
|
||||
$(top_srcdir)/build/find_xml.m4 $(top_srcdir)/build/libtool.m4 \
|
||||
$(top_srcdir)/build/ltoptions.m4 \
|
||||
$(top_srcdir)/build/ltsugar.m4 \
|
||||
$(top_srcdir)/build/ltversion.m4 \
|
||||
$(top_srcdir)/build/lt~obsolete.m4 $(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
mkinstalldirs = $(install_sh) -d
|
||||
CONFIG_HEADER = $(top_builddir)/apache2/modsecurity_config_auto.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
CONFIG_CLEAN_VPATH_FILES =
|
||||
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
|
||||
am__vpath_adj = case $$p in \
|
||||
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
*) f=$$p;; \
|
||||
esac;
|
||||
am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
|
||||
am__install_max = 40
|
||||
am__nobase_strip_setup = \
|
||||
srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
|
||||
am__nobase_strip = \
|
||||
for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
|
||||
am__nobase_list = $(am__nobase_strip_setup); \
|
||||
for p in $$list; do echo "$$p $$p"; done | \
|
||||
sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
|
||||
$(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
|
||||
if (++n[$$2] == $(am__install_max)) \
|
||||
{ print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
|
||||
END { for (dir in files) print dir, files[dir] }'
|
||||
am__base_list = \
|
||||
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
|
||||
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
|
||||
am__installdirs = "$(DESTDIR)$(pkglibdir)"
|
||||
LTLIBRARIES = $(pkglib_LTLIBRARIES)
|
||||
standalone_la_DEPENDENCIES =
|
||||
am_standalone_la_OBJECTS = standalone_la-mod_security2.lo \
|
||||
standalone_la-apache2_config.lo standalone_la-apache2_io.lo \
|
||||
standalone_la-apache2_util.lo standalone_la-re.lo \
|
||||
standalone_la-re_operators.lo standalone_la-re_actions.lo \
|
||||
standalone_la-re_tfns.lo standalone_la-re_variables.lo \
|
||||
standalone_la-msc_logging.lo standalone_la-msc_xml.lo \
|
||||
standalone_la-msc_multipart.lo standalone_la-modsecurity.lo \
|
||||
standalone_la-msc_parsers.lo standalone_la-msc_util.lo \
|
||||
standalone_la-msc_pcre.lo standalone_la-persist_dbm.lo \
|
||||
standalone_la-msc_reqbody.lo standalone_la-msc_geo.lo \
|
||||
standalone_la-msc_gsb.lo standalone_la-msc_unicode.lo \
|
||||
standalone_la-acmp.lo standalone_la-msc_lua.lo \
|
||||
standalone_la-msc_release.lo standalone_la-msc_crypt.lo \
|
||||
standalone_la-msc_tree.lo standalone_la-api.lo \
|
||||
standalone_la-buckets.lo standalone_la-config.lo \
|
||||
standalone_la-filters.lo standalone_la-hooks.lo \
|
||||
standalone_la-regex.lo standalone_la-server.lo
|
||||
standalone_la_OBJECTS = $(am_standalone_la_OBJECTS)
|
||||
standalone_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
|
||||
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(standalone_la_CFLAGS) \
|
||||
$(CFLAGS) $(standalone_la_LDFLAGS) $(LDFLAGS) -o $@
|
||||
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/apache2
|
||||
depcomp = $(SHELL) $(top_srcdir)/build/depcomp
|
||||
am__depfiles_maybe = depfiles
|
||||
am__mv = mv -f
|
||||
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
|
||||
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
|
||||
--mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
|
||||
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
CCLD = $(CC)
|
||||
LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
|
||||
--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
|
||||
$(LDFLAGS) -o $@
|
||||
SOURCES = $(standalone_la_SOURCES)
|
||||
DIST_SOURCES = $(standalone_la_SOURCES)
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
pkglibdir = $(prefix)/lib
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AMTAR = @AMTAR@
|
||||
APR_CFLAGS = @APR_CFLAGS@
|
||||
APR_CONFIG = @APR_CONFIG@
|
||||
APR_CPPFLAGS = @APR_CPPFLAGS@
|
||||
APR_LDADD = @APR_LDADD@
|
||||
APR_LDFLAGS = @APR_LDFLAGS@
|
||||
APR_VERSION = @APR_VERSION@
|
||||
APU_CFLAGS = @APU_CFLAGS@
|
||||
APU_CONFIG = @APU_CONFIG@
|
||||
APU_LDADD = @APU_LDADD@
|
||||
APU_LDFLAGS = @APU_LDFLAGS@
|
||||
APU_VERSION = @APU_VERSION@
|
||||
APXS = @APXS@
|
||||
APXS_BINDIR = @APXS_BINDIR@
|
||||
APXS_CC = @APXS_CC@
|
||||
APXS_CFLAGS = @APXS_CFLAGS@
|
||||
APXS_EXTRA_CFLAGS = @APXS_EXTRA_CFLAGS@
|
||||
APXS_HTTPD = @APXS_HTTPD@
|
||||
APXS_INCLUDEDIR = @APXS_INCLUDEDIR@
|
||||
APXS_INCLUDES = @APXS_INCLUDES@
|
||||
APXS_LDFLAGS = @APXS_LDFLAGS@
|
||||
APXS_LIBDIR = @APXS_LIBDIR@
|
||||
APXS_LIBEXECDIR = @APXS_LIBEXECDIR@
|
||||
APXS_LIBS = @APXS_LIBS@
|
||||
APXS_LIBTOOL = @APXS_LIBTOOL@
|
||||
APXS_MODULES = @APXS_MODULES@
|
||||
APXS_PROGNAME = @APXS_PROGNAME@
|
||||
APXS_SBINDIR = @APXS_SBINDIR@
|
||||
APXS_WRAPPER = @APXS_WRAPPER@
|
||||
AR = @AR@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CURL_CFLAGS = @CURL_CFLAGS@
|
||||
CURL_CONFIG = @CURL_CONFIG@
|
||||
CURL_CPPFLAGS = @CURL_CPPFLAGS@
|
||||
CURL_LDADD = @CURL_LDADD@
|
||||
CURL_LDFLAGS = @CURL_LDFLAGS@
|
||||
CURL_USES_GNUTLS = @CURL_USES_GNUTLS@
|
||||
CURL_VERSION = @CURL_VERSION@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
DSYMUTIL = @DSYMUTIL@
|
||||
DUMPBIN = @DUMPBIN@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
ENV_CMD = @ENV_CMD@
|
||||
EXEEXT = @EXEEXT@
|
||||
EXTRA_CFLAGS = @EXTRA_CFLAGS@
|
||||
FGREP = @FGREP@
|
||||
GREP = @GREP@
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LD = @LD@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LIBXML2_CFLAGS = @LIBXML2_CFLAGS@
|
||||
LIBXML2_CONFIG = @LIBXML2_CONFIG@
|
||||
LIBXML2_CPPFLAGS = @LIBXML2_CPPFLAGS@
|
||||
LIBXML2_LDADD = @LIBXML2_LDADD@
|
||||
LIBXML2_LDFLAGS = @LIBXML2_LDFLAGS@
|
||||
LIBXML2_VERSION = @LIBXML2_VERSION@
|
||||
LIPO = @LIPO@
|
||||
LN_S = @LN_S@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
LUA_CFLAGS = @LUA_CFLAGS@
|
||||
LUA_LDADD = @LUA_LDADD@
|
||||
LUA_LDFLAGS = @LUA_LDFLAGS@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MKDIR_P = @MKDIR_P@
|
||||
MODSEC_APXS_EXTRA_CFLAGS = @MODSEC_APXS_EXTRA_CFLAGS@
|
||||
MODSEC_EXTRA_CFLAGS = @MODSEC_EXTRA_CFLAGS@
|
||||
MSC_BASE_DIR = @MSC_BASE_DIR@
|
||||
MSC_PKGBASE_DIR = @MSC_PKGBASE_DIR@
|
||||
MSC_REGRESSION_CONF_DIR = @MSC_REGRESSION_CONF_DIR@
|
||||
MSC_REGRESSION_DIR = @MSC_REGRESSION_DIR@
|
||||
MSC_REGRESSION_DOCROOT_DIR = @MSC_REGRESSION_DOCROOT_DIR@
|
||||
MSC_REGRESSION_LOGS_DIR = @MSC_REGRESSION_LOGS_DIR@
|
||||
MSC_REGRESSION_SERVERROOT_DIR = @MSC_REGRESSION_SERVERROOT_DIR@
|
||||
MSC_TEST_DIR = @MSC_TEST_DIR@
|
||||
NM = @NM@
|
||||
NMEDIT = @NMEDIT@
|
||||
OBJDUMP = @OBJDUMP@
|
||||
OBJEXT = @OBJEXT@
|
||||
OTOOL = @OTOOL@
|
||||
OTOOL64 = @OTOOL64@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_URL = @PACKAGE_URL@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
PCRE_CFLAGS = @PCRE_CFLAGS@
|
||||
PCRE_CONFIG = @PCRE_CONFIG@
|
||||
PCRE_CPPFLAGS = @PCRE_CPPFLAGS@
|
||||
PCRE_LDADD = @PCRE_LDADD@
|
||||
PCRE_LDFLAGS = @PCRE_LDFLAGS@
|
||||
PCRE_VERSION = @PCRE_VERSION@
|
||||
PERL = @PERL@
|
||||
PKG_CONFIG = @PKG_CONFIG@
|
||||
PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
|
||||
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
|
||||
RANLIB = @RANLIB@
|
||||
SED = @SED@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
TOPLEVEL_SUBDIRS = @TOPLEVEL_SUBDIRS@
|
||||
VERSION = @VERSION@
|
||||
abs_builddir = @abs_builddir@
|
||||
abs_srcdir = @abs_srcdir@
|
||||
abs_top_builddir = @abs_top_builddir@
|
||||
abs_top_srcdir = @abs_top_srcdir@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
builddir = @builddir@
|
||||
datadir = @datadir@
|
||||
datarootdir = @datarootdir@
|
||||
docdir = @docdir@
|
||||
dvidir = @dvidir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
htmldir = @htmldir@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localedir = @localedir@
|
||||
localstatedir = @localstatedir@
|
||||
lt_ECHO = @lt_ECHO@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
pdfdir = @pdfdir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
srcdir = @srcdir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target_alias = @target_alias@
|
||||
top_build_prefix = @top_build_prefix@
|
||||
top_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
pkglib_LTLIBRARIES = standalone.la
|
||||
#include_HEADERS = re.h modsecurity.h msc_logging.h msc_multipart.h \
|
||||
# msc_parsers.h msc_pcre.h msc_util.h msc_xml.h \
|
||||
# persist_dbm.h apache2.h msc_geo.h acmp.h utf8tables.h \
|
||||
# msc_lua.h msc_release.h
|
||||
standalone_la_SOURCES = ../apache2/mod_security2.c \
|
||||
../apache2/apache2_config.c ../apache2/apache2_io.c ../apache2/apache2_util.c \
|
||||
../apache2/re.c ../apache2/re_operators.c ../apache2/re_actions.c ../apache2/re_tfns.c \
|
||||
../apache2/re_variables.c ../apache2/msc_logging.c ../apache2/msc_xml.c \
|
||||
../apache2/msc_multipart.c ../apache2/modsecurity.c ../apache2/msc_parsers.c \
|
||||
../apache2/msc_util.c ../apache2/msc_pcre.c ../apache2/persist_dbm.c ../apache2/msc_reqbody.c \
|
||||
../apache2/msc_geo.c ../apache2/msc_gsb.c ../apache2/msc_unicode.c \
|
||||
../apache2/acmp.c ../apache2/msc_lua.c ../apache2/msc_release.c \
|
||||
../apache2/msc_crypt.c ../apache2/msc_tree.c \
|
||||
api.c buckets.c \
|
||||
config.c filters.c \
|
||||
hooks.c \
|
||||
regex.c server.c
|
||||
|
||||
standalone_la_CFLAGS = @APXS_CFLAGS@ @APR_CFLAGS@ @APU_CFLAGS@ \
|
||||
@PCRE_CFLAGS@ @LIBXML2_CFLAGS@ @LUA_CFLAGS@ @MODSEC_EXTRA_CFLAGS@ @CURL_CFLAGS@ -DVERSION_NGINX
|
||||
|
||||
standalone_la_CPPFLAGS = @APR_CPPFLAGS@ @PCRE_CPPFLAGS@ @LIBXML2_CPPFLAGS@
|
||||
standalone_la_LIBADD = @APR_LDADD@ @APU_LDADD@ @PCRE_LDADD@ @LIBXML2_LDADD@ @LUA_LDADD@
|
||||
@AIX_TRUE@standalone_la_LDFLAGS = -module -avoid-version \
|
||||
@AIX_TRUE@ @APR_LDFLAGS@ @APU_LDFLAGS@ @APXS_LDFLAGS@ \
|
||||
@AIX_TRUE@ @PCRE_LDFLAGS@ @LIBXML2_LDFLAGS@ @LUA_LDFLAGS@
|
||||
|
||||
@FREEBSD_TRUE@standalone_la_LDFLAGS = -no-undefined -module -avoid-version \
|
||||
@FREEBSD_TRUE@ @APR_LDFLAGS@ @APU_LDFLAGS@ @APXS_LDFLAGS@ \
|
||||
@FREEBSD_TRUE@ @PCRE_LDFLAGS@ @LIBXML2_LDFLAGS@ @LUA_LDFLAGS@
|
||||
|
||||
@HPUX_TRUE@standalone_la_LDFLAGS = -module -avoid-version \
|
||||
@HPUX_TRUE@ @APR_LDFLAGS@ @APU_LDFLAGS@ @APXS_LDFLAGS@ \
|
||||
@HPUX_TRUE@ @PCRE_LDFLAGS@ @LIBXML2_LDFLAGS@ @LUA_LDFLAGS@
|
||||
|
||||
@LINUX_TRUE@standalone_la_LDFLAGS = -no-undefined -module -avoid-version \
|
||||
@LINUX_TRUE@ @APR_LDFLAGS@ @APU_LDFLAGS@ @APXS_LDFLAGS@ \
|
||||
@LINUX_TRUE@ @PCRE_LDFLAGS@ @LIBXML2_LDFLAGS@ @LUA_LDFLAGS@
|
||||
|
||||
@MACOSX_TRUE@standalone_la_LDFLAGS = -module -avoid-version \
|
||||
@MACOSX_TRUE@ @APR_LDFLAGS@ @APU_LDFLAGS@ @APXS_LDFLAGS@ \
|
||||
@MACOSX_TRUE@ @PCRE_LDFLAGS@ @LIBXML2_LDFLAGS@ @LUA_LDFLAGS@
|
||||
|
||||
@NETBSD_TRUE@standalone_la_LDFLAGS = -no-undefined -module -avoid-version \
|
||||
@NETBSD_TRUE@ @APR_LDFLAGS@ @APU_LDFLAGS@ @APXS_LDFLAGS@ \
|
||||
@NETBSD_TRUE@ @PCRE_LDFLAGS@ @LIBXML2_LDFLAGS@ @LUA_LDFLAGS@
|
||||
|
||||
@OPENBSD_TRUE@standalone_la_LDFLAGS = -no-undefined -module -avoid-version \
|
||||
@OPENBSD_TRUE@ @APR_LDFLAGS@ @APU_LDFLAGS@ @APXS_LDFLAGS@ \
|
||||
@OPENBSD_TRUE@ @PCRE_LDFLAGS@ @LIBXML2_LDFLAGS@ @LUA_LDFLAGS@
|
||||
|
||||
@SOLARIS_TRUE@standalone_la_LDFLAGS = -module -avoid-version \
|
||||
@SOLARIS_TRUE@ @APR_LDFLAGS@ @APU_LDFLAGS@ @APXS_LDFLAGS@ \
|
||||
@SOLARIS_TRUE@ @PCRE_LDFLAGS@ @LIBXML2_LDFLAGS@ @LUA_LDFLAGS@
|
||||
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .c .lo .o .obj
|
||||
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
|
||||
&& { if test -f $@; then exit 0; else break; fi; }; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign standalone/Makefile'; \
|
||||
$(am__cd) $(top_srcdir) && \
|
||||
$(AUTOMAKE) --foreign standalone/Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
$(top_srcdir)/configure: $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(am__aclocal_m4_deps):
|
||||
install-pkglibLTLIBRARIES: $(pkglib_LTLIBRARIES)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(pkglibdir)" || $(MKDIR_P) "$(DESTDIR)$(pkglibdir)"
|
||||
@list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \
|
||||
list2=; for p in $$list; do \
|
||||
if test -f $$p; then \
|
||||
list2="$$list2 $$p"; \
|
||||
else :; fi; \
|
||||
done; \
|
||||
test -z "$$list2" || { \
|
||||
echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkglibdir)'"; \
|
||||
$(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkglibdir)"; \
|
||||
}
|
||||
|
||||
uninstall-pkglibLTLIBRARIES:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \
|
||||
for p in $$list; do \
|
||||
$(am__strip_dir) \
|
||||
echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkglibdir)/$$f'"; \
|
||||
$(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkglibdir)/$$f"; \
|
||||
done
|
||||
|
||||
clean-pkglibLTLIBRARIES:
|
||||
-test -z "$(pkglib_LTLIBRARIES)" || rm -f $(pkglib_LTLIBRARIES)
|
||||
@list='$(pkglib_LTLIBRARIES)'; for p in $$list; do \
|
||||
dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
|
||||
test "$$dir" != "$$p" || dir=.; \
|
||||
echo "rm -f \"$${dir}/so_locations\""; \
|
||||
rm -f "$${dir}/so_locations"; \
|
||||
done
|
||||
standalone.la: $(standalone_la_OBJECTS) $(standalone_la_DEPENDENCIES)
|
||||
$(standalone_la_LINK) -rpath $(pkglibdir) $(standalone_la_OBJECTS) $(standalone_la_LIBADD) $(LIBS)
|
||||
|
||||
mostlyclean-compile:
|
||||
-rm -f *.$(OBJEXT)
|
||||
|
||||
distclean-compile:
|
||||
-rm -f *.tab.c
|
||||
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/standalone_la-acmp.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/standalone_la-apache2_config.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/standalone_la-apache2_io.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/standalone_la-apache2_util.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/standalone_la-api.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/standalone_la-buckets.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/standalone_la-config.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/standalone_la-filters.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/standalone_la-hooks.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/standalone_la-mod_security2.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/standalone_la-modsecurity.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/standalone_la-msc_crypt.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/standalone_la-msc_geo.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/standalone_la-msc_gsb.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/standalone_la-msc_logging.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/standalone_la-msc_lua.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/standalone_la-msc_multipart.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/standalone_la-msc_parsers.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/standalone_la-msc_pcre.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/standalone_la-msc_release.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/standalone_la-msc_reqbody.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/standalone_la-msc_tree.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/standalone_la-msc_unicode.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/standalone_la-msc_util.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/standalone_la-msc_xml.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/standalone_la-persist_dbm.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/standalone_la-re.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/standalone_la-re_actions.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/standalone_la-re_operators.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/standalone_la-re_tfns.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/standalone_la-re_variables.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/standalone_la-regex.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/standalone_la-server.Plo@am__quote@
|
||||
|
||||
.c.o:
|
||||
@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
|
||||
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(COMPILE) -c $<
|
||||
|
||||
.c.obj:
|
||||
@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
|
||||
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
|
||||
|
||||
.c.lo:
|
||||
@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
|
||||
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
|
||||
|
||||
standalone_la-mod_security2.lo: ../apache2/mod_security2.c
|
||||
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(standalone_la_CPPFLAGS) $(CPPFLAGS) $(standalone_la_CFLAGS) $(CFLAGS) -MT standalone_la-mod_security2.lo -MD -MP -MF $(DEPDIR)/standalone_la-mod_security2.Tpo -c -o standalone_la-mod_security2.lo `test -f '../apache2/mod_security2.c' || echo '$(srcdir)/'`../apache2/mod_security2.c
|
||||
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/standalone_la-mod_security2.Tpo $(DEPDIR)/standalone_la-mod_security2.Plo
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../apache2/mod_security2.c' object='standalone_la-mod_security2.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(standalone_la_CPPFLAGS) $(CPPFLAGS) $(standalone_la_CFLAGS) $(CFLAGS) -c -o standalone_la-mod_security2.lo `test -f '../apache2/mod_security2.c' || echo '$(srcdir)/'`../apache2/mod_security2.c
|
||||
|
||||
standalone_la-apache2_config.lo: ../apache2/apache2_config.c
|
||||
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(standalone_la_CPPFLAGS) $(CPPFLAGS) $(standalone_la_CFLAGS) $(CFLAGS) -MT standalone_la-apache2_config.lo -MD -MP -MF $(DEPDIR)/standalone_la-apache2_config.Tpo -c -o standalone_la-apache2_config.lo `test -f '../apache2/apache2_config.c' || echo '$(srcdir)/'`../apache2/apache2_config.c
|
||||
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/standalone_la-apache2_config.Tpo $(DEPDIR)/standalone_la-apache2_config.Plo
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../apache2/apache2_config.c' object='standalone_la-apache2_config.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(standalone_la_CPPFLAGS) $(CPPFLAGS) $(standalone_la_CFLAGS) $(CFLAGS) -c -o standalone_la-apache2_config.lo `test -f '../apache2/apache2_config.c' || echo '$(srcdir)/'`../apache2/apache2_config.c
|
||||
|
||||
standalone_la-apache2_io.lo: ../apache2/apache2_io.c
|
||||
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(standalone_la_CPPFLAGS) $(CPPFLAGS) $(standalone_la_CFLAGS) $(CFLAGS) -MT standalone_la-apache2_io.lo -MD -MP -MF $(DEPDIR)/standalone_la-apache2_io.Tpo -c -o standalone_la-apache2_io.lo `test -f '../apache2/apache2_io.c' || echo '$(srcdir)/'`../apache2/apache2_io.c
|
||||
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/standalone_la-apache2_io.Tpo $(DEPDIR)/standalone_la-apache2_io.Plo
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../apache2/apache2_io.c' object='standalone_la-apache2_io.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(standalone_la_CPPFLAGS) $(CPPFLAGS) $(standalone_la_CFLAGS) $(CFLAGS) -c -o standalone_la-apache2_io.lo `test -f '../apache2/apache2_io.c' || echo '$(srcdir)/'`../apache2/apache2_io.c
|
||||
|
||||
standalone_la-apache2_util.lo: ../apache2/apache2_util.c
|
||||
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(standalone_la_CPPFLAGS) $(CPPFLAGS) $(standalone_la_CFLAGS) $(CFLAGS) -MT standalone_la-apache2_util.lo -MD -MP -MF $(DEPDIR)/standalone_la-apache2_util.Tpo -c -o standalone_la-apache2_util.lo `test -f '../apache2/apache2_util.c' || echo '$(srcdir)/'`../apache2/apache2_util.c
|
||||
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/standalone_la-apache2_util.Tpo $(DEPDIR)/standalone_la-apache2_util.Plo
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../apache2/apache2_util.c' object='standalone_la-apache2_util.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(standalone_la_CPPFLAGS) $(CPPFLAGS) $(standalone_la_CFLAGS) $(CFLAGS) -c -o standalone_la-apache2_util.lo `test -f '../apache2/apache2_util.c' || echo '$(srcdir)/'`../apache2/apache2_util.c
|
||||
|
||||
standalone_la-re.lo: ../apache2/re.c
|
||||
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(standalone_la_CPPFLAGS) $(CPPFLAGS) $(standalone_la_CFLAGS) $(CFLAGS) -MT standalone_la-re.lo -MD -MP -MF $(DEPDIR)/standalone_la-re.Tpo -c -o standalone_la-re.lo `test -f '../apache2/re.c' || echo '$(srcdir)/'`../apache2/re.c
|
||||
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/standalone_la-re.Tpo $(DEPDIR)/standalone_la-re.Plo
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../apache2/re.c' object='standalone_la-re.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(standalone_la_CPPFLAGS) $(CPPFLAGS) $(standalone_la_CFLAGS) $(CFLAGS) -c -o standalone_la-re.lo `test -f '../apache2/re.c' || echo '$(srcdir)/'`../apache2/re.c
|
||||
|
||||
standalone_la-re_operators.lo: ../apache2/re_operators.c
|
||||
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(standalone_la_CPPFLAGS) $(CPPFLAGS) $(standalone_la_CFLAGS) $(CFLAGS) -MT standalone_la-re_operators.lo -MD -MP -MF $(DEPDIR)/standalone_la-re_operators.Tpo -c -o standalone_la-re_operators.lo `test -f '../apache2/re_operators.c' || echo '$(srcdir)/'`../apache2/re_operators.c
|
||||
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/standalone_la-re_operators.Tpo $(DEPDIR)/standalone_la-re_operators.Plo
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../apache2/re_operators.c' object='standalone_la-re_operators.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(standalone_la_CPPFLAGS) $(CPPFLAGS) $(standalone_la_CFLAGS) $(CFLAGS) -c -o standalone_la-re_operators.lo `test -f '../apache2/re_operators.c' || echo '$(srcdir)/'`../apache2/re_operators.c
|
||||
|
||||
standalone_la-re_actions.lo: ../apache2/re_actions.c
|
||||
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(standalone_la_CPPFLAGS) $(CPPFLAGS) $(standalone_la_CFLAGS) $(CFLAGS) -MT standalone_la-re_actions.lo -MD -MP -MF $(DEPDIR)/standalone_la-re_actions.Tpo -c -o standalone_la-re_actions.lo `test -f '../apache2/re_actions.c' || echo '$(srcdir)/'`../apache2/re_actions.c
|
||||
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/standalone_la-re_actions.Tpo $(DEPDIR)/standalone_la-re_actions.Plo
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../apache2/re_actions.c' object='standalone_la-re_actions.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(standalone_la_CPPFLAGS) $(CPPFLAGS) $(standalone_la_CFLAGS) $(CFLAGS) -c -o standalone_la-re_actions.lo `test -f '../apache2/re_actions.c' || echo '$(srcdir)/'`../apache2/re_actions.c
|
||||
|
||||
standalone_la-re_tfns.lo: ../apache2/re_tfns.c
|
||||
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(standalone_la_CPPFLAGS) $(CPPFLAGS) $(standalone_la_CFLAGS) $(CFLAGS) -MT standalone_la-re_tfns.lo -MD -MP -MF $(DEPDIR)/standalone_la-re_tfns.Tpo -c -o standalone_la-re_tfns.lo `test -f '../apache2/re_tfns.c' || echo '$(srcdir)/'`../apache2/re_tfns.c
|
||||
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/standalone_la-re_tfns.Tpo $(DEPDIR)/standalone_la-re_tfns.Plo
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../apache2/re_tfns.c' object='standalone_la-re_tfns.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(standalone_la_CPPFLAGS) $(CPPFLAGS) $(standalone_la_CFLAGS) $(CFLAGS) -c -o standalone_la-re_tfns.lo `test -f '../apache2/re_tfns.c' || echo '$(srcdir)/'`../apache2/re_tfns.c
|
||||
|
||||
standalone_la-re_variables.lo: ../apache2/re_variables.c
|
||||
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(standalone_la_CPPFLAGS) $(CPPFLAGS) $(standalone_la_CFLAGS) $(CFLAGS) -MT standalone_la-re_variables.lo -MD -MP -MF $(DEPDIR)/standalone_la-re_variables.Tpo -c -o standalone_la-re_variables.lo `test -f '../apache2/re_variables.c' || echo '$(srcdir)/'`../apache2/re_variables.c
|
||||
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/standalone_la-re_variables.Tpo $(DEPDIR)/standalone_la-re_variables.Plo
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../apache2/re_variables.c' object='standalone_la-re_variables.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(standalone_la_CPPFLAGS) $(CPPFLAGS) $(standalone_la_CFLAGS) $(CFLAGS) -c -o standalone_la-re_variables.lo `test -f '../apache2/re_variables.c' || echo '$(srcdir)/'`../apache2/re_variables.c
|
||||
|
||||
standalone_la-msc_logging.lo: ../apache2/msc_logging.c
|
||||
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(standalone_la_CPPFLAGS) $(CPPFLAGS) $(standalone_la_CFLAGS) $(CFLAGS) -MT standalone_la-msc_logging.lo -MD -MP -MF $(DEPDIR)/standalone_la-msc_logging.Tpo -c -o standalone_la-msc_logging.lo `test -f '../apache2/msc_logging.c' || echo '$(srcdir)/'`../apache2/msc_logging.c
|
||||
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/standalone_la-msc_logging.Tpo $(DEPDIR)/standalone_la-msc_logging.Plo
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../apache2/msc_logging.c' object='standalone_la-msc_logging.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(standalone_la_CPPFLAGS) $(CPPFLAGS) $(standalone_la_CFLAGS) $(CFLAGS) -c -o standalone_la-msc_logging.lo `test -f '../apache2/msc_logging.c' || echo '$(srcdir)/'`../apache2/msc_logging.c
|
||||
|
||||
standalone_la-msc_xml.lo: ../apache2/msc_xml.c
|
||||
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(standalone_la_CPPFLAGS) $(CPPFLAGS) $(standalone_la_CFLAGS) $(CFLAGS) -MT standalone_la-msc_xml.lo -MD -MP -MF $(DEPDIR)/standalone_la-msc_xml.Tpo -c -o standalone_la-msc_xml.lo `test -f '../apache2/msc_xml.c' || echo '$(srcdir)/'`../apache2/msc_xml.c
|
||||
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/standalone_la-msc_xml.Tpo $(DEPDIR)/standalone_la-msc_xml.Plo
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../apache2/msc_xml.c' object='standalone_la-msc_xml.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(standalone_la_CPPFLAGS) $(CPPFLAGS) $(standalone_la_CFLAGS) $(CFLAGS) -c -o standalone_la-msc_xml.lo `test -f '../apache2/msc_xml.c' || echo '$(srcdir)/'`../apache2/msc_xml.c
|
||||
|
||||
standalone_la-msc_multipart.lo: ../apache2/msc_multipart.c
|
||||
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(standalone_la_CPPFLAGS) $(CPPFLAGS) $(standalone_la_CFLAGS) $(CFLAGS) -MT standalone_la-msc_multipart.lo -MD -MP -MF $(DEPDIR)/standalone_la-msc_multipart.Tpo -c -o standalone_la-msc_multipart.lo `test -f '../apache2/msc_multipart.c' || echo '$(srcdir)/'`../apache2/msc_multipart.c
|
||||
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/standalone_la-msc_multipart.Tpo $(DEPDIR)/standalone_la-msc_multipart.Plo
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../apache2/msc_multipart.c' object='standalone_la-msc_multipart.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(standalone_la_CPPFLAGS) $(CPPFLAGS) $(standalone_la_CFLAGS) $(CFLAGS) -c -o standalone_la-msc_multipart.lo `test -f '../apache2/msc_multipart.c' || echo '$(srcdir)/'`../apache2/msc_multipart.c
|
||||
|
||||
standalone_la-modsecurity.lo: ../apache2/modsecurity.c
|
||||
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(standalone_la_CPPFLAGS) $(CPPFLAGS) $(standalone_la_CFLAGS) $(CFLAGS) -MT standalone_la-modsecurity.lo -MD -MP -MF $(DEPDIR)/standalone_la-modsecurity.Tpo -c -o standalone_la-modsecurity.lo `test -f '../apache2/modsecurity.c' || echo '$(srcdir)/'`../apache2/modsecurity.c
|
||||
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/standalone_la-modsecurity.Tpo $(DEPDIR)/standalone_la-modsecurity.Plo
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../apache2/modsecurity.c' object='standalone_la-modsecurity.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(standalone_la_CPPFLAGS) $(CPPFLAGS) $(standalone_la_CFLAGS) $(CFLAGS) -c -o standalone_la-modsecurity.lo `test -f '../apache2/modsecurity.c' || echo '$(srcdir)/'`../apache2/modsecurity.c
|
||||
|
||||
standalone_la-msc_parsers.lo: ../apache2/msc_parsers.c
|
||||
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(standalone_la_CPPFLAGS) $(CPPFLAGS) $(standalone_la_CFLAGS) $(CFLAGS) -MT standalone_la-msc_parsers.lo -MD -MP -MF $(DEPDIR)/standalone_la-msc_parsers.Tpo -c -o standalone_la-msc_parsers.lo `test -f '../apache2/msc_parsers.c' || echo '$(srcdir)/'`../apache2/msc_parsers.c
|
||||
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/standalone_la-msc_parsers.Tpo $(DEPDIR)/standalone_la-msc_parsers.Plo
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../apache2/msc_parsers.c' object='standalone_la-msc_parsers.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(standalone_la_CPPFLAGS) $(CPPFLAGS) $(standalone_la_CFLAGS) $(CFLAGS) -c -o standalone_la-msc_parsers.lo `test -f '../apache2/msc_parsers.c' || echo '$(srcdir)/'`../apache2/msc_parsers.c
|
||||
|
||||
standalone_la-msc_util.lo: ../apache2/msc_util.c
|
||||
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(standalone_la_CPPFLAGS) $(CPPFLAGS) $(standalone_la_CFLAGS) $(CFLAGS) -MT standalone_la-msc_util.lo -MD -MP -MF $(DEPDIR)/standalone_la-msc_util.Tpo -c -o standalone_la-msc_util.lo `test -f '../apache2/msc_util.c' || echo '$(srcdir)/'`../apache2/msc_util.c
|
||||
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/standalone_la-msc_util.Tpo $(DEPDIR)/standalone_la-msc_util.Plo
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../apache2/msc_util.c' object='standalone_la-msc_util.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(standalone_la_CPPFLAGS) $(CPPFLAGS) $(standalone_la_CFLAGS) $(CFLAGS) -c -o standalone_la-msc_util.lo `test -f '../apache2/msc_util.c' || echo '$(srcdir)/'`../apache2/msc_util.c
|
||||
|
||||
standalone_la-msc_pcre.lo: ../apache2/msc_pcre.c
|
||||
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(standalone_la_CPPFLAGS) $(CPPFLAGS) $(standalone_la_CFLAGS) $(CFLAGS) -MT standalone_la-msc_pcre.lo -MD -MP -MF $(DEPDIR)/standalone_la-msc_pcre.Tpo -c -o standalone_la-msc_pcre.lo `test -f '../apache2/msc_pcre.c' || echo '$(srcdir)/'`../apache2/msc_pcre.c
|
||||
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/standalone_la-msc_pcre.Tpo $(DEPDIR)/standalone_la-msc_pcre.Plo
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../apache2/msc_pcre.c' object='standalone_la-msc_pcre.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(standalone_la_CPPFLAGS) $(CPPFLAGS) $(standalone_la_CFLAGS) $(CFLAGS) -c -o standalone_la-msc_pcre.lo `test -f '../apache2/msc_pcre.c' || echo '$(srcdir)/'`../apache2/msc_pcre.c
|
||||
|
||||
standalone_la-persist_dbm.lo: ../apache2/persist_dbm.c
|
||||
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(standalone_la_CPPFLAGS) $(CPPFLAGS) $(standalone_la_CFLAGS) $(CFLAGS) -MT standalone_la-persist_dbm.lo -MD -MP -MF $(DEPDIR)/standalone_la-persist_dbm.Tpo -c -o standalone_la-persist_dbm.lo `test -f '../apache2/persist_dbm.c' || echo '$(srcdir)/'`../apache2/persist_dbm.c
|
||||
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/standalone_la-persist_dbm.Tpo $(DEPDIR)/standalone_la-persist_dbm.Plo
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../apache2/persist_dbm.c' object='standalone_la-persist_dbm.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(standalone_la_CPPFLAGS) $(CPPFLAGS) $(standalone_la_CFLAGS) $(CFLAGS) -c -o standalone_la-persist_dbm.lo `test -f '../apache2/persist_dbm.c' || echo '$(srcdir)/'`../apache2/persist_dbm.c
|
||||
|
||||
standalone_la-msc_reqbody.lo: ../apache2/msc_reqbody.c
|
||||
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(standalone_la_CPPFLAGS) $(CPPFLAGS) $(standalone_la_CFLAGS) $(CFLAGS) -MT standalone_la-msc_reqbody.lo -MD -MP -MF $(DEPDIR)/standalone_la-msc_reqbody.Tpo -c -o standalone_la-msc_reqbody.lo `test -f '../apache2/msc_reqbody.c' || echo '$(srcdir)/'`../apache2/msc_reqbody.c
|
||||
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/standalone_la-msc_reqbody.Tpo $(DEPDIR)/standalone_la-msc_reqbody.Plo
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../apache2/msc_reqbody.c' object='standalone_la-msc_reqbody.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(standalone_la_CPPFLAGS) $(CPPFLAGS) $(standalone_la_CFLAGS) $(CFLAGS) -c -o standalone_la-msc_reqbody.lo `test -f '../apache2/msc_reqbody.c' || echo '$(srcdir)/'`../apache2/msc_reqbody.c
|
||||
|
||||
standalone_la-msc_geo.lo: ../apache2/msc_geo.c
|
||||
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(standalone_la_CPPFLAGS) $(CPPFLAGS) $(standalone_la_CFLAGS) $(CFLAGS) -MT standalone_la-msc_geo.lo -MD -MP -MF $(DEPDIR)/standalone_la-msc_geo.Tpo -c -o standalone_la-msc_geo.lo `test -f '../apache2/msc_geo.c' || echo '$(srcdir)/'`../apache2/msc_geo.c
|
||||
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/standalone_la-msc_geo.Tpo $(DEPDIR)/standalone_la-msc_geo.Plo
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../apache2/msc_geo.c' object='standalone_la-msc_geo.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(standalone_la_CPPFLAGS) $(CPPFLAGS) $(standalone_la_CFLAGS) $(CFLAGS) -c -o standalone_la-msc_geo.lo `test -f '../apache2/msc_geo.c' || echo '$(srcdir)/'`../apache2/msc_geo.c
|
||||
|
||||
standalone_la-msc_gsb.lo: ../apache2/msc_gsb.c
|
||||
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(standalone_la_CPPFLAGS) $(CPPFLAGS) $(standalone_la_CFLAGS) $(CFLAGS) -MT standalone_la-msc_gsb.lo -MD -MP -MF $(DEPDIR)/standalone_la-msc_gsb.Tpo -c -o standalone_la-msc_gsb.lo `test -f '../apache2/msc_gsb.c' || echo '$(srcdir)/'`../apache2/msc_gsb.c
|
||||
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/standalone_la-msc_gsb.Tpo $(DEPDIR)/standalone_la-msc_gsb.Plo
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../apache2/msc_gsb.c' object='standalone_la-msc_gsb.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(standalone_la_CPPFLAGS) $(CPPFLAGS) $(standalone_la_CFLAGS) $(CFLAGS) -c -o standalone_la-msc_gsb.lo `test -f '../apache2/msc_gsb.c' || echo '$(srcdir)/'`../apache2/msc_gsb.c
|
||||
|
||||
standalone_la-msc_unicode.lo: ../apache2/msc_unicode.c
|
||||
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(standalone_la_CPPFLAGS) $(CPPFLAGS) $(standalone_la_CFLAGS) $(CFLAGS) -MT standalone_la-msc_unicode.lo -MD -MP -MF $(DEPDIR)/standalone_la-msc_unicode.Tpo -c -o standalone_la-msc_unicode.lo `test -f '../apache2/msc_unicode.c' || echo '$(srcdir)/'`../apache2/msc_unicode.c
|
||||
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/standalone_la-msc_unicode.Tpo $(DEPDIR)/standalone_la-msc_unicode.Plo
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../apache2/msc_unicode.c' object='standalone_la-msc_unicode.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(standalone_la_CPPFLAGS) $(CPPFLAGS) $(standalone_la_CFLAGS) $(CFLAGS) -c -o standalone_la-msc_unicode.lo `test -f '../apache2/msc_unicode.c' || echo '$(srcdir)/'`../apache2/msc_unicode.c
|
||||
|
||||
standalone_la-acmp.lo: ../apache2/acmp.c
|
||||
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(standalone_la_CPPFLAGS) $(CPPFLAGS) $(standalone_la_CFLAGS) $(CFLAGS) -MT standalone_la-acmp.lo -MD -MP -MF $(DEPDIR)/standalone_la-acmp.Tpo -c -o standalone_la-acmp.lo `test -f '../apache2/acmp.c' || echo '$(srcdir)/'`../apache2/acmp.c
|
||||
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/standalone_la-acmp.Tpo $(DEPDIR)/standalone_la-acmp.Plo
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../apache2/acmp.c' object='standalone_la-acmp.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(standalone_la_CPPFLAGS) $(CPPFLAGS) $(standalone_la_CFLAGS) $(CFLAGS) -c -o standalone_la-acmp.lo `test -f '../apache2/acmp.c' || echo '$(srcdir)/'`../apache2/acmp.c
|
||||
|
||||
standalone_la-msc_lua.lo: ../apache2/msc_lua.c
|
||||
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(standalone_la_CPPFLAGS) $(CPPFLAGS) $(standalone_la_CFLAGS) $(CFLAGS) -MT standalone_la-msc_lua.lo -MD -MP -MF $(DEPDIR)/standalone_la-msc_lua.Tpo -c -o standalone_la-msc_lua.lo `test -f '../apache2/msc_lua.c' || echo '$(srcdir)/'`../apache2/msc_lua.c
|
||||
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/standalone_la-msc_lua.Tpo $(DEPDIR)/standalone_la-msc_lua.Plo
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../apache2/msc_lua.c' object='standalone_la-msc_lua.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(standalone_la_CPPFLAGS) $(CPPFLAGS) $(standalone_la_CFLAGS) $(CFLAGS) -c -o standalone_la-msc_lua.lo `test -f '../apache2/msc_lua.c' || echo '$(srcdir)/'`../apache2/msc_lua.c
|
||||
|
||||
standalone_la-msc_release.lo: ../apache2/msc_release.c
|
||||
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(standalone_la_CPPFLAGS) $(CPPFLAGS) $(standalone_la_CFLAGS) $(CFLAGS) -MT standalone_la-msc_release.lo -MD -MP -MF $(DEPDIR)/standalone_la-msc_release.Tpo -c -o standalone_la-msc_release.lo `test -f '../apache2/msc_release.c' || echo '$(srcdir)/'`../apache2/msc_release.c
|
||||
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/standalone_la-msc_release.Tpo $(DEPDIR)/standalone_la-msc_release.Plo
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../apache2/msc_release.c' object='standalone_la-msc_release.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(standalone_la_CPPFLAGS) $(CPPFLAGS) $(standalone_la_CFLAGS) $(CFLAGS) -c -o standalone_la-msc_release.lo `test -f '../apache2/msc_release.c' || echo '$(srcdir)/'`../apache2/msc_release.c
|
||||
|
||||
standalone_la-msc_crypt.lo: ../apache2/msc_crypt.c
|
||||
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(standalone_la_CPPFLAGS) $(CPPFLAGS) $(standalone_la_CFLAGS) $(CFLAGS) -MT standalone_la-msc_crypt.lo -MD -MP -MF $(DEPDIR)/standalone_la-msc_crypt.Tpo -c -o standalone_la-msc_crypt.lo `test -f '../apache2/msc_crypt.c' || echo '$(srcdir)/'`../apache2/msc_crypt.c
|
||||
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/standalone_la-msc_crypt.Tpo $(DEPDIR)/standalone_la-msc_crypt.Plo
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../apache2/msc_crypt.c' object='standalone_la-msc_crypt.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(standalone_la_CPPFLAGS) $(CPPFLAGS) $(standalone_la_CFLAGS) $(CFLAGS) -c -o standalone_la-msc_crypt.lo `test -f '../apache2/msc_crypt.c' || echo '$(srcdir)/'`../apache2/msc_crypt.c
|
||||
|
||||
standalone_la-msc_tree.lo: ../apache2/msc_tree.c
|
||||
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(standalone_la_CPPFLAGS) $(CPPFLAGS) $(standalone_la_CFLAGS) $(CFLAGS) -MT standalone_la-msc_tree.lo -MD -MP -MF $(DEPDIR)/standalone_la-msc_tree.Tpo -c -o standalone_la-msc_tree.lo `test -f '../apache2/msc_tree.c' || echo '$(srcdir)/'`../apache2/msc_tree.c
|
||||
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/standalone_la-msc_tree.Tpo $(DEPDIR)/standalone_la-msc_tree.Plo
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../apache2/msc_tree.c' object='standalone_la-msc_tree.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(standalone_la_CPPFLAGS) $(CPPFLAGS) $(standalone_la_CFLAGS) $(CFLAGS) -c -o standalone_la-msc_tree.lo `test -f '../apache2/msc_tree.c' || echo '$(srcdir)/'`../apache2/msc_tree.c
|
||||
|
||||
standalone_la-api.lo: api.c
|
||||
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(standalone_la_CPPFLAGS) $(CPPFLAGS) $(standalone_la_CFLAGS) $(CFLAGS) -MT standalone_la-api.lo -MD -MP -MF $(DEPDIR)/standalone_la-api.Tpo -c -o standalone_la-api.lo `test -f 'api.c' || echo '$(srcdir)/'`api.c
|
||||
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/standalone_la-api.Tpo $(DEPDIR)/standalone_la-api.Plo
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='api.c' object='standalone_la-api.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(standalone_la_CPPFLAGS) $(CPPFLAGS) $(standalone_la_CFLAGS) $(CFLAGS) -c -o standalone_la-api.lo `test -f 'api.c' || echo '$(srcdir)/'`api.c
|
||||
|
||||
standalone_la-buckets.lo: buckets.c
|
||||
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(standalone_la_CPPFLAGS) $(CPPFLAGS) $(standalone_la_CFLAGS) $(CFLAGS) -MT standalone_la-buckets.lo -MD -MP -MF $(DEPDIR)/standalone_la-buckets.Tpo -c -o standalone_la-buckets.lo `test -f 'buckets.c' || echo '$(srcdir)/'`buckets.c
|
||||
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/standalone_la-buckets.Tpo $(DEPDIR)/standalone_la-buckets.Plo
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='buckets.c' object='standalone_la-buckets.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(standalone_la_CPPFLAGS) $(CPPFLAGS) $(standalone_la_CFLAGS) $(CFLAGS) -c -o standalone_la-buckets.lo `test -f 'buckets.c' || echo '$(srcdir)/'`buckets.c
|
||||
|
||||
standalone_la-config.lo: config.c
|
||||
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(standalone_la_CPPFLAGS) $(CPPFLAGS) $(standalone_la_CFLAGS) $(CFLAGS) -MT standalone_la-config.lo -MD -MP -MF $(DEPDIR)/standalone_la-config.Tpo -c -o standalone_la-config.lo `test -f 'config.c' || echo '$(srcdir)/'`config.c
|
||||
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/standalone_la-config.Tpo $(DEPDIR)/standalone_la-config.Plo
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='config.c' object='standalone_la-config.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(standalone_la_CPPFLAGS) $(CPPFLAGS) $(standalone_la_CFLAGS) $(CFLAGS) -c -o standalone_la-config.lo `test -f 'config.c' || echo '$(srcdir)/'`config.c
|
||||
|
||||
standalone_la-filters.lo: filters.c
|
||||
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(standalone_la_CPPFLAGS) $(CPPFLAGS) $(standalone_la_CFLAGS) $(CFLAGS) -MT standalone_la-filters.lo -MD -MP -MF $(DEPDIR)/standalone_la-filters.Tpo -c -o standalone_la-filters.lo `test -f 'filters.c' || echo '$(srcdir)/'`filters.c
|
||||
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/standalone_la-filters.Tpo $(DEPDIR)/standalone_la-filters.Plo
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='filters.c' object='standalone_la-filters.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(standalone_la_CPPFLAGS) $(CPPFLAGS) $(standalone_la_CFLAGS) $(CFLAGS) -c -o standalone_la-filters.lo `test -f 'filters.c' || echo '$(srcdir)/'`filters.c
|
||||
|
||||
standalone_la-hooks.lo: hooks.c
|
||||
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(standalone_la_CPPFLAGS) $(CPPFLAGS) $(standalone_la_CFLAGS) $(CFLAGS) -MT standalone_la-hooks.lo -MD -MP -MF $(DEPDIR)/standalone_la-hooks.Tpo -c -o standalone_la-hooks.lo `test -f 'hooks.c' || echo '$(srcdir)/'`hooks.c
|
||||
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/standalone_la-hooks.Tpo $(DEPDIR)/standalone_la-hooks.Plo
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='hooks.c' object='standalone_la-hooks.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(standalone_la_CPPFLAGS) $(CPPFLAGS) $(standalone_la_CFLAGS) $(CFLAGS) -c -o standalone_la-hooks.lo `test -f 'hooks.c' || echo '$(srcdir)/'`hooks.c
|
||||
|
||||
standalone_la-regex.lo: regex.c
|
||||
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(standalone_la_CPPFLAGS) $(CPPFLAGS) $(standalone_la_CFLAGS) $(CFLAGS) -MT standalone_la-regex.lo -MD -MP -MF $(DEPDIR)/standalone_la-regex.Tpo -c -o standalone_la-regex.lo `test -f 'regex.c' || echo '$(srcdir)/'`regex.c
|
||||
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/standalone_la-regex.Tpo $(DEPDIR)/standalone_la-regex.Plo
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='regex.c' object='standalone_la-regex.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(standalone_la_CPPFLAGS) $(CPPFLAGS) $(standalone_la_CFLAGS) $(CFLAGS) -c -o standalone_la-regex.lo `test -f 'regex.c' || echo '$(srcdir)/'`regex.c
|
||||
|
||||
standalone_la-server.lo: server.c
|
||||
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(standalone_la_CPPFLAGS) $(CPPFLAGS) $(standalone_la_CFLAGS) $(CFLAGS) -MT standalone_la-server.lo -MD -MP -MF $(DEPDIR)/standalone_la-server.Tpo -c -o standalone_la-server.lo `test -f 'server.c' || echo '$(srcdir)/'`server.c
|
||||
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/standalone_la-server.Tpo $(DEPDIR)/standalone_la-server.Plo
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='server.c' object='standalone_la-server.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(standalone_la_CPPFLAGS) $(CPPFLAGS) $(standalone_la_CFLAGS) $(CFLAGS) -c -o standalone_la-server.lo `test -f 'server.c' || echo '$(srcdir)/'`server.c
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
mkid -fID $$unique
|
||||
tags: TAGS
|
||||
|
||||
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
set x; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
shift; \
|
||||
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
|
||||
test -n "$$unique" || unique=$$empty_fix; \
|
||||
if test $$# -gt 0; then \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
"$$@" $$unique; \
|
||||
else \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$unique; \
|
||||
fi; \
|
||||
fi
|
||||
ctags: CTAGS
|
||||
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
test -z "$(CTAGS_ARGS)$$unique" \
|
||||
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||
$$unique
|
||||
|
||||
GTAGS:
|
||||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& $(am__cd) $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) "$$here"
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
list='$(DISTFILES)'; \
|
||||
dist_files=`for file in $$list; do echo $$file; done | \
|
||||
sed -e "s|^$$srcdirstrip/||;t" \
|
||||
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
|
||||
case $$dist_files in \
|
||||
*/*) $(MKDIR_P) `echo "$$dist_files" | \
|
||||
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
|
||||
sort -u` ;; \
|
||||
esac; \
|
||||
for file in $$dist_files; do \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test -d "$(distdir)/$$file"; then \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
|
||||
else \
|
||||
test -f "$(distdir)/$$file" \
|
||||
|| cp -p $$d/$$file "$(distdir)/$$file" \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
check-am: all-am
|
||||
check: check-am
|
||||
all-am: Makefile $(LTLIBRARIES)
|
||||
installdirs:
|
||||
for dir in "$(DESTDIR)$(pkglibdir)"; do \
|
||||
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
|
||||
done
|
||||
install: install-am
|
||||
install-exec: install-exec-am
|
||||
install-data: install-data-am
|
||||
uninstall: uninstall-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-am
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-am
|
||||
|
||||
clean-am: clean-generic clean-libtool clean-pkglibLTLIBRARIES \
|
||||
mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
-rm -rf ./$(DEPDIR)
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-compile distclean-generic \
|
||||
distclean-tags
|
||||
|
||||
dvi: dvi-am
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-am
|
||||
|
||||
html-am:
|
||||
|
||||
info: info-am
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am:
|
||||
|
||||
install-dvi: install-dvi-am
|
||||
|
||||
install-dvi-am:
|
||||
|
||||
install-exec-am: install-pkglibLTLIBRARIES
|
||||
@$(NORMAL_INSTALL)
|
||||
$(MAKE) $(AM_MAKEFLAGS) install-exec-hook
|
||||
install-html: install-html-am
|
||||
|
||||
install-html-am:
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
install-info-am:
|
||||
|
||||
install-man:
|
||||
|
||||
install-pdf: install-pdf-am
|
||||
|
||||
install-pdf-am:
|
||||
|
||||
install-ps: install-ps-am
|
||||
|
||||
install-ps-am:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
-rm -rf ./$(DEPDIR)
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
mostlyclean-am: mostlyclean-compile mostlyclean-generic \
|
||||
mostlyclean-libtool
|
||||
|
||||
pdf: pdf-am
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-am
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am: uninstall-pkglibLTLIBRARIES
|
||||
|
||||
.MAKE: install-am install-exec-am install-strip
|
||||
|
||||
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
|
||||
clean-libtool clean-pkglibLTLIBRARIES ctags distclean \
|
||||
distclean-compile distclean-generic distclean-libtool \
|
||||
distclean-tags distdir dvi dvi-am html html-am info info-am \
|
||||
install install-am install-data install-data-am install-dvi \
|
||||
install-dvi-am install-exec install-exec-am install-exec-hook \
|
||||
install-html install-html-am install-info install-info-am \
|
||||
install-man install-pdf install-pdf-am \
|
||||
install-pkglibLTLIBRARIES install-ps install-ps-am \
|
||||
install-strip installcheck installcheck-am installdirs \
|
||||
maintainer-clean maintainer-clean-generic mostlyclean \
|
||||
mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
|
||||
pdf pdf-am ps ps-am tags uninstall uninstall-am \
|
||||
uninstall-pkglibLTLIBRARIES
|
||||
|
||||
|
||||
install-exec-hook: $(pkglib_LTLIBRARIES)
|
||||
@echo "Removing unused static libraries..."; \
|
||||
for m in $(pkglib_LTLIBRARIES); do \
|
||||
base=`echo $$m | sed 's/\..*//'`; \
|
||||
rm -f $(DESTDIR)$(pkglibdir)/$$base.*a; \
|
||||
cp -p $(DESTDIR)$(pkglibdir)/$$base.so $(APXS_MODULES); \
|
||||
done
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
508
standalone/api.c
Normal file
508
standalone/api.c
Normal file
@ -0,0 +1,508 @@
|
||||
/*
|
||||
* ModSecurity for Apache 2.x, http://www.modsecurity.org/
|
||||
* Copyright (c) 2004-2011 Trustwave Holdings, Inc. (http://www.trustwave.com/)
|
||||
*
|
||||
* You may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* If any of the files related to licensing are missing or if you have any
|
||||
* other questions related to licensing please contact Trustwave Holdings, Inc.
|
||||
* directly using the email address security@modsecurity.org.
|
||||
*/
|
||||
|
||||
#include <limits.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include "http_core.h"
|
||||
#include "http_request.h"
|
||||
|
||||
#include "modsecurity.h"
|
||||
#include "apache2.h"
|
||||
#include "http_main.h"
|
||||
#include "http_connection.h"
|
||||
|
||||
#include "apr_optional.h"
|
||||
#include "mod_log_config.h"
|
||||
|
||||
#include "msc_logging.h"
|
||||
#include "msc_util.h"
|
||||
|
||||
#include "ap_mpm.h"
|
||||
#include "scoreboard.h"
|
||||
|
||||
#include "apr_version.h"
|
||||
|
||||
#include "apr_lib.h"
|
||||
#include "ap_config.h"
|
||||
#include "http_config.h"
|
||||
|
||||
|
||||
extern void *modsecLogObj;
|
||||
extern void (*modsecLogHook)(void *obj, int level, char *str);
|
||||
|
||||
apr_status_t (*modsecReadBody)(request_rec *r, char *buf, unsigned int length, unsigned int *readcnt, int *is_eos);
|
||||
apr_status_t (*modsecReadResponse)(request_rec *r, char *buf, unsigned int length, unsigned int *readcnt, int *is_eos);
|
||||
apr_status_t (*modsecWriteBody)(request_rec *r, char *buf, unsigned int length);
|
||||
apr_status_t (*modsecWriteResponse)(request_rec *r, char *buf, unsigned int length);
|
||||
|
||||
extern const char *process_command_config(server_rec *s,
|
||||
void *mconfig,
|
||||
apr_pool_t *p,
|
||||
apr_pool_t *ptemp,
|
||||
const char *filename);
|
||||
|
||||
#define DECLARE_EXTERNAL_HOOK(ns,link,ret,name,args) \
|
||||
extern ns##_HOOK_##name##_t *hookfn_##name;
|
||||
|
||||
#define DECLARE_HOOK(ret,name,args) \
|
||||
DECLARE_EXTERNAL_HOOK(ap,AP,ret,name,args)
|
||||
|
||||
DECLARE_HOOK(int,pre_config,(apr_pool_t *pconf,apr_pool_t *plog, apr_pool_t *ptemp))
|
||||
DECLARE_HOOK(int,post_config,(apr_pool_t *pconf,apr_pool_t *plog, apr_pool_t *ptemp,server_rec *s))
|
||||
DECLARE_HOOK(void,child_init,(apr_pool_t *pchild, server_rec *s))
|
||||
DECLARE_HOOK(int,process_connection,(conn_rec *c))
|
||||
DECLARE_HOOK(int,post_read_request,(request_rec *r))
|
||||
DECLARE_HOOK(int,fixups,(request_rec *r))
|
||||
DECLARE_HOOK(void, error_log, (const char *file, int line, int level,
|
||||
apr_status_t status, const server_rec *s,
|
||||
const request_rec *r, apr_pool_t *pool,
|
||||
const char *errstr))
|
||||
DECLARE_HOOK(int,log_transaction,(request_rec *r))
|
||||
DECLARE_HOOK(void,insert_filter,(request_rec *r))
|
||||
DECLARE_HOOK(void,insert_error_filter,(request_rec *r))
|
||||
|
||||
char *sa_name = "standalone";
|
||||
server_rec *server;
|
||||
apr_pool_t *pool = NULL;
|
||||
|
||||
apr_status_t ap_http_in_filter(ap_filter_t *f, apr_bucket_brigade *b,
|
||||
ap_input_mode_t mode, apr_read_type_e block,
|
||||
apr_off_t readbytes);
|
||||
apr_status_t ap_http_out_filter(ap_filter_t *f, apr_bucket_brigade *b);
|
||||
|
||||
server_rec *modsecInit() {
|
||||
apr_initialize();
|
||||
|
||||
apr_pool_create(&pool, NULL);
|
||||
|
||||
apr_hook_global_pool = pool;
|
||||
|
||||
server = apr_palloc(pool, sizeof(server_rec));
|
||||
|
||||
server->addrs = apr_palloc(pool, sizeof(server_addr_rec));
|
||||
server->addrs->host_addr = apr_palloc(pool, sizeof(apr_sockaddr_t));
|
||||
server->addrs->host_addr->addr_str_len = 16;
|
||||
server->addrs->host_addr->family = AF_INET;
|
||||
server->addrs->host_addr->hostname = sa_name;
|
||||
#ifdef WIN32
|
||||
server->addrs->host_addr->ipaddr_len = sizeof(IN_ADDR);
|
||||
#else
|
||||
server->addrs->host_addr->ipaddr_len = sizeof(struct in_addr);
|
||||
#endif
|
||||
server->addrs->host_addr->ipaddr_ptr = &server->addrs->host_addr->sa.sin.sin_addr;
|
||||
server->addrs->host_addr->pool = pool;
|
||||
server->addrs->host_addr->port = 80;
|
||||
#ifdef WIN32
|
||||
server->addrs->host_addr->sa.sin.sin_addr.S_un.S_addr = 0x0100007f;
|
||||
#else
|
||||
server->addrs->host_addr->sa.sin.sin_addr.s_addr = 0x0100007f;
|
||||
#endif
|
||||
server->addrs->host_addr->sa.sin.sin_family = AF_INET;
|
||||
server->addrs->host_addr->sa.sin.sin_port = 80;
|
||||
server->addrs->host_addr->salen = sizeof(server->addrs->host_addr->sa);
|
||||
server->addrs->host_addr->servname = sa_name;
|
||||
server->addrs->host_port = 80;
|
||||
server->error_fname = "error.log";
|
||||
server->error_log = NULL;
|
||||
server->limit_req_fields = 1024;
|
||||
server->limit_req_fieldsize = 1024;
|
||||
server->limit_req_line = 1024;
|
||||
server->loglevel = APLOG_DEBUG;
|
||||
server->lookup_defaults = NULL;
|
||||
server->module_config = NULL;
|
||||
server->names = NULL;
|
||||
#ifdef WIN32
|
||||
server->path = "c:\\inetpub\\wwwroot";
|
||||
#else
|
||||
server->path = "/var/www";
|
||||
#endif
|
||||
server->pathlen = strlen(server->path);
|
||||
server->port = 80;
|
||||
server->process = apr_palloc(pool, sizeof(process_rec));
|
||||
server->process->argc = 1;
|
||||
server->process->argv = &sa_name;
|
||||
server->process->pconf = pool;
|
||||
server->process->pool = pool;
|
||||
server->process->short_name = sa_name;
|
||||
server->server_admin = sa_name;
|
||||
server->server_hostname = sa_name;
|
||||
server->server_scheme = "";
|
||||
server->timeout = 60 * 1000000;// 60 seconds
|
||||
server->wild_names = NULL;
|
||||
|
||||
ap_server_config_defines = apr_array_make(pool, 1, sizeof(char *));
|
||||
|
||||
ap_scoreboard_image = (scoreboard *)apr_palloc(pool, sizeof(scoreboard));
|
||||
|
||||
// here we should probably fill scoreboard and later keep it updated somewhere
|
||||
|
||||
security2_module.module_index = 0;
|
||||
|
||||
security2_module.register_hooks(pool);
|
||||
|
||||
ap_register_input_filter("HTTP_IN", ap_http_in_filter, NULL, AP_FTYPE_RESOURCE);
|
||||
ap_register_output_filter("HTTP_OUT", ap_http_out_filter, NULL, AP_FTYPE_CONTENT_SET);
|
||||
|
||||
return server;
|
||||
}
|
||||
|
||||
apr_status_t ap_http_in_filter(ap_filter_t *f, apr_bucket_brigade *b,
|
||||
ap_input_mode_t mode, apr_read_type_e block,
|
||||
apr_off_t readbytes) {
|
||||
char *tmp = NULL;
|
||||
apr_bucket *e = NULL;
|
||||
unsigned int readcnt = 0;
|
||||
int is_eos = 0;
|
||||
|
||||
if(modsecReadBody == NULL)
|
||||
return AP_NOBODY_READ;
|
||||
|
||||
tmp = (char *)apr_palloc(f->r->pool, readbytes);
|
||||
modsecReadBody(f->r, tmp, readbytes, &readcnt, &is_eos);
|
||||
|
||||
e = apr_bucket_pool_create(tmp, readcnt, f->r->pool, f->c->bucket_alloc);
|
||||
APR_BRIGADE_INSERT_TAIL(b, e);
|
||||
|
||||
if(is_eos) {
|
||||
e = apr_bucket_eos_create(f->c->bucket_alloc);
|
||||
APR_BRIGADE_INSERT_TAIL(b, e);
|
||||
}
|
||||
|
||||
return APR_SUCCESS;
|
||||
}
|
||||
|
||||
apr_status_t ap_http_out_filter(ap_filter_t *f, apr_bucket_brigade *b) {
|
||||
modsec_rec *msr = (modsec_rec *)f->ctx;
|
||||
apr_status_t rc;
|
||||
|
||||
// is there a way to tell whether the response body was modified or not?
|
||||
//
|
||||
if((msr->txcfg->content_injection_enabled || msr->content_prepend_len != 0 || msr->content_append_len != 0)
|
||||
&& modsecWriteResponse != NULL && msr->txcfg->resbody_access) {
|
||||
char *data = NULL;
|
||||
apr_size_t length;
|
||||
|
||||
rc = apr_brigade_pflatten(msr->of_brigade, &data, &length, msr->mp);
|
||||
|
||||
if (rc != APR_SUCCESS) {
|
||||
msr_log(msr, 1, "Output filter: Failed to flatten brigade (%d): %s", rc,
|
||||
get_apr_error(msr->mp, rc));
|
||||
return -1;
|
||||
}
|
||||
|
||||
modsecWriteResponse(msr->r, data, msr->stream_output_length);
|
||||
}
|
||||
|
||||
return APR_SUCCESS;
|
||||
}
|
||||
|
||||
void modsecTerminate() {
|
||||
apr_terminate();
|
||||
}
|
||||
|
||||
void modsecStartConfig() {
|
||||
apr_pool_t *ptemp = NULL;
|
||||
|
||||
apr_pool_create(&ptemp, pool);
|
||||
|
||||
hookfn_pre_config(pool, pool, ptemp);
|
||||
|
||||
apr_pool_destroy(ptemp);
|
||||
}
|
||||
|
||||
directory_config *modsecGetDefaultConfig() {
|
||||
return (directory_config *)security2_module.create_dir_config(pool, NULL);
|
||||
}
|
||||
|
||||
const char *modsecProcessConfig(directory_config *config, const char *dir) {
|
||||
apr_pool_t *ptemp = NULL;
|
||||
const char *err;
|
||||
|
||||
apr_pool_create(&ptemp, pool);
|
||||
|
||||
err = process_command_config(server, config, pool, ptemp, dir);
|
||||
|
||||
apr_pool_destroy(ptemp);
|
||||
|
||||
return err;
|
||||
}
|
||||
|
||||
void modsecFinalizeConfig() {
|
||||
apr_pool_t *ptemp = NULL;
|
||||
|
||||
apr_pool_create(&ptemp, pool);
|
||||
|
||||
hookfn_post_config(pool, pool, ptemp, server);
|
||||
hookfn_post_config(pool, pool, ptemp, server);
|
||||
|
||||
apr_pool_destroy(ptemp);
|
||||
}
|
||||
|
||||
void modsecInitProcess() {
|
||||
hookfn_child_init(pool, server);
|
||||
}
|
||||
|
||||
conn_rec *modsecNewConnection() {
|
||||
conn_rec *c;
|
||||
apr_pool_t *pc = NULL;
|
||||
|
||||
apr_pool_create(&pc, pool);
|
||||
|
||||
c = apr_palloc(pc, sizeof(conn_rec));
|
||||
|
||||
c->base_server = server;
|
||||
c->id = 1;
|
||||
c->local_addr = server->addrs->host_addr;
|
||||
c->local_host = sa_name;
|
||||
c->local_ip = "127.0.0.1";
|
||||
c->pool = pc;
|
||||
c->remote_addr = server->addrs->host_addr;
|
||||
c->remote_host = sa_name;
|
||||
c->remote_ip = "127.0.0.1";
|
||||
c->input_filters = NULL;
|
||||
c->output_filters = NULL;
|
||||
c->bucket_alloc = apr_bucket_alloc_create(pc);
|
||||
|
||||
return c;
|
||||
}
|
||||
|
||||
void modsecProcessConnection(conn_rec *c) {
|
||||
hookfn_process_connection(c);
|
||||
}
|
||||
|
||||
request_rec *modsecNewRequest(conn_rec *connection, directory_config *config) {
|
||||
request_rec *r;
|
||||
apr_pool_t *pr = NULL;
|
||||
|
||||
apr_pool_create(&pr, connection->pool);
|
||||
|
||||
r = apr_palloc(pr, sizeof(request_rec));
|
||||
|
||||
r->connection = connection;
|
||||
r->server = server;
|
||||
r->pool = pr;
|
||||
r->main = NULL;
|
||||
r->next = NULL;
|
||||
r->notes = apr_table_make(pr, 10);
|
||||
r->per_dir_config = apr_palloc(pr, sizeof(void *));
|
||||
((void **)r->per_dir_config)[0] = config;
|
||||
r->prev = NULL;
|
||||
r->subprocess_env = apr_table_make(pr, 10);
|
||||
apr_table_setn(r->subprocess_env, "UNIQUE_ID", "unique_id");
|
||||
r->user = NULL;
|
||||
|
||||
r->headers_in = apr_table_make(pr, 10);
|
||||
r->headers_out = apr_table_make(pr, 10);
|
||||
r->err_headers_out = apr_table_make(pr, 10);
|
||||
//apr_table_setn(r->headers_in, "Host", "www.google.com");
|
||||
//apr_table_setn(r->headers_in, "", "");
|
||||
|
||||
r->the_request = "GET /../../index.html HTTP/1.1";
|
||||
r->method = "GET";
|
||||
r->method_number = M_GET;
|
||||
r->protocol = "HTTP/1.1";
|
||||
r->uri = "http://www.google.com/../../index.html";
|
||||
r->args = "";
|
||||
r->filename = "/../../index.html";
|
||||
r->handler = "IIS";
|
||||
|
||||
r->parsed_uri.scheme = "http";
|
||||
r->parsed_uri.path = "/../../index.html";
|
||||
r->parsed_uri.hostname = "www.google.com";
|
||||
r->parsed_uri.is_initialized = 1;
|
||||
r->parsed_uri.port = 1234;
|
||||
r->parsed_uri.port_str = "1234";
|
||||
r->parsed_uri.query = "";
|
||||
r->parsed_uri.dns_looked_up = 0;
|
||||
r->parsed_uri.dns_resolved = 0;
|
||||
r->parsed_uri.password = NULL;
|
||||
r->parsed_uri.user = NULL;
|
||||
r->parsed_uri.fragment = "";
|
||||
|
||||
r->input_filters = NULL;
|
||||
r->output_filters = NULL;
|
||||
|
||||
return r;
|
||||
}
|
||||
|
||||
static modsec_rec *retrieve_msr(request_rec *r) {
|
||||
modsec_rec *msr = NULL;
|
||||
request_rec *rx = NULL;
|
||||
|
||||
/* Look in the current request first. */
|
||||
msr = (modsec_rec *)apr_table_get(r->notes, NOTE_MSR);
|
||||
if (msr != NULL) {
|
||||
msr->r = r;
|
||||
return msr;
|
||||
}
|
||||
|
||||
/* If this is a subrequest then look in the main request. */
|
||||
if (r->main != NULL) {
|
||||
msr = (modsec_rec *)apr_table_get(r->main->notes, NOTE_MSR);
|
||||
if (msr != NULL) {
|
||||
msr->r = r;
|
||||
return msr;
|
||||
}
|
||||
}
|
||||
|
||||
/* If the request was redirected then look in the previous requests. */
|
||||
rx = r->prev;
|
||||
while(rx != NULL) {
|
||||
msr = (modsec_rec *)apr_table_get(rx->notes, NOTE_MSR);
|
||||
if (msr != NULL) {
|
||||
msr->r = r;
|
||||
return msr;
|
||||
}
|
||||
rx = rx->prev;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
int modsecProcessRequest(request_rec *r) {
|
||||
int status = DECLINED;
|
||||
modsec_rec *msr = NULL;
|
||||
|
||||
ap_filter_t *f = ap_add_input_filter("HTTP_IN", NULL, r, r->connection);
|
||||
|
||||
status = hookfn_post_read_request(r);
|
||||
status = hookfn_fixups(r);
|
||||
|
||||
ap_remove_input_filter(f);
|
||||
|
||||
hookfn_insert_filter(r);
|
||||
|
||||
/* Find the transaction context first. */
|
||||
msr = retrieve_msr(r);
|
||||
|
||||
if (msr == NULL)
|
||||
return status;
|
||||
|
||||
if(msr->stream_input_data != NULL && modsecWriteBody != NULL)
|
||||
{
|
||||
// target is responsible for copying the data into correctly managed buffer
|
||||
//
|
||||
modsecWriteBody(r, msr->stream_input_data, msr->stream_input_length);
|
||||
|
||||
free(msr->stream_input_data);
|
||||
|
||||
msr->stream_input_data = NULL;
|
||||
}
|
||||
|
||||
// leftover code possibly for future use
|
||||
//
|
||||
//if(r->input_filters != NULL && r->input_filters->frec->filter_init_func != NULL)
|
||||
//r->input_filters->frec->filter_init_func(r->input_filters);
|
||||
//if(r->input_filters != NULL && r->input_filters->frec->filter_func.in_func != NULL)
|
||||
//r->input_filters->frec->filter_func.in_func(r->input_filters, NULL, 0, 0, 0);
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
int modsecProcessResponse(request_rec *r) {
|
||||
int status = DECLINED;
|
||||
|
||||
if(r->output_filters != NULL) {
|
||||
modsec_rec *msr = (modsec_rec *)r->output_filters->ctx;
|
||||
char buf[8192];
|
||||
char *tmp = NULL;
|
||||
apr_bucket *e = NULL;
|
||||
unsigned int readcnt = 0;
|
||||
int is_eos = 0;
|
||||
ap_filter_t *f = NULL;
|
||||
apr_bucket_brigade *bb = NULL;
|
||||
|
||||
if (msr == NULL) {
|
||||
ap_log_error(APLOG_MARK, APLOG_ERR | APLOG_NOERRNO, 0, r->server,
|
||||
"ModSecurity: Internal Error: msr is null in output filter.");
|
||||
ap_remove_output_filter(r->output_filters);
|
||||
return send_error_bucket(msr, r->output_filters, HTTP_INTERNAL_SERVER_ERROR);
|
||||
}
|
||||
|
||||
bb = apr_brigade_create(msr->mp, r->connection->bucket_alloc);
|
||||
|
||||
if (bb == NULL) {
|
||||
msr_log(msr, 1, "Process response: Failed to create brigade.");
|
||||
return -1;
|
||||
}
|
||||
|
||||
msr->r = r;
|
||||
|
||||
if(modsecReadResponse == NULL)
|
||||
return AP_NOBODY_WROTE;
|
||||
|
||||
f = ap_add_output_filter("HTTP_OUT", msr, r, r->connection);
|
||||
|
||||
while(!is_eos) {
|
||||
modsecReadResponse(r, buf, 8192, &readcnt, &is_eos);
|
||||
|
||||
if(readcnt > 0) {
|
||||
tmp = (char *)apr_palloc(r->pool, readcnt);
|
||||
memcpy(tmp, buf, readcnt);
|
||||
|
||||
e = apr_bucket_pool_create(tmp, readcnt, r->pool, r->connection->bucket_alloc);
|
||||
APR_BRIGADE_INSERT_TAIL(bb, e);
|
||||
}
|
||||
|
||||
if(is_eos) {
|
||||
e = apr_bucket_eos_create(r->connection->bucket_alloc);
|
||||
|
||||
APR_BRIGADE_INSERT_TAIL(bb, e);
|
||||
}
|
||||
}
|
||||
|
||||
status = ap_pass_brigade(r->output_filters, bb);
|
||||
|
||||
ap_remove_output_filter(f);
|
||||
}
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
int modsecFinishRequest(request_rec *r) {
|
||||
// run output filter
|
||||
//if(r->output_filters != NULL && r->output_filters->frec->filter_init_func != NULL)
|
||||
//r->output_filters->frec->filter_init_func(r->output_filters);
|
||||
|
||||
hookfn_log_transaction(r);
|
||||
|
||||
// make sure you cleanup before calling apr_terminate()
|
||||
// otherwise double-free might occur, because of the request body pool cleanup function
|
||||
//
|
||||
apr_pool_destroy(r->connection->pool);
|
||||
|
||||
return DECLINED;
|
||||
}
|
||||
|
||||
void modsecSetLogHook(void *obj, void (*hook)(void *obj, int level, char *str)) {
|
||||
modsecLogObj = obj;
|
||||
modsecLogHook = hook;
|
||||
}
|
||||
|
||||
void modsecSetReadBody(apr_status_t (*func)(request_rec *r, char *buf, unsigned int length, unsigned int *readcnt, int *is_eos)) {
|
||||
modsecReadBody = func;
|
||||
}
|
||||
|
||||
void modsecSetReadResponse(apr_status_t (*func)(request_rec *r, char *buf, unsigned int length, unsigned int *readcnt, int *is_eos)) {
|
||||
modsecReadResponse = func;
|
||||
}
|
||||
|
||||
void modsecSetWriteBody(apr_status_t (*func)(request_rec *r, char *buf, unsigned int length)) {
|
||||
modsecWriteBody = func;
|
||||
}
|
||||
|
||||
void modsecSetWriteResponse(apr_status_t (*func)(request_rec *r, char *buf, unsigned int length)) {
|
||||
modsecWriteResponse = func;
|
||||
}
|
76
standalone/api.h
Normal file
76
standalone/api.h
Normal file
@ -0,0 +1,76 @@
|
||||
/*
|
||||
* ModSecurity for Apache 2.x, http://www.modsecurity.org/
|
||||
* Copyright (c) 2004-2011 Trustwave Holdings, Inc. (http://www.trustwave.com/)
|
||||
*
|
||||
* You may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* If any of the files related to licensing are missing or if you have any
|
||||
* other questions related to licensing please contact Trustwave Holdings, Inc.
|
||||
* directly using the email address security@modsecurity.org.
|
||||
*/
|
||||
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <limits.h>
|
||||
|
||||
#include "http_core.h"
|
||||
#include "http_request.h"
|
||||
|
||||
#include "modsecurity.h"
|
||||
#include "apache2.h"
|
||||
#include "http_main.h"
|
||||
#include "http_connection.h"
|
||||
|
||||
#include "apr_optional.h"
|
||||
#include "mod_log_config.h"
|
||||
|
||||
#include "msc_logging.h"
|
||||
#include "msc_util.h"
|
||||
|
||||
#include "ap_mpm.h"
|
||||
#include "scoreboard.h"
|
||||
|
||||
#include "apr_version.h"
|
||||
|
||||
#include "apr_lib.h"
|
||||
#include "ap_config.h"
|
||||
#include "http_config.h"
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
server_rec *modsecInit();
|
||||
void modsecTerminate();
|
||||
|
||||
void modsecStartConfig();
|
||||
directory_config *modsecGetDefaultConfig();
|
||||
const char *modsecProcessConfig(directory_config *config, const char *dir);
|
||||
void modsecFinalizeConfig();
|
||||
|
||||
void modsecInitProcess();
|
||||
|
||||
conn_rec *modsecNewConnection();
|
||||
void modsecProcessConnection(conn_rec *c);
|
||||
|
||||
request_rec *modsecNewRequest(conn_rec *connection, directory_config *config);
|
||||
int modsecProcessRequest(request_rec *r);
|
||||
int modsecProcessResponse(request_rec *r);
|
||||
int modsecFinishRequest(request_rec *r);
|
||||
|
||||
void modsecSetLogHook(void *obj, void (*hook)(void *obj, int level, char *str));
|
||||
|
||||
void modsecSetReadBody(apr_status_t (*func)(request_rec *r, char *buf, unsigned int length, unsigned int *readcnt, int *is_eos));
|
||||
void modsecSetReadResponse(apr_status_t (*func)(request_rec *r, char *buf, unsigned int length, unsigned int *readcnt, int *is_eos));
|
||||
void modsecSetWriteBody(apr_status_t (*func)(request_rec *r, char *buf, unsigned int length));
|
||||
void modsecSetWriteResponse(apr_status_t (*func)(request_rec *r, char *buf, unsigned int length));
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
184
standalone/buckets.c
Normal file
184
standalone/buckets.c
Normal file
@ -0,0 +1,184 @@
|
||||
/*
|
||||
* ModSecurity for Apache 2.x, http://www.modsecurity.org/
|
||||
* Copyright (c) 2004-2011 Trustwave Holdings, Inc. (http://www.trustwave.com/)
|
||||
*
|
||||
* You may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* If any of the files related to licensing are missing or if you have any
|
||||
* other questions related to licensing please contact Trustwave Holdings, Inc.
|
||||
* directly using the email address security@modsecurity.org.
|
||||
*/
|
||||
|
||||
#include <limits.h>
|
||||
|
||||
#include "http_core.h"
|
||||
#include "http_request.h"
|
||||
|
||||
#include "modsecurity.h"
|
||||
#include "apache2.h"
|
||||
#include "http_main.h"
|
||||
#include "http_connection.h"
|
||||
|
||||
#include "apr_optional.h"
|
||||
#include "mod_log_config.h"
|
||||
|
||||
#include "msc_logging.h"
|
||||
#include "msc_util.h"
|
||||
|
||||
#include "ap_mpm.h"
|
||||
#include "scoreboard.h"
|
||||
|
||||
#include "apr_version.h"
|
||||
|
||||
#include "apr_lib.h"
|
||||
#include "ap_config.h"
|
||||
#include "http_config.h"
|
||||
#include "apr_buckets.h"
|
||||
|
||||
|
||||
AP_DECLARE(apr_status_t) ap_get_brigade(ap_filter_t *next,
|
||||
apr_bucket_brigade *bb,
|
||||
ap_input_mode_t mode,
|
||||
apr_read_type_e block,
|
||||
apr_off_t readbytes)
|
||||
{
|
||||
if (next) {
|
||||
return next->frec->filter_func.in_func(next, bb, mode, block,
|
||||
readbytes);
|
||||
}
|
||||
|
||||
return AP_NOBODY_READ;
|
||||
}
|
||||
|
||||
AP_DECLARE(apr_status_t) ap_pass_brigade(ap_filter_t *next,
|
||||
apr_bucket_brigade *bb)
|
||||
{
|
||||
if (next) {
|
||||
apr_bucket *e;
|
||||
if ((e = APR_BRIGADE_LAST(bb)) && APR_BUCKET_IS_EOS(e) && next->r) {
|
||||
/* This is only safe because HTTP_HEADER filter is always in
|
||||
* the filter stack. This ensures that there is ALWAYS a
|
||||
* request-based filter that we can attach this to. If the
|
||||
* HTTP_FILTER is removed, and another filter is not put in its
|
||||
* place, then handlers like mod_cgi, which attach their own
|
||||
* EOS bucket to the brigade will be broken, because we will
|
||||
* get two EOS buckets on the same request.
|
||||
*/
|
||||
next->r->eos_sent = 1;
|
||||
|
||||
/* remember the eos for internal redirects, too */
|
||||
if (next->r->prev) {
|
||||
request_rec *prev = next->r->prev;
|
||||
|
||||
while (prev) {
|
||||
prev->eos_sent = 1;
|
||||
prev = prev->prev;
|
||||
}
|
||||
}
|
||||
}
|
||||
return next->frec->filter_func.out_func(next, bb);
|
||||
}
|
||||
return AP_NOBODY_WROTE;
|
||||
}
|
||||
|
||||
AP_DECLARE(apr_status_t) ap_save_brigade(ap_filter_t *f,
|
||||
apr_bucket_brigade **saveto,
|
||||
apr_bucket_brigade **b, apr_pool_t *p)
|
||||
{
|
||||
apr_bucket *e;
|
||||
apr_status_t rv, srv = APR_SUCCESS;
|
||||
|
||||
/* If have never stored any data in the filter, then we had better
|
||||
* create an empty bucket brigade so that we can concat.
|
||||
*/
|
||||
if (!(*saveto)) {
|
||||
*saveto = apr_brigade_create(p, f->c->bucket_alloc);
|
||||
}
|
||||
|
||||
for (e = APR_BRIGADE_FIRST(*b);
|
||||
e != APR_BRIGADE_SENTINEL(*b);
|
||||
e = APR_BUCKET_NEXT(e))
|
||||
{
|
||||
rv = apr_bucket_setaside(e, p);
|
||||
|
||||
/* If the bucket type does not implement setaside, then
|
||||
* (hopefully) morph it into a bucket type which does, and set
|
||||
* *that* aside... */
|
||||
if (rv == APR_ENOTIMPL) {
|
||||
const char *s;
|
||||
apr_size_t n;
|
||||
|
||||
rv = apr_bucket_read(e, &s, &n, APR_BLOCK_READ);
|
||||
if (rv == APR_SUCCESS) {
|
||||
rv = apr_bucket_setaside(e, p);
|
||||
}
|
||||
}
|
||||
|
||||
if (rv != APR_SUCCESS) {
|
||||
srv = rv;
|
||||
/* Return an error but still save the brigade if
|
||||
* ->setaside() is really not implemented. */
|
||||
if (rv != APR_ENOTIMPL) {
|
||||
return rv;
|
||||
}
|
||||
}
|
||||
}
|
||||
APR_BRIGADE_CONCAT(*saveto, *b);
|
||||
return srv;
|
||||
}
|
||||
|
||||
static apr_status_t error_bucket_read(apr_bucket *b, const char **str,
|
||||
apr_size_t *len, apr_read_type_e block)
|
||||
{
|
||||
*str = "Unknown error.";
|
||||
*len = strlen(*str);
|
||||
return APR_SUCCESS;
|
||||
}
|
||||
|
||||
static void error_bucket_destroy(void *data)
|
||||
{
|
||||
ap_bucket_error *h = data;
|
||||
|
||||
if (apr_bucket_shared_destroy(h)) {
|
||||
apr_bucket_free(h);
|
||||
}
|
||||
}
|
||||
|
||||
AP_DECLARE_DATA const apr_bucket_type_t ap_bucket_type_error = {
|
||||
"ERROR", 5, APR_BUCKET_METADATA,
|
||||
error_bucket_destroy,
|
||||
error_bucket_read,
|
||||
apr_bucket_setaside_notimpl,
|
||||
apr_bucket_split_notimpl,
|
||||
apr_bucket_shared_copy
|
||||
};
|
||||
|
||||
AP_DECLARE(apr_bucket *) ap_bucket_error_make(apr_bucket *b, int error,
|
||||
const char *buf, apr_pool_t *p)
|
||||
{
|
||||
ap_bucket_error *h;
|
||||
|
||||
h = apr_bucket_alloc(sizeof(*h), b->list);
|
||||
h->status = error;
|
||||
h->data = (buf) ? apr_pstrdup(p, buf) : NULL;
|
||||
|
||||
b = apr_bucket_shared_make(b, h, 0, 0);
|
||||
b->type = &ap_bucket_type_error;
|
||||
return b;
|
||||
}
|
||||
|
||||
AP_DECLARE(apr_bucket *) ap_bucket_error_create(int error, const char *buf,
|
||||
apr_pool_t *p,
|
||||
apr_bucket_alloc_t *list)
|
||||
{
|
||||
apr_bucket *b = apr_bucket_alloc(sizeof(*b), list);
|
||||
|
||||
APR_BUCKET_INIT(b);
|
||||
b->free = apr_bucket_free;
|
||||
b->list = list;
|
||||
return ap_bucket_error_make(b, error, buf, p);
|
||||
}
|
||||
|
623
standalone/config.c
Normal file
623
standalone/config.c
Normal file
@ -0,0 +1,623 @@
|
||||
/*
|
||||
* ModSecurity for Apache 2.x, http://www.modsecurity.org/
|
||||
* Copyright (c) 2004-2011 Trustwave Holdings, Inc. (http://www.trustwave.com/)
|
||||
*
|
||||
* You may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* If any of the files related to licensing are missing or if you have any
|
||||
* other questions related to licensing please contact Trustwave Holdings, Inc.
|
||||
* directly using the email address security@modsecurity.org.
|
||||
*/
|
||||
|
||||
#include <limits.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include "http_core.h"
|
||||
#include "http_request.h"
|
||||
|
||||
#include "modsecurity.h"
|
||||
#include "apache2.h"
|
||||
#include "http_main.h"
|
||||
#include "http_connection.h"
|
||||
|
||||
#include "apr_optional.h"
|
||||
#include "mod_log_config.h"
|
||||
|
||||
#include "msc_logging.h"
|
||||
#include "msc_util.h"
|
||||
|
||||
#include "ap_mpm.h"
|
||||
#include "scoreboard.h"
|
||||
|
||||
#include "apr_version.h"
|
||||
|
||||
#include "apr_lib.h"
|
||||
#include "ap_config.h"
|
||||
#include "http_config.h"
|
||||
|
||||
|
||||
AP_DECLARE(int) ap_cfg_closefile(ap_configfile_t *cfp)
|
||||
{
|
||||
#ifdef DEBUG
|
||||
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, NULL,
|
||||
"Done with config file %s", cfp->name);
|
||||
#endif
|
||||
return (cfp->close == NULL) ? 0 : cfp->close(cfp->param);
|
||||
}
|
||||
|
||||
static apr_status_t cfg_close(void *param)
|
||||
{
|
||||
apr_file_t *cfp = (apr_file_t *) param;
|
||||
return (apr_file_close(cfp));
|
||||
}
|
||||
|
||||
static int cfg_getch(void *param)
|
||||
{
|
||||
char ch;
|
||||
apr_file_t *cfp = (apr_file_t *) param;
|
||||
if (apr_file_getc(&ch, cfp) == APR_SUCCESS)
|
||||
return ch;
|
||||
return (int)EOF;
|
||||
}
|
||||
|
||||
static void *cfg_getstr(void *buf, size_t bufsiz, void *param)
|
||||
{
|
||||
apr_file_t *cfp = (apr_file_t *) param;
|
||||
apr_status_t rv;
|
||||
rv = apr_file_gets(buf, bufsiz, cfp);
|
||||
if (rv == APR_SUCCESS) {
|
||||
return buf;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* Read one line from open ap_configfile_t, strip LF, increase line number */
|
||||
/* If custom handler does not define a getstr() function, read char by char */
|
||||
AP_DECLARE(int) ap_cfg_getline(char *buf, size_t bufsize, ap_configfile_t *cfp)
|
||||
{
|
||||
/* If a "get string" function is defined, use it */
|
||||
if (cfp->getstr != NULL) {
|
||||
char *src, *dst;
|
||||
char *cp;
|
||||
char *cbuf = buf;
|
||||
size_t cbufsize = bufsize;
|
||||
|
||||
while (1) {
|
||||
++cfp->line_number;
|
||||
if (cfp->getstr(cbuf, cbufsize, cfp->param) == NULL)
|
||||
return 1;
|
||||
|
||||
/*
|
||||
* check for line continuation,
|
||||
* i.e. match [^\\]\\[\r]\n only
|
||||
*/
|
||||
cp = cbuf;
|
||||
while (cp < cbuf+cbufsize && *cp != '\0')
|
||||
cp++;
|
||||
if (cp > cbuf && cp[-1] == LF) {
|
||||
cp--;
|
||||
if (cp > cbuf && cp[-1] == CR)
|
||||
cp--;
|
||||
if (cp > cbuf && cp[-1] == '\\') {
|
||||
cp--;
|
||||
if (!(cp > cbuf && cp[-1] == '\\')) {
|
||||
/*
|
||||
* line continuation requested -
|
||||
* then remove backslash and continue
|
||||
*/
|
||||
cbufsize -= (cp-cbuf);
|
||||
cbuf = cp;
|
||||
continue;
|
||||
}
|
||||
else {
|
||||
/*
|
||||
* no real continuation because escaped -
|
||||
* then just remove escape character
|
||||
*/
|
||||
for ( ; cp < cbuf+cbufsize && *cp != '\0'; cp++)
|
||||
cp[0] = cp[1];
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
/*
|
||||
* Leading and trailing white space is eliminated completely
|
||||
*/
|
||||
src = buf;
|
||||
while (apr_isspace(*src))
|
||||
++src;
|
||||
/* blast trailing whitespace */
|
||||
dst = &src[strlen(src)];
|
||||
while (--dst >= src && apr_isspace(*dst))
|
||||
*dst = '\0';
|
||||
/* Zap leading whitespace by shifting */
|
||||
if (src != buf)
|
||||
for (dst = buf; (*dst++ = *src++) != '\0'; )
|
||||
;
|
||||
|
||||
#ifdef DEBUG_CFG_LINES
|
||||
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, NULL, "Read config: %s", buf);
|
||||
#endif
|
||||
return 0;
|
||||
} else {
|
||||
/* No "get string" function defined; read character by character */
|
||||
register int c;
|
||||
register size_t i = 0;
|
||||
|
||||
buf[0] = '\0';
|
||||
/* skip leading whitespace */
|
||||
do {
|
||||
c = cfp->getch(cfp->param);
|
||||
} while (c == '\t' || c == ' ');
|
||||
|
||||
if (c == EOF)
|
||||
return 1;
|
||||
|
||||
if(bufsize < 2) {
|
||||
/* too small, assume caller is crazy */
|
||||
return 1;
|
||||
}
|
||||
|
||||
while (1) {
|
||||
if ((c == '\t') || (c == ' ')) {
|
||||
buf[i++] = ' ';
|
||||
while ((c == '\t') || (c == ' '))
|
||||
c = cfp->getch(cfp->param);
|
||||
}
|
||||
if (c == CR) {
|
||||
/* silently ignore CR (_assume_ that a LF follows) */
|
||||
c = cfp->getch(cfp->param);
|
||||
}
|
||||
if (c == LF) {
|
||||
/* increase line number and return on LF */
|
||||
++cfp->line_number;
|
||||
}
|
||||
if (c == EOF || c == 0x4 || c == LF || i >= (bufsize - 2)) {
|
||||
/*
|
||||
* check for line continuation
|
||||
*/
|
||||
if (i > 0 && buf[i-1] == '\\') {
|
||||
i--;
|
||||
if (!(i > 0 && buf[i-1] == '\\')) {
|
||||
/* line is continued */
|
||||
c = cfp->getch(cfp->param);
|
||||
continue;
|
||||
}
|
||||
/* else nothing needs be done because
|
||||
* then the backslash is escaped and
|
||||
* we just strip to a single one
|
||||
*/
|
||||
}
|
||||
/* blast trailing whitespace */
|
||||
while (i > 0 && apr_isspace(buf[i - 1]))
|
||||
--i;
|
||||
buf[i] = '\0';
|
||||
#ifdef DEBUG_CFG_LINES
|
||||
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, NULL,
|
||||
"Read config: %s", buf);
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
buf[i] = c;
|
||||
++i;
|
||||
c = cfp->getch(cfp->param);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static char *substring_conf(apr_pool_t *p, const char *start, int len,
|
||||
char quote)
|
||||
{
|
||||
char *result = apr_palloc(p, len + 2);
|
||||
char *resp = result;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < len; ++i) {
|
||||
if (start[i] == '\\' && (start[i + 1] == '\\'
|
||||
|| (quote && start[i + 1] == quote)))
|
||||
*resp++ = start[++i];
|
||||
else
|
||||
*resp++ = start[i];
|
||||
}
|
||||
|
||||
*resp++ = '\0';
|
||||
#if RESOLVE_ENV_PER_TOKEN
|
||||
return (char *)ap_resolve_env(p,result);
|
||||
#else
|
||||
return result;
|
||||
#endif
|
||||
}
|
||||
|
||||
AP_DECLARE(char *) ap_getword_conf(apr_pool_t *p, const char **line)
|
||||
{
|
||||
const char *str = *line, *strend;
|
||||
char *res;
|
||||
char quote;
|
||||
|
||||
while (*str && apr_isspace(*str))
|
||||
++str;
|
||||
|
||||
if (!*str) {
|
||||
*line = str;
|
||||
return "";
|
||||
}
|
||||
|
||||
if ((quote = *str) == '"' || quote == '\'') {
|
||||
strend = str + 1;
|
||||
while (*strend && *strend != quote) {
|
||||
if (*strend == '\\' && strend[1] &&
|
||||
(strend[1] == quote || strend[1] == '\\')) {
|
||||
strend += 2;
|
||||
}
|
||||
else {
|
||||
++strend;
|
||||
}
|
||||
}
|
||||
res = substring_conf(p, str + 1, strend - str - 1, quote);
|
||||
|
||||
if (*strend == quote)
|
||||
++strend;
|
||||
}
|
||||
else {
|
||||
strend = str;
|
||||
while (*strend && !apr_isspace(*strend))
|
||||
++strend;
|
||||
|
||||
res = substring_conf(p, str, strend - str, 0);
|
||||
}
|
||||
|
||||
while (*strend && apr_isspace(*strend))
|
||||
++strend;
|
||||
*line = strend;
|
||||
return res;
|
||||
}
|
||||
|
||||
/* Open a ap_configfile_t as FILE, return open ap_configfile_t struct pointer */
|
||||
AP_DECLARE(apr_status_t) ap_pcfg_openfile(ap_configfile_t **ret_cfg,
|
||||
apr_pool_t *p, const char *name)
|
||||
{
|
||||
ap_configfile_t *new_cfg;
|
||||
apr_file_t *file = NULL;
|
||||
apr_finfo_t finfo;
|
||||
apr_status_t status;
|
||||
#ifdef DEBUG
|
||||
char buf[120];
|
||||
#endif
|
||||
|
||||
if (name == NULL) {
|
||||
ap_log_error(APLOG_MARK, APLOG_ERR, 0, NULL,
|
||||
"Internal error: pcfg_openfile() called with NULL filename");
|
||||
return APR_EBADF;
|
||||
}
|
||||
|
||||
status = apr_file_open(&file, name, APR_READ | APR_BUFFERED,
|
||||
APR_OS_DEFAULT, p);
|
||||
#ifdef DEBUG
|
||||
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, NULL,
|
||||
"Opening config file %s (%s)",
|
||||
name, (status != APR_SUCCESS) ?
|
||||
apr_strerror(status, buf, sizeof(buf)) : "successful");
|
||||
#endif
|
||||
if (status != APR_SUCCESS)
|
||||
return status;
|
||||
|
||||
status = apr_file_info_get(&finfo, APR_FINFO_TYPE, file);
|
||||
if (status != APR_SUCCESS)
|
||||
return status;
|
||||
|
||||
if (finfo.filetype != APR_REG &&
|
||||
#if defined(WIN32) || defined(OS2) || defined(NETWARE)
|
||||
strcasecmp(apr_filepath_name_get(name), "nul") != 0) {
|
||||
#else
|
||||
strcmp(name, "/dev/null") != 0) {
|
||||
#endif /* WIN32 || OS2 */
|
||||
ap_log_error(APLOG_MARK, APLOG_ERR, 0, NULL,
|
||||
"Access to file %s denied by server: not a regular file",
|
||||
name);
|
||||
apr_file_close(file);
|
||||
return APR_EBADF;
|
||||
}
|
||||
|
||||
#ifdef WIN32
|
||||
/* Some twisted character [no pun intended] at MS decided that a
|
||||
* zero width joiner as the lead wide character would be ideal for
|
||||
* describing Unicode text files. This was further convoluted to
|
||||
* another MSism that the same character mapped into utf-8, EF BB BF
|
||||
* would signify utf-8 text files.
|
||||
*
|
||||
* Since MS configuration files are all protecting utf-8 encoded
|
||||
* Unicode path, file and resource names, we already have the correct
|
||||
* WinNT encoding. But at least eat the stupid three bytes up front.
|
||||
*/
|
||||
{
|
||||
unsigned char buf[4];
|
||||
apr_size_t len = 3;
|
||||
status = apr_file_read(file, buf, &len);
|
||||
if ((status != APR_SUCCESS) || (len < 3)
|
||||
|| memcmp(buf, "\xEF\xBB\xBF", 3) != 0) {
|
||||
apr_off_t zero = 0;
|
||||
apr_file_seek(file, APR_SET, &zero);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
new_cfg = apr_palloc(p, sizeof(*new_cfg));
|
||||
new_cfg->param = file;
|
||||
new_cfg->name = apr_pstrdup(p, name);
|
||||
new_cfg->getch = (int (*)(void *)) cfg_getch;
|
||||
new_cfg->getstr = (void *(*)(void *, size_t, void *)) cfg_getstr;
|
||||
new_cfg->close = (int (*)(void *)) cfg_close;
|
||||
new_cfg->line_number = 0;
|
||||
*ret_cfg = new_cfg;
|
||||
return APR_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
AP_CORE_DECLARE(const command_rec *) ap_find_command(const char *name,
|
||||
const command_rec *cmds)
|
||||
{
|
||||
while (cmds->name) {
|
||||
if (!strcasecmp(name, cmds->name))
|
||||
return cmds;
|
||||
|
||||
++cmds;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#define AP_MAX_ARGC 64
|
||||
|
||||
static const char *invoke_cmd(const command_rec *cmd, cmd_parms *parms,
|
||||
void *mconfig, const char *args)
|
||||
{
|
||||
char *w, *w2, *w3;
|
||||
const char *errmsg = NULL;
|
||||
|
||||
if ((parms->override & cmd->req_override) == 0)
|
||||
return apr_pstrcat(parms->pool, cmd->name, " not allowed here", NULL);
|
||||
|
||||
parms->info = cmd->cmd_data;
|
||||
parms->cmd = cmd;
|
||||
|
||||
switch (cmd->args_how) {
|
||||
case RAW_ARGS:
|
||||
#ifdef RESOLVE_ENV_PER_TOKEN
|
||||
args = ap_resolve_env(parms->pool,args);
|
||||
#endif
|
||||
return cmd->AP_RAW_ARGS(parms, mconfig, args);
|
||||
|
||||
case TAKE_ARGV:
|
||||
{
|
||||
char *argv[AP_MAX_ARGC];
|
||||
int argc = 0;
|
||||
|
||||
do {
|
||||
w = ap_getword_conf(parms->pool, &args);
|
||||
if (*w == '\0' && *args == '\0') {
|
||||
break;
|
||||
}
|
||||
argv[argc] = w;
|
||||
argc++;
|
||||
} while (argc < AP_MAX_ARGC && *args != '\0');
|
||||
|
||||
return cmd->AP_TAKE_ARGV(parms, mconfig, argc, argv);
|
||||
}
|
||||
|
||||
case NO_ARGS:
|
||||
if (*args != 0)
|
||||
return apr_pstrcat(parms->pool, cmd->name, " takes no arguments",
|
||||
NULL);
|
||||
|
||||
return cmd->AP_NO_ARGS(parms, mconfig);
|
||||
|
||||
case TAKE1:
|
||||
w = ap_getword_conf(parms->pool, &args);
|
||||
|
||||
if (*w == '\0' || *args != 0)
|
||||
return apr_pstrcat(parms->pool, cmd->name, " takes one argument",
|
||||
cmd->errmsg ? ", " : NULL, cmd->errmsg, NULL);
|
||||
|
||||
return cmd->AP_TAKE1(parms, mconfig, w);
|
||||
|
||||
case TAKE2:
|
||||
w = ap_getword_conf(parms->pool, &args);
|
||||
w2 = ap_getword_conf(parms->pool, &args);
|
||||
|
||||
if (*w == '\0' || *w2 == '\0' || *args != 0)
|
||||
return apr_pstrcat(parms->pool, cmd->name, " takes two arguments",
|
||||
cmd->errmsg ? ", " : NULL, cmd->errmsg, NULL);
|
||||
|
||||
return cmd->AP_TAKE2(parms, mconfig, w, w2);
|
||||
|
||||
case TAKE12:
|
||||
w = ap_getword_conf(parms->pool, &args);
|
||||
w2 = ap_getword_conf(parms->pool, &args);
|
||||
|
||||
if (*w == '\0' || *args != 0)
|
||||
return apr_pstrcat(parms->pool, cmd->name, " takes 1-2 arguments",
|
||||
cmd->errmsg ? ", " : NULL, cmd->errmsg, NULL);
|
||||
|
||||
return cmd->AP_TAKE2(parms, mconfig, w, *w2 ? w2 : NULL);
|
||||
|
||||
case TAKE3:
|
||||
w = ap_getword_conf(parms->pool, &args);
|
||||
w2 = ap_getword_conf(parms->pool, &args);
|
||||
w3 = ap_getword_conf(parms->pool, &args);
|
||||
|
||||
if (*w == '\0' || *w2 == '\0' || *w3 == '\0' || *args != 0)
|
||||
return apr_pstrcat(parms->pool, cmd->name, " takes three arguments",
|
||||
cmd->errmsg ? ", " : NULL, cmd->errmsg, NULL);
|
||||
|
||||
return cmd->AP_TAKE3(parms, mconfig, w, w2, w3);
|
||||
|
||||
case TAKE23:
|
||||
w = ap_getword_conf(parms->pool, &args);
|
||||
w2 = ap_getword_conf(parms->pool, &args);
|
||||
w3 = *args ? ap_getword_conf(parms->pool, &args) : NULL;
|
||||
|
||||
if (*w == '\0' || *w2 == '\0' || *args != 0)
|
||||
return apr_pstrcat(parms->pool, cmd->name,
|
||||
" takes two or three arguments",
|
||||
cmd->errmsg ? ", " : NULL, cmd->errmsg, NULL);
|
||||
|
||||
return cmd->AP_TAKE3(parms, mconfig, w, w2, w3);
|
||||
|
||||
case TAKE123:
|
||||
w = ap_getword_conf(parms->pool, &args);
|
||||
w2 = *args ? ap_getword_conf(parms->pool, &args) : NULL;
|
||||
w3 = *args ? ap_getword_conf(parms->pool, &args) : NULL;
|
||||
|
||||
if (*w == '\0' || *args != 0)
|
||||
return apr_pstrcat(parms->pool, cmd->name,
|
||||
" takes one, two or three arguments",
|
||||
cmd->errmsg ? ", " : NULL, cmd->errmsg, NULL);
|
||||
|
||||
return cmd->AP_TAKE3(parms, mconfig, w, w2, w3);
|
||||
|
||||
case TAKE13:
|
||||
w = ap_getword_conf(parms->pool, &args);
|
||||
w2 = *args ? ap_getword_conf(parms->pool, &args) : NULL;
|
||||
w3 = *args ? ap_getword_conf(parms->pool, &args) : NULL;
|
||||
|
||||
if (*w == '\0' || (w2 && *w2 && !w3) || *args != 0)
|
||||
return apr_pstrcat(parms->pool, cmd->name,
|
||||
" takes one or three arguments",
|
||||
cmd->errmsg ? ", " : NULL, cmd->errmsg, NULL);
|
||||
|
||||
return cmd->AP_TAKE3(parms, mconfig, w, w2, w3);
|
||||
|
||||
case ITERATE:
|
||||
while (*(w = ap_getword_conf(parms->pool, &args)) != '\0') {
|
||||
|
||||
errmsg = cmd->AP_TAKE1(parms, mconfig, w);
|
||||
|
||||
if (errmsg && strcmp(errmsg, DECLINE_CMD) != 0)
|
||||
return errmsg;
|
||||
}
|
||||
|
||||
return errmsg;
|
||||
|
||||
case ITERATE2:
|
||||
w = ap_getword_conf(parms->pool, &args);
|
||||
|
||||
if (*w == '\0' || *args == 0)
|
||||
return apr_pstrcat(parms->pool, cmd->name,
|
||||
" requires at least two arguments",
|
||||
cmd->errmsg ? ", " : NULL, cmd->errmsg, NULL);
|
||||
|
||||
while (*(w2 = ap_getword_conf(parms->pool, &args)) != '\0') {
|
||||
|
||||
errmsg = cmd->AP_TAKE2(parms, mconfig, w, w2);
|
||||
|
||||
if (errmsg && strcmp(errmsg, DECLINE_CMD) != 0)
|
||||
return errmsg;
|
||||
}
|
||||
|
||||
return errmsg;
|
||||
|
||||
case FLAG:
|
||||
w = ap_getword_conf(parms->pool, &args);
|
||||
|
||||
if (*w == '\0' || (strcasecmp(w, "on") && strcasecmp(w, "off")))
|
||||
return apr_pstrcat(parms->pool, cmd->name, " must be On or Off",
|
||||
NULL);
|
||||
|
||||
return cmd->AP_FLAG(parms, mconfig, strcasecmp(w, "off") != 0);
|
||||
|
||||
default:
|
||||
return apr_pstrcat(parms->pool, cmd->name,
|
||||
" is improperly configured internally (server bug)",
|
||||
NULL);
|
||||
}
|
||||
}
|
||||
|
||||
static cmd_parms default_parms =
|
||||
{NULL, 0, -1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL};
|
||||
|
||||
|
||||
const char *process_command_config(server_rec *s,
|
||||
void *mconfig,
|
||||
apr_pool_t *p,
|
||||
apr_pool_t *ptemp,
|
||||
const char *filename)
|
||||
{
|
||||
const char *errmsg;
|
||||
cmd_parms parms;
|
||||
char *l = apr_palloc (ptemp, MAX_STRING_LEN);
|
||||
const char *args = l;
|
||||
char *cmd_name;
|
||||
const command_rec *cmd;
|
||||
apr_array_header_t *arr = apr_array_make(p, 1, sizeof(char *));
|
||||
apr_status_t status;
|
||||
ap_directive_t *newdir;
|
||||
|
||||
parms = default_parms;
|
||||
parms.pool = p;
|
||||
parms.temp_pool = ptemp;
|
||||
parms.server = s;
|
||||
parms.override = (RSRC_CONF | OR_ALL) & ~(OR_AUTHCFG | OR_LIMIT);
|
||||
parms.override_opts = OPT_ALL | OPT_SYM_OWNER | OPT_MULTI;
|
||||
|
||||
status = ap_pcfg_openfile(&parms.config_file, p, filename);
|
||||
|
||||
if(status != APR_SUCCESS)
|
||||
{
|
||||
// cannot open config file
|
||||
//
|
||||
}
|
||||
|
||||
while (!(ap_cfg_getline(l, MAX_STRING_LEN, parms.config_file))) {
|
||||
if (*l == '#' || *l == '\0')
|
||||
continue;
|
||||
|
||||
args = l;
|
||||
|
||||
cmd_name = ap_getword_conf(p, &args);
|
||||
if (*cmd_name == '\0')
|
||||
continue;
|
||||
|
||||
cmd = ap_find_command(cmd_name, security2_module.cmds);
|
||||
|
||||
if(cmd == NULL)
|
||||
{
|
||||
// unknown command, should error
|
||||
//
|
||||
printf("Unknown command: %s\n", cmd_name);
|
||||
continue;
|
||||
}
|
||||
|
||||
newdir = apr_pcalloc(p, sizeof(ap_directive_t));
|
||||
newdir->filename = parms.config_file->name;
|
||||
newdir->line_num = parms.config_file->line_number;
|
||||
newdir->directive = cmd_name;
|
||||
newdir->args = apr_pstrdup(p, args);
|
||||
|
||||
parms.directive = newdir;
|
||||
|
||||
errmsg = invoke_cmd(cmd, &parms, mconfig, args);
|
||||
|
||||
if(errmsg != NULL)
|
||||
break;
|
||||
}
|
||||
|
||||
ap_cfg_closefile(parms.config_file);
|
||||
|
||||
if (errmsg) {
|
||||
char *err = (char *)apr_palloc(p, 1024);
|
||||
|
||||
apr_snprintf(err, 1024, "Syntax error in config file %s, line %d: %s", parms.config_file->name,
|
||||
parms.config_file->line_number, errmsg);
|
||||
|
||||
return err;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
248
standalone/filters.c
Normal file
248
standalone/filters.c
Normal file
@ -0,0 +1,248 @@
|
||||
/*
|
||||
* ModSecurity for Apache 2.x, http://www.modsecurity.org/
|
||||
* Copyright (c) 2004-2011 Trustwave Holdings, Inc. (http://www.trustwave.com/)
|
||||
*
|
||||
* You may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* If any of the files related to licensing are missing or if you have any
|
||||
* other questions related to licensing please contact Trustwave Holdings, Inc.
|
||||
* directly using the email address security@modsecurity.org.
|
||||
*/
|
||||
|
||||
#include <limits.h>
|
||||
|
||||
#include "http_core.h"
|
||||
#include "http_request.h"
|
||||
|
||||
#include "modsecurity.h"
|
||||
#include "apache2.h"
|
||||
#include "http_main.h"
|
||||
#include "http_connection.h"
|
||||
|
||||
#include "apr_optional.h"
|
||||
#include "mod_log_config.h"
|
||||
|
||||
#include "msc_logging.h"
|
||||
#include "msc_util.h"
|
||||
|
||||
#include "ap_mpm.h"
|
||||
#include "scoreboard.h"
|
||||
|
||||
#include "apr_version.h"
|
||||
|
||||
#include "apr_lib.h"
|
||||
#include "ap_config.h"
|
||||
#include "http_config.h"
|
||||
|
||||
#define FILTER_POOL apr_hook_global_pool
|
||||
#include "apr_hooks.h"
|
||||
|
||||
/*
|
||||
** This macro returns true/false if a given filter should be inserted BEFORE
|
||||
** another filter. This will happen when one of: 1) there isn't another
|
||||
** filter; 2) that filter has a higher filter type (class); 3) that filter
|
||||
** corresponds to a different request.
|
||||
*/
|
||||
#define INSERT_BEFORE(f, before_this) ((before_this) == NULL \
|
||||
|| (before_this)->frec->ftype > (f)->frec->ftype \
|
||||
|| (before_this)->r != (f)->r)
|
||||
|
||||
|
||||
apr_table_t *ms_input_filters = NULL;
|
||||
apr_table_t *ms_output_filters = NULL;
|
||||
|
||||
void init_filter_tables()
|
||||
{
|
||||
if(ms_input_filters == NULL)
|
||||
{
|
||||
ms_input_filters = apr_table_make(FILTER_POOL, 10);
|
||||
ms_output_filters = apr_table_make(FILTER_POOL, 10);
|
||||
}
|
||||
}
|
||||
|
||||
AP_DECLARE(ap_filter_rec_t *) ap_register_input_filter(const char *name,
|
||||
ap_in_filter_func filter_func,
|
||||
ap_init_filter_func filter_init,
|
||||
ap_filter_type ftype)
|
||||
{
|
||||
ap_filter_rec_t *f;
|
||||
|
||||
init_filter_tables();
|
||||
|
||||
f = apr_palloc(FILTER_POOL, sizeof(ap_filter_rec_t));
|
||||
|
||||
f->filter_func.in_func = filter_func;
|
||||
f->filter_init_func = filter_init;
|
||||
f->ftype = ftype;
|
||||
f->name = name;
|
||||
|
||||
apr_table_setn(ms_input_filters, name, (const char *)f);
|
||||
|
||||
return f;
|
||||
}
|
||||
|
||||
AP_DECLARE(ap_filter_rec_t *) ap_register_output_filter(const char *name,
|
||||
ap_out_filter_func filter_func,
|
||||
ap_init_filter_func filter_init,
|
||||
ap_filter_type ftype)
|
||||
{
|
||||
ap_filter_rec_t *f;
|
||||
|
||||
init_filter_tables();
|
||||
|
||||
f = apr_palloc(FILTER_POOL, sizeof(ap_filter_rec_t));
|
||||
|
||||
f->filter_func.out_func = filter_func;
|
||||
f->filter_init_func = filter_init;
|
||||
f->ftype = ftype;
|
||||
f->name = name;
|
||||
|
||||
apr_table_setn(ms_output_filters, name, (const char *)f);
|
||||
|
||||
return f;
|
||||
}
|
||||
|
||||
static ap_filter_t *add_any_filter_handle(ap_filter_rec_t *frec, void *ctx,
|
||||
request_rec *r, conn_rec *c,
|
||||
ap_filter_t **r_filters,
|
||||
ap_filter_t **p_filters,
|
||||
ap_filter_t **c_filters)
|
||||
{
|
||||
apr_pool_t* p = r ? r->pool : c->pool;
|
||||
ap_filter_t *f = apr_palloc(p, sizeof(*f));
|
||||
ap_filter_t **outf;
|
||||
|
||||
if (frec->ftype < AP_FTYPE_PROTOCOL) {
|
||||
if (r) {
|
||||
outf = r_filters;
|
||||
}
|
||||
else {
|
||||
ap_log_error(APLOG_MARK, APLOG_ERR, 0, NULL,
|
||||
"a content filter was added without a request: %s", frec->name);
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
else if (frec->ftype < AP_FTYPE_CONNECTION) {
|
||||
if (r) {
|
||||
outf = p_filters;
|
||||
}
|
||||
else {
|
||||
ap_log_error(APLOG_MARK, APLOG_ERR, 0, NULL,
|
||||
"a protocol filter was added without a request: %s", frec->name);
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
else {
|
||||
outf = c_filters;
|
||||
}
|
||||
|
||||
f->frec = frec;
|
||||
f->ctx = ctx;
|
||||
f->r = r;
|
||||
f->c = c;
|
||||
f->next = NULL;
|
||||
|
||||
if (INSERT_BEFORE(f, *outf)) {
|
||||
f->next = *outf;
|
||||
|
||||
if (*outf) {
|
||||
ap_filter_t *first = NULL;
|
||||
|
||||
if (r) {
|
||||
/* If we are adding our first non-connection filter,
|
||||
* Then don't try to find the right location, it is
|
||||
* automatically first.
|
||||
*/
|
||||
if (*r_filters != *c_filters) {
|
||||
first = *r_filters;
|
||||
while (first && (first->next != (*outf))) {
|
||||
first = first->next;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (first && first != (*outf)) {
|
||||
first->next = f;
|
||||
}
|
||||
}
|
||||
*outf = f;
|
||||
}
|
||||
else {
|
||||
ap_filter_t *fscan = *outf;
|
||||
while (!INSERT_BEFORE(f, fscan->next))
|
||||
fscan = fscan->next;
|
||||
|
||||
f->next = fscan->next;
|
||||
fscan->next = f;
|
||||
}
|
||||
|
||||
if (frec->ftype < AP_FTYPE_CONNECTION && (*r_filters == *c_filters)) {
|
||||
*r_filters = *p_filters;
|
||||
}
|
||||
return f;
|
||||
}
|
||||
|
||||
AP_DECLARE(ap_filter_t *) ap_add_input_filter(const char *name, void *ctx,
|
||||
request_rec *r, conn_rec *c)
|
||||
{
|
||||
ap_filter_rec_t *f = (ap_filter_rec_t *)apr_table_get(ms_input_filters, name);
|
||||
|
||||
if(f == NULL)
|
||||
return NULL;
|
||||
|
||||
return add_any_filter_handle(f, ctx, r, c,
|
||||
r ? &r->input_filters : NULL,
|
||||
r ? &r->proto_input_filters : NULL, &c->input_filters);
|
||||
}
|
||||
|
||||
AP_DECLARE(ap_filter_t *) ap_add_output_filter(const char *name, void *ctx,
|
||||
request_rec *r, conn_rec *c)
|
||||
{
|
||||
ap_filter_rec_t *f = (ap_filter_rec_t *)apr_table_get(ms_output_filters, name);
|
||||
|
||||
if(f == NULL)
|
||||
return NULL;
|
||||
|
||||
return add_any_filter_handle(f, ctx, r, c,
|
||||
r ? &r->output_filters : NULL,
|
||||
r ? &r->proto_output_filters : NULL, &c->output_filters);
|
||||
}
|
||||
|
||||
static void remove_any_filter(ap_filter_t *f, ap_filter_t **r_filt, ap_filter_t **p_filt,
|
||||
ap_filter_t **c_filt)
|
||||
{
|
||||
ap_filter_t **curr = r_filt ? r_filt : c_filt;
|
||||
ap_filter_t *fscan = *curr;
|
||||
|
||||
if (p_filt && *p_filt == f)
|
||||
*p_filt = (*p_filt)->next;
|
||||
|
||||
if (*curr == f) {
|
||||
*curr = (*curr)->next;
|
||||
return;
|
||||
}
|
||||
|
||||
while (fscan->next != f) {
|
||||
if (!(fscan = fscan->next)) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
fscan->next = f->next;
|
||||
}
|
||||
|
||||
AP_DECLARE(void) ap_remove_input_filter(ap_filter_t *f)
|
||||
{
|
||||
remove_any_filter(f, f->r ? &f->r->input_filters : NULL,
|
||||
f->r ? &f->r->proto_input_filters : NULL,
|
||||
&f->c->input_filters);
|
||||
}
|
||||
|
||||
AP_DECLARE(void) ap_remove_output_filter(ap_filter_t *f)
|
||||
{
|
||||
remove_any_filter(f, f->r ? &f->r->output_filters : NULL,
|
||||
f->r ? &f->r->proto_output_filters : NULL,
|
||||
&f->c->output_filters);
|
||||
}
|
65
standalone/hooks.c
Normal file
65
standalone/hooks.c
Normal file
@ -0,0 +1,65 @@
|
||||
/*
|
||||
* ModSecurity for Apache 2.x, http://www.modsecurity.org/
|
||||
* Copyright (c) 2004-2011 Trustwave Holdings, Inc. (http://www.trustwave.com/)
|
||||
*
|
||||
* You may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* If any of the files related to licensing are missing or if you have any
|
||||
* other questions related to licensing please contact Trustwave Holdings, Inc.
|
||||
* directly using the email address security@modsecurity.org.
|
||||
*/
|
||||
|
||||
#include <limits.h>
|
||||
|
||||
#include "http_core.h"
|
||||
#include "http_request.h"
|
||||
|
||||
#include "modsecurity.h"
|
||||
#include "apache2.h"
|
||||
#include "http_main.h"
|
||||
#include "http_connection.h"
|
||||
|
||||
#include "apr_optional.h"
|
||||
#include "mod_log_config.h"
|
||||
|
||||
#include "msc_logging.h"
|
||||
#include "msc_util.h"
|
||||
|
||||
#include "ap_mpm.h"
|
||||
#include "scoreboard.h"
|
||||
|
||||
#include "apr_version.h"
|
||||
|
||||
#include "apr_lib.h"
|
||||
#include "ap_config.h"
|
||||
#include "http_config.h"
|
||||
|
||||
|
||||
#define DECLARE_EXTERNAL_HOOK(ns,link,ret,name,args) \
|
||||
ns##_HOOK_##name##_t *hookfn_##name = NULL; \
|
||||
link##_DECLARE(void) ns##_hook_##name(ns##_HOOK_##name##_t *pf, \
|
||||
const char * const *aszPre, \
|
||||
const char * const *aszSucc, int nOrder) \
|
||||
{ \
|
||||
hookfn_##name = pf; \
|
||||
}
|
||||
|
||||
#define DECLARE_HOOK(ret,name,args) \
|
||||
DECLARE_EXTERNAL_HOOK(ap,AP,ret,name,args)
|
||||
|
||||
DECLARE_HOOK(int,pre_config,(apr_pool_t *pconf,apr_pool_t *plog, apr_pool_t *ptemp))
|
||||
DECLARE_HOOK(int,post_config,(apr_pool_t *pconf,apr_pool_t *plog, apr_pool_t *ptemp,server_rec *s))
|
||||
DECLARE_HOOK(void,child_init,(apr_pool_t *pchild, server_rec *s))
|
||||
DECLARE_HOOK(int,process_connection,(conn_rec *c))
|
||||
DECLARE_HOOK(int,post_read_request,(request_rec *r))
|
||||
DECLARE_HOOK(int,fixups,(request_rec *r))
|
||||
DECLARE_HOOK(void, error_log, (const char *file, int line, int level,
|
||||
apr_status_t status, const server_rec *s,
|
||||
const request_rec *r, apr_pool_t *pool,
|
||||
const char *errstr))
|
||||
DECLARE_HOOK(int,log_transaction,(request_rec *r))
|
||||
DECLARE_HOOK(void,insert_filter,(request_rec *r))
|
||||
DECLARE_HOOK(void,insert_error_filter,(request_rec *r))
|
366
standalone/main.cpp
Normal file
366
standalone/main.cpp
Normal file
@ -0,0 +1,366 @@
|
||||
/*
|
||||
* ModSecurity for Apache 2.x, http://www.modsecurity.org/
|
||||
* Copyright (c) 2004-2011 Trustwave Holdings, Inc. (http://www.trustwave.com/)
|
||||
*
|
||||
* You may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* If any of the files related to licensing are missing or if you have any
|
||||
* other questions related to licensing please contact Trustwave Holdings, Inc.
|
||||
* directly using the email address security@modsecurity.org.
|
||||
*/
|
||||
|
||||
//#undef inline
|
||||
#define inline inline
|
||||
|
||||
#include <stdio.h>
|
||||
#include <conio.h>
|
||||
#include "api.h"
|
||||
|
||||
|
||||
char *config_file = NULL;
|
||||
char *event_files[1024];
|
||||
int event_file_cnt;
|
||||
char *event_file = NULL;
|
||||
int event_file_len = 0;
|
||||
char **event_file_lines;
|
||||
int event_line_cnt = 0;
|
||||
int event_file_blocks[256];
|
||||
|
||||
#define EVENT_FILE_MAX_SIZE (16*1024*1024)
|
||||
|
||||
void readeventfile(char *name)
|
||||
{
|
||||
if(event_file == NULL)
|
||||
{
|
||||
event_file = (char *)malloc(EVENT_FILE_MAX_SIZE);
|
||||
event_file_lines = (char **)malloc(EVENT_FILE_MAX_SIZE);
|
||||
}
|
||||
|
||||
event_file_len = 0;
|
||||
event_line_cnt = 0;
|
||||
memset(event_file_blocks, -1, sizeof(int) * 256);
|
||||
|
||||
FILE *fr = fopen(name, "rb");
|
||||
|
||||
if(fr == NULL)
|
||||
return;
|
||||
|
||||
event_file_len = fread(event_file, 1, EVENT_FILE_MAX_SIZE - 1, fr);
|
||||
|
||||
fclose(fr);
|
||||
|
||||
event_file[event_file_len] = 0;
|
||||
}
|
||||
|
||||
void parseeventfile()
|
||||
{
|
||||
if(event_file_len == 0 || event_file == NULL)
|
||||
return;
|
||||
|
||||
char *t = event_file;
|
||||
char *e = event_file + event_file_len;
|
||||
|
||||
while(t < e)
|
||||
{
|
||||
event_file_lines[event_line_cnt++] = t;
|
||||
|
||||
while(t < e && *t != 10 && *t != 13)
|
||||
t++;
|
||||
|
||||
while(t < e && (*t == 10 || *t == 13))
|
||||
*t++ = 0;
|
||||
}
|
||||
|
||||
for(int i = 0; i < event_line_cnt; i++)
|
||||
{
|
||||
int l = strlen(event_file_lines[i]);
|
||||
|
||||
if(l != 14)
|
||||
continue;
|
||||
|
||||
if(event_file_lines[i][0] != '-' || event_file_lines[i][1] != '-' || event_file_lines[i][l-2] != '-' || event_file_lines[i][l-1] != '-')
|
||||
continue;
|
||||
|
||||
char blk = event_file_lines[i][l-3];
|
||||
|
||||
event_file_blocks[blk] = i;
|
||||
}
|
||||
}
|
||||
|
||||
void parseargs(int argc, char *argv[])
|
||||
{
|
||||
int i = 1;
|
||||
|
||||
event_file_cnt = 0;
|
||||
|
||||
while(i < argc)
|
||||
{
|
||||
if(argv[i][0] == '-')
|
||||
{
|
||||
if(argv[i][1] == 'c' && i < argc - 1)
|
||||
{
|
||||
config_file = argv[i + 1];
|
||||
i += 2;
|
||||
continue;
|
||||
}
|
||||
i++;
|
||||
continue;
|
||||
}
|
||||
if(event_file_cnt == 1024)
|
||||
{
|
||||
fprintf(stderr, "Too many input files! (limit 1024)\n");
|
||||
break;
|
||||
}
|
||||
|
||||
event_files[event_file_cnt++] = argv[i++];
|
||||
}
|
||||
}
|
||||
|
||||
void log(void *obj, int level, char *str)
|
||||
{
|
||||
printf("%s\n", str);
|
||||
}
|
||||
|
||||
unsigned int bodypos = 0;
|
||||
|
||||
apr_status_t readbody(request_rec *r, char *buf, unsigned int length, unsigned int *readcnt, int *is_eos)
|
||||
{
|
||||
int j = event_file_blocks['C'];
|
||||
|
||||
if(j < 0)
|
||||
{
|
||||
*is_eos = 1;
|
||||
return APR_SUCCESS;
|
||||
}
|
||||
|
||||
j++;
|
||||
|
||||
if(event_file_lines[j][0] == 0)
|
||||
{
|
||||
*is_eos = 1;
|
||||
return APR_SUCCESS;
|
||||
}
|
||||
|
||||
unsigned int l = strlen(event_file_lines[j]);
|
||||
unsigned int size = length;
|
||||
|
||||
if(bodypos + size > l)
|
||||
size = l - bodypos;
|
||||
|
||||
memcpy(buf, &event_file_lines[j][bodypos], size);
|
||||
|
||||
bodypos += size;
|
||||
*readcnt = size;
|
||||
|
||||
if(bodypos == l)
|
||||
*is_eos = 1;
|
||||
|
||||
return APR_SUCCESS;
|
||||
}
|
||||
|
||||
unsigned int responsepos = 0;
|
||||
|
||||
apr_status_t readresponse(request_rec *r, char *buf, unsigned int length, unsigned int *readcnt, int *is_eos)
|
||||
{
|
||||
int j = event_file_blocks['G'];
|
||||
|
||||
if(j < 0)
|
||||
{
|
||||
*is_eos = 1;
|
||||
return APR_SUCCESS;
|
||||
}
|
||||
|
||||
j++;
|
||||
|
||||
if(event_file_lines[j][0] == 0)
|
||||
{
|
||||
*is_eos = 1;
|
||||
return APR_SUCCESS;
|
||||
}
|
||||
|
||||
unsigned int l = strlen(event_file_lines[j]);
|
||||
unsigned int size = length;
|
||||
|
||||
if(responsepos + size > l)
|
||||
size = l - responsepos;
|
||||
|
||||
memcpy(buf, &event_file_lines[j][responsepos], size);
|
||||
|
||||
responsepos += size;
|
||||
*readcnt = size;
|
||||
|
||||
if(responsepos == l)
|
||||
*is_eos = 1;
|
||||
|
||||
return APR_SUCCESS;
|
||||
}
|
||||
|
||||
void main(int argc, char *argv[])
|
||||
{
|
||||
directory_config *config;
|
||||
conn_rec *c;
|
||||
request_rec *r;
|
||||
|
||||
parseargs(argc, argv);
|
||||
|
||||
if(config_file == NULL || argc < 3)
|
||||
{
|
||||
printf("Usage:\n");
|
||||
printf("standalone.exe -c <config_file> <event_file1> [<event_file2> <event_file3> ...]\n");
|
||||
return;
|
||||
}
|
||||
|
||||
modsecSetLogHook(NULL, log);
|
||||
|
||||
modsecSetReadBody(readbody);
|
||||
modsecSetReadResponse(readresponse);
|
||||
|
||||
modsecInit();
|
||||
|
||||
modsecStartConfig();
|
||||
|
||||
config = modsecGetDefaultConfig();
|
||||
|
||||
const char * err = modsecProcessConfig(config, config_file);
|
||||
|
||||
if(err != NULL)
|
||||
{
|
||||
printf("%s\n", err);
|
||||
}
|
||||
|
||||
modsecFinalizeConfig();
|
||||
|
||||
modsecInitProcess();
|
||||
|
||||
for(int i = 0; i < event_file_cnt; i++)
|
||||
{
|
||||
readeventfile(event_files[i]);
|
||||
parseeventfile();
|
||||
|
||||
c = modsecNewConnection();
|
||||
|
||||
modsecProcessConnection(c);
|
||||
|
||||
r = modsecNewRequest(c, config);
|
||||
|
||||
int j = event_file_blocks['B'];
|
||||
|
||||
if(j < 0)
|
||||
continue;
|
||||
|
||||
j++;
|
||||
|
||||
if(event_file_lines[j][0] == 0)
|
||||
continue;
|
||||
|
||||
char *method = event_file_lines[j];
|
||||
char *url = strchr(method, 32);
|
||||
char *proto = strchr(url + 1, 32);
|
||||
|
||||
if(url == NULL || proto == NULL)
|
||||
continue;
|
||||
|
||||
*url++=0;
|
||||
*proto++=0;
|
||||
|
||||
#define SETMETHOD(m) if(strcmp(method,#m) == 0){ r->method = method; r->method_number = M_##m; }
|
||||
|
||||
r->method = "INVALID";
|
||||
r->method_number = M_INVALID;
|
||||
|
||||
SETMETHOD(OPTIONS)
|
||||
SETMETHOD(GET)
|
||||
SETMETHOD(POST)
|
||||
SETMETHOD(PUT)
|
||||
SETMETHOD(DELETE)
|
||||
SETMETHOD(TRACE)
|
||||
SETMETHOD(CONNECT)
|
||||
SETMETHOD(MOVE)
|
||||
SETMETHOD(COPY)
|
||||
SETMETHOD(PROPFIND)
|
||||
SETMETHOD(PROPPATCH)
|
||||
SETMETHOD(MKCOL)
|
||||
SETMETHOD(LOCK)
|
||||
SETMETHOD(UNLOCK)
|
||||
|
||||
r->protocol = proto;
|
||||
|
||||
while(event_file_lines[++j][0] != 0)
|
||||
{
|
||||
char *value = strchr(event_file_lines[j], ':');
|
||||
|
||||
if(value == NULL)
|
||||
break;
|
||||
|
||||
*value++ = 0;
|
||||
|
||||
while(*value <=32 && *value != 0)
|
||||
value++;
|
||||
|
||||
apr_table_setn(r->headers_in, event_file_lines[j], value);
|
||||
}
|
||||
|
||||
r->content_encoding = apr_table_get(r->headers_in, "Content-Encoding");
|
||||
r->content_type = apr_table_get(r->headers_in, "Content-Type");
|
||||
r->hostname = apr_table_get(r->headers_in, "Host");
|
||||
r->path_info = url;
|
||||
|
||||
char *query = strchr(url, '?');
|
||||
char *rawurl = url;
|
||||
|
||||
if(query != NULL)
|
||||
{
|
||||
rawurl = (char *)apr_palloc(r->pool, strlen(url) + 1);
|
||||
strcpy(rawurl, url);
|
||||
*query++ = 0;
|
||||
r->args = query;
|
||||
}
|
||||
|
||||
const char *lng = apr_table_get(r->headers_in, "Content-Languages");
|
||||
|
||||
if(lng != NULL)
|
||||
{
|
||||
r->content_languages = apr_array_make(r->pool, 1, sizeof(const char *));
|
||||
|
||||
*(const char **)apr_array_push(r->content_languages) = lng;
|
||||
}
|
||||
|
||||
r->request_time = apr_time_now();
|
||||
|
||||
r->parsed_uri.scheme = "http";
|
||||
r->parsed_uri.path = r->path_info;
|
||||
r->parsed_uri.hostname = (char *)r->hostname;
|
||||
r->parsed_uri.is_initialized = 1;
|
||||
r->parsed_uri.port = 80;
|
||||
r->parsed_uri.port_str = "80";
|
||||
r->parsed_uri.query = r->args;
|
||||
r->parsed_uri.dns_looked_up = 0;
|
||||
r->parsed_uri.dns_resolved = 0;
|
||||
r->parsed_uri.password = NULL;
|
||||
r->parsed_uri.user = NULL;
|
||||
r->parsed_uri.fragment = NULL;
|
||||
|
||||
r->unparsed_uri = rawurl;
|
||||
r->uri = r->unparsed_uri;
|
||||
|
||||
r->the_request = (char *)apr_palloc(r->pool, strlen(r->method) + 1 + strlen(r->uri) + 1 + strlen(r->protocol) + 1);
|
||||
|
||||
strcpy(r->the_request, r->method);
|
||||
strcat(r->the_request, " ");
|
||||
strcat(r->the_request, r->uri);
|
||||
strcat(r->the_request, " ");
|
||||
strcat(r->the_request, r->protocol);
|
||||
|
||||
apr_table_setn(r->subprocess_env, "UNIQUE_ID", "1");
|
||||
|
||||
modsecProcessRequest(r);
|
||||
modsecProcessResponse(r);
|
||||
modsecFinishRequest(r);
|
||||
}
|
||||
|
||||
modsecTerminate();
|
||||
getch();
|
||||
}
|
19
standalone/modules.mk
Normal file
19
standalone/modules.mk
Normal file
@ -0,0 +1,19 @@
|
||||
MOD_SECURITY2 = mod_security2 apache2_config apache2_io apache2_util \
|
||||
re re_operators re_actions re_tfns re_variables \
|
||||
msc_logging msc_xml msc_multipart modsecurity msc_parsers msc_util msc_pcre \
|
||||
persist_dbm msc_reqbody pdf_protect msc_geo msc_gsb msc_unicode acmp msc_lua
|
||||
|
||||
H = re.h modsecurity.h msc_logging.h msc_multipart.h msc_parsers.h \
|
||||
msc_pcre.h msc_util.h msc_xml.h persist_dbm.h apache2.h pdf_protect.h \
|
||||
msc_geo.h msc_gsb.h msc_unicode.h acmp.h utf8tables.h msc_lua.h
|
||||
|
||||
${MOD_SECURITY2:=.slo}: ${H}
|
||||
${MOD_SECURITY2:=.lo}: ${H}
|
||||
${MOD_SECURITY2:=.o}: ${H}
|
||||
|
||||
mod_security2.la: ${MOD_SECURITY2:=.slo}
|
||||
$(SH_LINK) -rpath $(libexecdir) -module -avoid-version ${MOD_SECURITY2:=.lo}
|
||||
|
||||
DISTCLEAN_TARGETS = modules.mk
|
||||
|
||||
shared = mod_security2.la
|
162
standalone/regex.c
Normal file
162
standalone/regex.c
Normal file
@ -0,0 +1,162 @@
|
||||
/*
|
||||
* ModSecurity for Apache 2.x, http://www.modsecurity.org/
|
||||
* Copyright (c) 2004-2011 Trustwave Holdings, Inc. (http://www.trustwave.com/)
|
||||
*
|
||||
* You may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* If any of the files related to licensing are missing or if you have any
|
||||
* other questions related to licensing please contact Trustwave Holdings, Inc.
|
||||
* directly using the email address security@modsecurity.org.
|
||||
*/
|
||||
|
||||
#include <limits.h>
|
||||
|
||||
#include "http_core.h"
|
||||
#include "http_request.h"
|
||||
|
||||
#include "modsecurity.h"
|
||||
#include "apache2.h"
|
||||
#include "http_main.h"
|
||||
#include "http_connection.h"
|
||||
|
||||
#include "apr_optional.h"
|
||||
#include "mod_log_config.h"
|
||||
|
||||
#include "msc_logging.h"
|
||||
#include "msc_util.h"
|
||||
|
||||
#include "ap_mpm.h"
|
||||
#include "scoreboard.h"
|
||||
|
||||
#include "apr_version.h"
|
||||
|
||||
#include "apr_lib.h"
|
||||
#include "ap_config.h"
|
||||
#include "http_config.h"
|
||||
|
||||
|
||||
static apr_status_t regex_cleanup(void *preg)
|
||||
{
|
||||
ap_regfree((ap_regex_t *) preg);
|
||||
return APR_SUCCESS;
|
||||
}
|
||||
|
||||
AP_DECLARE(ap_regex_t *) ap_pregcomp(apr_pool_t *p, const char *pattern,
|
||||
int cflags)
|
||||
{
|
||||
ap_regex_t *preg = apr_palloc(p, sizeof *preg);
|
||||
|
||||
if (ap_regcomp(preg, pattern, cflags)) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
apr_pool_cleanup_register(p, (void *) preg, regex_cleanup,
|
||||
apr_pool_cleanup_null);
|
||||
|
||||
return preg;
|
||||
}
|
||||
|
||||
AP_DECLARE(void) ap_regfree(ap_regex_t *preg)
|
||||
{
|
||||
(pcre_free)(preg->re_pcre);
|
||||
}
|
||||
|
||||
AP_DECLARE(int) ap_regcomp(ap_regex_t *preg, const char *pattern, int cflags)
|
||||
{
|
||||
const char *errorptr;
|
||||
int erroffset;
|
||||
int options = 0;
|
||||
int nsub = 0;
|
||||
|
||||
if ((cflags & AP_REG_ICASE) != 0) options |= PCRE_CASELESS;
|
||||
if ((cflags & AP_REG_NEWLINE) != 0) options |= PCRE_MULTILINE;
|
||||
|
||||
preg->re_pcre = pcre_compile(pattern, options, &errorptr, &erroffset, NULL);
|
||||
preg->re_erroffset = erroffset;
|
||||
|
||||
if (preg->re_pcre == NULL) return AP_REG_INVARG;
|
||||
|
||||
pcre_fullinfo((const pcre *)preg->re_pcre, NULL, PCRE_INFO_CAPTURECOUNT, &nsub);
|
||||
preg->re_nsub = nsub;
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifndef POSIX_MALLOC_THRESHOLD
|
||||
#define POSIX_MALLOC_THRESHOLD (10)
|
||||
#endif
|
||||
|
||||
AP_DECLARE(int) ap_regexec(const ap_regex_t *preg, const char *string,
|
||||
apr_size_t nmatch, ap_regmatch_t pmatch[],
|
||||
int eflags)
|
||||
{
|
||||
int rc;
|
||||
int options = 0;
|
||||
int *ovector = NULL;
|
||||
int small_ovector[POSIX_MALLOC_THRESHOLD * 3];
|
||||
int allocated_ovector = 0;
|
||||
|
||||
if ((eflags & AP_REG_NOTBOL) != 0) options |= PCRE_NOTBOL;
|
||||
if ((eflags & AP_REG_NOTEOL) != 0) options |= PCRE_NOTEOL;
|
||||
|
||||
((ap_regex_t *)preg)->re_erroffset = (apr_size_t)(-1); /* Only has meaning after compile */
|
||||
|
||||
if (nmatch > 0)
|
||||
{
|
||||
if (nmatch <= POSIX_MALLOC_THRESHOLD)
|
||||
{
|
||||
ovector = &(small_ovector[0]);
|
||||
}
|
||||
else
|
||||
{
|
||||
ovector = (int *)malloc(sizeof(int) * nmatch * 3);
|
||||
if (ovector == NULL) return AP_REG_ESPACE;
|
||||
allocated_ovector = 1;
|
||||
}
|
||||
}
|
||||
|
||||
rc = pcre_exec((const pcre *)preg->re_pcre, NULL, string, (int)strlen(string),
|
||||
0, options, ovector, nmatch * 3);
|
||||
|
||||
if (rc == 0) rc = nmatch; /* All captured slots were filled in */
|
||||
|
||||
if (rc >= 0)
|
||||
{
|
||||
apr_size_t i;
|
||||
for (i = 0; i < (apr_size_t)rc; i++)
|
||||
{
|
||||
pmatch[i].rm_so = ovector[i*2];
|
||||
pmatch[i].rm_eo = ovector[i*2+1];
|
||||
}
|
||||
if (allocated_ovector) free(ovector);
|
||||
for (; i < nmatch; i++) pmatch[i].rm_so = pmatch[i].rm_eo = -1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
if (allocated_ovector) free(ovector);
|
||||
switch(rc)
|
||||
{
|
||||
case PCRE_ERROR_NOMATCH: return AP_REG_NOMATCH;
|
||||
case PCRE_ERROR_NULL: return AP_REG_INVARG;
|
||||
case PCRE_ERROR_BADOPTION: return AP_REG_INVARG;
|
||||
case PCRE_ERROR_BADMAGIC: return AP_REG_INVARG;
|
||||
case PCRE_ERROR_UNKNOWN_NODE: return AP_REG_ASSERT;
|
||||
case PCRE_ERROR_NOMEMORY: return AP_REG_ESPACE;
|
||||
#ifdef PCRE_ERROR_MATCHLIMIT
|
||||
case PCRE_ERROR_MATCHLIMIT: return AP_REG_ESPACE;
|
||||
#endif
|
||||
#ifdef PCRE_ERROR_BADUTF8
|
||||
case PCRE_ERROR_BADUTF8: return AP_REG_INVARG;
|
||||
#endif
|
||||
#ifdef PCRE_ERROR_BADUTF8_OFFSET
|
||||
case PCRE_ERROR_BADUTF8_OFFSET: return AP_REG_INVARG;
|
||||
#endif
|
||||
default: return AP_REG_ASSERT;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
979
standalone/server.c
Normal file
979
standalone/server.c
Normal file
@ -0,0 +1,979 @@
|
||||
/*
|
||||
* ModSecurity for Apache 2.x, http://www.modsecurity.org/
|
||||
* Copyright (c) 2004-2011 Trustwave Holdings, Inc. (http://www.trustwave.com/)
|
||||
*
|
||||
* You may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* If any of the files related to licensing are missing or if you have any
|
||||
* other questions related to licensing please contact Trustwave Holdings, Inc.
|
||||
* directly using the email address security@modsecurity.org.
|
||||
*/
|
||||
|
||||
#include <limits.h>
|
||||
|
||||
#include "http_core.h"
|
||||
#include "http_request.h"
|
||||
|
||||
#include "modsecurity.h"
|
||||
#include "apache2.h"
|
||||
#include "http_main.h"
|
||||
#include "http_connection.h"
|
||||
|
||||
#include "apr_optional.h"
|
||||
#include "mod_log_config.h"
|
||||
|
||||
#include "msc_logging.h"
|
||||
#include "msc_util.h"
|
||||
|
||||
#include "ap_mpm.h"
|
||||
#include "scoreboard.h"
|
||||
|
||||
#include "apr_version.h"
|
||||
|
||||
#include "apr_lib.h"
|
||||
#include "ap_config.h"
|
||||
#include "http_config.h"
|
||||
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_SEM_H
|
||||
#include <sys/sem.h>
|
||||
#endif
|
||||
|
||||
//=========
|
||||
|
||||
/** The default path for CGI scripts if none is currently set */
|
||||
#ifndef DEFAULT_PATH
|
||||
#define DEFAULT_PATH "/bin:/usr/bin:/usr/ucb:/usr/bsd:/usr/local/bin"
|
||||
#endif
|
||||
|
||||
//=========
|
||||
|
||||
AP_DECLARE_DATA scoreboard *ap_scoreboard_image = NULL;
|
||||
|
||||
AP_DECLARE_DATA apr_array_header_t *ap_server_config_defines = NULL;
|
||||
|
||||
AP_DECLARE_DATA const char *ap_server_root = "\\";
|
||||
|
||||
static int server_limit, thread_limit, lb_limit;
|
||||
static apr_size_t scoreboard_size;
|
||||
|
||||
void *modsecLogObj = NULL;
|
||||
void (*modsecLogHook)(void *obj, int level, char *str) = NULL;
|
||||
|
||||
//=========
|
||||
|
||||
static const char * const status_lines[RESPONSE_CODES] =
|
||||
{
|
||||
"100 Continue",
|
||||
"101 Switching Protocols",
|
||||
"102 Processing",
|
||||
#define LEVEL_200 3
|
||||
"200 OK",
|
||||
"201 Created",
|
||||
"202 Accepted",
|
||||
"203 Non-Authoritative Information",
|
||||
"204 No Content",
|
||||
"205 Reset Content",
|
||||
"206 Partial Content",
|
||||
"207 Multi-Status",
|
||||
#define LEVEL_300 11
|
||||
"300 Multiple Choices",
|
||||
"301 Moved Permanently",
|
||||
"302 Found",
|
||||
"303 See Other",
|
||||
"304 Not Modified",
|
||||
"305 Use Proxy",
|
||||
"306 unused",
|
||||
"307 Temporary Redirect",
|
||||
#define LEVEL_400 19
|
||||
"400 Bad Request",
|
||||
"401 Authorization Required",
|
||||
"402 Payment Required",
|
||||
"403 Forbidden",
|
||||
"404 Not Found",
|
||||
"405 Method Not Allowed",
|
||||
"406 Not Acceptable",
|
||||
"407 Proxy Authentication Required",
|
||||
"408 Request Time-out",
|
||||
"409 Conflict",
|
||||
"410 Gone",
|
||||
"411 Length Required",
|
||||
"412 Precondition Failed",
|
||||
"413 Request Entity Too Large",
|
||||
"414 Request-URI Too Large",
|
||||
"415 Unsupported Media Type",
|
||||
"416 Requested Range Not Satisfiable",
|
||||
"417 Expectation Failed",
|
||||
"418 unused",
|
||||
"419 unused",
|
||||
"420 unused",
|
||||
"421 unused",
|
||||
"422 Unprocessable Entity",
|
||||
"423 Locked",
|
||||
"424 Failed Dependency",
|
||||
/* This is a hack, but it is required for ap_index_of_response
|
||||
* to work with 426.
|
||||
*/
|
||||
"425 No code",
|
||||
"426 Upgrade Required",
|
||||
#define LEVEL_500 46
|
||||
"500 Internal Server Error",
|
||||
"501 Method Not Implemented",
|
||||
"502 Bad Gateway",
|
||||
"503 Service Temporarily Unavailable",
|
||||
"504 Gateway Time-out",
|
||||
"505 HTTP Version Not Supported",
|
||||
"506 Variant Also Negotiates",
|
||||
"507 Insufficient Storage",
|
||||
"508 unused",
|
||||
"509 unused",
|
||||
"510 Not Extended"
|
||||
};
|
||||
|
||||
AP_DECLARE(int) ap_index_of_response(int status)
|
||||
{
|
||||
static int shortcut[6] = {0, LEVEL_200, LEVEL_300, LEVEL_400,
|
||||
LEVEL_500, RESPONSE_CODES};
|
||||
int i, pos;
|
||||
|
||||
if (status < 100) { /* Below 100 is illegal for HTTP status */
|
||||
return LEVEL_500;
|
||||
}
|
||||
|
||||
for (i = 0; i < 5; i++) {
|
||||
status -= 100;
|
||||
if (status < 100) {
|
||||
pos = (status + shortcut[i]);
|
||||
if (pos < shortcut[i + 1]) {
|
||||
return pos;
|
||||
}
|
||||
else {
|
||||
return LEVEL_500; /* status unknown (falls in gap) */
|
||||
}
|
||||
}
|
||||
}
|
||||
return LEVEL_500; /* 600 or above is also illegal */
|
||||
}
|
||||
|
||||
//=========
|
||||
|
||||
static char *http2env(apr_pool_t *a, const char *w)
|
||||
{
|
||||
char *res = (char *)apr_palloc(a, sizeof("HTTP_") + strlen(w));
|
||||
char *cp = res;
|
||||
char c;
|
||||
|
||||
*cp++ = 'H';
|
||||
*cp++ = 'T';
|
||||
*cp++ = 'T';
|
||||
*cp++ = 'P';
|
||||
*cp++ = '_';
|
||||
|
||||
while ((c = *w++) != 0) {
|
||||
if (!apr_isalnum(c)) {
|
||||
*cp++ = '_';
|
||||
}
|
||||
else {
|
||||
*cp++ = apr_toupper(c);
|
||||
}
|
||||
}
|
||||
*cp = 0;
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
AP_DECLARE(char *) ap_escape_html2(apr_pool_t *p, const char *s, int toasc)
|
||||
{
|
||||
int i, j;
|
||||
char *x;
|
||||
|
||||
/* first, count the number of extra characters */
|
||||
for (i = 0, j = 0; s[i] != '\0'; i++)
|
||||
if (s[i] == '<' || s[i] == '>')
|
||||
j += 3;
|
||||
else if (s[i] == '&')
|
||||
j += 4;
|
||||
else if (s[i] == '"')
|
||||
j += 5;
|
||||
else if (toasc && !apr_isascii(s[i]))
|
||||
j += 5;
|
||||
|
||||
if (j == 0)
|
||||
return apr_pstrmemdup(p, s, i);
|
||||
|
||||
x = apr_palloc(p, i + j + 1);
|
||||
for (i = 0, j = 0; s[i] != '\0'; i++, j++)
|
||||
if (s[i] == '<') {
|
||||
memcpy(&x[j], "<", 4);
|
||||
j += 3;
|
||||
}
|
||||
else if (s[i] == '>') {
|
||||
memcpy(&x[j], ">", 4);
|
||||
j += 3;
|
||||
}
|
||||
else if (s[i] == '&') {
|
||||
memcpy(&x[j], "&", 5);
|
||||
j += 4;
|
||||
}
|
||||
else if (s[i] == '"') {
|
||||
memcpy(&x[j], """, 6);
|
||||
j += 5;
|
||||
}
|
||||
else if (toasc && !apr_isascii(s[i])) {
|
||||
char *esc = apr_psprintf(p, "&#%3.3d;", (unsigned char)s[i]);
|
||||
memcpy(&x[j], esc, 6);
|
||||
j += 5;
|
||||
}
|
||||
else
|
||||
x[j] = s[i];
|
||||
|
||||
x[j] = '\0';
|
||||
return x;
|
||||
}
|
||||
|
||||
AP_DECLARE(char *) ap_escape_html(apr_pool_t *p, const char *s)
|
||||
{
|
||||
return ap_escape_html2(p, s, 0);
|
||||
}
|
||||
|
||||
AP_DECLARE(const char *) ap_psignature(const char *prefix, request_rec *r)
|
||||
{
|
||||
return prefix;
|
||||
}
|
||||
|
||||
AP_DECLARE(const char *) ap_document_root(request_rec *r) /* Don't use this! */
|
||||
{
|
||||
return "\\";
|
||||
}
|
||||
|
||||
AP_DECLARE(apr_port_t) ap_get_server_port(const request_rec *r)
|
||||
{
|
||||
return 80;
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
AP_DECLARE(void) ap_log_error(const char *file, int line, int level,
|
||||
apr_status_t status, const server_rec *s,
|
||||
const char *fmt, ...)
|
||||
// __attribute__((format(printf,6,7)))
|
||||
{
|
||||
va_list args;
|
||||
char errstr[MAX_STRING_LEN];
|
||||
|
||||
va_start(args, fmt);
|
||||
|
||||
apr_vsnprintf(errstr, MAX_STRING_LEN, fmt, args);
|
||||
|
||||
va_end(args);
|
||||
|
||||
if(modsecLogHook != NULL)
|
||||
modsecLogHook(modsecLogObj, level, errstr);
|
||||
}
|
||||
|
||||
AP_DECLARE(void) ap_log_perror(const char *file, int line, int level,
|
||||
apr_status_t status, apr_pool_t *p,
|
||||
const char *fmt, ...)
|
||||
// __attribute__((format(printf,6,7)))
|
||||
{
|
||||
va_list args;
|
||||
char errstr[MAX_STRING_LEN];
|
||||
|
||||
va_start(args, fmt);
|
||||
|
||||
apr_vsnprintf(errstr, MAX_STRING_LEN, fmt, args);
|
||||
|
||||
va_end(args);
|
||||
|
||||
if(modsecLogHook != NULL)
|
||||
modsecLogHook(modsecLogObj, level, errstr);
|
||||
}
|
||||
|
||||
AP_DECLARE(module *) ap_find_linked_module(const char *name)
|
||||
{
|
||||
// only used for ACTION_PROXY to find mod_proxy.c; see mod_security2.c, perform_interception()
|
||||
//
|
||||
return NULL;
|
||||
}
|
||||
|
||||
AP_DECLARE(const char *) ap_get_server_name(request_rec *r)
|
||||
{
|
||||
return r->server->server_hostname;
|
||||
}
|
||||
|
||||
AP_DECLARE(void) ap_add_version_component(apr_pool_t *pconf, const char *component)
|
||||
{
|
||||
// appends string to server description string
|
||||
//
|
||||
}
|
||||
|
||||
AP_DECLARE(const char *) ap_get_status_line(int status)
|
||||
{
|
||||
return status_lines[ap_index_of_response(status)];
|
||||
}
|
||||
|
||||
AP_DECLARE(worker_score *) ap_get_scoreboard_worker(int x, int y)
|
||||
{
|
||||
if (((x < 0) || (server_limit < x)) ||
|
||||
((y < 0) || (thread_limit < y))) {
|
||||
return(NULL); /* Out of range */
|
||||
}
|
||||
return &ap_scoreboard_image->servers[x][y];
|
||||
}
|
||||
|
||||
AP_DECLARE(apr_status_t) ap_mpm_query(int query_code, int *result)
|
||||
{
|
||||
switch(query_code){
|
||||
//case AP_MPMQ_MAX_DAEMON_USED:
|
||||
// *result = MAXIMUM_WAIT_OBJECTS;
|
||||
// return APR_SUCCESS;
|
||||
case AP_MPMQ_IS_THREADED:
|
||||
*result = AP_MPMQ_STATIC;
|
||||
return APR_SUCCESS;
|
||||
case AP_MPMQ_IS_FORKED:
|
||||
*result = AP_MPMQ_NOT_SUPPORTED;
|
||||
return APR_SUCCESS;
|
||||
case AP_MPMQ_HARD_LIMIT_DAEMONS:
|
||||
*result = 1; //HARD_SERVER_LIMIT;
|
||||
return APR_SUCCESS;
|
||||
case AP_MPMQ_HARD_LIMIT_THREADS:
|
||||
*result = thread_limit;
|
||||
return APR_SUCCESS;
|
||||
//case AP_MPMQ_MAX_THREADS:
|
||||
// *result = ap_threads_per_child;
|
||||
// return APR_SUCCESS;
|
||||
case AP_MPMQ_MIN_SPARE_DAEMONS:
|
||||
*result = 0;
|
||||
return APR_SUCCESS;
|
||||
case AP_MPMQ_MIN_SPARE_THREADS:
|
||||
*result = 0;
|
||||
return APR_SUCCESS;
|
||||
case AP_MPMQ_MAX_SPARE_DAEMONS:
|
||||
*result = 0;
|
||||
return APR_SUCCESS;
|
||||
case AP_MPMQ_MAX_SPARE_THREADS:
|
||||
*result = 0;
|
||||
return APR_SUCCESS;
|
||||
//case AP_MPMQ_MAX_REQUESTS_DAEMON:
|
||||
// *result = ap_max_requests_per_child;
|
||||
// return APR_SUCCESS;
|
||||
case AP_MPMQ_MAX_DAEMONS:
|
||||
*result = 0;
|
||||
return APR_SUCCESS;
|
||||
//case AP_MPMQ_MPM_STATE:
|
||||
// *result = winnt_mpm_state;
|
||||
// return APR_SUCCESS;
|
||||
}
|
||||
return APR_ENOTIMPL;
|
||||
}
|
||||
|
||||
AP_DECLARE(const char *) ap_get_server_banner(void)
|
||||
{
|
||||
return "ModSecurity Standalone";
|
||||
}
|
||||
|
||||
/* Code from Harald Hanche-Olsen <hanche@imf.unit.no> */
|
||||
static APR_INLINE void do_double_reverse (conn_rec *conn)
|
||||
{
|
||||
apr_sockaddr_t *sa;
|
||||
apr_status_t rv;
|
||||
|
||||
if (conn->double_reverse) {
|
||||
/* already done */
|
||||
return;
|
||||
}
|
||||
|
||||
if (conn->remote_host == NULL || conn->remote_host[0] == '\0') {
|
||||
/* single reverse failed, so don't bother */
|
||||
conn->double_reverse = -1;
|
||||
return;
|
||||
}
|
||||
|
||||
rv = apr_sockaddr_info_get(&sa, conn->remote_host, APR_UNSPEC, 0, 0, conn->pool);
|
||||
if (rv == APR_SUCCESS) {
|
||||
while (sa) {
|
||||
if (apr_sockaddr_equal(sa, conn->remote_addr)) {
|
||||
conn->double_reverse = 1;
|
||||
return;
|
||||
}
|
||||
|
||||
sa = sa->next;
|
||||
}
|
||||
}
|
||||
|
||||
conn->double_reverse = -1;
|
||||
}
|
||||
|
||||
#ifndef HOSTNAME_LOOKUP_OFF
|
||||
#define HOSTNAME_LOOKUP_OFF 0
|
||||
#define HOSTNAME_LOOKUP_ON 1
|
||||
#define HOSTNAME_LOOKUP_DOUBLE 2
|
||||
#define HOSTNAME_LOOKUP_UNSET 3
|
||||
#endif
|
||||
|
||||
AP_DECLARE(void) ap_str_tolower(char *str)
|
||||
{
|
||||
while (*str) {
|
||||
*str = apr_tolower(*str);
|
||||
++str;
|
||||
}
|
||||
}
|
||||
|
||||
AP_DECLARE(const char *) ap_get_remote_host(conn_rec *conn, void *dir_config, int type, int *str_is_ip)
|
||||
{
|
||||
int hostname_lookups = HOSTNAME_LOOKUP_OFF;
|
||||
int ignored_str_is_ip;
|
||||
|
||||
if (!str_is_ip) { /* caller doesn't want to know */
|
||||
str_is_ip = &ignored_str_is_ip;
|
||||
}
|
||||
*str_is_ip = 0;
|
||||
|
||||
/* If we haven't checked the host name, and we want to */
|
||||
//if (dir_config) {
|
||||
// hostname_lookups =
|
||||
// ((core_dir_config *)ap_get_module_config(dir_config, &core_module))
|
||||
// ->hostname_lookups;
|
||||
|
||||
// if (hostname_lookups == HOSTNAME_LOOKUP_UNSET) {
|
||||
// hostname_lookups = HOSTNAME_LOOKUP_OFF;
|
||||
// }
|
||||
//}
|
||||
|
||||
if (type != REMOTE_NOLOOKUP
|
||||
&& conn->remote_host == NULL
|
||||
&& (type == REMOTE_DOUBLE_REV
|
||||
|| hostname_lookups != HOSTNAME_LOOKUP_OFF)) {
|
||||
|
||||
if (apr_getnameinfo(&conn->remote_host, conn->remote_addr, 0)
|
||||
== APR_SUCCESS) {
|
||||
ap_str_tolower(conn->remote_host);
|
||||
|
||||
if (hostname_lookups == HOSTNAME_LOOKUP_DOUBLE) {
|
||||
do_double_reverse(conn);
|
||||
if (conn->double_reverse != 1) {
|
||||
conn->remote_host = NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* if failed, set it to the NULL string to indicate error */
|
||||
if (conn->remote_host == NULL) {
|
||||
conn->remote_host = "";
|
||||
}
|
||||
}
|
||||
|
||||
if (type == REMOTE_DOUBLE_REV) {
|
||||
do_double_reverse(conn);
|
||||
if (conn->double_reverse == -1) {
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Return the desired information; either the remote DNS name, if found,
|
||||
* or either NULL (if the hostname was requested) or the IP address
|
||||
* (if any identifier was requested).
|
||||
*/
|
||||
if (conn->remote_host != NULL && conn->remote_host[0] != '\0') {
|
||||
return conn->remote_host;
|
||||
}
|
||||
else {
|
||||
if (type == REMOTE_HOST || type == REMOTE_DOUBLE_REV) {
|
||||
return NULL;
|
||||
}
|
||||
else {
|
||||
*str_is_ip = 1;
|
||||
return conn->remote_ip;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
AP_DECLARE(char *) ap_server_root_relative(apr_pool_t *p, const char *file)
|
||||
{
|
||||
char *newpath = NULL;
|
||||
apr_status_t rv;
|
||||
rv = apr_filepath_merge(&newpath, ap_server_root, file,
|
||||
APR_FILEPATH_TRUENAME, p);
|
||||
if (newpath && (rv == APR_SUCCESS || APR_STATUS_IS_EPATHWILD(rv)
|
||||
|| APR_STATUS_IS_ENOENT(rv)
|
||||
|| APR_STATUS_IS_ENOTDIR(rv))) {
|
||||
return newpath;
|
||||
}
|
||||
else {
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
AP_DECLARE(piped_log *) ap_open_piped_log(apr_pool_t *p, const char *program)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
AP_DECLARE(char **) ap_create_environment(apr_pool_t *p, apr_table_t *t)
|
||||
{
|
||||
const apr_array_header_t *env_arr = apr_table_elts(t);
|
||||
const apr_table_entry_t *elts = (const apr_table_entry_t *) env_arr->elts;
|
||||
char **env = (char **) apr_palloc(p, (env_arr->nelts + 2) * sizeof(char *));
|
||||
int i, j;
|
||||
char *tz;
|
||||
char *whack;
|
||||
|
||||
j = 0;
|
||||
if (!apr_table_get(t, "TZ")) {
|
||||
tz = getenv("TZ");
|
||||
if (tz != NULL) {
|
||||
env[j++] = apr_pstrcat(p, "TZ=", tz, NULL);
|
||||
}
|
||||
}
|
||||
for (i = 0; i < env_arr->nelts; ++i) {
|
||||
if (!elts[i].key) {
|
||||
continue;
|
||||
}
|
||||
env[j] = apr_pstrcat(p, elts[i].key, "=", elts[i].val, NULL);
|
||||
whack = env[j];
|
||||
if (apr_isdigit(*whack)) {
|
||||
*whack++ = '_';
|
||||
}
|
||||
while (*whack != '=') {
|
||||
if (!apr_isalnum(*whack) && *whack != '_') {
|
||||
*whack = '_';
|
||||
}
|
||||
++whack;
|
||||
}
|
||||
++j;
|
||||
}
|
||||
|
||||
env[j] = NULL;
|
||||
return env;
|
||||
}
|
||||
|
||||
/* This "cute" little function comes about because the path info on
|
||||
* filenames and URLs aren't always the same. So we take the two,
|
||||
* and find as much of the two that match as possible.
|
||||
*/
|
||||
|
||||
AP_DECLARE(int) ap_find_path_info(const char *uri, const char *path_info)
|
||||
{
|
||||
int lu = strlen(uri);
|
||||
int lp = strlen(path_info);
|
||||
|
||||
while (lu-- && lp-- && uri[lu] == path_info[lp]) {
|
||||
if (path_info[lp] == '/') {
|
||||
while (lu && uri[lu-1] == '/') lu--;
|
||||
}
|
||||
}
|
||||
|
||||
if (lu == -1) {
|
||||
lu = 0;
|
||||
}
|
||||
|
||||
while (uri[lu] != '\0' && uri[lu] != '/') {
|
||||
lu++;
|
||||
}
|
||||
return lu;
|
||||
}
|
||||
|
||||
/* Obtain the Request-URI from the original request-line, returning
|
||||
* a new string from the request pool containing the URI or "".
|
||||
*/
|
||||
static char *original_uri(request_rec *r)
|
||||
{
|
||||
char *first, *last;
|
||||
|
||||
if (r->the_request == NULL) {
|
||||
return (char *) apr_pcalloc(r->pool, 1);
|
||||
}
|
||||
|
||||
first = r->the_request; /* use the request-line */
|
||||
|
||||
while (*first && !apr_isspace(*first)) {
|
||||
++first; /* skip over the method */
|
||||
}
|
||||
while (apr_isspace(*first)) {
|
||||
++first; /* and the space(s) */
|
||||
}
|
||||
|
||||
last = first;
|
||||
while (*last && !apr_isspace(*last)) {
|
||||
++last; /* end at next whitespace */
|
||||
}
|
||||
|
||||
return apr_pstrmemdup(r->pool, first, last - first);
|
||||
}
|
||||
|
||||
AP_DECLARE(void) ap_add_cgi_vars(request_rec *r)
|
||||
{
|
||||
apr_table_t *e = r->subprocess_env;
|
||||
|
||||
apr_table_setn(e, "GATEWAY_INTERFACE", "CGI/1.1");
|
||||
apr_table_setn(e, "SERVER_PROTOCOL", r->protocol);
|
||||
apr_table_setn(e, "REQUEST_METHOD", r->method);
|
||||
apr_table_setn(e, "QUERY_STRING", r->args ? r->args : "");
|
||||
apr_table_setn(e, "REQUEST_URI", original_uri(r));
|
||||
|
||||
/* Note that the code below special-cases scripts run from includes,
|
||||
* because it "knows" that the sub_request has been hacked to have the
|
||||
* args and path_info of the original request, and not any that may have
|
||||
* come with the script URI in the include command. Ugh.
|
||||
*/
|
||||
|
||||
if (!strcmp(r->protocol, "INCLUDED")) {
|
||||
apr_table_setn(e, "SCRIPT_NAME", r->uri);
|
||||
if (r->path_info && *r->path_info) {
|
||||
apr_table_setn(e, "PATH_INFO", r->path_info);
|
||||
}
|
||||
}
|
||||
else if (!r->path_info || !*r->path_info) {
|
||||
apr_table_setn(e, "SCRIPT_NAME", r->uri);
|
||||
}
|
||||
else {
|
||||
int path_info_start = ap_find_path_info(r->uri, r->path_info);
|
||||
|
||||
apr_table_setn(e, "SCRIPT_NAME",
|
||||
apr_pstrndup(r->pool, r->uri, path_info_start));
|
||||
|
||||
apr_table_setn(e, "PATH_INFO", r->path_info);
|
||||
}
|
||||
|
||||
//if (r->path_info && r->path_info[0]) {
|
||||
/*
|
||||
* To get PATH_TRANSLATED, treat PATH_INFO as a URI path.
|
||||
* Need to re-escape it for this, since the entire URI was
|
||||
* un-escaped before we determined where the PATH_INFO began.
|
||||
*/
|
||||
// request_rec *pa_req;
|
||||
|
||||
// pa_req = ap_sub_req_lookup_uri(ap_escape_uri(r->pool, r->path_info), r,
|
||||
// NULL);
|
||||
|
||||
// if (pa_req->filename) {
|
||||
// char *pt = apr_pstrcat(r->pool, pa_req->filename, pa_req->path_info,
|
||||
// NULL);
|
||||
//#ifdef WIN32
|
||||
// /* We need to make this a real Windows path name */
|
||||
// apr_filepath_merge(&pt, "", pt, APR_FILEPATH_NATIVE, r->pool);
|
||||
//#endif
|
||||
// apr_table_setn(e, "PATH_TRANSLATED", pt);
|
||||
// }
|
||||
// ap_destroy_sub_req(pa_req);
|
||||
//}
|
||||
}
|
||||
|
||||
AP_DECLARE(void) ap_add_common_vars(request_rec *r)
|
||||
{
|
||||
apr_table_t *e;
|
||||
server_rec *s = r->server;
|
||||
conn_rec *c = r->connection;
|
||||
//const char *rem_logname;
|
||||
char *env_path;
|
||||
#if defined(WIN32) || defined(OS2) || defined(BEOS)
|
||||
char *env_temp;
|
||||
#endif
|
||||
const char *host;
|
||||
const apr_array_header_t *hdrs_arr = apr_table_elts(r->headers_in);
|
||||
const apr_table_entry_t *hdrs = (const apr_table_entry_t *) hdrs_arr->elts;
|
||||
int i;
|
||||
apr_port_t rport;
|
||||
|
||||
/* use a temporary apr_table_t which we'll overlap onto
|
||||
* r->subprocess_env later
|
||||
* (exception: if r->subprocess_env is empty at the start,
|
||||
* write directly into it)
|
||||
*/
|
||||
if (apr_is_empty_table(r->subprocess_env)) {
|
||||
e = r->subprocess_env;
|
||||
}
|
||||
else {
|
||||
e = apr_table_make(r->pool, 25 + hdrs_arr->nelts);
|
||||
}
|
||||
|
||||
/* First, add environment vars from headers... this is as per
|
||||
* CGI specs, though other sorts of scripting interfaces see
|
||||
* the same vars...
|
||||
*/
|
||||
|
||||
for (i = 0; i < hdrs_arr->nelts; ++i) {
|
||||
if (!hdrs[i].key) {
|
||||
continue;
|
||||
}
|
||||
|
||||
/* A few headers are special cased --- Authorization to prevent
|
||||
* rogue scripts from capturing passwords; content-type and -length
|
||||
* for no particular reason.
|
||||
*/
|
||||
|
||||
if (!strcasecmp(hdrs[i].key, "Content-type")) {
|
||||
apr_table_addn(e, "CONTENT_TYPE", hdrs[i].val);
|
||||
}
|
||||
else if (!strcasecmp(hdrs[i].key, "Content-length")) {
|
||||
apr_table_addn(e, "CONTENT_LENGTH", hdrs[i].val);
|
||||
}
|
||||
/*
|
||||
* You really don't want to disable this check, since it leaves you
|
||||
* wide open to CGIs stealing passwords and people viewing them
|
||||
* in the environment with "ps -e". But, if you must...
|
||||
*/
|
||||
#ifndef SECURITY_HOLE_PASS_AUTHORIZATION
|
||||
else if (!strcasecmp(hdrs[i].key, "Authorization")
|
||||
|| !strcasecmp(hdrs[i].key, "Proxy-Authorization")) {
|
||||
continue;
|
||||
}
|
||||
#endif
|
||||
else {
|
||||
apr_table_addn(e, http2env(r->pool, hdrs[i].key), hdrs[i].val);
|
||||
}
|
||||
}
|
||||
|
||||
if (!(env_path = getenv("PATH"))) {
|
||||
env_path = DEFAULT_PATH;
|
||||
}
|
||||
apr_table_addn(e, "PATH", apr_pstrdup(r->pool, env_path));
|
||||
|
||||
#ifdef WIN32
|
||||
if ((env_temp = getenv("SystemRoot")) != NULL) {
|
||||
apr_table_addn(e, "SystemRoot", env_temp);
|
||||
}
|
||||
if ((env_temp = getenv("COMSPEC")) != NULL) {
|
||||
apr_table_addn(e, "COMSPEC", env_temp);
|
||||
}
|
||||
if ((env_temp = getenv("PATHEXT")) != NULL) {
|
||||
apr_table_addn(e, "PATHEXT", env_temp);
|
||||
}
|
||||
if ((env_temp = getenv("WINDIR")) != NULL) {
|
||||
apr_table_addn(e, "WINDIR", env_temp);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef OS2
|
||||
if ((env_temp = getenv("COMSPEC")) != NULL) {
|
||||
apr_table_addn(e, "COMSPEC", env_temp);
|
||||
}
|
||||
if ((env_temp = getenv("ETC")) != NULL) {
|
||||
apr_table_addn(e, "ETC", env_temp);
|
||||
}
|
||||
if ((env_temp = getenv("DPATH")) != NULL) {
|
||||
apr_table_addn(e, "DPATH", env_temp);
|
||||
}
|
||||
if ((env_temp = getenv("PERLLIB_PREFIX")) != NULL) {
|
||||
apr_table_addn(e, "PERLLIB_PREFIX", env_temp);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef BEOS
|
||||
if ((env_temp = getenv("LIBRARY_PATH")) != NULL) {
|
||||
apr_table_addn(e, "LIBRARY_PATH", env_temp);
|
||||
}
|
||||
#endif
|
||||
|
||||
apr_table_addn(e, "SERVER_SIGNATURE", ap_psignature("", r));
|
||||
apr_table_addn(e, "SERVER_SOFTWARE", ap_get_server_banner());
|
||||
apr_table_addn(e, "SERVER_NAME",
|
||||
ap_escape_html(r->pool, ap_get_server_name(r)));
|
||||
apr_table_addn(e, "SERVER_ADDR", r->connection->local_ip); /* Apache */
|
||||
apr_table_addn(e, "SERVER_PORT",
|
||||
apr_psprintf(r->pool, "%u", ap_get_server_port(r)));
|
||||
host = ap_get_remote_host(c, r->per_dir_config, REMOTE_HOST, NULL);
|
||||
if (host) {
|
||||
apr_table_addn(e, "REMOTE_HOST", host);
|
||||
}
|
||||
apr_table_addn(e, "REMOTE_ADDR", c->remote_ip);
|
||||
apr_table_addn(e, "DOCUMENT_ROOT", ap_document_root(r)); /* Apache */
|
||||
apr_table_addn(e, "SERVER_ADMIN", s->server_admin); /* Apache */
|
||||
apr_table_addn(e, "SCRIPT_FILENAME", r->filename); /* Apache */
|
||||
|
||||
rport = c->remote_addr->port;
|
||||
apr_table_addn(e, "REMOTE_PORT", apr_itoa(r->pool, rport));
|
||||
|
||||
if (r->user) {
|
||||
apr_table_addn(e, "REMOTE_USER", r->user);
|
||||
}
|
||||
else if (r->prev) {
|
||||
request_rec *back = r->prev;
|
||||
|
||||
while (back) {
|
||||
if (back->user) {
|
||||
apr_table_addn(e, "REDIRECT_REMOTE_USER", back->user);
|
||||
break;
|
||||
}
|
||||
back = back->prev;
|
||||
}
|
||||
}
|
||||
if (r->ap_auth_type) {
|
||||
apr_table_addn(e, "AUTH_TYPE", r->ap_auth_type);
|
||||
}
|
||||
//rem_logname = ap_get_remote_logname(r);
|
||||
//if (rem_logname) {
|
||||
// apr_table_addn(e, "REMOTE_IDENT", apr_pstrdup(r->pool, rem_logname));
|
||||
//}
|
||||
|
||||
/* Apache custom error responses. If we have redirected set two new vars */
|
||||
|
||||
if (r->prev) {
|
||||
if (r->prev->args) {
|
||||
apr_table_addn(e, "REDIRECT_QUERY_STRING", r->prev->args);
|
||||
}
|
||||
if (r->prev->uri) {
|
||||
apr_table_addn(e, "REDIRECT_URL", r->prev->uri);
|
||||
}
|
||||
}
|
||||
|
||||
if (e != r->subprocess_env) {
|
||||
apr_table_overlap(r->subprocess_env, e, APR_OVERLAP_TABLES_SET);
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef WIN32
|
||||
|
||||
unixd_config_rec unixd_config = { NULL, 0, 0, 0, NULL };
|
||||
const char *ap_server_argv0 = "nginx";
|
||||
|
||||
#ifdef HAVE_GETPWNAM
|
||||
AP_DECLARE(uid_t) ap_uname2id(const char *name)
|
||||
{
|
||||
struct passwd *ent;
|
||||
|
||||
if (name[0] == '#')
|
||||
return (atoi(&name[1]));
|
||||
|
||||
if (!(ent = getpwnam(name))) {
|
||||
ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL,
|
||||
"%s: bad user name %s", ap_server_argv0, name);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
return (ent->pw_uid);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_GETGRNAM
|
||||
AP_DECLARE(gid_t) ap_gname2id(const char *name)
|
||||
{
|
||||
struct group *ent;
|
||||
|
||||
if (name[0] == '#')
|
||||
return (atoi(&name[1]));
|
||||
|
||||
if (!(ent = getgrnam(name))) {
|
||||
ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL,
|
||||
"%s: bad group name %s", ap_server_argv0, name);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
return (ent->gr_gid);
|
||||
}
|
||||
#endif
|
||||
|
||||
AP_DECLARE(void) unixd_pre_config(apr_pool_t *ptemp)
|
||||
{
|
||||
apr_finfo_t wrapper;
|
||||
|
||||
unixd_config.user_name = DEFAULT_USER;
|
||||
unixd_config.user_id = ap_uname2id(DEFAULT_USER);
|
||||
unixd_config.group_id = ap_gname2id(DEFAULT_GROUP);
|
||||
|
||||
unixd_config.chroot_dir = NULL; /* none */
|
||||
|
||||
/* Check for suexec */
|
||||
unixd_config.suexec_enabled = 0;
|
||||
/* if ((apr_stat(&wrapper, SUEXEC_BIN,
|
||||
APR_FINFO_NORM, ptemp)) != APR_SUCCESS) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ((wrapper.protection & APR_USETID) && wrapper.user == 0) {
|
||||
unixd_config.suexec_enabled = 1;
|
||||
}*/
|
||||
}
|
||||
|
||||
/* XXX move to APR and externalize (but implement differently :) ) */
|
||||
static apr_lockmech_e proc_mutex_mech(apr_proc_mutex_t *pmutex)
|
||||
{
|
||||
const char *mechname = apr_proc_mutex_name(pmutex);
|
||||
|
||||
if (!strcmp(mechname, "sysvsem")) {
|
||||
return APR_LOCK_SYSVSEM;
|
||||
}
|
||||
else if (!strcmp(mechname, "flock")) {
|
||||
return APR_LOCK_FLOCK;
|
||||
}
|
||||
return APR_LOCK_DEFAULT;
|
||||
}
|
||||
|
||||
AP_DECLARE(apr_status_t) unixd_set_proc_mutex_perms(apr_proc_mutex_t *pmutex)
|
||||
{
|
||||
////////////////
|
||||
if (unixd_config.user_name == NULL)
|
||||
{
|
||||
unixd_pre_config(NULL);
|
||||
}
|
||||
////////////////
|
||||
if (!geteuid()) {
|
||||
apr_lockmech_e mech = proc_mutex_mech(pmutex);
|
||||
|
||||
switch(mech) {
|
||||
#if APR_HAS_SYSVSEM_SERIALIZE
|
||||
case APR_LOCK_SYSVSEM:
|
||||
{
|
||||
apr_os_proc_mutex_t ospmutex;
|
||||
#if !APR_HAVE_UNION_SEMUN
|
||||
union semun {
|
||||
long val;
|
||||
struct semid_ds *buf;
|
||||
unsigned short *array;
|
||||
};
|
||||
#endif
|
||||
union semun ick;
|
||||
struct semid_ds buf;
|
||||
|
||||
apr_os_proc_mutex_get(&ospmutex, pmutex);
|
||||
buf.sem_perm.uid = unixd_config.user_id;
|
||||
buf.sem_perm.gid = unixd_config.group_id;
|
||||
buf.sem_perm.mode = 0600;
|
||||
ick.buf = &buf;
|
||||
if (semctl(ospmutex.crossproc, 0, IPC_SET, ick) < 0) {
|
||||
return errno;
|
||||
}
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
#if APR_HAS_FLOCK_SERIALIZE
|
||||
case APR_LOCK_FLOCK:
|
||||
{
|
||||
const char *lockfile = apr_proc_mutex_lockfile(pmutex);
|
||||
|
||||
if (lockfile) {
|
||||
if (chown(lockfile, unixd_config.user_id,
|
||||
-1 /* no gid change */) < 0) {
|
||||
return errno;
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
/* do nothing */
|
||||
break;
|
||||
}
|
||||
}
|
||||
return APR_SUCCESS;
|
||||
}
|
||||
|
||||
AP_DECLARE(apr_status_t) unixd_set_global_mutex_perms(apr_global_mutex_t *gmutex)
|
||||
{
|
||||
#if !APR_PROC_MUTEX_IS_GLOBAL
|
||||
apr_os_global_mutex_t osgmutex;
|
||||
apr_os_global_mutex_get(&osgmutex, gmutex);
|
||||
return unixd_set_proc_mutex_perms(osgmutex.proc_mutex);
|
||||
#else /* APR_PROC_MUTEX_IS_GLOBAL */
|
||||
/* In this case, apr_proc_mutex_t and apr_global_mutex_t are the same. */
|
||||
return unixd_set_proc_mutex_perms(gmutex);
|
||||
#endif /* APR_PROC_MUTEX_IS_GLOBAL */
|
||||
}
|
||||
|
||||
#endif
|
26
standalone/standalone.sln
Normal file
26
standalone/standalone.sln
Normal file
@ -0,0 +1,26 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 11.00
|
||||
# Visual Studio 2010
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "standalone", "standalone.vcxproj", "{20EC871F-B6A0-4398-9B67-A33598A796E8}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Win32 = Debug|Win32
|
||||
Debug|x64 = Debug|x64
|
||||
Release|Win32 = Release|Win32
|
||||
Release|x64 = Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{20EC871F-B6A0-4398-9B67-A33598A796E8}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{20EC871F-B6A0-4398-9B67-A33598A796E8}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{20EC871F-B6A0-4398-9B67-A33598A796E8}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{20EC871F-B6A0-4398-9B67-A33598A796E8}.Debug|x64.Build.0 = Debug|x64
|
||||
{20EC871F-B6A0-4398-9B67-A33598A796E8}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{20EC871F-B6A0-4398-9B67-A33598A796E8}.Release|Win32.Build.0 = Release|Win32
|
||||
{20EC871F-B6A0-4398-9B67-A33598A796E8}.Release|x64.ActiveCfg = Release|x64
|
||||
{20EC871F-B6A0-4398-9B67-A33598A796E8}.Release|x64.Build.0 = Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
218
standalone/standalone.vcxproj
Normal file
218
standalone/standalone.vcxproj
Normal file
@ -0,0 +1,218 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{20EC871F-B6A0-4398-9B67-A33598A796E8}</ProjectGuid>
|
||||
<RootNamespace>standalone</RootNamespace>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup />
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>C:\work\pcre-8.30\include;C:\work\pcre-8.30;C:\work\libxml2-2.7.7\include;C:\apache22\include;..\apache2</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>_MBCS;%(PreprocessorDefinitions);WIN32;WINNT;inline=APR_INLINE;AP_DECLARE_STATIC;VERSION_STANDALONE</PreprocessorDefinitions>
|
||||
<DisableSpecificWarnings>4244;4018</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;ws2_32.lib;%(AdditionalDependencies);libapr-1.lib;libaprutil-1.lib;pcre.lib;libxml2.lib</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>c:\drop\x86</AdditionalLibraryDirectories>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>C:\work\pcre-8.30\include;C:\work\pcre-8.30;C:\work\libxml2-2.7.7\include;C:\apache22\include;..\apache2</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>_MBCS;%(PreprocessorDefinitions);WIN32;WINNT;inline=APR_INLINE;AP_DECLARE_STATIC</PreprocessorDefinitions>
|
||||
<DisableSpecificWarnings>4244;4018</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;ws2_32.lib;%(AdditionalDependencies);libapr-1.lib;libaprutil-1.lib;pcre.lib;libxml2.lib</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>c:\drop\amd64</AdditionalLibraryDirectories>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<AdditionalIncludeDirectories>C:\work\pcre-8.30\include;C:\work\pcre-8.30;C:\work\libxml2-2.7.7\include;C:\apache22\include;..\apache2</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;ws2_32.lib;%(AdditionalDependencies);libapr-1.lib;libaprutil-1.lib;pcre.lib;libxml2.lib</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>c:\drop\x86</AdditionalLibraryDirectories>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<AdditionalIncludeDirectories>C:\work\pcre-8.30\include;C:\work\pcre-8.30;C:\work\libxml2-2.7.7\include;C:\apache22\include;..\apache2</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;ws2_32.lib;%(AdditionalDependencies);libapr-1.lib;libaprutil-1.lib;pcre.lib;libxml2.lib</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>c:\drop\amd64</AdditionalLibraryDirectories>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\apache2\acmp.c" />
|
||||
<ClCompile Include="..\apache2\apache2_config.c" />
|
||||
<ClCompile Include="..\apache2\apache2_io.c" />
|
||||
<ClCompile Include="..\apache2\apache2_util.c" />
|
||||
<ClCompile Include="..\apache2\modsecurity.c" />
|
||||
<ClCompile Include="..\apache2\mod_security2.c" />
|
||||
<ClCompile Include="..\apache2\msc_crypt.c" />
|
||||
<ClCompile Include="..\apache2\msc_geo.c" />
|
||||
<ClCompile Include="..\apache2\msc_gsb.c" />
|
||||
<ClCompile Include="..\apache2\msc_logging.c" />
|
||||
<ClCompile Include="..\apache2\msc_lua.c" />
|
||||
<ClCompile Include="..\apache2\msc_multipart.c" />
|
||||
<ClCompile Include="..\apache2\msc_parsers.c" />
|
||||
<ClCompile Include="..\apache2\msc_pcre.c" />
|
||||
<ClCompile Include="..\apache2\msc_release.c" />
|
||||
<ClCompile Include="..\apache2\msc_reqbody.c" />
|
||||
<ClCompile Include="..\apache2\msc_tree.c" />
|
||||
<ClCompile Include="..\apache2\msc_unicode.c" />
|
||||
<ClCompile Include="..\apache2\msc_util.c" />
|
||||
<ClCompile Include="..\apache2\msc_xml.c" />
|
||||
<ClCompile Include="..\apache2\persist_dbm.c" />
|
||||
<ClCompile Include="..\apache2\re.c" />
|
||||
<ClCompile Include="..\apache2\re_actions.c" />
|
||||
<ClCompile Include="..\apache2\re_operators.c" />
|
||||
<ClCompile Include="..\apache2\re_tfns.c" />
|
||||
<ClCompile Include="..\apache2\re_variables.c" />
|
||||
<ClCompile Include="api.c" />
|
||||
<ClCompile Include="buckets.c">
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">C:\work\pcre-8.30\include;C:\work\pcre-8.30;C:\work\libxml2-2.7.7\include;C:\apache22\include;;..\apache2</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">C:\work\pcre-8.30\include;C:\work\pcre-8.30;C:\work\libxml2-2.7.7\include;C:\apache22\include;;..\apache2</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">C:\work\pcre-8.30\include;C:\work\pcre-8.30;C:\work\libxml2-2.7.7\include;C:\apache22\include;;..\apache2</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">C:\work\pcre-8.30\include;C:\work\pcre-8.30;C:\work\libxml2-2.7.7\include;C:\apache22\include;;..\apache2</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<ClCompile Include="config.c" />
|
||||
<ClCompile Include="filters.c">
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">C:\work\pcre-8.30\include;C:\work\pcre-8.30;C:\work\libxml2-2.7.7\include;C:\apache22\include;..\apache2</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">C:\work\pcre-8.30\include;C:\work\pcre-8.30;C:\work\libxml2-2.7.7\include;C:\apache22\include;..\apache2</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">C:\work\pcre-8.30\include;C:\work\pcre-8.30;C:\work\libxml2-2.7.7\include;C:\apache22\include;..\apache2</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">C:\work\pcre-8.30\include;C:\work\pcre-8.30;C:\work\libxml2-2.7.7\include;C:\apache22\include;..\apache2</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<ClCompile Include="hooks.c">
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">C:\work\pcre-8.30\include;C:\work\pcre-8.30;C:\work\libxml2-2.7.7\include;C:\apache22\include;..\apache2</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">C:\work\pcre-8.30\include;C:\work\pcre-8.30;C:\work\libxml2-2.7.7\include;C:\apache22\include;..\apache2</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">C:\work\pcre-8.30\include;C:\work\pcre-8.30;C:\work\libxml2-2.7.7\include;C:\apache22\include;..\apache2</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">C:\work\pcre-8.30\include;C:\work\pcre-8.30;C:\work\libxml2-2.7.7\include;C:\apache22\include;..\apache2</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<ClCompile Include="main.cpp">
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">C:\work\pcre-8.30\include;C:\work\pcre-8.30;C:\work\libxml2-2.7.7\include;C:\apache22\include;..\apache2</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">C:\work\pcre-8.30\include;C:\work\pcre-8.30;C:\work\libxml2-2.7.7\include;C:\apache22\include;..\apache2</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">C:\work\pcre-8.30\include;C:\work\pcre-8.30;C:\work\libxml2-2.7.7\include;C:\apache22\include;..\apache2</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">C:\work\pcre-8.30\include;C:\work\pcre-8.30;C:\work\libxml2-2.7.7\include;C:\apache22\include;..\apache2</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<ClCompile Include="regex.c">
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">C:\work\pcre-8.30\include;C:\work\pcre-8.30;C:\work\libxml2-2.7.7\include;C:\apache22\include;..\apache2</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">C:\work\pcre-8.30\include;C:\work\pcre-8.30;C:\work\libxml2-2.7.7\include;C:\apache22\include;..\apache2</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">C:\work\pcre-8.30\include;C:\work\pcre-8.30;C:\work\libxml2-2.7.7\include;C:\apache22\include;..\apache2</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">C:\work\pcre-8.30\include;C:\work\pcre-8.30;C:\work\libxml2-2.7.7\include;C:\apache22\include;..\apache2</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<ClCompile Include="server.c">
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">C:\work\pcre-8.30\include;C:\work\pcre-8.30;C:\work\libxml2-2.7.7\include;C:\apache22\include;..\apache2</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">C:\work\pcre-8.30\include;C:\work\pcre-8.30;C:\work\libxml2-2.7.7\include;C:\apache22\include;..\apache2</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">C:\work\pcre-8.30\include;C:\work\pcre-8.30;C:\work\libxml2-2.7.7\include;C:\apache22\include;..\apache2</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">C:\work\pcre-8.30\include;C:\work\pcre-8.30;C:\work\libxml2-2.7.7\include;C:\apache22\include;..\apache2</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\apache2\acmp.h" />
|
||||
<ClInclude Include="..\apache2\apache2.h" />
|
||||
<ClInclude Include="..\apache2\modsecurity.h" />
|
||||
<ClInclude Include="..\apache2\modsecurity_config.h" />
|
||||
<ClInclude Include="..\apache2\modsecurity_config_auto.h" />
|
||||
<ClInclude Include="..\apache2\msc_crypt.h" />
|
||||
<ClInclude Include="..\apache2\msc_geo.h" />
|
||||
<ClInclude Include="..\apache2\msc_gsb.h" />
|
||||
<ClInclude Include="..\apache2\msc_logging.h" />
|
||||
<ClInclude Include="..\apache2\msc_lua.h" />
|
||||
<ClInclude Include="..\apache2\msc_multipart.h" />
|
||||
<ClInclude Include="..\apache2\msc_parsers.h" />
|
||||
<ClInclude Include="..\apache2\msc_pcre.h" />
|
||||
<ClInclude Include="..\apache2\msc_release.h" />
|
||||
<ClInclude Include="..\apache2\msc_tree.h" />
|
||||
<ClInclude Include="..\apache2\msc_unicode.h" />
|
||||
<ClInclude Include="..\apache2\msc_util.h" />
|
||||
<ClInclude Include="..\apache2\msc_xml.h" />
|
||||
<ClInclude Include="..\apache2\persist_dbm.h" />
|
||||
<ClInclude Include="..\apache2\re.h" />
|
||||
<ClInclude Include="..\apache2\utf8tables.h" />
|
||||
<ClInclude Include="api.h" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
192
standalone/standalone.vcxproj.filters
Normal file
192
standalone/standalone.vcxproj.filters
Normal file
@ -0,0 +1,192 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="Resource Files">
|
||||
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="ModSecurity Headers">
|
||||
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="ModSecurity Sources">
|
||||
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Standalone Sources">
|
||||
<UniqueIdentifier>{2d4a2f57-e994-4dad-888a-e61a65029abf}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\apache2\acmp.c">
|
||||
<Filter>ModSecurity Sources</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\apache2\apache2_config.c">
|
||||
<Filter>ModSecurity Sources</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\apache2\apache2_io.c">
|
||||
<Filter>ModSecurity Sources</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\apache2\apache2_util.c">
|
||||
<Filter>ModSecurity Sources</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\apache2\mod_security2.c">
|
||||
<Filter>ModSecurity Sources</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\apache2\modsecurity.c">
|
||||
<Filter>ModSecurity Sources</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\apache2\msc_geo.c">
|
||||
<Filter>ModSecurity Sources</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\apache2\msc_gsb.c">
|
||||
<Filter>ModSecurity Sources</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\apache2\msc_logging.c">
|
||||
<Filter>ModSecurity Sources</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\apache2\msc_lua.c">
|
||||
<Filter>ModSecurity Sources</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\apache2\msc_multipart.c">
|
||||
<Filter>ModSecurity Sources</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\apache2\msc_parsers.c">
|
||||
<Filter>ModSecurity Sources</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\apache2\msc_pcre.c">
|
||||
<Filter>ModSecurity Sources</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\apache2\msc_release.c">
|
||||
<Filter>ModSecurity Sources</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\apache2\msc_reqbody.c">
|
||||
<Filter>ModSecurity Sources</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\apache2\msc_unicode.c">
|
||||
<Filter>ModSecurity Sources</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\apache2\msc_util.c">
|
||||
<Filter>ModSecurity Sources</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\apache2\msc_xml.c">
|
||||
<Filter>ModSecurity Sources</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\apache2\persist_dbm.c">
|
||||
<Filter>ModSecurity Sources</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\apache2\re.c">
|
||||
<Filter>ModSecurity Sources</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\apache2\re_actions.c">
|
||||
<Filter>ModSecurity Sources</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\apache2\re_operators.c">
|
||||
<Filter>ModSecurity Sources</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\apache2\re_tfns.c">
|
||||
<Filter>ModSecurity Sources</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\apache2\re_variables.c">
|
||||
<Filter>ModSecurity Sources</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="filters.c">
|
||||
<Filter>Standalone Sources</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="hooks.c">
|
||||
<Filter>Standalone Sources</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="buckets.c">
|
||||
<Filter>Standalone Sources</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="regex.c">
|
||||
<Filter>Standalone Sources</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="server.c">
|
||||
<Filter>Standalone Sources</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="config.c">
|
||||
<Filter>Standalone Sources</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="api.c">
|
||||
<Filter>Standalone Sources</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="main.cpp">
|
||||
<Filter>Standalone Sources</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\apache2\msc_crypt.c">
|
||||
<Filter>ModSecurity Sources</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\apache2\msc_tree.c">
|
||||
<Filter>ModSecurity Sources</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\apache2\acmp.h">
|
||||
<Filter>ModSecurity Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\apache2\apache2.h">
|
||||
<Filter>ModSecurity Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\apache2\modsecurity.h">
|
||||
<Filter>ModSecurity Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\apache2\modsecurity_config.h">
|
||||
<Filter>ModSecurity Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\apache2\modsecurity_config_auto.h">
|
||||
<Filter>ModSecurity Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\apache2\msc_geo.h">
|
||||
<Filter>ModSecurity Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\apache2\msc_gsb.h">
|
||||
<Filter>ModSecurity Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\apache2\msc_logging.h">
|
||||
<Filter>ModSecurity Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\apache2\msc_lua.h">
|
||||
<Filter>ModSecurity Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\apache2\msc_multipart.h">
|
||||
<Filter>ModSecurity Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\apache2\msc_parsers.h">
|
||||
<Filter>ModSecurity Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\apache2\msc_pcre.h">
|
||||
<Filter>ModSecurity Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\apache2\msc_release.h">
|
||||
<Filter>ModSecurity Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\apache2\msc_unicode.h">
|
||||
<Filter>ModSecurity Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\apache2\msc_util.h">
|
||||
<Filter>ModSecurity Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\apache2\msc_xml.h">
|
||||
<Filter>ModSecurity Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\apache2\persist_dbm.h">
|
||||
<Filter>ModSecurity Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\apache2\re.h">
|
||||
<Filter>ModSecurity Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\apache2\utf8tables.h">
|
||||
<Filter>ModSecurity Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="api.h">
|
||||
<Filter>Standalone Sources</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\apache2\msc_crypt.h">
|
||||
<Filter>ModSecurity Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\apache2\msc_tree.h">
|
||||
<Filter>ModSecurity Headers</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
</Project>
|
14
standalone/standalone.vcxproj.user
Normal file
14
standalone/standalone.vcxproj.user
Normal file
@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<LocalDebuggerCommandArguments>-c d:\xss.conf d:\test.dat</LocalDebuggerCommandArguments>
|
||||
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
||||
<LocalDebuggerCommand>$(TargetPath)</LocalDebuggerCommand>
|
||||
<LocalDebuggerAttach>false</LocalDebuggerAttach>
|
||||
<LocalDebuggerDebuggerType>NativeOnly</LocalDebuggerDebuggerType>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<LocalDebuggerCommandArguments>-c d:\xss.conf d:\test.dat</LocalDebuggerCommandArguments>
|
||||
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
||||
</PropertyGroup>
|
||||
</Project>
|
Loading…
x
Reference in New Issue
Block a user