modsecurity-v3.0.6/0000775000175000017500000000000014146027126015402 5ustar mhsvierulamhsvierulamodsecurity-v3.0.6/aclocal.m40000664000175000017500000015520514146027115017250 0ustar mhsvierulamhsvierula# generated automatically by aclocal 1.15.1 -*- Autoconf -*- # Copyright (C) 1996-2017 Free Software Foundation, Inc. # This file 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. m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, [m4_warning([this file was generated for autoconf 2.69. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically 'autoreconf'.])]) # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- # serial 1 (pkg-config-0.24) # # Copyright © 2004 Scott James Remnant . # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # PKG_PROG_PKG_CONFIG([MIN-VERSION]) # ---------------------------------- AC_DEFUN([PKG_PROG_PKG_CONFIG], [m4_pattern_forbid([^_?PKG_[A-Z_]+$]) m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$]) AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) fi if test -n "$PKG_CONFIG"; then _pkg_min_version=m4_default([$1], [0.9.0]) AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) PKG_CONFIG="" fi fi[]dnl ])# PKG_PROG_PKG_CONFIG # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) # # Check to see whether a particular set of modules exists. Similar # to PKG_CHECK_MODULES(), but does not set variables or print errors. # # Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) # only at the first occurence in configure.ac, so if the first place # it's called might be skipped (such as if it is within an "if", you # have to call PKG_CHECK_EXISTS manually # -------------------------------------------------------------- AC_DEFUN([PKG_CHECK_EXISTS], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl if test -n "$PKG_CONFIG" && \ AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then m4_default([$2], [:]) m4_ifvaln([$3], [else $3])dnl fi]) # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) # --------------------------------------------- m4_define([_PKG_CONFIG], [if test -n "$$1"; then pkg_cv_[]$1="$$1" elif test -n "$PKG_CONFIG"; then PKG_CHECK_EXISTS([$3], [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes ], [pkg_failed=yes]) else pkg_failed=untried fi[]dnl ])# _PKG_CONFIG # _PKG_SHORT_ERRORS_SUPPORTED # ----------------------------- AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], [AC_REQUIRE([PKG_PROG_PKG_CONFIG]) if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi[]dnl ])# _PKG_SHORT_ERRORS_SUPPORTED # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], # [ACTION-IF-NOT-FOUND]) # # # Note that if there is a possibility the first call to # PKG_CHECK_MODULES might not happen, you should be sure to include an # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac # # # -------------------------------------------------------------- AC_DEFUN([PKG_CHECK_MODULES], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl pkg_failed=no AC_MSG_CHECKING([for $1]) _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) _PKG_CONFIG([$1][_LIBS], [libs], [$2]) m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS and $1[]_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details.]) if test $pkg_failed = yes; then AC_MSG_RESULT([no]) _PKG_SHORT_ERRORS_SUPPORTED if test $_pkg_short_errors_supported = yes; then $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` else $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD m4_default([$4], [AC_MSG_ERROR( [Package requirements ($2) were not met: $$1_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. _PKG_TEXT])[]dnl ]) elif test $pkg_failed = untried; then AC_MSG_RESULT([no]) m4_default([$4], [AC_MSG_FAILURE( [The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. _PKG_TEXT To get pkg-config, see .])[]dnl ]) else $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS $1[]_LIBS=$pkg_cv_[]$1[]_LIBS AC_MSG_RESULT([yes]) $3 fi[]dnl ])# PKG_CHECK_MODULES # PKG_INSTALLDIR(DIRECTORY) # ------------------------- # Substitutes the variable pkgconfigdir as the location where a module # should install pkg-config .pc files. By default the directory is # $libdir/pkgconfig, but the default can be changed by passing # DIRECTORY. The user can override through the --with-pkgconfigdir # parameter. AC_DEFUN([PKG_INSTALLDIR], [m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])]) m4_pushdef([pkg_description], [pkg-config installation directory @<:@]pkg_default[@:>@]) AC_ARG_WITH([pkgconfigdir], [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],, [with_pkgconfigdir=]pkg_default) AC_SUBST([pkgconfigdir], [$with_pkgconfigdir]) m4_popdef([pkg_default]) m4_popdef([pkg_description]) ]) dnl PKG_INSTALLDIR # PKG_NOARCH_INSTALLDIR(DIRECTORY) # ------------------------- # Substitutes the variable noarch_pkgconfigdir as the location where a # module should install arch-independent pkg-config .pc files. By # default the directory is $datadir/pkgconfig, but the default can be # changed by passing DIRECTORY. The user can override through the # --with-noarch-pkgconfigdir parameter. AC_DEFUN([PKG_NOARCH_INSTALLDIR], [m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])]) m4_pushdef([pkg_description], [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@]) AC_ARG_WITH([noarch-pkgconfigdir], [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],, [with_noarch_pkgconfigdir=]pkg_default) AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir]) m4_popdef([pkg_default]) m4_popdef([pkg_description]) ]) dnl PKG_NOARCH_INSTALLDIR # PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE, # [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) # ------------------------------------------- # Retrieves the value of the pkg-config variable for the given module. AC_DEFUN([PKG_CHECK_VAR], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl _PKG_CONFIG([$1], [variable="][$3]["], [$2]) AS_VAR_COPY([$1], [pkg_cv_][$1]) AS_VAR_IF([$1], [""], [$5], [$4])dnl ])# PKG_CHECK_VAR # PKG_WITH_MODULES(VARIABLE-PREFIX, MODULES, # [ACTION-IF-FOUND],[ACTION-IF-NOT-FOUND], # [DESCRIPTION], [DEFAULT]) # # Prepare a "--with-" configure option using the lowercase [VARIABLE-PREFIX] # name, merging the behaviour of AC_ARG_WITH and PKG_CHECK_MODULES in a single # macro # # -------------------------------------------------------------- AC_DEFUN([PKG_WITH_MODULES], [ m4_pushdef([with_arg], m4_tolower([$1])) m4_pushdef([description], [m4_default([$5], [build with ]with_arg[ support])]) m4_pushdef([def_arg], [m4_default([$6], [auto])]) m4_pushdef([def_action_if_found], [AS_TR_SH([with_]with_arg)=yes]) m4_pushdef([def_action_if_not_found], [AS_TR_SH([with_]with_arg)=no]) m4_case(def_arg, [yes],[m4_pushdef([with_without], [--without-]with_arg)], [m4_pushdef([with_without],[--with-]with_arg)]) AC_ARG_WITH(with_arg, AS_HELP_STRING(with_without, description[ @<:@default=]def_arg[@:>@]),, [AS_TR_SH([with_]with_arg)=def_arg]) AS_CASE([$AS_TR_SH([with_]with_arg)], [yes],[PKG_CHECK_MODULES([$1],[$2],$3,$4)], [auto],[PKG_CHECK_MODULES([$1],[$2], [m4_n([def_action_if_found]) $3], [m4_n([def_action_if_not_found]) $4])]) m4_popdef([with_arg]) m4_popdef([description]) m4_popdef([def_arg]) ]) dnl PKG_WITH_MODULES # PKG_HAVE_WITH_MODULES(VARIABLE-PREFIX, MODULES, # [DESCRIPTION], [DEFAULT]) # # Convenience macro to trigger AM_CONDITIONAL after # PKG_WITH_MODULES check. # # HAVE_[VARIABLE-PREFIX] is exported as make variable. # # -------------------------------------------------------------- AC_DEFUN([PKG_HAVE_WITH_MODULES], [ PKG_WITH_MODULES([$1],[$2],,,[$3],[$4]) AM_CONDITIONAL([HAVE_][$1], [test "$AS_TR_SH([with_]m4_tolower([$1]))" = "yes"]) ]) # PKG_HAVE_DEFINE_WITH_MODULES(VARIABLE-PREFIX, MODULES, # [DESCRIPTION], [DEFAULT]) # # Convenience macro to run AM_CONDITIONAL and AC_DEFINE after # PKG_WITH_MODULES check. # # HAVE_[VARIABLE-PREFIX] is exported as make and preprocessor variable. # # -------------------------------------------------------------- AC_DEFUN([PKG_HAVE_DEFINE_WITH_MODULES], [ PKG_HAVE_WITH_MODULES([$1],[$2],[$3],[$4]) AS_IF([test "$AS_TR_SH([with_]m4_tolower([$1]))" = "yes"], [AC_DEFINE([HAVE_][$1], 1, [Enable ]m4_tolower([$1])[ support])]) ]) # Copyright (C) 2002-2017 Free Software Foundation, Inc. # # This file 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. # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.15' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. m4_if([$1], [1.15.1], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) # _AM_AUTOCONF_VERSION(VERSION) # ----------------------------- # aclocal traces this macro to find the Autoconf version. # This is a private macro too. Using m4_define simplifies # the logic in aclocal, which can simply ignore this definition. m4_define([_AM_AUTOCONF_VERSION], []) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.15.1])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # Copyright (C) 2011-2017 Free Software Foundation, Inc. # # This file 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. # AM_PROG_AR([ACT-IF-FAIL]) # ------------------------- # Try to determine the archiver interface, and trigger the ar-lib wrapper # if it is needed. If the detection of archiver interface fails, run # ACT-IF-FAIL (default is to abort configure with a proper error message). AC_DEFUN([AM_PROG_AR], [AC_BEFORE([$0], [LT_INIT])dnl AC_BEFORE([$0], [AC_PROG_LIBTOOL])dnl AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([ar-lib])dnl AC_CHECK_TOOLS([AR], [ar lib "link -lib"], [false]) : ${AR=ar} AC_CACHE_CHECK([the archiver ($AR) interface], [am_cv_ar_interface], [AC_LANG_PUSH([C]) am_cv_ar_interface=ar AC_COMPILE_IFELSE([AC_LANG_SOURCE([[int some_variable = 0;]])], [am_ar_try='$AR cru libconftest.a conftest.$ac_objext >&AS_MESSAGE_LOG_FD' AC_TRY_EVAL([am_ar_try]) if test "$ac_status" -eq 0; then am_cv_ar_interface=ar else am_ar_try='$AR -NOLOGO -OUT:conftest.lib conftest.$ac_objext >&AS_MESSAGE_LOG_FD' AC_TRY_EVAL([am_ar_try]) if test "$ac_status" -eq 0; then am_cv_ar_interface=lib else am_cv_ar_interface=unknown fi fi rm -f conftest.lib libconftest.a ]) AC_LANG_POP([C])]) case $am_cv_ar_interface in ar) ;; lib) # Microsoft lib, so override with the ar-lib wrapper script. # FIXME: It is wrong to rewrite AR. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__AR in this case, # and then we could set am__AR="$am_aux_dir/ar-lib \$(AR)" or something # similar. AR="$am_aux_dir/ar-lib $AR" ;; unknown) m4_default([$1], [AC_MSG_ERROR([could not determine $AR interface])]) ;; esac AC_SUBST([AR])dnl ]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- # Copyright (C) 2001-2017 Free Software Foundation, Inc. # # This file 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. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to # '$srcdir', '$srcdir/..', or '$srcdir/../..'. # # Of course, Automake must honor this variable whenever it calls a # tool from the auxiliary directory. The problem is that $srcdir (and # therefore $ac_aux_dir as well) can be either absolute or relative, # depending on how configure is run. This is pretty annoying, since # it makes $ac_aux_dir quite unusable in subdirectories: in the top # source directory, any form will work fine, but in subdirectories a # relative path needs to be adjusted first. # # $ac_aux_dir/missing # fails when called from a subdirectory if $ac_aux_dir is relative # $top_srcdir/$ac_aux_dir/missing # fails if $ac_aux_dir is absolute, # fails when called from a subdirectory in a VPATH build with # a relative $ac_aux_dir # # The reason of the latter failure is that $top_srcdir and $ac_aux_dir # are both prefixed by $srcdir. In an in-source build this is usually # harmless because $srcdir is '.', but things will broke when you # start a VPATH build or use an absolute $srcdir. # # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, # iff we strip the leading $srcdir from $ac_aux_dir. That would be: # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` # and then we would define $MISSING as # MISSING="\${SHELL} $am_aux_dir/missing" # This will work as long as MISSING is not called from configure, because # unfortunately $(top_srcdir) has no meaning in configure. # However there are other variables, like CC, which are often used in # configure, and could therefore not use this "fixed" $ac_aux_dir. # # Another solution, used here, is to always expand $ac_aux_dir to an # absolute PATH. The drawback is that using absolute paths prevent a # configured tree to be moved without reconfiguration. AC_DEFUN([AM_AUX_DIR_EXPAND], [AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl # Expand $ac_aux_dir to an absolute path. am_aux_dir=`cd "$ac_aux_dir" && pwd` ]) # AM_COND_IF -*- Autoconf -*- # Copyright (C) 2008-2017 Free Software Foundation, Inc. # # This file 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. # _AM_COND_IF # _AM_COND_ELSE # _AM_COND_ENDIF # -------------- # These macros are only used for tracing. m4_define([_AM_COND_IF]) m4_define([_AM_COND_ELSE]) m4_define([_AM_COND_ENDIF]) # AM_COND_IF(COND, [IF-TRUE], [IF-FALSE]) # --------------------------------------- # If the shell condition COND is true, execute IF-TRUE, otherwise execute # IF-FALSE. Allow automake to learn about conditional instantiating macros # (the AC_CONFIG_FOOS). AC_DEFUN([AM_COND_IF], [m4_ifndef([_AM_COND_VALUE_$1], [m4_fatal([$0: no such condition "$1"])])dnl _AM_COND_IF([$1])dnl if test -z "$$1_TRUE"; then : m4_n([$2])[]dnl m4_ifval([$3], [_AM_COND_ELSE([$1])dnl else $3 ])dnl _AM_COND_ENDIF([$1])dnl fi[]dnl ]) # AM_CONDITIONAL -*- Autoconf -*- # Copyright (C) 1997-2017 Free Software Foundation, Inc. # # This file 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. # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ([2.52])dnl m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl AC_SUBST([$1_TRUE])dnl AC_SUBST([$1_FALSE])dnl _AM_SUBST_NOTMAKE([$1_TRUE])dnl _AM_SUBST_NOTMAKE([$1_FALSE])dnl m4_define([_AM_COND_VALUE_$1], [$2])dnl if $2; then $1_TRUE= $1_FALSE='#' else $1_TRUE='#' $1_FALSE= fi AC_CONFIG_COMMANDS_PRE( [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then AC_MSG_ERROR([[conditional "$1" was never defined. Usually this means the macro was only invoked conditionally.]]) fi])]) # Copyright (C) 1999-2017 Free Software Foundation, Inc. # # This file 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. # There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, # will think it sees a *use*, and therefore will trigger all it's # C support machinery. Also note that it means that autoscan, seeing # CC etc. in the Makefile, will ask for an AC_PROG_CC use... # _AM_DEPENDENCIES(NAME) # ---------------------- # See how the compiler implements dependency checking. # NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". # We try a few techniques and use that to set a single cache variable. # # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular # dependency, and given that the user is not expected to run this macro, # just rely on AC_PROG_CC. AC_DEFUN([_AM_DEPENDENCIES], [AC_REQUIRE([AM_SET_DEPDIR])dnl AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl AC_REQUIRE([AM_MAKE_INCLUDE])dnl AC_REQUIRE([AM_DEP_TRACK])dnl m4_if([$1], [CC], [depcc="$CC" am_compiler_list=], [$1], [CXX], [depcc="$CXX" am_compiler_list=], [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], [$1], [UPC], [depcc="$UPC" am_compiler_list=], [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], [depcc="$$1" am_compiler_list=]) AC_CACHE_CHECK([dependency style of $depcc], [am_cv_$1_dependencies_compiler_type], [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_$1_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` fi am__universal=false m4_case([$1], [CC], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac], [CXX], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac]) for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with # Solaris 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle '-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # After this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_$1_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_$1_dependencies_compiler_type=none fi ]) AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) AM_CONDITIONAL([am__fastdep$1], [ test "x$enable_dependency_tracking" != xno \ && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) ]) # AM_SET_DEPDIR # ------------- # Choose a directory name for dependency files. # This macro is AC_REQUIREd in _AM_DEPENDENCIES. AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl ]) # AM_DEP_TRACK # ------------ AC_DEFUN([AM_DEP_TRACK], [AC_ARG_ENABLE([dependency-tracking], [dnl AS_HELP_STRING( [--enable-dependency-tracking], [do not reject slow dependency extractors]) AS_HELP_STRING( [--disable-dependency-tracking], [speeds up one-time build])]) if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' am__nodep='_no' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) AC_SUBST([AMDEPBACKSLASH])dnl _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl AC_SUBST([am__nodep])dnl _AM_SUBST_NOTMAKE([am__nodep])dnl ]) # Generate code to set up dependency tracking. -*- Autoconf -*- # Copyright (C) 1999-2017 Free Software Foundation, Inc. # # This file 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. # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [{ # Older Autoconf quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named 'Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`AS_DIRNAME("$mf")` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running 'make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "$am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`AS_DIRNAME(["$file"])` AS_MKDIR_P([$dirpart/$fdir]) # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ])# _AM_OUTPUT_DEPENDENCY_COMMANDS # AM_OUTPUT_DEPENDENCY_COMMANDS # ----------------------------- # This macro should only be invoked once -- use via AC_REQUIRE. # # This code is only required when automatic dependency tracking # is enabled. FIXME. This creates each '.P' file that we will # need in order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) ]) # Do all the work for Automake. -*- Autoconf -*- # Copyright (C) 1996-2017 Free Software Foundation, Inc. # # This file 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 macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. m4_define([AC_PROG_CC], m4_defn([AC_PROG_CC]) [_AM_PROG_CC_C_O ]) # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- # The call with PACKAGE and VERSION arguments is the old style # call (pre autoconf-2.50), which is being phased out. PACKAGE # and VERSION should now be passed to AC_INIT and removed from # the call to AM_INIT_AUTOMAKE. # We support both call styles for the transition. After # the next Automake release, Autoconf can make the AC_INIT # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.65])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl # test to see if srcdir already configured if test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi AC_SUBST([CYGPATH_W]) # Define the identity of the package. dnl Distinguish between old-style and new-style calls. m4_ifval([$2], [AC_DIAGNOSE([obsolete], [$0: two- and three-arguments forms are deprecated.]) m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. m4_if( m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), [ok:ok],, [m4_fatal([AC_INIT should be called with package and version arguments])])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl _AM_IF_OPTION([no-define],, [AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) AM_MISSING_PROG([AUTOCONF], [autoconf]) AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) AM_MISSING_PROG([AUTOHEADER], [autoheader]) AM_MISSING_PROG([MAKEINFO], [makeinfo]) AC_REQUIRE([AM_PROG_INSTALL_SH])dnl AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl AC_REQUIRE([AC_PROG_MKDIR_P])dnl # For better backward compatibility. To be removed once Automake 1.9.x # dies out for good. For more background, see: # # AC_SUBST([mkdir_p], ['$(MKDIR_P)']) # We need awk for the "check" target (and possibly the TAP driver). The # system "awk" is bad on some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])])]) _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], [_AM_DEPENDENCIES([CC])], [m4_define([AC_PROG_CC], m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES([CXX])], [m4_define([AC_PROG_CXX], m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJC], [_AM_DEPENDENCIES([OBJC])], [m4_define([AC_PROG_OBJC], m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], [_AM_DEPENDENCIES([OBJCXX])], [m4_define([AC_PROG_OBJCXX], m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl ]) AC_REQUIRE([AM_SILENT_RULES])dnl dnl The testsuite driver may need to know about EXEEXT, so add the dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. AC_CONFIG_COMMANDS_PRE(dnl [m4_provide_if([_AM_COMPILER_EXEEXT], [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl # POSIX will say in a future version that running "rm -f" with no argument # is OK; and we want to be able to make that assumption in our Makefile # recipes. So use an aggressive probe to check that the usage we want is # actually supported "in the wild" to an acceptable degree. # See automake bug#10828. # To make any issue more visible, cause the running configure to be aborted # by default if the 'rm' program in use doesn't match our expectations; the # user can still override this though. if rm -f && rm -fr && rm -rf; then : OK; else cat >&2 <<'END' Oops! Your 'rm' program seems unable to run without file operands specified on the command line, even when the '-f' option is present. This is contrary to the behaviour of most rm programs out there, and not conforming with the upcoming POSIX standard: Please tell bug-automake@gnu.org about your system, including the value of your $PATH and any error possibly output before this message. This can help us improve future automake versions. END if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then echo 'Configuration will proceed anyway, since you have set the' >&2 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 echo >&2 else cat >&2 <<'END' Aborting the configuration process, to ensure you take notice of the issue. You can download and install GNU coreutils to get an 'rm' implementation that behaves properly: . If you want to complete the configuration process using your problematic 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM to "yes", and re-run configure. END AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) fi fi dnl The trailing newline in this macro's definition is deliberate, for dnl backward compatibility and to allow trailing 'dnl'-style comments dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841. ]) dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further dnl mangled by Autoconf and run in a shell conditional statement. m4_define([_AC_COMPILER_EXEEXT], m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header # that is generated. The stamp files are numbered to have different names. # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the # loop where config.status creates the headers, so we can generate # our stamp files there. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers. _am_arg=$1 _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) # Copyright (C) 2001-2017 Free Software Foundation, Inc. # # This file 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. # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl if test x"${install_sh+set}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi AC_SUBST([install_sh])]) # Copyright (C) 2003-2017 Free Software Foundation, Inc. # # This file 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. # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. AC_DEFUN([AM_SET_LEADING_DOT], [rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null AC_SUBST([am__leading_dot])]) # Check to see how 'make' treats includes. -*- Autoconf -*- # Copyright (C) 2001-2017 Free Software Foundation, Inc. # # This file 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. # AM_MAKE_INCLUDE() # ----------------- # Check to see how make treats includes. AC_DEFUN([AM_MAKE_INCLUDE], [am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. AC_MSG_CHECKING([for style of include used by $am_make]) am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from 'make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi AC_SUBST([am__include]) AC_SUBST([am__quote]) AC_MSG_RESULT([$_am_result]) rm -f confinc confmf ]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- # Copyright (C) 1997-2017 Free Software Foundation, Inc. # # This file 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. # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ AC_DEFUN([AM_MISSING_PROG], [AC_REQUIRE([AM_MISSING_HAS_RUN]) $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) # AM_MISSING_HAS_RUN # ------------------ # Define MISSING if not defined so far and test if it is modern enough. # If it is, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([missing])dnl if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --is-lightweight"; then am_missing_run="$MISSING " else am_missing_run= AC_MSG_WARN(['missing' script is too old or missing]) fi ]) # Helper functions for option handling. -*- Autoconf -*- # Copyright (C) 2001-2017 Free Software Foundation, Inc. # # This file 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. # _AM_MANGLE_OPTION(NAME) # ----------------------- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) # _AM_SET_OPTION(NAME) # -------------------- # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), [1])]) # _AM_SET_OPTIONS(OPTIONS) # ------------------------ # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) # ------------------------------------------- # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) # Copyright (C) 1999-2017 Free Software Foundation, Inc. # # This file 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. # _AM_PROG_CC_C_O # --------------- # Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC # to automatically call this. AC_DEFUN([_AM_PROG_CC_C_O], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([compile])dnl AC_LANG_PUSH([C])dnl AC_CACHE_CHECK( [whether $CC understands -c and -o together], [am_cv_prog_cc_c_o], [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) # Make sure it works both with $CC and with simple cc. # Following AC_PROG_CC_C_O, we do the test twice because some # compilers refuse to overwrite an existing .o file with -o, # though they will create one. am_cv_prog_cc_c_o=yes for am_i in 1 2; do if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ && test -f conftest2.$ac_objext; then : OK else am_cv_prog_cc_c_o=no break fi done rm -f core conftest* unset am_i]) if test "$am_cv_prog_cc_c_o" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi AC_LANG_POP([C])]) # For backward compatibility. AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) # Copyright (C) 2001-2017 Free Software Foundation, Inc. # # This file 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. # AM_RUN_LOG(COMMAND) # ------------------- # Run COMMAND, save the exit status in ac_status, and log it. # (This has been adapted from Autoconf's _AC_RUN_LOG macro.) AC_DEFUN([AM_RUN_LOG], [{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD (exit $ac_status); }]) # Check to make sure that the build environment is sane. -*- Autoconf -*- # Copyright (C) 1996-2017 Free Software Foundation, Inc. # # This file 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. # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[[\\\"\#\$\&\'\`$am_lf]]*) AC_MSG_ERROR([unsafe absolute working directory name]);; esac case $srcdir in *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; esac # Do 'set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( am_has_slept=no for am_try in 1 2; do echo "timestamp, slept: $am_has_slept" > conftest.file set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$[*]" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi if test "$[*]" != "X $srcdir/configure conftest.file" \ && test "$[*]" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken alias in your environment]) fi if test "$[2]" = conftest.file || test $am_try -eq 2; then break fi # Just in case. sleep 1 am_has_slept=yes done test "$[2]" = conftest.file ) then # Ok. : else AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi AC_MSG_RESULT([yes]) # If we didn't sleep, we still need to ensure time stamps of config.status and # generated files are strictly newer. am_sleep_pid= if grep 'slept: no' conftest.file >/dev/null 2>&1; then ( sleep 1 ) & am_sleep_pid=$! fi AC_CONFIG_COMMANDS_PRE( [AC_MSG_CHECKING([that generated files are newer than configure]) if test -n "$am_sleep_pid"; then # Hide warnings about reused PIDs. wait $am_sleep_pid 2>/dev/null fi AC_MSG_RESULT([done])]) rm -f conftest.file ]) # Copyright (C) 2009-2017 Free Software Foundation, Inc. # # This file 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. # AM_SILENT_RULES([DEFAULT]) # -------------------------- # Enable less verbose build rules; with the default set to DEFAULT # ("yes" being less verbose, "no" or empty being verbose). AC_DEFUN([AM_SILENT_RULES], [AC_ARG_ENABLE([silent-rules], [dnl AS_HELP_STRING( [--enable-silent-rules], [less verbose build output (undo: "make V=1")]) AS_HELP_STRING( [--disable-silent-rules], [verbose build output (undo: "make V=0")])dnl ]) case $enable_silent_rules in @%:@ ((( yes) AM_DEFAULT_VERBOSITY=0;; no) AM_DEFAULT_VERBOSITY=1;; *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; esac dnl dnl A few 'make' implementations (e.g., NonStop OS and NextStep) dnl do not support nested variable expansions. dnl See automake bug#9928 and bug#10237. am_make=${MAKE-make} AC_CACHE_CHECK([whether $am_make supports nested variables], [am_cv_make_support_nested_variables], [if AS_ECHO([['TRUE=$(BAR$(V)) BAR0=false BAR1=true V=1 am__doit: @$(TRUE) .PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then am_cv_make_support_nested_variables=yes else am_cv_make_support_nested_variables=no fi]) if test $am_cv_make_support_nested_variables = yes; then dnl Using '$V' instead of '$(V)' breaks IRIX make. AM_V='$(V)' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' else AM_V=$AM_DEFAULT_VERBOSITY AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY fi AC_SUBST([AM_V])dnl AM_SUBST_NOTMAKE([AM_V])dnl AC_SUBST([AM_DEFAULT_V])dnl AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl AC_SUBST([AM_DEFAULT_VERBOSITY])dnl AM_BACKSLASH='\' AC_SUBST([AM_BACKSLASH])dnl _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl ]) # Copyright (C) 2001-2017 Free Software Foundation, Inc. # # This file 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. # AM_PROG_INSTALL_STRIP # --------------------- # One issue with vendor 'install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip # is unlikely to handle the host's binaries. # Fortunately install-sh will honor a STRIPPROG variable, so we # always use install-sh in "make install-strip", and initialize # STRIPPROG with the value of the STRIP variable (set by the user). AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl # Installed binaries are usually stripped using 'strip' when the user # run "make install-strip". However 'strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the 'STRIP' environment variable to overrule this program. dnl Don't test for $cross_compiling = yes, because it might be 'maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) # Copyright (C) 2006-2017 Free Software Foundation, Inc. # # This file 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. # _AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. # This macro is traced by Automake. AC_DEFUN([_AM_SUBST_NOTMAKE]) # AM_SUBST_NOTMAKE(VARIABLE) # -------------------------- # Public sister of _AM_SUBST_NOTMAKE. AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Check how to create a tarball. -*- Autoconf -*- # Copyright (C) 2004-2017 Free Software Foundation, Inc. # # This file 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. # _AM_PROG_TAR(FORMAT) # -------------------- # Check how to create a tarball in format FORMAT. # FORMAT should be one of 'v7', 'ustar', or 'pax'. # # Substitute a variable $(am__tar) that is a command # writing to stdout a FORMAT-tarball containing the directory # $tardir. # tardir=directory && $(am__tar) > result.tar # # Substitute a variable $(am__untar) that extract such # a tarball read from stdin. # $(am__untar) < result.tar # AC_DEFUN([_AM_PROG_TAR], [# Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AC_SUBST([AMTAR], ['$${TAR-tar}']) # We'll loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' m4_if([$1], [v7], [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], [m4_case([$1], [ustar], [# The POSIX 1988 'ustar' format is defined with fixed-size fields. # There is notably a 21 bits limit for the UID and the GID. In fact, # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 # and bug#13588). am_max_uid=2097151 # 2^21 - 1 am_max_gid=$am_max_uid # The $UID and $GID variables are not portable, so we need to resort # to the POSIX-mandated id(1) utility. Errors in the 'id' calls # below are definitely unexpected, so allow the users to see them # (that is, avoid stderr redirection). am_uid=`id -u || echo unknown` am_gid=`id -g || echo unknown` AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) if test $am_uid -le $am_max_uid; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) _am_tools=none fi AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) if test $am_gid -le $am_max_gid; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) _am_tools=none fi], [pax], [], [m4_fatal([Unknown tar format])]) AC_MSG_CHECKING([how to create a $1 tar archive]) # Go ahead even if we have the value already cached. We do so because we # need to set the values for the 'am__tar' and 'am__untar' variables. _am_tools=${am_cv_prog_tar_$1-$_am_tools} for _am_tool in $_am_tools; do case $_am_tool in gnutar) for _am_tar in tar gnutar gtar; do AM_RUN_LOG([$_am_tar --version]) && break done am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' am__untar="$_am_tar -xf -" ;; plaintar) # Must skip GNU tar: if it does not support --format= it doesn't create # ustar tarball either. (tar --version) >/dev/null 2>&1 && continue am__tar='tar chf - "$$tardir"' am__tar_='tar chf - "$tardir"' am__untar='tar xf -' ;; pax) am__tar='pax -L -x $1 -w "$$tardir"' am__tar_='pax -L -x $1 -w "$tardir"' am__untar='pax -r' ;; cpio) am__tar='find "$$tardir" -print | cpio -o -H $1 -L' am__tar_='find "$tardir" -print | cpio -o -H $1 -L' am__untar='cpio -i -H $1 -d' ;; none) am__tar=false am__tar_=false am__untar=false ;; esac # If the value was cached, stop now. We just wanted to have am__tar # and am__untar set. test -n "${am_cv_prog_tar_$1}" && break # tar/untar a dummy directory, and stop if the command works. rm -rf conftest.dir mkdir conftest.dir echo GrepMe > conftest.dir/file AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) rm -rf conftest.dir if test -s conftest.tar; then AM_RUN_LOG([$am__untar /dev/null 2>&1 && break fi done rm -rf conftest.dir AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) AC_MSG_RESULT([$am_cv_prog_tar_$1])]) AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR m4_include([build/ax_prog_doxygen.m4]) m4_include([build/ax_valgrind_check.m4]) m4_include([build/curl.m4]) m4_include([build/libgeoip.m4]) m4_include([build/libmaxmind.m4]) m4_include([build/libtool.m4]) m4_include([build/libxml.m4]) m4_include([build/lmdb.m4]) m4_include([build/ltoptions.m4]) m4_include([build/ltsugar.m4]) m4_include([build/ltversion.m4]) m4_include([build/lt~obsolete.m4]) m4_include([build/lua.m4]) m4_include([build/pcre.m4]) m4_include([build/ssdeep.m4]) m4_include([build/yajl.m4]) modsecurity-v3.0.6/headers/0000775000175000017500000000000014146026157017020 5ustar mhsvierulamhsvierulamodsecurity-v3.0.6/headers/modsecurity/0000775000175000017500000000000014146026157021367 5ustar mhsvierulamhsvierulamodsecurity-v3.0.6/headers/modsecurity/intervention.h0000664000175000017500000000317014146026157024265 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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. * */ #ifndef HEADERS_MODSECURITY_INTERVENTION_H_ #define HEADERS_MODSECURITY_INTERVENTION_H_ #ifdef __cplusplus namespace modsecurity { #endif typedef struct ModSecurityIntervention_t { int status; int pause; char *url; char *log; int disruptive; } ModSecurityIntervention; #ifdef __cplusplus namespace intervention { static void reset(ModSecurityIntervention_t *i) { i->status = 200; i->pause = 0; i->disruptive = 0; } static void clean(ModSecurityIntervention_t *i) { i->url = NULL; i->log = NULL; reset(i); } static void freeUrl(ModSecurityIntervention_t *i) { if (i->url) { free(i->url); i->url = NULL; } } static void freeLog(ModSecurityIntervention_t *i) { if (i->log) { free(i->log); i->log = NULL; } } static void free(ModSecurityIntervention_t *i) { freeUrl(i); freeLog(i); } } // namespace intervention #endif #ifdef __cplusplus } // namespace modsecurity #endif #endif // HEADERS_MODSECURITY_INTERVENTION_H_ modsecurity-v3.0.6/headers/modsecurity/rules_properties.h0000664000175000017500000000107514146026157025151 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 modsecurity-v3.0.6/headers/modsecurity/audit_log.h0000664000175000017500000001266014146026157023514 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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. * */ #ifdef __cplusplus #include #include #include #endif #ifndef HEADERS_MODSECURITY_AUDIT_LOG_H_ #define HEADERS_MODSECURITY_AUDIT_LOG_H_ #include "modsecurity/transaction.h" #ifdef __cplusplus namespace modsecurity { namespace audit_log { namespace writer { class Writer; } /** @ingroup ModSecurity_CPP_API */ class AuditLog { public: AuditLog(); virtual ~AuditLog(); AuditLog(const AuditLog &a) = delete; enum AuditLogType { NotSetAuditLogType, SerialAuditLogType, ParallelAuditLogType, HttpsAuditLogType }; enum AuditLogStatus { NotSetLogStatus, OnAuditLogStatus, OffAuditLogStatus, RelevantOnlyAuditLogStatus }; enum AuditLogFormat { NotSetAuditLogFormat, JSONAuditLogFormat, NativeAuditLogFormat }; enum AuditLogParts { /** * Audit log header (mandatory). * */ AAuditLogPart = 2, /** * Request headers. * */ BAuditLogPart = 4, /** * Request body (present only if the request body exists and ModSecurity * is configured to intercept it). * */ CAuditLogPart = 8, /** * Reserved for intermediary response headers; not implemented yet. * */ DAuditLogPart = 16, /** * Intermediary response body (present only if ModSecurity is configured * to intercept response bodies, and if the audit log engine is * configured to record it). Intermediary response body is the same as the * actual response body unless ModSecurity intercepts the intermediary * response body, in which case the actual response body will contain the * error message (either the Apache default error message, or the * ErrorDocument page). * */ EAuditLogPart = 32, /** * Final response headers (excluding the Date and Server headers, which * are always added by Apache in the late stage of content delivery). * */ FAuditLogPart = 64, /** * Reserved for the actual response body; not implemented yet. * */ GAuditLogPart = 128, /** * Audit log trailer. * */ HAuditLogPart = 256, /** * This part is a replacement for part C. It will log the same data as C * in all cases except when multipart/form-data encoding in used. In this * case, it will log a fake application/x-www-form-urlencoded body that * contains the information about parameters but not about the files. This * is handy if you don’t want to have (often large) files stored in your * audit logs. * */ IAuditLogPart = 512, /** * This part contains information about the files uploaded using * multipart/form-data encoding. */ JAuditLogPart = 1024, /** * This part contains a full list of every rule that matched (one per * line) in the order they were matched. The rules are fully qualified and * will thus show inherited actions and default operators. Supported as of * v2.5.0. * */ KAuditLogPart = 2048, /** * Final boundary, signifies the end of the entry (mandatory). * */ ZAuditLogPart = 4096 }; bool setStorageDirMode(int permission); bool setFileMode(int permission); bool setStatus(AuditLogStatus new_status); bool setRelevantStatus(const std::basic_string& new_relevant_status); bool setFilePath1(const std::basic_string& path); bool setFilePath2(const std::basic_string& path); bool setStorageDir(const std::basic_string& path); bool setFormat(AuditLogFormat fmt); int getDirectoryPermission() const; int getFilePermission() const; int getParts() const; bool setParts(const std::basic_string& new_parts); bool setType(AuditLogType audit_type); bool init(std::string *error); virtual bool close(); bool saveIfRelevant(Transaction *transaction); bool saveIfRelevant(Transaction *transaction, int parts); bool isRelevant(int status); static int addParts(int parts, const std::string& new_parts); static int removeParts(int parts, const std::string& new_parts); bool merge(AuditLog *from, std::string *error); std::string m_path1; std::string m_path2; std::string m_storage_dir; AuditLogFormat m_format; protected: int m_parts; int m_defaultParts = AAuditLogPart | BAuditLogPart | CAuditLogPart | FAuditLogPart | HAuditLogPart | ZAuditLogPart; int m_filePermission; int m_defaultFilePermission = 0640; int m_directoryPermission; int m_defaultDirectoryPermission = 0750; private: AuditLogStatus m_status; AuditLogType m_type; std::string m_relevant; audit_log::writer::Writer *m_writer; }; } // namespace audit_log } // namespace modsecurity #endif #endif // HEADERS_MODSECURITY_AUDIT_LOG_H_ modsecurity-v3.0.6/headers/modsecurity/rules_set_phases.h0000664000175000017500000000254214146026157025113 0ustar mhsvierulamhsvierula /* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include #ifdef __cplusplus #include #include #include #include #include #endif #ifndef HEADERS_MODSECURITY_RULES_SET_PHASES_H_ #define HEADERS_MODSECURITY_RULES_SET_PHASES_H_ #include "modsecurity/rules.h" #ifdef __cplusplus namespace modsecurity { class RuleWithOperator; namespace Parser { class Driver; } /** @ingroup ModSecurity_CPP_API */ class RulesSetPhases { public: bool insert(std::shared_ptr rule); int append(RulesSetPhases *from, std::ostringstream *err); void dump() const; Rules *operator[](int index) { return &m_rulesAtPhase[index]; } Rules *at(int index) { return &m_rulesAtPhase[index]; } private: Rules m_rulesAtPhase[8]; }; } // namespace modsecurity #endif #endif // HEADERS_MODSECURITY_RULES_SET_PHASES_H_modsecurity-v3.0.6/headers/modsecurity/anchored_set_variable_translation_proxy.h0000664000175000017500000000712114146026157031723 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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. * */ #ifdef __cplusplus #include #include #include #include #include #endif #include "modsecurity/variable_value.h" #include "modsecurity/anchored_set_variable.h" #ifndef HEADERS_MODSECURITY_ANCHORED_SET_VARIABLE_TRANSLATION_PROXY_H_ #define HEADERS_MODSECURITY_ANCHORED_SET_VARIABLE_TRANSLATION_PROXY_H_ #ifdef __cplusplus namespace modsecurity { class AnchoredSetVariableTranslationProxy { public: AnchoredSetVariableTranslationProxy( const std::string &name, AnchoredSetVariable *fount) : m_name(name), m_fount(fount) { m_translate = [](std::string *name, std::vector *l) { for (int i = 0; i < l->size(); ++i) { VariableValue *newVariableValue = new VariableValue(name, &l->at(i)->getKey()); const VariableValue *oldVariableValue = l->at(i); l->at(i) = newVariableValue; for (auto &oldOrigin : oldVariableValue->getOrigin()) { std::unique_ptr newOrigin(new VariableOrigin); newOrigin->m_length = oldVariableValue->getKey().size(); newOrigin->m_offset = oldOrigin->m_offset - oldVariableValue->getKey().size() - 1; newVariableValue->addOrigin(std::move(newOrigin)); } delete oldVariableValue; } }; } virtual ~AnchoredSetVariableTranslationProxy() { } void resolve(std::vector *l) { m_fount->resolve(l); m_translate(&m_name, l); } void resolve(std::vector *l, variables::KeyExclusions &ke) { m_fount->resolve(l, ke); m_translate(&m_name, l); } void resolve(const std::string &key, std::vector *l) { m_fount->resolve(key, l); m_translate(&m_name, l); }; void resolveRegularExpression(Utils::Regex *r, std::vector *l) { m_fount->resolveRegularExpression(r, l); m_translate(&m_name, l); }; void resolveRegularExpression(Utils::Regex *r, std::vector *l, variables::KeyExclusions &ke) { m_fount->resolveRegularExpression(r, l, ke); m_translate(&m_name, l); }; std::unique_ptr resolveFirst(const std::string &key) { std::vector l; resolve(&l); if (l.empty()) { return nullptr; } std::unique_ptr ret(new std::string("")); ret->assign(l.at(0)->getValue()); while (!l.empty()) { auto &a = l.back(); l.pop_back(); delete a; } return ret; } std::string m_name; private: AnchoredSetVariable *m_fount; std::function *l)> m_translate; }; } // namespace modsecurity #endif #endif // HEADERS_MODSECURITY_ANCHORED_SET_VARIABLE_TRANSLATION_PROXY_H_ modsecurity-v3.0.6/headers/modsecurity/rules_exceptions.h0000664000175000017500000000556614146026157025147 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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. * */ #ifdef __cplusplus #include #include #include #include #include #include #include #include #include #include #include #include #endif #ifndef HEADERS_MODSECURITY_RULES_EXCEPTIONS_H_ #define HEADERS_MODSECURITY_RULES_EXCEPTIONS_H_ #ifdef __cplusplus namespace modsecurity { namespace actions { class Action; } namespace variables { class Variable; } class RulesExceptions { public: RulesExceptions(); ~RulesExceptions(); bool load(const std::string &data, std::string *error); bool addRange(int a, int b); bool addNumber(int a); bool contains(int a); bool merge(RulesExceptions *from); bool loadRemoveRuleByMsg(const std::string &msg, std::string *error); bool loadRemoveRuleByTag(const std::string &msg, std::string *error); bool loadUpdateTargetByMsg(const std::string &msg, std::unique_ptr > > v, std::string *error); bool loadUpdateTargetByTag(const std::string &tag, std::unique_ptr > > v, std::string *error); bool loadUpdateTargetById(double id, std::unique_ptr > > v, std::string *error); bool loadUpdateActionById(double id, std::unique_ptr > > actions, std::string *error); std::unordered_multimap, std::shared_ptr> m_variable_update_target_by_tag; std::unordered_multimap, std::shared_ptr> m_variable_update_target_by_msg; std::unordered_multimap> m_variable_update_target_by_id; std::unordered_multimap> m_action_pre_update_target_by_id; std::unordered_multimap> m_action_pos_update_target_by_id; std::list m_remove_rule_by_msg; std::list m_remove_rule_by_tag; private: std::list > m_ranges; std::list m_numbers; }; } // namespace modsecurity #endif #endif // HEADERS_MODSECURITY_RULES_EXCEPTIONS_H_ modsecurity-v3.0.6/headers/modsecurity/variable_origin.h0000664000175000017500000000231314146026157024673 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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. * */ #ifdef __cplusplus #include #endif #ifndef HEADERS_MODSECURITY_VARIABLE_ORIGIN_H_ #define HEADERS_MODSECURITY_VARIABLE_ORIGIN_H_ #ifndef __cplusplus typedef struct DebugLog_t DebugLog; #endif #ifdef __cplusplus namespace modsecurity { /** @ingroup ModSecurity_CPP_API */ class VariableOrigin { public: VariableOrigin() : m_length(0), m_offset(0) { } std::string toText() { std::string offset = std::to_string(m_offset); std::string len = std::to_string(m_length); return "v" + offset + "," + len; } int m_length; size_t m_offset; }; } // namespace modsecurity #endif #endif // HEADERS_MODSECURITY_VARIABLE_ORIGIN_H_ modsecurity-v3.0.6/headers/modsecurity/rule_unconditional.h0000664000175000017500000000340514146026157025437 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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. * */ #ifdef __cplusplus #include #include #include #include #include #include #endif #ifndef HEADERS_MODSECURITY_RULE_UNCONDITIONAL_H_ #define HEADERS_MODSECURITY_RULE_UNCONDITIONAL_H_ #include "modsecurity/modsecurity.h" #include "modsecurity/variable_value.h" #include "modsecurity/rule.h" #include "modsecurity/rules_set.h" #include "modsecurity/rule_with_actions.h" #include "modsecurity/actions/action.h" #ifdef __cplusplus namespace modsecurity { class RuleUnconditional : public RuleWithActions { public: RuleUnconditional( std::vector *actions, Transformations *transformations, std::unique_ptr fileName, int lineNumber) : RuleWithActions(actions, transformations, std::move(fileName), lineNumber) { } RuleUnconditional(const RuleUnconditional& r) : RuleWithActions(r) { } RuleUnconditional &operator=(const RuleUnconditional& r) { RuleWithActions::operator = (r); return *this; } virtual bool evaluate(Transaction *transaction, std::shared_ptr ruleMessage) override; private: }; } // namespace modsecurity #endif #endif // HEADERS_MODSECURITY_RULE_UNCONDITIONAL_H_ modsecurity-v3.0.6/headers/modsecurity/collection/0000775000175000017500000000000014146026157023522 5ustar mhsvierulamhsvierulamodsecurity-v3.0.6/headers/modsecurity/collection/collection.h0000664000175000017500000001422014146026157026025 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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. * */ #ifdef __cplusplus #include #include #include #include #include #include #include #endif #include "modsecurity/variable_value.h" #ifndef HEADERS_MODSECURITY_COLLECTION_COLLECTION_H_ #define HEADERS_MODSECURITY_COLLECTION_COLLECTION_H_ #ifndef __cplusplus typedef struct Variable_t Variables; #endif #ifdef __cplusplus namespace modsecurity { namespace variables { class KeyExclusions; } namespace collection { class Collection { public: explicit Collection(const std::string &a) : m_name(a) { } virtual ~Collection() { } virtual void store(std::string key, std::string value) = 0; virtual bool storeOrUpdateFirst(const std::string &key, const std::string &value) = 0; virtual bool updateFirst(const std::string &key, const std::string &value) = 0; virtual void del(const std::string& key) = 0; virtual std::unique_ptr resolveFirst( const std::string& var) = 0; virtual void resolveSingleMatch(const std::string& var, std::vector *l) = 0; virtual void resolveMultiMatches(const std::string& var, std::vector *l, variables::KeyExclusions &ke) = 0; virtual void resolveRegularExpression(const std::string& var, std::vector *l, variables::KeyExclusions &ke) = 0; /* store */ virtual void store(std::string key, std::string compartment, std::string value) { std::string nkey = compartment + "::" + key; store(nkey, value); } virtual void store(std::string key, std::string compartment, std::string compartment2, std::string value) { std::string nkey = compartment + "::" + compartment2 + "::" + key; store(nkey, value); } /* storeOrUpdateFirst */ virtual bool storeOrUpdateFirst(const std::string &key, std::string compartment, const std::string &value) { std::string nkey = compartment + "::" + key; return storeOrUpdateFirst(nkey, value); } virtual bool storeOrUpdateFirst(const std::string &key, std::string compartment, std::string compartment2, const std::string &value) { std::string nkey = compartment + "::" + compartment2 + "::" + key; return storeOrUpdateFirst(nkey, value); } /* updateFirst */ virtual bool updateFirst(const std::string &key, std::string compartment, const std::string &value) { std::string nkey = compartment + "::" + key; return updateFirst(nkey, value); } virtual bool updateFirst(const std::string &key, std::string compartment, std::string compartment2, const std::string &value) { std::string nkey = compartment + "::" + compartment2 + "::" + key; return updateFirst(nkey, value); } /* del */ virtual void del(const std::string& key, std::string compartment) { std::string nkey = compartment + "::" + key; del(nkey); } virtual void del(const std::string& key, std::string compartment, std::string compartment2) { std::string nkey = compartment + "::" + compartment2 + "::" + key; del(nkey); } /* resolveFirst */ virtual std::unique_ptr resolveFirst(const std::string& var, std::string compartment) { std::string nkey = compartment + "::" + var; return resolveFirst(nkey); } virtual std::unique_ptr resolveFirst(const std::string& var, std::string compartment, std::string compartment2) { std::string nkey = compartment + "::" + compartment2 + "::" + var; return resolveFirst(nkey); } /* resolveSingleMatch */ virtual void resolveSingleMatch(const std::string& var, std::string compartment, std::vector *l) { std::string nkey = compartment + "::" + var; resolveSingleMatch(nkey, l); } virtual void resolveSingleMatch(const std::string& var, std::string compartment, std::string compartment2, std::vector *l) { std::string nkey = compartment + "::" + compartment2 + "::" + var; resolveSingleMatch(nkey, l); } /* resolveMultiMatches */ virtual void resolveMultiMatches(const std::string& var, std::string compartment, std::vector *l, variables::KeyExclusions &ke) { std::string nkey = compartment + "::" + var; resolveMultiMatches(nkey, l, ke); } virtual void resolveMultiMatches(const std::string& var, std::string compartment, std::string compartment2, std::vector *l, variables::KeyExclusions &ke) { std::string nkey = compartment + "::" + compartment2 + "::" + var; resolveMultiMatches(nkey, l, ke); } /* resolveRegularExpression */ virtual void resolveRegularExpression(const std::string& var, std::string compartment, std::vector *l, variables::KeyExclusions &ke) { std::string nkey = compartment + "::" + var; resolveRegularExpression(nkey, l, ke); } virtual void resolveRegularExpression(const std::string& var, std::string compartment, std::string compartment2, std::vector *l, variables::KeyExclusions &ke) { std::string nkey = compartment + "::" + compartment2 + "::" + var; resolveRegularExpression(nkey, l, ke); } std::string m_name; }; } // namespace collection } // namespace modsecurity #endif #endif // HEADERS_MODSECURITY_COLLECTION_COLLECTION_H_ modsecurity-v3.0.6/headers/modsecurity/collection/collections.h0000664000175000017500000000357514146026157026223 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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. * */ #ifdef __cplusplus #include #include #include #include #include #include #include #include #include #include #include #endif #include "modsecurity/collection/collection.h" #include "modsecurity/variable_value.h" #ifndef HEADERS_MODSECURITY_COLLECTION_COLLECTIONS_H_ #define HEADERS_MODSECURITY_COLLECTION_COLLECTIONS_H_ #ifndef __cplusplus typedef struct Collections_t Collections; #endif #ifdef __cplusplus namespace modsecurity { namespace collection { class Collections { public: Collections(Collection *global, Collection *ip, Collection *session, Collection *user, Collection *resource); ~Collections(); Collections(const Collections &c) = delete; Collections& operator =(const Collections &c) = delete; std::string m_global_collection_key; std::string m_ip_collection_key; std::string m_session_collection_key; std::string m_user_collection_key; std::string m_resource_collection_key; Collection *m_global_collection; Collection *m_ip_collection; Collection *m_session_collection; Collection *m_user_collection; Collection *m_resource_collection; Collection *m_tx_collection; }; } // namespace collection } // namespace modsecurity #endif #endif // HEADERS_MODSECURITY_COLLECTION_COLLECTIONS_H_ modsecurity-v3.0.6/headers/modsecurity/anchored_set_variable.h0000664000175000017500000000550114146026157026044 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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. * */ #ifdef __cplusplus #include #include #include #include #include #include #include #include #include #include #include #include #include #endif #include "modsecurity/variable_value.h" #ifndef HEADERS_MODSECURITY_ANCHORED_SET_VARIABLE_H_ #define HEADERS_MODSECURITY_ANCHORED_SET_VARIABLE_H_ #ifdef __cplusplus namespace modsecurity { class Transaction; namespace Utils { class Regex; } namespace variables { class KeyExclusions; } struct MyEqual { bool operator()(const std::string& Left, const std::string& Right) const { return Left.size() == Right.size() && std::equal(Left.begin(), Left.end(), Right.begin(), [](char a, char b) { return tolower(a) == tolower(b); }); } }; struct MyHash{ size_t operator()(const std::string& Keyval) const { // You might need a better hash function than this size_t h = 0; std::for_each(Keyval.begin(), Keyval.end(), [&](char c) { h += tolower(c); }); return h; } }; class AnchoredSetVariable : public std::unordered_multimap { public: AnchoredSetVariable(Transaction *t, const std::string &name); ~AnchoredSetVariable(); void unset(); void set(const std::string &key, const std::string &value, size_t offset); void set(const std::string &key, const std::string &value, size_t offset, size_t len); void setCopy(std::string key, std::string value, size_t offset); void resolve(std::vector *l); void resolve(std::vector *l, variables::KeyExclusions &ke); void resolve(const std::string &key, std::vector *l); void resolveRegularExpression(Utils::Regex *r, std::vector *l); void resolveRegularExpression(Utils::Regex *r, std::vector *l, variables::KeyExclusions &ke); std::unique_ptr resolveFirst(const std::string &key); Transaction *m_transaction; std::string m_name; }; } // namespace modsecurity #endif #endif // HEADERS_MODSECURITY_ANCHORED_SET_VARIABLE_H_ modsecurity-v3.0.6/headers/modsecurity/debug_log.h0000664000175000017500000000304414146026157023470 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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. * */ #ifdef __cplusplus #include #endif #ifndef HEADERS_MODSECURITY_DEBUG_LOG_H_ #define HEADERS_MODSECURITY_DEBUG_LOG_H_ #ifndef __cplusplus typedef struct DebugLog_t DebugLog; #endif #ifdef __cplusplus namespace modsecurity { namespace debug_log { /** @ingroup ModSecurity_CPP_API */ class DebugLog { public: DebugLog() : m_debugLevel(-1), m_fileName("") { } virtual ~DebugLog(); virtual void write(int level, const std::string &msg); virtual void write(int level, const std::string &id, const std::string &uri, const std::string &msg); virtual bool isLogFileSet(); virtual bool isLogLevelSet(); virtual void setDebugLogLevel(int level); virtual void setDebugLogFile(const std::string &fileName, std::string *error); virtual const std::string& getDebugLogFile(); virtual int getDebugLogLevel(); int m_debugLevel; private: std::string m_fileName; }; } // namespace debug_log } // namespace modsecurity #endif #endif // HEADERS_MODSECURITY_DEBUG_LOG_H_ modsecurity-v3.0.6/headers/modsecurity/rules.h0000664000175000017500000000545514146026157022703 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include #ifdef __cplusplus #include #include #include #include #include #include #endif #include "modsecurity/rule.h" #include "modsecurity/rule_with_operator.h" #include "modsecurity/rule_with_actions.h" #ifndef HEADERS_MODSECURITY_RULES_H_ #define HEADERS_MODSECURITY_RULES_H_ #ifdef __cplusplus namespace modsecurity { class Rules { public: void dump() const { for (int j = 0; j < m_rules.size(); j++) { std::cout << " Rule ID: " << m_rules.at(j)->getReference(); std::cout << "--" << m_rules.at(j) << std::endl; } } int append(Rules *from, const std::vector &ids, std::ostringstream *err) { size_t j = 0; for (; j < from->size(); j++) { RuleWithOperator *rule = dynamic_cast(from->at(j).get()); if (rule && std::binary_search(ids.begin(), ids.end(), rule->m_ruleId)) { if (err != NULL) { *err << "Rule id: " << std::to_string(rule->m_ruleId) \ << " is duplicated" << std::endl; } return -1; } } m_rules.insert(m_rules.end(), from->m_rules.begin(), from->m_rules.end()); return j; } bool insert(const std::shared_ptr &rule) { return insert(rule, nullptr, nullptr); } bool insert(std::shared_ptr rule, const std::vector *ids, std::ostringstream *err) { RuleWithOperator *r = dynamic_cast(rule.get()); if (r && ids != nullptr && std::binary_search(ids->begin(), ids->end(), r->m_ruleId)) { if (err != nullptr) { *err << "Rule id: " << std::to_string(r->m_ruleId) \ << " is duplicated" << std::endl; } return false; } m_rules.push_back(rule); return true; } size_t size() const { return m_rules.size(); } std::shared_ptr operator[](int index) const { return m_rules[index]; } std::shared_ptr at(int index) const { return m_rules[index]; } std::vector > m_rules; }; } // namespace modsecurity #endif #endif // HEADERS_MODSECURITY_RULES_H_ modsecurity-v3.0.6/headers/modsecurity/rule_with_actions.h0000664000175000017500000001345614146026157025273 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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. * */ #ifdef __cplusplus #include #include #include #include #include #include #endif #ifndef HEADERS_MODSECURITY_RULE_WITH_ACTIONS_H_ #define HEADERS_MODSECURITY_RULE_WITH_ACTIONS_H_ #include "modsecurity/transaction.h" #include "modsecurity/modsecurity.h" #include "modsecurity/variable_value.h" #include "modsecurity/rule.h" #ifdef __cplusplus namespace modsecurity { class RuleWithActions : public Rule { public: RuleWithActions( Actions *a, Transformations *t, std::unique_ptr fileName, int lineNumber); ~RuleWithActions(); RuleWithActions(const RuleWithActions& r) : Rule(r), m_rev(r.m_rev), m_ver(r.m_ver), m_accuracy(r.m_accuracy), m_maturity(r.m_maturity), m_ruleId(r.m_ruleId), m_chainedRuleChild(r.m_chainedRuleChild), m_chainedRuleParent(r.m_chainedRuleParent), m_disruptiveAction(r.m_disruptiveAction), m_logData(r.m_logData), m_msg(r.m_msg), m_severity(r.m_severity), m_actionsRuntimePos(r.m_actionsRuntimePos), m_actionsSetVar(r.m_actionsSetVar), m_actionsTag(r.m_actionsTag), m_transformations(r.m_transformations), m_containsCaptureAction(r.m_containsCaptureAction), m_containsMultiMatchAction(r.m_containsMultiMatchAction), m_containsStaticBlockAction(r.m_containsStaticBlockAction), m_isChained(r.m_isChained) { } RuleWithActions &operator=(const RuleWithActions& r) { Rule::operator = (r); m_rev = r.m_rev; m_ver = r.m_ver; m_accuracy = r.m_accuracy; m_maturity = r.m_maturity; m_ruleId = r.m_ruleId; m_chainedRuleChild = r.m_chainedRuleChild; m_chainedRuleParent = r.m_chainedRuleParent; m_disruptiveAction = r.m_disruptiveAction; m_logData = r.m_logData; m_msg = r.m_msg; m_severity = r.m_severity; m_actionsRuntimePos = r.m_actionsRuntimePos; m_actionsSetVar = r.m_actionsSetVar; m_actionsTag = r.m_actionsTag; m_transformations = r.m_transformations; m_containsCaptureAction = r.m_containsCaptureAction; m_containsMultiMatchAction = r.m_containsMultiMatchAction; m_containsStaticBlockAction = r.m_containsStaticBlockAction; m_isChained = r.m_isChained; return *this; } virtual bool evaluate(Transaction *transaction, std::shared_ptr ruleMessage) override; virtual bool evaluate(Transaction *transaction) override; void executeActionsIndependentOfChainedRuleResult( Transaction *trasn, bool *containsDisruptive, std::shared_ptr ruleMessage); void executeActionsAfterFullMatch( Transaction *trasn, bool containsDisruptive, std::shared_ptr ruleMessage); void executeAction(Transaction *trans, bool containsBlock, std::shared_ptr ruleMessage, actions::Action *a, bool context); void executeTransformations( Transaction *trasn, const std::string &value, TransformationResults &ret); inline void executeTransformation( actions::transformations::Transformation *a, std::shared_ptr *value, Transaction *trans, TransformationResults *ret, std::string *path, int *nth) const; void performLogging(Transaction *trans, std::shared_ptr ruleMessage, bool lastLog = true, bool chainedParentNull = false); std::vector getActionsByName(const std::string& name, Transaction *t); bool containsTag(const std::string& name, Transaction *t); bool containsMsg(const std::string& name, Transaction *t); inline bool isChained() const { return m_isChained == true; } inline bool hasCaptureAction() const { return m_containsCaptureAction == true; } inline void setChained(bool b) { m_isChained = b; } inline bool hasDisruptiveAction() const { return m_disruptiveAction != NULL; } inline bool hasBlockAction() const { return m_containsStaticBlockAction == true; } inline bool hasMultimatch() const { return m_containsMultiMatchAction == true; } inline bool hasLogData() const { return m_logData != NULL; } std::string logData(Transaction *t); inline bool hasMsg() const { return m_msg != NULL; } std::string msg(Transaction *t); inline bool hasSeverity() const { return m_severity != NULL; } int severity() const; std::string m_rev; std::string m_ver; int m_accuracy; int m_maturity; int64_t m_ruleId; std::shared_ptr m_chainedRuleChild; RuleWithActions *m_chainedRuleParent; private: /* actions */ actions::Action *m_disruptiveAction; actions::LogData *m_logData; actions::Msg *m_msg; actions::Severity *m_severity; MatchActions m_actionsRuntimePos; SetVars m_actionsSetVar; Tags m_actionsTag; /* actions > transformations */ Transformations m_transformations; bool m_containsCaptureAction:1; bool m_containsMultiMatchAction:1; bool m_containsStaticBlockAction:1; bool m_isChained:1; }; } // namespace modsecurity #endif #endif // HEADERS_MODSECURITY_RULE_WITH_ACTIONS_H_modsecurity-v3.0.6/headers/modsecurity/rule_message.h0000664000175000017500000001475214146026157024224 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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. * */ #ifdef __cplusplus #include #include #include #include #include #endif #ifndef HEADERS_MODSECURITY_RULE_MESSAGE_H_ #define HEADERS_MODSECURITY_RULE_MESSAGE_H_ #include "modsecurity/transaction.h" #include "modsecurity/rule.h" #include "modsecurity/rule_with_operator.h" #ifdef __cplusplus namespace modsecurity { class RuleMessage { public: enum LogMessageInfo { ErrorLogTailLogMessageInfo = 2, ClientLogMessageInfo = 4 }; /** * * FIXME: RuleMessage is currently too big, doing a lot of * unnecessary data duplication. Needs to be shrink down. * */ RuleMessage(RuleWithActions *rule, Transaction *trans) : m_accuracy(rule->m_accuracy), m_clientIpAddress(trans->m_clientIpAddress), m_data(""), m_id(trans->m_id), m_isDisruptive(false), m_match(""), m_maturity(rule->m_maturity), m_message(""), m_noAuditLog(false), m_phase(rule->getPhase() - 1), m_reference(""), m_rev(rule->m_rev), m_rule(rule), m_ruleFile(rule->getFileName()), m_ruleId(rule->m_ruleId), m_ruleLine(rule->getLineNumber()), m_saveMessage(true), m_serverIpAddress(trans->m_serverIpAddress), m_severity(0), m_uriNoQueryStringDecoded(trans->m_uri_no_query_string_decoded), m_ver(rule->m_ver), m_tags() { } explicit RuleMessage(RuleMessage *rule) : m_accuracy(rule->m_accuracy), m_clientIpAddress(rule->m_clientIpAddress), m_data(rule->m_data), m_id(rule->m_id), m_isDisruptive(rule->m_isDisruptive), m_match(rule->m_match), m_maturity(rule->m_maturity), m_message(rule->m_message), m_noAuditLog(rule->m_noAuditLog), m_phase(rule->m_phase), m_reference(rule->m_reference), m_rev(rule->m_rev), m_rule(rule->m_rule), m_ruleFile(rule->m_ruleFile), m_ruleId(rule->m_ruleId), m_ruleLine(rule->m_ruleLine), m_saveMessage(rule->m_saveMessage), m_serverIpAddress(rule->m_serverIpAddress), m_severity(rule->m_severity), m_uriNoQueryStringDecoded(rule->m_uriNoQueryStringDecoded), m_ver(rule->m_ver), m_tags(rule->m_tags) { } RuleMessage(const RuleMessage& ruleMessage) : m_accuracy(ruleMessage.m_accuracy), m_clientIpAddress(ruleMessage.m_clientIpAddress), m_data(ruleMessage.m_data), m_id(ruleMessage.m_id), m_isDisruptive(ruleMessage.m_isDisruptive), m_match(ruleMessage.m_match), m_maturity(ruleMessage.m_maturity), m_message(ruleMessage.m_message), m_noAuditLog(ruleMessage.m_noAuditLog), m_phase(ruleMessage.m_phase), m_reference(ruleMessage.m_reference), m_rev(ruleMessage.m_rev), m_rule(ruleMessage.m_rule), m_ruleFile(ruleMessage.m_ruleFile), m_ruleId(ruleMessage.m_ruleId), m_ruleLine(ruleMessage.m_ruleLine), m_saveMessage(ruleMessage.m_saveMessage), m_serverIpAddress(ruleMessage.m_serverIpAddress), m_severity(ruleMessage.m_severity), m_uriNoQueryStringDecoded(ruleMessage.m_uriNoQueryStringDecoded), m_ver(ruleMessage.m_ver), m_tags(ruleMessage.m_tags) { } RuleMessage &operator=(const RuleMessage& ruleMessage) { m_accuracy = ruleMessage.m_accuracy; m_clientIpAddress = ruleMessage.m_clientIpAddress; m_data = ruleMessage.m_data; m_id = ruleMessage.m_id; m_isDisruptive = ruleMessage.m_isDisruptive; m_match = ruleMessage.m_match; m_maturity = ruleMessage.m_maturity; m_message = ruleMessage.m_message; m_noAuditLog = ruleMessage.m_noAuditLog; m_phase = ruleMessage.m_phase; m_reference = ruleMessage.m_reference; m_rev = ruleMessage.m_rev; m_rule = ruleMessage.m_rule; m_ruleFile = ruleMessage.m_ruleFile; m_ruleId = ruleMessage.m_ruleId; m_ruleLine = ruleMessage.m_ruleLine; m_saveMessage = ruleMessage.m_saveMessage; m_serverIpAddress = ruleMessage.m_serverIpAddress; m_severity = ruleMessage.m_severity; m_uriNoQueryStringDecoded = ruleMessage.m_uriNoQueryStringDecoded; m_ver = ruleMessage.m_ver; m_tags = ruleMessage.m_tags; return *this; } void clean() { m_data = ""; m_match = ""; m_isDisruptive = false; m_reference = ""; m_severity = 0; m_ver = ""; } std::string log() { return log(this, 0); } std::string log(int props) { return log(this, props); } std::string log(int props, int responseCode) { return log(this, props, responseCode); } std::string errorLog() { return log(this, ClientLogMessageInfo | ErrorLogTailLogMessageInfo); } static std::string log(const RuleMessage *rm, int props, int code); static std::string log(const RuleMessage *rm, int props) { return log(rm, props, -1); } static std::string log(const RuleMessage *rm) { return log(rm, 0); } static std::string _details(const RuleMessage *rm); static std::string _errorLogTail(const RuleMessage *rm); int m_accuracy; std::shared_ptr m_clientIpAddress; std::string m_data; std::shared_ptr m_id; bool m_isDisruptive; std::string m_match; int m_maturity; std::string m_message; bool m_noAuditLog; int m_phase; std::string m_reference; std::string m_rev; RuleWithActions *m_rule; std::shared_ptr m_ruleFile; int m_ruleId; int m_ruleLine; bool m_saveMessage; std::shared_ptr m_serverIpAddress; int m_severity; std::shared_ptr m_uriNoQueryStringDecoded; std::string m_ver; std::list m_tags; }; } // namespace modsecurity #endif #endif // HEADERS_MODSECURITY_RULE_MESSAGE_H_ modsecurity-v3.0.6/headers/modsecurity/transaction.h0000664000175000017500000005543414146026157024100 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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. * */ #ifdef __cplusplus #include #include #include #include #include #include #include #include #include #include #include #include #include #endif #include #include #ifndef HEADERS_MODSECURITY_TRANSACTION_H_ #define HEADERS_MODSECURITY_TRANSACTION_H_ #ifndef __cplusplus typedef struct ModSecurity_t ModSecurity; typedef struct Transaction_t Transaction; typedef struct Rules_t RulesSet; #endif #include "modsecurity/anchored_set_variable.h" #include "modsecurity/anchored_variable.h" #include "modsecurity/intervention.h" #include "modsecurity/collection/collections.h" #include "modsecurity/variable_value.h" #include "modsecurity/collection/collection.h" #include "modsecurity/variable_origin.h" #include "modsecurity/anchored_set_variable_translation_proxy.h" #ifndef NO_LOGS #define ms_dbg(b, c) \ do { \ if (m_rules && m_rules->m_debugLog && m_rules->m_debugLog->m_debugLevel >= b) { \ m_rules->debug(b, *m_id.get(), m_uri, c); \ } \ } while (0); #else #define ms_dbg(b, c) \ do { } while (0); #endif #ifndef NO_LOGS #define ms_dbg_a(t, b, c) \ do { \ if (t && t->m_rules && t->m_rules->m_debugLog && t->m_rules->m_debugLog->m_debugLevel >= b) { \ t->debug(b, c); \ } \ } while (0); #else #define ms_dbg_a(t, b, c) \ do { } while (0); #endif #define LOGFY_ADD(a, b) \ yajl_gen_string(g, reinterpret_cast(a), strlen(a)); \ if (b == NULL) { \ yajl_gen_string(g, reinterpret_cast(""), \ strlen("")); \ } else { \ yajl_gen_string(g, reinterpret_cast(b), \ strlen(b)); \ } #define LOGFY_ADD_INT(a, b) \ yajl_gen_string(g, reinterpret_cast(a), strlen(a)); \ yajl_gen_number(g, reinterpret_cast(b), strlen(b)); #define LOGFY_ADD_NUM(a, b) \ yajl_gen_string(g, reinterpret_cast(a), strlen(a)); \ yajl_gen_integer(g, b); #ifdef __cplusplus namespace modsecurity { class ModSecurity; class Transaction; class RulesSet; class RuleMessage; namespace actions { class Action; namespace disruptive { enum AllowType : int; } } namespace RequestBodyProcessor { class XML; class JSON; class MultipartPartTmpFile; } namespace operators { class Operator; } class TransactionAnchoredVariables { public: explicit TransactionAnchoredVariables(Transaction *t) : m_variableRequestHeadersNames(t, "REQUEST_HEADERS_NAMES"), m_variableResponseContentType(t, "RESPONSE_CONTENT_TYPE"), m_variableResponseHeadersNames(t, "RESPONSE_HEADERS_NAMES"), m_variableARGScombinedSize(t, "ARGS_COMBINED_SIZE"), m_variableAuthType(t, "AUTH_TYPE"), m_variableFilesCombinedSize(t, "FILES_COMBINED_SIZE"), m_variableFullRequest(t, "FULL_REQUEST"), m_variableFullRequestLength(t, "FULL_REQUEST_LENGTH"), m_variableInboundDataError(t, "INBOUND_DATA_ERROR"), m_variableMatchedVar(t, "MATCHED_VAR"), m_variableMatchedVarName(t, "MATCHED_VAR_NAME"), m_variableMultipartBoundaryQuoted(t, "MULTIPART_BOUNDARY_QUOTED"), m_variableMultipartBoundaryWhiteSpace(t, "MULTIPART_BOUNDARY_WHITESPACE"), m_variableMultipartCrlfLFLines(t, "MULTIPART_CRLF_LF_LINES"), m_variableMultipartDataAfter(t, "MULTIPART_DATA_AFTER"), m_variableMultipartDataBefore(t, "MULTIPART_DATA_BEFORE"), m_variableMultipartFileLimitExceeded(t, "MULTIPART_FILE_LIMIT_EXCEEDED"), m_variableMultipartHeaderFolding(t, "MULTIPART_HEADER_FOLDING"), m_variableMultipartInvalidHeaderFolding(t, "MULTIPART_INVALID_HEADER_FOLDING"), m_variableMultipartInvalidPart(t, "MULTIPART_INVALID_PART"), m_variableMultipartInvalidQuoting(t, "MULTIPART_INVALID_QUOTING"), m_variableMultipartLFLine(t, "MULTIPART_LF_LINE"), m_variableMultipartMissingSemicolon(t, "MULTIPART_MISSING_SEMICOLON"), m_variableMultipartStrictError(t, "MULTIPART_STRICT_ERROR"), m_variableMultipartUnmatchedBoundary(t, "MULTIPART_UNMATCHED_BOUNDARY"), m_variableOutboundDataError(t, "OUTBOUND_DATA_ERROR"), m_variablePathInfo(t, "PATH_INFO"), m_variableQueryString(t, "QUERY_STRING"), m_variableRemoteAddr(t, "REMOTE_ADDR"), m_variableRemoteHost(t, "REMOTE_HOST"), m_variableRemotePort(t, "REMOTE_PORT"), m_variableReqbodyError(t, "REQBODY_ERROR"), m_variableReqbodyErrorMsg(t, "REQBODY_ERROR_MSG"), m_variableReqbodyProcessorError(t, "REQBODY_PROCESSOR_ERROR"), m_variableReqbodyProcessorErrorMsg(t, "REQBODY_PROCESSOR_ERROR_MSG"), m_variableReqbodyProcessor(t, "REQBODY_PROCESSOR"), m_variableRequestBasename(t, "REQUEST_BASENAME"), m_variableRequestBody(t, "REQUEST_BODY"), m_variableRequestBodyLength(t, "REQUEST_BODY_LENGTH"), m_variableRequestFilename(t, "REQUEST_FILENAME"), m_variableRequestLine(t, "REQUEST_LINE"), m_variableRequestMethod(t, "REQUEST_METHOD"), m_variableRequestProtocol(t, "REQUEST_PROTOCOL"), m_variableRequestURI(t, "REQUEST_URI"), m_variableRequestURIRaw(t, "REQUEST_URI_RAW"), m_variableResource(t, "RESOURCE"), m_variableResponseBody(t, "RESPONSE_BODY"), m_variableResponseContentLength(t, "RESPONSE_CONTENT_LENGTH"), m_variableResponseProtocol(t, "RESPONSE_PROTOCOL"), m_variableResponseStatus(t, "RESPONSE_STATUS"), m_variableServerAddr(t, "SERVER_ADDR"), m_variableServerName(t, "SERVER_NAME"), m_variableServerPort(t, "SERVER_PORT"), m_variableSessionID(t, "SESSIONID"), m_variableUniqueID(t, "UNIQUE_ID"), m_variableUrlEncodedError(t, "URLENCODED_ERROR"), m_variableUserID(t, "USERID"), m_variableArgs(t, "ARGS"), m_variableArgsGet(t, "ARGS_GET"), m_variableArgsPost(t, "ARGS_POST"), m_variableFilesSizes(t, "FILES_SIZES"), m_variableFilesNames(t, "FILES_NAMES"), m_variableFilesTmpContent(t, "FILES_TMP_CONTENT"), m_variableMultipartFileName(t, "MULTIPART_FILENAME"), m_variableMultipartName(t, "MULTIPART_NAME"), m_variableMatchedVarsNames(t, "MATCHED_VARS_NAMES"), m_variableMatchedVars(t, "MATCHED_VARS"), m_variableFiles(t, "FILES"), m_variableRequestCookies(t, "REQUEST_COOKIES"), m_variableRequestHeaders(t, "REQUEST_HEADERS"), m_variableResponseHeaders(t, "RESPONSE_HEADERS"), m_variableGeo(t, "GEO"), m_variableRequestCookiesNames(t, "REQUEST_COOKIES_NAMES"), m_variableFilesTmpNames(t, "FILES_TMPNAMES"), m_variableOffset(0), m_variableArgsNames("ARGS_NAMES", &m_variableArgs), m_variableArgsGetNames("ARGS_GET_NAMES", &m_variableArgsGet), m_variableArgsPostNames("ARGS_POST_NAMES", &m_variableArgsPost) { } AnchoredSetVariable m_variableRequestHeadersNames; AnchoredVariable m_variableResponseContentType; AnchoredSetVariable m_variableResponseHeadersNames; AnchoredVariable m_variableARGScombinedSize; AnchoredVariable m_variableAuthType; AnchoredVariable m_variableFilesCombinedSize; AnchoredVariable m_variableFullRequest; AnchoredVariable m_variableFullRequestLength; AnchoredVariable m_variableInboundDataError; AnchoredVariable m_variableMatchedVar; AnchoredVariable m_variableMatchedVarName; AnchoredVariable m_variableMultipartBoundaryQuoted; AnchoredVariable m_variableMultipartBoundaryWhiteSpace; AnchoredVariable m_variableMultipartCrlfLFLines; AnchoredVariable m_variableMultipartDataAfter; AnchoredVariable m_variableMultipartDataBefore; AnchoredVariable m_variableMultipartFileLimitExceeded; AnchoredVariable m_variableMultipartHeaderFolding; AnchoredVariable m_variableMultipartInvalidHeaderFolding; AnchoredVariable m_variableMultipartInvalidPart; AnchoredVariable m_variableMultipartInvalidQuoting; AnchoredVariable m_variableMultipartLFLine; AnchoredVariable m_variableMultipartMissingSemicolon; AnchoredVariable m_variableMultipartStrictError; AnchoredVariable m_variableMultipartUnmatchedBoundary; AnchoredVariable m_variableOutboundDataError; AnchoredVariable m_variablePathInfo; AnchoredVariable m_variableQueryString; AnchoredVariable m_variableRemoteAddr; AnchoredVariable m_variableRemoteHost; AnchoredVariable m_variableRemotePort; AnchoredVariable m_variableReqbodyError; AnchoredVariable m_variableReqbodyErrorMsg; AnchoredVariable m_variableReqbodyProcessorError; AnchoredVariable m_variableReqbodyProcessorErrorMsg; AnchoredVariable m_variableReqbodyProcessor; AnchoredVariable m_variableRequestBasename; AnchoredVariable m_variableRequestBody; AnchoredVariable m_variableRequestBodyLength; AnchoredVariable m_variableRequestFilename; AnchoredVariable m_variableRequestLine; AnchoredVariable m_variableRequestMethod; AnchoredVariable m_variableRequestProtocol; AnchoredVariable m_variableRequestURI; AnchoredVariable m_variableRequestURIRaw; AnchoredVariable m_variableResource; AnchoredVariable m_variableResponseBody; AnchoredVariable m_variableResponseContentLength; AnchoredVariable m_variableResponseProtocol; AnchoredVariable m_variableResponseStatus; AnchoredVariable m_variableServerAddr; AnchoredVariable m_variableServerName; AnchoredVariable m_variableServerPort; AnchoredVariable m_variableSessionID; AnchoredVariable m_variableUniqueID; AnchoredVariable m_variableUrlEncodedError; AnchoredVariable m_variableUserID; AnchoredSetVariable m_variableArgs; AnchoredSetVariable m_variableArgsGet; AnchoredSetVariable m_variableArgsPost; AnchoredSetVariable m_variableFilesSizes; AnchoredSetVariable m_variableFilesNames; AnchoredSetVariable m_variableFilesTmpContent; AnchoredSetVariable m_variableMultipartFileName; AnchoredSetVariable m_variableMultipartName; AnchoredSetVariable m_variableMatchedVarsNames; AnchoredSetVariable m_variableMatchedVars; AnchoredSetVariable m_variableFiles; AnchoredSetVariable m_variableRequestCookies; AnchoredSetVariable m_variableRequestHeaders; AnchoredSetVariable m_variableResponseHeaders; AnchoredSetVariable m_variableGeo; AnchoredSetVariable m_variableRequestCookiesNames; AnchoredSetVariable m_variableFilesTmpNames; int m_variableOffset; AnchoredSetVariableTranslationProxy m_variableArgsNames; AnchoredSetVariableTranslationProxy m_variableArgsGetNames; AnchoredSetVariableTranslationProxy m_variableArgsPostNames; }; class TransactionSecMarkerManagement { public: bool isInsideAMarker() const { if (m_marker) { return true; } return false; } std::shared_ptr getCurrentMarker() const { if (m_marker) { return m_marker; } else { throw; } } void removeMarker() { m_marker.reset(); } void addMarker(const std::shared_ptr &name) { m_marker = name; } private: std::shared_ptr m_marker; }; /** @ingroup ModSecurity_CPP_API */ class Transaction : public TransactionAnchoredVariables, public TransactionSecMarkerManagement { public: Transaction(ModSecurity *transaction, RulesSet *rules, void *logCbData); Transaction(ModSecurity *transaction, RulesSet *rules, char *id, void *logCbData); ~Transaction(); Transaction ( const Transaction & ) = delete; bool operator ==(const Transaction &b) const { return false; }; Transaction &operator =(const Transaction &b) const = delete; /** TODO: Should be an structure that fits an IP address */ int processConnection(const char *client, int cPort, const char *server, int sPort); int processURI(const char *uri, const char *protocol, const char *http_version); /** * Types of request body that ModSecurity may give a special treatment * for the data. */ enum RequestBodyType { /** * */ UnknownFormat, /** * */ MultiPartRequestBody, /** * */ WWWFormUrlEncoded, /** * */ JSONRequestBody, /** * */ XMLRequestBody }; int processRequestHeaders(); int addRequestHeader(const std::string& key, const std::string& value); int addRequestHeader(const unsigned char *key, const unsigned char *value); int addRequestHeader(const unsigned char *key, size_t len_key, const unsigned char *value, size_t len_value); int processRequestBody(); int appendRequestBody(const unsigned char *body, size_t size); int requestBodyFromFile(const char *path); int processResponseHeaders(int code, const std::string& proto); int addResponseHeader(const std::string& key, const std::string& value); int addResponseHeader(const unsigned char *key, const unsigned char *value); int addResponseHeader(const unsigned char *key, size_t len_key, const unsigned char *value, size_t len_value); int processResponseBody(); int appendResponseBody(const unsigned char *body, size_t size); int processLogging(); int updateStatusCode(int status); bool intervention(ModSecurityIntervention *it); bool addArgument(const std::string& orig, const std::string& key, const std::string& value, size_t offset); bool extractArguments(const std::string &orig, const std::string& buf, size_t offset); const char *getResponseBody() const; size_t getResponseBodyLength(); size_t getRequestBodyLength(); #ifndef NO_LOGS void debug(int, std::string) const; #endif void serverLog(std::shared_ptr rm); int getRuleEngineState() const; std::string toJSON(int parts); std::string toOldAuditLogFormat(int parts, const std::string &trailer); std::string toOldAuditLogFormatIndex(const std::string &filename, double size, const std::string &md5); /** * Filled during the class instantiation, this variable can be later * used to fill the SecRule variable `duration'. The variable `duration' * is dynamic calculated, it is always relative to the value found in * m_creationTimeStamp. * * @note There is space for performance improvement. This value don't * need to be filled if there is no rule using the variable * `duration'. */ clock_t m_creationTimeStamp; /** * Holds the client IP address. */ std::shared_ptr m_clientIpAddress; /** * Holds the HTTP version: 1.2, 2.0, 3.0 and so on.... */ std::string m_httpVersion; /** * Holds the server IP Address */ std::shared_ptr m_serverIpAddress; /** * Holds the raw URI that was requested. */ std::string m_uri; /** * Holds the URI that was requests (without the query string). */ std::shared_ptr m_uri_no_query_string_decoded; /** * Holds the combined size of all arguments, later used to fill the * variable ARGS_COMBINED_SIZE. */ double m_ARGScombinedSizeDouble; /** * Client tcp port. */ int m_clientPort; /** * This variable is set by the action `severity' and later can be * consulted via the SecLanguage variable HIGHEST_SEVERITY. */ int m_highestSeverityAction; /** * Holds the HTTP return code when it is known. If 0 nothing was * set. */ int m_httpCodeReturned; /** * Holds the server port. */ int m_serverPort; /** * ModSecurity instance used to start this transaction. Basically used * to fill the server log whenever is needed. */ ModSecurity *m_ms; /** * Holds the type of the request body, in case there is one. */ RequestBodyType m_requestBodyType; /** * Holds the request body "processor" */ RequestBodyType m_requestBodyProcessor; /** * Rules object utilized during this specific transaction. */ RulesSet *m_rules; /** * */ std::list m_ruleRemoveById; std::list > m_ruleRemoveByIdRange; /** * */ std::list m_ruleRemoveByTag; /** * */ std::list< std::pair > m_ruleRemoveTargetByTag; /** * */ std::list< std::pair > m_ruleRemoveTargetById; /** * */ int m_requestBodyAccess; /** * The list m_auditLogModifier contains modifications to the `auditlogs' * for this specific request, those modifications can happens via the * utilization of the action: `ctl:auditLogParts=' * */ std::list< std::pair > m_auditLogModifier; /** * This variable holds all the messages asked to be save by the utilization * of the actions: `log_data' and `msg'. These should be included on the * auditlogs. */ std::list m_rulesMessages; /** * Holds the request body, in case of any. */ std::ostringstream m_requestBody; /** * Holds the response body, in case of any. */ std::ostringstream m_responseBody; /** * Contains the unique ID of the transaction. Use by the variable * `UNIQUE_ID'. This unique id is also saved as part of the AuditLog. */ std::shared_ptr m_id; /** * Holds the amount of rules that should be skipped. If bigger than 0 the * current rule should be skipped and the number needs to be decreased. */ int m_skip_next; /** * If allow action was utilized, this variable holds the allow type. */ modsecurity::actions::disruptive::AllowType m_allowType; /** * Holds the decode URI. Notice that m_uri holds the raw version * of the URI. */ std::string m_uri_decoded; /** * Actions (disruptive?) that should be taken by the connector related to * that transaction. */ std::vector m_actions; ModSecurityIntervention m_it; /** * Holds the creation time stamp, using std::time. * * TODO: m_timeStamp and m_creationTimeStamp may be merged into a single * variable. */ time_t m_timeStamp; /** * Holds all the collections related to that transaction. */ collection::Collections m_collections; /** * Holds the whatever matched in the operation utilization. * That variable will be further used by the capture action. * */ std::list m_matched; RequestBodyProcessor::XML *m_xml; RequestBodyProcessor::JSON *m_json; int m_secRuleEngine; std::string m_variableDuration; std::map m_variableEnvs; std::string m_variableHighestSeverityAction; std::string m_variableRemoteUser; std::string m_variableTime; std::string m_variableTimeDay; std::string m_variableTimeEpoch; std::string m_variableTimeHour; std::string m_variableTimeMin; std::string m_variableTimeSec; std::string m_variableTimeWDay; std::string m_variableTimeYear; std::vector> m_multipartPartTmpFiles; private: /** * Pointer to the callback function that will be called to fill * the web server (connector) log. */ void *m_logCbData; }; #endif #ifdef __cplusplus extern "C" { #endif /** @ingroup ModSecurity_C_API */ Transaction *msc_new_transaction(ModSecurity *ms, RulesSet *rules, void *logCbData); /** @ingroup ModSecurity_C_API */ Transaction *msc_new_transaction_with_id(ModSecurity *ms, RulesSet *rules, char *id, void *logCbData); /** @ingroup ModSecurity_C_API */ int msc_process_connection(Transaction *transaction, const char *client, int cPort, const char *server, int sPort); /** @ingroup ModSecurity_C_API */ int msc_process_request_headers(Transaction *transaction); /** @ingroup ModSecurity_C_API */ int msc_add_request_header(Transaction *transaction, const unsigned char *key, const unsigned char *value); /** @ingroup ModSecurity_C_API */ int msc_add_n_request_header(Transaction *transaction, const unsigned char *key, size_t len_key, const unsigned char *value, size_t len_value); /** @ingroup ModSecurity_C_API */ int msc_process_request_body(Transaction *transaction); /** @ingroup ModSecurity_C_API */ int msc_append_request_body(Transaction *transaction, const unsigned char *body, size_t size); /** @ingroup ModSecurity_C_API */ int msc_request_body_from_file(Transaction *transaction, const char *path); /** @ingroup ModSecurity_C_API */ int msc_process_response_headers(Transaction *transaction, int code, const char* protocol); /** @ingroup ModSecurity_C_API */ int msc_add_response_header(Transaction *transaction, const unsigned char *key, const unsigned char *value); /** @ingroup ModSecurity_C_API */ int msc_add_n_response_header(Transaction *transaction, const unsigned char *key, size_t len_key, const unsigned char *value, size_t len_value); /** @ingroup ModSecurity_C_API */ int msc_process_response_body(Transaction *transaction); /** @ingroup ModSecurity_C_API */ int msc_append_response_body(Transaction *transaction, const unsigned char *body, size_t size); /** @ingroup ModSecurity_C_API */ int msc_process_uri(Transaction *transaction, const char *uri, const char *protocol, const char *http_version); /** @ingroup ModSecurity_C_API */ const char *msc_get_response_body(Transaction *transaction); /** @ingroup ModSecurity_C_API */ size_t msc_get_response_body_length(Transaction *transaction); /** @ingroup ModSecurity_C_API */ size_t msc_get_request_body_length(Transaction *transaction); /** @ingroup ModSecurity_C_API */ void msc_transaction_cleanup(Transaction *transaction); /** @ingroup ModSecurity_C_API */ int msc_intervention(Transaction *transaction, ModSecurityIntervention *it); /** @ingroup ModSecurity_C_API */ int msc_process_logging(Transaction *transaction); /** @ingroup ModSecurity_C_API */ int msc_update_status_code(Transaction *transaction, int status); #ifdef __cplusplus } } // namespace modsecurity #endif #endif // HEADERS_MODSECURITY_TRANSACTION_H_ modsecurity-v3.0.6/headers/modsecurity/actions/0000775000175000017500000000000014146026157023027 5ustar mhsvierulamhsvierulamodsecurity-v3.0.6/headers/modsecurity/actions/action.h0000664000175000017500000000774214146026157024467 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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. * */ #ifdef __cplusplus #include #include #include #endif #include "modsecurity/intervention.h" #include "modsecurity/rule.h" #include "modsecurity/rule_with_actions.h" #ifndef HEADERS_MODSECURITY_ACTIONS_ACTION_H_ #define HEADERS_MODSECURITY_ACTIONS_ACTION_H_ #ifdef __cplusplus namespace modsecurity { class Transaction; class RuleWithOperator; namespace actions { class Action { public: explicit Action(const std::string& _action) : m_isNone(false), temporaryAction(false), action_kind(2), m_name(nullptr), m_parser_payload("") { set_name_and_payload(_action); } explicit Action(const std::string& _action, int kind) : m_isNone(false), temporaryAction(false), action_kind(kind), m_name(nullptr), m_parser_payload("") { set_name_and_payload(_action); } Action(const Action &a) : m_isNone(a.m_isNone), temporaryAction(a.temporaryAction), action_kind(a.action_kind), m_name(a.m_name), m_parser_payload(a.m_parser_payload) { } Action &operator=(const Action& a) { m_isNone = a.m_isNone; temporaryAction = a.temporaryAction; action_kind = a.action_kind; m_name = a.m_name; m_parser_payload = a.m_parser_payload; return *this; } virtual ~Action() { } virtual std::string evaluate(const std::string &exp, Transaction *transaction); virtual bool evaluate(RuleWithActions *rule, Transaction *transaction); virtual bool evaluate(RuleWithActions *rule, Transaction *transaction, std::shared_ptr ruleMessage) { return evaluate(rule, transaction); } virtual bool init(std::string *error) { return true; } virtual bool isDisruptive() { return false; } void set_name_and_payload(const std::string& data) { size_t pos = data.find(":"); std::string t = "t:"; if (data.compare(0, t.length(), t) == 0) { pos = data.find(":", 2); } if (pos == std::string::npos) { m_name = std::shared_ptr(new std::string(data)); return; } m_name = std::shared_ptr(new std::string(data, 0, pos)); m_parser_payload = std::string(data, pos + 1, data.length()); if (m_parser_payload.at(0) == '\'' && m_parser_payload.size() > 2) { m_parser_payload.erase(0, 1); m_parser_payload.pop_back(); } } bool m_isNone; bool temporaryAction; int action_kind; std::shared_ptr m_name; std::string m_parser_payload; /** * * Define the action kind regarding to the execution time. * * */ enum Kind { /** * * Action that are executed while loading the configuration. For instance * the rule ID or the rule phase. * */ ConfigurationKind, /** * * Those are actions that demands to be executed before call the operator. * For instance the tranformations. * * */ RunTimeBeforeMatchAttemptKind, /** * * Actions that are executed after the execution of the operator, only if * the operator returned Match (or True). For instance the disruptive * actions. * */ RunTimeOnlyIfMatchKind, }; }; } // namespace actions } // namespace modsecurity #endif #endif // HEADERS_MODSECURITY_ACTIONS_ACTION_H_ modsecurity-v3.0.6/headers/modsecurity/variable_value.h0000664000175000017500000000544014146026157024524 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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. * */ #ifdef __cplusplus #include #include #include #include #include #endif #include "modsecurity/variable_origin.h" #ifndef HEADERS_MODSECURITY_VARIABLE_VALUE_H_ #define HEADERS_MODSECURITY_VARIABLE_VALUE_H_ #ifndef __cplusplus typedef struct Variable_t VariableValue; #endif #ifdef __cplusplus namespace modsecurity { class Collection; class VariableValue { public: using Origins = std::list>; explicit VariableValue(const std::string *key, const std::string *value = nullptr) : m_collection(""), m_key(*key), m_keyWithCollection(*key), m_value(value != nullptr?*value:"") { } VariableValue(const std::string *collection, const std::string *key, const std::string *value) : m_collection(*collection), m_key(*key), m_keyWithCollection(*collection + ":" + *key), m_value(*value) { } explicit VariableValue(const VariableValue *o) : m_collection(o->m_collection), m_key(o->m_key), m_keyWithCollection(o->m_keyWithCollection), m_value(o->m_value) { for (auto &i : o->m_orign) { std::unique_ptr origin(new VariableOrigin()); origin->m_offset = i->m_offset; origin->m_length = i->m_length; m_orign.push_back(std::move(origin)); } } VariableValue(const VariableValue &v) = delete; const std::string& getKey() const { return m_key; } const std::string& getKeyWithCollection() const { return m_keyWithCollection; } const std::string& getCollection() const { return m_collection; } const std::string& getValue() const { return m_value; } void setValue(const std::string &value) { m_value = value; } void addOrigin(std::unique_ptr origin) { m_orign.push_back(std::move(origin)); } const Origins& getOrigin() const { return m_orign; } private: Origins m_orign; std::string m_collection; std::string m_key; std::string m_keyWithCollection; std::string m_value; }; } // namespace modsecurity #endif #endif // HEADERS_MODSECURITY_VARIABLE_VALUE_H_ modsecurity-v3.0.6/headers/modsecurity/rules_set_properties.h0000664000175000017500000003412214146026157026023 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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. * */ #ifdef __cplusplus #include #include #include #include #include #include #include #endif #ifndef HEADERS_MODSECURITY_RULES_SET_PROPERTIES_H_ #define HEADERS_MODSECURITY_RULES_SET_PROPERTIES_H_ #include "modsecurity/modsecurity.h" #include "modsecurity/rule.h" #include "modsecurity/rules_exceptions.h" #include "modsecurity/actions/action.h" #include "modsecurity/audit_log.h" #define CODEPAGE_SEPARATORS " \t\n\r" #define merge_boolean_value(to, from, default) \ if (to == PropertyNotSetConfigBoolean) { \ to = (from == PropertyNotSetConfigBoolean) ? default : from; \ } #define merge_ruleengine_value(to, from, default) \ if (to == PropertyNotSetRuleEngine) { \ to = (from == PropertyNotSetRuleEngine) ? default : from; \ } #define merge_bodylimitaction_value(to, from, default) \ if (to == PropertyNotSetBodyLimitAction) { \ to = (from == PropertyNotSetBodyLimitAction) ? default : from; \ } #ifdef __cplusplus namespace modsecurity { class RulesExceptions; namespace Parser { class Driver; } using modsecurity::debug_log::DebugLog; using modsecurity::audit_log::AuditLog; /** @ingroup ModSecurity_CPP_API */ class ConfigInt { public: ConfigInt() : m_set(false), m_value(0) { } bool m_set; int m_value; void merge(ConfigInt *from) { if (m_set == true || from->m_set == false) { return; } m_set = true; m_value = from->m_value; return; } }; class ConfigDouble { public: ConfigDouble() : m_set(false), m_value(0) { } bool m_set; double m_value; void merge(ConfigDouble *from) { if (m_set == true || from->m_set == false) { return; } m_set = true; m_value = from->m_value; return; } }; class ConfigString { public: ConfigString() : m_set(false), m_value("") { } bool m_set; std::string m_value; void merge(ConfigString *from) { if (m_set == true || from->m_set == false) { return; } m_set = true; m_value = from->m_value; return; } }; class ConfigSet { public: ConfigSet() : m_set(false), m_clear(false) { } bool m_set; bool m_clear; std::set m_value; }; class UnicodeMapHolder { public: UnicodeMapHolder() { memset(m_data, -1, (sizeof(int)*65536)); }; int& operator[](int index) { return m_data[index]; } int operator[](int index) const { return m_data[index]; } int at(int index) const { return m_data[index]; } void change(int i, int a) { m_data[i] = a; } int m_data[65536]; }; class RulesSetProperties; class ConfigUnicodeMap { public: ConfigUnicodeMap() : m_set(false), m_unicodeCodePage(0), m_unicodeMapTable(NULL) { } static void loadConfig(std::string f, double codePage, RulesSetProperties *driver, std::string *errg); void merge(ConfigUnicodeMap *from) { if (from->m_set == false) { return; } m_set = true; m_unicodeCodePage = from->m_unicodeCodePage; m_unicodeMapTable = from->m_unicodeMapTable; return; } bool m_set; double m_unicodeCodePage; std::shared_ptr m_unicodeMapTable; }; class RulesSetProperties { public: RulesSetProperties() : m_auditLog(new AuditLog()), m_requestBodyLimitAction(PropertyNotSetBodyLimitAction), m_responseBodyLimitAction(PropertyNotSetBodyLimitAction), m_secRequestBodyAccess(PropertyNotSetConfigBoolean), m_secResponseBodyAccess(PropertyNotSetConfigBoolean), m_secXMLExternalEntity(PropertyNotSetConfigBoolean), m_tmpSaveUploadedFiles(PropertyNotSetConfigBoolean), m_uploadKeepFiles(PropertyNotSetConfigBoolean), m_debugLog(new DebugLog()), m_remoteRulesActionOnFailed(PropertyNotSetRemoteRulesAction), m_secRuleEngine(PropertyNotSetRuleEngine) { } explicit RulesSetProperties(DebugLog *debugLog) : m_auditLog(new AuditLog()), m_requestBodyLimitAction(PropertyNotSetBodyLimitAction), m_responseBodyLimitAction(PropertyNotSetBodyLimitAction), m_secRequestBodyAccess(PropertyNotSetConfigBoolean), m_secResponseBodyAccess(PropertyNotSetConfigBoolean), m_secXMLExternalEntity(PropertyNotSetConfigBoolean), m_tmpSaveUploadedFiles(PropertyNotSetConfigBoolean), m_uploadKeepFiles(PropertyNotSetConfigBoolean), m_debugLog(debugLog), m_remoteRulesActionOnFailed(PropertyNotSetRemoteRulesAction), m_secRuleEngine(PropertyNotSetRuleEngine) { } RulesSetProperties(const RulesSetProperties &r) = delete; RulesSetProperties &operator =(const RulesSetProperties &r) = delete; ~RulesSetProperties() { int i = 0; for (i = 0; i < modsecurity::Phases::NUMBER_OF_PHASES; i++) { std::vector > *tmp = \ &m_defaultActions[i]; while (tmp->empty() == false) { tmp->pop_back(); } } delete m_debugLog; delete m_auditLog; } /** * * */ enum ConfigBoolean { TrueConfigBoolean, FalseConfigBoolean, PropertyNotSetConfigBoolean }; /** * * The RuleEngine enumerator consists in mapping the different states * of the rule engine. * */ enum RuleEngine { /** * * Rules won't be evaluated if Rule Engine is set to DisabledRuleEngine * */ DisabledRuleEngine, /** * * Rules will be evaluated and disturb actions will take place if needed. * */ EnabledRuleEngine, /** * Rules will be evaluated but it won't generate any disruptive action. * */ DetectionOnlyRuleEngine, /** * */ PropertyNotSetRuleEngine }; /** * * Defines what actions should be taken in case the body (response or * request) is bigger than the expected size. * */ enum BodyLimitAction { /** * * Process partial * */ ProcessPartialBodyLimitAction, /** * * Reject the request * */ RejectBodyLimitAction, /** * */ PropertyNotSetBodyLimitAction }; /** * * Defines what actions should be taken in case the remote rules failed to * be downloaded (independent of the circumstances) * * */ enum OnFailedRemoteRulesAction { /** * * Abort * */ AbortOnFailedRemoteRulesAction, /** * * Warn on logging * */ WarnOnFailedRemoteRulesAction, /** * */ PropertyNotSetRemoteRulesAction }; static const char *ruleEngineStateString(RuleEngine i) { switch (i) { case DisabledRuleEngine: return "Disabled"; case EnabledRuleEngine: return "Enabled"; case DetectionOnlyRuleEngine: return "DetectionOnly"; case PropertyNotSetRuleEngine: return "PropertyNotSet/DetectionOnly"; } return NULL; } static std::string configBooleanString(ConfigBoolean i) { switch (i) { case TrueConfigBoolean: return "True"; case FalseConfigBoolean: return "False"; case PropertyNotSetConfigBoolean: return "Not set"; } return NULL; } static int mergeProperties(RulesSetProperties *from, RulesSetProperties *to, std::ostringstream *err) { merge_ruleengine_value(to->m_secRuleEngine, from->m_secRuleEngine, PropertyNotSetRuleEngine); merge_boolean_value(to->m_secRequestBodyAccess, from->m_secRequestBodyAccess, PropertyNotSetConfigBoolean); merge_boolean_value(to->m_secResponseBodyAccess, from->m_secResponseBodyAccess, PropertyNotSetConfigBoolean); merge_boolean_value(to->m_secXMLExternalEntity, from->m_secXMLExternalEntity, PropertyNotSetConfigBoolean); merge_boolean_value(to->m_uploadKeepFiles, from->m_uploadKeepFiles, PropertyNotSetConfigBoolean); merge_boolean_value(to->m_tmpSaveUploadedFiles, from->m_tmpSaveUploadedFiles, PropertyNotSetConfigBoolean); to->m_argumentsLimit.merge(&from->m_argumentsLimit); to->m_requestBodyJsonDepthLimit.merge(&from->m_requestBodyJsonDepthLimit); to->m_requestBodyLimit.merge(&from->m_requestBodyLimit); to->m_responseBodyLimit.merge(&from->m_responseBodyLimit); merge_bodylimitaction_value(to->m_requestBodyLimitAction, from->m_requestBodyLimitAction, PropertyNotSetBodyLimitAction); merge_bodylimitaction_value(to->m_responseBodyLimitAction, from->m_responseBodyLimitAction, PropertyNotSetBodyLimitAction); to->m_uploadFileLimit.merge(&from->m_uploadFileLimit); to->m_uploadFileMode.merge(&from->m_uploadFileMode); to->m_uploadDirectory.merge(&from->m_uploadDirectory); to->m_uploadTmpDirectory.merge(&from->m_uploadTmpDirectory); to->m_secArgumentSeparator.merge(&from->m_secArgumentSeparator); to->m_secWebAppId.merge(&from->m_secWebAppId); to->m_unicodeMapTable.merge(&from->m_unicodeMapTable); to->m_httpblKey.merge(&from->m_httpblKey); to->m_exceptions.merge(&from->m_exceptions); to->m_components.insert(to->m_components.end(), from->m_components.begin(), from->m_components.end()); if (from->m_responseBodyTypeToBeInspected.m_set == true) { if (from->m_responseBodyTypeToBeInspected.m_clear == true) { to->m_responseBodyTypeToBeInspected.m_value.clear(); from->m_responseBodyTypeToBeInspected.m_value.clear(); } else { for (std::set::iterator it = from->m_responseBodyTypeToBeInspected.m_value.begin(); it != from->m_responseBodyTypeToBeInspected.m_value.end(); ++it) { to->m_responseBodyTypeToBeInspected.m_value.insert(*it); } } to->m_responseBodyTypeToBeInspected.m_set = true; } for (int i = 0; i < modsecurity::Phases::NUMBER_OF_PHASES; i++) { std::vector > *actions_from = \ &from->m_defaultActions[i]; std::vector > *actions_to = \ &to->m_defaultActions[i]; for (size_t j = 0; j < actions_from->size(); j++) { actions_to->push_back(actions_from->at(j)); } } if (to->m_auditLog) { std::string error; to->m_auditLog->merge(from->m_auditLog, &error); if (error.size() > 0) { *err << error; return -1; } } if (from->m_debugLog && to->m_debugLog && from->m_debugLog->isLogFileSet()) { if (to->m_debugLog->isLogFileSet() == false) { std::string error; to->m_debugLog->setDebugLogFile( from->m_debugLog->getDebugLogFile(), &error); if (error.size() > 0) { *err << error; return -1; } } } if (from->m_debugLog && to->m_debugLog && from->m_debugLog->isLogLevelSet()) { if (to->m_debugLog->isLogLevelSet() == false) { to->m_debugLog->setDebugLogLevel( from->m_debugLog->getDebugLogLevel()); } } return 1; } audit_log::AuditLog *m_auditLog; BodyLimitAction m_requestBodyLimitAction; BodyLimitAction m_responseBodyLimitAction; ConfigBoolean m_secRequestBodyAccess; ConfigBoolean m_secResponseBodyAccess; ConfigBoolean m_secXMLExternalEntity; ConfigBoolean m_tmpSaveUploadedFiles; ConfigBoolean m_uploadKeepFiles; ConfigDouble m_argumentsLimit; ConfigDouble m_requestBodyJsonDepthLimit; ConfigDouble m_requestBodyLimit; ConfigDouble m_requestBodyNoFilesLimit; ConfigDouble m_responseBodyLimit; ConfigInt m_uploadFileLimit; ConfigInt m_uploadFileMode; DebugLog *m_debugLog; OnFailedRemoteRulesAction m_remoteRulesActionOnFailed; RuleEngine m_secRuleEngine; RulesExceptions m_exceptions; std::list m_components; std::ostringstream m_parserError; ConfigSet m_responseBodyTypeToBeInspected; ConfigString m_httpblKey; ConfigString m_uploadDirectory; ConfigString m_uploadTmpDirectory; ConfigString m_secArgumentSeparator; ConfigString m_secWebAppId; std::vector > \ m_defaultActions[modsecurity::Phases::NUMBER_OF_PHASES]; ConfigUnicodeMap m_unicodeMapTable; }; #endif #ifdef __cplusplus } // namespace modsecurity #endif #endif // HEADERS_MODSECURITY_RULES_SET_PROPERTIES_H_ modsecurity-v3.0.6/headers/modsecurity/modsecurity.h0000664000175000017500000002056314146026157024115 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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. * */ /** @file modsecurity.h Main ModSecurity header file */ /** @mainpage ModSecurity - open source, cross platform web application firewall * * Example Usage: * @code * * using ModSecurity::ModSecurity; * using ModSecurity::Rules; * using ModSecurity::Transaction; * * ModSecurity *modsec; * ModSecurity::Rules *rules; * * modsec = new ModSecurity(); * rules = new Rules(); * rules->loadFromUri(rules_file); * * Transaction *modsecTransaction = new Transaction(modsec, rules); * modsecTransaction->processConnection("127.0.0.1"); * * if (modsecTransaction->intervention()) { * std::cout << "There is an intervention" << std::endl; * } * * ... * * @endcode * */ /** * @defgroup ModSecurity_C_API ModSecurity C API * * This is the ModSecurity C API description * * At this page you can get information on how the extend your C * application, by embedding ModSecurity. * */ /** * @defgroup ModSecurity_CPP_API ModSecurity CPP API * * This is the ModSecurity CPP API description. * * At this page you can get information on how the extend your CPP * application, by embedding ModSecurity. * */ /** * @defgroup ModSecurity_Operator ModSecurity Operators * * SecLanguage operator */ #ifdef __cplusplus #include #include #include #include #endif #ifndef HEADERS_MODSECURITY_MODSECURITY_H_ #define HEADERS_MODSECURITY_MODSECURITY_H_ #ifndef __cplusplus typedef struct ModSecurity_t modsecurity; #else namespace modsecurity { /** * * The Phases enumerator consists in mapping the different stages of a * given request. ModSecurity is expected to inspect data based on those * "phases". If your module/application use this in a different order, it * will lead ModSecurity to act in an unexpected behavior. * * It is mandatory to call all the phases, even if you don't have this * phases segmented in your end. * */ enum Phases { /** * * The connection is the very first information that ModSecurity can * inspect. It is expected to happens before the virtual host name be * resolved. This phase is expected to happen immediately after a * connection is established. * */ ConnectionPhase, /** * * The "URI" phase happens just after the web server (or any other * application that you may use with ModSecurity) have the acknowledgement * of the full request URI. * */ UriPhase, /** * * The "RequestHeaders" phase happens when the server has all the * information about the headers. Notice however, that it is expected to * happen prior to the reception of the request body (if any). * */ RequestHeadersPhase, /** * * At the "RequestHeaders" phase, ModSecurity is expected to inspect the * content of a request body, that does not happens when the server has all * the content but prior to that, when the body transmission started. * ModSecurity can ask the webserver to block (or make any other disruptive * action) while the client is still transmitting the data. * */ RequestBodyPhase, /** * * The "ResponseHeaders" happens just before all the response headers are * ready to be delivery to the client. * */ ResponseHeadersPhase, /** * * Same as "RequestBody" the "ResponseBody" phase perform a stream * inspection which may result in a disruptive action. * */ ResponseBodyPhase, /** * * The last phase is the logging phase. At this phase ModSecurity will * generate the internal logs, there is no need to hold the request at * this point as this phase does not produce any kind of action. * */ LoggingPhase, /** * Just a marking for the expected number of phases. * */ NUMBER_OF_PHASES, }; } // namespace modsecurity #endif #include "modsecurity/intervention.h" #include "modsecurity/transaction.h" #include "modsecurity/debug_log.h" /** * TAG_NUM: * * Alpha - 001 * Beta - 002 * Dev - 010 * Rc1 - 051 * Rc2 - 052 * ... - ... * Release- 100 * */ #define MODSECURITY_MAJOR "3" #define MODSECURITY_MINOR "0" #define MODSECURITY_PATCHLEVEL "6" #define MODSECURITY_TAG "" #define MODSECURITY_TAG_NUM "100" #define MODSECURITY_VERSION MODSECURITY_MAJOR "." \ MODSECURITY_MINOR "." MODSECURITY_PATCHLEVEL \ MODSECURITY_TAG #define MODSECURITY_VERSION_NUM 3060100 #define MODSECURITY_CHECK_VERSION(a) (MODSECURITY_VERSION_NUM <= a) /* * @name ModSecLogCb * @brief Callback to be function on every log generation * * * The callback is going to be called on every log request. * * * void * Internal reference to be used by the API consumer. Whatever * is set here will be passed on every call. * void * Pointer to a const char * or RuleMessage class. The returned * data is selected on the log register property. * * @note Vide LogProperty enum to learn more about Log Properties. * */ typedef void (*ModSecLogCb) (void *, const void *); #ifdef __cplusplus namespace modsecurity { /* few forwarded declarations */ namespace actions { class Action; } class RuleWithOperator; #ifdef __cplusplus extern "C" { #endif /** * * Properties used to configure the general log callback. * */ enum LogProperty { /** * * Original ModSecurity text log entry. The same entry that can be found * within the Apache error_log (in the 2.x family) * */ TextLogProperty = 1, /** * * Instead of return the text log entry an instance of the class * RuleMessages is returned. * */ RuleMessageLogProperty = 2, /** * This property only makes sense with the utilization of the * RuleMessageLogProperty. Without this property set the RuleMessage * structure will not be filled with the information of the hightlight. * * Notice that the highlight can be calculate post-analisys. Calculate it * during the analisys may delay the analisys process. * */ IncludeFullHighlightLogProperty = 4, }; #ifdef __cplusplus } #endif /** @ingroup ModSecurity_CPP_API */ class ModSecurity { public: ModSecurity(); ~ModSecurity(); ModSecurity(const ModSecurity &m) = delete; ModSecurity& operator= (const ModSecurity &m) = delete; const std::string& whoAmI(); void setConnectorInformation(const std::string &connector); void setServerLogCb(ModSecLogCb cb); /** * * properties Properties to inform ModSecurity what kind of infornation * is expected be returned. * */ void setServerLogCb(ModSecLogCb cb, int properties); void serverLog(void *data, std::shared_ptr rm); const std::string& getConnectorInformation() const; static int processContentOffset(const char *content, size_t len, const char *matchString, std::string *json, const char **err); collection::Collection *m_global_collection; collection::Collection *m_resource_collection; collection::Collection *m_ip_collection; collection::Collection *m_session_collection; collection::Collection *m_user_collection; private: std::string m_connector; std::string m_whoami; ModSecLogCb m_logCb; int m_logProperties; }; #endif #ifdef __cplusplus extern "C" { #endif /** @ingroup ModSecurity_C_API */ ModSecurity *msc_init(void); /** @ingroup ModSecurity_C_API */ const char *msc_who_am_i(ModSecurity *msc); /** @ingroup ModSecurity_C_API */ void msc_set_connector_info(ModSecurity *msc, const char *connector); /** @ingroup ModSecurity_C_API */ void msc_set_log_cb(ModSecurity *msc, ModSecLogCb cb); /** @ingroup ModSecurity_C_API */ void msc_cleanup(ModSecurity *msc); #ifdef __cplusplus } } // namespace modsecurity #endif #endif // HEADERS_MODSECURITY_MODSECURITY_H_ modsecurity-v3.0.6/headers/modsecurity/rule_with_operator.h0000664000175000017500000000440614146026157025461 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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. * */ #ifdef __cplusplus #include #include #include #include #include #include #endif #ifndef HEADERS_MODSECURITY_RULE_WITH_OPERATOR_H_ #define HEADERS_MODSECURITY_RULE_WITH_OPERATOR_H_ #include "modsecurity/transaction.h" #include "modsecurity/modsecurity.h" #include "modsecurity/variable_value.h" #include "modsecurity/rule.h" #include "modsecurity/rule_with_actions.h" #ifdef __cplusplus namespace modsecurity { class RuleWithOperator : public RuleWithActions { public: RuleWithOperator(operators::Operator *op, variables::Variables *variables, std::vector *actions, Transformations *transformations, std::unique_ptr fileName, int lineNumber); virtual ~RuleWithOperator(); bool evaluate(Transaction *transaction, std::shared_ptr rm) override; void getVariablesExceptions(Transaction *t, variables::Variables *exclusion, variables::Variables *addition); inline void getFinalVars(variables::Variables *vars, variables::Variables *eclusion, Transaction *trans); bool executeOperatorAt(Transaction *trasn, const std::string &key, std::string value, std::shared_ptr rm); static void updateMatchedVars(Transaction *trasn, const std::string &key, const std::string &value); static void cleanMatchedVars(Transaction *trasn); std::string getOperatorName() const; virtual std::string getReference() override { return std::to_string(m_ruleId); } private: modsecurity::variables::Variables *m_variables; operators::Operator *m_operator; }; } // namespace modsecurity #endif #endif // HEADERS_MODSECURITY_RULE_WITH_OPERATOR_H_ modsecurity-v3.0.6/headers/modsecurity/rule_marker.h0000664000175000017500000000427714146026157024062 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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. * */ #ifdef __cplusplus #include #include #include #include #include #include #endif #ifndef HEADERS_MODSECURITY_RULE_MARKER_H_ #define HEADERS_MODSECURITY_RULE_MARKER_H_ #include "modsecurity/transaction.h" #include "modsecurity/modsecurity.h" #include "modsecurity/variable_value.h" #include "modsecurity/rule.h" #ifdef __cplusplus namespace modsecurity { class RuleMarker : public Rule { public: RuleMarker( const std::string &name, std::unique_ptr fileName, int lineNumber) : Rule(std::move(fileName), lineNumber), m_name(std::make_shared(name)) { } RuleMarker(const RuleMarker& r) : Rule(r), m_name(r.m_name) { } RuleMarker &operator =(const RuleMarker& r) { Rule::operator = (r); m_name = r.m_name; return *this; } virtual bool evaluate(Transaction *transaction, std::shared_ptr rm) override { return evaluate(transaction); } virtual bool evaluate(Transaction *transaction) override { if (transaction->isInsideAMarker()) { if (*transaction->getCurrentMarker() == *m_name) { transaction->removeMarker(); // FIXME: Move this to .cc // ms_dbg_a(transaction, 4, "Out of a SecMarker " + *m_name); } } return true; }; std::shared_ptr getName() { return m_name; } bool isMarker() override { return true; } private: std::shared_ptr m_name; }; } // namespace modsecurity #endif #endif // HEADERS_MODSECURITY_RULE_MARKER_H_ modsecurity-v3.0.6/headers/modsecurity/anchored_variable.h0000664000175000017500000000405714146026157025176 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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. * */ #ifdef __cplusplus #include #include #include #include #include #include #include #include #include #include #include #include #endif #include "modsecurity/variable_value.h" #ifndef HEADERS_MODSECURITY_ANCHORED_VARIABLE_H_ #define HEADERS_MODSECURITY_ANCHORED_VARIABLE_H_ #ifdef __cplusplus namespace modsecurity { class Transaction; class AnchoredVariable { public: AnchoredVariable(Transaction* t, const std::string &name); AnchoredVariable(const AnchoredVariable &a) = delete; AnchoredVariable &operator= (const AnchoredVariable &a) = delete; /* : m_transaction(a.m_transaction), m_offset(a.m_offset), m_name(a.m_name), m_value(a.m_value), m_var(a.m_var) { } */ ~AnchoredVariable(); void unset(); void set(const std::string &a, size_t offset); void set(const std::string &a, size_t offset, size_t offsetLen); void append(const std::string &a, size_t offset, bool spaceSeparator = false); void append(const std::string &a, size_t offset, bool spaceSeparator, int size); void evaluate(std::vector *l); std::string * evaluate(); std::unique_ptr resolveFirst(); Transaction *m_transaction; int m_offset; std::string m_name; std::string m_value; private: VariableValue *m_var; }; } // namespace modsecurity #endif #endif // HEADERS_MODSECURITY_ANCHORED_VARIABLE_H_ modsecurity-v3.0.6/headers/modsecurity/rules_set.h0000664000175000017500000000513014146026157023544 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include #ifdef __cplusplus #include #include #include #include #include #endif #ifndef HEADERS_MODSECURITY_RULES_SET_H_ #define HEADERS_MODSECURITY_RULES_SET_H_ #include "modsecurity/rules_set_properties.h" #include "modsecurity/modsecurity.h" #include "modsecurity/transaction.h" #include "modsecurity/rule.h" #include "modsecurity/rules_set_phases.h" #ifdef __cplusplus namespace modsecurity { class RuleWithOperator; namespace Parser { class Driver; } /** @ingroup ModSecurity_CPP_API */ class RulesSet : public RulesSetProperties { public: RulesSet() : RulesSetProperties(new DebugLog()) #ifndef NO_LOGS ,m_secmarker_skipped(0) #endif { } explicit RulesSet(DebugLog *customLog) : RulesSetProperties(customLog) #ifndef NO_LOGS ,m_secmarker_skipped(0) #endif { } ~RulesSet() { } int loadFromUri(const char *uri); int loadRemote(const char *key, const char *uri); int load(const char *rules); int load(const char *rules, const std::string &ref); void dump() const; int merge(Parser::Driver *driver); int merge(RulesSet *rules); int evaluate(int phase, Transaction *transaction); std::string getParserError(); void debug(int level, const std::string &id, const std::string &uri, const std::string &msg); RulesSetPhases m_rulesSetPhases; private: #ifndef NO_LOGS uint8_t m_secmarker_skipped; #endif }; #endif #ifdef __cplusplus extern "C" { #endif RulesSet *msc_create_rules_set(void); void msc_rules_dump(RulesSet *rules); int msc_rules_merge(RulesSet *rules_dst, RulesSet *rules_from, const char **error); int msc_rules_add_remote(RulesSet *rules, const char *key, const char *uri, const char **error); int msc_rules_add_file(RulesSet *rules, const char *file, const char **error); int msc_rules_add(RulesSet *rules, const char *plain_rules, const char **error); int msc_rules_cleanup(RulesSet *rules); #ifdef __cplusplus } } // namespace modsecurity #endif #endif // HEADERS_MODSECURITY_RULES_SET_H_ modsecurity-v3.0.6/headers/modsecurity/rule.h0000664000175000017500000000606514146026157022516 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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. * */ #ifdef __cplusplus #include #include #include #include #include #include #endif #ifndef HEADERS_MODSECURITY_RULE_H_ #define HEADERS_MODSECURITY_RULE_H_ #include "modsecurity/transaction.h" #include "modsecurity/modsecurity.h" #include "modsecurity/variable_value.h" #ifdef __cplusplus namespace modsecurity { namespace variables { class Variable; class Variables; } namespace actions { class Action; class Severity; class LogData; class Msg; class Rev; class SetVar; class Tag; namespace transformations { class Transformation; } } namespace operators { class Operator; } using TransformationResult = std::pair, std::shared_ptr>; using TransformationResults = std::list; using Transformation = actions::transformations::Transformation; using Transformations = std::vector; using Actions = std::vector; using Tags = std::vector; using SetVars = std::vector; using MatchActions = std::vector; class Rule { public: Rule(std::unique_ptr fileName, int lineNumber) : m_fileName(std::make_shared(*fileName)), m_lineNumber(lineNumber), m_phase(modsecurity::Phases::RequestHeadersPhase) { } Rule(const Rule &other) : m_fileName(other.m_fileName), m_lineNumber(other.m_lineNumber), m_phase(other.m_phase) { } Rule &operator=(const Rule& other) { m_fileName = other.m_fileName; m_lineNumber = other.m_lineNumber; m_phase = other.m_phase; return *this; } virtual bool evaluate(Transaction *transaction) = 0; virtual bool evaluate(Transaction *transaction, std::shared_ptr rm) = 0; std::shared_ptr getFileName() const { return m_fileName; } int getLineNumber() const { return m_lineNumber; } int getPhase() const { return m_phase; } void setPhase(int phase) { m_phase = phase; } virtual std::string getReference() { if (m_fileName) { return *m_fileName + ":" + std::to_string(m_lineNumber); } return "<>:" + std::to_string(m_lineNumber); } virtual bool isMarker() { return false; } private: std::shared_ptr m_fileName; int m_lineNumber; // FIXME: phase may not be neede to SecMarker. int m_phase; }; } // namespace modsecurity #endif #endif // HEADERS_MODSECURITY_RULE_H_ modsecurity-v3.0.6/src/0000775000175000017500000000000014146027125016170 5ustar mhsvierulamhsvierulamodsecurity-v3.0.6/src/Makefile.am0000664000175000017500000002110414146026157020226 0ustar mhsvierulamhsvierula if BUILD_PARSER export MAYBE_PARSER = parser endif SUBDIRS = \ $(MAYBE_PARSER) lib_LTLIBRARIES = libmodsecurity.la libmodsecurity_ladir = $(prefix)/include libmodsecurity_includesub_collectiondir = $(pkgincludedir)/collection/ libmodsecurity_includesub_actionsdir = $(pkgincludedir)/actions/ # pregenerated parser + parser sources EXTRA_DIST = \ parser/Makefile.am \ parser/Makefile.in \ parser/location.hh \ parser/position.hh \ parser/seclang-parser.cc \ parser/seclang-parser.hh \ parser/seclang-parser.yy \ parser/seclang-scanner.cc \ parser/seclang-scanner.ll \ parser/stack.hh MAINTAINERCLEANFILES = \ Makefile.in \ config.h.in \ config.h.in~ pkginclude_HEADERS = \ ../headers/modsecurity/anchored_set_variable_translation_proxy.h \ ../headers/modsecurity/anchored_set_variable.h \ ../headers/modsecurity/anchored_variable.h \ ../headers/modsecurity/audit_log.h \ ../headers/modsecurity/debug_log.h \ ../headers/modsecurity/intervention.h \ ../headers/modsecurity/modsecurity.h \ ../headers/modsecurity/rule.h \ ../headers/modsecurity/rule_marker.h \ ../headers/modsecurity/rule_unconditional.h \ ../headers/modsecurity/rule_with_actions.h \ ../headers/modsecurity/rule_with_operator.h \ ../headers/modsecurity/rules.h \ ../headers/modsecurity/rule_message.h \ ../headers/modsecurity/rules_set.h \ ../headers/modsecurity/rules_set_phases.h \ ../headers/modsecurity/rules_set_properties.h \ ../headers/modsecurity/rules_exceptions.h \ ../headers/modsecurity/transaction.h \ ../headers/modsecurity/variable_origin.h \ ../headers/modsecurity/variable_value.h libmodsecurity_includesub_collection_HEADERS = \ ../headers/modsecurity/collection/collection.h \ ../headers/modsecurity/collection/collections.h libmodsecurity_includesub_actions_HEADERS = \ ../headers/modsecurity/actions/action.h noinst_HEADERS = \ actions/*.h \ actions/ctl/*.h \ actions/data/*.h \ actions/disruptive/*.h \ actions/transformations/*.h \ debug_log/*.h \ audit_log/writer/*.h \ collection/backend/*.h \ operators/*.h \ parser/*.h \ request_body_processor/*.h \ utils/*.h \ variables/*.h \ engine/*.h \ *.h ENGINES = \ engine/lua.cc VARIABLES = \ variables/duration.cc \ variables/env.cc \ variables/highest_severity.cc \ variables/modsec_build.cc \ variables/remote_user.cc \ variables/rule.cc \ variables/time.cc \ variables/time_day.cc \ variables/time_epoch.cc \ variables/time_hour.cc \ variables/time_min.cc \ variables/time_mon.cc \ variables/time_sec.cc \ variables/time_wday.cc \ variables/time_year.cc \ variables/tx.cc \ variables/variable.cc \ variables/xml.cc ACTIONS = \ actions/accuracy.cc \ actions/action.cc \ actions/audit_log.cc \ actions/block.cc \ actions/capture.cc \ actions/chain.cc \ actions/ctl/audit_log_parts.cc \ actions/ctl/rule_engine.cc \ actions/ctl/request_body_processor_json.cc \ actions/ctl/request_body_processor_xml.cc \ actions/ctl/request_body_processor_urlencoded.cc \ actions/ctl/rule_remove_target_by_tag.cc \ actions/ctl/rule_remove_target_by_id.cc \ actions/ctl/rule_remove_by_id.cc \ actions/ctl/rule_remove_by_tag.cc \ actions/ctl/request_body_access.cc\ actions/disruptive/allow.cc \ actions/disruptive/deny.cc \ actions/disruptive/drop.cc \ actions/disruptive/redirect.cc \ actions/disruptive/pass.cc \ actions/exec.cc \ actions/init_col.cc \ actions/log.cc \ actions/log_data.cc \ actions/maturity.cc \ actions/msg.cc \ actions/multi_match.cc \ actions/no_audit_log.cc \ actions/no_log.cc \ actions/phase.cc \ actions/rev.cc \ actions/rule_id.cc \ actions/severity.cc \ actions/set_env.cc \ actions/set_rsc.cc \ actions/set_sid.cc \ actions/set_uid.cc \ actions/set_var.cc \ actions/data/status.cc \ actions/skip.cc \ actions/skip_after.cc \ actions/tag.cc \ actions/transformations/base64_decode.cc \ actions/transformations/base64_encode.cc \ actions/transformations/base64_decode_ext.cc \ actions/transformations/cmd_line.cc \ actions/transformations/compress_whitespace.cc \ actions/transformations/css_decode.cc \ actions/transformations/escape_seq_decode.cc \ actions/transformations/hex_decode.cc \ actions/transformations/hex_encode.cc \ actions/transformations/html_entity_decode.cc \ actions/transformations/js_decode.cc \ actions/transformations/length.cc \ actions/transformations/lower_case.cc \ actions/transformations/md5.cc \ actions/transformations/none.cc \ actions/transformations/normalise_path.cc \ actions/transformations/normalise_path_win.cc \ actions/transformations/parity_even_7bit.cc \ actions/transformations/parity_odd_7bit.cc \ actions/transformations/parity_zero_7bit.cc \ actions/transformations/remove_comments.cc \ actions/transformations/remove_comments_char.cc \ actions/transformations/remove_nulls.cc \ actions/transformations/remove_whitespace.cc \ actions/transformations/replace_comments.cc \ actions/transformations/replace_nulls.cc \ actions/transformations/sha1.cc \ actions/transformations/sql_hex_decode.cc \ actions/transformations/transformation.cc \ actions/transformations/trim.cc \ actions/transformations/trim_left.cc \ actions/transformations/trim_right.cc \ actions/transformations/upper_case.cc \ actions/transformations/url_decode.cc \ actions/transformations/url_decode_uni.cc \ actions/transformations/url_encode.cc \ actions/transformations/utf8_to_unicode.cc \ actions/ver.cc \ actions/xmlns.cc OPERATORS = \ operators/begins_with.cc \ operators/contains.cc \ operators/contains_word.cc \ operators/detect_sqli.cc \ operators/detect_xss.cc \ operators/ends_with.cc \ operators/eq.cc \ operators/fuzzy_hash.cc \ operators/ge.cc \ operators/geo_lookup.cc \ operators/gsblookup.cc \ operators/gt.cc \ operators/inspect_file.cc \ operators/ip_match.cc \ operators/ip_match_f.cc \ operators/ip_match_from_file.cc \ operators/le.cc \ operators/lt.cc \ operators/no_match.cc \ operators/operator.cc \ operators/pm.cc \ operators/pm_f.cc \ operators/pm_from_file.cc \ operators/rbl.cc \ operators/rsub.cc \ operators/rx.cc \ operators/rx_global.cc \ operators/str_eq.cc \ operators/str_match.cc \ operators/validate_byte_range.cc \ operators/validate_dtd.cc \ operators/validate_hash.cc \ operators/validate_schema.cc \ operators/validate_url_encoding.cc \ operators/validate_utf8_encoding.cc \ operators/verify_cc.cc \ operators/verify_cpf.cc \ operators/verify_ssn.cc \ operators/verify_svnr.cc \ operators/within.cc \ operators/unconditional_match.cc UTILS = \ utils/acmp.cc \ utils/base64.cc \ utils/decode.cc \ utils/geo_lookup.cc \ utils/https_client.cc \ utils/ip_tree.cc \ utils/md5.cc \ utils/msc_tree.cc \ utils/random.cc \ utils/regex.cc \ utils/sha1.cc \ utils/string.cc \ utils/system.cc \ utils/shared_files.cc COLLECTION = \ collection/collections.cc \ collection/backend/in_memory-per_process.cc \ collection/backend/lmdb.cc BODY_PROCESSORS = \ request_body_processor/multipart.cc \ request_body_processor/xml.cc \ request_body_processor/json.cc libmodsecurity_la_SOURCES = \ parser/seclang-parser.cc \ parser/seclang-scanner.cc \ parser/driver.cc \ transaction.cc \ anchored_set_variable.cc \ anchored_variable.cc \ audit_log/audit_log.cc \ audit_log/writer/writer.cc \ audit_log/writer/https.cc \ audit_log/writer/serial.cc \ audit_log/writer/parallel.cc \ modsecurity.cc \ rules_set.cc \ rules_set_phases.cc \ rules_set_properties.cc \ debug_log/debug_log.cc \ debug_log/debug_log_writer.cc \ run_time_string.cc \ rule.cc \ rule_unconditional.cc \ rule_with_actions.cc \ rule_with_operator.cc \ rule_message.cc \ rule_script.cc \ unique_id.cc \ rules_exceptions.cc \ ${BODY_PROCESSORS} \ ${ACTIONS} \ ${ENGINES} \ ${COLLECTION} \ ${OPERATORS} \ ${UTILS} \ ${VARIABLES} libmodsecurity_la_CFLAGS = libmodsecurity_la_CPPFLAGS = \ -std=c++11 \ -I.. \ -g \ -I../others \ -fPIC \ -O3 \ -I../headers \ $(CURL_CFLAGS) \ $(GEOIP_CFLAGS) \ $(GLOBAL_CPPFLAGS) \ $(MODSEC_NO_LOGS) \ $(MODSEC_MUTEX_ON_PM) \ $(YAJL_CFLAGS) \ $(LMDB_CFLAGS) \ $(PCRE_CFLAGS) \ $(SSDEEP_CFLAGS) \ $(MAXMIND_CFLAGS) \ $(LUA_CFLAGS) \ $(LIBXML2_CFLAGS) libmodsecurity_la_LDFLAGS = \ $(CURL_LDFLAGS) \ $(GEOIP_LDFLAGS) \ $(GLOBAL_LDFLAGS) \ $(LDFLAGS) \ $(LIBXML2_LDFLAGS) \ $(LMDB_LDFLAGS) \ $(LUA_LDFLAGS) \ $(PCRE_LDFLAGS) \ $(SSDEEP_LDFLAGS) \ $(MAXMIND_LDFLAGS) \ $(YAJL_LDFLAGS) \ -version-info @MSC_VERSION_INFO@ libmodsecurity_la_LIBADD = \ $(CURL_LDADD) \ $(GEOIP_LDADD) \ $(GLOBAL_LDADD) \ $(LIBXML2_LDADD) \ $(LMDB_LDADD) \ $(LUA_LDADD) \ ../others/libinjection.la \ ../others/libmbedtls.la \ $(PCRE_LDADD) \ $(MAXMIND_LDADD) \ $(SSDEEP_LDADD) \ $(YAJL_LDADD) modsecurity-v3.0.6/src/rules_set.cc0000664000175000017500000002217614146026157020520 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include #include #include #include #include "modsecurity/rules_set.h" #include "modsecurity/modsecurity.h" #include "modsecurity/transaction.h" #include "src/parser/driver.h" #include "src/utils/https_client.h" #include "modsecurity/rules.h" using modsecurity::Parser::Driver; using modsecurity::Utils::HttpsClient; namespace modsecurity { /** * @name loadFromUri * @brief load rules from a give uri * @ingroup ModSecCore * * Load the rules from a given uri into memory into memory in * the format expected by ModSecurity core. * * @param uri Full path to the rules file. * * @return Number of rules loaded, -1 if failed. * @retval true Rules where loaded successfully. * @retval false Problem loading the rules. * */ int RulesSet::loadFromUri(const char *uri) { Driver *driver = new Driver(); if (driver->parseFile(uri) == 0) { m_parserError << driver->m_parserError.str(); delete driver; return -1; } int rules = this->merge(driver); delete driver; return rules; } int RulesSet::load(const char *file, const std::string &ref) { Driver *driver = new Driver(); if (driver->parse(file, ref) == 0) { m_parserError << driver->m_parserError.str(); delete driver; return -1; } int rules = this->merge(driver); if (rules == -1) { m_parserError << driver->m_parserError.str(); delete driver; return -1; } delete driver; return rules; } int RulesSet::loadRemote(const char *key, const char *uri) { HttpsClient client; client.setKey(key); bool ret = client.download(uri); if (ret) { return this->load(client.content.c_str(), uri); } return -1; } int RulesSet::load(const char *plainRules) { return this->load(plainRules, ""); } std::string RulesSet::getParserError() { return this->m_parserError.str(); } int RulesSet::evaluate(int phase, Transaction *t) { if (phase >= modsecurity::Phases::NUMBER_OF_PHASES) { return 0; } Rules *rules = m_rulesSetPhases[phase]; ms_dbg_a(t, 9, "This phase consists of " \ + std::to_string(rules->size()) + " rule(s)."); if (t->m_allowType == actions::disruptive::FromNowOnAllowType && phase != modsecurity::Phases::LoggingPhase) { ms_dbg_a(t, 9, "Skipping all rules evaluation on this phase as request " \ "through the utilization of an `allow' action."); return true; } if (t->m_allowType == actions::disruptive::RequestAllowType && phase <= modsecurity::Phases::RequestBodyPhase) { ms_dbg_a(t, 9, "Skipping all rules evaluation on this phase as request " \ "through the utilization of an `allow' action."); return true; } //if (t->m_allowType != actions::disruptive::NoneAllowType) { t->m_allowType = actions::disruptive::NoneAllowType; //} for (int i = 0; i < rules->size(); i++) { // FIXME: This is not meant to be here. At the end of this refactoring, // the shared pointer won't be used. auto rule = rules->at(i); if (t->isInsideAMarker() && !rule->isMarker()) { ms_dbg_a(t, 9, "Skipped rule id '" + rule->getReference() \ + "' due to a SecMarker: " + *t->getCurrentMarker()); } else if (rule->isMarker()) { rule->evaluate(t); } else if (t->m_skip_next > 0) { t->m_skip_next--; ms_dbg_a(t, 9, "Skipped rule id '" + rule->getReference() \ + "' due to a `skip' action. Still " + \ std::to_string(t->m_skip_next) + " to be skipped."); } else if (t->m_allowType != actions::disruptive::NoneAllowType) { ms_dbg_a(t, 9, "Skipped rule id '" + rule->getReference() \ + "' as request trough the utilization of an `allow' action."); } else { Rule *base = rule.get(); RuleWithActions *ruleWithActions = dynamic_cast(base); // FIXME: Those should be treated inside the rule itself if (ruleWithActions && m_exceptions.contains(ruleWithActions->m_ruleId)) { ms_dbg_a(t, 9, "Skipped rule id '" + rule->getReference() \ + "'. Removed by an SecRuleRemove directive."); continue; } bool remove_rule = false; if (ruleWithActions && m_exceptions.m_remove_rule_by_msg.empty() == false) { for (auto &z : m_exceptions.m_remove_rule_by_msg) { if (ruleWithActions->containsMsg(z, t) == true) { ms_dbg_a(t, 9, "Skipped rule id '" \ + ruleWithActions->getReference() \ + "'. Removed by a SecRuleRemoveByMsg directive."); remove_rule = true; break; } } if (remove_rule) { continue; } } if (ruleWithActions && m_exceptions.m_remove_rule_by_tag.empty() == false) { for (auto &z : m_exceptions.m_remove_rule_by_tag) { if (ruleWithActions->containsTag(z, t) == true) { ms_dbg_a(t, 9, "Skipped rule id '" \ + ruleWithActions->getReference() \ + "'. Removed by a SecRuleRemoveByTag directive."); remove_rule = true; break; } } if (remove_rule) { continue; } } if (ruleWithActions) { for (auto &z : t->m_ruleRemoveByTag) { if (ruleWithActions->containsTag(z, t) == true) { ms_dbg_a(t, 9, "Skipped rule id '" \ + ruleWithActions->getReference() \ + "'. Skipped due to a ruleRemoveByTag action."); remove_rule = true; break; } } if (remove_rule) { continue; } } rule->evaluate(t); if (t->m_it.disruptive > 0) { ms_dbg_a(t, 8, "Skipping this phase as this " \ "request was already intercepted."); break; } } } return 1; } int RulesSet::merge(Driver *from) { int amount_of_rules = 0; amount_of_rules = m_rulesSetPhases.append(&from->m_rulesSetPhases, &m_parserError); mergeProperties( dynamic_cast(from), dynamic_cast(this), &m_parserError); return amount_of_rules; } int RulesSet::merge(RulesSet *from) { int amount_of_rules = 0; amount_of_rules = m_rulesSetPhases.append(&from->m_rulesSetPhases, &m_parserError); mergeProperties( dynamic_cast(from), dynamic_cast(this), &m_parserError); return amount_of_rules; } void RulesSet::debug(int level, const std::string &id, const std::string &uri, const std::string &msg) { if (m_debugLog != NULL) { m_debugLog->write(level, id, uri, msg); } } void RulesSet::dump() const { m_rulesSetPhases.dump(); } extern "C" RulesSet *msc_create_rules_set(void) { return new RulesSet(); } extern "C" void msc_rules_dump(RulesSet *rules) { rules->dump(); } extern "C" int msc_rules_merge(RulesSet *rules_dst, RulesSet *rules_from, const char **error) { int ret = rules_dst->merge(rules_from); if (ret < 0) { *error = strdup(rules_dst->getParserError().c_str()); } return ret; } extern "C" int msc_rules_add_remote(RulesSet *rules, const char *key, const char *uri, const char **error) { int ret = rules->loadRemote(key, uri); if (ret < 0) { *error = strdup(rules->getParserError().c_str()); } return ret; } extern "C" int msc_rules_add_file(RulesSet *rules, const char *file, const char **error) { int ret = rules->loadFromUri(file); if (ret < 0) { *error = strdup(rules->getParserError().c_str()); } return ret; } extern "C" int msc_rules_add(RulesSet *rules, const char *plain_rules, const char **error) { int ret = rules->load(plain_rules); if (ret < 0) { *error = strdup(rules->getParserError().c_str()); } return ret; } extern "C" int msc_rules_cleanup(RulesSet *rules) { delete rules; return true; } } // namespace modsecurity modsecurity-v3.0.6/src/unique_id.h0000664000175000017500000000306314146026157020331 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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. * */ #ifdef __cplusplus #include #include #endif #ifndef SRC_UNIQUE_ID_H_ #define SRC_UNIQUE_ID_H_ #ifdef __cplusplus namespace modsecurity { #define MAC_ADDRESS_SIZE 19 #define MAX_MACHINE_NAME_SIZE 256 /** @ingroup ModSecurity_CPP_API */ class UniqueId { public: static UniqueId& getInstance() { static UniqueId instance; return instance; } static std::string uniqueId() { std::call_once(UniqueId::onceFlag,[]() { UniqueId::getInstance().fillUniqueId(); }); return UniqueId::getInstance().uniqueId_str; } void fillUniqueId(); static std::string machineName(); static std::string ethernetMacAddress(); std::string uniqueId_str; private: UniqueId() {} // C++ 03 UniqueId(UniqueId const&); // void operator=(UniqueId const&); // C++ 11 // UniqueId(UniqueId const&) = delete; // void operator=(UniqueId const&) = delete; static std::once_flag onceFlag; }; } // namespace modsecurity #endif #endif // SRC_UNIQUE_ID_H_ modsecurity-v3.0.6/src/Makefile.in0000664000175000017500000125361014146027125020245 0ustar mhsvierulamhsvierula# Makefile.in generated by automake 1.15.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2017 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@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@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 = src ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/build/ax_prog_doxygen.m4 \ $(top_srcdir)/build/ax_valgrind_check.m4 \ $(top_srcdir)/build/curl.m4 $(top_srcdir)/build/libgeoip.m4 \ $(top_srcdir)/build/libmaxmind.m4 \ $(top_srcdir)/build/libtool.m4 $(top_srcdir)/build/libxml.m4 \ $(top_srcdir)/build/lmdb.m4 $(top_srcdir)/build/ltoptions.m4 \ $(top_srcdir)/build/ltsugar.m4 \ $(top_srcdir)/build/ltversion.m4 \ $(top_srcdir)/build/lt~obsolete.m4 $(top_srcdir)/build/lua.m4 \ $(top_srcdir)/build/pcre.m4 $(top_srcdir)/build/ssdeep.m4 \ $(top_srcdir)/build/yajl.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am \ $(libmodsecurity_includesub_actions_HEADERS) \ $(libmodsecurity_includesub_collection_HEADERS) \ $(noinst_HEADERS) $(pkginclude_HEADERS) $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = config.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__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(libdir)" \ "$(DESTDIR)$(libmodsecurity_includesub_actionsdir)" \ "$(DESTDIR)$(libmodsecurity_includesub_collectiondir)" \ "$(DESTDIR)$(pkgincludedir)" LTLIBRARIES = $(lib_LTLIBRARIES) am__DEPENDENCIES_1 = libmodsecurity_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) ../others/libinjection.la \ ../others/libmbedtls.la $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) am__dirstamp = $(am__leading_dot)dirstamp am__objects_1 = request_body_processor/libmodsecurity_la-multipart.lo \ request_body_processor/libmodsecurity_la-xml.lo \ request_body_processor/libmodsecurity_la-json.lo am__objects_2 = actions/libmodsecurity_la-accuracy.lo \ actions/libmodsecurity_la-action.lo \ actions/libmodsecurity_la-audit_log.lo \ actions/libmodsecurity_la-block.lo \ actions/libmodsecurity_la-capture.lo \ actions/libmodsecurity_la-chain.lo \ actions/ctl/libmodsecurity_la-audit_log_parts.lo \ actions/ctl/libmodsecurity_la-rule_engine.lo \ actions/ctl/libmodsecurity_la-request_body_processor_json.lo \ actions/ctl/libmodsecurity_la-request_body_processor_xml.lo \ actions/ctl/libmodsecurity_la-request_body_processor_urlencoded.lo \ actions/ctl/libmodsecurity_la-rule_remove_target_by_tag.lo \ actions/ctl/libmodsecurity_la-rule_remove_target_by_id.lo \ actions/ctl/libmodsecurity_la-rule_remove_by_id.lo \ actions/ctl/libmodsecurity_la-rule_remove_by_tag.lo \ actions/ctl/libmodsecurity_la-request_body_access.lo \ actions/disruptive/libmodsecurity_la-allow.lo \ actions/disruptive/libmodsecurity_la-deny.lo \ actions/disruptive/libmodsecurity_la-drop.lo \ actions/disruptive/libmodsecurity_la-redirect.lo \ actions/disruptive/libmodsecurity_la-pass.lo \ actions/libmodsecurity_la-exec.lo \ actions/libmodsecurity_la-init_col.lo \ actions/libmodsecurity_la-log.lo \ actions/libmodsecurity_la-log_data.lo \ actions/libmodsecurity_la-maturity.lo \ actions/libmodsecurity_la-msg.lo \ actions/libmodsecurity_la-multi_match.lo \ actions/libmodsecurity_la-no_audit_log.lo \ actions/libmodsecurity_la-no_log.lo \ actions/libmodsecurity_la-phase.lo \ actions/libmodsecurity_la-rev.lo \ actions/libmodsecurity_la-rule_id.lo \ actions/libmodsecurity_la-severity.lo \ actions/libmodsecurity_la-set_env.lo \ actions/libmodsecurity_la-set_rsc.lo \ actions/libmodsecurity_la-set_sid.lo \ actions/libmodsecurity_la-set_uid.lo \ actions/libmodsecurity_la-set_var.lo \ actions/data/libmodsecurity_la-status.lo \ actions/libmodsecurity_la-skip.lo \ actions/libmodsecurity_la-skip_after.lo \ actions/libmodsecurity_la-tag.lo \ actions/transformations/libmodsecurity_la-base64_decode.lo \ actions/transformations/libmodsecurity_la-base64_encode.lo \ actions/transformations/libmodsecurity_la-base64_decode_ext.lo \ actions/transformations/libmodsecurity_la-cmd_line.lo \ actions/transformations/libmodsecurity_la-compress_whitespace.lo \ actions/transformations/libmodsecurity_la-css_decode.lo \ actions/transformations/libmodsecurity_la-escape_seq_decode.lo \ actions/transformations/libmodsecurity_la-hex_decode.lo \ actions/transformations/libmodsecurity_la-hex_encode.lo \ actions/transformations/libmodsecurity_la-html_entity_decode.lo \ actions/transformations/libmodsecurity_la-js_decode.lo \ actions/transformations/libmodsecurity_la-length.lo \ actions/transformations/libmodsecurity_la-lower_case.lo \ actions/transformations/libmodsecurity_la-md5.lo \ actions/transformations/libmodsecurity_la-none.lo \ actions/transformations/libmodsecurity_la-normalise_path.lo \ actions/transformations/libmodsecurity_la-normalise_path_win.lo \ actions/transformations/libmodsecurity_la-parity_even_7bit.lo \ actions/transformations/libmodsecurity_la-parity_odd_7bit.lo \ actions/transformations/libmodsecurity_la-parity_zero_7bit.lo \ actions/transformations/libmodsecurity_la-remove_comments.lo \ actions/transformations/libmodsecurity_la-remove_comments_char.lo \ actions/transformations/libmodsecurity_la-remove_nulls.lo \ actions/transformations/libmodsecurity_la-remove_whitespace.lo \ actions/transformations/libmodsecurity_la-replace_comments.lo \ actions/transformations/libmodsecurity_la-replace_nulls.lo \ actions/transformations/libmodsecurity_la-sha1.lo \ actions/transformations/libmodsecurity_la-sql_hex_decode.lo \ actions/transformations/libmodsecurity_la-transformation.lo \ actions/transformations/libmodsecurity_la-trim.lo \ actions/transformations/libmodsecurity_la-trim_left.lo \ actions/transformations/libmodsecurity_la-trim_right.lo \ actions/transformations/libmodsecurity_la-upper_case.lo \ actions/transformations/libmodsecurity_la-url_decode.lo \ actions/transformations/libmodsecurity_la-url_decode_uni.lo \ actions/transformations/libmodsecurity_la-url_encode.lo \ actions/transformations/libmodsecurity_la-utf8_to_unicode.lo \ actions/libmodsecurity_la-ver.lo \ actions/libmodsecurity_la-xmlns.lo am__objects_3 = engine/libmodsecurity_la-lua.lo am__objects_4 = collection/libmodsecurity_la-collections.lo \ collection/backend/libmodsecurity_la-in_memory-per_process.lo \ collection/backend/libmodsecurity_la-lmdb.lo am__objects_5 = operators/libmodsecurity_la-begins_with.lo \ operators/libmodsecurity_la-contains.lo \ operators/libmodsecurity_la-contains_word.lo \ operators/libmodsecurity_la-detect_sqli.lo \ operators/libmodsecurity_la-detect_xss.lo \ operators/libmodsecurity_la-ends_with.lo \ operators/libmodsecurity_la-eq.lo \ operators/libmodsecurity_la-fuzzy_hash.lo \ operators/libmodsecurity_la-ge.lo \ operators/libmodsecurity_la-geo_lookup.lo \ operators/libmodsecurity_la-gsblookup.lo \ operators/libmodsecurity_la-gt.lo \ operators/libmodsecurity_la-inspect_file.lo \ operators/libmodsecurity_la-ip_match.lo \ operators/libmodsecurity_la-ip_match_f.lo \ operators/libmodsecurity_la-ip_match_from_file.lo \ operators/libmodsecurity_la-le.lo \ operators/libmodsecurity_la-lt.lo \ operators/libmodsecurity_la-no_match.lo \ operators/libmodsecurity_la-operator.lo \ operators/libmodsecurity_la-pm.lo \ operators/libmodsecurity_la-pm_f.lo \ operators/libmodsecurity_la-pm_from_file.lo \ operators/libmodsecurity_la-rbl.lo \ operators/libmodsecurity_la-rsub.lo \ operators/libmodsecurity_la-rx.lo \ operators/libmodsecurity_la-rx_global.lo \ operators/libmodsecurity_la-str_eq.lo \ operators/libmodsecurity_la-str_match.lo \ operators/libmodsecurity_la-validate_byte_range.lo \ operators/libmodsecurity_la-validate_dtd.lo \ operators/libmodsecurity_la-validate_hash.lo \ operators/libmodsecurity_la-validate_schema.lo \ operators/libmodsecurity_la-validate_url_encoding.lo \ operators/libmodsecurity_la-validate_utf8_encoding.lo \ operators/libmodsecurity_la-verify_cc.lo \ operators/libmodsecurity_la-verify_cpf.lo \ operators/libmodsecurity_la-verify_ssn.lo \ operators/libmodsecurity_la-verify_svnr.lo \ operators/libmodsecurity_la-within.lo \ operators/libmodsecurity_la-unconditional_match.lo am__objects_6 = utils/libmodsecurity_la-acmp.lo \ utils/libmodsecurity_la-base64.lo \ utils/libmodsecurity_la-decode.lo \ utils/libmodsecurity_la-geo_lookup.lo \ utils/libmodsecurity_la-https_client.lo \ utils/libmodsecurity_la-ip_tree.lo \ utils/libmodsecurity_la-md5.lo \ utils/libmodsecurity_la-msc_tree.lo \ utils/libmodsecurity_la-random.lo \ utils/libmodsecurity_la-regex.lo \ utils/libmodsecurity_la-sha1.lo \ utils/libmodsecurity_la-string.lo \ utils/libmodsecurity_la-system.lo \ utils/libmodsecurity_la-shared_files.lo am__objects_7 = variables/libmodsecurity_la-duration.lo \ variables/libmodsecurity_la-env.lo \ variables/libmodsecurity_la-highest_severity.lo \ variables/libmodsecurity_la-modsec_build.lo \ variables/libmodsecurity_la-remote_user.lo \ variables/libmodsecurity_la-rule.lo \ variables/libmodsecurity_la-time.lo \ variables/libmodsecurity_la-time_day.lo \ variables/libmodsecurity_la-time_epoch.lo \ variables/libmodsecurity_la-time_hour.lo \ variables/libmodsecurity_la-time_min.lo \ variables/libmodsecurity_la-time_mon.lo \ variables/libmodsecurity_la-time_sec.lo \ variables/libmodsecurity_la-time_wday.lo \ variables/libmodsecurity_la-time_year.lo \ variables/libmodsecurity_la-tx.lo \ variables/libmodsecurity_la-variable.lo \ variables/libmodsecurity_la-xml.lo am_libmodsecurity_la_OBJECTS = \ parser/libmodsecurity_la-seclang-parser.lo \ parser/libmodsecurity_la-seclang-scanner.lo \ parser/libmodsecurity_la-driver.lo \ libmodsecurity_la-transaction.lo \ libmodsecurity_la-anchored_set_variable.lo \ libmodsecurity_la-anchored_variable.lo \ audit_log/libmodsecurity_la-audit_log.lo \ audit_log/writer/libmodsecurity_la-writer.lo \ audit_log/writer/libmodsecurity_la-https.lo \ audit_log/writer/libmodsecurity_la-serial.lo \ audit_log/writer/libmodsecurity_la-parallel.lo \ libmodsecurity_la-modsecurity.lo \ libmodsecurity_la-rules_set.lo \ libmodsecurity_la-rules_set_phases.lo \ libmodsecurity_la-rules_set_properties.lo \ debug_log/libmodsecurity_la-debug_log.lo \ debug_log/libmodsecurity_la-debug_log_writer.lo \ libmodsecurity_la-run_time_string.lo libmodsecurity_la-rule.lo \ libmodsecurity_la-rule_unconditional.lo \ libmodsecurity_la-rule_with_actions.lo \ libmodsecurity_la-rule_with_operator.lo \ libmodsecurity_la-rule_message.lo \ libmodsecurity_la-rule_script.lo \ libmodsecurity_la-unique_id.lo \ libmodsecurity_la-rules_exceptions.lo $(am__objects_1) \ $(am__objects_2) $(am__objects_3) $(am__objects_4) \ $(am__objects_5) $(am__objects_6) $(am__objects_7) libmodsecurity_la_OBJECTS = $(am_libmodsecurity_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = libmodsecurity_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ $(AM_CXXFLAGS) $(CXXFLAGS) $(libmodsecurity_la_LDFLAGS) \ $(LDFLAGS) -o $@ AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CXXFLAGS) $(CXXFLAGS) AM_V_CXX = $(am__v_CXX_@AM_V@) am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) am__v_CXX_0 = @echo " CXX " $@; am__v_CXX_1 = CXXLD = $(CXX) CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) am__v_CXXLD_0 = @echo " CXXLD " $@; am__v_CXXLD_1 = SOURCES = $(libmodsecurity_la_SOURCES) DIST_SOURCES = $(libmodsecurity_la_SOURCES) RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ ctags-recursive dvi-recursive html-recursive info-recursive \ install-data-recursive install-dvi-recursive \ install-exec-recursive install-html-recursive \ install-info-recursive install-pdf-recursive \ install-ps-recursive install-recursive installcheck-recursive \ installdirs-recursive pdf-recursive ps-recursive \ tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac HEADERS = $(libmodsecurity_includesub_actions_HEADERS) \ $(libmodsecurity_includesub_collection_HEADERS) \ $(noinst_HEADERS) $(pkginclude_HEADERS) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive am__recursive_targets = \ $(RECURSIVE_TARGETS) \ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ distdir am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \ $(LISP)config.h.in # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/config.h.in \ $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BISON = @BISON@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CURL_CFLAGS = @CURL_CFLAGS@ CURL_CONFIG = @CURL_CONFIG@ CURL_CPPFLAGS = @CURL_CPPFLAGS@ CURL_DISPLAY = @CURL_DISPLAY@ CURL_FOUND = @CURL_FOUND@ CURL_LDADD = @CURL_LDADD@ CURL_LDFLAGS = @CURL_LDFLAGS@ CURL_USES_GNUTLS = @CURL_USES_GNUTLS@ CURL_VERSION = @CURL_VERSION@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DOXYGEN_PAPER_SIZE = @DOXYGEN_PAPER_SIZE@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ DX_CONFIG = @DX_CONFIG@ DX_DOCDIR = @DX_DOCDIR@ DX_DOT = @DX_DOT@ DX_DOXYGEN = @DX_DOXYGEN@ DX_DVIPS = @DX_DVIPS@ DX_EGREP = @DX_EGREP@ DX_ENV = @DX_ENV@ DX_FLAG_chi = @DX_FLAG_chi@ DX_FLAG_chm = @DX_FLAG_chm@ DX_FLAG_doc = @DX_FLAG_doc@ DX_FLAG_dot = @DX_FLAG_dot@ DX_FLAG_html = @DX_FLAG_html@ DX_FLAG_man = @DX_FLAG_man@ DX_FLAG_pdf = @DX_FLAG_pdf@ DX_FLAG_ps = @DX_FLAG_ps@ DX_FLAG_rtf = @DX_FLAG_rtf@ DX_FLAG_xml = @DX_FLAG_xml@ DX_HHC = @DX_HHC@ DX_LATEX = @DX_LATEX@ DX_MAKEINDEX = @DX_MAKEINDEX@ DX_PDFLATEX = @DX_PDFLATEX@ DX_PERL = @DX_PERL@ DX_PROJECT = @DX_PROJECT@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ENABLE_VALGRIND_drd = @ENABLE_VALGRIND_drd@ ENABLE_VALGRIND_helgrind = @ENABLE_VALGRIND_helgrind@ ENABLE_VALGRIND_memcheck = @ENABLE_VALGRIND_memcheck@ ENABLE_VALGRIND_sgcheck = @ENABLE_VALGRIND_sgcheck@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FLEX = @FLEX@ GEOIP_CFLAGS = @GEOIP_CFLAGS@ GEOIP_DISPLAY = @GEOIP_DISPLAY@ GEOIP_FOUND = @GEOIP_FOUND@ GEOIP_LDADD = @GEOIP_LDADD@ GEOIP_LDFLAGS = @GEOIP_LDFLAGS@ GEOIP_LIBS = @GEOIP_LIBS@ GEOIP_VERSION = @GEOIP_VERSION@ GLOBAL_CFLAGS = @GLOBAL_CFLAGS@ GLOBAL_CPPFLAGS = @GLOBAL_CPPFLAGS@ GLOBAL_LDADD = @GLOBAL_LDADD@ 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@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBXML2_CFLAGS = @LIBXML2_CFLAGS@ LIBXML2_CONFIG = @LIBXML2_CONFIG@ LIBXML2_CPPFLAGS = @LIBXML2_CPPFLAGS@ LIBXML2_DISPLAY = @LIBXML2_DISPLAY@ LIBXML2_FOUND = @LIBXML2_FOUND@ LIBXML2_LDADD = @LIBXML2_LDADD@ LIBXML2_LDFLAGS = @LIBXML2_LDFLAGS@ LIBXML2_VERSION = @LIBXML2_VERSION@ LIPO = @LIPO@ LMDB_CFLAGS = @LMDB_CFLAGS@ LMDB_DISPLAY = @LMDB_DISPLAY@ LMDB_FOUND = @LMDB_FOUND@ LMDB_LDADD = @LMDB_LDADD@ LMDB_LDFLAGS = @LMDB_LDFLAGS@ LMDB_LIBS = @LMDB_LIBS@ LMDB_VERSION = @LMDB_VERSION@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ LUA_CFLAGS = @LUA_CFLAGS@ LUA_DISPLAY = @LUA_DISPLAY@ LUA_FOUND = @LUA_FOUND@ LUA_LDADD = @LUA_LDADD@ LUA_LDFLAGS = @LUA_LDFLAGS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAXMIND_CFLAGS = @MAXMIND_CFLAGS@ MAXMIND_DISPLAY = @MAXMIND_DISPLAY@ MAXMIND_FOUND = @MAXMIND_FOUND@ MAXMIND_LDADD = @MAXMIND_LDADD@ MAXMIND_LDFLAGS = @MAXMIND_LDFLAGS@ MAXMIND_LIBS = @MAXMIND_LIBS@ MAXMIND_VERSION = @MAXMIND_VERSION@ MKDIR_P = @MKDIR_P@ MODSEC_MUTEX_ON_PM = @MODSEC_MUTEX_ON_PM@ MODSEC_NO_LOGS = @MODSEC_NO_LOGS@ MSC_BASE_DIR = @MSC_BASE_DIR@ MSC_GIT_VERSION = @MSC_GIT_VERSION@ MSC_VERSION = @MSC_VERSION@ MSC_VERSION_INFO = @MSC_VERSION_INFO@ MSC_VERSION_WITH_PATCHLEVEL = @MSC_VERSION_WITH_PATCHLEVEL@ 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_LD_PATH = @PCRE_LD_PATH@ PCRE_VERSION = @PCRE_VERSION@ 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@ SSDEEP_CFLAGS = @SSDEEP_CFLAGS@ SSDEEP_DISPLAY = @SSDEEP_DISPLAY@ SSDEEP_FOUND = @SSDEEP_FOUND@ SSDEEP_LDADD = @SSDEEP_LDADD@ SSDEEP_LDFLAGS = @SSDEEP_LDFLAGS@ STRIP = @STRIP@ VALGRIND = @VALGRIND@ VALGRIND_ENABLED = @VALGRIND_ENABLED@ VERSION = @VERSION@ YACC = @YACC@ YACC_INST = @YACC_INST@ YAJL_CFLAGS = @YAJL_CFLAGS@ YAJL_DISPLAY = @YAJL_DISPLAY@ YAJL_FOUND = @YAJL_FOUND@ YAJL_LDADD = @YAJL_LDADD@ YAJL_LDFLAGS = @YAJL_LDFLAGS@ YAJL_LIBS = @YAJL_LIBS@ YAJL_VERSION = @YAJL_VERSION@ YFLAGS = @YFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ 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@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ 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@ valgrind_enabled_tools = @valgrind_enabled_tools@ valgrind_tools = @valgrind_tools@ SUBDIRS = \ $(MAYBE_PARSER) lib_LTLIBRARIES = libmodsecurity.la libmodsecurity_ladir = $(prefix)/include libmodsecurity_includesub_collectiondir = $(pkgincludedir)/collection/ libmodsecurity_includesub_actionsdir = $(pkgincludedir)/actions/ # pregenerated parser + parser sources EXTRA_DIST = \ parser/Makefile.am \ parser/Makefile.in \ parser/location.hh \ parser/position.hh \ parser/seclang-parser.cc \ parser/seclang-parser.hh \ parser/seclang-parser.yy \ parser/seclang-scanner.cc \ parser/seclang-scanner.ll \ parser/stack.hh MAINTAINERCLEANFILES = \ Makefile.in \ config.h.in \ config.h.in~ pkginclude_HEADERS = \ ../headers/modsecurity/anchored_set_variable_translation_proxy.h \ ../headers/modsecurity/anchored_set_variable.h \ ../headers/modsecurity/anchored_variable.h \ ../headers/modsecurity/audit_log.h \ ../headers/modsecurity/debug_log.h \ ../headers/modsecurity/intervention.h \ ../headers/modsecurity/modsecurity.h \ ../headers/modsecurity/rule.h \ ../headers/modsecurity/rule_marker.h \ ../headers/modsecurity/rule_unconditional.h \ ../headers/modsecurity/rule_with_actions.h \ ../headers/modsecurity/rule_with_operator.h \ ../headers/modsecurity/rules.h \ ../headers/modsecurity/rule_message.h \ ../headers/modsecurity/rules_set.h \ ../headers/modsecurity/rules_set_phases.h \ ../headers/modsecurity/rules_set_properties.h \ ../headers/modsecurity/rules_exceptions.h \ ../headers/modsecurity/transaction.h \ ../headers/modsecurity/variable_origin.h \ ../headers/modsecurity/variable_value.h libmodsecurity_includesub_collection_HEADERS = \ ../headers/modsecurity/collection/collection.h \ ../headers/modsecurity/collection/collections.h libmodsecurity_includesub_actions_HEADERS = \ ../headers/modsecurity/actions/action.h noinst_HEADERS = \ actions/*.h \ actions/ctl/*.h \ actions/data/*.h \ actions/disruptive/*.h \ actions/transformations/*.h \ debug_log/*.h \ audit_log/writer/*.h \ collection/backend/*.h \ operators/*.h \ parser/*.h \ request_body_processor/*.h \ utils/*.h \ variables/*.h \ engine/*.h \ *.h ENGINES = \ engine/lua.cc VARIABLES = \ variables/duration.cc \ variables/env.cc \ variables/highest_severity.cc \ variables/modsec_build.cc \ variables/remote_user.cc \ variables/rule.cc \ variables/time.cc \ variables/time_day.cc \ variables/time_epoch.cc \ variables/time_hour.cc \ variables/time_min.cc \ variables/time_mon.cc \ variables/time_sec.cc \ variables/time_wday.cc \ variables/time_year.cc \ variables/tx.cc \ variables/variable.cc \ variables/xml.cc ACTIONS = \ actions/accuracy.cc \ actions/action.cc \ actions/audit_log.cc \ actions/block.cc \ actions/capture.cc \ actions/chain.cc \ actions/ctl/audit_log_parts.cc \ actions/ctl/rule_engine.cc \ actions/ctl/request_body_processor_json.cc \ actions/ctl/request_body_processor_xml.cc \ actions/ctl/request_body_processor_urlencoded.cc \ actions/ctl/rule_remove_target_by_tag.cc \ actions/ctl/rule_remove_target_by_id.cc \ actions/ctl/rule_remove_by_id.cc \ actions/ctl/rule_remove_by_tag.cc \ actions/ctl/request_body_access.cc\ actions/disruptive/allow.cc \ actions/disruptive/deny.cc \ actions/disruptive/drop.cc \ actions/disruptive/redirect.cc \ actions/disruptive/pass.cc \ actions/exec.cc \ actions/init_col.cc \ actions/log.cc \ actions/log_data.cc \ actions/maturity.cc \ actions/msg.cc \ actions/multi_match.cc \ actions/no_audit_log.cc \ actions/no_log.cc \ actions/phase.cc \ actions/rev.cc \ actions/rule_id.cc \ actions/severity.cc \ actions/set_env.cc \ actions/set_rsc.cc \ actions/set_sid.cc \ actions/set_uid.cc \ actions/set_var.cc \ actions/data/status.cc \ actions/skip.cc \ actions/skip_after.cc \ actions/tag.cc \ actions/transformations/base64_decode.cc \ actions/transformations/base64_encode.cc \ actions/transformations/base64_decode_ext.cc \ actions/transformations/cmd_line.cc \ actions/transformations/compress_whitespace.cc \ actions/transformations/css_decode.cc \ actions/transformations/escape_seq_decode.cc \ actions/transformations/hex_decode.cc \ actions/transformations/hex_encode.cc \ actions/transformations/html_entity_decode.cc \ actions/transformations/js_decode.cc \ actions/transformations/length.cc \ actions/transformations/lower_case.cc \ actions/transformations/md5.cc \ actions/transformations/none.cc \ actions/transformations/normalise_path.cc \ actions/transformations/normalise_path_win.cc \ actions/transformations/parity_even_7bit.cc \ actions/transformations/parity_odd_7bit.cc \ actions/transformations/parity_zero_7bit.cc \ actions/transformations/remove_comments.cc \ actions/transformations/remove_comments_char.cc \ actions/transformations/remove_nulls.cc \ actions/transformations/remove_whitespace.cc \ actions/transformations/replace_comments.cc \ actions/transformations/replace_nulls.cc \ actions/transformations/sha1.cc \ actions/transformations/sql_hex_decode.cc \ actions/transformations/transformation.cc \ actions/transformations/trim.cc \ actions/transformations/trim_left.cc \ actions/transformations/trim_right.cc \ actions/transformations/upper_case.cc \ actions/transformations/url_decode.cc \ actions/transformations/url_decode_uni.cc \ actions/transformations/url_encode.cc \ actions/transformations/utf8_to_unicode.cc \ actions/ver.cc \ actions/xmlns.cc OPERATORS = \ operators/begins_with.cc \ operators/contains.cc \ operators/contains_word.cc \ operators/detect_sqli.cc \ operators/detect_xss.cc \ operators/ends_with.cc \ operators/eq.cc \ operators/fuzzy_hash.cc \ operators/ge.cc \ operators/geo_lookup.cc \ operators/gsblookup.cc \ operators/gt.cc \ operators/inspect_file.cc \ operators/ip_match.cc \ operators/ip_match_f.cc \ operators/ip_match_from_file.cc \ operators/le.cc \ operators/lt.cc \ operators/no_match.cc \ operators/operator.cc \ operators/pm.cc \ operators/pm_f.cc \ operators/pm_from_file.cc \ operators/rbl.cc \ operators/rsub.cc \ operators/rx.cc \ operators/rx_global.cc \ operators/str_eq.cc \ operators/str_match.cc \ operators/validate_byte_range.cc \ operators/validate_dtd.cc \ operators/validate_hash.cc \ operators/validate_schema.cc \ operators/validate_url_encoding.cc \ operators/validate_utf8_encoding.cc \ operators/verify_cc.cc \ operators/verify_cpf.cc \ operators/verify_ssn.cc \ operators/verify_svnr.cc \ operators/within.cc \ operators/unconditional_match.cc UTILS = \ utils/acmp.cc \ utils/base64.cc \ utils/decode.cc \ utils/geo_lookup.cc \ utils/https_client.cc \ utils/ip_tree.cc \ utils/md5.cc \ utils/msc_tree.cc \ utils/random.cc \ utils/regex.cc \ utils/sha1.cc \ utils/string.cc \ utils/system.cc \ utils/shared_files.cc COLLECTION = \ collection/collections.cc \ collection/backend/in_memory-per_process.cc \ collection/backend/lmdb.cc BODY_PROCESSORS = \ request_body_processor/multipart.cc \ request_body_processor/xml.cc \ request_body_processor/json.cc libmodsecurity_la_SOURCES = \ parser/seclang-parser.cc \ parser/seclang-scanner.cc \ parser/driver.cc \ transaction.cc \ anchored_set_variable.cc \ anchored_variable.cc \ audit_log/audit_log.cc \ audit_log/writer/writer.cc \ audit_log/writer/https.cc \ audit_log/writer/serial.cc \ audit_log/writer/parallel.cc \ modsecurity.cc \ rules_set.cc \ rules_set_phases.cc \ rules_set_properties.cc \ debug_log/debug_log.cc \ debug_log/debug_log_writer.cc \ run_time_string.cc \ rule.cc \ rule_unconditional.cc \ rule_with_actions.cc \ rule_with_operator.cc \ rule_message.cc \ rule_script.cc \ unique_id.cc \ rules_exceptions.cc \ ${BODY_PROCESSORS} \ ${ACTIONS} \ ${ENGINES} \ ${COLLECTION} \ ${OPERATORS} \ ${UTILS} \ ${VARIABLES} libmodsecurity_la_CFLAGS = libmodsecurity_la_CPPFLAGS = \ -std=c++11 \ -I.. \ -g \ -I../others \ -fPIC \ -O3 \ -I../headers \ $(CURL_CFLAGS) \ $(GEOIP_CFLAGS) \ $(GLOBAL_CPPFLAGS) \ $(MODSEC_NO_LOGS) \ $(MODSEC_MUTEX_ON_PM) \ $(YAJL_CFLAGS) \ $(LMDB_CFLAGS) \ $(PCRE_CFLAGS) \ $(SSDEEP_CFLAGS) \ $(MAXMIND_CFLAGS) \ $(LUA_CFLAGS) \ $(LIBXML2_CFLAGS) libmodsecurity_la_LDFLAGS = \ $(CURL_LDFLAGS) \ $(GEOIP_LDFLAGS) \ $(GLOBAL_LDFLAGS) \ $(LDFLAGS) \ $(LIBXML2_LDFLAGS) \ $(LMDB_LDFLAGS) \ $(LUA_LDFLAGS) \ $(PCRE_LDFLAGS) \ $(SSDEEP_LDFLAGS) \ $(MAXMIND_LDFLAGS) \ $(YAJL_LDFLAGS) \ -version-info @MSC_VERSION_INFO@ libmodsecurity_la_LIBADD = \ $(CURL_LDADD) \ $(GEOIP_LDADD) \ $(GLOBAL_LDADD) \ $(LIBXML2_LDADD) \ $(LMDB_LDADD) \ $(LUA_LDADD) \ ../others/libinjection.la \ ../others/libmbedtls.la \ $(PCRE_LDADD) \ $(MAXMIND_LDADD) \ $(SSDEEP_LDADD) \ $(YAJL_LDADD) all: config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive .SUFFIXES: .SUFFIXES: .cc .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 src/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign src/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): config.h: stamp-h1 @test -f $@ || rm -f stamp-h1 @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1 stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status @rm -f stamp-h1 cd $(top_builddir) && $(SHELL) ./config.status src/config.h $(srcdir)/config.h.in: $(am__configure_deps) ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) rm -f stamp-h1 touch $@ distclean-hdr: -rm -f config.h stamp-h1 install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ } uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } parser/$(am__dirstamp): @$(MKDIR_P) parser @: > parser/$(am__dirstamp) parser/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) parser/$(DEPDIR) @: > parser/$(DEPDIR)/$(am__dirstamp) parser/libmodsecurity_la-seclang-parser.lo: parser/$(am__dirstamp) \ parser/$(DEPDIR)/$(am__dirstamp) parser/libmodsecurity_la-seclang-scanner.lo: parser/$(am__dirstamp) \ parser/$(DEPDIR)/$(am__dirstamp) parser/libmodsecurity_la-driver.lo: parser/$(am__dirstamp) \ parser/$(DEPDIR)/$(am__dirstamp) audit_log/$(am__dirstamp): @$(MKDIR_P) audit_log @: > audit_log/$(am__dirstamp) audit_log/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) audit_log/$(DEPDIR) @: > audit_log/$(DEPDIR)/$(am__dirstamp) audit_log/libmodsecurity_la-audit_log.lo: audit_log/$(am__dirstamp) \ audit_log/$(DEPDIR)/$(am__dirstamp) audit_log/writer/$(am__dirstamp): @$(MKDIR_P) audit_log/writer @: > audit_log/writer/$(am__dirstamp) audit_log/writer/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) audit_log/writer/$(DEPDIR) @: > audit_log/writer/$(DEPDIR)/$(am__dirstamp) audit_log/writer/libmodsecurity_la-writer.lo: \ audit_log/writer/$(am__dirstamp) \ audit_log/writer/$(DEPDIR)/$(am__dirstamp) audit_log/writer/libmodsecurity_la-https.lo: \ audit_log/writer/$(am__dirstamp) \ audit_log/writer/$(DEPDIR)/$(am__dirstamp) audit_log/writer/libmodsecurity_la-serial.lo: \ audit_log/writer/$(am__dirstamp) \ audit_log/writer/$(DEPDIR)/$(am__dirstamp) audit_log/writer/libmodsecurity_la-parallel.lo: \ audit_log/writer/$(am__dirstamp) \ audit_log/writer/$(DEPDIR)/$(am__dirstamp) debug_log/$(am__dirstamp): @$(MKDIR_P) debug_log @: > debug_log/$(am__dirstamp) debug_log/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) debug_log/$(DEPDIR) @: > debug_log/$(DEPDIR)/$(am__dirstamp) debug_log/libmodsecurity_la-debug_log.lo: debug_log/$(am__dirstamp) \ debug_log/$(DEPDIR)/$(am__dirstamp) debug_log/libmodsecurity_la-debug_log_writer.lo: \ debug_log/$(am__dirstamp) debug_log/$(DEPDIR)/$(am__dirstamp) request_body_processor/$(am__dirstamp): @$(MKDIR_P) request_body_processor @: > request_body_processor/$(am__dirstamp) request_body_processor/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) request_body_processor/$(DEPDIR) @: > request_body_processor/$(DEPDIR)/$(am__dirstamp) request_body_processor/libmodsecurity_la-multipart.lo: \ request_body_processor/$(am__dirstamp) \ request_body_processor/$(DEPDIR)/$(am__dirstamp) request_body_processor/libmodsecurity_la-xml.lo: \ request_body_processor/$(am__dirstamp) \ request_body_processor/$(DEPDIR)/$(am__dirstamp) request_body_processor/libmodsecurity_la-json.lo: \ request_body_processor/$(am__dirstamp) \ request_body_processor/$(DEPDIR)/$(am__dirstamp) actions/$(am__dirstamp): @$(MKDIR_P) actions @: > actions/$(am__dirstamp) actions/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) actions/$(DEPDIR) @: > actions/$(DEPDIR)/$(am__dirstamp) actions/libmodsecurity_la-accuracy.lo: actions/$(am__dirstamp) \ actions/$(DEPDIR)/$(am__dirstamp) actions/libmodsecurity_la-action.lo: actions/$(am__dirstamp) \ actions/$(DEPDIR)/$(am__dirstamp) actions/libmodsecurity_la-audit_log.lo: actions/$(am__dirstamp) \ actions/$(DEPDIR)/$(am__dirstamp) actions/libmodsecurity_la-block.lo: actions/$(am__dirstamp) \ actions/$(DEPDIR)/$(am__dirstamp) actions/libmodsecurity_la-capture.lo: actions/$(am__dirstamp) \ actions/$(DEPDIR)/$(am__dirstamp) actions/libmodsecurity_la-chain.lo: actions/$(am__dirstamp) \ actions/$(DEPDIR)/$(am__dirstamp) actions/ctl/$(am__dirstamp): @$(MKDIR_P) actions/ctl @: > actions/ctl/$(am__dirstamp) actions/ctl/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) actions/ctl/$(DEPDIR) @: > actions/ctl/$(DEPDIR)/$(am__dirstamp) actions/ctl/libmodsecurity_la-audit_log_parts.lo: \ actions/ctl/$(am__dirstamp) \ actions/ctl/$(DEPDIR)/$(am__dirstamp) actions/ctl/libmodsecurity_la-rule_engine.lo: \ actions/ctl/$(am__dirstamp) \ actions/ctl/$(DEPDIR)/$(am__dirstamp) actions/ctl/libmodsecurity_la-request_body_processor_json.lo: \ actions/ctl/$(am__dirstamp) \ actions/ctl/$(DEPDIR)/$(am__dirstamp) actions/ctl/libmodsecurity_la-request_body_processor_xml.lo: \ actions/ctl/$(am__dirstamp) \ actions/ctl/$(DEPDIR)/$(am__dirstamp) actions/ctl/libmodsecurity_la-request_body_processor_urlencoded.lo: \ actions/ctl/$(am__dirstamp) \ actions/ctl/$(DEPDIR)/$(am__dirstamp) actions/ctl/libmodsecurity_la-rule_remove_target_by_tag.lo: \ actions/ctl/$(am__dirstamp) \ actions/ctl/$(DEPDIR)/$(am__dirstamp) actions/ctl/libmodsecurity_la-rule_remove_target_by_id.lo: \ actions/ctl/$(am__dirstamp) \ actions/ctl/$(DEPDIR)/$(am__dirstamp) actions/ctl/libmodsecurity_la-rule_remove_by_id.lo: \ actions/ctl/$(am__dirstamp) \ actions/ctl/$(DEPDIR)/$(am__dirstamp) actions/ctl/libmodsecurity_la-rule_remove_by_tag.lo: \ actions/ctl/$(am__dirstamp) \ actions/ctl/$(DEPDIR)/$(am__dirstamp) actions/ctl/libmodsecurity_la-request_body_access.lo: \ actions/ctl/$(am__dirstamp) \ actions/ctl/$(DEPDIR)/$(am__dirstamp) actions/disruptive/$(am__dirstamp): @$(MKDIR_P) actions/disruptive @: > actions/disruptive/$(am__dirstamp) actions/disruptive/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) actions/disruptive/$(DEPDIR) @: > actions/disruptive/$(DEPDIR)/$(am__dirstamp) actions/disruptive/libmodsecurity_la-allow.lo: \ actions/disruptive/$(am__dirstamp) \ actions/disruptive/$(DEPDIR)/$(am__dirstamp) actions/disruptive/libmodsecurity_la-deny.lo: \ actions/disruptive/$(am__dirstamp) \ actions/disruptive/$(DEPDIR)/$(am__dirstamp) actions/disruptive/libmodsecurity_la-drop.lo: \ actions/disruptive/$(am__dirstamp) \ actions/disruptive/$(DEPDIR)/$(am__dirstamp) actions/disruptive/libmodsecurity_la-redirect.lo: \ actions/disruptive/$(am__dirstamp) \ actions/disruptive/$(DEPDIR)/$(am__dirstamp) actions/disruptive/libmodsecurity_la-pass.lo: \ actions/disruptive/$(am__dirstamp) \ actions/disruptive/$(DEPDIR)/$(am__dirstamp) actions/libmodsecurity_la-exec.lo: actions/$(am__dirstamp) \ actions/$(DEPDIR)/$(am__dirstamp) actions/libmodsecurity_la-init_col.lo: actions/$(am__dirstamp) \ actions/$(DEPDIR)/$(am__dirstamp) actions/libmodsecurity_la-log.lo: actions/$(am__dirstamp) \ actions/$(DEPDIR)/$(am__dirstamp) actions/libmodsecurity_la-log_data.lo: actions/$(am__dirstamp) \ actions/$(DEPDIR)/$(am__dirstamp) actions/libmodsecurity_la-maturity.lo: actions/$(am__dirstamp) \ actions/$(DEPDIR)/$(am__dirstamp) actions/libmodsecurity_la-msg.lo: actions/$(am__dirstamp) \ actions/$(DEPDIR)/$(am__dirstamp) actions/libmodsecurity_la-multi_match.lo: actions/$(am__dirstamp) \ actions/$(DEPDIR)/$(am__dirstamp) actions/libmodsecurity_la-no_audit_log.lo: actions/$(am__dirstamp) \ actions/$(DEPDIR)/$(am__dirstamp) actions/libmodsecurity_la-no_log.lo: actions/$(am__dirstamp) \ actions/$(DEPDIR)/$(am__dirstamp) actions/libmodsecurity_la-phase.lo: actions/$(am__dirstamp) \ actions/$(DEPDIR)/$(am__dirstamp) actions/libmodsecurity_la-rev.lo: actions/$(am__dirstamp) \ actions/$(DEPDIR)/$(am__dirstamp) actions/libmodsecurity_la-rule_id.lo: actions/$(am__dirstamp) \ actions/$(DEPDIR)/$(am__dirstamp) actions/libmodsecurity_la-severity.lo: actions/$(am__dirstamp) \ actions/$(DEPDIR)/$(am__dirstamp) actions/libmodsecurity_la-set_env.lo: actions/$(am__dirstamp) \ actions/$(DEPDIR)/$(am__dirstamp) actions/libmodsecurity_la-set_rsc.lo: actions/$(am__dirstamp) \ actions/$(DEPDIR)/$(am__dirstamp) actions/libmodsecurity_la-set_sid.lo: actions/$(am__dirstamp) \ actions/$(DEPDIR)/$(am__dirstamp) actions/libmodsecurity_la-set_uid.lo: actions/$(am__dirstamp) \ actions/$(DEPDIR)/$(am__dirstamp) actions/libmodsecurity_la-set_var.lo: actions/$(am__dirstamp) \ actions/$(DEPDIR)/$(am__dirstamp) actions/data/$(am__dirstamp): @$(MKDIR_P) actions/data @: > actions/data/$(am__dirstamp) actions/data/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) actions/data/$(DEPDIR) @: > actions/data/$(DEPDIR)/$(am__dirstamp) actions/data/libmodsecurity_la-status.lo: \ actions/data/$(am__dirstamp) \ actions/data/$(DEPDIR)/$(am__dirstamp) actions/libmodsecurity_la-skip.lo: actions/$(am__dirstamp) \ actions/$(DEPDIR)/$(am__dirstamp) actions/libmodsecurity_la-skip_after.lo: actions/$(am__dirstamp) \ actions/$(DEPDIR)/$(am__dirstamp) actions/libmodsecurity_la-tag.lo: actions/$(am__dirstamp) \ actions/$(DEPDIR)/$(am__dirstamp) actions/transformations/$(am__dirstamp): @$(MKDIR_P) actions/transformations @: > actions/transformations/$(am__dirstamp) actions/transformations/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) actions/transformations/$(DEPDIR) @: > actions/transformations/$(DEPDIR)/$(am__dirstamp) actions/transformations/libmodsecurity_la-base64_decode.lo: \ actions/transformations/$(am__dirstamp) \ actions/transformations/$(DEPDIR)/$(am__dirstamp) actions/transformations/libmodsecurity_la-base64_encode.lo: \ actions/transformations/$(am__dirstamp) \ actions/transformations/$(DEPDIR)/$(am__dirstamp) actions/transformations/libmodsecurity_la-base64_decode_ext.lo: \ actions/transformations/$(am__dirstamp) \ actions/transformations/$(DEPDIR)/$(am__dirstamp) actions/transformations/libmodsecurity_la-cmd_line.lo: \ actions/transformations/$(am__dirstamp) \ actions/transformations/$(DEPDIR)/$(am__dirstamp) actions/transformations/libmodsecurity_la-compress_whitespace.lo: \ actions/transformations/$(am__dirstamp) \ actions/transformations/$(DEPDIR)/$(am__dirstamp) actions/transformations/libmodsecurity_la-css_decode.lo: \ actions/transformations/$(am__dirstamp) \ actions/transformations/$(DEPDIR)/$(am__dirstamp) actions/transformations/libmodsecurity_la-escape_seq_decode.lo: \ actions/transformations/$(am__dirstamp) \ actions/transformations/$(DEPDIR)/$(am__dirstamp) actions/transformations/libmodsecurity_la-hex_decode.lo: \ actions/transformations/$(am__dirstamp) \ actions/transformations/$(DEPDIR)/$(am__dirstamp) actions/transformations/libmodsecurity_la-hex_encode.lo: \ actions/transformations/$(am__dirstamp) \ actions/transformations/$(DEPDIR)/$(am__dirstamp) actions/transformations/libmodsecurity_la-html_entity_decode.lo: \ actions/transformations/$(am__dirstamp) \ actions/transformations/$(DEPDIR)/$(am__dirstamp) actions/transformations/libmodsecurity_la-js_decode.lo: \ actions/transformations/$(am__dirstamp) \ actions/transformations/$(DEPDIR)/$(am__dirstamp) actions/transformations/libmodsecurity_la-length.lo: \ actions/transformations/$(am__dirstamp) \ actions/transformations/$(DEPDIR)/$(am__dirstamp) actions/transformations/libmodsecurity_la-lower_case.lo: \ actions/transformations/$(am__dirstamp) \ actions/transformations/$(DEPDIR)/$(am__dirstamp) actions/transformations/libmodsecurity_la-md5.lo: \ actions/transformations/$(am__dirstamp) \ actions/transformations/$(DEPDIR)/$(am__dirstamp) actions/transformations/libmodsecurity_la-none.lo: \ actions/transformations/$(am__dirstamp) \ actions/transformations/$(DEPDIR)/$(am__dirstamp) actions/transformations/libmodsecurity_la-normalise_path.lo: \ actions/transformations/$(am__dirstamp) \ actions/transformations/$(DEPDIR)/$(am__dirstamp) actions/transformations/libmodsecurity_la-normalise_path_win.lo: \ actions/transformations/$(am__dirstamp) \ actions/transformations/$(DEPDIR)/$(am__dirstamp) actions/transformations/libmodsecurity_la-parity_even_7bit.lo: \ actions/transformations/$(am__dirstamp) \ actions/transformations/$(DEPDIR)/$(am__dirstamp) actions/transformations/libmodsecurity_la-parity_odd_7bit.lo: \ actions/transformations/$(am__dirstamp) \ actions/transformations/$(DEPDIR)/$(am__dirstamp) actions/transformations/libmodsecurity_la-parity_zero_7bit.lo: \ actions/transformations/$(am__dirstamp) \ actions/transformations/$(DEPDIR)/$(am__dirstamp) actions/transformations/libmodsecurity_la-remove_comments.lo: \ actions/transformations/$(am__dirstamp) \ actions/transformations/$(DEPDIR)/$(am__dirstamp) actions/transformations/libmodsecurity_la-remove_comments_char.lo: \ actions/transformations/$(am__dirstamp) \ actions/transformations/$(DEPDIR)/$(am__dirstamp) actions/transformations/libmodsecurity_la-remove_nulls.lo: \ actions/transformations/$(am__dirstamp) \ actions/transformations/$(DEPDIR)/$(am__dirstamp) actions/transformations/libmodsecurity_la-remove_whitespace.lo: \ actions/transformations/$(am__dirstamp) \ actions/transformations/$(DEPDIR)/$(am__dirstamp) actions/transformations/libmodsecurity_la-replace_comments.lo: \ actions/transformations/$(am__dirstamp) \ actions/transformations/$(DEPDIR)/$(am__dirstamp) actions/transformations/libmodsecurity_la-replace_nulls.lo: \ actions/transformations/$(am__dirstamp) \ actions/transformations/$(DEPDIR)/$(am__dirstamp) actions/transformations/libmodsecurity_la-sha1.lo: \ actions/transformations/$(am__dirstamp) \ actions/transformations/$(DEPDIR)/$(am__dirstamp) actions/transformations/libmodsecurity_la-sql_hex_decode.lo: \ actions/transformations/$(am__dirstamp) \ actions/transformations/$(DEPDIR)/$(am__dirstamp) actions/transformations/libmodsecurity_la-transformation.lo: \ actions/transformations/$(am__dirstamp) \ actions/transformations/$(DEPDIR)/$(am__dirstamp) actions/transformations/libmodsecurity_la-trim.lo: \ actions/transformations/$(am__dirstamp) \ actions/transformations/$(DEPDIR)/$(am__dirstamp) actions/transformations/libmodsecurity_la-trim_left.lo: \ actions/transformations/$(am__dirstamp) \ actions/transformations/$(DEPDIR)/$(am__dirstamp) actions/transformations/libmodsecurity_la-trim_right.lo: \ actions/transformations/$(am__dirstamp) \ actions/transformations/$(DEPDIR)/$(am__dirstamp) actions/transformations/libmodsecurity_la-upper_case.lo: \ actions/transformations/$(am__dirstamp) \ actions/transformations/$(DEPDIR)/$(am__dirstamp) actions/transformations/libmodsecurity_la-url_decode.lo: \ actions/transformations/$(am__dirstamp) \ actions/transformations/$(DEPDIR)/$(am__dirstamp) actions/transformations/libmodsecurity_la-url_decode_uni.lo: \ actions/transformations/$(am__dirstamp) \ actions/transformations/$(DEPDIR)/$(am__dirstamp) actions/transformations/libmodsecurity_la-url_encode.lo: \ actions/transformations/$(am__dirstamp) \ actions/transformations/$(DEPDIR)/$(am__dirstamp) actions/transformations/libmodsecurity_la-utf8_to_unicode.lo: \ actions/transformations/$(am__dirstamp) \ actions/transformations/$(DEPDIR)/$(am__dirstamp) actions/libmodsecurity_la-ver.lo: actions/$(am__dirstamp) \ actions/$(DEPDIR)/$(am__dirstamp) actions/libmodsecurity_la-xmlns.lo: actions/$(am__dirstamp) \ actions/$(DEPDIR)/$(am__dirstamp) engine/$(am__dirstamp): @$(MKDIR_P) engine @: > engine/$(am__dirstamp) engine/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) engine/$(DEPDIR) @: > engine/$(DEPDIR)/$(am__dirstamp) engine/libmodsecurity_la-lua.lo: engine/$(am__dirstamp) \ engine/$(DEPDIR)/$(am__dirstamp) collection/$(am__dirstamp): @$(MKDIR_P) collection @: > collection/$(am__dirstamp) collection/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) collection/$(DEPDIR) @: > collection/$(DEPDIR)/$(am__dirstamp) collection/libmodsecurity_la-collections.lo: \ collection/$(am__dirstamp) \ collection/$(DEPDIR)/$(am__dirstamp) collection/backend/$(am__dirstamp): @$(MKDIR_P) collection/backend @: > collection/backend/$(am__dirstamp) collection/backend/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) collection/backend/$(DEPDIR) @: > collection/backend/$(DEPDIR)/$(am__dirstamp) collection/backend/libmodsecurity_la-in_memory-per_process.lo: \ collection/backend/$(am__dirstamp) \ collection/backend/$(DEPDIR)/$(am__dirstamp) collection/backend/libmodsecurity_la-lmdb.lo: \ collection/backend/$(am__dirstamp) \ collection/backend/$(DEPDIR)/$(am__dirstamp) operators/$(am__dirstamp): @$(MKDIR_P) operators @: > operators/$(am__dirstamp) operators/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) operators/$(DEPDIR) @: > operators/$(DEPDIR)/$(am__dirstamp) operators/libmodsecurity_la-begins_with.lo: operators/$(am__dirstamp) \ operators/$(DEPDIR)/$(am__dirstamp) operators/libmodsecurity_la-contains.lo: operators/$(am__dirstamp) \ operators/$(DEPDIR)/$(am__dirstamp) operators/libmodsecurity_la-contains_word.lo: \ operators/$(am__dirstamp) operators/$(DEPDIR)/$(am__dirstamp) operators/libmodsecurity_la-detect_sqli.lo: operators/$(am__dirstamp) \ operators/$(DEPDIR)/$(am__dirstamp) operators/libmodsecurity_la-detect_xss.lo: operators/$(am__dirstamp) \ operators/$(DEPDIR)/$(am__dirstamp) operators/libmodsecurity_la-ends_with.lo: operators/$(am__dirstamp) \ operators/$(DEPDIR)/$(am__dirstamp) operators/libmodsecurity_la-eq.lo: operators/$(am__dirstamp) \ operators/$(DEPDIR)/$(am__dirstamp) operators/libmodsecurity_la-fuzzy_hash.lo: operators/$(am__dirstamp) \ operators/$(DEPDIR)/$(am__dirstamp) operators/libmodsecurity_la-ge.lo: operators/$(am__dirstamp) \ operators/$(DEPDIR)/$(am__dirstamp) operators/libmodsecurity_la-geo_lookup.lo: operators/$(am__dirstamp) \ operators/$(DEPDIR)/$(am__dirstamp) operators/libmodsecurity_la-gsblookup.lo: operators/$(am__dirstamp) \ operators/$(DEPDIR)/$(am__dirstamp) operators/libmodsecurity_la-gt.lo: operators/$(am__dirstamp) \ operators/$(DEPDIR)/$(am__dirstamp) operators/libmodsecurity_la-inspect_file.lo: \ operators/$(am__dirstamp) operators/$(DEPDIR)/$(am__dirstamp) operators/libmodsecurity_la-ip_match.lo: operators/$(am__dirstamp) \ operators/$(DEPDIR)/$(am__dirstamp) operators/libmodsecurity_la-ip_match_f.lo: operators/$(am__dirstamp) \ operators/$(DEPDIR)/$(am__dirstamp) operators/libmodsecurity_la-ip_match_from_file.lo: \ operators/$(am__dirstamp) operators/$(DEPDIR)/$(am__dirstamp) operators/libmodsecurity_la-le.lo: operators/$(am__dirstamp) \ operators/$(DEPDIR)/$(am__dirstamp) operators/libmodsecurity_la-lt.lo: operators/$(am__dirstamp) \ operators/$(DEPDIR)/$(am__dirstamp) operators/libmodsecurity_la-no_match.lo: operators/$(am__dirstamp) \ operators/$(DEPDIR)/$(am__dirstamp) operators/libmodsecurity_la-operator.lo: operators/$(am__dirstamp) \ operators/$(DEPDIR)/$(am__dirstamp) operators/libmodsecurity_la-pm.lo: operators/$(am__dirstamp) \ operators/$(DEPDIR)/$(am__dirstamp) operators/libmodsecurity_la-pm_f.lo: operators/$(am__dirstamp) \ operators/$(DEPDIR)/$(am__dirstamp) operators/libmodsecurity_la-pm_from_file.lo: \ operators/$(am__dirstamp) operators/$(DEPDIR)/$(am__dirstamp) operators/libmodsecurity_la-rbl.lo: operators/$(am__dirstamp) \ operators/$(DEPDIR)/$(am__dirstamp) operators/libmodsecurity_la-rsub.lo: operators/$(am__dirstamp) \ operators/$(DEPDIR)/$(am__dirstamp) operators/libmodsecurity_la-rx.lo: operators/$(am__dirstamp) \ operators/$(DEPDIR)/$(am__dirstamp) operators/libmodsecurity_la-rx_global.lo: operators/$(am__dirstamp) \ operators/$(DEPDIR)/$(am__dirstamp) operators/libmodsecurity_la-str_eq.lo: operators/$(am__dirstamp) \ operators/$(DEPDIR)/$(am__dirstamp) operators/libmodsecurity_la-str_match.lo: operators/$(am__dirstamp) \ operators/$(DEPDIR)/$(am__dirstamp) operators/libmodsecurity_la-validate_byte_range.lo: \ operators/$(am__dirstamp) operators/$(DEPDIR)/$(am__dirstamp) operators/libmodsecurity_la-validate_dtd.lo: \ operators/$(am__dirstamp) operators/$(DEPDIR)/$(am__dirstamp) operators/libmodsecurity_la-validate_hash.lo: \ operators/$(am__dirstamp) operators/$(DEPDIR)/$(am__dirstamp) operators/libmodsecurity_la-validate_schema.lo: \ operators/$(am__dirstamp) operators/$(DEPDIR)/$(am__dirstamp) operators/libmodsecurity_la-validate_url_encoding.lo: \ operators/$(am__dirstamp) operators/$(DEPDIR)/$(am__dirstamp) operators/libmodsecurity_la-validate_utf8_encoding.lo: \ operators/$(am__dirstamp) operators/$(DEPDIR)/$(am__dirstamp) operators/libmodsecurity_la-verify_cc.lo: operators/$(am__dirstamp) \ operators/$(DEPDIR)/$(am__dirstamp) operators/libmodsecurity_la-verify_cpf.lo: operators/$(am__dirstamp) \ operators/$(DEPDIR)/$(am__dirstamp) operators/libmodsecurity_la-verify_ssn.lo: operators/$(am__dirstamp) \ operators/$(DEPDIR)/$(am__dirstamp) operators/libmodsecurity_la-verify_svnr.lo: operators/$(am__dirstamp) \ operators/$(DEPDIR)/$(am__dirstamp) operators/libmodsecurity_la-within.lo: operators/$(am__dirstamp) \ operators/$(DEPDIR)/$(am__dirstamp) operators/libmodsecurity_la-unconditional_match.lo: \ operators/$(am__dirstamp) operators/$(DEPDIR)/$(am__dirstamp) utils/$(am__dirstamp): @$(MKDIR_P) utils @: > utils/$(am__dirstamp) utils/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) utils/$(DEPDIR) @: > utils/$(DEPDIR)/$(am__dirstamp) utils/libmodsecurity_la-acmp.lo: utils/$(am__dirstamp) \ utils/$(DEPDIR)/$(am__dirstamp) utils/libmodsecurity_la-base64.lo: utils/$(am__dirstamp) \ utils/$(DEPDIR)/$(am__dirstamp) utils/libmodsecurity_la-decode.lo: utils/$(am__dirstamp) \ utils/$(DEPDIR)/$(am__dirstamp) utils/libmodsecurity_la-geo_lookup.lo: utils/$(am__dirstamp) \ utils/$(DEPDIR)/$(am__dirstamp) utils/libmodsecurity_la-https_client.lo: utils/$(am__dirstamp) \ utils/$(DEPDIR)/$(am__dirstamp) utils/libmodsecurity_la-ip_tree.lo: utils/$(am__dirstamp) \ utils/$(DEPDIR)/$(am__dirstamp) utils/libmodsecurity_la-md5.lo: utils/$(am__dirstamp) \ utils/$(DEPDIR)/$(am__dirstamp) utils/libmodsecurity_la-msc_tree.lo: utils/$(am__dirstamp) \ utils/$(DEPDIR)/$(am__dirstamp) utils/libmodsecurity_la-random.lo: utils/$(am__dirstamp) \ utils/$(DEPDIR)/$(am__dirstamp) utils/libmodsecurity_la-regex.lo: utils/$(am__dirstamp) \ utils/$(DEPDIR)/$(am__dirstamp) utils/libmodsecurity_la-sha1.lo: utils/$(am__dirstamp) \ utils/$(DEPDIR)/$(am__dirstamp) utils/libmodsecurity_la-string.lo: utils/$(am__dirstamp) \ utils/$(DEPDIR)/$(am__dirstamp) utils/libmodsecurity_la-system.lo: utils/$(am__dirstamp) \ utils/$(DEPDIR)/$(am__dirstamp) utils/libmodsecurity_la-shared_files.lo: utils/$(am__dirstamp) \ utils/$(DEPDIR)/$(am__dirstamp) variables/$(am__dirstamp): @$(MKDIR_P) variables @: > variables/$(am__dirstamp) variables/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) variables/$(DEPDIR) @: > variables/$(DEPDIR)/$(am__dirstamp) variables/libmodsecurity_la-duration.lo: variables/$(am__dirstamp) \ variables/$(DEPDIR)/$(am__dirstamp) variables/libmodsecurity_la-env.lo: variables/$(am__dirstamp) \ variables/$(DEPDIR)/$(am__dirstamp) variables/libmodsecurity_la-highest_severity.lo: \ variables/$(am__dirstamp) variables/$(DEPDIR)/$(am__dirstamp) variables/libmodsecurity_la-modsec_build.lo: \ variables/$(am__dirstamp) variables/$(DEPDIR)/$(am__dirstamp) variables/libmodsecurity_la-remote_user.lo: variables/$(am__dirstamp) \ variables/$(DEPDIR)/$(am__dirstamp) variables/libmodsecurity_la-rule.lo: variables/$(am__dirstamp) \ variables/$(DEPDIR)/$(am__dirstamp) variables/libmodsecurity_la-time.lo: variables/$(am__dirstamp) \ variables/$(DEPDIR)/$(am__dirstamp) variables/libmodsecurity_la-time_day.lo: variables/$(am__dirstamp) \ variables/$(DEPDIR)/$(am__dirstamp) variables/libmodsecurity_la-time_epoch.lo: variables/$(am__dirstamp) \ variables/$(DEPDIR)/$(am__dirstamp) variables/libmodsecurity_la-time_hour.lo: variables/$(am__dirstamp) \ variables/$(DEPDIR)/$(am__dirstamp) variables/libmodsecurity_la-time_min.lo: variables/$(am__dirstamp) \ variables/$(DEPDIR)/$(am__dirstamp) variables/libmodsecurity_la-time_mon.lo: variables/$(am__dirstamp) \ variables/$(DEPDIR)/$(am__dirstamp) variables/libmodsecurity_la-time_sec.lo: variables/$(am__dirstamp) \ variables/$(DEPDIR)/$(am__dirstamp) variables/libmodsecurity_la-time_wday.lo: variables/$(am__dirstamp) \ variables/$(DEPDIR)/$(am__dirstamp) variables/libmodsecurity_la-time_year.lo: variables/$(am__dirstamp) \ variables/$(DEPDIR)/$(am__dirstamp) variables/libmodsecurity_la-tx.lo: variables/$(am__dirstamp) \ variables/$(DEPDIR)/$(am__dirstamp) variables/libmodsecurity_la-variable.lo: variables/$(am__dirstamp) \ variables/$(DEPDIR)/$(am__dirstamp) variables/libmodsecurity_la-xml.lo: variables/$(am__dirstamp) \ variables/$(DEPDIR)/$(am__dirstamp) libmodsecurity.la: $(libmodsecurity_la_OBJECTS) $(libmodsecurity_la_DEPENDENCIES) $(EXTRA_libmodsecurity_la_DEPENDENCIES) $(AM_V_CXXLD)$(libmodsecurity_la_LINK) -rpath $(libdir) $(libmodsecurity_la_OBJECTS) $(libmodsecurity_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) -rm -f actions/*.$(OBJEXT) -rm -f actions/*.lo -rm -f actions/ctl/*.$(OBJEXT) -rm -f actions/ctl/*.lo -rm -f actions/data/*.$(OBJEXT) -rm -f actions/data/*.lo -rm -f actions/disruptive/*.$(OBJEXT) -rm -f actions/disruptive/*.lo -rm -f actions/transformations/*.$(OBJEXT) -rm -f actions/transformations/*.lo -rm -f audit_log/*.$(OBJEXT) -rm -f audit_log/*.lo -rm -f audit_log/writer/*.$(OBJEXT) -rm -f audit_log/writer/*.lo -rm -f collection/*.$(OBJEXT) -rm -f collection/*.lo -rm -f collection/backend/*.$(OBJEXT) -rm -f collection/backend/*.lo -rm -f debug_log/*.$(OBJEXT) -rm -f debug_log/*.lo -rm -f engine/*.$(OBJEXT) -rm -f engine/*.lo -rm -f operators/*.$(OBJEXT) -rm -f operators/*.lo -rm -f parser/*.$(OBJEXT) -rm -f parser/*.lo -rm -f request_body_processor/*.$(OBJEXT) -rm -f request_body_processor/*.lo -rm -f utils/*.$(OBJEXT) -rm -f utils/*.lo -rm -f variables/*.$(OBJEXT) -rm -f variables/*.lo distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmodsecurity_la-anchored_set_variable.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmodsecurity_la-anchored_variable.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmodsecurity_la-modsecurity.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmodsecurity_la-rule.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmodsecurity_la-rule_message.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmodsecurity_la-rule_script.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmodsecurity_la-rule_unconditional.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmodsecurity_la-rule_with_actions.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmodsecurity_la-rule_with_operator.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmodsecurity_la-rules_exceptions.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmodsecurity_la-rules_set.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmodsecurity_la-rules_set_phases.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmodsecurity_la-rules_set_properties.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmodsecurity_la-run_time_string.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmodsecurity_la-transaction.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmodsecurity_la-unique_id.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@actions/$(DEPDIR)/libmodsecurity_la-accuracy.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@actions/$(DEPDIR)/libmodsecurity_la-action.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@actions/$(DEPDIR)/libmodsecurity_la-audit_log.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@actions/$(DEPDIR)/libmodsecurity_la-block.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@actions/$(DEPDIR)/libmodsecurity_la-capture.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@actions/$(DEPDIR)/libmodsecurity_la-chain.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@actions/$(DEPDIR)/libmodsecurity_la-exec.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@actions/$(DEPDIR)/libmodsecurity_la-init_col.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@actions/$(DEPDIR)/libmodsecurity_la-log.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@actions/$(DEPDIR)/libmodsecurity_la-log_data.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@actions/$(DEPDIR)/libmodsecurity_la-maturity.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@actions/$(DEPDIR)/libmodsecurity_la-msg.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@actions/$(DEPDIR)/libmodsecurity_la-multi_match.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@actions/$(DEPDIR)/libmodsecurity_la-no_audit_log.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@actions/$(DEPDIR)/libmodsecurity_la-no_log.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@actions/$(DEPDIR)/libmodsecurity_la-phase.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@actions/$(DEPDIR)/libmodsecurity_la-rev.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@actions/$(DEPDIR)/libmodsecurity_la-rule_id.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@actions/$(DEPDIR)/libmodsecurity_la-set_env.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@actions/$(DEPDIR)/libmodsecurity_la-set_rsc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@actions/$(DEPDIR)/libmodsecurity_la-set_sid.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@actions/$(DEPDIR)/libmodsecurity_la-set_uid.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@actions/$(DEPDIR)/libmodsecurity_la-set_var.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@actions/$(DEPDIR)/libmodsecurity_la-severity.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@actions/$(DEPDIR)/libmodsecurity_la-skip.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@actions/$(DEPDIR)/libmodsecurity_la-skip_after.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@actions/$(DEPDIR)/libmodsecurity_la-tag.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@actions/$(DEPDIR)/libmodsecurity_la-ver.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@actions/$(DEPDIR)/libmodsecurity_la-xmlns.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@actions/ctl/$(DEPDIR)/libmodsecurity_la-audit_log_parts.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@actions/ctl/$(DEPDIR)/libmodsecurity_la-request_body_access.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@actions/ctl/$(DEPDIR)/libmodsecurity_la-request_body_processor_json.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@actions/ctl/$(DEPDIR)/libmodsecurity_la-request_body_processor_urlencoded.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@actions/ctl/$(DEPDIR)/libmodsecurity_la-request_body_processor_xml.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@actions/ctl/$(DEPDIR)/libmodsecurity_la-rule_engine.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@actions/ctl/$(DEPDIR)/libmodsecurity_la-rule_remove_by_id.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@actions/ctl/$(DEPDIR)/libmodsecurity_la-rule_remove_by_tag.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@actions/ctl/$(DEPDIR)/libmodsecurity_la-rule_remove_target_by_id.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@actions/ctl/$(DEPDIR)/libmodsecurity_la-rule_remove_target_by_tag.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@actions/data/$(DEPDIR)/libmodsecurity_la-status.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@actions/disruptive/$(DEPDIR)/libmodsecurity_la-allow.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@actions/disruptive/$(DEPDIR)/libmodsecurity_la-deny.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@actions/disruptive/$(DEPDIR)/libmodsecurity_la-drop.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@actions/disruptive/$(DEPDIR)/libmodsecurity_la-pass.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@actions/disruptive/$(DEPDIR)/libmodsecurity_la-redirect.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@actions/transformations/$(DEPDIR)/libmodsecurity_la-base64_decode.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@actions/transformations/$(DEPDIR)/libmodsecurity_la-base64_decode_ext.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@actions/transformations/$(DEPDIR)/libmodsecurity_la-base64_encode.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@actions/transformations/$(DEPDIR)/libmodsecurity_la-cmd_line.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@actions/transformations/$(DEPDIR)/libmodsecurity_la-compress_whitespace.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@actions/transformations/$(DEPDIR)/libmodsecurity_la-css_decode.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@actions/transformations/$(DEPDIR)/libmodsecurity_la-escape_seq_decode.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@actions/transformations/$(DEPDIR)/libmodsecurity_la-hex_decode.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@actions/transformations/$(DEPDIR)/libmodsecurity_la-hex_encode.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@actions/transformations/$(DEPDIR)/libmodsecurity_la-html_entity_decode.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@actions/transformations/$(DEPDIR)/libmodsecurity_la-js_decode.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@actions/transformations/$(DEPDIR)/libmodsecurity_la-length.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@actions/transformations/$(DEPDIR)/libmodsecurity_la-lower_case.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@actions/transformations/$(DEPDIR)/libmodsecurity_la-md5.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@actions/transformations/$(DEPDIR)/libmodsecurity_la-none.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@actions/transformations/$(DEPDIR)/libmodsecurity_la-normalise_path.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@actions/transformations/$(DEPDIR)/libmodsecurity_la-normalise_path_win.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@actions/transformations/$(DEPDIR)/libmodsecurity_la-parity_even_7bit.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@actions/transformations/$(DEPDIR)/libmodsecurity_la-parity_odd_7bit.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@actions/transformations/$(DEPDIR)/libmodsecurity_la-parity_zero_7bit.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@actions/transformations/$(DEPDIR)/libmodsecurity_la-remove_comments.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@actions/transformations/$(DEPDIR)/libmodsecurity_la-remove_comments_char.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@actions/transformations/$(DEPDIR)/libmodsecurity_la-remove_nulls.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@actions/transformations/$(DEPDIR)/libmodsecurity_la-remove_whitespace.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@actions/transformations/$(DEPDIR)/libmodsecurity_la-replace_comments.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@actions/transformations/$(DEPDIR)/libmodsecurity_la-replace_nulls.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@actions/transformations/$(DEPDIR)/libmodsecurity_la-sha1.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@actions/transformations/$(DEPDIR)/libmodsecurity_la-sql_hex_decode.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@actions/transformations/$(DEPDIR)/libmodsecurity_la-transformation.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@actions/transformations/$(DEPDIR)/libmodsecurity_la-trim.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@actions/transformations/$(DEPDIR)/libmodsecurity_la-trim_left.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@actions/transformations/$(DEPDIR)/libmodsecurity_la-trim_right.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@actions/transformations/$(DEPDIR)/libmodsecurity_la-upper_case.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@actions/transformations/$(DEPDIR)/libmodsecurity_la-url_decode.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@actions/transformations/$(DEPDIR)/libmodsecurity_la-url_decode_uni.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@actions/transformations/$(DEPDIR)/libmodsecurity_la-url_encode.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@actions/transformations/$(DEPDIR)/libmodsecurity_la-utf8_to_unicode.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@audit_log/$(DEPDIR)/libmodsecurity_la-audit_log.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@audit_log/writer/$(DEPDIR)/libmodsecurity_la-https.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@audit_log/writer/$(DEPDIR)/libmodsecurity_la-parallel.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@audit_log/writer/$(DEPDIR)/libmodsecurity_la-serial.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@audit_log/writer/$(DEPDIR)/libmodsecurity_la-writer.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@collection/$(DEPDIR)/libmodsecurity_la-collections.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@collection/backend/$(DEPDIR)/libmodsecurity_la-in_memory-per_process.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@collection/backend/$(DEPDIR)/libmodsecurity_la-lmdb.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@debug_log/$(DEPDIR)/libmodsecurity_la-debug_log.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@debug_log/$(DEPDIR)/libmodsecurity_la-debug_log_writer.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@engine/$(DEPDIR)/libmodsecurity_la-lua.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@operators/$(DEPDIR)/libmodsecurity_la-begins_with.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@operators/$(DEPDIR)/libmodsecurity_la-contains.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@operators/$(DEPDIR)/libmodsecurity_la-contains_word.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@operators/$(DEPDIR)/libmodsecurity_la-detect_sqli.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@operators/$(DEPDIR)/libmodsecurity_la-detect_xss.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@operators/$(DEPDIR)/libmodsecurity_la-ends_with.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@operators/$(DEPDIR)/libmodsecurity_la-eq.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@operators/$(DEPDIR)/libmodsecurity_la-fuzzy_hash.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@operators/$(DEPDIR)/libmodsecurity_la-ge.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@operators/$(DEPDIR)/libmodsecurity_la-geo_lookup.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@operators/$(DEPDIR)/libmodsecurity_la-gsblookup.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@operators/$(DEPDIR)/libmodsecurity_la-gt.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@operators/$(DEPDIR)/libmodsecurity_la-inspect_file.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@operators/$(DEPDIR)/libmodsecurity_la-ip_match.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@operators/$(DEPDIR)/libmodsecurity_la-ip_match_f.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@operators/$(DEPDIR)/libmodsecurity_la-ip_match_from_file.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@operators/$(DEPDIR)/libmodsecurity_la-le.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@operators/$(DEPDIR)/libmodsecurity_la-lt.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@operators/$(DEPDIR)/libmodsecurity_la-no_match.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@operators/$(DEPDIR)/libmodsecurity_la-operator.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@operators/$(DEPDIR)/libmodsecurity_la-pm.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@operators/$(DEPDIR)/libmodsecurity_la-pm_f.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@operators/$(DEPDIR)/libmodsecurity_la-pm_from_file.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@operators/$(DEPDIR)/libmodsecurity_la-rbl.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@operators/$(DEPDIR)/libmodsecurity_la-rsub.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@operators/$(DEPDIR)/libmodsecurity_la-rx.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@operators/$(DEPDIR)/libmodsecurity_la-rx_global.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@operators/$(DEPDIR)/libmodsecurity_la-str_eq.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@operators/$(DEPDIR)/libmodsecurity_la-str_match.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@operators/$(DEPDIR)/libmodsecurity_la-unconditional_match.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@operators/$(DEPDIR)/libmodsecurity_la-validate_byte_range.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@operators/$(DEPDIR)/libmodsecurity_la-validate_dtd.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@operators/$(DEPDIR)/libmodsecurity_la-validate_hash.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@operators/$(DEPDIR)/libmodsecurity_la-validate_schema.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@operators/$(DEPDIR)/libmodsecurity_la-validate_url_encoding.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@operators/$(DEPDIR)/libmodsecurity_la-validate_utf8_encoding.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@operators/$(DEPDIR)/libmodsecurity_la-verify_cc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@operators/$(DEPDIR)/libmodsecurity_la-verify_cpf.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@operators/$(DEPDIR)/libmodsecurity_la-verify_ssn.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@operators/$(DEPDIR)/libmodsecurity_la-verify_svnr.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@operators/$(DEPDIR)/libmodsecurity_la-within.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@parser/$(DEPDIR)/libmodsecurity_la-driver.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@parser/$(DEPDIR)/libmodsecurity_la-seclang-parser.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@parser/$(DEPDIR)/libmodsecurity_la-seclang-scanner.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@request_body_processor/$(DEPDIR)/libmodsecurity_la-json.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@request_body_processor/$(DEPDIR)/libmodsecurity_la-multipart.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@request_body_processor/$(DEPDIR)/libmodsecurity_la-xml.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@utils/$(DEPDIR)/libmodsecurity_la-acmp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@utils/$(DEPDIR)/libmodsecurity_la-base64.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@utils/$(DEPDIR)/libmodsecurity_la-decode.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@utils/$(DEPDIR)/libmodsecurity_la-geo_lookup.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@utils/$(DEPDIR)/libmodsecurity_la-https_client.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@utils/$(DEPDIR)/libmodsecurity_la-ip_tree.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@utils/$(DEPDIR)/libmodsecurity_la-md5.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@utils/$(DEPDIR)/libmodsecurity_la-msc_tree.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@utils/$(DEPDIR)/libmodsecurity_la-random.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@utils/$(DEPDIR)/libmodsecurity_la-regex.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@utils/$(DEPDIR)/libmodsecurity_la-sha1.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@utils/$(DEPDIR)/libmodsecurity_la-shared_files.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@utils/$(DEPDIR)/libmodsecurity_la-string.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@utils/$(DEPDIR)/libmodsecurity_la-system.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@variables/$(DEPDIR)/libmodsecurity_la-duration.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@variables/$(DEPDIR)/libmodsecurity_la-env.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@variables/$(DEPDIR)/libmodsecurity_la-highest_severity.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@variables/$(DEPDIR)/libmodsecurity_la-modsec_build.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@variables/$(DEPDIR)/libmodsecurity_la-remote_user.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@variables/$(DEPDIR)/libmodsecurity_la-rule.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@variables/$(DEPDIR)/libmodsecurity_la-time.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@variables/$(DEPDIR)/libmodsecurity_la-time_day.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@variables/$(DEPDIR)/libmodsecurity_la-time_epoch.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@variables/$(DEPDIR)/libmodsecurity_la-time_hour.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@variables/$(DEPDIR)/libmodsecurity_la-time_min.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@variables/$(DEPDIR)/libmodsecurity_la-time_mon.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@variables/$(DEPDIR)/libmodsecurity_la-time_sec.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@variables/$(DEPDIR)/libmodsecurity_la-time_wday.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@variables/$(DEPDIR)/libmodsecurity_la-time_year.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@variables/$(DEPDIR)/libmodsecurity_la-tx.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@variables/$(DEPDIR)/libmodsecurity_la-variable.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@variables/$(DEPDIR)/libmodsecurity_la-xml.Plo@am__quote@ .cc.o: @am__fastdepCXX_TRUE@ $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< .cc.obj: @am__fastdepCXX_TRUE@ $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cc.lo: @am__fastdepCXX_TRUE@ $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ @am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< parser/libmodsecurity_la-seclang-parser.lo: parser/seclang-parser.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT parser/libmodsecurity_la-seclang-parser.lo -MD -MP -MF parser/$(DEPDIR)/libmodsecurity_la-seclang-parser.Tpo -c -o parser/libmodsecurity_la-seclang-parser.lo `test -f 'parser/seclang-parser.cc' || echo '$(srcdir)/'`parser/seclang-parser.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) parser/$(DEPDIR)/libmodsecurity_la-seclang-parser.Tpo parser/$(DEPDIR)/libmodsecurity_la-seclang-parser.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='parser/seclang-parser.cc' object='parser/libmodsecurity_la-seclang-parser.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o parser/libmodsecurity_la-seclang-parser.lo `test -f 'parser/seclang-parser.cc' || echo '$(srcdir)/'`parser/seclang-parser.cc parser/libmodsecurity_la-seclang-scanner.lo: parser/seclang-scanner.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT parser/libmodsecurity_la-seclang-scanner.lo -MD -MP -MF parser/$(DEPDIR)/libmodsecurity_la-seclang-scanner.Tpo -c -o parser/libmodsecurity_la-seclang-scanner.lo `test -f 'parser/seclang-scanner.cc' || echo '$(srcdir)/'`parser/seclang-scanner.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) parser/$(DEPDIR)/libmodsecurity_la-seclang-scanner.Tpo parser/$(DEPDIR)/libmodsecurity_la-seclang-scanner.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='parser/seclang-scanner.cc' object='parser/libmodsecurity_la-seclang-scanner.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o parser/libmodsecurity_la-seclang-scanner.lo `test -f 'parser/seclang-scanner.cc' || echo '$(srcdir)/'`parser/seclang-scanner.cc parser/libmodsecurity_la-driver.lo: parser/driver.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT parser/libmodsecurity_la-driver.lo -MD -MP -MF parser/$(DEPDIR)/libmodsecurity_la-driver.Tpo -c -o parser/libmodsecurity_la-driver.lo `test -f 'parser/driver.cc' || echo '$(srcdir)/'`parser/driver.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) parser/$(DEPDIR)/libmodsecurity_la-driver.Tpo parser/$(DEPDIR)/libmodsecurity_la-driver.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='parser/driver.cc' object='parser/libmodsecurity_la-driver.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o parser/libmodsecurity_la-driver.lo `test -f 'parser/driver.cc' || echo '$(srcdir)/'`parser/driver.cc libmodsecurity_la-transaction.lo: transaction.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libmodsecurity_la-transaction.lo -MD -MP -MF $(DEPDIR)/libmodsecurity_la-transaction.Tpo -c -o libmodsecurity_la-transaction.lo `test -f 'transaction.cc' || echo '$(srcdir)/'`transaction.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmodsecurity_la-transaction.Tpo $(DEPDIR)/libmodsecurity_la-transaction.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='transaction.cc' object='libmodsecurity_la-transaction.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libmodsecurity_la-transaction.lo `test -f 'transaction.cc' || echo '$(srcdir)/'`transaction.cc libmodsecurity_la-anchored_set_variable.lo: anchored_set_variable.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libmodsecurity_la-anchored_set_variable.lo -MD -MP -MF $(DEPDIR)/libmodsecurity_la-anchored_set_variable.Tpo -c -o libmodsecurity_la-anchored_set_variable.lo `test -f 'anchored_set_variable.cc' || echo '$(srcdir)/'`anchored_set_variable.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmodsecurity_la-anchored_set_variable.Tpo $(DEPDIR)/libmodsecurity_la-anchored_set_variable.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='anchored_set_variable.cc' object='libmodsecurity_la-anchored_set_variable.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libmodsecurity_la-anchored_set_variable.lo `test -f 'anchored_set_variable.cc' || echo '$(srcdir)/'`anchored_set_variable.cc libmodsecurity_la-anchored_variable.lo: anchored_variable.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libmodsecurity_la-anchored_variable.lo -MD -MP -MF $(DEPDIR)/libmodsecurity_la-anchored_variable.Tpo -c -o libmodsecurity_la-anchored_variable.lo `test -f 'anchored_variable.cc' || echo '$(srcdir)/'`anchored_variable.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmodsecurity_la-anchored_variable.Tpo $(DEPDIR)/libmodsecurity_la-anchored_variable.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='anchored_variable.cc' object='libmodsecurity_la-anchored_variable.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libmodsecurity_la-anchored_variable.lo `test -f 'anchored_variable.cc' || echo '$(srcdir)/'`anchored_variable.cc audit_log/libmodsecurity_la-audit_log.lo: audit_log/audit_log.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT audit_log/libmodsecurity_la-audit_log.lo -MD -MP -MF audit_log/$(DEPDIR)/libmodsecurity_la-audit_log.Tpo -c -o audit_log/libmodsecurity_la-audit_log.lo `test -f 'audit_log/audit_log.cc' || echo '$(srcdir)/'`audit_log/audit_log.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) audit_log/$(DEPDIR)/libmodsecurity_la-audit_log.Tpo audit_log/$(DEPDIR)/libmodsecurity_la-audit_log.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='audit_log/audit_log.cc' object='audit_log/libmodsecurity_la-audit_log.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o audit_log/libmodsecurity_la-audit_log.lo `test -f 'audit_log/audit_log.cc' || echo '$(srcdir)/'`audit_log/audit_log.cc audit_log/writer/libmodsecurity_la-writer.lo: audit_log/writer/writer.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT audit_log/writer/libmodsecurity_la-writer.lo -MD -MP -MF audit_log/writer/$(DEPDIR)/libmodsecurity_la-writer.Tpo -c -o audit_log/writer/libmodsecurity_la-writer.lo `test -f 'audit_log/writer/writer.cc' || echo '$(srcdir)/'`audit_log/writer/writer.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) audit_log/writer/$(DEPDIR)/libmodsecurity_la-writer.Tpo audit_log/writer/$(DEPDIR)/libmodsecurity_la-writer.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='audit_log/writer/writer.cc' object='audit_log/writer/libmodsecurity_la-writer.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o audit_log/writer/libmodsecurity_la-writer.lo `test -f 'audit_log/writer/writer.cc' || echo '$(srcdir)/'`audit_log/writer/writer.cc audit_log/writer/libmodsecurity_la-https.lo: audit_log/writer/https.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT audit_log/writer/libmodsecurity_la-https.lo -MD -MP -MF audit_log/writer/$(DEPDIR)/libmodsecurity_la-https.Tpo -c -o audit_log/writer/libmodsecurity_la-https.lo `test -f 'audit_log/writer/https.cc' || echo '$(srcdir)/'`audit_log/writer/https.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) audit_log/writer/$(DEPDIR)/libmodsecurity_la-https.Tpo audit_log/writer/$(DEPDIR)/libmodsecurity_la-https.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='audit_log/writer/https.cc' object='audit_log/writer/libmodsecurity_la-https.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o audit_log/writer/libmodsecurity_la-https.lo `test -f 'audit_log/writer/https.cc' || echo '$(srcdir)/'`audit_log/writer/https.cc audit_log/writer/libmodsecurity_la-serial.lo: audit_log/writer/serial.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT audit_log/writer/libmodsecurity_la-serial.lo -MD -MP -MF audit_log/writer/$(DEPDIR)/libmodsecurity_la-serial.Tpo -c -o audit_log/writer/libmodsecurity_la-serial.lo `test -f 'audit_log/writer/serial.cc' || echo '$(srcdir)/'`audit_log/writer/serial.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) audit_log/writer/$(DEPDIR)/libmodsecurity_la-serial.Tpo audit_log/writer/$(DEPDIR)/libmodsecurity_la-serial.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='audit_log/writer/serial.cc' object='audit_log/writer/libmodsecurity_la-serial.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o audit_log/writer/libmodsecurity_la-serial.lo `test -f 'audit_log/writer/serial.cc' || echo '$(srcdir)/'`audit_log/writer/serial.cc audit_log/writer/libmodsecurity_la-parallel.lo: audit_log/writer/parallel.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT audit_log/writer/libmodsecurity_la-parallel.lo -MD -MP -MF audit_log/writer/$(DEPDIR)/libmodsecurity_la-parallel.Tpo -c -o audit_log/writer/libmodsecurity_la-parallel.lo `test -f 'audit_log/writer/parallel.cc' || echo '$(srcdir)/'`audit_log/writer/parallel.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) audit_log/writer/$(DEPDIR)/libmodsecurity_la-parallel.Tpo audit_log/writer/$(DEPDIR)/libmodsecurity_la-parallel.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='audit_log/writer/parallel.cc' object='audit_log/writer/libmodsecurity_la-parallel.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o audit_log/writer/libmodsecurity_la-parallel.lo `test -f 'audit_log/writer/parallel.cc' || echo '$(srcdir)/'`audit_log/writer/parallel.cc libmodsecurity_la-modsecurity.lo: modsecurity.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libmodsecurity_la-modsecurity.lo -MD -MP -MF $(DEPDIR)/libmodsecurity_la-modsecurity.Tpo -c -o libmodsecurity_la-modsecurity.lo `test -f 'modsecurity.cc' || echo '$(srcdir)/'`modsecurity.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmodsecurity_la-modsecurity.Tpo $(DEPDIR)/libmodsecurity_la-modsecurity.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='modsecurity.cc' object='libmodsecurity_la-modsecurity.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libmodsecurity_la-modsecurity.lo `test -f 'modsecurity.cc' || echo '$(srcdir)/'`modsecurity.cc libmodsecurity_la-rules_set.lo: rules_set.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libmodsecurity_la-rules_set.lo -MD -MP -MF $(DEPDIR)/libmodsecurity_la-rules_set.Tpo -c -o libmodsecurity_la-rules_set.lo `test -f 'rules_set.cc' || echo '$(srcdir)/'`rules_set.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmodsecurity_la-rules_set.Tpo $(DEPDIR)/libmodsecurity_la-rules_set.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rules_set.cc' object='libmodsecurity_la-rules_set.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libmodsecurity_la-rules_set.lo `test -f 'rules_set.cc' || echo '$(srcdir)/'`rules_set.cc libmodsecurity_la-rules_set_phases.lo: rules_set_phases.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libmodsecurity_la-rules_set_phases.lo -MD -MP -MF $(DEPDIR)/libmodsecurity_la-rules_set_phases.Tpo -c -o libmodsecurity_la-rules_set_phases.lo `test -f 'rules_set_phases.cc' || echo '$(srcdir)/'`rules_set_phases.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmodsecurity_la-rules_set_phases.Tpo $(DEPDIR)/libmodsecurity_la-rules_set_phases.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rules_set_phases.cc' object='libmodsecurity_la-rules_set_phases.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libmodsecurity_la-rules_set_phases.lo `test -f 'rules_set_phases.cc' || echo '$(srcdir)/'`rules_set_phases.cc libmodsecurity_la-rules_set_properties.lo: rules_set_properties.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libmodsecurity_la-rules_set_properties.lo -MD -MP -MF $(DEPDIR)/libmodsecurity_la-rules_set_properties.Tpo -c -o libmodsecurity_la-rules_set_properties.lo `test -f 'rules_set_properties.cc' || echo '$(srcdir)/'`rules_set_properties.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmodsecurity_la-rules_set_properties.Tpo $(DEPDIR)/libmodsecurity_la-rules_set_properties.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rules_set_properties.cc' object='libmodsecurity_la-rules_set_properties.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libmodsecurity_la-rules_set_properties.lo `test -f 'rules_set_properties.cc' || echo '$(srcdir)/'`rules_set_properties.cc debug_log/libmodsecurity_la-debug_log.lo: debug_log/debug_log.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT debug_log/libmodsecurity_la-debug_log.lo -MD -MP -MF debug_log/$(DEPDIR)/libmodsecurity_la-debug_log.Tpo -c -o debug_log/libmodsecurity_la-debug_log.lo `test -f 'debug_log/debug_log.cc' || echo '$(srcdir)/'`debug_log/debug_log.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) debug_log/$(DEPDIR)/libmodsecurity_la-debug_log.Tpo debug_log/$(DEPDIR)/libmodsecurity_la-debug_log.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='debug_log/debug_log.cc' object='debug_log/libmodsecurity_la-debug_log.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o debug_log/libmodsecurity_la-debug_log.lo `test -f 'debug_log/debug_log.cc' || echo '$(srcdir)/'`debug_log/debug_log.cc debug_log/libmodsecurity_la-debug_log_writer.lo: debug_log/debug_log_writer.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT debug_log/libmodsecurity_la-debug_log_writer.lo -MD -MP -MF debug_log/$(DEPDIR)/libmodsecurity_la-debug_log_writer.Tpo -c -o debug_log/libmodsecurity_la-debug_log_writer.lo `test -f 'debug_log/debug_log_writer.cc' || echo '$(srcdir)/'`debug_log/debug_log_writer.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) debug_log/$(DEPDIR)/libmodsecurity_la-debug_log_writer.Tpo debug_log/$(DEPDIR)/libmodsecurity_la-debug_log_writer.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='debug_log/debug_log_writer.cc' object='debug_log/libmodsecurity_la-debug_log_writer.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o debug_log/libmodsecurity_la-debug_log_writer.lo `test -f 'debug_log/debug_log_writer.cc' || echo '$(srcdir)/'`debug_log/debug_log_writer.cc libmodsecurity_la-run_time_string.lo: run_time_string.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libmodsecurity_la-run_time_string.lo -MD -MP -MF $(DEPDIR)/libmodsecurity_la-run_time_string.Tpo -c -o libmodsecurity_la-run_time_string.lo `test -f 'run_time_string.cc' || echo '$(srcdir)/'`run_time_string.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmodsecurity_la-run_time_string.Tpo $(DEPDIR)/libmodsecurity_la-run_time_string.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='run_time_string.cc' object='libmodsecurity_la-run_time_string.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libmodsecurity_la-run_time_string.lo `test -f 'run_time_string.cc' || echo '$(srcdir)/'`run_time_string.cc libmodsecurity_la-rule.lo: rule.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libmodsecurity_la-rule.lo -MD -MP -MF $(DEPDIR)/libmodsecurity_la-rule.Tpo -c -o libmodsecurity_la-rule.lo `test -f 'rule.cc' || echo '$(srcdir)/'`rule.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmodsecurity_la-rule.Tpo $(DEPDIR)/libmodsecurity_la-rule.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rule.cc' object='libmodsecurity_la-rule.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libmodsecurity_la-rule.lo `test -f 'rule.cc' || echo '$(srcdir)/'`rule.cc libmodsecurity_la-rule_unconditional.lo: rule_unconditional.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libmodsecurity_la-rule_unconditional.lo -MD -MP -MF $(DEPDIR)/libmodsecurity_la-rule_unconditional.Tpo -c -o libmodsecurity_la-rule_unconditional.lo `test -f 'rule_unconditional.cc' || echo '$(srcdir)/'`rule_unconditional.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmodsecurity_la-rule_unconditional.Tpo $(DEPDIR)/libmodsecurity_la-rule_unconditional.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rule_unconditional.cc' object='libmodsecurity_la-rule_unconditional.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libmodsecurity_la-rule_unconditional.lo `test -f 'rule_unconditional.cc' || echo '$(srcdir)/'`rule_unconditional.cc libmodsecurity_la-rule_with_actions.lo: rule_with_actions.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libmodsecurity_la-rule_with_actions.lo -MD -MP -MF $(DEPDIR)/libmodsecurity_la-rule_with_actions.Tpo -c -o libmodsecurity_la-rule_with_actions.lo `test -f 'rule_with_actions.cc' || echo '$(srcdir)/'`rule_with_actions.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmodsecurity_la-rule_with_actions.Tpo $(DEPDIR)/libmodsecurity_la-rule_with_actions.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rule_with_actions.cc' object='libmodsecurity_la-rule_with_actions.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libmodsecurity_la-rule_with_actions.lo `test -f 'rule_with_actions.cc' || echo '$(srcdir)/'`rule_with_actions.cc libmodsecurity_la-rule_with_operator.lo: rule_with_operator.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libmodsecurity_la-rule_with_operator.lo -MD -MP -MF $(DEPDIR)/libmodsecurity_la-rule_with_operator.Tpo -c -o libmodsecurity_la-rule_with_operator.lo `test -f 'rule_with_operator.cc' || echo '$(srcdir)/'`rule_with_operator.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmodsecurity_la-rule_with_operator.Tpo $(DEPDIR)/libmodsecurity_la-rule_with_operator.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rule_with_operator.cc' object='libmodsecurity_la-rule_with_operator.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libmodsecurity_la-rule_with_operator.lo `test -f 'rule_with_operator.cc' || echo '$(srcdir)/'`rule_with_operator.cc libmodsecurity_la-rule_message.lo: rule_message.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libmodsecurity_la-rule_message.lo -MD -MP -MF $(DEPDIR)/libmodsecurity_la-rule_message.Tpo -c -o libmodsecurity_la-rule_message.lo `test -f 'rule_message.cc' || echo '$(srcdir)/'`rule_message.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmodsecurity_la-rule_message.Tpo $(DEPDIR)/libmodsecurity_la-rule_message.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rule_message.cc' object='libmodsecurity_la-rule_message.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libmodsecurity_la-rule_message.lo `test -f 'rule_message.cc' || echo '$(srcdir)/'`rule_message.cc libmodsecurity_la-rule_script.lo: rule_script.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libmodsecurity_la-rule_script.lo -MD -MP -MF $(DEPDIR)/libmodsecurity_la-rule_script.Tpo -c -o libmodsecurity_la-rule_script.lo `test -f 'rule_script.cc' || echo '$(srcdir)/'`rule_script.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmodsecurity_la-rule_script.Tpo $(DEPDIR)/libmodsecurity_la-rule_script.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rule_script.cc' object='libmodsecurity_la-rule_script.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libmodsecurity_la-rule_script.lo `test -f 'rule_script.cc' || echo '$(srcdir)/'`rule_script.cc libmodsecurity_la-unique_id.lo: unique_id.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libmodsecurity_la-unique_id.lo -MD -MP -MF $(DEPDIR)/libmodsecurity_la-unique_id.Tpo -c -o libmodsecurity_la-unique_id.lo `test -f 'unique_id.cc' || echo '$(srcdir)/'`unique_id.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmodsecurity_la-unique_id.Tpo $(DEPDIR)/libmodsecurity_la-unique_id.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='unique_id.cc' object='libmodsecurity_la-unique_id.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libmodsecurity_la-unique_id.lo `test -f 'unique_id.cc' || echo '$(srcdir)/'`unique_id.cc libmodsecurity_la-rules_exceptions.lo: rules_exceptions.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libmodsecurity_la-rules_exceptions.lo -MD -MP -MF $(DEPDIR)/libmodsecurity_la-rules_exceptions.Tpo -c -o libmodsecurity_la-rules_exceptions.lo `test -f 'rules_exceptions.cc' || echo '$(srcdir)/'`rules_exceptions.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmodsecurity_la-rules_exceptions.Tpo $(DEPDIR)/libmodsecurity_la-rules_exceptions.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rules_exceptions.cc' object='libmodsecurity_la-rules_exceptions.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libmodsecurity_la-rules_exceptions.lo `test -f 'rules_exceptions.cc' || echo '$(srcdir)/'`rules_exceptions.cc request_body_processor/libmodsecurity_la-multipart.lo: request_body_processor/multipart.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT request_body_processor/libmodsecurity_la-multipart.lo -MD -MP -MF request_body_processor/$(DEPDIR)/libmodsecurity_la-multipart.Tpo -c -o request_body_processor/libmodsecurity_la-multipart.lo `test -f 'request_body_processor/multipart.cc' || echo '$(srcdir)/'`request_body_processor/multipart.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) request_body_processor/$(DEPDIR)/libmodsecurity_la-multipart.Tpo request_body_processor/$(DEPDIR)/libmodsecurity_la-multipart.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='request_body_processor/multipart.cc' object='request_body_processor/libmodsecurity_la-multipart.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o request_body_processor/libmodsecurity_la-multipart.lo `test -f 'request_body_processor/multipart.cc' || echo '$(srcdir)/'`request_body_processor/multipart.cc request_body_processor/libmodsecurity_la-xml.lo: request_body_processor/xml.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT request_body_processor/libmodsecurity_la-xml.lo -MD -MP -MF request_body_processor/$(DEPDIR)/libmodsecurity_la-xml.Tpo -c -o request_body_processor/libmodsecurity_la-xml.lo `test -f 'request_body_processor/xml.cc' || echo '$(srcdir)/'`request_body_processor/xml.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) request_body_processor/$(DEPDIR)/libmodsecurity_la-xml.Tpo request_body_processor/$(DEPDIR)/libmodsecurity_la-xml.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='request_body_processor/xml.cc' object='request_body_processor/libmodsecurity_la-xml.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o request_body_processor/libmodsecurity_la-xml.lo `test -f 'request_body_processor/xml.cc' || echo '$(srcdir)/'`request_body_processor/xml.cc request_body_processor/libmodsecurity_la-json.lo: request_body_processor/json.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT request_body_processor/libmodsecurity_la-json.lo -MD -MP -MF request_body_processor/$(DEPDIR)/libmodsecurity_la-json.Tpo -c -o request_body_processor/libmodsecurity_la-json.lo `test -f 'request_body_processor/json.cc' || echo '$(srcdir)/'`request_body_processor/json.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) request_body_processor/$(DEPDIR)/libmodsecurity_la-json.Tpo request_body_processor/$(DEPDIR)/libmodsecurity_la-json.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='request_body_processor/json.cc' object='request_body_processor/libmodsecurity_la-json.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o request_body_processor/libmodsecurity_la-json.lo `test -f 'request_body_processor/json.cc' || echo '$(srcdir)/'`request_body_processor/json.cc actions/libmodsecurity_la-accuracy.lo: actions/accuracy.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT actions/libmodsecurity_la-accuracy.lo -MD -MP -MF actions/$(DEPDIR)/libmodsecurity_la-accuracy.Tpo -c -o actions/libmodsecurity_la-accuracy.lo `test -f 'actions/accuracy.cc' || echo '$(srcdir)/'`actions/accuracy.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) actions/$(DEPDIR)/libmodsecurity_la-accuracy.Tpo actions/$(DEPDIR)/libmodsecurity_la-accuracy.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='actions/accuracy.cc' object='actions/libmodsecurity_la-accuracy.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o actions/libmodsecurity_la-accuracy.lo `test -f 'actions/accuracy.cc' || echo '$(srcdir)/'`actions/accuracy.cc actions/libmodsecurity_la-action.lo: actions/action.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT actions/libmodsecurity_la-action.lo -MD -MP -MF actions/$(DEPDIR)/libmodsecurity_la-action.Tpo -c -o actions/libmodsecurity_la-action.lo `test -f 'actions/action.cc' || echo '$(srcdir)/'`actions/action.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) actions/$(DEPDIR)/libmodsecurity_la-action.Tpo actions/$(DEPDIR)/libmodsecurity_la-action.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='actions/action.cc' object='actions/libmodsecurity_la-action.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o actions/libmodsecurity_la-action.lo `test -f 'actions/action.cc' || echo '$(srcdir)/'`actions/action.cc actions/libmodsecurity_la-audit_log.lo: actions/audit_log.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT actions/libmodsecurity_la-audit_log.lo -MD -MP -MF actions/$(DEPDIR)/libmodsecurity_la-audit_log.Tpo -c -o actions/libmodsecurity_la-audit_log.lo `test -f 'actions/audit_log.cc' || echo '$(srcdir)/'`actions/audit_log.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) actions/$(DEPDIR)/libmodsecurity_la-audit_log.Tpo actions/$(DEPDIR)/libmodsecurity_la-audit_log.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='actions/audit_log.cc' object='actions/libmodsecurity_la-audit_log.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o actions/libmodsecurity_la-audit_log.lo `test -f 'actions/audit_log.cc' || echo '$(srcdir)/'`actions/audit_log.cc actions/libmodsecurity_la-block.lo: actions/block.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT actions/libmodsecurity_la-block.lo -MD -MP -MF actions/$(DEPDIR)/libmodsecurity_la-block.Tpo -c -o actions/libmodsecurity_la-block.lo `test -f 'actions/block.cc' || echo '$(srcdir)/'`actions/block.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) actions/$(DEPDIR)/libmodsecurity_la-block.Tpo actions/$(DEPDIR)/libmodsecurity_la-block.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='actions/block.cc' object='actions/libmodsecurity_la-block.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o actions/libmodsecurity_la-block.lo `test -f 'actions/block.cc' || echo '$(srcdir)/'`actions/block.cc actions/libmodsecurity_la-capture.lo: actions/capture.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT actions/libmodsecurity_la-capture.lo -MD -MP -MF actions/$(DEPDIR)/libmodsecurity_la-capture.Tpo -c -o actions/libmodsecurity_la-capture.lo `test -f 'actions/capture.cc' || echo '$(srcdir)/'`actions/capture.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) actions/$(DEPDIR)/libmodsecurity_la-capture.Tpo actions/$(DEPDIR)/libmodsecurity_la-capture.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='actions/capture.cc' object='actions/libmodsecurity_la-capture.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o actions/libmodsecurity_la-capture.lo `test -f 'actions/capture.cc' || echo '$(srcdir)/'`actions/capture.cc actions/libmodsecurity_la-chain.lo: actions/chain.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT actions/libmodsecurity_la-chain.lo -MD -MP -MF actions/$(DEPDIR)/libmodsecurity_la-chain.Tpo -c -o actions/libmodsecurity_la-chain.lo `test -f 'actions/chain.cc' || echo '$(srcdir)/'`actions/chain.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) actions/$(DEPDIR)/libmodsecurity_la-chain.Tpo actions/$(DEPDIR)/libmodsecurity_la-chain.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='actions/chain.cc' object='actions/libmodsecurity_la-chain.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o actions/libmodsecurity_la-chain.lo `test -f 'actions/chain.cc' || echo '$(srcdir)/'`actions/chain.cc actions/ctl/libmodsecurity_la-audit_log_parts.lo: actions/ctl/audit_log_parts.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT actions/ctl/libmodsecurity_la-audit_log_parts.lo -MD -MP -MF actions/ctl/$(DEPDIR)/libmodsecurity_la-audit_log_parts.Tpo -c -o actions/ctl/libmodsecurity_la-audit_log_parts.lo `test -f 'actions/ctl/audit_log_parts.cc' || echo '$(srcdir)/'`actions/ctl/audit_log_parts.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) actions/ctl/$(DEPDIR)/libmodsecurity_la-audit_log_parts.Tpo actions/ctl/$(DEPDIR)/libmodsecurity_la-audit_log_parts.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='actions/ctl/audit_log_parts.cc' object='actions/ctl/libmodsecurity_la-audit_log_parts.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o actions/ctl/libmodsecurity_la-audit_log_parts.lo `test -f 'actions/ctl/audit_log_parts.cc' || echo '$(srcdir)/'`actions/ctl/audit_log_parts.cc actions/ctl/libmodsecurity_la-rule_engine.lo: actions/ctl/rule_engine.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT actions/ctl/libmodsecurity_la-rule_engine.lo -MD -MP -MF actions/ctl/$(DEPDIR)/libmodsecurity_la-rule_engine.Tpo -c -o actions/ctl/libmodsecurity_la-rule_engine.lo `test -f 'actions/ctl/rule_engine.cc' || echo '$(srcdir)/'`actions/ctl/rule_engine.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) actions/ctl/$(DEPDIR)/libmodsecurity_la-rule_engine.Tpo actions/ctl/$(DEPDIR)/libmodsecurity_la-rule_engine.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='actions/ctl/rule_engine.cc' object='actions/ctl/libmodsecurity_la-rule_engine.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o actions/ctl/libmodsecurity_la-rule_engine.lo `test -f 'actions/ctl/rule_engine.cc' || echo '$(srcdir)/'`actions/ctl/rule_engine.cc actions/ctl/libmodsecurity_la-request_body_processor_json.lo: actions/ctl/request_body_processor_json.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT actions/ctl/libmodsecurity_la-request_body_processor_json.lo -MD -MP -MF actions/ctl/$(DEPDIR)/libmodsecurity_la-request_body_processor_json.Tpo -c -o actions/ctl/libmodsecurity_la-request_body_processor_json.lo `test -f 'actions/ctl/request_body_processor_json.cc' || echo '$(srcdir)/'`actions/ctl/request_body_processor_json.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) actions/ctl/$(DEPDIR)/libmodsecurity_la-request_body_processor_json.Tpo actions/ctl/$(DEPDIR)/libmodsecurity_la-request_body_processor_json.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='actions/ctl/request_body_processor_json.cc' object='actions/ctl/libmodsecurity_la-request_body_processor_json.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o actions/ctl/libmodsecurity_la-request_body_processor_json.lo `test -f 'actions/ctl/request_body_processor_json.cc' || echo '$(srcdir)/'`actions/ctl/request_body_processor_json.cc actions/ctl/libmodsecurity_la-request_body_processor_xml.lo: actions/ctl/request_body_processor_xml.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT actions/ctl/libmodsecurity_la-request_body_processor_xml.lo -MD -MP -MF actions/ctl/$(DEPDIR)/libmodsecurity_la-request_body_processor_xml.Tpo -c -o actions/ctl/libmodsecurity_la-request_body_processor_xml.lo `test -f 'actions/ctl/request_body_processor_xml.cc' || echo '$(srcdir)/'`actions/ctl/request_body_processor_xml.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) actions/ctl/$(DEPDIR)/libmodsecurity_la-request_body_processor_xml.Tpo actions/ctl/$(DEPDIR)/libmodsecurity_la-request_body_processor_xml.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='actions/ctl/request_body_processor_xml.cc' object='actions/ctl/libmodsecurity_la-request_body_processor_xml.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o actions/ctl/libmodsecurity_la-request_body_processor_xml.lo `test -f 'actions/ctl/request_body_processor_xml.cc' || echo '$(srcdir)/'`actions/ctl/request_body_processor_xml.cc actions/ctl/libmodsecurity_la-request_body_processor_urlencoded.lo: actions/ctl/request_body_processor_urlencoded.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT actions/ctl/libmodsecurity_la-request_body_processor_urlencoded.lo -MD -MP -MF actions/ctl/$(DEPDIR)/libmodsecurity_la-request_body_processor_urlencoded.Tpo -c -o actions/ctl/libmodsecurity_la-request_body_processor_urlencoded.lo `test -f 'actions/ctl/request_body_processor_urlencoded.cc' || echo '$(srcdir)/'`actions/ctl/request_body_processor_urlencoded.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) actions/ctl/$(DEPDIR)/libmodsecurity_la-request_body_processor_urlencoded.Tpo actions/ctl/$(DEPDIR)/libmodsecurity_la-request_body_processor_urlencoded.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='actions/ctl/request_body_processor_urlencoded.cc' object='actions/ctl/libmodsecurity_la-request_body_processor_urlencoded.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o actions/ctl/libmodsecurity_la-request_body_processor_urlencoded.lo `test -f 'actions/ctl/request_body_processor_urlencoded.cc' || echo '$(srcdir)/'`actions/ctl/request_body_processor_urlencoded.cc actions/ctl/libmodsecurity_la-rule_remove_target_by_tag.lo: actions/ctl/rule_remove_target_by_tag.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT actions/ctl/libmodsecurity_la-rule_remove_target_by_tag.lo -MD -MP -MF actions/ctl/$(DEPDIR)/libmodsecurity_la-rule_remove_target_by_tag.Tpo -c -o actions/ctl/libmodsecurity_la-rule_remove_target_by_tag.lo `test -f 'actions/ctl/rule_remove_target_by_tag.cc' || echo '$(srcdir)/'`actions/ctl/rule_remove_target_by_tag.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) actions/ctl/$(DEPDIR)/libmodsecurity_la-rule_remove_target_by_tag.Tpo actions/ctl/$(DEPDIR)/libmodsecurity_la-rule_remove_target_by_tag.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='actions/ctl/rule_remove_target_by_tag.cc' object='actions/ctl/libmodsecurity_la-rule_remove_target_by_tag.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o actions/ctl/libmodsecurity_la-rule_remove_target_by_tag.lo `test -f 'actions/ctl/rule_remove_target_by_tag.cc' || echo '$(srcdir)/'`actions/ctl/rule_remove_target_by_tag.cc actions/ctl/libmodsecurity_la-rule_remove_target_by_id.lo: actions/ctl/rule_remove_target_by_id.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT actions/ctl/libmodsecurity_la-rule_remove_target_by_id.lo -MD -MP -MF actions/ctl/$(DEPDIR)/libmodsecurity_la-rule_remove_target_by_id.Tpo -c -o actions/ctl/libmodsecurity_la-rule_remove_target_by_id.lo `test -f 'actions/ctl/rule_remove_target_by_id.cc' || echo '$(srcdir)/'`actions/ctl/rule_remove_target_by_id.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) actions/ctl/$(DEPDIR)/libmodsecurity_la-rule_remove_target_by_id.Tpo actions/ctl/$(DEPDIR)/libmodsecurity_la-rule_remove_target_by_id.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='actions/ctl/rule_remove_target_by_id.cc' object='actions/ctl/libmodsecurity_la-rule_remove_target_by_id.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o actions/ctl/libmodsecurity_la-rule_remove_target_by_id.lo `test -f 'actions/ctl/rule_remove_target_by_id.cc' || echo '$(srcdir)/'`actions/ctl/rule_remove_target_by_id.cc actions/ctl/libmodsecurity_la-rule_remove_by_id.lo: actions/ctl/rule_remove_by_id.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT actions/ctl/libmodsecurity_la-rule_remove_by_id.lo -MD -MP -MF actions/ctl/$(DEPDIR)/libmodsecurity_la-rule_remove_by_id.Tpo -c -o actions/ctl/libmodsecurity_la-rule_remove_by_id.lo `test -f 'actions/ctl/rule_remove_by_id.cc' || echo '$(srcdir)/'`actions/ctl/rule_remove_by_id.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) actions/ctl/$(DEPDIR)/libmodsecurity_la-rule_remove_by_id.Tpo actions/ctl/$(DEPDIR)/libmodsecurity_la-rule_remove_by_id.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='actions/ctl/rule_remove_by_id.cc' object='actions/ctl/libmodsecurity_la-rule_remove_by_id.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o actions/ctl/libmodsecurity_la-rule_remove_by_id.lo `test -f 'actions/ctl/rule_remove_by_id.cc' || echo '$(srcdir)/'`actions/ctl/rule_remove_by_id.cc actions/ctl/libmodsecurity_la-rule_remove_by_tag.lo: actions/ctl/rule_remove_by_tag.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT actions/ctl/libmodsecurity_la-rule_remove_by_tag.lo -MD -MP -MF actions/ctl/$(DEPDIR)/libmodsecurity_la-rule_remove_by_tag.Tpo -c -o actions/ctl/libmodsecurity_la-rule_remove_by_tag.lo `test -f 'actions/ctl/rule_remove_by_tag.cc' || echo '$(srcdir)/'`actions/ctl/rule_remove_by_tag.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) actions/ctl/$(DEPDIR)/libmodsecurity_la-rule_remove_by_tag.Tpo actions/ctl/$(DEPDIR)/libmodsecurity_la-rule_remove_by_tag.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='actions/ctl/rule_remove_by_tag.cc' object='actions/ctl/libmodsecurity_la-rule_remove_by_tag.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o actions/ctl/libmodsecurity_la-rule_remove_by_tag.lo `test -f 'actions/ctl/rule_remove_by_tag.cc' || echo '$(srcdir)/'`actions/ctl/rule_remove_by_tag.cc actions/ctl/libmodsecurity_la-request_body_access.lo: actions/ctl/request_body_access.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT actions/ctl/libmodsecurity_la-request_body_access.lo -MD -MP -MF actions/ctl/$(DEPDIR)/libmodsecurity_la-request_body_access.Tpo -c -o actions/ctl/libmodsecurity_la-request_body_access.lo `test -f 'actions/ctl/request_body_access.cc' || echo '$(srcdir)/'`actions/ctl/request_body_access.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) actions/ctl/$(DEPDIR)/libmodsecurity_la-request_body_access.Tpo actions/ctl/$(DEPDIR)/libmodsecurity_la-request_body_access.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='actions/ctl/request_body_access.cc' object='actions/ctl/libmodsecurity_la-request_body_access.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o actions/ctl/libmodsecurity_la-request_body_access.lo `test -f 'actions/ctl/request_body_access.cc' || echo '$(srcdir)/'`actions/ctl/request_body_access.cc actions/disruptive/libmodsecurity_la-allow.lo: actions/disruptive/allow.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT actions/disruptive/libmodsecurity_la-allow.lo -MD -MP -MF actions/disruptive/$(DEPDIR)/libmodsecurity_la-allow.Tpo -c -o actions/disruptive/libmodsecurity_la-allow.lo `test -f 'actions/disruptive/allow.cc' || echo '$(srcdir)/'`actions/disruptive/allow.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) actions/disruptive/$(DEPDIR)/libmodsecurity_la-allow.Tpo actions/disruptive/$(DEPDIR)/libmodsecurity_la-allow.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='actions/disruptive/allow.cc' object='actions/disruptive/libmodsecurity_la-allow.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o actions/disruptive/libmodsecurity_la-allow.lo `test -f 'actions/disruptive/allow.cc' || echo '$(srcdir)/'`actions/disruptive/allow.cc actions/disruptive/libmodsecurity_la-deny.lo: actions/disruptive/deny.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT actions/disruptive/libmodsecurity_la-deny.lo -MD -MP -MF actions/disruptive/$(DEPDIR)/libmodsecurity_la-deny.Tpo -c -o actions/disruptive/libmodsecurity_la-deny.lo `test -f 'actions/disruptive/deny.cc' || echo '$(srcdir)/'`actions/disruptive/deny.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) actions/disruptive/$(DEPDIR)/libmodsecurity_la-deny.Tpo actions/disruptive/$(DEPDIR)/libmodsecurity_la-deny.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='actions/disruptive/deny.cc' object='actions/disruptive/libmodsecurity_la-deny.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o actions/disruptive/libmodsecurity_la-deny.lo `test -f 'actions/disruptive/deny.cc' || echo '$(srcdir)/'`actions/disruptive/deny.cc actions/disruptive/libmodsecurity_la-drop.lo: actions/disruptive/drop.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT actions/disruptive/libmodsecurity_la-drop.lo -MD -MP -MF actions/disruptive/$(DEPDIR)/libmodsecurity_la-drop.Tpo -c -o actions/disruptive/libmodsecurity_la-drop.lo `test -f 'actions/disruptive/drop.cc' || echo '$(srcdir)/'`actions/disruptive/drop.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) actions/disruptive/$(DEPDIR)/libmodsecurity_la-drop.Tpo actions/disruptive/$(DEPDIR)/libmodsecurity_la-drop.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='actions/disruptive/drop.cc' object='actions/disruptive/libmodsecurity_la-drop.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o actions/disruptive/libmodsecurity_la-drop.lo `test -f 'actions/disruptive/drop.cc' || echo '$(srcdir)/'`actions/disruptive/drop.cc actions/disruptive/libmodsecurity_la-redirect.lo: actions/disruptive/redirect.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT actions/disruptive/libmodsecurity_la-redirect.lo -MD -MP -MF actions/disruptive/$(DEPDIR)/libmodsecurity_la-redirect.Tpo -c -o actions/disruptive/libmodsecurity_la-redirect.lo `test -f 'actions/disruptive/redirect.cc' || echo '$(srcdir)/'`actions/disruptive/redirect.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) actions/disruptive/$(DEPDIR)/libmodsecurity_la-redirect.Tpo actions/disruptive/$(DEPDIR)/libmodsecurity_la-redirect.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='actions/disruptive/redirect.cc' object='actions/disruptive/libmodsecurity_la-redirect.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o actions/disruptive/libmodsecurity_la-redirect.lo `test -f 'actions/disruptive/redirect.cc' || echo '$(srcdir)/'`actions/disruptive/redirect.cc actions/disruptive/libmodsecurity_la-pass.lo: actions/disruptive/pass.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT actions/disruptive/libmodsecurity_la-pass.lo -MD -MP -MF actions/disruptive/$(DEPDIR)/libmodsecurity_la-pass.Tpo -c -o actions/disruptive/libmodsecurity_la-pass.lo `test -f 'actions/disruptive/pass.cc' || echo '$(srcdir)/'`actions/disruptive/pass.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) actions/disruptive/$(DEPDIR)/libmodsecurity_la-pass.Tpo actions/disruptive/$(DEPDIR)/libmodsecurity_la-pass.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='actions/disruptive/pass.cc' object='actions/disruptive/libmodsecurity_la-pass.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o actions/disruptive/libmodsecurity_la-pass.lo `test -f 'actions/disruptive/pass.cc' || echo '$(srcdir)/'`actions/disruptive/pass.cc actions/libmodsecurity_la-exec.lo: actions/exec.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT actions/libmodsecurity_la-exec.lo -MD -MP -MF actions/$(DEPDIR)/libmodsecurity_la-exec.Tpo -c -o actions/libmodsecurity_la-exec.lo `test -f 'actions/exec.cc' || echo '$(srcdir)/'`actions/exec.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) actions/$(DEPDIR)/libmodsecurity_la-exec.Tpo actions/$(DEPDIR)/libmodsecurity_la-exec.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='actions/exec.cc' object='actions/libmodsecurity_la-exec.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o actions/libmodsecurity_la-exec.lo `test -f 'actions/exec.cc' || echo '$(srcdir)/'`actions/exec.cc actions/libmodsecurity_la-init_col.lo: actions/init_col.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT actions/libmodsecurity_la-init_col.lo -MD -MP -MF actions/$(DEPDIR)/libmodsecurity_la-init_col.Tpo -c -o actions/libmodsecurity_la-init_col.lo `test -f 'actions/init_col.cc' || echo '$(srcdir)/'`actions/init_col.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) actions/$(DEPDIR)/libmodsecurity_la-init_col.Tpo actions/$(DEPDIR)/libmodsecurity_la-init_col.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='actions/init_col.cc' object='actions/libmodsecurity_la-init_col.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o actions/libmodsecurity_la-init_col.lo `test -f 'actions/init_col.cc' || echo '$(srcdir)/'`actions/init_col.cc actions/libmodsecurity_la-log.lo: actions/log.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT actions/libmodsecurity_la-log.lo -MD -MP -MF actions/$(DEPDIR)/libmodsecurity_la-log.Tpo -c -o actions/libmodsecurity_la-log.lo `test -f 'actions/log.cc' || echo '$(srcdir)/'`actions/log.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) actions/$(DEPDIR)/libmodsecurity_la-log.Tpo actions/$(DEPDIR)/libmodsecurity_la-log.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='actions/log.cc' object='actions/libmodsecurity_la-log.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o actions/libmodsecurity_la-log.lo `test -f 'actions/log.cc' || echo '$(srcdir)/'`actions/log.cc actions/libmodsecurity_la-log_data.lo: actions/log_data.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT actions/libmodsecurity_la-log_data.lo -MD -MP -MF actions/$(DEPDIR)/libmodsecurity_la-log_data.Tpo -c -o actions/libmodsecurity_la-log_data.lo `test -f 'actions/log_data.cc' || echo '$(srcdir)/'`actions/log_data.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) actions/$(DEPDIR)/libmodsecurity_la-log_data.Tpo actions/$(DEPDIR)/libmodsecurity_la-log_data.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='actions/log_data.cc' object='actions/libmodsecurity_la-log_data.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o actions/libmodsecurity_la-log_data.lo `test -f 'actions/log_data.cc' || echo '$(srcdir)/'`actions/log_data.cc actions/libmodsecurity_la-maturity.lo: actions/maturity.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT actions/libmodsecurity_la-maturity.lo -MD -MP -MF actions/$(DEPDIR)/libmodsecurity_la-maturity.Tpo -c -o actions/libmodsecurity_la-maturity.lo `test -f 'actions/maturity.cc' || echo '$(srcdir)/'`actions/maturity.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) actions/$(DEPDIR)/libmodsecurity_la-maturity.Tpo actions/$(DEPDIR)/libmodsecurity_la-maturity.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='actions/maturity.cc' object='actions/libmodsecurity_la-maturity.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o actions/libmodsecurity_la-maturity.lo `test -f 'actions/maturity.cc' || echo '$(srcdir)/'`actions/maturity.cc actions/libmodsecurity_la-msg.lo: actions/msg.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT actions/libmodsecurity_la-msg.lo -MD -MP -MF actions/$(DEPDIR)/libmodsecurity_la-msg.Tpo -c -o actions/libmodsecurity_la-msg.lo `test -f 'actions/msg.cc' || echo '$(srcdir)/'`actions/msg.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) actions/$(DEPDIR)/libmodsecurity_la-msg.Tpo actions/$(DEPDIR)/libmodsecurity_la-msg.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='actions/msg.cc' object='actions/libmodsecurity_la-msg.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o actions/libmodsecurity_la-msg.lo `test -f 'actions/msg.cc' || echo '$(srcdir)/'`actions/msg.cc actions/libmodsecurity_la-multi_match.lo: actions/multi_match.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT actions/libmodsecurity_la-multi_match.lo -MD -MP -MF actions/$(DEPDIR)/libmodsecurity_la-multi_match.Tpo -c -o actions/libmodsecurity_la-multi_match.lo `test -f 'actions/multi_match.cc' || echo '$(srcdir)/'`actions/multi_match.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) actions/$(DEPDIR)/libmodsecurity_la-multi_match.Tpo actions/$(DEPDIR)/libmodsecurity_la-multi_match.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='actions/multi_match.cc' object='actions/libmodsecurity_la-multi_match.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o actions/libmodsecurity_la-multi_match.lo `test -f 'actions/multi_match.cc' || echo '$(srcdir)/'`actions/multi_match.cc actions/libmodsecurity_la-no_audit_log.lo: actions/no_audit_log.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT actions/libmodsecurity_la-no_audit_log.lo -MD -MP -MF actions/$(DEPDIR)/libmodsecurity_la-no_audit_log.Tpo -c -o actions/libmodsecurity_la-no_audit_log.lo `test -f 'actions/no_audit_log.cc' || echo '$(srcdir)/'`actions/no_audit_log.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) actions/$(DEPDIR)/libmodsecurity_la-no_audit_log.Tpo actions/$(DEPDIR)/libmodsecurity_la-no_audit_log.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='actions/no_audit_log.cc' object='actions/libmodsecurity_la-no_audit_log.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o actions/libmodsecurity_la-no_audit_log.lo `test -f 'actions/no_audit_log.cc' || echo '$(srcdir)/'`actions/no_audit_log.cc actions/libmodsecurity_la-no_log.lo: actions/no_log.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT actions/libmodsecurity_la-no_log.lo -MD -MP -MF actions/$(DEPDIR)/libmodsecurity_la-no_log.Tpo -c -o actions/libmodsecurity_la-no_log.lo `test -f 'actions/no_log.cc' || echo '$(srcdir)/'`actions/no_log.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) actions/$(DEPDIR)/libmodsecurity_la-no_log.Tpo actions/$(DEPDIR)/libmodsecurity_la-no_log.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='actions/no_log.cc' object='actions/libmodsecurity_la-no_log.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o actions/libmodsecurity_la-no_log.lo `test -f 'actions/no_log.cc' || echo '$(srcdir)/'`actions/no_log.cc actions/libmodsecurity_la-phase.lo: actions/phase.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT actions/libmodsecurity_la-phase.lo -MD -MP -MF actions/$(DEPDIR)/libmodsecurity_la-phase.Tpo -c -o actions/libmodsecurity_la-phase.lo `test -f 'actions/phase.cc' || echo '$(srcdir)/'`actions/phase.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) actions/$(DEPDIR)/libmodsecurity_la-phase.Tpo actions/$(DEPDIR)/libmodsecurity_la-phase.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='actions/phase.cc' object='actions/libmodsecurity_la-phase.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o actions/libmodsecurity_la-phase.lo `test -f 'actions/phase.cc' || echo '$(srcdir)/'`actions/phase.cc actions/libmodsecurity_la-rev.lo: actions/rev.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT actions/libmodsecurity_la-rev.lo -MD -MP -MF actions/$(DEPDIR)/libmodsecurity_la-rev.Tpo -c -o actions/libmodsecurity_la-rev.lo `test -f 'actions/rev.cc' || echo '$(srcdir)/'`actions/rev.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) actions/$(DEPDIR)/libmodsecurity_la-rev.Tpo actions/$(DEPDIR)/libmodsecurity_la-rev.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='actions/rev.cc' object='actions/libmodsecurity_la-rev.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o actions/libmodsecurity_la-rev.lo `test -f 'actions/rev.cc' || echo '$(srcdir)/'`actions/rev.cc actions/libmodsecurity_la-rule_id.lo: actions/rule_id.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT actions/libmodsecurity_la-rule_id.lo -MD -MP -MF actions/$(DEPDIR)/libmodsecurity_la-rule_id.Tpo -c -o actions/libmodsecurity_la-rule_id.lo `test -f 'actions/rule_id.cc' || echo '$(srcdir)/'`actions/rule_id.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) actions/$(DEPDIR)/libmodsecurity_la-rule_id.Tpo actions/$(DEPDIR)/libmodsecurity_la-rule_id.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='actions/rule_id.cc' object='actions/libmodsecurity_la-rule_id.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o actions/libmodsecurity_la-rule_id.lo `test -f 'actions/rule_id.cc' || echo '$(srcdir)/'`actions/rule_id.cc actions/libmodsecurity_la-severity.lo: actions/severity.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT actions/libmodsecurity_la-severity.lo -MD -MP -MF actions/$(DEPDIR)/libmodsecurity_la-severity.Tpo -c -o actions/libmodsecurity_la-severity.lo `test -f 'actions/severity.cc' || echo '$(srcdir)/'`actions/severity.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) actions/$(DEPDIR)/libmodsecurity_la-severity.Tpo actions/$(DEPDIR)/libmodsecurity_la-severity.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='actions/severity.cc' object='actions/libmodsecurity_la-severity.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o actions/libmodsecurity_la-severity.lo `test -f 'actions/severity.cc' || echo '$(srcdir)/'`actions/severity.cc actions/libmodsecurity_la-set_env.lo: actions/set_env.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT actions/libmodsecurity_la-set_env.lo -MD -MP -MF actions/$(DEPDIR)/libmodsecurity_la-set_env.Tpo -c -o actions/libmodsecurity_la-set_env.lo `test -f 'actions/set_env.cc' || echo '$(srcdir)/'`actions/set_env.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) actions/$(DEPDIR)/libmodsecurity_la-set_env.Tpo actions/$(DEPDIR)/libmodsecurity_la-set_env.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='actions/set_env.cc' object='actions/libmodsecurity_la-set_env.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o actions/libmodsecurity_la-set_env.lo `test -f 'actions/set_env.cc' || echo '$(srcdir)/'`actions/set_env.cc actions/libmodsecurity_la-set_rsc.lo: actions/set_rsc.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT actions/libmodsecurity_la-set_rsc.lo -MD -MP -MF actions/$(DEPDIR)/libmodsecurity_la-set_rsc.Tpo -c -o actions/libmodsecurity_la-set_rsc.lo `test -f 'actions/set_rsc.cc' || echo '$(srcdir)/'`actions/set_rsc.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) actions/$(DEPDIR)/libmodsecurity_la-set_rsc.Tpo actions/$(DEPDIR)/libmodsecurity_la-set_rsc.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='actions/set_rsc.cc' object='actions/libmodsecurity_la-set_rsc.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o actions/libmodsecurity_la-set_rsc.lo `test -f 'actions/set_rsc.cc' || echo '$(srcdir)/'`actions/set_rsc.cc actions/libmodsecurity_la-set_sid.lo: actions/set_sid.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT actions/libmodsecurity_la-set_sid.lo -MD -MP -MF actions/$(DEPDIR)/libmodsecurity_la-set_sid.Tpo -c -o actions/libmodsecurity_la-set_sid.lo `test -f 'actions/set_sid.cc' || echo '$(srcdir)/'`actions/set_sid.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) actions/$(DEPDIR)/libmodsecurity_la-set_sid.Tpo actions/$(DEPDIR)/libmodsecurity_la-set_sid.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='actions/set_sid.cc' object='actions/libmodsecurity_la-set_sid.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o actions/libmodsecurity_la-set_sid.lo `test -f 'actions/set_sid.cc' || echo '$(srcdir)/'`actions/set_sid.cc actions/libmodsecurity_la-set_uid.lo: actions/set_uid.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT actions/libmodsecurity_la-set_uid.lo -MD -MP -MF actions/$(DEPDIR)/libmodsecurity_la-set_uid.Tpo -c -o actions/libmodsecurity_la-set_uid.lo `test -f 'actions/set_uid.cc' || echo '$(srcdir)/'`actions/set_uid.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) actions/$(DEPDIR)/libmodsecurity_la-set_uid.Tpo actions/$(DEPDIR)/libmodsecurity_la-set_uid.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='actions/set_uid.cc' object='actions/libmodsecurity_la-set_uid.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o actions/libmodsecurity_la-set_uid.lo `test -f 'actions/set_uid.cc' || echo '$(srcdir)/'`actions/set_uid.cc actions/libmodsecurity_la-set_var.lo: actions/set_var.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT actions/libmodsecurity_la-set_var.lo -MD -MP -MF actions/$(DEPDIR)/libmodsecurity_la-set_var.Tpo -c -o actions/libmodsecurity_la-set_var.lo `test -f 'actions/set_var.cc' || echo '$(srcdir)/'`actions/set_var.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) actions/$(DEPDIR)/libmodsecurity_la-set_var.Tpo actions/$(DEPDIR)/libmodsecurity_la-set_var.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='actions/set_var.cc' object='actions/libmodsecurity_la-set_var.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o actions/libmodsecurity_la-set_var.lo `test -f 'actions/set_var.cc' || echo '$(srcdir)/'`actions/set_var.cc actions/data/libmodsecurity_la-status.lo: actions/data/status.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT actions/data/libmodsecurity_la-status.lo -MD -MP -MF actions/data/$(DEPDIR)/libmodsecurity_la-status.Tpo -c -o actions/data/libmodsecurity_la-status.lo `test -f 'actions/data/status.cc' || echo '$(srcdir)/'`actions/data/status.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) actions/data/$(DEPDIR)/libmodsecurity_la-status.Tpo actions/data/$(DEPDIR)/libmodsecurity_la-status.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='actions/data/status.cc' object='actions/data/libmodsecurity_la-status.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o actions/data/libmodsecurity_la-status.lo `test -f 'actions/data/status.cc' || echo '$(srcdir)/'`actions/data/status.cc actions/libmodsecurity_la-skip.lo: actions/skip.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT actions/libmodsecurity_la-skip.lo -MD -MP -MF actions/$(DEPDIR)/libmodsecurity_la-skip.Tpo -c -o actions/libmodsecurity_la-skip.lo `test -f 'actions/skip.cc' || echo '$(srcdir)/'`actions/skip.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) actions/$(DEPDIR)/libmodsecurity_la-skip.Tpo actions/$(DEPDIR)/libmodsecurity_la-skip.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='actions/skip.cc' object='actions/libmodsecurity_la-skip.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o actions/libmodsecurity_la-skip.lo `test -f 'actions/skip.cc' || echo '$(srcdir)/'`actions/skip.cc actions/libmodsecurity_la-skip_after.lo: actions/skip_after.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT actions/libmodsecurity_la-skip_after.lo -MD -MP -MF actions/$(DEPDIR)/libmodsecurity_la-skip_after.Tpo -c -o actions/libmodsecurity_la-skip_after.lo `test -f 'actions/skip_after.cc' || echo '$(srcdir)/'`actions/skip_after.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) actions/$(DEPDIR)/libmodsecurity_la-skip_after.Tpo actions/$(DEPDIR)/libmodsecurity_la-skip_after.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='actions/skip_after.cc' object='actions/libmodsecurity_la-skip_after.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o actions/libmodsecurity_la-skip_after.lo `test -f 'actions/skip_after.cc' || echo '$(srcdir)/'`actions/skip_after.cc actions/libmodsecurity_la-tag.lo: actions/tag.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT actions/libmodsecurity_la-tag.lo -MD -MP -MF actions/$(DEPDIR)/libmodsecurity_la-tag.Tpo -c -o actions/libmodsecurity_la-tag.lo `test -f 'actions/tag.cc' || echo '$(srcdir)/'`actions/tag.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) actions/$(DEPDIR)/libmodsecurity_la-tag.Tpo actions/$(DEPDIR)/libmodsecurity_la-tag.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='actions/tag.cc' object='actions/libmodsecurity_la-tag.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o actions/libmodsecurity_la-tag.lo `test -f 'actions/tag.cc' || echo '$(srcdir)/'`actions/tag.cc actions/transformations/libmodsecurity_la-base64_decode.lo: actions/transformations/base64_decode.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT actions/transformations/libmodsecurity_la-base64_decode.lo -MD -MP -MF actions/transformations/$(DEPDIR)/libmodsecurity_la-base64_decode.Tpo -c -o actions/transformations/libmodsecurity_la-base64_decode.lo `test -f 'actions/transformations/base64_decode.cc' || echo '$(srcdir)/'`actions/transformations/base64_decode.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) actions/transformations/$(DEPDIR)/libmodsecurity_la-base64_decode.Tpo actions/transformations/$(DEPDIR)/libmodsecurity_la-base64_decode.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='actions/transformations/base64_decode.cc' object='actions/transformations/libmodsecurity_la-base64_decode.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o actions/transformations/libmodsecurity_la-base64_decode.lo `test -f 'actions/transformations/base64_decode.cc' || echo '$(srcdir)/'`actions/transformations/base64_decode.cc actions/transformations/libmodsecurity_la-base64_encode.lo: actions/transformations/base64_encode.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT actions/transformations/libmodsecurity_la-base64_encode.lo -MD -MP -MF actions/transformations/$(DEPDIR)/libmodsecurity_la-base64_encode.Tpo -c -o actions/transformations/libmodsecurity_la-base64_encode.lo `test -f 'actions/transformations/base64_encode.cc' || echo '$(srcdir)/'`actions/transformations/base64_encode.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) actions/transformations/$(DEPDIR)/libmodsecurity_la-base64_encode.Tpo actions/transformations/$(DEPDIR)/libmodsecurity_la-base64_encode.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='actions/transformations/base64_encode.cc' object='actions/transformations/libmodsecurity_la-base64_encode.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o actions/transformations/libmodsecurity_la-base64_encode.lo `test -f 'actions/transformations/base64_encode.cc' || echo '$(srcdir)/'`actions/transformations/base64_encode.cc actions/transformations/libmodsecurity_la-base64_decode_ext.lo: actions/transformations/base64_decode_ext.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT actions/transformations/libmodsecurity_la-base64_decode_ext.lo -MD -MP -MF actions/transformations/$(DEPDIR)/libmodsecurity_la-base64_decode_ext.Tpo -c -o actions/transformations/libmodsecurity_la-base64_decode_ext.lo `test -f 'actions/transformations/base64_decode_ext.cc' || echo '$(srcdir)/'`actions/transformations/base64_decode_ext.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) actions/transformations/$(DEPDIR)/libmodsecurity_la-base64_decode_ext.Tpo actions/transformations/$(DEPDIR)/libmodsecurity_la-base64_decode_ext.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='actions/transformations/base64_decode_ext.cc' object='actions/transformations/libmodsecurity_la-base64_decode_ext.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o actions/transformations/libmodsecurity_la-base64_decode_ext.lo `test -f 'actions/transformations/base64_decode_ext.cc' || echo '$(srcdir)/'`actions/transformations/base64_decode_ext.cc actions/transformations/libmodsecurity_la-cmd_line.lo: actions/transformations/cmd_line.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT actions/transformations/libmodsecurity_la-cmd_line.lo -MD -MP -MF actions/transformations/$(DEPDIR)/libmodsecurity_la-cmd_line.Tpo -c -o actions/transformations/libmodsecurity_la-cmd_line.lo `test -f 'actions/transformations/cmd_line.cc' || echo '$(srcdir)/'`actions/transformations/cmd_line.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) actions/transformations/$(DEPDIR)/libmodsecurity_la-cmd_line.Tpo actions/transformations/$(DEPDIR)/libmodsecurity_la-cmd_line.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='actions/transformations/cmd_line.cc' object='actions/transformations/libmodsecurity_la-cmd_line.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o actions/transformations/libmodsecurity_la-cmd_line.lo `test -f 'actions/transformations/cmd_line.cc' || echo '$(srcdir)/'`actions/transformations/cmd_line.cc actions/transformations/libmodsecurity_la-compress_whitespace.lo: actions/transformations/compress_whitespace.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT actions/transformations/libmodsecurity_la-compress_whitespace.lo -MD -MP -MF actions/transformations/$(DEPDIR)/libmodsecurity_la-compress_whitespace.Tpo -c -o actions/transformations/libmodsecurity_la-compress_whitespace.lo `test -f 'actions/transformations/compress_whitespace.cc' || echo '$(srcdir)/'`actions/transformations/compress_whitespace.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) actions/transformations/$(DEPDIR)/libmodsecurity_la-compress_whitespace.Tpo actions/transformations/$(DEPDIR)/libmodsecurity_la-compress_whitespace.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='actions/transformations/compress_whitespace.cc' object='actions/transformations/libmodsecurity_la-compress_whitespace.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o actions/transformations/libmodsecurity_la-compress_whitespace.lo `test -f 'actions/transformations/compress_whitespace.cc' || echo '$(srcdir)/'`actions/transformations/compress_whitespace.cc actions/transformations/libmodsecurity_la-css_decode.lo: actions/transformations/css_decode.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT actions/transformations/libmodsecurity_la-css_decode.lo -MD -MP -MF actions/transformations/$(DEPDIR)/libmodsecurity_la-css_decode.Tpo -c -o actions/transformations/libmodsecurity_la-css_decode.lo `test -f 'actions/transformations/css_decode.cc' || echo '$(srcdir)/'`actions/transformations/css_decode.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) actions/transformations/$(DEPDIR)/libmodsecurity_la-css_decode.Tpo actions/transformations/$(DEPDIR)/libmodsecurity_la-css_decode.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='actions/transformations/css_decode.cc' object='actions/transformations/libmodsecurity_la-css_decode.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o actions/transformations/libmodsecurity_la-css_decode.lo `test -f 'actions/transformations/css_decode.cc' || echo '$(srcdir)/'`actions/transformations/css_decode.cc actions/transformations/libmodsecurity_la-escape_seq_decode.lo: actions/transformations/escape_seq_decode.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT actions/transformations/libmodsecurity_la-escape_seq_decode.lo -MD -MP -MF actions/transformations/$(DEPDIR)/libmodsecurity_la-escape_seq_decode.Tpo -c -o actions/transformations/libmodsecurity_la-escape_seq_decode.lo `test -f 'actions/transformations/escape_seq_decode.cc' || echo '$(srcdir)/'`actions/transformations/escape_seq_decode.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) actions/transformations/$(DEPDIR)/libmodsecurity_la-escape_seq_decode.Tpo actions/transformations/$(DEPDIR)/libmodsecurity_la-escape_seq_decode.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='actions/transformations/escape_seq_decode.cc' object='actions/transformations/libmodsecurity_la-escape_seq_decode.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o actions/transformations/libmodsecurity_la-escape_seq_decode.lo `test -f 'actions/transformations/escape_seq_decode.cc' || echo '$(srcdir)/'`actions/transformations/escape_seq_decode.cc actions/transformations/libmodsecurity_la-hex_decode.lo: actions/transformations/hex_decode.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT actions/transformations/libmodsecurity_la-hex_decode.lo -MD -MP -MF actions/transformations/$(DEPDIR)/libmodsecurity_la-hex_decode.Tpo -c -o actions/transformations/libmodsecurity_la-hex_decode.lo `test -f 'actions/transformations/hex_decode.cc' || echo '$(srcdir)/'`actions/transformations/hex_decode.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) actions/transformations/$(DEPDIR)/libmodsecurity_la-hex_decode.Tpo actions/transformations/$(DEPDIR)/libmodsecurity_la-hex_decode.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='actions/transformations/hex_decode.cc' object='actions/transformations/libmodsecurity_la-hex_decode.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o actions/transformations/libmodsecurity_la-hex_decode.lo `test -f 'actions/transformations/hex_decode.cc' || echo '$(srcdir)/'`actions/transformations/hex_decode.cc actions/transformations/libmodsecurity_la-hex_encode.lo: actions/transformations/hex_encode.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT actions/transformations/libmodsecurity_la-hex_encode.lo -MD -MP -MF actions/transformations/$(DEPDIR)/libmodsecurity_la-hex_encode.Tpo -c -o actions/transformations/libmodsecurity_la-hex_encode.lo `test -f 'actions/transformations/hex_encode.cc' || echo '$(srcdir)/'`actions/transformations/hex_encode.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) actions/transformations/$(DEPDIR)/libmodsecurity_la-hex_encode.Tpo actions/transformations/$(DEPDIR)/libmodsecurity_la-hex_encode.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='actions/transformations/hex_encode.cc' object='actions/transformations/libmodsecurity_la-hex_encode.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o actions/transformations/libmodsecurity_la-hex_encode.lo `test -f 'actions/transformations/hex_encode.cc' || echo '$(srcdir)/'`actions/transformations/hex_encode.cc actions/transformations/libmodsecurity_la-html_entity_decode.lo: actions/transformations/html_entity_decode.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT actions/transformations/libmodsecurity_la-html_entity_decode.lo -MD -MP -MF actions/transformations/$(DEPDIR)/libmodsecurity_la-html_entity_decode.Tpo -c -o actions/transformations/libmodsecurity_la-html_entity_decode.lo `test -f 'actions/transformations/html_entity_decode.cc' || echo '$(srcdir)/'`actions/transformations/html_entity_decode.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) actions/transformations/$(DEPDIR)/libmodsecurity_la-html_entity_decode.Tpo actions/transformations/$(DEPDIR)/libmodsecurity_la-html_entity_decode.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='actions/transformations/html_entity_decode.cc' object='actions/transformations/libmodsecurity_la-html_entity_decode.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o actions/transformations/libmodsecurity_la-html_entity_decode.lo `test -f 'actions/transformations/html_entity_decode.cc' || echo '$(srcdir)/'`actions/transformations/html_entity_decode.cc actions/transformations/libmodsecurity_la-js_decode.lo: actions/transformations/js_decode.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT actions/transformations/libmodsecurity_la-js_decode.lo -MD -MP -MF actions/transformations/$(DEPDIR)/libmodsecurity_la-js_decode.Tpo -c -o actions/transformations/libmodsecurity_la-js_decode.lo `test -f 'actions/transformations/js_decode.cc' || echo '$(srcdir)/'`actions/transformations/js_decode.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) actions/transformations/$(DEPDIR)/libmodsecurity_la-js_decode.Tpo actions/transformations/$(DEPDIR)/libmodsecurity_la-js_decode.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='actions/transformations/js_decode.cc' object='actions/transformations/libmodsecurity_la-js_decode.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o actions/transformations/libmodsecurity_la-js_decode.lo `test -f 'actions/transformations/js_decode.cc' || echo '$(srcdir)/'`actions/transformations/js_decode.cc actions/transformations/libmodsecurity_la-length.lo: actions/transformations/length.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT actions/transformations/libmodsecurity_la-length.lo -MD -MP -MF actions/transformations/$(DEPDIR)/libmodsecurity_la-length.Tpo -c -o actions/transformations/libmodsecurity_la-length.lo `test -f 'actions/transformations/length.cc' || echo '$(srcdir)/'`actions/transformations/length.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) actions/transformations/$(DEPDIR)/libmodsecurity_la-length.Tpo actions/transformations/$(DEPDIR)/libmodsecurity_la-length.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='actions/transformations/length.cc' object='actions/transformations/libmodsecurity_la-length.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o actions/transformations/libmodsecurity_la-length.lo `test -f 'actions/transformations/length.cc' || echo '$(srcdir)/'`actions/transformations/length.cc actions/transformations/libmodsecurity_la-lower_case.lo: actions/transformations/lower_case.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT actions/transformations/libmodsecurity_la-lower_case.lo -MD -MP -MF actions/transformations/$(DEPDIR)/libmodsecurity_la-lower_case.Tpo -c -o actions/transformations/libmodsecurity_la-lower_case.lo `test -f 'actions/transformations/lower_case.cc' || echo '$(srcdir)/'`actions/transformations/lower_case.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) actions/transformations/$(DEPDIR)/libmodsecurity_la-lower_case.Tpo actions/transformations/$(DEPDIR)/libmodsecurity_la-lower_case.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='actions/transformations/lower_case.cc' object='actions/transformations/libmodsecurity_la-lower_case.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o actions/transformations/libmodsecurity_la-lower_case.lo `test -f 'actions/transformations/lower_case.cc' || echo '$(srcdir)/'`actions/transformations/lower_case.cc actions/transformations/libmodsecurity_la-md5.lo: actions/transformations/md5.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT actions/transformations/libmodsecurity_la-md5.lo -MD -MP -MF actions/transformations/$(DEPDIR)/libmodsecurity_la-md5.Tpo -c -o actions/transformations/libmodsecurity_la-md5.lo `test -f 'actions/transformations/md5.cc' || echo '$(srcdir)/'`actions/transformations/md5.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) actions/transformations/$(DEPDIR)/libmodsecurity_la-md5.Tpo actions/transformations/$(DEPDIR)/libmodsecurity_la-md5.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='actions/transformations/md5.cc' object='actions/transformations/libmodsecurity_la-md5.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o actions/transformations/libmodsecurity_la-md5.lo `test -f 'actions/transformations/md5.cc' || echo '$(srcdir)/'`actions/transformations/md5.cc actions/transformations/libmodsecurity_la-none.lo: actions/transformations/none.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT actions/transformations/libmodsecurity_la-none.lo -MD -MP -MF actions/transformations/$(DEPDIR)/libmodsecurity_la-none.Tpo -c -o actions/transformations/libmodsecurity_la-none.lo `test -f 'actions/transformations/none.cc' || echo '$(srcdir)/'`actions/transformations/none.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) actions/transformations/$(DEPDIR)/libmodsecurity_la-none.Tpo actions/transformations/$(DEPDIR)/libmodsecurity_la-none.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='actions/transformations/none.cc' object='actions/transformations/libmodsecurity_la-none.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o actions/transformations/libmodsecurity_la-none.lo `test -f 'actions/transformations/none.cc' || echo '$(srcdir)/'`actions/transformations/none.cc actions/transformations/libmodsecurity_la-normalise_path.lo: actions/transformations/normalise_path.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT actions/transformations/libmodsecurity_la-normalise_path.lo -MD -MP -MF actions/transformations/$(DEPDIR)/libmodsecurity_la-normalise_path.Tpo -c -o actions/transformations/libmodsecurity_la-normalise_path.lo `test -f 'actions/transformations/normalise_path.cc' || echo '$(srcdir)/'`actions/transformations/normalise_path.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) actions/transformations/$(DEPDIR)/libmodsecurity_la-normalise_path.Tpo actions/transformations/$(DEPDIR)/libmodsecurity_la-normalise_path.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='actions/transformations/normalise_path.cc' object='actions/transformations/libmodsecurity_la-normalise_path.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o actions/transformations/libmodsecurity_la-normalise_path.lo `test -f 'actions/transformations/normalise_path.cc' || echo '$(srcdir)/'`actions/transformations/normalise_path.cc actions/transformations/libmodsecurity_la-normalise_path_win.lo: actions/transformations/normalise_path_win.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT actions/transformations/libmodsecurity_la-normalise_path_win.lo -MD -MP -MF actions/transformations/$(DEPDIR)/libmodsecurity_la-normalise_path_win.Tpo -c -o actions/transformations/libmodsecurity_la-normalise_path_win.lo `test -f 'actions/transformations/normalise_path_win.cc' || echo '$(srcdir)/'`actions/transformations/normalise_path_win.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) actions/transformations/$(DEPDIR)/libmodsecurity_la-normalise_path_win.Tpo actions/transformations/$(DEPDIR)/libmodsecurity_la-normalise_path_win.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='actions/transformations/normalise_path_win.cc' object='actions/transformations/libmodsecurity_la-normalise_path_win.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o actions/transformations/libmodsecurity_la-normalise_path_win.lo `test -f 'actions/transformations/normalise_path_win.cc' || echo '$(srcdir)/'`actions/transformations/normalise_path_win.cc actions/transformations/libmodsecurity_la-parity_even_7bit.lo: actions/transformations/parity_even_7bit.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT actions/transformations/libmodsecurity_la-parity_even_7bit.lo -MD -MP -MF actions/transformations/$(DEPDIR)/libmodsecurity_la-parity_even_7bit.Tpo -c -o actions/transformations/libmodsecurity_la-parity_even_7bit.lo `test -f 'actions/transformations/parity_even_7bit.cc' || echo '$(srcdir)/'`actions/transformations/parity_even_7bit.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) actions/transformations/$(DEPDIR)/libmodsecurity_la-parity_even_7bit.Tpo actions/transformations/$(DEPDIR)/libmodsecurity_la-parity_even_7bit.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='actions/transformations/parity_even_7bit.cc' object='actions/transformations/libmodsecurity_la-parity_even_7bit.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o actions/transformations/libmodsecurity_la-parity_even_7bit.lo `test -f 'actions/transformations/parity_even_7bit.cc' || echo '$(srcdir)/'`actions/transformations/parity_even_7bit.cc actions/transformations/libmodsecurity_la-parity_odd_7bit.lo: actions/transformations/parity_odd_7bit.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT actions/transformations/libmodsecurity_la-parity_odd_7bit.lo -MD -MP -MF actions/transformations/$(DEPDIR)/libmodsecurity_la-parity_odd_7bit.Tpo -c -o actions/transformations/libmodsecurity_la-parity_odd_7bit.lo `test -f 'actions/transformations/parity_odd_7bit.cc' || echo '$(srcdir)/'`actions/transformations/parity_odd_7bit.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) actions/transformations/$(DEPDIR)/libmodsecurity_la-parity_odd_7bit.Tpo actions/transformations/$(DEPDIR)/libmodsecurity_la-parity_odd_7bit.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='actions/transformations/parity_odd_7bit.cc' object='actions/transformations/libmodsecurity_la-parity_odd_7bit.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o actions/transformations/libmodsecurity_la-parity_odd_7bit.lo `test -f 'actions/transformations/parity_odd_7bit.cc' || echo '$(srcdir)/'`actions/transformations/parity_odd_7bit.cc actions/transformations/libmodsecurity_la-parity_zero_7bit.lo: actions/transformations/parity_zero_7bit.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT actions/transformations/libmodsecurity_la-parity_zero_7bit.lo -MD -MP -MF actions/transformations/$(DEPDIR)/libmodsecurity_la-parity_zero_7bit.Tpo -c -o actions/transformations/libmodsecurity_la-parity_zero_7bit.lo `test -f 'actions/transformations/parity_zero_7bit.cc' || echo '$(srcdir)/'`actions/transformations/parity_zero_7bit.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) actions/transformations/$(DEPDIR)/libmodsecurity_la-parity_zero_7bit.Tpo actions/transformations/$(DEPDIR)/libmodsecurity_la-parity_zero_7bit.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='actions/transformations/parity_zero_7bit.cc' object='actions/transformations/libmodsecurity_la-parity_zero_7bit.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o actions/transformations/libmodsecurity_la-parity_zero_7bit.lo `test -f 'actions/transformations/parity_zero_7bit.cc' || echo '$(srcdir)/'`actions/transformations/parity_zero_7bit.cc actions/transformations/libmodsecurity_la-remove_comments.lo: actions/transformations/remove_comments.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT actions/transformations/libmodsecurity_la-remove_comments.lo -MD -MP -MF actions/transformations/$(DEPDIR)/libmodsecurity_la-remove_comments.Tpo -c -o actions/transformations/libmodsecurity_la-remove_comments.lo `test -f 'actions/transformations/remove_comments.cc' || echo '$(srcdir)/'`actions/transformations/remove_comments.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) actions/transformations/$(DEPDIR)/libmodsecurity_la-remove_comments.Tpo actions/transformations/$(DEPDIR)/libmodsecurity_la-remove_comments.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='actions/transformations/remove_comments.cc' object='actions/transformations/libmodsecurity_la-remove_comments.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o actions/transformations/libmodsecurity_la-remove_comments.lo `test -f 'actions/transformations/remove_comments.cc' || echo '$(srcdir)/'`actions/transformations/remove_comments.cc actions/transformations/libmodsecurity_la-remove_comments_char.lo: actions/transformations/remove_comments_char.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT actions/transformations/libmodsecurity_la-remove_comments_char.lo -MD -MP -MF actions/transformations/$(DEPDIR)/libmodsecurity_la-remove_comments_char.Tpo -c -o actions/transformations/libmodsecurity_la-remove_comments_char.lo `test -f 'actions/transformations/remove_comments_char.cc' || echo '$(srcdir)/'`actions/transformations/remove_comments_char.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) actions/transformations/$(DEPDIR)/libmodsecurity_la-remove_comments_char.Tpo actions/transformations/$(DEPDIR)/libmodsecurity_la-remove_comments_char.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='actions/transformations/remove_comments_char.cc' object='actions/transformations/libmodsecurity_la-remove_comments_char.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o actions/transformations/libmodsecurity_la-remove_comments_char.lo `test -f 'actions/transformations/remove_comments_char.cc' || echo '$(srcdir)/'`actions/transformations/remove_comments_char.cc actions/transformations/libmodsecurity_la-remove_nulls.lo: actions/transformations/remove_nulls.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT actions/transformations/libmodsecurity_la-remove_nulls.lo -MD -MP -MF actions/transformations/$(DEPDIR)/libmodsecurity_la-remove_nulls.Tpo -c -o actions/transformations/libmodsecurity_la-remove_nulls.lo `test -f 'actions/transformations/remove_nulls.cc' || echo '$(srcdir)/'`actions/transformations/remove_nulls.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) actions/transformations/$(DEPDIR)/libmodsecurity_la-remove_nulls.Tpo actions/transformations/$(DEPDIR)/libmodsecurity_la-remove_nulls.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='actions/transformations/remove_nulls.cc' object='actions/transformations/libmodsecurity_la-remove_nulls.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o actions/transformations/libmodsecurity_la-remove_nulls.lo `test -f 'actions/transformations/remove_nulls.cc' || echo '$(srcdir)/'`actions/transformations/remove_nulls.cc actions/transformations/libmodsecurity_la-remove_whitespace.lo: actions/transformations/remove_whitespace.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT actions/transformations/libmodsecurity_la-remove_whitespace.lo -MD -MP -MF actions/transformations/$(DEPDIR)/libmodsecurity_la-remove_whitespace.Tpo -c -o actions/transformations/libmodsecurity_la-remove_whitespace.lo `test -f 'actions/transformations/remove_whitespace.cc' || echo '$(srcdir)/'`actions/transformations/remove_whitespace.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) actions/transformations/$(DEPDIR)/libmodsecurity_la-remove_whitespace.Tpo actions/transformations/$(DEPDIR)/libmodsecurity_la-remove_whitespace.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='actions/transformations/remove_whitespace.cc' object='actions/transformations/libmodsecurity_la-remove_whitespace.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o actions/transformations/libmodsecurity_la-remove_whitespace.lo `test -f 'actions/transformations/remove_whitespace.cc' || echo '$(srcdir)/'`actions/transformations/remove_whitespace.cc actions/transformations/libmodsecurity_la-replace_comments.lo: actions/transformations/replace_comments.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT actions/transformations/libmodsecurity_la-replace_comments.lo -MD -MP -MF actions/transformations/$(DEPDIR)/libmodsecurity_la-replace_comments.Tpo -c -o actions/transformations/libmodsecurity_la-replace_comments.lo `test -f 'actions/transformations/replace_comments.cc' || echo '$(srcdir)/'`actions/transformations/replace_comments.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) actions/transformations/$(DEPDIR)/libmodsecurity_la-replace_comments.Tpo actions/transformations/$(DEPDIR)/libmodsecurity_la-replace_comments.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='actions/transformations/replace_comments.cc' object='actions/transformations/libmodsecurity_la-replace_comments.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o actions/transformations/libmodsecurity_la-replace_comments.lo `test -f 'actions/transformations/replace_comments.cc' || echo '$(srcdir)/'`actions/transformations/replace_comments.cc actions/transformations/libmodsecurity_la-replace_nulls.lo: actions/transformations/replace_nulls.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT actions/transformations/libmodsecurity_la-replace_nulls.lo -MD -MP -MF actions/transformations/$(DEPDIR)/libmodsecurity_la-replace_nulls.Tpo -c -o actions/transformations/libmodsecurity_la-replace_nulls.lo `test -f 'actions/transformations/replace_nulls.cc' || echo '$(srcdir)/'`actions/transformations/replace_nulls.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) actions/transformations/$(DEPDIR)/libmodsecurity_la-replace_nulls.Tpo actions/transformations/$(DEPDIR)/libmodsecurity_la-replace_nulls.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='actions/transformations/replace_nulls.cc' object='actions/transformations/libmodsecurity_la-replace_nulls.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o actions/transformations/libmodsecurity_la-replace_nulls.lo `test -f 'actions/transformations/replace_nulls.cc' || echo '$(srcdir)/'`actions/transformations/replace_nulls.cc actions/transformations/libmodsecurity_la-sha1.lo: actions/transformations/sha1.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT actions/transformations/libmodsecurity_la-sha1.lo -MD -MP -MF actions/transformations/$(DEPDIR)/libmodsecurity_la-sha1.Tpo -c -o actions/transformations/libmodsecurity_la-sha1.lo `test -f 'actions/transformations/sha1.cc' || echo '$(srcdir)/'`actions/transformations/sha1.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) actions/transformations/$(DEPDIR)/libmodsecurity_la-sha1.Tpo actions/transformations/$(DEPDIR)/libmodsecurity_la-sha1.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='actions/transformations/sha1.cc' object='actions/transformations/libmodsecurity_la-sha1.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o actions/transformations/libmodsecurity_la-sha1.lo `test -f 'actions/transformations/sha1.cc' || echo '$(srcdir)/'`actions/transformations/sha1.cc actions/transformations/libmodsecurity_la-sql_hex_decode.lo: actions/transformations/sql_hex_decode.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT actions/transformations/libmodsecurity_la-sql_hex_decode.lo -MD -MP -MF actions/transformations/$(DEPDIR)/libmodsecurity_la-sql_hex_decode.Tpo -c -o actions/transformations/libmodsecurity_la-sql_hex_decode.lo `test -f 'actions/transformations/sql_hex_decode.cc' || echo '$(srcdir)/'`actions/transformations/sql_hex_decode.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) actions/transformations/$(DEPDIR)/libmodsecurity_la-sql_hex_decode.Tpo actions/transformations/$(DEPDIR)/libmodsecurity_la-sql_hex_decode.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='actions/transformations/sql_hex_decode.cc' object='actions/transformations/libmodsecurity_la-sql_hex_decode.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o actions/transformations/libmodsecurity_la-sql_hex_decode.lo `test -f 'actions/transformations/sql_hex_decode.cc' || echo '$(srcdir)/'`actions/transformations/sql_hex_decode.cc actions/transformations/libmodsecurity_la-transformation.lo: actions/transformations/transformation.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT actions/transformations/libmodsecurity_la-transformation.lo -MD -MP -MF actions/transformations/$(DEPDIR)/libmodsecurity_la-transformation.Tpo -c -o actions/transformations/libmodsecurity_la-transformation.lo `test -f 'actions/transformations/transformation.cc' || echo '$(srcdir)/'`actions/transformations/transformation.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) actions/transformations/$(DEPDIR)/libmodsecurity_la-transformation.Tpo actions/transformations/$(DEPDIR)/libmodsecurity_la-transformation.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='actions/transformations/transformation.cc' object='actions/transformations/libmodsecurity_la-transformation.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o actions/transformations/libmodsecurity_la-transformation.lo `test -f 'actions/transformations/transformation.cc' || echo '$(srcdir)/'`actions/transformations/transformation.cc actions/transformations/libmodsecurity_la-trim.lo: actions/transformations/trim.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT actions/transformations/libmodsecurity_la-trim.lo -MD -MP -MF actions/transformations/$(DEPDIR)/libmodsecurity_la-trim.Tpo -c -o actions/transformations/libmodsecurity_la-trim.lo `test -f 'actions/transformations/trim.cc' || echo '$(srcdir)/'`actions/transformations/trim.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) actions/transformations/$(DEPDIR)/libmodsecurity_la-trim.Tpo actions/transformations/$(DEPDIR)/libmodsecurity_la-trim.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='actions/transformations/trim.cc' object='actions/transformations/libmodsecurity_la-trim.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o actions/transformations/libmodsecurity_la-trim.lo `test -f 'actions/transformations/trim.cc' || echo '$(srcdir)/'`actions/transformations/trim.cc actions/transformations/libmodsecurity_la-trim_left.lo: actions/transformations/trim_left.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT actions/transformations/libmodsecurity_la-trim_left.lo -MD -MP -MF actions/transformations/$(DEPDIR)/libmodsecurity_la-trim_left.Tpo -c -o actions/transformations/libmodsecurity_la-trim_left.lo `test -f 'actions/transformations/trim_left.cc' || echo '$(srcdir)/'`actions/transformations/trim_left.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) actions/transformations/$(DEPDIR)/libmodsecurity_la-trim_left.Tpo actions/transformations/$(DEPDIR)/libmodsecurity_la-trim_left.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='actions/transformations/trim_left.cc' object='actions/transformations/libmodsecurity_la-trim_left.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o actions/transformations/libmodsecurity_la-trim_left.lo `test -f 'actions/transformations/trim_left.cc' || echo '$(srcdir)/'`actions/transformations/trim_left.cc actions/transformations/libmodsecurity_la-trim_right.lo: actions/transformations/trim_right.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT actions/transformations/libmodsecurity_la-trim_right.lo -MD -MP -MF actions/transformations/$(DEPDIR)/libmodsecurity_la-trim_right.Tpo -c -o actions/transformations/libmodsecurity_la-trim_right.lo `test -f 'actions/transformations/trim_right.cc' || echo '$(srcdir)/'`actions/transformations/trim_right.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) actions/transformations/$(DEPDIR)/libmodsecurity_la-trim_right.Tpo actions/transformations/$(DEPDIR)/libmodsecurity_la-trim_right.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='actions/transformations/trim_right.cc' object='actions/transformations/libmodsecurity_la-trim_right.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o actions/transformations/libmodsecurity_la-trim_right.lo `test -f 'actions/transformations/trim_right.cc' || echo '$(srcdir)/'`actions/transformations/trim_right.cc actions/transformations/libmodsecurity_la-upper_case.lo: actions/transformations/upper_case.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT actions/transformations/libmodsecurity_la-upper_case.lo -MD -MP -MF actions/transformations/$(DEPDIR)/libmodsecurity_la-upper_case.Tpo -c -o actions/transformations/libmodsecurity_la-upper_case.lo `test -f 'actions/transformations/upper_case.cc' || echo '$(srcdir)/'`actions/transformations/upper_case.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) actions/transformations/$(DEPDIR)/libmodsecurity_la-upper_case.Tpo actions/transformations/$(DEPDIR)/libmodsecurity_la-upper_case.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='actions/transformations/upper_case.cc' object='actions/transformations/libmodsecurity_la-upper_case.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o actions/transformations/libmodsecurity_la-upper_case.lo `test -f 'actions/transformations/upper_case.cc' || echo '$(srcdir)/'`actions/transformations/upper_case.cc actions/transformations/libmodsecurity_la-url_decode.lo: actions/transformations/url_decode.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT actions/transformations/libmodsecurity_la-url_decode.lo -MD -MP -MF actions/transformations/$(DEPDIR)/libmodsecurity_la-url_decode.Tpo -c -o actions/transformations/libmodsecurity_la-url_decode.lo `test -f 'actions/transformations/url_decode.cc' || echo '$(srcdir)/'`actions/transformations/url_decode.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) actions/transformations/$(DEPDIR)/libmodsecurity_la-url_decode.Tpo actions/transformations/$(DEPDIR)/libmodsecurity_la-url_decode.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='actions/transformations/url_decode.cc' object='actions/transformations/libmodsecurity_la-url_decode.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o actions/transformations/libmodsecurity_la-url_decode.lo `test -f 'actions/transformations/url_decode.cc' || echo '$(srcdir)/'`actions/transformations/url_decode.cc actions/transformations/libmodsecurity_la-url_decode_uni.lo: actions/transformations/url_decode_uni.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT actions/transformations/libmodsecurity_la-url_decode_uni.lo -MD -MP -MF actions/transformations/$(DEPDIR)/libmodsecurity_la-url_decode_uni.Tpo -c -o actions/transformations/libmodsecurity_la-url_decode_uni.lo `test -f 'actions/transformations/url_decode_uni.cc' || echo '$(srcdir)/'`actions/transformations/url_decode_uni.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) actions/transformations/$(DEPDIR)/libmodsecurity_la-url_decode_uni.Tpo actions/transformations/$(DEPDIR)/libmodsecurity_la-url_decode_uni.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='actions/transformations/url_decode_uni.cc' object='actions/transformations/libmodsecurity_la-url_decode_uni.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o actions/transformations/libmodsecurity_la-url_decode_uni.lo `test -f 'actions/transformations/url_decode_uni.cc' || echo '$(srcdir)/'`actions/transformations/url_decode_uni.cc actions/transformations/libmodsecurity_la-url_encode.lo: actions/transformations/url_encode.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT actions/transformations/libmodsecurity_la-url_encode.lo -MD -MP -MF actions/transformations/$(DEPDIR)/libmodsecurity_la-url_encode.Tpo -c -o actions/transformations/libmodsecurity_la-url_encode.lo `test -f 'actions/transformations/url_encode.cc' || echo '$(srcdir)/'`actions/transformations/url_encode.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) actions/transformations/$(DEPDIR)/libmodsecurity_la-url_encode.Tpo actions/transformations/$(DEPDIR)/libmodsecurity_la-url_encode.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='actions/transformations/url_encode.cc' object='actions/transformations/libmodsecurity_la-url_encode.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o actions/transformations/libmodsecurity_la-url_encode.lo `test -f 'actions/transformations/url_encode.cc' || echo '$(srcdir)/'`actions/transformations/url_encode.cc actions/transformations/libmodsecurity_la-utf8_to_unicode.lo: actions/transformations/utf8_to_unicode.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT actions/transformations/libmodsecurity_la-utf8_to_unicode.lo -MD -MP -MF actions/transformations/$(DEPDIR)/libmodsecurity_la-utf8_to_unicode.Tpo -c -o actions/transformations/libmodsecurity_la-utf8_to_unicode.lo `test -f 'actions/transformations/utf8_to_unicode.cc' || echo '$(srcdir)/'`actions/transformations/utf8_to_unicode.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) actions/transformations/$(DEPDIR)/libmodsecurity_la-utf8_to_unicode.Tpo actions/transformations/$(DEPDIR)/libmodsecurity_la-utf8_to_unicode.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='actions/transformations/utf8_to_unicode.cc' object='actions/transformations/libmodsecurity_la-utf8_to_unicode.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o actions/transformations/libmodsecurity_la-utf8_to_unicode.lo `test -f 'actions/transformations/utf8_to_unicode.cc' || echo '$(srcdir)/'`actions/transformations/utf8_to_unicode.cc actions/libmodsecurity_la-ver.lo: actions/ver.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT actions/libmodsecurity_la-ver.lo -MD -MP -MF actions/$(DEPDIR)/libmodsecurity_la-ver.Tpo -c -o actions/libmodsecurity_la-ver.lo `test -f 'actions/ver.cc' || echo '$(srcdir)/'`actions/ver.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) actions/$(DEPDIR)/libmodsecurity_la-ver.Tpo actions/$(DEPDIR)/libmodsecurity_la-ver.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='actions/ver.cc' object='actions/libmodsecurity_la-ver.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o actions/libmodsecurity_la-ver.lo `test -f 'actions/ver.cc' || echo '$(srcdir)/'`actions/ver.cc actions/libmodsecurity_la-xmlns.lo: actions/xmlns.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT actions/libmodsecurity_la-xmlns.lo -MD -MP -MF actions/$(DEPDIR)/libmodsecurity_la-xmlns.Tpo -c -o actions/libmodsecurity_la-xmlns.lo `test -f 'actions/xmlns.cc' || echo '$(srcdir)/'`actions/xmlns.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) actions/$(DEPDIR)/libmodsecurity_la-xmlns.Tpo actions/$(DEPDIR)/libmodsecurity_la-xmlns.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='actions/xmlns.cc' object='actions/libmodsecurity_la-xmlns.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o actions/libmodsecurity_la-xmlns.lo `test -f 'actions/xmlns.cc' || echo '$(srcdir)/'`actions/xmlns.cc engine/libmodsecurity_la-lua.lo: engine/lua.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT engine/libmodsecurity_la-lua.lo -MD -MP -MF engine/$(DEPDIR)/libmodsecurity_la-lua.Tpo -c -o engine/libmodsecurity_la-lua.lo `test -f 'engine/lua.cc' || echo '$(srcdir)/'`engine/lua.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) engine/$(DEPDIR)/libmodsecurity_la-lua.Tpo engine/$(DEPDIR)/libmodsecurity_la-lua.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='engine/lua.cc' object='engine/libmodsecurity_la-lua.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o engine/libmodsecurity_la-lua.lo `test -f 'engine/lua.cc' || echo '$(srcdir)/'`engine/lua.cc collection/libmodsecurity_la-collections.lo: collection/collections.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT collection/libmodsecurity_la-collections.lo -MD -MP -MF collection/$(DEPDIR)/libmodsecurity_la-collections.Tpo -c -o collection/libmodsecurity_la-collections.lo `test -f 'collection/collections.cc' || echo '$(srcdir)/'`collection/collections.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) collection/$(DEPDIR)/libmodsecurity_la-collections.Tpo collection/$(DEPDIR)/libmodsecurity_la-collections.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='collection/collections.cc' object='collection/libmodsecurity_la-collections.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o collection/libmodsecurity_la-collections.lo `test -f 'collection/collections.cc' || echo '$(srcdir)/'`collection/collections.cc collection/backend/libmodsecurity_la-in_memory-per_process.lo: collection/backend/in_memory-per_process.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT collection/backend/libmodsecurity_la-in_memory-per_process.lo -MD -MP -MF collection/backend/$(DEPDIR)/libmodsecurity_la-in_memory-per_process.Tpo -c -o collection/backend/libmodsecurity_la-in_memory-per_process.lo `test -f 'collection/backend/in_memory-per_process.cc' || echo '$(srcdir)/'`collection/backend/in_memory-per_process.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) collection/backend/$(DEPDIR)/libmodsecurity_la-in_memory-per_process.Tpo collection/backend/$(DEPDIR)/libmodsecurity_la-in_memory-per_process.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='collection/backend/in_memory-per_process.cc' object='collection/backend/libmodsecurity_la-in_memory-per_process.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o collection/backend/libmodsecurity_la-in_memory-per_process.lo `test -f 'collection/backend/in_memory-per_process.cc' || echo '$(srcdir)/'`collection/backend/in_memory-per_process.cc collection/backend/libmodsecurity_la-lmdb.lo: collection/backend/lmdb.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT collection/backend/libmodsecurity_la-lmdb.lo -MD -MP -MF collection/backend/$(DEPDIR)/libmodsecurity_la-lmdb.Tpo -c -o collection/backend/libmodsecurity_la-lmdb.lo `test -f 'collection/backend/lmdb.cc' || echo '$(srcdir)/'`collection/backend/lmdb.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) collection/backend/$(DEPDIR)/libmodsecurity_la-lmdb.Tpo collection/backend/$(DEPDIR)/libmodsecurity_la-lmdb.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='collection/backend/lmdb.cc' object='collection/backend/libmodsecurity_la-lmdb.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o collection/backend/libmodsecurity_la-lmdb.lo `test -f 'collection/backend/lmdb.cc' || echo '$(srcdir)/'`collection/backend/lmdb.cc operators/libmodsecurity_la-begins_with.lo: operators/begins_with.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT operators/libmodsecurity_la-begins_with.lo -MD -MP -MF operators/$(DEPDIR)/libmodsecurity_la-begins_with.Tpo -c -o operators/libmodsecurity_la-begins_with.lo `test -f 'operators/begins_with.cc' || echo '$(srcdir)/'`operators/begins_with.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) operators/$(DEPDIR)/libmodsecurity_la-begins_with.Tpo operators/$(DEPDIR)/libmodsecurity_la-begins_with.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='operators/begins_with.cc' object='operators/libmodsecurity_la-begins_with.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o operators/libmodsecurity_la-begins_with.lo `test -f 'operators/begins_with.cc' || echo '$(srcdir)/'`operators/begins_with.cc operators/libmodsecurity_la-contains.lo: operators/contains.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT operators/libmodsecurity_la-contains.lo -MD -MP -MF operators/$(DEPDIR)/libmodsecurity_la-contains.Tpo -c -o operators/libmodsecurity_la-contains.lo `test -f 'operators/contains.cc' || echo '$(srcdir)/'`operators/contains.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) operators/$(DEPDIR)/libmodsecurity_la-contains.Tpo operators/$(DEPDIR)/libmodsecurity_la-contains.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='operators/contains.cc' object='operators/libmodsecurity_la-contains.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o operators/libmodsecurity_la-contains.lo `test -f 'operators/contains.cc' || echo '$(srcdir)/'`operators/contains.cc operators/libmodsecurity_la-contains_word.lo: operators/contains_word.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT operators/libmodsecurity_la-contains_word.lo -MD -MP -MF operators/$(DEPDIR)/libmodsecurity_la-contains_word.Tpo -c -o operators/libmodsecurity_la-contains_word.lo `test -f 'operators/contains_word.cc' || echo '$(srcdir)/'`operators/contains_word.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) operators/$(DEPDIR)/libmodsecurity_la-contains_word.Tpo operators/$(DEPDIR)/libmodsecurity_la-contains_word.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='operators/contains_word.cc' object='operators/libmodsecurity_la-contains_word.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o operators/libmodsecurity_la-contains_word.lo `test -f 'operators/contains_word.cc' || echo '$(srcdir)/'`operators/contains_word.cc operators/libmodsecurity_la-detect_sqli.lo: operators/detect_sqli.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT operators/libmodsecurity_la-detect_sqli.lo -MD -MP -MF operators/$(DEPDIR)/libmodsecurity_la-detect_sqli.Tpo -c -o operators/libmodsecurity_la-detect_sqli.lo `test -f 'operators/detect_sqli.cc' || echo '$(srcdir)/'`operators/detect_sqli.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) operators/$(DEPDIR)/libmodsecurity_la-detect_sqli.Tpo operators/$(DEPDIR)/libmodsecurity_la-detect_sqli.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='operators/detect_sqli.cc' object='operators/libmodsecurity_la-detect_sqli.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o operators/libmodsecurity_la-detect_sqli.lo `test -f 'operators/detect_sqli.cc' || echo '$(srcdir)/'`operators/detect_sqli.cc operators/libmodsecurity_la-detect_xss.lo: operators/detect_xss.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT operators/libmodsecurity_la-detect_xss.lo -MD -MP -MF operators/$(DEPDIR)/libmodsecurity_la-detect_xss.Tpo -c -o operators/libmodsecurity_la-detect_xss.lo `test -f 'operators/detect_xss.cc' || echo '$(srcdir)/'`operators/detect_xss.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) operators/$(DEPDIR)/libmodsecurity_la-detect_xss.Tpo operators/$(DEPDIR)/libmodsecurity_la-detect_xss.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='operators/detect_xss.cc' object='operators/libmodsecurity_la-detect_xss.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o operators/libmodsecurity_la-detect_xss.lo `test -f 'operators/detect_xss.cc' || echo '$(srcdir)/'`operators/detect_xss.cc operators/libmodsecurity_la-ends_with.lo: operators/ends_with.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT operators/libmodsecurity_la-ends_with.lo -MD -MP -MF operators/$(DEPDIR)/libmodsecurity_la-ends_with.Tpo -c -o operators/libmodsecurity_la-ends_with.lo `test -f 'operators/ends_with.cc' || echo '$(srcdir)/'`operators/ends_with.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) operators/$(DEPDIR)/libmodsecurity_la-ends_with.Tpo operators/$(DEPDIR)/libmodsecurity_la-ends_with.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='operators/ends_with.cc' object='operators/libmodsecurity_la-ends_with.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o operators/libmodsecurity_la-ends_with.lo `test -f 'operators/ends_with.cc' || echo '$(srcdir)/'`operators/ends_with.cc operators/libmodsecurity_la-eq.lo: operators/eq.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT operators/libmodsecurity_la-eq.lo -MD -MP -MF operators/$(DEPDIR)/libmodsecurity_la-eq.Tpo -c -o operators/libmodsecurity_la-eq.lo `test -f 'operators/eq.cc' || echo '$(srcdir)/'`operators/eq.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) operators/$(DEPDIR)/libmodsecurity_la-eq.Tpo operators/$(DEPDIR)/libmodsecurity_la-eq.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='operators/eq.cc' object='operators/libmodsecurity_la-eq.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o operators/libmodsecurity_la-eq.lo `test -f 'operators/eq.cc' || echo '$(srcdir)/'`operators/eq.cc operators/libmodsecurity_la-fuzzy_hash.lo: operators/fuzzy_hash.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT operators/libmodsecurity_la-fuzzy_hash.lo -MD -MP -MF operators/$(DEPDIR)/libmodsecurity_la-fuzzy_hash.Tpo -c -o operators/libmodsecurity_la-fuzzy_hash.lo `test -f 'operators/fuzzy_hash.cc' || echo '$(srcdir)/'`operators/fuzzy_hash.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) operators/$(DEPDIR)/libmodsecurity_la-fuzzy_hash.Tpo operators/$(DEPDIR)/libmodsecurity_la-fuzzy_hash.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='operators/fuzzy_hash.cc' object='operators/libmodsecurity_la-fuzzy_hash.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o operators/libmodsecurity_la-fuzzy_hash.lo `test -f 'operators/fuzzy_hash.cc' || echo '$(srcdir)/'`operators/fuzzy_hash.cc operators/libmodsecurity_la-ge.lo: operators/ge.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT operators/libmodsecurity_la-ge.lo -MD -MP -MF operators/$(DEPDIR)/libmodsecurity_la-ge.Tpo -c -o operators/libmodsecurity_la-ge.lo `test -f 'operators/ge.cc' || echo '$(srcdir)/'`operators/ge.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) operators/$(DEPDIR)/libmodsecurity_la-ge.Tpo operators/$(DEPDIR)/libmodsecurity_la-ge.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='operators/ge.cc' object='operators/libmodsecurity_la-ge.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o operators/libmodsecurity_la-ge.lo `test -f 'operators/ge.cc' || echo '$(srcdir)/'`operators/ge.cc operators/libmodsecurity_la-geo_lookup.lo: operators/geo_lookup.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT operators/libmodsecurity_la-geo_lookup.lo -MD -MP -MF operators/$(DEPDIR)/libmodsecurity_la-geo_lookup.Tpo -c -o operators/libmodsecurity_la-geo_lookup.lo `test -f 'operators/geo_lookup.cc' || echo '$(srcdir)/'`operators/geo_lookup.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) operators/$(DEPDIR)/libmodsecurity_la-geo_lookup.Tpo operators/$(DEPDIR)/libmodsecurity_la-geo_lookup.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='operators/geo_lookup.cc' object='operators/libmodsecurity_la-geo_lookup.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o operators/libmodsecurity_la-geo_lookup.lo `test -f 'operators/geo_lookup.cc' || echo '$(srcdir)/'`operators/geo_lookup.cc operators/libmodsecurity_la-gsblookup.lo: operators/gsblookup.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT operators/libmodsecurity_la-gsblookup.lo -MD -MP -MF operators/$(DEPDIR)/libmodsecurity_la-gsblookup.Tpo -c -o operators/libmodsecurity_la-gsblookup.lo `test -f 'operators/gsblookup.cc' || echo '$(srcdir)/'`operators/gsblookup.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) operators/$(DEPDIR)/libmodsecurity_la-gsblookup.Tpo operators/$(DEPDIR)/libmodsecurity_la-gsblookup.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='operators/gsblookup.cc' object='operators/libmodsecurity_la-gsblookup.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o operators/libmodsecurity_la-gsblookup.lo `test -f 'operators/gsblookup.cc' || echo '$(srcdir)/'`operators/gsblookup.cc operators/libmodsecurity_la-gt.lo: operators/gt.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT operators/libmodsecurity_la-gt.lo -MD -MP -MF operators/$(DEPDIR)/libmodsecurity_la-gt.Tpo -c -o operators/libmodsecurity_la-gt.lo `test -f 'operators/gt.cc' || echo '$(srcdir)/'`operators/gt.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) operators/$(DEPDIR)/libmodsecurity_la-gt.Tpo operators/$(DEPDIR)/libmodsecurity_la-gt.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='operators/gt.cc' object='operators/libmodsecurity_la-gt.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o operators/libmodsecurity_la-gt.lo `test -f 'operators/gt.cc' || echo '$(srcdir)/'`operators/gt.cc operators/libmodsecurity_la-inspect_file.lo: operators/inspect_file.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT operators/libmodsecurity_la-inspect_file.lo -MD -MP -MF operators/$(DEPDIR)/libmodsecurity_la-inspect_file.Tpo -c -o operators/libmodsecurity_la-inspect_file.lo `test -f 'operators/inspect_file.cc' || echo '$(srcdir)/'`operators/inspect_file.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) operators/$(DEPDIR)/libmodsecurity_la-inspect_file.Tpo operators/$(DEPDIR)/libmodsecurity_la-inspect_file.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='operators/inspect_file.cc' object='operators/libmodsecurity_la-inspect_file.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o operators/libmodsecurity_la-inspect_file.lo `test -f 'operators/inspect_file.cc' || echo '$(srcdir)/'`operators/inspect_file.cc operators/libmodsecurity_la-ip_match.lo: operators/ip_match.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT operators/libmodsecurity_la-ip_match.lo -MD -MP -MF operators/$(DEPDIR)/libmodsecurity_la-ip_match.Tpo -c -o operators/libmodsecurity_la-ip_match.lo `test -f 'operators/ip_match.cc' || echo '$(srcdir)/'`operators/ip_match.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) operators/$(DEPDIR)/libmodsecurity_la-ip_match.Tpo operators/$(DEPDIR)/libmodsecurity_la-ip_match.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='operators/ip_match.cc' object='operators/libmodsecurity_la-ip_match.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o operators/libmodsecurity_la-ip_match.lo `test -f 'operators/ip_match.cc' || echo '$(srcdir)/'`operators/ip_match.cc operators/libmodsecurity_la-ip_match_f.lo: operators/ip_match_f.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT operators/libmodsecurity_la-ip_match_f.lo -MD -MP -MF operators/$(DEPDIR)/libmodsecurity_la-ip_match_f.Tpo -c -o operators/libmodsecurity_la-ip_match_f.lo `test -f 'operators/ip_match_f.cc' || echo '$(srcdir)/'`operators/ip_match_f.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) operators/$(DEPDIR)/libmodsecurity_la-ip_match_f.Tpo operators/$(DEPDIR)/libmodsecurity_la-ip_match_f.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='operators/ip_match_f.cc' object='operators/libmodsecurity_la-ip_match_f.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o operators/libmodsecurity_la-ip_match_f.lo `test -f 'operators/ip_match_f.cc' || echo '$(srcdir)/'`operators/ip_match_f.cc operators/libmodsecurity_la-ip_match_from_file.lo: operators/ip_match_from_file.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT operators/libmodsecurity_la-ip_match_from_file.lo -MD -MP -MF operators/$(DEPDIR)/libmodsecurity_la-ip_match_from_file.Tpo -c -o operators/libmodsecurity_la-ip_match_from_file.lo `test -f 'operators/ip_match_from_file.cc' || echo '$(srcdir)/'`operators/ip_match_from_file.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) operators/$(DEPDIR)/libmodsecurity_la-ip_match_from_file.Tpo operators/$(DEPDIR)/libmodsecurity_la-ip_match_from_file.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='operators/ip_match_from_file.cc' object='operators/libmodsecurity_la-ip_match_from_file.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o operators/libmodsecurity_la-ip_match_from_file.lo `test -f 'operators/ip_match_from_file.cc' || echo '$(srcdir)/'`operators/ip_match_from_file.cc operators/libmodsecurity_la-le.lo: operators/le.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT operators/libmodsecurity_la-le.lo -MD -MP -MF operators/$(DEPDIR)/libmodsecurity_la-le.Tpo -c -o operators/libmodsecurity_la-le.lo `test -f 'operators/le.cc' || echo '$(srcdir)/'`operators/le.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) operators/$(DEPDIR)/libmodsecurity_la-le.Tpo operators/$(DEPDIR)/libmodsecurity_la-le.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='operators/le.cc' object='operators/libmodsecurity_la-le.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o operators/libmodsecurity_la-le.lo `test -f 'operators/le.cc' || echo '$(srcdir)/'`operators/le.cc operators/libmodsecurity_la-lt.lo: operators/lt.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT operators/libmodsecurity_la-lt.lo -MD -MP -MF operators/$(DEPDIR)/libmodsecurity_la-lt.Tpo -c -o operators/libmodsecurity_la-lt.lo `test -f 'operators/lt.cc' || echo '$(srcdir)/'`operators/lt.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) operators/$(DEPDIR)/libmodsecurity_la-lt.Tpo operators/$(DEPDIR)/libmodsecurity_la-lt.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='operators/lt.cc' object='operators/libmodsecurity_la-lt.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o operators/libmodsecurity_la-lt.lo `test -f 'operators/lt.cc' || echo '$(srcdir)/'`operators/lt.cc operators/libmodsecurity_la-no_match.lo: operators/no_match.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT operators/libmodsecurity_la-no_match.lo -MD -MP -MF operators/$(DEPDIR)/libmodsecurity_la-no_match.Tpo -c -o operators/libmodsecurity_la-no_match.lo `test -f 'operators/no_match.cc' || echo '$(srcdir)/'`operators/no_match.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) operators/$(DEPDIR)/libmodsecurity_la-no_match.Tpo operators/$(DEPDIR)/libmodsecurity_la-no_match.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='operators/no_match.cc' object='operators/libmodsecurity_la-no_match.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o operators/libmodsecurity_la-no_match.lo `test -f 'operators/no_match.cc' || echo '$(srcdir)/'`operators/no_match.cc operators/libmodsecurity_la-operator.lo: operators/operator.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT operators/libmodsecurity_la-operator.lo -MD -MP -MF operators/$(DEPDIR)/libmodsecurity_la-operator.Tpo -c -o operators/libmodsecurity_la-operator.lo `test -f 'operators/operator.cc' || echo '$(srcdir)/'`operators/operator.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) operators/$(DEPDIR)/libmodsecurity_la-operator.Tpo operators/$(DEPDIR)/libmodsecurity_la-operator.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='operators/operator.cc' object='operators/libmodsecurity_la-operator.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o operators/libmodsecurity_la-operator.lo `test -f 'operators/operator.cc' || echo '$(srcdir)/'`operators/operator.cc operators/libmodsecurity_la-pm.lo: operators/pm.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT operators/libmodsecurity_la-pm.lo -MD -MP -MF operators/$(DEPDIR)/libmodsecurity_la-pm.Tpo -c -o operators/libmodsecurity_la-pm.lo `test -f 'operators/pm.cc' || echo '$(srcdir)/'`operators/pm.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) operators/$(DEPDIR)/libmodsecurity_la-pm.Tpo operators/$(DEPDIR)/libmodsecurity_la-pm.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='operators/pm.cc' object='operators/libmodsecurity_la-pm.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o operators/libmodsecurity_la-pm.lo `test -f 'operators/pm.cc' || echo '$(srcdir)/'`operators/pm.cc operators/libmodsecurity_la-pm_f.lo: operators/pm_f.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT operators/libmodsecurity_la-pm_f.lo -MD -MP -MF operators/$(DEPDIR)/libmodsecurity_la-pm_f.Tpo -c -o operators/libmodsecurity_la-pm_f.lo `test -f 'operators/pm_f.cc' || echo '$(srcdir)/'`operators/pm_f.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) operators/$(DEPDIR)/libmodsecurity_la-pm_f.Tpo operators/$(DEPDIR)/libmodsecurity_la-pm_f.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='operators/pm_f.cc' object='operators/libmodsecurity_la-pm_f.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o operators/libmodsecurity_la-pm_f.lo `test -f 'operators/pm_f.cc' || echo '$(srcdir)/'`operators/pm_f.cc operators/libmodsecurity_la-pm_from_file.lo: operators/pm_from_file.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT operators/libmodsecurity_la-pm_from_file.lo -MD -MP -MF operators/$(DEPDIR)/libmodsecurity_la-pm_from_file.Tpo -c -o operators/libmodsecurity_la-pm_from_file.lo `test -f 'operators/pm_from_file.cc' || echo '$(srcdir)/'`operators/pm_from_file.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) operators/$(DEPDIR)/libmodsecurity_la-pm_from_file.Tpo operators/$(DEPDIR)/libmodsecurity_la-pm_from_file.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='operators/pm_from_file.cc' object='operators/libmodsecurity_la-pm_from_file.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o operators/libmodsecurity_la-pm_from_file.lo `test -f 'operators/pm_from_file.cc' || echo '$(srcdir)/'`operators/pm_from_file.cc operators/libmodsecurity_la-rbl.lo: operators/rbl.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT operators/libmodsecurity_la-rbl.lo -MD -MP -MF operators/$(DEPDIR)/libmodsecurity_la-rbl.Tpo -c -o operators/libmodsecurity_la-rbl.lo `test -f 'operators/rbl.cc' || echo '$(srcdir)/'`operators/rbl.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) operators/$(DEPDIR)/libmodsecurity_la-rbl.Tpo operators/$(DEPDIR)/libmodsecurity_la-rbl.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='operators/rbl.cc' object='operators/libmodsecurity_la-rbl.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o operators/libmodsecurity_la-rbl.lo `test -f 'operators/rbl.cc' || echo '$(srcdir)/'`operators/rbl.cc operators/libmodsecurity_la-rsub.lo: operators/rsub.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT operators/libmodsecurity_la-rsub.lo -MD -MP -MF operators/$(DEPDIR)/libmodsecurity_la-rsub.Tpo -c -o operators/libmodsecurity_la-rsub.lo `test -f 'operators/rsub.cc' || echo '$(srcdir)/'`operators/rsub.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) operators/$(DEPDIR)/libmodsecurity_la-rsub.Tpo operators/$(DEPDIR)/libmodsecurity_la-rsub.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='operators/rsub.cc' object='operators/libmodsecurity_la-rsub.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o operators/libmodsecurity_la-rsub.lo `test -f 'operators/rsub.cc' || echo '$(srcdir)/'`operators/rsub.cc operators/libmodsecurity_la-rx.lo: operators/rx.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT operators/libmodsecurity_la-rx.lo -MD -MP -MF operators/$(DEPDIR)/libmodsecurity_la-rx.Tpo -c -o operators/libmodsecurity_la-rx.lo `test -f 'operators/rx.cc' || echo '$(srcdir)/'`operators/rx.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) operators/$(DEPDIR)/libmodsecurity_la-rx.Tpo operators/$(DEPDIR)/libmodsecurity_la-rx.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='operators/rx.cc' object='operators/libmodsecurity_la-rx.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o operators/libmodsecurity_la-rx.lo `test -f 'operators/rx.cc' || echo '$(srcdir)/'`operators/rx.cc operators/libmodsecurity_la-rx_global.lo: operators/rx_global.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT operators/libmodsecurity_la-rx_global.lo -MD -MP -MF operators/$(DEPDIR)/libmodsecurity_la-rx_global.Tpo -c -o operators/libmodsecurity_la-rx_global.lo `test -f 'operators/rx_global.cc' || echo '$(srcdir)/'`operators/rx_global.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) operators/$(DEPDIR)/libmodsecurity_la-rx_global.Tpo operators/$(DEPDIR)/libmodsecurity_la-rx_global.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='operators/rx_global.cc' object='operators/libmodsecurity_la-rx_global.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o operators/libmodsecurity_la-rx_global.lo `test -f 'operators/rx_global.cc' || echo '$(srcdir)/'`operators/rx_global.cc operators/libmodsecurity_la-str_eq.lo: operators/str_eq.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT operators/libmodsecurity_la-str_eq.lo -MD -MP -MF operators/$(DEPDIR)/libmodsecurity_la-str_eq.Tpo -c -o operators/libmodsecurity_la-str_eq.lo `test -f 'operators/str_eq.cc' || echo '$(srcdir)/'`operators/str_eq.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) operators/$(DEPDIR)/libmodsecurity_la-str_eq.Tpo operators/$(DEPDIR)/libmodsecurity_la-str_eq.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='operators/str_eq.cc' object='operators/libmodsecurity_la-str_eq.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o operators/libmodsecurity_la-str_eq.lo `test -f 'operators/str_eq.cc' || echo '$(srcdir)/'`operators/str_eq.cc operators/libmodsecurity_la-str_match.lo: operators/str_match.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT operators/libmodsecurity_la-str_match.lo -MD -MP -MF operators/$(DEPDIR)/libmodsecurity_la-str_match.Tpo -c -o operators/libmodsecurity_la-str_match.lo `test -f 'operators/str_match.cc' || echo '$(srcdir)/'`operators/str_match.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) operators/$(DEPDIR)/libmodsecurity_la-str_match.Tpo operators/$(DEPDIR)/libmodsecurity_la-str_match.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='operators/str_match.cc' object='operators/libmodsecurity_la-str_match.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o operators/libmodsecurity_la-str_match.lo `test -f 'operators/str_match.cc' || echo '$(srcdir)/'`operators/str_match.cc operators/libmodsecurity_la-validate_byte_range.lo: operators/validate_byte_range.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT operators/libmodsecurity_la-validate_byte_range.lo -MD -MP -MF operators/$(DEPDIR)/libmodsecurity_la-validate_byte_range.Tpo -c -o operators/libmodsecurity_la-validate_byte_range.lo `test -f 'operators/validate_byte_range.cc' || echo '$(srcdir)/'`operators/validate_byte_range.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) operators/$(DEPDIR)/libmodsecurity_la-validate_byte_range.Tpo operators/$(DEPDIR)/libmodsecurity_la-validate_byte_range.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='operators/validate_byte_range.cc' object='operators/libmodsecurity_la-validate_byte_range.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o operators/libmodsecurity_la-validate_byte_range.lo `test -f 'operators/validate_byte_range.cc' || echo '$(srcdir)/'`operators/validate_byte_range.cc operators/libmodsecurity_la-validate_dtd.lo: operators/validate_dtd.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT operators/libmodsecurity_la-validate_dtd.lo -MD -MP -MF operators/$(DEPDIR)/libmodsecurity_la-validate_dtd.Tpo -c -o operators/libmodsecurity_la-validate_dtd.lo `test -f 'operators/validate_dtd.cc' || echo '$(srcdir)/'`operators/validate_dtd.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) operators/$(DEPDIR)/libmodsecurity_la-validate_dtd.Tpo operators/$(DEPDIR)/libmodsecurity_la-validate_dtd.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='operators/validate_dtd.cc' object='operators/libmodsecurity_la-validate_dtd.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o operators/libmodsecurity_la-validate_dtd.lo `test -f 'operators/validate_dtd.cc' || echo '$(srcdir)/'`operators/validate_dtd.cc operators/libmodsecurity_la-validate_hash.lo: operators/validate_hash.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT operators/libmodsecurity_la-validate_hash.lo -MD -MP -MF operators/$(DEPDIR)/libmodsecurity_la-validate_hash.Tpo -c -o operators/libmodsecurity_la-validate_hash.lo `test -f 'operators/validate_hash.cc' || echo '$(srcdir)/'`operators/validate_hash.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) operators/$(DEPDIR)/libmodsecurity_la-validate_hash.Tpo operators/$(DEPDIR)/libmodsecurity_la-validate_hash.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='operators/validate_hash.cc' object='operators/libmodsecurity_la-validate_hash.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o operators/libmodsecurity_la-validate_hash.lo `test -f 'operators/validate_hash.cc' || echo '$(srcdir)/'`operators/validate_hash.cc operators/libmodsecurity_la-validate_schema.lo: operators/validate_schema.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT operators/libmodsecurity_la-validate_schema.lo -MD -MP -MF operators/$(DEPDIR)/libmodsecurity_la-validate_schema.Tpo -c -o operators/libmodsecurity_la-validate_schema.lo `test -f 'operators/validate_schema.cc' || echo '$(srcdir)/'`operators/validate_schema.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) operators/$(DEPDIR)/libmodsecurity_la-validate_schema.Tpo operators/$(DEPDIR)/libmodsecurity_la-validate_schema.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='operators/validate_schema.cc' object='operators/libmodsecurity_la-validate_schema.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o operators/libmodsecurity_la-validate_schema.lo `test -f 'operators/validate_schema.cc' || echo '$(srcdir)/'`operators/validate_schema.cc operators/libmodsecurity_la-validate_url_encoding.lo: operators/validate_url_encoding.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT operators/libmodsecurity_la-validate_url_encoding.lo -MD -MP -MF operators/$(DEPDIR)/libmodsecurity_la-validate_url_encoding.Tpo -c -o operators/libmodsecurity_la-validate_url_encoding.lo `test -f 'operators/validate_url_encoding.cc' || echo '$(srcdir)/'`operators/validate_url_encoding.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) operators/$(DEPDIR)/libmodsecurity_la-validate_url_encoding.Tpo operators/$(DEPDIR)/libmodsecurity_la-validate_url_encoding.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='operators/validate_url_encoding.cc' object='operators/libmodsecurity_la-validate_url_encoding.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o operators/libmodsecurity_la-validate_url_encoding.lo `test -f 'operators/validate_url_encoding.cc' || echo '$(srcdir)/'`operators/validate_url_encoding.cc operators/libmodsecurity_la-validate_utf8_encoding.lo: operators/validate_utf8_encoding.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT operators/libmodsecurity_la-validate_utf8_encoding.lo -MD -MP -MF operators/$(DEPDIR)/libmodsecurity_la-validate_utf8_encoding.Tpo -c -o operators/libmodsecurity_la-validate_utf8_encoding.lo `test -f 'operators/validate_utf8_encoding.cc' || echo '$(srcdir)/'`operators/validate_utf8_encoding.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) operators/$(DEPDIR)/libmodsecurity_la-validate_utf8_encoding.Tpo operators/$(DEPDIR)/libmodsecurity_la-validate_utf8_encoding.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='operators/validate_utf8_encoding.cc' object='operators/libmodsecurity_la-validate_utf8_encoding.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o operators/libmodsecurity_la-validate_utf8_encoding.lo `test -f 'operators/validate_utf8_encoding.cc' || echo '$(srcdir)/'`operators/validate_utf8_encoding.cc operators/libmodsecurity_la-verify_cc.lo: operators/verify_cc.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT operators/libmodsecurity_la-verify_cc.lo -MD -MP -MF operators/$(DEPDIR)/libmodsecurity_la-verify_cc.Tpo -c -o operators/libmodsecurity_la-verify_cc.lo `test -f 'operators/verify_cc.cc' || echo '$(srcdir)/'`operators/verify_cc.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) operators/$(DEPDIR)/libmodsecurity_la-verify_cc.Tpo operators/$(DEPDIR)/libmodsecurity_la-verify_cc.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='operators/verify_cc.cc' object='operators/libmodsecurity_la-verify_cc.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o operators/libmodsecurity_la-verify_cc.lo `test -f 'operators/verify_cc.cc' || echo '$(srcdir)/'`operators/verify_cc.cc operators/libmodsecurity_la-verify_cpf.lo: operators/verify_cpf.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT operators/libmodsecurity_la-verify_cpf.lo -MD -MP -MF operators/$(DEPDIR)/libmodsecurity_la-verify_cpf.Tpo -c -o operators/libmodsecurity_la-verify_cpf.lo `test -f 'operators/verify_cpf.cc' || echo '$(srcdir)/'`operators/verify_cpf.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) operators/$(DEPDIR)/libmodsecurity_la-verify_cpf.Tpo operators/$(DEPDIR)/libmodsecurity_la-verify_cpf.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='operators/verify_cpf.cc' object='operators/libmodsecurity_la-verify_cpf.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o operators/libmodsecurity_la-verify_cpf.lo `test -f 'operators/verify_cpf.cc' || echo '$(srcdir)/'`operators/verify_cpf.cc operators/libmodsecurity_la-verify_ssn.lo: operators/verify_ssn.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT operators/libmodsecurity_la-verify_ssn.lo -MD -MP -MF operators/$(DEPDIR)/libmodsecurity_la-verify_ssn.Tpo -c -o operators/libmodsecurity_la-verify_ssn.lo `test -f 'operators/verify_ssn.cc' || echo '$(srcdir)/'`operators/verify_ssn.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) operators/$(DEPDIR)/libmodsecurity_la-verify_ssn.Tpo operators/$(DEPDIR)/libmodsecurity_la-verify_ssn.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='operators/verify_ssn.cc' object='operators/libmodsecurity_la-verify_ssn.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o operators/libmodsecurity_la-verify_ssn.lo `test -f 'operators/verify_ssn.cc' || echo '$(srcdir)/'`operators/verify_ssn.cc operators/libmodsecurity_la-verify_svnr.lo: operators/verify_svnr.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT operators/libmodsecurity_la-verify_svnr.lo -MD -MP -MF operators/$(DEPDIR)/libmodsecurity_la-verify_svnr.Tpo -c -o operators/libmodsecurity_la-verify_svnr.lo `test -f 'operators/verify_svnr.cc' || echo '$(srcdir)/'`operators/verify_svnr.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) operators/$(DEPDIR)/libmodsecurity_la-verify_svnr.Tpo operators/$(DEPDIR)/libmodsecurity_la-verify_svnr.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='operators/verify_svnr.cc' object='operators/libmodsecurity_la-verify_svnr.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o operators/libmodsecurity_la-verify_svnr.lo `test -f 'operators/verify_svnr.cc' || echo '$(srcdir)/'`operators/verify_svnr.cc operators/libmodsecurity_la-within.lo: operators/within.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT operators/libmodsecurity_la-within.lo -MD -MP -MF operators/$(DEPDIR)/libmodsecurity_la-within.Tpo -c -o operators/libmodsecurity_la-within.lo `test -f 'operators/within.cc' || echo '$(srcdir)/'`operators/within.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) operators/$(DEPDIR)/libmodsecurity_la-within.Tpo operators/$(DEPDIR)/libmodsecurity_la-within.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='operators/within.cc' object='operators/libmodsecurity_la-within.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o operators/libmodsecurity_la-within.lo `test -f 'operators/within.cc' || echo '$(srcdir)/'`operators/within.cc operators/libmodsecurity_la-unconditional_match.lo: operators/unconditional_match.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT operators/libmodsecurity_la-unconditional_match.lo -MD -MP -MF operators/$(DEPDIR)/libmodsecurity_la-unconditional_match.Tpo -c -o operators/libmodsecurity_la-unconditional_match.lo `test -f 'operators/unconditional_match.cc' || echo '$(srcdir)/'`operators/unconditional_match.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) operators/$(DEPDIR)/libmodsecurity_la-unconditional_match.Tpo operators/$(DEPDIR)/libmodsecurity_la-unconditional_match.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='operators/unconditional_match.cc' object='operators/libmodsecurity_la-unconditional_match.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o operators/libmodsecurity_la-unconditional_match.lo `test -f 'operators/unconditional_match.cc' || echo '$(srcdir)/'`operators/unconditional_match.cc utils/libmodsecurity_la-acmp.lo: utils/acmp.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT utils/libmodsecurity_la-acmp.lo -MD -MP -MF utils/$(DEPDIR)/libmodsecurity_la-acmp.Tpo -c -o utils/libmodsecurity_la-acmp.lo `test -f 'utils/acmp.cc' || echo '$(srcdir)/'`utils/acmp.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) utils/$(DEPDIR)/libmodsecurity_la-acmp.Tpo utils/$(DEPDIR)/libmodsecurity_la-acmp.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='utils/acmp.cc' object='utils/libmodsecurity_la-acmp.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o utils/libmodsecurity_la-acmp.lo `test -f 'utils/acmp.cc' || echo '$(srcdir)/'`utils/acmp.cc utils/libmodsecurity_la-base64.lo: utils/base64.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT utils/libmodsecurity_la-base64.lo -MD -MP -MF utils/$(DEPDIR)/libmodsecurity_la-base64.Tpo -c -o utils/libmodsecurity_la-base64.lo `test -f 'utils/base64.cc' || echo '$(srcdir)/'`utils/base64.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) utils/$(DEPDIR)/libmodsecurity_la-base64.Tpo utils/$(DEPDIR)/libmodsecurity_la-base64.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='utils/base64.cc' object='utils/libmodsecurity_la-base64.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o utils/libmodsecurity_la-base64.lo `test -f 'utils/base64.cc' || echo '$(srcdir)/'`utils/base64.cc utils/libmodsecurity_la-decode.lo: utils/decode.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT utils/libmodsecurity_la-decode.lo -MD -MP -MF utils/$(DEPDIR)/libmodsecurity_la-decode.Tpo -c -o utils/libmodsecurity_la-decode.lo `test -f 'utils/decode.cc' || echo '$(srcdir)/'`utils/decode.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) utils/$(DEPDIR)/libmodsecurity_la-decode.Tpo utils/$(DEPDIR)/libmodsecurity_la-decode.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='utils/decode.cc' object='utils/libmodsecurity_la-decode.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o utils/libmodsecurity_la-decode.lo `test -f 'utils/decode.cc' || echo '$(srcdir)/'`utils/decode.cc utils/libmodsecurity_la-geo_lookup.lo: utils/geo_lookup.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT utils/libmodsecurity_la-geo_lookup.lo -MD -MP -MF utils/$(DEPDIR)/libmodsecurity_la-geo_lookup.Tpo -c -o utils/libmodsecurity_la-geo_lookup.lo `test -f 'utils/geo_lookup.cc' || echo '$(srcdir)/'`utils/geo_lookup.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) utils/$(DEPDIR)/libmodsecurity_la-geo_lookup.Tpo utils/$(DEPDIR)/libmodsecurity_la-geo_lookup.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='utils/geo_lookup.cc' object='utils/libmodsecurity_la-geo_lookup.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o utils/libmodsecurity_la-geo_lookup.lo `test -f 'utils/geo_lookup.cc' || echo '$(srcdir)/'`utils/geo_lookup.cc utils/libmodsecurity_la-https_client.lo: utils/https_client.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT utils/libmodsecurity_la-https_client.lo -MD -MP -MF utils/$(DEPDIR)/libmodsecurity_la-https_client.Tpo -c -o utils/libmodsecurity_la-https_client.lo `test -f 'utils/https_client.cc' || echo '$(srcdir)/'`utils/https_client.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) utils/$(DEPDIR)/libmodsecurity_la-https_client.Tpo utils/$(DEPDIR)/libmodsecurity_la-https_client.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='utils/https_client.cc' object='utils/libmodsecurity_la-https_client.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o utils/libmodsecurity_la-https_client.lo `test -f 'utils/https_client.cc' || echo '$(srcdir)/'`utils/https_client.cc utils/libmodsecurity_la-ip_tree.lo: utils/ip_tree.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT utils/libmodsecurity_la-ip_tree.lo -MD -MP -MF utils/$(DEPDIR)/libmodsecurity_la-ip_tree.Tpo -c -o utils/libmodsecurity_la-ip_tree.lo `test -f 'utils/ip_tree.cc' || echo '$(srcdir)/'`utils/ip_tree.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) utils/$(DEPDIR)/libmodsecurity_la-ip_tree.Tpo utils/$(DEPDIR)/libmodsecurity_la-ip_tree.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='utils/ip_tree.cc' object='utils/libmodsecurity_la-ip_tree.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o utils/libmodsecurity_la-ip_tree.lo `test -f 'utils/ip_tree.cc' || echo '$(srcdir)/'`utils/ip_tree.cc utils/libmodsecurity_la-md5.lo: utils/md5.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT utils/libmodsecurity_la-md5.lo -MD -MP -MF utils/$(DEPDIR)/libmodsecurity_la-md5.Tpo -c -o utils/libmodsecurity_la-md5.lo `test -f 'utils/md5.cc' || echo '$(srcdir)/'`utils/md5.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) utils/$(DEPDIR)/libmodsecurity_la-md5.Tpo utils/$(DEPDIR)/libmodsecurity_la-md5.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='utils/md5.cc' object='utils/libmodsecurity_la-md5.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o utils/libmodsecurity_la-md5.lo `test -f 'utils/md5.cc' || echo '$(srcdir)/'`utils/md5.cc utils/libmodsecurity_la-msc_tree.lo: utils/msc_tree.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT utils/libmodsecurity_la-msc_tree.lo -MD -MP -MF utils/$(DEPDIR)/libmodsecurity_la-msc_tree.Tpo -c -o utils/libmodsecurity_la-msc_tree.lo `test -f 'utils/msc_tree.cc' || echo '$(srcdir)/'`utils/msc_tree.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) utils/$(DEPDIR)/libmodsecurity_la-msc_tree.Tpo utils/$(DEPDIR)/libmodsecurity_la-msc_tree.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='utils/msc_tree.cc' object='utils/libmodsecurity_la-msc_tree.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o utils/libmodsecurity_la-msc_tree.lo `test -f 'utils/msc_tree.cc' || echo '$(srcdir)/'`utils/msc_tree.cc utils/libmodsecurity_la-random.lo: utils/random.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT utils/libmodsecurity_la-random.lo -MD -MP -MF utils/$(DEPDIR)/libmodsecurity_la-random.Tpo -c -o utils/libmodsecurity_la-random.lo `test -f 'utils/random.cc' || echo '$(srcdir)/'`utils/random.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) utils/$(DEPDIR)/libmodsecurity_la-random.Tpo utils/$(DEPDIR)/libmodsecurity_la-random.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='utils/random.cc' object='utils/libmodsecurity_la-random.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o utils/libmodsecurity_la-random.lo `test -f 'utils/random.cc' || echo '$(srcdir)/'`utils/random.cc utils/libmodsecurity_la-regex.lo: utils/regex.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT utils/libmodsecurity_la-regex.lo -MD -MP -MF utils/$(DEPDIR)/libmodsecurity_la-regex.Tpo -c -o utils/libmodsecurity_la-regex.lo `test -f 'utils/regex.cc' || echo '$(srcdir)/'`utils/regex.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) utils/$(DEPDIR)/libmodsecurity_la-regex.Tpo utils/$(DEPDIR)/libmodsecurity_la-regex.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='utils/regex.cc' object='utils/libmodsecurity_la-regex.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o utils/libmodsecurity_la-regex.lo `test -f 'utils/regex.cc' || echo '$(srcdir)/'`utils/regex.cc utils/libmodsecurity_la-sha1.lo: utils/sha1.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT utils/libmodsecurity_la-sha1.lo -MD -MP -MF utils/$(DEPDIR)/libmodsecurity_la-sha1.Tpo -c -o utils/libmodsecurity_la-sha1.lo `test -f 'utils/sha1.cc' || echo '$(srcdir)/'`utils/sha1.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) utils/$(DEPDIR)/libmodsecurity_la-sha1.Tpo utils/$(DEPDIR)/libmodsecurity_la-sha1.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='utils/sha1.cc' object='utils/libmodsecurity_la-sha1.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o utils/libmodsecurity_la-sha1.lo `test -f 'utils/sha1.cc' || echo '$(srcdir)/'`utils/sha1.cc utils/libmodsecurity_la-string.lo: utils/string.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT utils/libmodsecurity_la-string.lo -MD -MP -MF utils/$(DEPDIR)/libmodsecurity_la-string.Tpo -c -o utils/libmodsecurity_la-string.lo `test -f 'utils/string.cc' || echo '$(srcdir)/'`utils/string.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) utils/$(DEPDIR)/libmodsecurity_la-string.Tpo utils/$(DEPDIR)/libmodsecurity_la-string.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='utils/string.cc' object='utils/libmodsecurity_la-string.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o utils/libmodsecurity_la-string.lo `test -f 'utils/string.cc' || echo '$(srcdir)/'`utils/string.cc utils/libmodsecurity_la-system.lo: utils/system.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT utils/libmodsecurity_la-system.lo -MD -MP -MF utils/$(DEPDIR)/libmodsecurity_la-system.Tpo -c -o utils/libmodsecurity_la-system.lo `test -f 'utils/system.cc' || echo '$(srcdir)/'`utils/system.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) utils/$(DEPDIR)/libmodsecurity_la-system.Tpo utils/$(DEPDIR)/libmodsecurity_la-system.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='utils/system.cc' object='utils/libmodsecurity_la-system.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o utils/libmodsecurity_la-system.lo `test -f 'utils/system.cc' || echo '$(srcdir)/'`utils/system.cc utils/libmodsecurity_la-shared_files.lo: utils/shared_files.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT utils/libmodsecurity_la-shared_files.lo -MD -MP -MF utils/$(DEPDIR)/libmodsecurity_la-shared_files.Tpo -c -o utils/libmodsecurity_la-shared_files.lo `test -f 'utils/shared_files.cc' || echo '$(srcdir)/'`utils/shared_files.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) utils/$(DEPDIR)/libmodsecurity_la-shared_files.Tpo utils/$(DEPDIR)/libmodsecurity_la-shared_files.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='utils/shared_files.cc' object='utils/libmodsecurity_la-shared_files.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o utils/libmodsecurity_la-shared_files.lo `test -f 'utils/shared_files.cc' || echo '$(srcdir)/'`utils/shared_files.cc variables/libmodsecurity_la-duration.lo: variables/duration.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT variables/libmodsecurity_la-duration.lo -MD -MP -MF variables/$(DEPDIR)/libmodsecurity_la-duration.Tpo -c -o variables/libmodsecurity_la-duration.lo `test -f 'variables/duration.cc' || echo '$(srcdir)/'`variables/duration.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) variables/$(DEPDIR)/libmodsecurity_la-duration.Tpo variables/$(DEPDIR)/libmodsecurity_la-duration.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='variables/duration.cc' object='variables/libmodsecurity_la-duration.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o variables/libmodsecurity_la-duration.lo `test -f 'variables/duration.cc' || echo '$(srcdir)/'`variables/duration.cc variables/libmodsecurity_la-env.lo: variables/env.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT variables/libmodsecurity_la-env.lo -MD -MP -MF variables/$(DEPDIR)/libmodsecurity_la-env.Tpo -c -o variables/libmodsecurity_la-env.lo `test -f 'variables/env.cc' || echo '$(srcdir)/'`variables/env.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) variables/$(DEPDIR)/libmodsecurity_la-env.Tpo variables/$(DEPDIR)/libmodsecurity_la-env.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='variables/env.cc' object='variables/libmodsecurity_la-env.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o variables/libmodsecurity_la-env.lo `test -f 'variables/env.cc' || echo '$(srcdir)/'`variables/env.cc variables/libmodsecurity_la-highest_severity.lo: variables/highest_severity.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT variables/libmodsecurity_la-highest_severity.lo -MD -MP -MF variables/$(DEPDIR)/libmodsecurity_la-highest_severity.Tpo -c -o variables/libmodsecurity_la-highest_severity.lo `test -f 'variables/highest_severity.cc' || echo '$(srcdir)/'`variables/highest_severity.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) variables/$(DEPDIR)/libmodsecurity_la-highest_severity.Tpo variables/$(DEPDIR)/libmodsecurity_la-highest_severity.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='variables/highest_severity.cc' object='variables/libmodsecurity_la-highest_severity.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o variables/libmodsecurity_la-highest_severity.lo `test -f 'variables/highest_severity.cc' || echo '$(srcdir)/'`variables/highest_severity.cc variables/libmodsecurity_la-modsec_build.lo: variables/modsec_build.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT variables/libmodsecurity_la-modsec_build.lo -MD -MP -MF variables/$(DEPDIR)/libmodsecurity_la-modsec_build.Tpo -c -o variables/libmodsecurity_la-modsec_build.lo `test -f 'variables/modsec_build.cc' || echo '$(srcdir)/'`variables/modsec_build.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) variables/$(DEPDIR)/libmodsecurity_la-modsec_build.Tpo variables/$(DEPDIR)/libmodsecurity_la-modsec_build.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='variables/modsec_build.cc' object='variables/libmodsecurity_la-modsec_build.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o variables/libmodsecurity_la-modsec_build.lo `test -f 'variables/modsec_build.cc' || echo '$(srcdir)/'`variables/modsec_build.cc variables/libmodsecurity_la-remote_user.lo: variables/remote_user.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT variables/libmodsecurity_la-remote_user.lo -MD -MP -MF variables/$(DEPDIR)/libmodsecurity_la-remote_user.Tpo -c -o variables/libmodsecurity_la-remote_user.lo `test -f 'variables/remote_user.cc' || echo '$(srcdir)/'`variables/remote_user.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) variables/$(DEPDIR)/libmodsecurity_la-remote_user.Tpo variables/$(DEPDIR)/libmodsecurity_la-remote_user.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='variables/remote_user.cc' object='variables/libmodsecurity_la-remote_user.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o variables/libmodsecurity_la-remote_user.lo `test -f 'variables/remote_user.cc' || echo '$(srcdir)/'`variables/remote_user.cc variables/libmodsecurity_la-rule.lo: variables/rule.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT variables/libmodsecurity_la-rule.lo -MD -MP -MF variables/$(DEPDIR)/libmodsecurity_la-rule.Tpo -c -o variables/libmodsecurity_la-rule.lo `test -f 'variables/rule.cc' || echo '$(srcdir)/'`variables/rule.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) variables/$(DEPDIR)/libmodsecurity_la-rule.Tpo variables/$(DEPDIR)/libmodsecurity_la-rule.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='variables/rule.cc' object='variables/libmodsecurity_la-rule.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o variables/libmodsecurity_la-rule.lo `test -f 'variables/rule.cc' || echo '$(srcdir)/'`variables/rule.cc variables/libmodsecurity_la-time.lo: variables/time.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT variables/libmodsecurity_la-time.lo -MD -MP -MF variables/$(DEPDIR)/libmodsecurity_la-time.Tpo -c -o variables/libmodsecurity_la-time.lo `test -f 'variables/time.cc' || echo '$(srcdir)/'`variables/time.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) variables/$(DEPDIR)/libmodsecurity_la-time.Tpo variables/$(DEPDIR)/libmodsecurity_la-time.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='variables/time.cc' object='variables/libmodsecurity_la-time.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o variables/libmodsecurity_la-time.lo `test -f 'variables/time.cc' || echo '$(srcdir)/'`variables/time.cc variables/libmodsecurity_la-time_day.lo: variables/time_day.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT variables/libmodsecurity_la-time_day.lo -MD -MP -MF variables/$(DEPDIR)/libmodsecurity_la-time_day.Tpo -c -o variables/libmodsecurity_la-time_day.lo `test -f 'variables/time_day.cc' || echo '$(srcdir)/'`variables/time_day.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) variables/$(DEPDIR)/libmodsecurity_la-time_day.Tpo variables/$(DEPDIR)/libmodsecurity_la-time_day.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='variables/time_day.cc' object='variables/libmodsecurity_la-time_day.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o variables/libmodsecurity_la-time_day.lo `test -f 'variables/time_day.cc' || echo '$(srcdir)/'`variables/time_day.cc variables/libmodsecurity_la-time_epoch.lo: variables/time_epoch.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT variables/libmodsecurity_la-time_epoch.lo -MD -MP -MF variables/$(DEPDIR)/libmodsecurity_la-time_epoch.Tpo -c -o variables/libmodsecurity_la-time_epoch.lo `test -f 'variables/time_epoch.cc' || echo '$(srcdir)/'`variables/time_epoch.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) variables/$(DEPDIR)/libmodsecurity_la-time_epoch.Tpo variables/$(DEPDIR)/libmodsecurity_la-time_epoch.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='variables/time_epoch.cc' object='variables/libmodsecurity_la-time_epoch.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o variables/libmodsecurity_la-time_epoch.lo `test -f 'variables/time_epoch.cc' || echo '$(srcdir)/'`variables/time_epoch.cc variables/libmodsecurity_la-time_hour.lo: variables/time_hour.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT variables/libmodsecurity_la-time_hour.lo -MD -MP -MF variables/$(DEPDIR)/libmodsecurity_la-time_hour.Tpo -c -o variables/libmodsecurity_la-time_hour.lo `test -f 'variables/time_hour.cc' || echo '$(srcdir)/'`variables/time_hour.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) variables/$(DEPDIR)/libmodsecurity_la-time_hour.Tpo variables/$(DEPDIR)/libmodsecurity_la-time_hour.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='variables/time_hour.cc' object='variables/libmodsecurity_la-time_hour.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o variables/libmodsecurity_la-time_hour.lo `test -f 'variables/time_hour.cc' || echo '$(srcdir)/'`variables/time_hour.cc variables/libmodsecurity_la-time_min.lo: variables/time_min.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT variables/libmodsecurity_la-time_min.lo -MD -MP -MF variables/$(DEPDIR)/libmodsecurity_la-time_min.Tpo -c -o variables/libmodsecurity_la-time_min.lo `test -f 'variables/time_min.cc' || echo '$(srcdir)/'`variables/time_min.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) variables/$(DEPDIR)/libmodsecurity_la-time_min.Tpo variables/$(DEPDIR)/libmodsecurity_la-time_min.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='variables/time_min.cc' object='variables/libmodsecurity_la-time_min.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o variables/libmodsecurity_la-time_min.lo `test -f 'variables/time_min.cc' || echo '$(srcdir)/'`variables/time_min.cc variables/libmodsecurity_la-time_mon.lo: variables/time_mon.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT variables/libmodsecurity_la-time_mon.lo -MD -MP -MF variables/$(DEPDIR)/libmodsecurity_la-time_mon.Tpo -c -o variables/libmodsecurity_la-time_mon.lo `test -f 'variables/time_mon.cc' || echo '$(srcdir)/'`variables/time_mon.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) variables/$(DEPDIR)/libmodsecurity_la-time_mon.Tpo variables/$(DEPDIR)/libmodsecurity_la-time_mon.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='variables/time_mon.cc' object='variables/libmodsecurity_la-time_mon.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o variables/libmodsecurity_la-time_mon.lo `test -f 'variables/time_mon.cc' || echo '$(srcdir)/'`variables/time_mon.cc variables/libmodsecurity_la-time_sec.lo: variables/time_sec.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT variables/libmodsecurity_la-time_sec.lo -MD -MP -MF variables/$(DEPDIR)/libmodsecurity_la-time_sec.Tpo -c -o variables/libmodsecurity_la-time_sec.lo `test -f 'variables/time_sec.cc' || echo '$(srcdir)/'`variables/time_sec.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) variables/$(DEPDIR)/libmodsecurity_la-time_sec.Tpo variables/$(DEPDIR)/libmodsecurity_la-time_sec.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='variables/time_sec.cc' object='variables/libmodsecurity_la-time_sec.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o variables/libmodsecurity_la-time_sec.lo `test -f 'variables/time_sec.cc' || echo '$(srcdir)/'`variables/time_sec.cc variables/libmodsecurity_la-time_wday.lo: variables/time_wday.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT variables/libmodsecurity_la-time_wday.lo -MD -MP -MF variables/$(DEPDIR)/libmodsecurity_la-time_wday.Tpo -c -o variables/libmodsecurity_la-time_wday.lo `test -f 'variables/time_wday.cc' || echo '$(srcdir)/'`variables/time_wday.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) variables/$(DEPDIR)/libmodsecurity_la-time_wday.Tpo variables/$(DEPDIR)/libmodsecurity_la-time_wday.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='variables/time_wday.cc' object='variables/libmodsecurity_la-time_wday.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o variables/libmodsecurity_la-time_wday.lo `test -f 'variables/time_wday.cc' || echo '$(srcdir)/'`variables/time_wday.cc variables/libmodsecurity_la-time_year.lo: variables/time_year.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT variables/libmodsecurity_la-time_year.lo -MD -MP -MF variables/$(DEPDIR)/libmodsecurity_la-time_year.Tpo -c -o variables/libmodsecurity_la-time_year.lo `test -f 'variables/time_year.cc' || echo '$(srcdir)/'`variables/time_year.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) variables/$(DEPDIR)/libmodsecurity_la-time_year.Tpo variables/$(DEPDIR)/libmodsecurity_la-time_year.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='variables/time_year.cc' object='variables/libmodsecurity_la-time_year.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o variables/libmodsecurity_la-time_year.lo `test -f 'variables/time_year.cc' || echo '$(srcdir)/'`variables/time_year.cc variables/libmodsecurity_la-tx.lo: variables/tx.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT variables/libmodsecurity_la-tx.lo -MD -MP -MF variables/$(DEPDIR)/libmodsecurity_la-tx.Tpo -c -o variables/libmodsecurity_la-tx.lo `test -f 'variables/tx.cc' || echo '$(srcdir)/'`variables/tx.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) variables/$(DEPDIR)/libmodsecurity_la-tx.Tpo variables/$(DEPDIR)/libmodsecurity_la-tx.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='variables/tx.cc' object='variables/libmodsecurity_la-tx.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o variables/libmodsecurity_la-tx.lo `test -f 'variables/tx.cc' || echo '$(srcdir)/'`variables/tx.cc variables/libmodsecurity_la-variable.lo: variables/variable.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT variables/libmodsecurity_la-variable.lo -MD -MP -MF variables/$(DEPDIR)/libmodsecurity_la-variable.Tpo -c -o variables/libmodsecurity_la-variable.lo `test -f 'variables/variable.cc' || echo '$(srcdir)/'`variables/variable.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) variables/$(DEPDIR)/libmodsecurity_la-variable.Tpo variables/$(DEPDIR)/libmodsecurity_la-variable.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='variables/variable.cc' object='variables/libmodsecurity_la-variable.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o variables/libmodsecurity_la-variable.lo `test -f 'variables/variable.cc' || echo '$(srcdir)/'`variables/variable.cc variables/libmodsecurity_la-xml.lo: variables/xml.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT variables/libmodsecurity_la-xml.lo -MD -MP -MF variables/$(DEPDIR)/libmodsecurity_la-xml.Tpo -c -o variables/libmodsecurity_la-xml.lo `test -f 'variables/xml.cc' || echo '$(srcdir)/'`variables/xml.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) variables/$(DEPDIR)/libmodsecurity_la-xml.Tpo variables/$(DEPDIR)/libmodsecurity_la-xml.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='variables/xml.cc' object='variables/libmodsecurity_la-xml.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsecurity_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o variables/libmodsecurity_la-xml.lo `test -f 'variables/xml.cc' || echo '$(srcdir)/'`variables/xml.cc mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs -rm -rf actions/.libs actions/_libs -rm -rf actions/ctl/.libs actions/ctl/_libs -rm -rf actions/data/.libs actions/data/_libs -rm -rf actions/disruptive/.libs actions/disruptive/_libs -rm -rf actions/transformations/.libs actions/transformations/_libs -rm -rf audit_log/.libs audit_log/_libs -rm -rf audit_log/writer/.libs audit_log/writer/_libs -rm -rf collection/.libs collection/_libs -rm -rf collection/backend/.libs collection/backend/_libs -rm -rf debug_log/.libs debug_log/_libs -rm -rf engine/.libs engine/_libs -rm -rf operators/.libs operators/_libs -rm -rf parser/.libs parser/_libs -rm -rf request_body_processor/.libs request_body_processor/_libs -rm -rf utils/.libs utils/_libs -rm -rf variables/.libs variables/_libs install-libmodsecurity_includesub_actionsHEADERS: $(libmodsecurity_includesub_actions_HEADERS) @$(NORMAL_INSTALL) @list='$(libmodsecurity_includesub_actions_HEADERS)'; test -n "$(libmodsecurity_includesub_actionsdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(libmodsecurity_includesub_actionsdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(libmodsecurity_includesub_actionsdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(libmodsecurity_includesub_actionsdir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(libmodsecurity_includesub_actionsdir)" || exit $$?; \ done uninstall-libmodsecurity_includesub_actionsHEADERS: @$(NORMAL_UNINSTALL) @list='$(libmodsecurity_includesub_actions_HEADERS)'; test -n "$(libmodsecurity_includesub_actionsdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(libmodsecurity_includesub_actionsdir)'; $(am__uninstall_files_from_dir) install-libmodsecurity_includesub_collectionHEADERS: $(libmodsecurity_includesub_collection_HEADERS) @$(NORMAL_INSTALL) @list='$(libmodsecurity_includesub_collection_HEADERS)'; test -n "$(libmodsecurity_includesub_collectiondir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(libmodsecurity_includesub_collectiondir)'"; \ $(MKDIR_P) "$(DESTDIR)$(libmodsecurity_includesub_collectiondir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(libmodsecurity_includesub_collectiondir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(libmodsecurity_includesub_collectiondir)" || exit $$?; \ done uninstall-libmodsecurity_includesub_collectionHEADERS: @$(NORMAL_UNINSTALL) @list='$(libmodsecurity_includesub_collection_HEADERS)'; test -n "$(libmodsecurity_includesub_collectiondir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(libmodsecurity_includesub_collectiondir)'; $(am__uninstall_files_from_dir) install-pkgincludeHEADERS: $(pkginclude_HEADERS) @$(NORMAL_INSTALL) @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(pkgincludedir)'"; \ $(MKDIR_P) "$(DESTDIR)$(pkgincludedir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(pkgincludedir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(pkgincludedir)" || exit $$?; \ done uninstall-pkgincludeHEADERS: @$(NORMAL_UNINSTALL) @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(pkgincludedir)'; $(am__uninstall_files_from_dir) # This directory's subdirectories are mostly independent; you can cd # into them and run 'make' without going through this Makefile. # To change the values of 'make' variables: instead of editing Makefiles, # (1) if the variable is set in 'config.status', edit 'config.status' # (which will cause the Makefiles to be regenerated when you run 'make'); # (2) otherwise, pass the desired values on the 'make' command line. $(am__recursive_targets): @fail=; \ if $(am__make_keepgoing); then \ failcom='fail=yes'; \ else \ failcom='exit 1'; \ fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-recursive TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ $(am__define_uniq_tagged_files); \ 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-recursive CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ 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" cscopelist: cscopelist-recursive cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files 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 @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile $(LTLIBRARIES) $(HEADERS) config.h installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(libmodsecurity_includesub_actionsdir)" "$(DESTDIR)$(libmodsecurity_includesub_collectiondir)" "$(DESTDIR)$(pkgincludedir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi 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) -rm -f actions/$(DEPDIR)/$(am__dirstamp) -rm -f actions/$(am__dirstamp) -rm -f actions/ctl/$(DEPDIR)/$(am__dirstamp) -rm -f actions/ctl/$(am__dirstamp) -rm -f actions/data/$(DEPDIR)/$(am__dirstamp) -rm -f actions/data/$(am__dirstamp) -rm -f actions/disruptive/$(DEPDIR)/$(am__dirstamp) -rm -f actions/disruptive/$(am__dirstamp) -rm -f actions/transformations/$(DEPDIR)/$(am__dirstamp) -rm -f actions/transformations/$(am__dirstamp) -rm -f audit_log/$(DEPDIR)/$(am__dirstamp) -rm -f audit_log/$(am__dirstamp) -rm -f audit_log/writer/$(DEPDIR)/$(am__dirstamp) -rm -f audit_log/writer/$(am__dirstamp) -rm -f collection/$(DEPDIR)/$(am__dirstamp) -rm -f collection/$(am__dirstamp) -rm -f collection/backend/$(DEPDIR)/$(am__dirstamp) -rm -f collection/backend/$(am__dirstamp) -rm -f debug_log/$(DEPDIR)/$(am__dirstamp) -rm -f debug_log/$(am__dirstamp) -rm -f engine/$(DEPDIR)/$(am__dirstamp) -rm -f engine/$(am__dirstamp) -rm -f operators/$(DEPDIR)/$(am__dirstamp) -rm -f operators/$(am__dirstamp) -rm -f parser/$(DEPDIR)/$(am__dirstamp) -rm -f parser/$(am__dirstamp) -rm -f request_body_processor/$(DEPDIR)/$(am__dirstamp) -rm -f request_body_processor/$(am__dirstamp) -rm -f utils/$(DEPDIR)/$(am__dirstamp) -rm -f utils/$(am__dirstamp) -rm -f variables/$(DEPDIR)/$(am__dirstamp) -rm -f variables/$(am__dirstamp) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-recursive clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-recursive -rm -rf ./$(DEPDIR) actions/$(DEPDIR) actions/ctl/$(DEPDIR) actions/data/$(DEPDIR) actions/disruptive/$(DEPDIR) actions/transformations/$(DEPDIR) audit_log/$(DEPDIR) audit_log/writer/$(DEPDIR) collection/$(DEPDIR) collection/backend/$(DEPDIR) debug_log/$(DEPDIR) engine/$(DEPDIR) operators/$(DEPDIR) parser/$(DEPDIR) request_body_processor/$(DEPDIR) utils/$(DEPDIR) variables/$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-hdr distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-libmodsecurity_includesub_actionsHEADERS \ install-libmodsecurity_includesub_collectionHEADERS \ install-pkgincludeHEADERS install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-libLTLIBRARIES install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -rf ./$(DEPDIR) actions/$(DEPDIR) actions/ctl/$(DEPDIR) actions/data/$(DEPDIR) actions/disruptive/$(DEPDIR) actions/transformations/$(DEPDIR) audit_log/$(DEPDIR) audit_log/writer/$(DEPDIR) collection/$(DEPDIR) collection/backend/$(DEPDIR) debug_log/$(DEPDIR) engine/$(DEPDIR) operators/$(DEPDIR) parser/$(DEPDIR) request_body_processor/$(DEPDIR) utils/$(DEPDIR) variables/$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-libLTLIBRARIES \ uninstall-libmodsecurity_includesub_actionsHEADERS \ uninstall-libmodsecurity_includesub_collectionHEADERS \ uninstall-pkgincludeHEADERS .MAKE: $(am__recursive_targets) all install-am install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \ check-am clean clean-generic clean-libLTLIBRARIES \ clean-libtool cscopelist-am ctags ctags-am distclean \ distclean-compile distclean-generic distclean-hdr \ 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-html install-html-am install-info \ install-info-am install-libLTLIBRARIES \ install-libmodsecurity_includesub_actionsHEADERS \ install-libmodsecurity_includesub_collectionHEADERS \ install-man install-pdf install-pdf-am \ install-pkgincludeHEADERS install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ installdirs-am maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \ uninstall-am uninstall-libLTLIBRARIES \ uninstall-libmodsecurity_includesub_actionsHEADERS \ uninstall-libmodsecurity_includesub_collectionHEADERS \ uninstall-pkgincludeHEADERS .PRECIOUS: Makefile @BUILD_PARSER_TRUE@export MAYBE_PARSER = parser # 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: modsecurity-v3.0.6/src/rule_with_actions.cc0000664000175000017500000004164314146026157022235 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "modsecurity/rule.h" #include #include #include #include #include #include #include #include #include "modsecurity/rules_set.h" #include "src/operators/operator.h" #include "modsecurity/actions/action.h" #include "modsecurity/modsecurity.h" #include "src/actions/transformations/none.h" #include "src/actions/tag.h" #include "src/utils/string.h" #include "modsecurity/rule_message.h" #include "modsecurity/rule_with_actions.h" #include "src/actions/msg.h" #include "src/actions/log_data.h" #include "src/actions/severity.h" #include "src/actions/capture.h" #include "src/actions/multi_match.h" #include "src/actions/set_var.h" #include "src/actions/block.h" #include "src/variables/variable.h" namespace modsecurity { using operators::Operator; using actions::Action; using variables::Variable; using actions::transformations::None; using actions::transformations::Transformation; RuleWithActions::RuleWithActions( Actions *actions, Transformations *transformations, std::unique_ptr fileName, int lineNumber) : Rule(std::move(fileName), lineNumber), m_rev(""), m_ver(""), m_accuracy(0), m_maturity(0), m_ruleId(0), m_chainedRuleChild(nullptr), m_chainedRuleParent(nullptr), m_disruptiveAction(nullptr), m_logData(nullptr), m_msg(nullptr), m_severity(nullptr), m_actionsRuntimePos(), m_actionsSetVar(), m_actionsTag(), m_transformations(transformations != NULL ? *transformations : Transformations()), m_containsCaptureAction(false), m_containsMultiMatchAction(false), m_containsStaticBlockAction(false), m_isChained(false) { if (actions) { for (Action *a : *actions) { if (a->action_kind == Action::ConfigurationKind) { a->evaluate(this, NULL); delete a; } else if (a->action_kind == Action::RunTimeOnlyIfMatchKind) { if (dynamic_cast(a)) { m_containsCaptureAction = true; delete a; } else if (dynamic_cast(a)) { m_containsMultiMatchAction = true; delete a; } else if (dynamic_cast(a)) { m_severity = dynamic_cast(a); } else if (dynamic_cast(a)) { m_logData = dynamic_cast(a); } else if (dynamic_cast(a)) { m_msg = dynamic_cast(a); } else if (dynamic_cast(a)) { m_actionsSetVar.push_back( dynamic_cast(a)); } else if (dynamic_cast(a)) { m_actionsTag.push_back(dynamic_cast(a)); } else if (dynamic_cast(a)) { m_actionsRuntimePos.push_back(a); m_containsStaticBlockAction = true; } else if (a->isDisruptive() == true) { if (m_disruptiveAction != nullptr) { delete m_disruptiveAction; m_disruptiveAction = nullptr; } m_disruptiveAction = a; } else { m_actionsRuntimePos.push_back(a); } } else { delete a; std::cout << "General failure, action: " << a->m_name; std::cout << " has an unknown type." << std::endl; throw; } } delete actions; } } RuleWithActions::~RuleWithActions() { if (m_severity) { delete m_severity; m_severity = nullptr; } if (m_logData) { delete m_logData; m_logData = nullptr; } if (m_msg) { delete m_msg; m_msg = nullptr; } while (m_transformations.empty() == false) { auto *a = m_transformations.back(); m_transformations.pop_back(); delete a; } while (m_actionsRuntimePos.empty() == false) { auto *a = m_actionsRuntimePos.back(); m_actionsRuntimePos.pop_back(); delete a; } while (m_actionsSetVar.empty() == false) { auto *a = m_actionsSetVar.back(); m_actionsSetVar.pop_back(); delete a; } while (m_actionsTag.empty() == false) { auto *a = m_actionsTag.back(); m_actionsTag.pop_back(); delete a; } if (m_disruptiveAction != nullptr) { delete m_disruptiveAction; m_disruptiveAction = nullptr; } } bool RuleWithActions::evaluate(Transaction *transaction) { RuleMessage rm(this, transaction); std::shared_ptr rm2 = std::make_shared(&rm); return evaluate(transaction, rm2); } bool RuleWithActions::evaluate(Transaction *transaction, std::shared_ptr ruleMessage) { /* Rule evaluate is pure virtual. * * Rule::evaluate(transaction, ruleMessage); */ /* Matched vars needs to be clear at every new rule execution */ transaction->m_matched.clear(); return true; } void RuleWithActions::executeActionsIndependentOfChainedRuleResult(Transaction *trans, bool *containsBlock, std::shared_ptr ruleMessage) { for (actions::SetVar *a : m_actionsSetVar) { ms_dbg_a(trans, 4, "Running [independent] (non-disruptive) " \ "action: " + *a->m_name.get()); a->evaluate(this, trans); } for (auto &b : trans->m_rules->m_exceptions.m_action_pre_update_target_by_id) { if (m_ruleId != b.first) { continue; } actions::Action *a = dynamic_cast(b.second.get()); if (a->isDisruptive() == true && *a->m_name.get() == "block") { ms_dbg_a(trans, 9, "Rule contains a `block' action"); *containsBlock = true; } else if (*a->m_name.get() == "setvar") { ms_dbg_a(trans, 4, "Running [independent] (non-disruptive) " \ "action: " + *a->m_name.get()); a->evaluate(this, trans, ruleMessage); } } } void RuleWithActions::executeActionsAfterFullMatch(Transaction *trans, bool containsBlock, std::shared_ptr ruleMessage) { bool disruptiveAlreadyExecuted = false; for (auto &a : trans->m_rules->m_defaultActions[getPhase()]) { if (a.get()->action_kind != actions::Action::RunTimeOnlyIfMatchKind) { continue; } if (!a.get()->isDisruptive()) { executeAction(trans, containsBlock, ruleMessage, a.get(), true); } } for (actions::Tag *a : this->m_actionsTag) { ms_dbg_a(trans, 4, "Running (non-disruptive) action: " \ + *a->m_name.get()); a->evaluate(this, trans, ruleMessage); } for (auto &b : trans->m_rules->m_exceptions.m_action_pos_update_target_by_id) { if (m_ruleId != b.first) { continue; } actions::Action *a = dynamic_cast(b.second.get()); executeAction(trans, containsBlock, ruleMessage, a, false); disruptiveAlreadyExecuted = true; } if (m_severity) { m_severity->evaluate(this, trans, ruleMessage); } if (m_logData) { m_logData->evaluate(this, trans, ruleMessage); } if (m_msg) { m_msg->evaluate(this, trans, ruleMessage); } for (Action *a : this->m_actionsRuntimePos) { if (!a->isDisruptive() && !(disruptiveAlreadyExecuted && dynamic_cast(a))) { executeAction(trans, containsBlock, ruleMessage, a, false); } } if (!disruptiveAlreadyExecuted && m_disruptiveAction != nullptr) { executeAction(trans, containsBlock, ruleMessage, m_disruptiveAction, false); } } void RuleWithActions::executeAction(Transaction *trans, bool containsBlock, std::shared_ptr ruleMessage, Action *a, bool defaultContext) { if (a->isDisruptive() == false && *a->m_name.get() != "block") { ms_dbg_a(trans, 9, "Running " \ "action: " + *a->m_name.get()); a->evaluate(this, trans, ruleMessage); return; } if (defaultContext && !containsBlock) { ms_dbg_a(trans, 4, "Ignoring action: " + *a->m_name.get() + \ " (rule does not cotains block)"); return; } if (trans->getRuleEngineState() == RulesSet::EnabledRuleEngine) { ms_dbg_a(trans, 4, "Running (disruptive) action: " + *a->m_name.get() + \ "."); a->evaluate(this, trans, ruleMessage); return; } ms_dbg_a(trans, 4, "Not running any disruptive action (or block): " \ + *a->m_name.get() + ". SecRuleEngine is not On."); } inline void RuleWithActions::executeTransformation( actions::transformations::Transformation *a, std::shared_ptr *value, Transaction *trans, TransformationResults *ret, std::string *path, int *nth) const { std::string *oldValue = (*value).get(); std::string newValue = a->evaluate(*oldValue, trans); if (newValue != *oldValue) { std::shared_ptr u(new std::string(newValue)); if (m_containsMultiMatchAction) { ret->push_back(std::make_pair(u, a->m_name)); (*nth)++; } *value = u; } if (path->empty()) { path->append(*a->m_name.get()); } else { path->append("," + *a->m_name.get()); } ms_dbg_a(trans, 9, " T (" + \ std::to_string(*nth) + ") " + \ *a->m_name.get() + ": \"" + \ utils::string::limitTo(80, newValue) +"\""); } void RuleWithActions::executeTransformations( Transaction *trans, const std::string &in, TransformationResults &ret) { int none = 0; int transformations = 0; std::string path(""); std::shared_ptr value = std::shared_ptr(new std::string(in)); if (m_containsMultiMatchAction == true) { /* keep the original value */ ret.push_back(std::make_pair( std::shared_ptr(new std::string(*value)), std::shared_ptr(new std::string(path)))); } for (Action *a : m_transformations) { if (a->m_isNone) { none++; } } // Check for transformations on the SecDefaultAction // Notice that first we make sure that won't be a t:none // on the target rule. if (none == 0) { for (auto &a : trans->m_rules->m_defaultActions[getPhase()]) { if (a->action_kind \ != actions::Action::RunTimeBeforeMatchAttemptKind) { continue; } // FIXME: here the object needs to be a transformation already. Transformation *t = dynamic_cast(a.get()); executeTransformation(t, &value, trans, &ret, &path, &transformations); } } for (Transformation *a : m_transformations) { if (none == 0) { Transformation *t = dynamic_cast(a); executeTransformation(t, &value, trans, &ret, &path, &transformations); } if (a->m_isNone) { none--; } } // FIXME: It can't be something different from transformation. Sort this // on rules compile time. for (auto &b : trans->m_rules->m_exceptions.m_action_pre_update_target_by_id) { if (m_ruleId != b.first) { continue; } Transformation *a = dynamic_cast(b.second.get()); if (a->m_isNone) { none++; } } for (auto &b : trans->m_rules->m_exceptions.m_action_pre_update_target_by_id) { if (m_ruleId != b.first) { continue; } Transformation *a = dynamic_cast(b.second.get()); if (none == 0) { Transformation *t = dynamic_cast(a); executeTransformation(t, &value, trans, &ret, &path, &transformations); } if (a->m_isNone) { none--; } } if (m_containsMultiMatchAction == true) { ms_dbg_a(trans, 9, "multiMatch is enabled. " \ + std::to_string(ret.size()) + \ " values to be tested."); } if (!m_containsMultiMatchAction) { ret.push_back(std::make_pair( std::shared_ptr(new std::string(*value)), std::shared_ptr(new std::string(path)))); } } bool RuleWithActions::containsTag(const std::string& name, Transaction *t) { for (auto &tag : m_actionsTag) { if (tag != NULL && tag->getName(t) == name) { return true; } } return false; } bool RuleWithActions::containsMsg(const std::string& name, Transaction *t) { return m_msg && m_msg->data(t) == name; } std::vector RuleWithActions::getActionsByName(const std::string& name, Transaction *trans) { std::vector ret; for (auto &z : m_actionsRuntimePos) { if (*z->m_name.get() == name) { ret.push_back(z); } } for (auto &z : m_transformations) { if (*z->m_name.get() == name) { ret.push_back(z); } } for (auto &b : trans->m_rules->m_exceptions.m_action_pre_update_target_by_id) { if (m_ruleId != b.first) { continue; } actions::Action *z = dynamic_cast(b.second.get()); if (*z->m_name.get() == name) { ret.push_back(z); } } for (auto &b : trans->m_rules->m_exceptions.m_action_pos_update_target_by_id) { if (m_ruleId != b.first) { continue; } actions::Action *z = dynamic_cast(b.second.get()); if (*z->m_name.get() == name) { ret.push_back(z); } } return ret; } void RuleWithActions::performLogging(Transaction *trans, std::shared_ptr ruleMessage, bool lastLog, bool chainedParentNull) { /* last rule in the chain. */ bool isItToBeLogged = ruleMessage->m_saveMessage; /** * * RuleMessage is stacked allocated for the rule execution, * anything beyond this may lead to invalid pointer access. * * In case of a warning, o set of messages is saved to be read * at audit log generation. Therefore demands a copy here. * * FIXME: Study an way to avoid the copy. * **/ if (lastLog) { if (chainedParentNull) { isItToBeLogged = (ruleMessage->m_saveMessage && (m_chainedRuleParent == nullptr)); if (isItToBeLogged && !hasMultimatch()) { /* warn */ trans->m_rulesMessages.push_back(*ruleMessage); /* error */ if (!ruleMessage->m_isDisruptive) { trans->serverLog(ruleMessage); } } } else if (hasBlockAction() && !hasMultimatch()) { /* warn */ trans->m_rulesMessages.push_back(*ruleMessage); /* error */ if (!ruleMessage->m_isDisruptive) { trans->serverLog(ruleMessage); } } else { if (isItToBeLogged && !hasMultimatch() && !ruleMessage->m_message.empty()) { /* warn */ trans->m_rulesMessages.push_back(*ruleMessage); /* error */ if (!ruleMessage->m_isDisruptive) { trans->serverLog(ruleMessage); } } } } else { if (hasMultimatch() && isItToBeLogged) { /* warn */ trans->m_rulesMessages.push_back(*ruleMessage.get()); /* error */ if (!ruleMessage->m_isDisruptive) { trans->serverLog(ruleMessage); } RuleMessage *rm = new RuleMessage(this, trans); rm->m_saveMessage = ruleMessage->m_saveMessage; ruleMessage.reset(rm); } } } std::string RuleWithActions::logData(Transaction *t) { return m_logData->data(t); } std::string RuleWithActions::msg(Transaction *t) { return m_msg->data(t); } int RuleWithActions::severity() const { return m_severity->m_severity; } } // namespace modsecurity modsecurity-v3.0.6/src/config.h.in0000664000175000017500000000633214146027122020214 0ustar mhsvierulamhsvierula/* src/config.h.in. Generated from configure.ac by autoheader. */ /* Define if the operating system is AIX */ #undef AIX /* Define if the operating system is DRAGONFLY */ #undef DRAGONFLY /* Define if the operating system is FREEBSD */ #undef FREEBSD /* Define to 1 if you have the header file. */ #undef HAVE_DLFCN_H /* Support for GeoIP was disabled by the utilization of --without-geoip or --with-geoip=no */ #undef HAVE_GEOIP /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H /* Define to 1 if you have the header file. */ #undef HAVE_IOSTREAM /* Support for LMDB was disabled by the utilization of --without-lmdb or --with-lmdb=no */ #undef HAVE_LMDB /* Support for LUA was disabled by the utilization of --without-lua or --with-lua=no */ #undef HAVE_LUA /* Support for MaxMind was disabled by the utilization of --without-maxmind or --with-maxmind=no */ #undef HAVE_MAXMIND /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H /* Support for SSDEEP was disabled by the utilization of --without-ssdeep or --with-ssdeep=no */ #undef HAVE_SSDEEP /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H /* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H /* Define to 1 if you have the header file. */ #undef HAVE_STRING /* Define to 1 if you have the header file. */ #undef HAVE_STRINGS_H /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_UTSNAME_H /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H /* Support for YAJL was disabled by the utilization of --without-yajl or --with-yajl=no */ #undef HAVE_YAJL /* Define if the operating system is HPUX */ #undef HPUX /* Define if the operating system is LINUX */ #undef LINUX /* Define to the sub-directory where libtool stores uninstalled libraries. */ #undef LT_OBJDIR /* Define if the operating system is Macintosh OSX */ #undef MACOSX /* Define if libcurl is available */ #undef MSC_WITH_CURL /* Define if the operating system is NETBSD */ #undef NETBSD /* Define if the operating system is OPENBSD */ #undef OPENBSD /* Name of package */ #undef PACKAGE /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT /* Define to the full name of this package. */ #undef PACKAGE_NAME /* Define to the full name and version of this package. */ #undef PACKAGE_STRING /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME /* Define to the home page for this package. */ #undef PACKAGE_URL /* Define to the version of this package. */ #undef PACKAGE_VERSION /* Define if the operating system is SOLARIS */ #undef SOLARIS /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS /* Version number of package */ #undef VERSION /* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a `char[]'. */ #undef YYTEXT_POINTER modsecurity-v3.0.6/src/operators/0000775000175000017500000000000014146026763020215 5ustar mhsvierulamhsvierulamodsecurity-v3.0.6/src/operators/rx_global.h0000664000175000017500000000314114146026157022333 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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. * */ #ifndef SRC_OPERATORS_RX_GLOBAL_H_ #define SRC_OPERATORS_RX_GLOBAL_H_ #include //#include #include #include #include "src/operators/operator.h" #include "src/utils/regex.h" namespace modsecurity { using Utils::SMatch; using Utils::regex_search; using Utils::Regex; namespace operators { class RxGlobal : public Operator { public: /** @ingroup ModSecurity_Operator */ explicit RxGlobal(std::unique_ptr param) : m_re(nullptr), Operator("RxGlobal", std::move(param)) { m_couldContainsMacro = true; } ~RxGlobal() { if (m_string->m_containsMacro == false && m_re != NULL) { delete m_re; m_re = NULL; } } bool evaluate(Transaction *transaction, RuleWithActions *rule, const std::string& input, std::shared_ptr ruleMessage) override; bool init(const std::string &arg, std::string *error) override; private: Regex *m_re; }; } // namespace operators } // namespace modsecurity #endif // SRC_OPERATORS_RX_GLOBAL_H_ modsecurity-v3.0.6/src/operators/validate_schema.cc0000664000175000017500000000737114146026157023642 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "src/operators/validate_schema.h" #include #include "src/operators/operator.h" #include "src/request_body_processor/xml.h" #include "src/utils/system.h" namespace modsecurity { namespace operators { #ifdef WITH_LIBXML2 bool ValidateSchema::init(const std::string &file, std::string *error) { std::string err; m_resource = utils::find_resource(m_param, file, &err); if (m_resource == "") { error->assign("XML: File not found: " + m_param + ". " + err); return false; } return true; } bool ValidateSchema::evaluate(Transaction *t, const std::string &str) { int rc; m_parserCtx = xmlSchemaNewParserCtxt(m_resource.c_str()); if (m_parserCtx == NULL) { std::stringstream err; err << "XML: Failed to load Schema from file: "; err << m_resource; err << ". "; if (m_err.empty() == false) { err << m_err; } ms_dbg_a(t, 4, err.str()); return true; } xmlSchemaSetParserErrors(m_parserCtx, (xmlSchemaValidityErrorFunc)error_load, (xmlSchemaValidityWarningFunc)warn_load, &m_err); xmlThrDefSetGenericErrorFunc(m_parserCtx, null_error); xmlSetGenericErrorFunc(m_parserCtx, null_error); m_schema = xmlSchemaParse(m_parserCtx); if (m_schema == NULL) { std::stringstream err; err << "XML: Failed to load Schema: "; err << m_resource; err << "."; if (m_err.empty() == false) { err << " " << m_err; } ms_dbg_a(t, 4, err.str()); xmlSchemaFreeParserCtxt(m_parserCtx); return true; } m_validCtx = xmlSchemaNewValidCtxt(m_schema); if (m_validCtx == NULL) { std::stringstream err("XML: Failed to create validation context."); if (m_err.empty() == false) { err << " " << m_err; } ms_dbg_a(t, 4, err.str()); return true; } /* Send validator errors/warnings to msr_log */ xmlSchemaSetValidErrors(m_validCtx, (xmlSchemaValidityErrorFunc)error_runtime, (xmlSchemaValidityWarningFunc)warn_runtime, t); if (t->m_xml->m_data.doc == NULL) { ms_dbg_a(t, 4, "XML document tree could not be found for " \ "schema validation."); return true; } if (t->m_xml->m_data.well_formed != 1) { ms_dbg_a(t, 4, "XML: Schema validation failed because " \ "content is not well formed."); return true; } /* Make sure there were no other generic processing errors */ /* if (msr->msc_reqbody_error) { ms_dbg_a(t, 4, "XML: Schema validation could not proceed due to previous" " processing errors."); return true; } */ rc = xmlSchemaValidateDoc(m_validCtx, t->m_xml->m_data.doc); if (rc != 0) { ms_dbg_a(t, 4, "XML: Schema validation failed."); xmlSchemaFree(m_schema); xmlSchemaFreeParserCtxt(m_parserCtx); return true; /* No match. */ } ms_dbg_a(t, 4, "XML: Successfully validated payload against " \ "Schema: " + m_resource); xmlSchemaFree(m_schema); xmlSchemaFreeParserCtxt(m_parserCtx); return false; } #endif } // namespace operators } // namespace modsecurity modsecurity-v3.0.6/src/operators/within.h0000664000175000017500000000230214146026157021662 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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. * */ #ifndef SRC_OPERATORS_WITHIN_H_ #define SRC_OPERATORS_WITHIN_H_ #include #include #include #include "src/operators/operator.h" namespace modsecurity { namespace operators { class Within : public Operator { public: /** @ingroup ModSecurity_Operator */ explicit Within(std::unique_ptr param) : Operator("Within", std::move(param)) { m_couldContainsMacro = true; } bool evaluate(Transaction *transaction, RuleWithActions *rule, const std::string &str, std::shared_ptr ruleMessage) override; }; } // namespace operators } // namespace modsecurity #endif // SRC_OPERATORS_WITHIN_H_ modsecurity-v3.0.6/src/operators/le.h0000664000175000017500000000214514146026157020765 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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. * */ #ifndef SRC_OPERATORS_LE_H_ #define SRC_OPERATORS_LE_H_ #include #include #include #include "src/operators/operator.h" namespace modsecurity { namespace operators { class Le : public Operator { public: /** @ingroup ModSecurity_Operator */ explicit Le(std::unique_ptr param) : Operator("Le", std::move(param)) { m_couldContainsMacro = true; } bool evaluate(Transaction *transaction, const std::string &input) override; }; } // namespace operators } // namespace modsecurity #endif // SRC_OPERATORS_LE_H_ modsecurity-v3.0.6/src/operators/geo_lookup.cc0000664000175000017500000000243014146026157022663 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "src/operators/geo_lookup.h" #if WITH_MAXMIND #include #endif #if WITH_GEOIP #include #endif #include #include #include "src/operators/operator.h" #include "src/utils/geo_lookup.h" namespace modsecurity { namespace operators { bool GeoLookup::evaluate(Transaction *trans, const std::string &exp) { using std::placeholders::_1; using std::placeholders::_2; bool ret = true; if (trans) { ret = Utils::GeoLookup::getInstance().lookup(exp, trans, std::bind(&GeoLookup::debug, this, trans, _1, _2)); } else { ret = Utils::GeoLookup::getInstance().lookup(exp, NULL, nullptr); } return ret; } } // namespace operators } // namespace modsecurity modsecurity-v3.0.6/src/operators/contains.cc0000664000175000017500000000215614146026157022343 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "src/operators/contains.h" #include namespace modsecurity { namespace operators { bool Contains::evaluate(Transaction *transaction, RuleWithActions *rule, const std::string &input, std::shared_ptr ruleMessage) { std::string p(m_string->evaluate(transaction)); size_t offset = input.find(p); bool contains = offset != std::string::npos; if (contains && transaction) { logOffset(ruleMessage, offset, p.size()); transaction->m_matched.push_back(p); } return contains; } } // namespace operators } // namespace modsecurity modsecurity-v3.0.6/src/operators/.directory0000664000175000017500000000023514146026157022217 0ustar mhsvierulamhsvierula[Dolphin] SortRole=type Timestamp=2015,6,11,13,57,39 Version=3 ViewMode=1 VisibleRoles=Details_text,Details_size,Details_date,Details_type,CustomizedDetails modsecurity-v3.0.6/src/operators/fuzzy_hash.h0000664000175000017500000000265014146026157022560 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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. * */ #ifndef SRC_OPERATORS_FUZZY_HASH_H_ #define SRC_OPERATORS_FUZZY_HASH_H_ #include #include #include #ifdef WITH_SSDEEP #include #endif #include "src/operators/operator.h" namespace modsecurity { namespace operators { struct fuzzy_hash_chunk { char *data; struct fuzzy_hash_chunk *next; }; class FuzzyHash : public Operator { public: /** @ingroup ModSecurity_Operator */ explicit FuzzyHash(std::unique_ptr param) : Operator("FuzzyHash", std::move(param)), m_threshold(0), m_head(NULL) { } ~FuzzyHash(); bool evaluate(Transaction *transaction, const std::string &std) override; bool init(const std::string ¶m, std::string *error) override; private: int m_threshold; struct fuzzy_hash_chunk *m_head; }; } // namespace operators } // namespace modsecurity #endif // SRC_OPERATORS_FUZZY_HASH_H_ modsecurity-v3.0.6/src/operators/pm_f.h0000664000175000017500000000177114146026157021312 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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. * */ #ifndef SRC_OPERATORS_PM_F_H_ #define SRC_OPERATORS_PM_F_H_ #include #include #include #include "src/operators/pm_from_file.h" namespace modsecurity { namespace operators { class PmF : public PmFromFile { public: /** @ingroup ModSecurity_Operator */ explicit PmF(std::unique_ptr param) : PmFromFile("PmFromF", std::move(param)) { } }; } // namespace operators } // namespace modsecurity #endif // SRC_OPERATORS_PM_F_H_ modsecurity-v3.0.6/src/operators/verify_cc.h0000664000175000017500000000263614146026157022343 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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. * */ #ifndef SRC_OPERATORS_VERIFY_CC_H_ #define SRC_OPERATORS_VERIFY_CC_H_ #include #include #include #include #include "src/operators/operator.h" namespace modsecurity { namespace operators { class VerifyCC : public Operator { public: /** @ingroup ModSecurity_Operator */ explicit VerifyCC(std::unique_ptr param) : Operator("VerifyCC", std::move(param)), m_pc(NULL), m_pce(NULL) { } ~VerifyCC(); bool evaluate(Transaction *t, RuleWithActions *rule, const std::string& input, std::shared_ptr ruleMessage) override; bool init(const std::string ¶m, std::string *error) override; private: pcre *m_pc; pcre_extra *m_pce; static int luhnVerify(const char *ccnumber, int len); }; } // namespace operators } // namespace modsecurity #endif // SRC_OPERATORS_VERIFY_CC_H_ modsecurity-v3.0.6/src/operators/rbl.cc0000664000175000017500000001521114146026157021300 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "src/operators/rbl.h" #include #include #include #include #include #include #include "modsecurity/rules_set.h" #include "src/operators/operator.h" namespace modsecurity { namespace operators { std::string Rbl::mapIpToAddress(const std::string &ipStr, Transaction *trans) const { std::string addr; int h0, h1, h2, h3; std::string key; if (trans && trans->m_rules->m_httpblKey.m_set == true) { key = trans->m_rules->m_httpblKey.m_value; } if (sscanf(ipStr.c_str(), "%d.%d.%d.%d", &h0, &h1, &h2, &h3) != 4) { ms_dbg_a(trans, 0, std::string("Failed to understand `" + ipStr + "' as a valid IP address, assuming domain format input")); addr = ipStr + "." + m_service; return addr; } if (m_demandsPassword && key.empty()) { ms_dbg_a(trans, 0, std::string("Missing RBL key, cannot continue " \ "with the operator execution, please set the key using: " \ "SecHttpBlKey")); return addr; } addr = std::to_string(h3) + "." + std::to_string(h2) + "." + std::to_string(h1) + "." + std::to_string(h0) + "." + m_service; if (m_demandsPassword) { addr = key + "." + addr; } return addr; } void Rbl::futherInfo_httpbl(struct sockaddr_in *sin, const std::string &ipStr, Transaction *trans) { char *respBl; int first, days, score, type; #ifndef NO_LOGS std::string ptype; #endif respBl = inet_ntoa(sin->sin_addr); if (sscanf(respBl, "%d.%d.%d.%d", &first, &days, &score, &type) != 4) { ms_dbg_a(trans, 4, "RBL lookup of " + ipStr + " failed: bad response"); return; } if (first != 127) { ms_dbg_a(trans, 4, "RBL lookup of " + ipStr + " failed: bad response"); return; } #ifndef NO_LOGS switch (type) { case 0: ptype = "Search Engine"; break; case 1: ptype = "Suspicious IP"; break; case 2: ptype = "Harvester IP"; break; case 3: ptype = "Suspicious harvester IP"; break; case 4: ptype = "Comment spammer IP"; break; case 5: ptype = "Suspicious comment spammer IP"; break; case 6: ptype = "Harvester and comment spammer IP"; break; case 7: ptype = "Suspicious harvester comment spammer IP"; break; default: ptype = " "; } #endif ms_dbg_a(trans, 4, "RBL lookup of " + ipStr + " succeeded. %s: " \ + std::to_string(days) + " " \ "days since last activity, threat score " \ + std::to_string(score) + ". Case: " + ptype); } void Rbl::futherInfo_spamhaus(unsigned int high8bits, const std::string &ipStr, Transaction *trans) { switch (high8bits) { case 2: case 3: ms_dbg_a(trans, 4, "RBL lookup of " + ipStr + " succeeded " \ "(Static UBE sources)."); break; case 4: case 5: case 6: case 7: ms_dbg_a(trans, 4, "RBL lookup of " + ipStr + " succeeded " \ "(Illegal 3rd party exploits)."); break; case 10: case 11: ms_dbg_a(trans, 4, "RBL lookup of " + ipStr + " succeeded " \ "(Delivering unauthenticated SMTP email)."); break; default: ms_dbg_a(trans, 4, "RBL lookup of " + ipStr + " succeeded "); break; } } void Rbl::futherInfo_uribl(unsigned int high8bits, const std::string &ipStr, Transaction *trans) { switch (high8bits) { case 2: ms_dbg_a(trans, 4, "RBL lookup of " + ipStr + " succeeded (BLACK)."); break; case 4: ms_dbg_a(trans, 4, "RBL lookup of " + ipStr + " succeeded (GREY)."); break; case 8: ms_dbg_a(trans, 4, "RBL lookup of " + ipStr + " succeeded (RED)."); break; case 14: ms_dbg_a(trans, 4, "RBL lookup of " + ipStr + " succeeded " \ "(BLACK,GREY,RED)."); break; case 255: ms_dbg_a(trans, 4, "RBL lookup of " + ipStr + " succeeded " \ "(DNS IS BLOCKED)."); break; default: ms_dbg_a(trans, 4, "RBL lookup of " + ipStr + " succeeded (WHITE)."); break; } } void Rbl::furtherInfo(struct sockaddr_in *sin, const std::string &ipStr, Transaction *trans, RblProvider provider) { unsigned int high8bits = sin->sin_addr.s_addr >> 24; switch (provider) { case RblProvider::UnknownProvider: ms_dbg_a(trans, 2, "RBL lookup of " + ipStr + " succeeded."); break; case RblProvider::httpbl: futherInfo_httpbl(sin, ipStr, trans); break; case RblProvider::uribl: futherInfo_uribl(high8bits, ipStr, trans); break; case RblProvider::spamhaus: futherInfo_spamhaus(high8bits, ipStr, trans); break; } } bool Rbl::evaluate(Transaction *t, RuleWithActions *rule, const std::string& ipStr, std::shared_ptr ruleMessage) { struct addrinfo *info = NULL; std::string host = Rbl::mapIpToAddress(ipStr, t); int rc = 0; if (host.empty()) { return false; } rc = getaddrinfo(host.c_str(), NULL, NULL, &info); if (rc != 0) { if (info != NULL) { freeaddrinfo(info); } ms_dbg_a(t, 5, "RBL lookup of " + ipStr + " failed."); return false; } struct sockaddr *addr = info->ai_addr; struct sockaddr_in *sin = (struct sockaddr_in *) addr; furtherInfo(sin, ipStr, t, m_provider); freeaddrinfo(info); if (rule && t && rule->hasCaptureAction()) { t->m_collections.m_tx_collection->storeOrUpdateFirst( "0", std::string(ipStr)); ms_dbg_a(t, 7, "Added RXL match TX.0: " + \ std::string(ipStr)); } return true; } } // namespace operators } // namespace modsecurity modsecurity-v3.0.6/src/operators/verify_cc.cc0000664000175000017500000001044514146026157022476 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "src/operators/verify_cc.h" #include #include #include #include #include "src/operators/operator.h" #if PCRE_HAVE_JIT #define pcre_study_opt PCRE_STUDY_JIT_COMPILE #else #define pcre_study_opt 0 #endif namespace modsecurity { namespace operators { VerifyCC::~VerifyCC() { if (m_pc != NULL) { pcre_free(m_pc); m_pc = NULL; } if (m_pce != NULL) { #if PCRE_HAVE_JIT pcre_free_study(m_pce); #else pcre_free(m_pce); #endif m_pce = NULL; } } /** * Luhn Mod-10 Method (ISO 2894/ANSI 4.13) */ int VerifyCC::luhnVerify(const char *ccnumber, int len) { int sum[2] = { 0, 0 }; int odd = 0; int digits = 0; int i; /* Weighted lookup table which is just a precalculated (i = index): * i*2 + (( (i*2) > 9 ) ? -9 : 0) */ /* weight lookup table */ static const int wtable[10] = {0, 2, 4, 6, 8, 1, 3, 5, 7, 9}; /* Add up only digits (weighted digits via lookup table) * for both odd and even CC numbers to avoid 2 passes. */ for (i = 0; i < len; i++) { if (ccnumber[i] >= (0 + 48) && ccnumber[i] <= (9 + 48)) { sum[0] += (!odd ? wtable[ccnumber[i] - '0'] : (ccnumber[i] - '0')); sum[1] += (odd ? wtable[ccnumber[i] - '0'] : (ccnumber[i] - '0')); odd = 1 - odd; /* alternate weights */ digits++; } } /* No digits extracted */ if (digits == 0) { return 0; } /* Do a mod 10 on the sum */ sum[odd] %= 10; /* If the result is a zero the card is valid. */ return sum[odd] ? 0 : 1; } bool VerifyCC::init(const std::string ¶m2, std::string *error) { const char *errptr = NULL; int erroffset = 0; m_pc = pcre_compile(m_param.c_str(), PCRE_DOTALL|PCRE_MULTILINE, &errptr, &erroffset, NULL); if (m_pc == NULL) { error->assign(errptr); return false; } m_pce = pcre_study(m_pc, pcre_study_opt, &errptr); if (m_pce == NULL) { if (errptr == NULL) { /* * Per pcre_study(3) m_pce == NULL && errptr == NULL means * that no addional information is found, so no need to study */ return true; } error->assign(errptr); return false; } return true; } bool VerifyCC::evaluate(Transaction *t, RuleWithActions *rule, const std::string& i, std::shared_ptr ruleMessage) { int offset = 0; int target_length = i.length(); for (offset = 0; offset < target_length; offset++) { std::string match; int ovector[33]; memset(ovector, 0, sizeof(ovector)); int ret = pcre_exec(m_pc, m_pce, i.c_str(), i.size(), offset, 0, ovector, 33) > 0; /* If there was no match, then we are done. */ if (ret == PCRE_ERROR_NOMATCH) { break; } if (ret < 0) { return false; } if (ret > 0) { match = std::string(i, ovector[0], ovector[1] - ovector[0]); int is_cc = luhnVerify(match.c_str(), match.size()); if (is_cc) { if (t) { if (rule && rule->hasCaptureAction()) { t->m_collections.m_tx_collection->storeOrUpdateFirst( "0", std::string(match)); ms_dbg_a(t, 7, "Added VerifyCC match TX.0: " + \ std::string(match)); } ms_dbg_a(t, 9, "CC# match \"" + m_param + "\" at " + i + ". [offset " + std::to_string(offset) + "]"); } return true; } } } return false; } } // namespace operators } // namespace modsecurity modsecurity-v3.0.6/src/operators/fuzzy_hash.cc0000664000175000017500000000624414146026157022721 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "src/operators/fuzzy_hash.h" #include #include "src/operators/operator.h" #include "src/utils/system.h" namespace modsecurity { namespace operators { bool FuzzyHash::init(const std::string ¶m2, std::string *error) { #ifdef WITH_SSDEEP std::string digit; std::string file; std::istream *iss; struct fuzzy_hash_chunk *chunk, *t; std::string err; auto pos = m_param.find_last_of(' '); if (pos == std::string::npos) { error->assign("Please use @fuzzyHash with filename and value"); return false; } digit.append(std::string(m_param, pos+1)); file.append(std::string(m_param, 0, pos)); try { m_threshold = std::stoi(digit); } catch (...) { error->assign("Expecting a digit, got: " + digit); return false; } std::string resource = utils::find_resource(file, param2, &err); iss = new std::ifstream(resource, std::ios::in); if (((std::ifstream *)iss)->is_open() == false) { error->assign("Failed to open file: " + m_param + ". " + err); delete iss; return false; } for (std::string line; std::getline(*iss, line); ) { chunk = (struct fuzzy_hash_chunk *)calloc(1, sizeof(struct fuzzy_hash_chunk)); chunk->data = strdup(line.c_str()); chunk->next = NULL; if (m_head == NULL) { m_head = chunk; } else { t = m_head; while (t->next) { t = t->next; } t->next = chunk; } } delete iss; return true; #else error->assign("@fuzzyHash: SSDEEP support was not enabled " \ "during the compilation."); return false; #endif } FuzzyHash::~FuzzyHash() { struct fuzzy_hash_chunk *c = m_head; while (c) { struct fuzzy_hash_chunk *t = c; free(c->data); c->data = NULL; c = c->next; free(t); } m_head = NULL; } bool FuzzyHash::evaluate(Transaction *t, const std::string &str) { #ifdef WITH_SSDEEP char result[FUZZY_MAX_RESULT]; struct fuzzy_hash_chunk *chunk = m_head; if (fuzzy_hash_buf((const unsigned char*)str.c_str(), str.size(), result)) { ms_dbg_a(t, 4, "Problems generating fuzzy hash"); return false; } while (chunk != NULL) { int i = fuzzy_compare(chunk->data, result); if (i >= m_threshold) { ms_dbg_a(t, 4, "Fuzzy hash: matched " \ "with score: " + std::to_string(i) + "."); return true; } chunk = chunk->next; } #endif /* No match. */ return false; } } // namespace operators } // namespace modsecurity modsecurity-v3.0.6/src/operators/rsub.cc0000664000175000017500000000170014146026157021472 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "src/operators/rsub.h" #include #include "src/operators/operator.h" namespace modsecurity { namespace operators { bool Rsub::evaluate(Transaction *transaction, const std::string &str) { /** * @todo Implement the operator Rsub. * Reference: https://github.com/SpiderLabs/ModSecurity/wiki/Reference-Manual#rsub */ return true; } } // namespace operators } // namespace modsecurity modsecurity-v3.0.6/src/operators/ip_match_from_file.cc0000664000175000017500000000237314146026157024334 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "src/operators/ip_match_from_file.h" #include "src/utils/system.h" #include #include #include "src/operators/operator.h" namespace modsecurity { namespace operators { bool IpMatchFromFile::init(const std::string &file, std::string *error) { std::string e(""); bool res = false; if (m_param.compare(0, 8, "https://") == 0) { res = m_tree.addFromUrl(m_param, &e); } else { std::string resf = utils::find_resource(m_param, file, error); if (resf == "") { return false; } res = m_tree.addFromFile(resf, &e); } if (res == false) { error->assign(e); } return res; } } // namespace operators } // namespace modsecurity modsecurity-v3.0.6/src/operators/begins_with.cc0000664000175000017500000000214114146026157023021 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "src/operators/begins_with.h" #include #include "src/operators/operator.h" namespace modsecurity { namespace operators { bool BeginsWith::evaluate(Transaction *transaction, RuleWithActions *rule, const std::string &str, std::shared_ptr ruleMessage) { std::string p(m_string->evaluate(transaction)); if (str.size() < p.size()) { return false; } else if (!str.compare(0, p.size(), p)) { logOffset(ruleMessage, 0, p.size()); return true; } return false; } } // namespace operators } // namespace modsecurity modsecurity-v3.0.6/src/operators/str_match.cc0000664000175000017500000000163414146026157022511 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "src/operators/str_match.h" #include #include "src/operators/operator.h" namespace modsecurity { namespace operators { bool StrMatch::evaluate(Transaction *transaction, const std::string &input) { std::string p(m_string->evaluate(transaction)); bool ret = input.find(p) != std::string::npos; return ret; } } // namespace operators } // namespace modsecurity modsecurity-v3.0.6/src/operators/pm.cc0000664000175000017500000000657414146026157021151 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "src/operators/pm.h" #include #include #include #include #include #include #include #include #include "src/operators/operator.h" #include "src/utils/acmp.h" #include "src/utils/string.h" namespace modsecurity { namespace operators { Pm::~Pm() { acmp_node_t *root = m_p->root_node; cleanup(root); free(m_p); m_p = NULL; #ifdef MODSEC_MUTEX_ON_PM pthread_mutex_destroy(&m_lock); #endif } void Pm::cleanup(acmp_node_t *n) { if (n == NULL) { return; } cleanup(n->sibling); cleanup(n->child); postOrderTraversal(n->btree); if (n->text && strlen(n->text) > 0) { free(n->text); n->text = NULL; } if (n->pattern && strlen(n->pattern) > 0) { free(n->pattern); n->pattern = NULL; } free(n); } void Pm::postOrderTraversal(acmp_btree_node_t *node) { if (node == NULL) { return; } postOrderTraversal(node->right); postOrderTraversal(node->left); free(node); } bool Pm::evaluate(Transaction *transaction, RuleWithActions *rule, const std::string &input, std::shared_ptr ruleMessage) { int rc; ACMPT pt; pt.parser = m_p; pt.ptr = NULL; const char *match = NULL; #ifdef MODSEC_MUTEX_ON_PM pthread_mutex_lock(&m_lock); #endif rc = acmp_process_quick(&pt, &match, input.c_str(), input.length()); #ifdef MODSEC_MUTEX_ON_PM pthread_mutex_unlock(&m_lock); #endif if (rc >= 0 && transaction) { std::string match_(match?match:""); logOffset(ruleMessage, rc - match_.size() + 1, match_.size()); transaction->m_matched.push_back(match_); if (rule && rule->hasCaptureAction()) { transaction->m_collections.m_tx_collection->storeOrUpdateFirst("0", match_); ms_dbg_a(transaction, 7, "Added pm match TX.0: " + \ match_); } } return rc >= 0; } bool Pm::init(const std::string &file, std::string *error) { std::vector vec; std::istringstream *iss; const char *err = NULL; #ifdef MODSEC_MUTEX_ON_PM pthread_mutex_init(&m_lock, NULL); #endif char *content = parse_pm_content(m_param.c_str(), m_param.length(), &err); if (content == NULL) { iss = new std::istringstream(m_param); } else { iss = new std::istringstream(content); } std::copy(std::istream_iterator(*iss), std::istream_iterator(), back_inserter(vec)); for (auto &a : vec) { acmp_add_pattern(m_p, a.c_str(), NULL, NULL, a.length()); } while (m_p->is_failtree_done == 0) { acmp_prepare(m_p); } if (content) { free(content); content = NULL; } delete iss; return true; } } // namespace operators } // namespace modsecurity modsecurity-v3.0.6/src/operators/rx.h0000664000175000017500000000306214146026157021015 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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. * */ #ifndef SRC_OPERATORS_RX_H_ #define SRC_OPERATORS_RX_H_ #include #include #include #include #include "src/operators/operator.h" #include "src/utils/regex.h" namespace modsecurity { using Utils::SMatch; using Utils::regex_search; using Utils::Regex; namespace operators { class Rx : public Operator { public: /** @ingroup ModSecurity_Operator */ explicit Rx(std::unique_ptr param) : m_re(nullptr), Operator("Rx", std::move(param)) { m_couldContainsMacro = true; } ~Rx() { if (m_string->m_containsMacro == false && m_re != NULL) { delete m_re; m_re = NULL; } } bool evaluate(Transaction *transaction, RuleWithActions *rule, const std::string& input, std::shared_ptr ruleMessage) override; bool init(const std::string &arg, std::string *error) override; private: Regex *m_re; }; } // namespace operators } // namespace modsecurity #endif // SRC_OPERATORS_RX_H_ modsecurity-v3.0.6/src/operators/pm_from_file.cc0000664000175000017500000000415514146026157023164 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "src/operators/pm_from_file.h" #include #include "src/operators/operator.h" #include "src/utils/https_client.h" #include "src/utils/system.h" namespace modsecurity { namespace operators { bool PmFromFile::isComment(const std::string &s) { if (s.size() == 0) { return true; } size_t pos = s.find("#"); if (pos != std::string::npos) { for (int i = 0; i < pos; i++) { if (!std::isspace(s[i])) { return false; } } } else { return false; } return true; } bool PmFromFile::init(const std::string &config, std::string *error) { std::istream *iss; if (m_param.compare(0, 8, "https://") == 0) { Utils::HttpsClient client; bool ret = client.download(m_param); if (ret == false) { error->assign(client.error); return false; } iss = new std::stringstream(client.content); } else { std::string err; std::string resource = utils::find_resource(m_param, config, &err); iss = new std::ifstream(resource, std::ios::in); if (((std::ifstream *)iss)->is_open() == false) { error->assign("Failed to open file: " + m_param + ". " + err); delete iss; return false; } } for (std::string line; std::getline(*iss, line); ) { if (isComment(line) == false) { acmp_add_pattern(m_p, line.c_str(), NULL, NULL, line.length()); } } while (m_p->is_failtree_done == 0) { acmp_prepare(m_p); } delete iss; return true; } } // namespace operators } // namespace modsecurity modsecurity-v3.0.6/src/operators/ends_with.h0000664000175000017500000000233214146026157022347 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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. * */ #ifndef SRC_OPERATORS_ENDS_WITH_H_ #define SRC_OPERATORS_ENDS_WITH_H_ #include #include #include #include "src/operators/operator.h" namespace modsecurity { namespace operators { class EndsWith : public Operator { public: /** @ingroup ModSecurity_Operator */ explicit EndsWith(std::unique_ptr param) : Operator("EndsWith", std::move(param)) { m_couldContainsMacro = true; } bool evaluate(Transaction *transaction, RuleWithActions *rule, const std::string &str, std::shared_ptr ruleMessage) override; }; } // namespace operators } // namespace modsecurity #endif // SRC_OPERATORS_ENDS_WITH_H_ modsecurity-v3.0.6/src/operators/ge.h0000664000175000017500000000214214146026157020755 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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. * */ #ifndef SRC_OPERATORS_GE_H_ #define SRC_OPERATORS_GE_H_ #include #include #include #include "src/operators/operator.h" namespace modsecurity { namespace operators { class Ge : public Operator { public: /** @ingroup ModSecurity_Operator */ explicit Ge(std::unique_ptr param) : Operator("Ge", std::move(param)) { m_couldContainsMacro = true; } bool evaluate(Transaction *transaction, const std::string &input) override; }; } // namespace operators } // namespace modsecurity #endif // SRC_OPERATORS_GE_H_ modsecurity-v3.0.6/src/operators/verify_svnr.h0000664000175000017500000000254514146026157022745 0ustar mhsvierulamhsvierula #ifndef SRC_OPERATORS_VERIFY_SVNR_H_ #define SRC_OPERATORS_VERIFY_SVNR_H_ #include #include #include #include "src/operators/operator.h" #include "src/utils/regex.h" namespace modsecurity { using Utils::SMatch; using Utils::regex_search; using Utils::Regex; namespace operators { class VerifySVNR : public Operator { public: /** @ingroup ModSecurity_Operator */ explicit VerifySVNR(std::unique_ptr param) : Operator("VerifySVNR", std::move(param)) { m_re = new Regex(m_param); } ~VerifySVNR() { delete m_re; } bool operator=(const VerifySVNR &a) = delete; VerifySVNR(const VerifySVNR &a) = delete; bool evaluate(Transaction *transaction, RuleWithActions *rule, const std::string& input, std::shared_ptr ruleMessage) override; bool verify(const char *ssnumber, int len); private: Regex *m_re; static int convert_to_int(const char c); const char bad_svnr[12][11] = { "0000000000", "0123456789", "1234567890", "1111111111", "2222222222", "3333333333", "4444444444", "5555555555", "6666666666", "7777777777", "8888888888", "9999999999"}; }; } // namespace operators } // namespace modsecurity #endif // SRC_OPERATORS_VERIFY_SVNR_H_ modsecurity-v3.0.6/src/operators/begins_with.h0000664000175000017500000000225614146026157022672 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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. * */ #ifndef SRC_OPERATORS_BEGINS_WITH_H_ #define SRC_OPERATORS_BEGINS_WITH_H_ #include #include #include #include "src/operators/operator.h" namespace modsecurity { namespace operators { class BeginsWith : public Operator { public: /** @ingroup ModSecurity_Operator */ explicit BeginsWith(std::unique_ptr param) : Operator("BeginsWith", std::move(param)) { } bool evaluate(Transaction *transaction, RuleWithActions *rule, const std::string &str, std::shared_ptr ruleMessage) override; }; } // namespace operators } // namespace modsecurity #endif // SRC_OPERATORS_BEGINS_WITH_H_ modsecurity-v3.0.6/src/operators/inspect_file.cc0000664000175000017500000000410514146026157023165 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "src/operators/inspect_file.h" #include #include #include #include "src/operators/operator.h" #include "src/utils/system.h" namespace modsecurity { namespace operators { bool InspectFile::init(const std::string ¶m2, std::string *error) { std::istream *iss; std::string err; std::string err_lua; m_file = utils::find_resource(m_param, param2, &err); iss = new std::ifstream(m_file, std::ios::in); if (((std::ifstream *)iss)->is_open() == false) { error->assign("Failed to open file: " + m_param + ". " + err); delete iss; return false; } if (engine::Lua::isCompatible(m_file, &m_lua, &err_lua) == true) { m_isScript = true; } delete iss; return true; } bool InspectFile::evaluate(Transaction *transaction, const std::string &str) { if (m_isScript) { return m_lua.run(transaction, str); } else { FILE *in; char buff[512]; std::stringstream s; std::string res; std::string openstr; openstr.append(m_param); openstr.append(" "); openstr.append(str); if (!(in = popen(openstr.c_str(), "r"))) { return false; } while (fgets(buff, sizeof(buff), in) != NULL) { s << buff; } pclose(in); res.append(s.str()); if (res.size() > 1 && res.at(0) != '1') { return true; /* match */ } /* no match */ return false; } } } // namespace operators } // namespace modsecurity modsecurity-v3.0.6/src/operators/ip_match_from_file.h0000664000175000017500000000236514146026157024177 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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. * */ #ifndef SRC_OPERATORS_IP_MATCH_FROM_FILE_H_ #define SRC_OPERATORS_IP_MATCH_FROM_FILE_H_ #include #include #include #include "src/operators/ip_match.h" namespace modsecurity { namespace operators { class IpMatchFromFile : public IpMatch { public: /** @ingroup ModSecurity_Operator */ explicit IpMatchFromFile(std::unique_ptr param) : IpMatch("IpMatchFromFile", std::move(param)) { } IpMatchFromFile(const std::string &n, std::unique_ptr param) : IpMatch(n, std::move(param)) { } bool init(const std::string& file, std::string *error) override; }; } // namespace operators } // namespace modsecurity #endif // SRC_OPERATORS_IP_MATCH_FROM_FILE_H_ modsecurity-v3.0.6/src/operators/unconditional_match.h0000664000175000017500000000214414146026157024406 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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. * */ #ifndef SRC_OPERATORS_UNCONDITIONAL_MATCH_H_ #define SRC_OPERATORS_UNCONDITIONAL_MATCH_H_ #include #include #include "modsecurity/transaction.h" #include "src/operators/operator.h" namespace modsecurity { namespace operators { class UnconditionalMatch : public Operator { public: /** @ingroup ModSecurity_Operator */ UnconditionalMatch() : Operator("UnconditionalMatch") { } bool evaluate(Transaction *transaction, const std::string &exp) override; }; } // namespace operators } // namespace modsecurity #endif // SRC_OPERATORS_UNCONDITIONAL_MATCH_H_ modsecurity-v3.0.6/src/operators/no_match.h0000664000175000017500000000202414146026157022151 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include "modsecurity/transaction.h" #include "src/operators/operator.h" #ifndef SRC_OPERATORS_NO_MATCH_H_ #define SRC_OPERATORS_NO_MATCH_H_ namespace modsecurity { namespace operators { class NoMatch : public Operator { public: /** @ingroup ModSecurity_Operator */ NoMatch() : Operator("NoMatch") { } bool evaluate(Transaction *transaction, const std::string &str) override; }; } // namespace operators } // namespace modsecurity #endif // SRC_OPERATORS_NO_MATCH_H_ modsecurity-v3.0.6/src/operators/contains_word.h0000664000175000017500000000246314146026157023241 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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. * */ #ifndef SRC_OPERATORS_CONTAINS_WORD_H_ #define SRC_OPERATORS_CONTAINS_WORD_H_ #include #include #include #include "src/operators/operator.h" #include "modsecurity/rule_message.h" namespace modsecurity { namespace operators { class ContainsWord : public Operator { public: /** @ingroup ModSecurity_Operator */ explicit ContainsWord(std::unique_ptr param) : Operator("ContainsWord", std::move(param)) { } bool evaluate(Transaction *transaction, RuleWithActions *rule, const std::string &str, std::shared_ptr ruleMessage) override; private: static bool acceptableChar(const std::string& a, size_t pos); }; } // namespace operators } // namespace modsecurity #endif // SRC_OPERATORS_CONTAINS_WORD_H_ modsecurity-v3.0.6/src/operators/verify_ssn.cc0000664000175000017500000000710014146026157022706 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "src/operators/verify_ssn.h" #include #include #include #include "src/operators/operator.h" namespace modsecurity { namespace operators { int VerifySSN::convert_to_int(const char c) { int n; if ((c >= '0') && (c <= '9')) { n = c - '0'; } else if ((c >= 'A') && (c <= 'F')) { n = c - 'A' + 10; } else if ((c >= 'a') && (c <= 'f')) { n = c - 'a' + 10; } else { n = 0; } return n; } bool VerifySSN::verify(const char *ssnumber, int len) { int i; int num[9]; int digits = 0; int area, serial, grp; int sequencial = 0; int repetitions = 0; std::string str_area; std::string str_grp; std::string str_serial; for (i = 0; i < len; i++) { if (isdigit(ssnumber[i])) { if (digits < 9) num[digits] = convert_to_int(ssnumber[i]); digits++; } } /* Not a valid number */ if (digits != 9) goto invalid; for (i=0; i < 8; i++) { if (num[i] == (num[i+1]-1)) sequencial++; if (num[i] == num[i+1]) repetitions++; } /* We are blocking when all numbers were sequencial or repeated */ if (sequencial == 8) goto invalid; if (repetitions == 8) goto invalid; str_area.append(std::to_string(num[0]) + std::to_string(num[1]) + std::to_string(num[2])); str_grp.append(std::to_string(num[3]) + std::to_string(num[4])); str_serial.append(std::to_string(num[5]) + std::to_string(num[6]) + std::to_string(num[7]) + std::to_string(num[8])); if (str_area.size() == 0 || str_grp.size() == 0 || str_serial.size() == 0) { goto invalid; } area = atoi(str_area.c_str()); grp = atoi(str_grp.c_str()); serial = atoi(str_serial.c_str()); /* Cannot has seroed fields */ if (area == 0 || serial == 0 || grp == 0) goto invalid; /* More tests */ if (area >= 740 || area == 666) goto invalid; return true; invalid: return false; } bool VerifySSN::evaluate(Transaction *t, RuleWithActions *rule, const std::string& input, std::shared_ptr ruleMessage) { std::list matches; bool is_ssn = false; int i; if (m_param.empty()) { return false; } for (i = 0; i < input.size() - 1 && is_ssn == false; i++) { matches = m_re->searchAll(input.substr(i, input.size())); for (const auto & j : matches) { is_ssn = verify(j.str().c_str(), j.str().size()); if (is_ssn) { logOffset(ruleMessage, j.offset(), j.str().size()); if (rule && t && rule->hasCaptureAction()) { t->m_collections.m_tx_collection->storeOrUpdateFirst( "0", j.str()); ms_dbg_a(t, 7, "Added VerifySSN match TX.0: " + \ j.str()); } goto out; } } } out: return is_ssn; } } // namespace operators } // namespace modsecurity modsecurity-v3.0.6/src/operators/lt.h0000664000175000017500000000214514146026157021004 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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. * */ #ifndef SRC_OPERATORS_LT_H_ #define SRC_OPERATORS_LT_H_ #include #include #include #include "src/operators/operator.h" namespace modsecurity { namespace operators { class Lt : public Operator { public: /** @ingroup ModSecurity_Operator */ explicit Lt(std::unique_ptr param) : Operator("Lt", std::move(param)) { m_couldContainsMacro = true; } bool evaluate(Transaction *transaction, const std::string &input) override; }; } // namespace operators } // namespace modsecurity #endif // SRC_OPERATORS_LT_H_ modsecurity-v3.0.6/src/operators/validate_dtd.cc0000664000175000017500000000553214146026157023152 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "src/operators/validate_dtd.h" #include #include "src/request_body_processor/xml.h" #include "src/utils/system.h" #include "src/operators/operator.h" namespace modsecurity { namespace operators { #ifdef WITH_LIBXML2 bool ValidateDTD::init(const std::string &file, std::string *error) { std::string err; m_resource = utils::find_resource(m_param, file, &err); if (m_resource == "") { error->assign("XML: File not found: " + m_param + ". " + err); return false; } xmlThrDefSetGenericErrorFunc(NULL, null_error); xmlSetGenericErrorFunc(NULL, null_error); return true; } bool ValidateDTD::evaluate(Transaction *t, const std::string &str) { xmlValidCtxtPtr cvp; m_dtd = xmlParseDTD(NULL, (const xmlChar *)m_resource.c_str()); if (m_dtd == NULL) { std::string err = std::string("XML: Failed to load DTD: ") \ + m_resource; ms_dbg_a(t, 4, err); return true; } if (t->m_xml->m_data.doc == NULL) { ms_dbg_a(t, 4, "XML document tree could not "\ "be found for DTD validation."); return true; } if (t->m_xml->m_data.well_formed != 1) { ms_dbg_a(t, 4, "XML: DTD validation failed because " \ "content is not well formed."); return true; } #if 0 /* Make sure there were no other generic processing errors */ if (msr->msc_reqbody_error) { *error_msg = apr_psprintf(msr->mp, "XML: DTD validation could not proceed due to previous" " processing errors."); return 1; } #endif cvp = xmlNewValidCtxt(); if (cvp == NULL) { ms_dbg_a(t, 4, "XML: Failed to create a validation context."); return true; } /* Send validator errors/warnings to msr_log */ cvp->error = (xmlSchemaValidityErrorFunc)error_runtime; cvp->warning = (xmlSchemaValidityErrorFunc)warn_runtime; cvp->userData = t; if (!xmlValidateDtd(cvp, t->m_xml->m_data.doc, m_dtd)) { ms_dbg_a(t, 4, "XML: DTD validation failed."); xmlFreeValidCtxt(cvp); return true; } ms_dbg_a(t, 4, std::string("XML: Successfully validated " \ "payload against DTD: ") + m_resource); xmlFreeValidCtxt(cvp); return false; } #endif } // namespace operators } // namespace modsecurity modsecurity-v3.0.6/src/operators/rsub.h0000664000175000017500000000207714146026157021344 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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. * */ #ifndef SRC_OPERATORS_RSUB_H_ #define SRC_OPERATORS_RSUB_H_ #include #include #include #include "src/operators/operator.h" namespace modsecurity { namespace operators { class Rsub : public Operator { public: /** @ingroup ModSecurity_Operator */ explicit Rsub(std::unique_ptr param) : Operator("Rsub", std::move(param)) { } bool evaluate(Transaction *transaction, const std::string &str) override; }; } // namespace operators } // namespace modsecurity #endif // SRC_OPERATORS_RSUB_H_ modsecurity-v3.0.6/src/operators/ip_match_f.cc0000664000175000017500000000132214146026157022610 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "src/operators/ip_match_f.h" #include #include "src/operators/operator.h" namespace modsecurity { namespace operators { } // namespace operators } // namespace modsecurity modsecurity-v3.0.6/src/operators/rx_global.cc0000664000175000017500000000447114146026157022500 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "src/operators/rx_global.h" #include #include #include #include "src/operators/operator.h" #include "modsecurity/rule.h" #include "modsecurity/rule_message.h" namespace modsecurity { namespace operators { bool RxGlobal::init(const std::string &arg, std::string *error) { if (m_string->m_containsMacro == false) { m_re = new Regex(m_param); } return true; } bool RxGlobal::evaluate(Transaction *transaction, RuleWithActions *rule, const std::string& input, std::shared_ptr ruleMessage) { Regex *re; if (m_param.empty() && !m_string->m_containsMacro) { return true; } if (m_string->m_containsMacro) { std::string eparam(m_string->evaluate(transaction)); re = new Regex(eparam); } else { re = m_re; } std::vector captures; re->searchGlobal(input, captures); if (rule && rule->hasCaptureAction() && transaction) { for (const Utils::SMatchCapture& capture : captures) { const std::string capture_substring(input.substr(capture.m_offset,capture.m_length)); transaction->m_collections.m_tx_collection->storeOrUpdateFirst( std::to_string(capture.m_group), capture_substring); ms_dbg_a(transaction, 7, "Added regex subexpression TX." + std::to_string(capture.m_group) + ": " + capture_substring); transaction->m_matched.push_back(capture_substring); } } for (const auto & capture : captures) { logOffset(ruleMessage, capture.m_offset, capture.m_length); } if (m_string->m_containsMacro) { delete re; } if (captures.size() > 0) { return true; } return false; } } // namespace operators } // namespace modsecurity modsecurity-v3.0.6/src/operators/validate_byte_range.h0000664000175000017500000000310714146026157024354 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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. * */ #ifndef SRC_OPERATORS_VALIDATE_BYTE_RANGE_H_ #define SRC_OPERATORS_VALIDATE_BYTE_RANGE_H_ #include #include #include #include #include #include "src/operators/operator.h" namespace modsecurity { namespace operators { class ValidateByteRange : public Operator { public: /** @ingroup ModSecurity_Operator */ explicit ValidateByteRange(std::unique_ptr param) : Operator("ValidateByteRange", std::move(param)) { std::memset(table, '\0', sizeof(char) * 32); } ~ValidateByteRange() override { } bool evaluate(Transaction *transaction, RuleWithActions *rule, const std::string &input, std::shared_ptr ruleMessage) override; bool getRange(const std::string &rangeRepresentation, std::string *error); bool init(const std::string& file, std::string *error) override; private: std::vector ranges; char table[32]; }; } // namespace operators } // namespace modsecurity #endif // SRC_OPERATORS_VALIDATE_BYTE_RANGE_H_ modsecurity-v3.0.6/src/operators/gsblookup.cc0000664000175000017500000000172414146026157022532 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "src/operators/gsblookup.h" #include #include "src/operators/operator.h" namespace modsecurity { namespace operators { bool GsbLookup::evaluate(Transaction *transaction, const std::string &str) { /** * @todo Implement the operator GeoLookup. * Reference: https://github.com/SpiderLabs/ModSecurity/wiki/Reference-Manual#gsblookup */ return true; } } // namespace operators } // namespace modsecurity modsecurity-v3.0.6/src/operators/unconditional_match.cc0000664000175000017500000000142314146026157024543 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "src/operators/unconditional_match.h" namespace modsecurity { namespace operators { bool UnconditionalMatch::evaluate(Transaction *transaction, const std::string &input) { return true; } } // namespace operators } // namespace modsecurity modsecurity-v3.0.6/src/operators/no_match.cc0000664000175000017500000000141314146026157022310 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "src/operators/no_match.h" #include namespace modsecurity { namespace operators { bool NoMatch::evaluate(Transaction *transaction, const std::string &str) { return false; } } // namespace operators } // namespace modsecurity modsecurity-v3.0.6/src/operators/geo_lookup.h0000664000175000017500000000221614146026157022527 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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. * */ #ifndef SRC_OPERATORS_GEO_LOOKUP_H_ #define SRC_OPERATORS_GEO_LOOKUP_H_ #include #include "src/operators/operator.h" namespace modsecurity { namespace operators { class GeoLookup : public Operator { public: /** @ingroup ModSecurity_Operator */ GeoLookup() : Operator("GeoLookup") { } bool evaluate(Transaction *transaction, const std::string &exp) override; protected: bool debug(Transaction *transaction, int x, const std::string &a) { ms_dbg_a(transaction, x, a); return true; } }; } // namespace operators } // namespace modsecurity #endif // SRC_OPERATORS_GEO_LOOKUP_H_ modsecurity-v3.0.6/src/operators/ends_with.cc0000664000175000017500000000230214146026157022502 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "src/operators/ends_with.h" #include #include "src/operators/operator.h" namespace modsecurity { namespace operators { bool EndsWith::evaluate(Transaction *transaction, RuleWithActions *rule, const std::string &str, std::shared_ptr ruleMessage) { bool ret = false; std::string p(m_string->evaluate(transaction)); if (str.length() >= p.length()) { ret = (0 == str.compare(str.length() - p.length(), p.length(), p)); if (ret) { logOffset(ruleMessage, str.length() - p.length(), p.size()); } } return ret; } } // namespace operators } // namespace modsecurity modsecurity-v3.0.6/src/operators/str_match.h0000664000175000017500000000221314146026157022345 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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. * */ #ifndef SRC_OPERATORS_STR_MATCH_H_ #define SRC_OPERATORS_STR_MATCH_H_ #include #include #include #include "src/operators/operator.h" namespace modsecurity { namespace operators { class StrMatch : public Operator { public: /** @ingroup ModSecurity_Operator */ explicit StrMatch(std::unique_ptr param) : Operator("StrMatch", std::move(param)) { m_couldContainsMacro = true; } bool evaluate(Transaction *transaction, const std::string &input) override; }; } // namespace operators } // namespace modsecurity #endif // SRC_OPERATORS_STR_MATCH_H_ modsecurity-v3.0.6/src/operators/verify_svnr.cc0000664000175000017500000000511214146026157023074 0ustar mhsvierulamhsvierula #include "src/operators/verify_svnr.h" #include #include "src/operators/operator.h" #include "modsecurity/rule.h" #include "modsecurity/rule_message.h" #include "modsecurity/rules_set_properties.h" namespace modsecurity { namespace operators { int VerifySVNR::convert_to_int(const char c) { int n; if ((c>='0') && (c<='9')) n = c - '0'; else n = 0; return n; } bool VerifySVNR::verify(const char *svnrnumber, int len) { int var_len = len; int sum = 0; unsigned int i = 0, svnr_len = 10; int svnr[11]; char s_svnr[11]; while ((*svnrnumber != '\0') && ( var_len > 0)) { // Always true on the original code. //if (*svnrnumber != '-' || *svnrnumber != '.') { if (i < svnr_len && isdigit(*svnrnumber)) { s_svnr[i] = *svnrnumber; svnr[i] = convert_to_int(*svnrnumber); i++; } } svnrnumber++; var_len--; } if (i != svnr_len) { return 0; } else { for (i = 0; i< svnr_len; i++) { if (strncmp(s_svnr,bad_svnr[i],svnr_len) == 0) { return 0; } } } //Laufnummer mit 3, 7, 9 //Geburtsdatum mit 5, 8, 4, 2, 1, 6 sum = svnr[0] * 3 + svnr[1] * 7 + svnr[2] * 9 + svnr[4] * 5 + svnr[5] * 8 + svnr[6] * 4 + svnr[7] * 2 + svnr[8] * 1 + svnr[9] * 6; sum %= 11; if(sum == 10){ sum = 0; } if (sum == svnr[3]) { return true; } return false; } bool VerifySVNR::evaluate(Transaction *t, RuleWithActions *rule, const std::string& input, std::shared_ptr ruleMessage) { std::list matches; bool is_svnr = false; int i; if (m_param.empty()) { return is_svnr; } for (i = 0; i < input.size() - 1 && is_svnr == false; i++) { matches = m_re->searchAll(input.substr(i, input.size())); for (const auto & j : matches) { is_svnr = verify(j.str().c_str(), j.str().size()); if (is_svnr) { logOffset(ruleMessage, j.offset(), j.str().size()); if (rule && t && rule->hasCaptureAction()) { t->m_collections.m_tx_collection->storeOrUpdateFirst( "0", j.str()); ms_dbg_a(t, 7, "Added VerifySVNR match TX.0: " + \ j.str()); } goto out; } } } out: return is_svnr; } } // namespace operators } // namespace modsecurity modsecurity-v3.0.6/src/operators/rbl.h0000664000175000017500000000547314146026157021153 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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. * */ #ifndef SRC_OPERATORS_RBL_H_ #define SRC_OPERATORS_RBL_H_ #include #include #include #include #include #include #include #include #include "src/operators/operator.h" namespace modsecurity { namespace operators { class Rbl : public Operator { public: /** * */ enum RblProvider { /** * UnknownProvider * */ UnknownProvider, /** * httpbl.org * */ httpbl, /** * uribl.com * */ uribl, /** * spamhaus.org * */ spamhaus, }; /** @ingroup ModSecurity_Operator */ explicit Rbl(std::unique_ptr param) : m_service(), m_demandsPassword(false), m_provider(RblProvider::UnknownProvider), Operator("Rbl", std::move(param)) { m_service = m_string->evaluate(); if (m_service.find("httpbl.org") != std::string::npos) { m_demandsPassword = true; m_provider = RblProvider::httpbl; } else if (m_service.find("uribl.com") != std::string::npos) { m_provider = RblProvider::httpbl; } else if (m_service.find("spamhaus.org") != std::string::npos) { m_provider = RblProvider::httpbl; } } bool evaluate(Transaction *transaction, RuleWithActions *rule, const std::string& input, std::shared_ptr ruleMessage) override; std::string mapIpToAddress(const std::string &ipStr, Transaction *trans) const; static void futherInfo_httpbl(struct sockaddr_in *sin, const std::string &ipStr, Transaction *trans); static void futherInfo_spamhaus(unsigned int high8bits, const std::string &ipStr, Transaction *trans); static void futherInfo_uribl(unsigned int high8bits, const std::string &ipStr, Transaction *trans); static void furtherInfo(struct sockaddr_in *sin, const std::string &ipStr, Transaction *trans, RblProvider provider); private: std::string m_service; bool m_demandsPassword; RblProvider m_provider; }; } // namespace operators } // namespace modsecurity #endif // SRC_OPERATORS_RBL_H_ modsecurity-v3.0.6/src/operators/eq.h0000664000175000017500000000206214146026157020770 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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. * */ #ifndef SRC_OPERATORS_EQ_H_ #define SRC_OPERATORS_EQ_H_ #include #include #include #include "src/operators/operator.h" namespace modsecurity { namespace operators { class Eq : public Operator { public: /** @ingroup ModSecurity_Operator */ explicit Eq(std::unique_ptr param) : Operator("Eq", std::move(param)) { } bool evaluate(Transaction *transaction, const std::string &input) override; }; } // namespace operators } // namespace modsecurity #endif // SRC_OPERATORS_EQ_H_ modsecurity-v3.0.6/src/operators/detect_sqli.h0000664000175000017500000000225114146026157022663 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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. * */ #ifndef SRC_OPERATORS_DETECT_SQLI_H_ #define SRC_OPERATORS_DETECT_SQLI_H_ #include #include #include "src/operators/operator.h" namespace modsecurity { namespace operators { class DetectSQLi : public Operator { public: /** @ingroup ModSecurity_Operator */ DetectSQLi() : Operator("DetectSQLi") { m_match_message.assign("detected SQLi using libinjection."); } bool evaluate(Transaction *t, RuleWithActions *rule, const std::string& input, std::shared_ptr ruleMessage) override; }; } // namespace operators } // namespace modsecurity #endif // SRC_OPERATORS_DETECT_SQLI_H_ modsecurity-v3.0.6/src/operators/ip_match_f.h0000664000175000017500000000175714146026157022466 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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. * */ #ifndef SRC_OPERATORS_IP_MATCH_F_H_ #define SRC_OPERATORS_IP_MATCH_F_H_ #include #include #include #include "src/operators/ip_match_from_file.h" namespace modsecurity { namespace operators { class IpMatchF : public IpMatchFromFile { public: explicit IpMatchF(std::unique_ptr param) : IpMatchFromFile(std::move(param)) { } }; } // namespace operators } // namespace modsecurity #endif // SRC_OPERATORS_IP_MATCH_F_H_ modsecurity-v3.0.6/src/operators/detect_xss.h0000664000175000017500000000222214146026157022526 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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. * */ #ifndef SRC_OPERATORS_DETECT_XSS_H_ #define SRC_OPERATORS_DETECT_XSS_H_ #include #include "src/operators/operator.h" namespace modsecurity { namespace operators { class DetectXSS : public Operator { public: /** @ingroup ModSecurity_Operator */ DetectXSS() : Operator("DetectXSS") { m_match_message.assign("detected XSS using libinjection."); } bool evaluate(Transaction *t, RuleWithActions *rule, const std::string& input, std::shared_ptr ruleMessage) override; }; } // namespace operators } // namespace modsecurity #endif // SRC_OPERATORS_DETECT_XSS_H_ modsecurity-v3.0.6/src/operators/eq.cc0000664000175000017500000000203614146026157021127 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "src/operators/eq.h" #include #include "src/operators/operator.h" namespace modsecurity { namespace operators { bool Eq::evaluate(Transaction *transaction, const std::string &input) { int p = 0; int i = 0; std::string pt(m_string->evaluate(transaction)); try { p = std::stoi(pt); } catch (...) { p = 0; } try { i = std::stoi(input); } catch (...) { i = 0; } return p == i; } } // namespace operators } // namespace modsecurity modsecurity-v3.0.6/src/operators/operator.h0000664000175000017500000001076514146026157022227 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include #include #ifndef SRC_OPERATORS_OPERATOR_H__ #define SRC_OPERATORS_OPERATOR_H__ #include "modsecurity/transaction.h" #include "modsecurity/rule.h" #include "modsecurity/rule_message.h" #include "src/run_time_string.h" namespace modsecurity { namespace operators { class Operator { public: /** @ingroup ModSecurity_Operator */ Operator() : m_match_message(""), m_negation(false), m_op(""), m_param(""), m_couldContainsMacro(false) { if (m_couldContainsMacro == false && m_string) { m_param = m_string->evaluate(); } } Operator(const std::string &opName, const std::string ¶m, bool negation) : m_match_message(""), m_negation(negation), m_op(opName), m_param(param), m_couldContainsMacro(false) { if (m_couldContainsMacro == false && m_string) { m_param = m_string->evaluate(); } } Operator(const std::string &opName, std::unique_ptr param, bool negation) : m_match_message(""), m_negation(negation), m_op(opName), m_param(""), m_string(std::move(param)), m_couldContainsMacro(false) { if (m_couldContainsMacro == false && m_string) { m_param = m_string->evaluate(); } } Operator(const std::string &opName, const std::string ¶m) : m_match_message(""), m_negation(false), m_op(opName), m_param(param), m_couldContainsMacro(false) { if (m_couldContainsMacro == false && m_string) { m_param = m_string->evaluate(); } } Operator(const std::string &opName, std::unique_ptr param) : m_match_message(""), m_negation(false), m_op(opName), m_param(""), m_string(std::move(param)), m_couldContainsMacro(false) { if (m_couldContainsMacro == false && m_string) { m_param = m_string->evaluate(); } } explicit Operator(const std::string &opName) : m_match_message(""), m_negation(false), m_op(opName), m_param(), m_couldContainsMacro(false) { if (m_couldContainsMacro == false && m_string) { m_param = m_string->evaluate(); } } virtual ~Operator() { } static Operator *instantiate(std::string opName, std::string param); virtual bool init(const std::string &arg, std::string *error) { return true; } virtual std::string resolveMatchMessage(Transaction *t, std::string key, std::string value); bool evaluateInternal(Transaction *t, const std::string& a); bool evaluateInternal(Transaction *t, RuleWithActions *rule, const std::string& a); bool evaluateInternal(Transaction *t, RuleWithActions *rule, const std::string& a, std::shared_ptr ruleMessage); virtual bool evaluate(Transaction *transaction, const std::string &str); virtual bool evaluate(Transaction *transaction, RuleWithActions *rule, const std::string &str) { return evaluate(transaction, str); } virtual bool evaluate(Transaction *transaction, RuleWithActions *rule, const std::string &str, std::shared_ptr ruleMessage) { return evaluate(transaction, str); } static void logOffset(std::shared_ptr ruleMessage, int offset, int len) { if (ruleMessage) { ruleMessage->m_reference.append("o" + std::to_string(offset) + "," + std::to_string(len)); } } std::string m_match_message; bool m_negation; std::string m_op; std::string m_param; std::unique_ptr m_string; bool m_couldContainsMacro; }; } // namespace operators } // namespace modsecurity #endif // SRC_OPERATORS_OPERATOR_H__ modsecurity-v3.0.6/src/operators/validate_dtd.h0000664000175000017500000000466314146026157023020 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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. * */ #ifndef SRC_OPERATORS_VALIDATE_DTD_H_ #define SRC_OPERATORS_VALIDATE_DTD_H_ #include #include #include #ifdef WITH_LIBXML2 #include #include #endif #include #include #include #include "src/operators/operator.h" namespace modsecurity { namespace operators { class ValidateDTD : public Operator { public: /** @ingroup ModSecurity_Operator */ explicit ValidateDTD(std::unique_ptr param) : Operator("ValidateDTD", std::move(param)) { } #ifdef WITH_LIBXML2 ~ValidateDTD() { if (m_dtd != NULL) { xmlFreeDtd(m_dtd); m_dtd = NULL; } } bool evaluate(Transaction *transaction, const std::string &str) override; bool init(const std::string &file, std::string *error) override; static void error_runtime(void *ctx, const char *msg, ...) { Transaction *t = reinterpret_cast(ctx); char buf[1024]; std::string s; va_list args; va_start(args, msg); int len = vsnprintf(buf, sizeof(buf), msg, args); va_end(args); if (len > 0) { s = "XML Error: " + std::string(buf); } ms_dbg_a(t, 4, s); } static void warn_runtime(void *ctx, const char *msg, ...) { Transaction *t = reinterpret_cast(ctx); char buf[1024]; std::string s; va_list args; va_start(args, msg); int len = vsnprintf(buf, sizeof(buf), msg, args); va_end(args); if (len > 0) { s = "XML Warning: " + std::string(buf); } ms_dbg_a(t, 4, s); } static void null_error(void *ctx, const char *msg, ...) { } private: std::string m_resource; xmlDtdPtr m_dtd = NULL; #endif }; } // namespace operators } // namespace modsecurity #endif // SRC_OPERATORS_VALIDATE_DTD_H_ modsecurity-v3.0.6/src/operators/validate_url_encoding.cc0000664000175000017500000000707514146026157025053 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "src/operators/validate_url_encoding.h" #include #include "src/operators/operator.h" namespace modsecurity { namespace operators { int ValidateUrlEncoding::validate_url_encoding(const char *input, uint64_t input_length, size_t *offset) { int i; *offset = 0; if ((input == NULL) || (input_length == 0)) { return -1; } i = 0; while (i < input_length) { if (input[i] == '%') { if (i + 2 >= input_length) { *offset = i; /* Not enough bytes. */ return -3; } else { /* Here we only decode a %xx combination if it is valid, * leaving it as is otherwise. */ char c1 = input[i + 1]; char c2 = input[i + 2]; if ( (((c1 >= '0') && (c1 <= '9')) || ((c1 >= 'a') && (c1 <= 'f')) || ((c1 >= 'A') && (c1 <= 'F'))) && (((c2 >= '0') && (c2 <= '9')) || ((c2 >= 'a') && (c2 <= 'f')) || ((c2 >= 'A') && (c2 <= 'F'))) ) { i += 3; } else { /* Non-hexadecimal characters used in encoding. */ *offset = i; return -2; } } } else { i++; } } return 1; } bool ValidateUrlEncoding::evaluate(Transaction *transaction, RuleWithActions *rule, const std::string &input, std::shared_ptr ruleMessage) { size_t offset = 0; bool res = false; if (input.empty() == true) { return res; } int rc = validate_url_encoding(input.c_str(), input.size(), &offset); switch (rc) { case 1 : /* Encoding is valid */ if (transaction) { ms_dbg_a(transaction, 7, "Valid URL Encoding at '" +input + "'"); } res = false; break; case -2 : if (transaction) { ms_dbg_a(transaction, 7, "Invalid URL Encoding: Non-hexadecimal " "digits used at '" + input + "'"); logOffset(ruleMessage, offset, input.size()); } res = true; /* Invalid match. */ break; case -3 : if (transaction) { ms_dbg_a(transaction, 7, "Invalid URL Encoding: Not enough " \ "characters at the end of input at '" + input + "'"); logOffset(ruleMessage, offset, input.size()); } res = true; /* Invalid match. */ break; case -1 : default : if (transaction) { ms_dbg_a(transaction, 7, "Invalid URL Encoding: Internal " \ "Error (rc = " + std::to_string(rc) + ") at '" + input + "'"); logOffset(ruleMessage, offset, input.size()); } res = true; break; } return res; } } // namespace operators } // namespace modsecurity modsecurity-v3.0.6/src/operators/pm_f.cc0000664000175000017500000000132014146026157021436 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "src/operators/pm_f.h" #include #include "src/operators/pm_from_file.h" namespace modsecurity { namespace operators { } // namespace operators } // namespace modsecurity modsecurity-v3.0.6/src/operators/contains_word.cc0000664000175000017500000000411714146026157023375 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "src/operators/contains_word.h" #include #include "src/operators/operator.h" #include "modsecurity/rule_message.h" namespace modsecurity { namespace operators { bool ContainsWord::acceptableChar(const std::string& a, size_t pos) { if (a.size() - 1 < pos) { return false; } if ((a.at(pos) >= 65 && a.at(pos) <= 90) || (a.at(pos) >= 97 && a.at(pos) <= 122)) { return false; } return true; } bool ContainsWord::evaluate(Transaction *transaction, RuleWithActions *rule, const std::string &str, std::shared_ptr ruleMessage) { std::string paramTarget(m_string->evaluate(transaction)); if (paramTarget.empty()) { return true; } if (str.empty()) { return false; } if (str == paramTarget) { return true; } size_t pos = str.find(paramTarget); while (pos != std::string::npos) { if (pos == 0 && acceptableChar(str, paramTarget.size())) { logOffset(ruleMessage, 0, paramTarget.size()); return true; } if (pos + paramTarget.size() == str.size() && acceptableChar(str, pos - 1)) { logOffset(ruleMessage, pos, paramTarget.size()); return true; } if (acceptableChar(str, pos - 1) && acceptableChar(str, pos + paramTarget.size())) { logOffset(ruleMessage, pos, paramTarget.size()); return true; } pos = str.find(paramTarget, pos + 1); } return false; } } // namespace operators } // namespace modsecurity modsecurity-v3.0.6/src/operators/validate_utf8_encoding.h0000664000175000017500000000276114146026157024776 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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. * */ #ifndef SRC_OPERATORS_VALIDATE_UTF8_ENCODING_H_ #define SRC_OPERATORS_VALIDATE_UTF8_ENCODING_H_ #include #include #include "src/operators/operator.h" #define UNICODE_ERROR_CHARACTERS_MISSING -1 #define UNICODE_ERROR_INVALID_ENCODING -2 #define UNICODE_ERROR_OVERLONG_CHARACTER -3 #define UNICODE_ERROR_RESTRICTED_CHARACTER -4 #define UNICODE_ERROR_DECODING_ERROR -5 namespace modsecurity { namespace operators { class ValidateUtf8Encoding : public Operator { public: /** @ingroup ModSecurity_Operator */ ValidateUtf8Encoding() : Operator("ValidateUtf8Encoding") { } bool evaluate(Transaction *transaction, RuleWithActions *rule, const std::string &str, std::shared_ptr ruleMessage) override; static int detect_utf8_character(const unsigned char *p_read, unsigned int length); }; } // namespace operators } // namespace modsecurity #endif // SRC_OPERATORS_VALIDATE_UTF8_ENCODING_H_ modsecurity-v3.0.6/src/operators/str_eq.cc0000664000175000017500000000150714146026157022021 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "src/operators/str_eq.h" #include namespace modsecurity { namespace operators { bool StrEq::evaluate(Transaction *transaction, const std::string &str) { std::string pt(m_string->evaluate(transaction)); return !pt.compare(str); } } // namespace operators } // namespace modsecurity modsecurity-v3.0.6/src/operators/gt.cc0000664000175000017500000000162214146026157021134 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "src/operators/gt.h" #include #include "src/operators/operator.h" namespace modsecurity { namespace operators { bool Gt::evaluate(Transaction *transaction, const std::string &input) { std::string p(m_string->evaluate(transaction)); bool gt = atoll(input.c_str()) > atoll(p.c_str()); return gt; } } // namespace operators } // namespace modsecurity modsecurity-v3.0.6/src/operators/str_eq.h0000664000175000017500000000215414146026157021662 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include #include #include "modsecurity/transaction.h" #include "src/operators/operator.h" #ifndef SRC_OPERATORS_STR_EQ_H_ #define SRC_OPERATORS_STR_EQ_H_ namespace modsecurity { namespace operators { class StrEq : public Operator { public: /** @ingroup ModSecurity_Operator */ explicit StrEq(std::unique_ptr param) : Operator("StrEq", std::move(param)) { } bool evaluate(Transaction *transaction, const std::string &str) override; }; } // namespace operators } // namespace modsecurity #endif // SRC_OPERATORS_STR_EQ_H_ modsecurity-v3.0.6/src/operators/ge.cc0000664000175000017500000000165214146026157021120 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "src/operators/ge.h" #include #include "src/operators/operator.h" namespace modsecurity { namespace operators { bool Ge::evaluate(Transaction *transaction, const std::string &input) { std::string p(m_string->evaluate(transaction)); std::string i = input; bool ge = atoll(i.c_str()) >= atoll(p.c_str()); return ge; } } // namespace operators } // namespace modsecurity modsecurity-v3.0.6/src/operators/verify_cpf.h0000664000175000017500000000353214146026157022522 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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. * */ #ifndef SRC_OPERATORS_VERIFY_CPF_H_ #define SRC_OPERATORS_VERIFY_CPF_H_ #include #include #include #include "src/operators/operator.h" #include "src/utils/regex.h" namespace modsecurity { using Utils::SMatch; using Utils::regex_search; using Utils::Regex; namespace operators { class VerifyCPF : public Operator { public: /** @ingroup ModSecurity_Operator */ explicit VerifyCPF(std::unique_ptr param) : Operator("VerifyCPF", std::move(param)) { m_re = new Regex(m_param); } ~VerifyCPF() { delete m_re; } bool operator=(const VerifyCPF &a) = delete; VerifyCPF(const VerifyCPF &a) = delete; bool evaluate(Transaction *transaction, RuleWithActions *rule, const std::string& input, std::shared_ptr ruleMessage) override; bool verify(const char *ssnumber, int len); private: static int convert_to_int(const char c); Regex *m_re; const char bad_cpf[12][12] = { "00000000000", "01234567890", "11111111111", "22222222222", "33333333333", "44444444444", "55555555555", "66666666666", "77777777777", "88888888888", "99999999999"}; }; } // namespace operators } // namespace modsecurity #endif // SRC_OPERATORS_VERIFY_CPF_H_ modsecurity-v3.0.6/src/operators/pm_from_file.h0000664000175000017500000000240314146026157023020 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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. * */ #ifndef SRC_OPERATORS_PM_FROM_FILE_H_ #define SRC_OPERATORS_PM_FROM_FILE_H_ #include #include #include #include "src/operators/pm.h" namespace modsecurity { namespace operators { class PmFromFile : public Pm { public: /** @ingroup ModSecurity_Operator */ explicit PmFromFile(std::unique_ptr param) : Pm("PmFromFile", std::move(param)) { } explicit PmFromFile(const std::string &n, std::unique_ptr param) : Pm(n, std::move(param)) { } bool init(const std::string &file, std::string *error) override; private: static bool isComment(const std::string &s); }; } // namespace operators } // namespace modsecurity #endif // SRC_OPERATORS_PM_FROM_FILE_H_ modsecurity-v3.0.6/src/operators/validate_schema.h0000664000175000017500000000722214146026157023477 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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. * */ #ifndef SRC_OPERATORS_VALIDATE_SCHEMA_H_ #define SRC_OPERATORS_VALIDATE_SCHEMA_H_ #include #include #include #ifdef WITH_LIBXML2 #include #include #endif #include #include #include #include "src/operators/operator.h" namespace modsecurity { namespace operators { class ValidateSchema : public Operator { public: /** @ingroup ModSecurity_Operator */ #ifndef WITH_LIBXML2 explicit ValidateSchema(std::unique_ptr param) : Operator("ValidateSchema", std::move(param)) { } #else explicit ValidateSchema(std::unique_ptr param) : Operator("ValidateSchema", std::move(param)), m_parserCtx(NULL), m_validCtx(NULL), m_schema(NULL) { } ~ValidateSchema() { /* if (m_schema != NULL) { xmlSchemaFree(m_schema); m_schema = NULL; } */ if (m_validCtx != NULL) { xmlSchemaFreeValidCtxt(m_validCtx); m_validCtx = NULL; } } bool evaluate(Transaction *transaction, const std::string &str) override; bool init(const std::string &file, std::string *error) override; static void error_load(void *ctx, const char *msg, ...) { std::string *t = reinterpret_cast(ctx); char buf[1024]; va_list args; va_start(args, msg); int len = vsnprintf(buf, sizeof(buf), msg, args); va_end(args); if (len > 0) { t->append("XML Error: " + std::string(buf)); } } static void warn_load(void *ctx, const char *msg, ...) { std::string *t = reinterpret_cast(ctx); char buf[1024]; va_list args; va_start(args, msg); int len = vsnprintf(buf, sizeof(buf), msg, args); va_end(args); if (len > 0) { t->append("XML Warning: " + std::string(buf)); } } static void error_runtime(void *ctx, const char *msg, ...) { Transaction *t = reinterpret_cast(ctx); char buf[1024]; std::string s; va_list args; va_start(args, msg); int len = vsnprintf(buf, sizeof(buf), msg, args); va_end(args); if (len > 0) { s = "XML Error: " + std::string(buf); } ms_dbg_a(t, 4, s); } static void warn_runtime(void *ctx, const char *msg, ...) { Transaction *t = reinterpret_cast(ctx); char buf[1024]; std::string s; va_list args; va_start(args, msg); int len = vsnprintf(buf, sizeof(buf), msg, args); va_end(args); if (len > 0) { s = "XML Warning: " + std::string(buf); } ms_dbg_a(t, 4, s); } static void null_error(void *ctx, const char *msg, ...) { } private: xmlSchemaParserCtxtPtr m_parserCtx; xmlSchemaValidCtxtPtr m_validCtx; xmlSchemaPtr m_schema; std::string m_resource; std::string m_err; #endif }; } // namespace operators } // namespace modsecurity #endif // SRC_OPERATORS_VALIDATE_SCHEMA_H_ modsecurity-v3.0.6/src/operators/gt.h0000664000175000017500000000214314146026157020775 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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. * */ #ifndef SRC_OPERATORS_GT_H_ #define SRC_OPERATORS_GT_H_ #include #include #include #include "src/operators/operator.h" namespace modsecurity { namespace operators { class Gt : public Operator { public: /** @ingroup ModSecurity_Operator */ explicit Gt(std::unique_ptr param) : Operator("Gt", std::move(param)) { m_couldContainsMacro = true; } bool evaluate(Transaction *transaction, const std::string &input) override; }; } // namespace operators } // namespace modsecurity #endif // SRC_OPERATORS_GT_H_ modsecurity-v3.0.6/src/operators/pm.h0000664000175000017500000000317214146026157021002 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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. * */ #ifndef SRC_OPERATORS_PM_H_ #define SRC_OPERATORS_PM_H_ #include #include #include #include #include "src/operators/operator.h" #include "src/utils/acmp.h" namespace modsecurity { namespace operators { class Pm : public Operator { public: /** @ingroup ModSecurity_Operator */ explicit Pm(std::unique_ptr param) : Operator("Pm", std::move(param)) { m_p = acmp_create(0); } explicit Pm(const std::string &n, std::unique_ptr param) : Operator(n, std::move(param)) { m_p = acmp_create(0); } ~Pm(); bool evaluate(Transaction *transaction, RuleWithActions *rule, const std::string &str, std::shared_ptr ruleMessage) override; bool init(const std::string &file, std::string *error) override; void postOrderTraversal(acmp_btree_node_t *node); void cleanup(acmp_node_t *n); protected: ACMP *m_p; #ifdef MODSEC_MUTEX_ON_PM private: pthread_mutex_t m_lock; #endif }; } // namespace operators } // namespace modsecurity #endif // SRC_OPERATORS_PM_H_ modsecurity-v3.0.6/src/operators/lt.cc0000664000175000017500000000162114146026157021140 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "src/operators/lt.h" #include #include "src/operators/operator.h" namespace modsecurity { namespace operators { bool Lt::evaluate(Transaction *transaction, const std::string &input) { std::string p(m_string->evaluate(transaction)); bool lt = atoll(input.c_str()) < atoll(p.c_str()); return lt; } } // namespace operators } // namespace modsecurity modsecurity-v3.0.6/src/operators/inspect_file.h0000664000175000017500000000251114146026157023026 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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. * */ #ifndef SRC_OPERATORS_INSPECT_FILE_H_ #define SRC_OPERATORS_INSPECT_FILE_H_ #include #include #include #include "src/operators/operator.h" #include "src/engine/lua.h" namespace modsecurity { namespace operators { class InspectFile : public Operator { public: /** @ingroup ModSecurity_Operator */ explicit InspectFile(std::unique_ptr param) : Operator("InspectFile", std::move(param)), m_file(""), m_isScript(false) { } bool init(const std::string ¶m, std::string *error) override; bool evaluate(Transaction *transaction, const std::string &str) override; private: std::string m_file; bool m_isScript; engine::Lua m_lua; }; } // namespace operators } // namespace modsecurity #endif // SRC_OPERATORS_INSPECT_FILE_H_ modsecurity-v3.0.6/src/operators/ip_match.cc0000664000175000017500000000212114146026157022301 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "src/operators/ip_match.h" #include #include #include "src/utils/msc_tree.h" #include "src/operators/operator.h" namespace modsecurity { namespace operators { bool IpMatch::init(const std::string &file, std::string *error) { std::string e(""); bool res = m_tree.addFromBuffer(m_param, &e); if (res == false) { error->assign(e); } return res; } bool IpMatch::evaluate(Transaction *transaction, const std::string &input) { return m_tree.contains(input); } } // namespace operators } // namespace modsecurity modsecurity-v3.0.6/src/operators/detect_xss.cc0000664000175000017500000000301714146026157022667 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "src/operators/detect_xss.h" #include #include "src/operators/operator.h" #include "others/libinjection/src/libinjection.h" namespace modsecurity { namespace operators { bool DetectXSS::evaluate(Transaction *t, RuleWithActions *rule, const std::string& input, std::shared_ptr ruleMessage) { int is_xss; is_xss = libinjection_xss(input.c_str(), input.length()); if (t) { if (is_xss) { ms_dbg_a(t, 5, "detected XSS using libinjection."); if (rule && rule->hasCaptureAction()) { t->m_collections.m_tx_collection->storeOrUpdateFirst( "0", std::string(input)); ms_dbg_a(t, 7, "Added DetectXSS match TX.0: " + \ std::string(input)); } } else { ms_dbg_a(t, 9, "libinjection was not able to " \ "find any XSS in: " + input); } } return is_xss != 0; } } // namespace operators } // namespace modsecurity modsecurity-v3.0.6/src/operators/validate_byte_range.cc0000664000175000017500000000747414146026157024525 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "src/operators/validate_byte_range.h" #include #include #include "src/operators/operator.h" namespace modsecurity { namespace operators { bool ValidateByteRange::getRange(const std::string &rangeRepresentation, std::string *error) { size_t pos = rangeRepresentation.find_first_of("-"); int start; int end; if (pos == std::string::npos) { try { start = std::stoi(rangeRepresentation); } catch(...) { error->assign("Not able to convert '" + rangeRepresentation + "' into a number"); return false; } table[start >> 3] = (table[start >> 3] | (1 << (start & 0x7))); return true; } try { start = std::stoi(std::string(rangeRepresentation, 0, pos)); } catch (...) { error->assign("Not able to convert '" + std::string(rangeRepresentation, 0, pos) + "' into a number"); return false; } try { end = std::stoi(std::string(rangeRepresentation, pos + 1, rangeRepresentation.length() - (pos + 1))); } catch (...) { error->assign("Not able to convert '" + std::string(rangeRepresentation, pos + 1, rangeRepresentation.length() - (pos + 1)) + "' into a number"); return false; } if ((start < 0) || (start > 255)) { error->assign("Invalid range start value: " + std::to_string(start)); return false; } if ((end < 0) || (end > 255)) { error->assign("Invalid range end value: " + std::to_string(end)); return false; } if (start > end) { error->assign("Invalid range: " + std::to_string(start) + "-" + std::to_string(end)); return false; } while (start <= end) { table[start >> 3] = (table[start >> 3] | (1 << (start & 0x7))); start++; } return true; } bool ValidateByteRange::init(const std::string &file, std::string *error) { size_t pos = m_param.find_first_of(","); if (pos == std::string::npos) { getRange(m_param, error); } else { getRange(std::string(m_param, 0, pos), error); } while (pos != std::string::npos) { size_t next_pos = m_param.find_first_of(",", pos + 1); if (next_pos == std::string::npos) { getRange(std::string(m_param, pos + 1, m_param.length() - (pos + 1)), error); } else { getRange(std::string(m_param, pos + 1, next_pos - (pos + 1)), error); } pos = next_pos; } return true; } bool ValidateByteRange::evaluate(Transaction *transaction, RuleWithActions *rule, const std::string &input, std::shared_ptr ruleMessage) { bool ret = true; size_t count = 0; for (int i = 0; i < input.length(); i++) { int x = (unsigned char) input.at(i); if (!(table[x >> 3] & (1 << (x & 0x7)))) { // debug(9, "Value " + std::to_string(x) + " in " + // input + " ouside range: " + param); logOffset(ruleMessage, i, 1); count++; } } ret = (count != 0); // debug(9, "Found %d byte(s) in %s outside range: %s.", // count, var->name, rule->op_param); return ret; } } // namespace operators } // namespace modsecurity modsecurity-v3.0.6/src/operators/validate_url_encoding.h0000664000175000017500000000240714146026157024707 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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. * */ #ifndef SRC_OPERATORS_VALIDATE_URL_ENCODING_H_ #define SRC_OPERATORS_VALIDATE_URL_ENCODING_H_ #include #include #include "src/operators/operator.h" namespace modsecurity { namespace operators { class ValidateUrlEncoding : public Operator { public: /** @ingroup ModSecurity_Operator */ ValidateUrlEncoding() : Operator("ValidateUrlEncoding") { } bool evaluate(Transaction *transaction, RuleWithActions *rule, const std::string &input, std::shared_ptr ruleMessage) override; static int validate_url_encoding(const char *input, uint64_t input_length, size_t *offset); }; } // namespace operators } // namespace modsecurity #endif // SRC_OPERATORS_VALIDATE_URL_ENCODING_H_ modsecurity-v3.0.6/src/operators/operator.cc0000664000175000017500000001570014146026157022357 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "src/operators/operator.h" #include #include #include #include "modsecurity/transaction.h" #include "src/run_time_string.h" #include "src/utils/string.h" #include "src/operators/begins_with.h" #include "src/operators/contains.h" #include "src/operators/contains_word.h" #include "src/operators/detect_sqli.h" #include "src/operators/detect_xss.h" #include "src/operators/ends_with.h" #include "src/operators/eq.h" #include "src/operators/fuzzy_hash.h" #include "src/operators/ge.h" #include "src/operators/geo_lookup.h" #include "src/operators/gsblookup.h" #include "src/operators/gt.h" #include "src/operators/inspect_file.h" #include "src/operators/ip_match_f.h" #include "src/operators/ip_match_from_file.h" #include "src/operators/ip_match.h" #include "src/operators/le.h" #include "src/operators/lt.h" #include "src/operators/no_match.h" #include "src/operators/pm_f.h" #include "src/operators/pm_from_file.h" #include "src/operators/pm.h" #include "src/operators/rbl.h" #include "src/operators/rsub.h" #include "src/operators/rx.h" #include "src/operators/rx_global.h" #include "src/operators/str_eq.h" #include "src/operators/str_match.h" #include "src/operators/validate_byte_range.h" #include "src/operators/validate_dtd.h" #include "src/operators/validate_hash.h" #include "src/operators/validate_schema.h" #include "src/operators/validate_url_encoding.h" #include "src/operators/validate_utf8_encoding.h" #include "src/operators/verify_cc.h" #include "src/operators/verify_cpf.h" #include "src/operators/verify_ssn.h" #include "src/operators/verify_svnr.h" #include "src/operators/within.h" #include "src/operators/unconditional_match.h" #define IF_MATCH(a) \ if (op_ == #a) namespace modsecurity { namespace operators { bool Operator::evaluateInternal(Transaction *transaction, RuleWithActions *rule, const std::string& a, std::shared_ptr rm) { bool res = evaluate(transaction, rule, a, rm); if (m_negation) { return !res; } return res; } bool Operator::evaluateInternal(Transaction *transaction, RuleWithActions *rule, const std::string& a) { bool res = evaluate(transaction, rule, a); if (m_negation) { return !res; } return res; } bool Operator::evaluateInternal(Transaction *transaction, const std::string& a) { bool res = evaluate(transaction, a); if (m_negation) { return !res; } return res; } std::string Operator::resolveMatchMessage(Transaction *t, std::string key, std::string value) { std::string ret = m_match_message; if (ret.empty() == true) { if (m_couldContainsMacro == false) { ret = "Matched \"Operator `" + m_op + "' with parameter `" + utils::string::limitTo(200, m_param) + "' against variable `" + key + "' (Value: `" + utils::string::limitTo(100, utils::string::toHexIfNeeded(value)) + \ "' )"; } else { std::string p(m_string->evaluate(t)); ret = "Matched \"Operator `" + m_op + "' with parameter `" + utils::string::limitTo(200, p) + "' against variable `" + key + "' (Value: `" + utils::string::limitTo(100, utils::string::toHexIfNeeded(value)) + "' )"; } } return ret; } bool Operator::evaluate(Transaction *transaction, const std::string& a) { ms_dbg_a(transaction, 2, "Operator: " + m_op + \ " is not implemented or malfunctioning."); return true; } Operator *Operator::instantiate(std::string op, std::string param_str) { std::string op_ = utils::string::tolower(op); std::unique_ptr param(new RunTimeString()); param->appendText(param_str); IF_MATCH(beginswith) { return new BeginsWith(std::move(param)); } IF_MATCH(contains) { return new Contains(std::move(param)); } IF_MATCH(containsword) { return new ContainsWord(std::move(param)); } IF_MATCH(detectsqli) { return new DetectSQLi(); } IF_MATCH(detectxss) { return new DetectXSS(); } IF_MATCH(endswith) { return new EndsWith(std::move(param)); } IF_MATCH(eq) { return new Eq(std::move(param)); } IF_MATCH(fuzzyhash) { return new FuzzyHash(std::move(param)); } IF_MATCH(geolookup) { return new GeoLookup(); } IF_MATCH(ge) { return new Ge(std::move(param)); } IF_MATCH(gsblookup) { return new GsbLookup(std::move(param)); } IF_MATCH(gt) { return new Gt(std::move(param)); } IF_MATCH(inspectfile) { return new InspectFile(std::move(param)); } IF_MATCH(ipmatchf) { return new IpMatchF(std::move(param)); } IF_MATCH(ipmatchfromfile) { return new IpMatchFromFile(std::move(param)); } IF_MATCH(ipmatch) { return new IpMatch(std::move(param)); } IF_MATCH(le) { return new Le(std::move(param)); } IF_MATCH(lt) { return new Lt(std::move(param)); } IF_MATCH(nomatch) { return new NoMatch(); } IF_MATCH(pmfromfile) { return new PmFromFile(std::move(param)); } IF_MATCH(pmf) { return new PmF(std::move(param)); } IF_MATCH(pm) { return new Pm(std::move(param)); } IF_MATCH(rbl) { return new Rbl(std::move(param)); } IF_MATCH(rsub) { return new Rsub(std::move(param)); } IF_MATCH(rx) { return new Rx(std::move(param)); } IF_MATCH(rxglobal) { return new RxGlobal(std::move(param)); } IF_MATCH(streq) { return new StrEq(std::move(param)); } IF_MATCH(strmatch) { return new StrMatch(std::move(param)); } IF_MATCH(validatebyterange) { return new ValidateByteRange(std::move(param)); } IF_MATCH(validatedtd) { return new ValidateDTD(std::move(param)); } IF_MATCH(validatehash) { return new ValidateHash(std::move(param)); } IF_MATCH(validateschema) { return new ValidateSchema(std::move(param)); } IF_MATCH(validateurlencoding) { return new ValidateUrlEncoding(); } IF_MATCH(validateutf8encoding) { return new ValidateUtf8Encoding(); } IF_MATCH(verifycc) { return new VerifyCC(std::move(param)); } IF_MATCH(verifycpf) { return new VerifyCPF(std::move(param)); } IF_MATCH(verifyssn) { return new VerifySSN(std::move(param)); } IF_MATCH(verifysvnr) { return new VerifySVNR(std::move(param)); } IF_MATCH(within) { return new Within(std::move(param)); } IF_MATCH(unconditionalmatch) { return new UnconditionalMatch(); } throw std::invalid_argument("Operator not found."); } } // namespace operators } // namespace modsecurity modsecurity-v3.0.6/src/operators/validate_hash.cc0000664000175000017500000000174014146026157023317 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "src/operators/validate_hash.h" #include #include "src/operators/operator.h" namespace modsecurity { namespace operators { bool ValidateHash::evaluate(Transaction *transaction, const std::string &str) { /** * @todo Implement the operator ValidateHash. * Reference: https://github.com/SpiderLabs/ModSecurity/wiki/Reference-Manual#validateHash */ return true; } } // namespace operators } // namespace modsecurity modsecurity-v3.0.6/src/operators/validate_utf8_encoding.cc0000664000175000017500000001626614146026157025141 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "src/operators/validate_utf8_encoding.h" #include #include "src/operators/operator.h" namespace modsecurity { namespace operators { int ValidateUtf8Encoding::detect_utf8_character( const unsigned char *p_read, unsigned int length) { int unicode_len = 0; unsigned int d = 0; unsigned char c; if (p_read == NULL) { return UNICODE_ERROR_DECODING_ERROR; } c = *p_read; /* If first byte begins with binary 0 it is single byte encoding */ if ((c & 0x80) == 0) { /* single byte unicode (7 bit ASCII equivilent) has no validation */ return 1; } else if ((c & 0xE0) == 0xC0) { /* If first byte begins with binary 110 it is two byte encoding*/ /* check we have at least two bytes */ if (length < 2) { unicode_len = UNICODE_ERROR_CHARACTERS_MISSING; } else if (((*(p_read + 1)) & 0xC0) != 0x80) { /* check second byte starts with binary 10 */ unicode_len = UNICODE_ERROR_INVALID_ENCODING; } else { unicode_len = 2; /* compute character number */ d = ((c & 0x1F) << 6) | (*(p_read + 1) & 0x3F); } } else if ((c & 0xF0) == 0xE0) { /* If first byte begins with binary 1110 it is three byte encoding */ /* check we have at least three bytes */ if (length < 3) { unicode_len = UNICODE_ERROR_CHARACTERS_MISSING; } else if (((*(p_read + 1)) & 0xC0) != 0x80) { /* check second byte starts with binary 10 */ unicode_len = UNICODE_ERROR_INVALID_ENCODING; } else if (((*(p_read + 2)) & 0xC0) != 0x80) { /* check third byte starts with binary 10 */ unicode_len = UNICODE_ERROR_INVALID_ENCODING; } else { unicode_len = 3; /* compute character number */ d = ((c & 0x0F) << 12) | ((*(p_read + 1) & 0x3F) << 6) | (*(p_read + 2) & 0x3F); } } else if ((c & 0xF8) == 0xF0) { /* If first byte begins with binary 11110 it is four byte encoding */ /* restrict characters to UTF-8 range (U+0000 - U+10FFFF)*/ if (c >= 0xF5) { return UNICODE_ERROR_RESTRICTED_CHARACTER; } /* check we have at least four bytes */ if (length < 4) { unicode_len = UNICODE_ERROR_CHARACTERS_MISSING; } else if (((*(p_read + 1)) & 0xC0) != 0x80) { unicode_len = UNICODE_ERROR_INVALID_ENCODING; } else if (((*(p_read + 2)) & 0xC0) != 0x80) { unicode_len = UNICODE_ERROR_INVALID_ENCODING; } else if (((*(p_read + 3)) & 0xC0) != 0x80) { unicode_len = UNICODE_ERROR_INVALID_ENCODING; } else { unicode_len = 4; /* compute character number */ d = ((c & 0x07) << 18) | ((*(p_read + 1) & 0x3F) << 12) | ((*(p_read + 2) & 0x3F) << 6) | (*(p_read + 3) & 0x3F); } } else { /* any other first byte is invalid (RFC 3629) */ return UNICODE_ERROR_INVALID_ENCODING; } /* invalid UTF-8 character number range (RFC 3629) */ if ((d >= 0xD800) && (d <= 0xDFFF)) { return UNICODE_ERROR_RESTRICTED_CHARACTER; } /* check for overlong */ if ((unicode_len == 4) && (d < 0x010000)) { /* four byte could be represented with less bytes */ return UNICODE_ERROR_OVERLONG_CHARACTER; } else if ((unicode_len == 3) && (d < 0x0800)) { /* three byte could be represented with less bytes */ return UNICODE_ERROR_OVERLONG_CHARACTER; } else if ((unicode_len == 2) && (d < 0x80)) { /* two byte could be represented with less bytes */ return UNICODE_ERROR_OVERLONG_CHARACTER; } return unicode_len; } bool ValidateUtf8Encoding::evaluate(Transaction *transaction, RuleWithActions *rule, const std::string &str, std::shared_ptr ruleMessage) { unsigned int i, bytes_left; const char *str_c = str.c_str(); bytes_left = str.size(); for (i = 0; i < str.size();) { int rc = detect_utf8_character((unsigned char *)&str_c[i], bytes_left); switch (rc) { case UNICODE_ERROR_CHARACTERS_MISSING : if (transaction) { ms_dbg_a(transaction, 8, "Invalid UTF-8 encoding: " "not enough bytes in character " "at " + str + ". [offset \"" + std::to_string(i) + "\"]"); } return true; break; case UNICODE_ERROR_INVALID_ENCODING : if (transaction) { ms_dbg_a(transaction, 8, "Invalid UTF-8 encoding: " "invalid byte value in character " "at " + str + ". [offset \"" + std::to_string(i) + "\"]"); logOffset(ruleMessage, i, str.size()); } return true; break; case UNICODE_ERROR_OVERLONG_CHARACTER : if (transaction) { ms_dbg_a(transaction, 8, "Invalid UTF-8 encoding: " "overlong character detected " "at " + str + ". [offset \"" + std::to_string(i) + "\"]"); logOffset(ruleMessage, i, str.size()); } return true; break; case UNICODE_ERROR_RESTRICTED_CHARACTER : if (transaction) { ms_dbg_a(transaction, 8, "Invalid UTF-8 encoding: " "use of restricted character " "at " + str + ". [offset \"" + std::to_string(i) + "\"]"); logOffset(ruleMessage, i, str.size()); } return true; break; case UNICODE_ERROR_DECODING_ERROR : if (transaction) { ms_dbg_a(transaction, 8, "Error validating UTF-8 decoding " "at " + str + ". [offset \"" + std::to_string(i) + "\"]"); logOffset(ruleMessage, i, str.size()); } return true; break; } if (rc <= 0) { if (transaction) { ms_dbg_a(transaction, 8, "Internal error during UTF-8 validation " "at " + str + ". [offset \"" + std::to_string(i) + "\"]"); logOffset(ruleMessage, i, str.size()); } return true; } i += rc; bytes_left -= rc; } return false; } } // namespace operators } // namespace modsecurity modsecurity-v3.0.6/src/operators/verify_cpf.cc0000664000175000017500000000653614146026157022667 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "src/operators/verify_cpf.h" #include #include #include "src/operators/operator.h" namespace modsecurity { namespace operators { int VerifyCPF::convert_to_int(const char c) { int n; if ((c >= '0') && (c <= '9')) { n = c - '0'; } else if ((c >= 'A') && (c <= 'F')) { n = c - 'A' + 10; } else if ((c >= 'a') && (c <= 'f')) { n = c - 'a' + 10; } else { n = 0; } return n; } bool VerifyCPF::verify(const char *cpfnumber, int len) { int factor, part_1, part_2, var_len = len; unsigned int sum = 0, i = 0, cpf_len = 11, c; int cpf[11]; char s_cpf[11]; while ((*cpfnumber != '\0') && (var_len > 0)) { // Always true. //if (*cpfnumber != '-' || *cpfnumber != '.') { if (i < cpf_len && isdigit(*cpfnumber)) { s_cpf[i] = *cpfnumber; cpf[i] = convert_to_int(*cpfnumber); i++; } //} cpfnumber++; var_len--; } if (i != cpf_len) { return 0; } else { for (i = 0; i< cpf_len; i++) { if (strncmp(s_cpf, bad_cpf[i], cpf_len) == 0) { return 0; } } } part_1 = convert_to_int(s_cpf[cpf_len-2]); part_2 = convert_to_int(s_cpf[cpf_len-1]); c = cpf_len; for (i = 0; i < 9; i++) { sum += (cpf[i] * --c); } factor = (sum % cpf_len); if (factor < 2) { cpf[9] = 0; } else { cpf[9] = cpf_len-factor; } sum = 0; c = cpf_len; for (i = 0; i < 10; i++) { sum += (cpf[i] * c--); } factor = (sum % cpf_len); if (factor < 2) { cpf[10] = 0; } else { cpf[10] = cpf_len-factor; } if (part_1 == cpf[9] && part_2 == cpf[10]) { return true; } return false; } bool VerifyCPF::evaluate(Transaction *t, RuleWithActions *rule, const std::string& input, std::shared_ptr ruleMessage) { std::list matches; bool is_cpf = false; int i; if (m_param.empty()) { return false; } for (i = 0; i < input.size() - 1 && is_cpf == false; i++) { matches = m_re->searchAll(input.substr(i, input.size())); for (const auto & m : matches) { is_cpf = verify(m.str().c_str(), m.str().size()); if (is_cpf) { logOffset(ruleMessage, m.offset(), m.str().size()); if (rule && t && rule->hasCaptureAction()) { t->m_collections.m_tx_collection->storeOrUpdateFirst( "0", m.str()); ms_dbg_a(t, 7, "Added VerifyCPF match TX.0: " + \ m.str()); } goto out; } } } out: return is_cpf; } } // namespace operators } // namespace modsecurity modsecurity-v3.0.6/src/operators/contains.h0000664000175000017500000000240014146026157022175 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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. * */ #ifndef SRC_OPERATORS_CONTAINS_H_ #define SRC_OPERATORS_CONTAINS_H_ #include #include #include #include #include "modsecurity/transaction.h" #include "modsecurity/rule_message.h" #include "src/operators/operator.h" namespace modsecurity { namespace operators { class Contains : public Operator { public: /** @ingroup ModSecurity_Operator */ explicit Contains(std::unique_ptr param) : Operator("Contains", std::move(param)) { } bool evaluate(Transaction *transaction, RuleWithActions *rule, const std::string &str, std::shared_ptr ruleMessage) override; }; } // namespace operators } // namespace modsecurity #endif // SRC_OPERATORS_CONTAINS_H_ modsecurity-v3.0.6/src/operators/gsblookup.h0000664000175000017500000000213214146026157022366 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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. * */ #ifndef SRC_OPERATORS_GSBLOOKUP_H_ #define SRC_OPERATORS_GSBLOOKUP_H_ #include #include #include #include "src/operators/operator.h" namespace modsecurity { namespace operators { class GsbLookup : public Operator { public: /** @ingroup ModSecurity_Operator */ explicit GsbLookup(std::unique_ptr param) : Operator("GsbLookup", std::move(param)) { } bool evaluate(Transaction *transaction, const std::string &str) override; }; } // namespace operators } // namespace modsecurity #endif // SRC_OPERATORS_GSBLOOKUP_H_ modsecurity-v3.0.6/src/operators/validate_hash.h0000664000175000017500000000216014146026157023156 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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. * */ #ifndef SRC_OPERATORS_VALIDATE_HASH_H_ #define SRC_OPERATORS_VALIDATE_HASH_H_ #include #include #include #include "src/operators/operator.h" namespace modsecurity { namespace operators { class ValidateHash : public Operator { public: /** @ingroup ModSecurity_Operator */ explicit ValidateHash(std::unique_ptr param) : Operator("ValidateHash", std::move(param)) { } bool evaluate(Transaction *transaction, const std::string &str) override; }; } // namespace operators } // namespace modsecurity #endif // SRC_OPERATORS_VALIDATE_HASH_H_ modsecurity-v3.0.6/src/operators/ip_match.h0000664000175000017500000000252314146026157022151 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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. * */ #ifndef SRC_OPERATORS_IP_MATCH_H_ #define SRC_OPERATORS_IP_MATCH_H_ #include #include #include #include "src/operators/operator.h" #include "src/utils/ip_tree.h" namespace modsecurity { namespace operators { class IpMatch : public Operator { public: /** @ingroup ModSecurity_Operator */ explicit IpMatch(std::unique_ptr param) : Operator("IpMatch", std::move(param)) { } IpMatch(const std::string &n, std::unique_ptr param) : Operator(n, std::move(param)) { } bool evaluate(Transaction *transaction, const std::string &input) override; bool init(const std::string &file, std::string *error) override; protected: Utils::IpTree m_tree; }; } // namespace operators } // namespace modsecurity #endif // SRC_OPERATORS_IP_MATCH_H_ modsecurity-v3.0.6/src/operators/verify_ssn.h0000664000175000017500000000311214146026157022547 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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. * */ #ifndef SRC_OPERATORS_VERIFY_SSN_H_ #define SRC_OPERATORS_VERIFY_SSN_H_ #include #include #include #include "src/operators/operator.h" #include "src/utils/regex.h" namespace modsecurity { using Utils::SMatch; using Utils::regex_search; using Utils::Regex; namespace operators { class VerifySSN : public Operator { public: /** @ingroup ModSecurity_Operator */ explicit VerifySSN(std::unique_ptr param) : Operator("VerifySSN", std::move(param)) { m_re = new Regex(m_param); } ~VerifySSN() { delete m_re; } bool operator=(const VerifySSN &a) = delete; VerifySSN(const VerifySSN &a) = delete; bool evaluate(Transaction *transaction, RuleWithActions *rule, const std::string& input, std::shared_ptr ruleMessage) override; private: static bool verify(const char *ssnumber, int len); static int convert_to_int(const char c); Regex *m_re; }; } // namespace operators } // namespace modsecurity #endif // SRC_OPERATORS_VERIFY_SSN_H_ modsecurity-v3.0.6/src/operators/le.cc0000664000175000017500000000162314146026157021123 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "src/operators/le.h" #include #include "src/operators/operator.h" namespace modsecurity { namespace operators { bool Le::evaluate(Transaction *transaction, const std::string &input) { std::string p(m_string->evaluate(transaction)); bool le = atoll(input.c_str()) <= atoll(p.c_str()); return le; } } // namespace operators } // namespace modsecurity modsecurity-v3.0.6/src/operators/detect_sqli.cc0000664000175000017500000000333414146026157023024 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "src/operators/detect_sqli.h" #include #include #include "src/operators/operator.h" #include "others/libinjection/src/libinjection.h" namespace modsecurity { namespace operators { bool DetectSQLi::evaluate(Transaction *t, RuleWithActions *rule, const std::string& input, std::shared_ptr ruleMessage) { char fingerprint[8]; int issqli; issqli = libinjection_sqli(input.c_str(), input.length(), fingerprint); if (!t) { goto tisempty; } if (issqli) { t->m_matched.push_back(fingerprint); ms_dbg_a(t, 4, "detected SQLi using libinjection with " \ "fingerprint '" + std::string(fingerprint) + "' at: '" + input + "'"); if (rule && rule->hasCaptureAction()) { t->m_collections.m_tx_collection->storeOrUpdateFirst( "0", std::string(fingerprint)); ms_dbg_a(t, 7, "Added DetectSQLi match TX.0: " + \ std::string(fingerprint)); } } else { ms_dbg_a(t, 9, "detected SQLi: not able to find an " \ "inject on '" + input + "'"); } tisempty: return issqli != 0; } } // namespace operators } // namespace modsecurity modsecurity-v3.0.6/src/operators/rx.cc0000664000175000017500000000444614146026157021162 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "src/operators/rx.h" #include #include #include #include "src/operators/operator.h" #include "modsecurity/rule.h" #include "modsecurity/rule_message.h" namespace modsecurity { namespace operators { bool Rx::init(const std::string &arg, std::string *error) { if (m_string->m_containsMacro == false) { m_re = new Regex(m_param); } return true; } bool Rx::evaluate(Transaction *transaction, RuleWithActions *rule, const std::string& input, std::shared_ptr ruleMessage) { Regex *re; if (m_param.empty() && !m_string->m_containsMacro) { return true; } if (m_string->m_containsMacro) { std::string eparam(m_string->evaluate(transaction)); re = new Regex(eparam); } else { re = m_re; } std::vector captures; re->searchOneMatch(input, captures); if (rule && rule->hasCaptureAction() && transaction) { for (const Utils::SMatchCapture& capture : captures) { const std::string capture_substring(input.substr(capture.m_offset,capture.m_length)); transaction->m_collections.m_tx_collection->storeOrUpdateFirst( std::to_string(capture.m_group), capture_substring); ms_dbg_a(transaction, 7, "Added regex subexpression TX." + std::to_string(capture.m_group) + ": " + capture_substring); transaction->m_matched.push_back(capture_substring); } } for (const auto & capture : captures) { logOffset(ruleMessage, capture.m_offset, capture.m_length); } if (m_string->m_containsMacro) { delete re; } if (!captures.empty()) { return true; } return false; } } // namespace operators } // namespace modsecurity modsecurity-v3.0.6/src/operators/within.cc0000664000175000017500000000223214146026157022022 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "src/operators/within.h" #include #include "src/operators/operator.h" namespace modsecurity { namespace operators { bool Within::evaluate(Transaction *transaction, RuleWithActions *rule, const std::string &str, std::shared_ptr ruleMessage) { bool res = false; size_t pos = 0; std::string paramTarget(m_string->evaluate(transaction)); if (str.empty()) { return true; } pos = paramTarget.find(str); res = pos != std::string::npos; if (res) { logOffset(ruleMessage, pos, str.size()); } return res; } } // namespace operators } // namespace modsecurity modsecurity-v3.0.6/src/request_body_processor/0000775000175000017500000000000014146026763023003 5ustar mhsvierulamhsvierulamodsecurity-v3.0.6/src/request_body_processor/json.cc0000664000175000017500000002032614146026157024263 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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. * */ #ifdef WITH_YAJL #include "src/request_body_processor/json.h" #include #include #include namespace modsecurity { namespace RequestBodyProcessor { static const double json_depth_limit_default = 10000.0; static const char* json_depth_limit_exceeded_msg = ". Parsing depth limit exceeded"; JSON::JSON(Transaction *transaction) : m_transaction(transaction), m_handle(NULL), m_current_key(""), m_max_depth(json_depth_limit_default), m_current_depth(0), m_depth_limit_exceeded(false) { /** * yajl callback functions * For more information on the function signatures and order, check * http://lloyd.github.com/yajl/yajl-1.0.12/structyajl__callbacks.html */ /** * yajl configuration and callbacks */ static yajl_callbacks callbacks = { yajl_null, yajl_boolean, NULL /* yajl_integer */, NULL /* yajl_double */, yajl_number, yajl_string, yajl_start_map, yajl_map_key, yajl_end_map, yajl_start_array, yajl_end_array }; /** * yajl initialization * * yajl_parser_config definition: * http://lloyd.github.io/yajl/yajl-2.0.1/yajl__parse_8h.html#aec816c5518264d2ac41c05469a0f986c * * TODO: make UTF8 validation optional, as it depends on Content-Encoding */ m_handle = yajl_alloc(&callbacks, NULL, this); yajl_config(m_handle, yajl_allow_partial_values, 0); } JSON::~JSON() { while (m_containers.size() > 0) { JSONContainer *a = m_containers.back(); m_containers.pop_back(); delete a; } yajl_free(m_handle); } bool JSON::init() { return true; } bool JSON::processChunk(const char *buf, unsigned int size, std::string *err) { /* Feed our parser and catch any errors */ m_status = yajl_parse(m_handle, (const unsigned char *)buf, size); if (m_status != yajl_status_ok) { unsigned char *e = yajl_get_error(m_handle, 0, (const unsigned char *)buf, size); /* We need to free the yajl error message later, how to do this? */ err->assign((const char *)e); if (m_depth_limit_exceeded) { err->append(json_depth_limit_exceeded_msg); } yajl_free_error(m_handle, e); return false; } return true; } bool JSON::complete(std::string *err) { /* Wrap up the parsing process */ m_status = yajl_complete_parse(m_handle); if (m_status != yajl_status_ok) { unsigned char *e = yajl_get_error(m_handle, 0, NULL, 0); /* We need to free the yajl error message later, how to do this? */ err->assign((const char *)e); if (m_depth_limit_exceeded) { err->append(json_depth_limit_exceeded_msg); } yajl_free_error(m_handle, e); return false; } return true; } int JSON::addArgument(const std::string& value) { std::string data(""); std::string path; for (size_t i = 0; i < m_containers.size(); i++) { JSONContainerArray *a = dynamic_cast( m_containers[i]); path = path + m_containers[i]->m_name; if (a != NULL) { path = path + ".array_" + std::to_string(a->m_elementCounter); } else { path = path + "."; } } if (m_containers.size() > 0) { JSONContainerArray *a = dynamic_cast( m_containers.back()); if (a) { a->m_elementCounter++; } else { data = getCurrentKey(); } } else { data = getCurrentKey(); } if (!m_transaction->addArgument("JSON", path + data, value, 0)) { // cancel parsing by returning false return 0; } return 1; } /** * Callback for hash key values; we use those to define the variable names * under ARGS. Whenever we reach a new key, we update the current key value. */ int JSON::yajl_map_key(void *ctx, const unsigned char *key, size_t length) { JSON *tthis = reinterpret_cast(ctx); std::string safe_key; /** * yajl does not provide us with null-terminated strings, but * rather expects us to copy the data from the key up to the * length informed; we create a standalone null-termined copy * in safe_key */ safe_key.assign((const char *)key, length); tthis->m_current_key = safe_key; return 1; } /** * Callback for null values * */ int JSON::yajl_null(void *ctx) { JSON *tthis = reinterpret_cast(ctx); return tthis->addArgument(""); } /** * Callback for boolean values */ int JSON::yajl_boolean(void *ctx, int value) { JSON *tthis = reinterpret_cast(ctx); if (value) { return tthis->addArgument("true"); } return tthis->addArgument("false"); } /** * Callback for string values */ int JSON::yajl_string(void *ctx, const unsigned char *value, size_t length) { JSON *tthis = reinterpret_cast(ctx); std::string v = std::string((const char*)value, length); return tthis->addArgument(v); } /** * Callback for numbers; YAJL can use separate callbacks for integers/longs and * float/double values, but since we are not interested in using the numeric * values here, we use a generic handler which uses numeric strings */ int JSON::yajl_number(void *ctx, const char *value, size_t length) { JSON *tthis = reinterpret_cast(ctx); std::string v = std::string((const char*)value, length); return tthis->addArgument(v); } /** * Callback for a new hash, which indicates a new subtree, labeled as the * current argument name, is being created */ int JSON::yajl_start_array(void *ctx) { JSON *tthis = reinterpret_cast(ctx); std::string name = tthis->getCurrentKey(); tthis->m_containers.push_back( reinterpret_cast(new JSONContainerArray(name))); tthis->m_current_depth++; if (tthis->m_current_depth > tthis->m_max_depth) { tthis->m_depth_limit_exceeded = true; return 0; } return 1; } int JSON::yajl_end_array(void *ctx) { JSON *tthis = reinterpret_cast(ctx); if (tthis->m_containers.empty()) { tthis->m_current_depth--; return 1; } JSONContainer *a = tthis->m_containers.back(); tthis->m_containers.pop_back(); delete a; if (tthis->m_containers.size() > 0) { JSONContainerArray *ja = dynamic_cast( tthis->m_containers.back()); if (ja) { ja->m_elementCounter++; } } tthis->m_current_depth--; return 1; } int JSON::yajl_start_map(void *ctx) { JSON *tthis = reinterpret_cast(ctx); std::string name(tthis->getCurrentKey()); tthis->m_containers.push_back( reinterpret_cast(new JSONContainerMap(name))); tthis->m_current_depth++; if (tthis->m_current_depth > tthis->m_max_depth) { tthis->m_depth_limit_exceeded = true; return 0; } return 1; } /** * Callback for end hash, meaning the current subtree is being closed, and that * we should go back to the parent variable label */ int JSON::yajl_end_map(void *ctx) { JSON *tthis = reinterpret_cast(ctx); if (tthis->m_containers.empty()) { tthis->m_current_depth--; return 1; } JSONContainer *a = tthis->m_containers.back(); tthis->m_containers.pop_back(); delete a; if (tthis->m_containers.size() > 0) { JSONContainerArray *ja = dynamic_cast( tthis->m_containers.back()); if (ja) { ja->m_elementCounter++; } } tthis->m_current_depth--; return 1; } } // namespace RequestBodyProcessor } // namespace modsecurity #endif // WITH_YAJL modsecurity-v3.0.6/src/request_body_processor/json.h0000664000175000017500000000637614146026157024136 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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. * */ #ifndef SRC_REQUEST_BODY_PROCESSOR_JSON_H_ #define SRC_REQUEST_BODY_PROCESSOR_JSON_H_ #ifdef WITH_YAJL #include #include #include #include #include "modsecurity/transaction.h" #include "modsecurity/rules_set.h" namespace modsecurity { namespace RequestBodyProcessor { class JSONContainer { public: explicit JSONContainer(const std::string &name) : m_name(name) { } virtual ~JSONContainer() { } std::string m_name; }; class JSONContainerArray : public JSONContainer { public: explicit JSONContainerArray(const std::string &name) : JSONContainer(name), m_elementCounter(0) { } size_t m_elementCounter; }; class JSONContainerMap : public JSONContainer { public: explicit JSONContainerMap(const std::string &name) : JSONContainer(name) { } }; class JSON { public: explicit JSON(Transaction *transaction); ~JSON(); static bool init(); bool processChunk(const char *buf, unsigned int size, std::string *err); bool complete(std::string *err); int addArgument(const std::string& value); static int yajl_number(void *ctx, const char *value, size_t length); static int yajl_string(void *ctx, const unsigned char *value, size_t length); static int yajl_boolean(void *ctx, int value); static int yajl_null(void *ctx); static int yajl_map_key(void *ctx, const unsigned char *key, size_t length); static int yajl_end_map(void *ctx); static int yajl_start_map(void *ctx); static int yajl_start_array(void *ctx); static int yajl_end_array(void *ctx); bool isPreviousArray() const { JSONContainerArray *prev = NULL; if (m_containers.size() < 1) { return false; } prev = dynamic_cast( m_containers[m_containers.size() - 1]); return prev != NULL; } std::string getCurrentKey(bool emptyIsNull = false) { std::string ret(m_current_key); if (m_containers.size() == 0) { return "json"; } if (m_current_key.empty() == true) { if (isPreviousArray() || emptyIsNull == true) { return ""; } return "empty-key"; } m_current_key = ""; return ret; } void setMaxDepth(double max_depth) { m_max_depth = max_depth; } private: std::deque m_containers; Transaction *m_transaction; yajl_handle m_handle; yajl_status m_status; std::string m_current_key; double m_max_depth; int64_t m_current_depth; bool m_depth_limit_exceeded; }; } // namespace RequestBodyProcessor } // namespace modsecurity #endif // WITH_YAJL #endif // SRC_REQUEST_BODY_PROCESSOR_JSON_H_ modsecurity-v3.0.6/src/request_body_processor/multipart.h0000664000175000017500000001407514146026157025201 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include #include #include #include #ifndef SRC_REQUEST_BODY_PROCESSOR_MULTIPART_H_ #define SRC_REQUEST_BODY_PROCESSOR_MULTIPART_H_ #include "modsecurity/transaction.h" namespace modsecurity { namespace RequestBodyProcessor { #define MULTIPART_BUF_SIZE 4096 #define MULTIPART_FORMDATA 1 #define MULTIPART_FILE 2 struct MyHash { size_t operator()(const std::string& Keyval) const { size_t h = 0; std::for_each(Keyval.begin(), Keyval.end(), [&](char c) { h += tolower(c); }); return h; } }; struct MyEqual { bool operator()(const std::string& Left, const std::string& Right) const { return Left.size() == Right.size() && std::equal(Left.begin(), Left.end(), Right.begin(), [](char a, char b) { return tolower(a) == tolower(b); }); } }; class MultipartPartTmpFile { public: explicit MultipartPartTmpFile(Transaction *transaction) : m_transaction(transaction), m_tmp_file_fd(0), m_delete(false) { } ~MultipartPartTmpFile(); // forbid copying MultipartPartTmpFile(const MultipartPartTmpFile&) = delete; MultipartPartTmpFile& operator=(const MultipartPartTmpFile&) = delete; int getFd() const {return m_tmp_file_fd;} void setFd(int fd) {m_tmp_file_fd = fd;} const std::string& getFilename() const {return m_tmp_file_name;} void setDelete() {m_delete = true;} bool isValid() const {return ((m_tmp_file_fd != 0) && (!m_tmp_file_name.empty()));} void Open(); void Close(); private: Transaction *m_transaction; int m_tmp_file_fd; std::string m_tmp_file_name; bool m_delete; // whether to delete when transaction is done }; class MultipartPart { public: MultipartPart() : m_type(MULTIPART_FORMDATA), m_name(""), m_nameOffset(0), m_value(""), m_valueOffset(0), m_value_parts(), m_tmp_file_size(), m_filename(""), m_filenameOffset(0), m_last_header_name(""), m_headers(), m_offset(0), m_length(0) { m_tmp_file_size.first = 0; m_tmp_file_size.second = 0; } ~MultipartPart() { m_headers.clear(); m_value_parts.clear(); } /* part type, can be MULTIPART_FORMDATA or MULTIPART_FILE */ int m_type; /* the name */ std::string m_name; size_t m_nameOffset; /* variables only, variable value */ std::string m_value; size_t m_valueOffset; std::list> m_value_parts; /* files only, the content type (where available) */ /* std::string m_content_type; */ /* files only, the name of the temporary file holding data */ std::shared_ptr m_tmp_file; std::pair m_tmp_file_size; /* files only, filename as supplied by the browser */ std::string m_filename; size_t m_filenameOffset; std::string m_last_header_name; std::unordered_map, MyHash, MyEqual> m_headers; unsigned int m_offset; unsigned int m_length; }; class Multipart { public: Multipart(const std::string &header, Transaction *transaction); ~Multipart(); bool init(std::string *err); static int boundary_characters_valid(const char *boundary); static int count_boundary_params(const std::string& str_header_value); static int is_token_char(unsigned char c); int multipart_complete(std::string *err); int parse_content_disposition(const char *c_d_value, int offset); bool process(const std::string& data, std::string *err, int offset); int process_boundary(int last_part); int process_part_header(std::string *error, int offset); int process_part_data(std::string *error, size_t offset); void validate_quotes(const char *data); size_t m_reqbody_no_files_length; std::list m_parts; /* Number of parts that are files */ int m_nfiles; /* mime boundary used to detect when * parts end and begin */ std::string m_boundary; int m_boundary_count; /* internal buffer and other variables * used while parsing */ char m_buf[MULTIPART_BUF_SIZE + 2]; int m_buf_contains_line; char *m_bufptr; int m_bufleft; unsigned int m_buf_offset; /* pointer that keeps track of a part while * it is being built */ MultipartPart *m_mpp; /* part parsing state; 0 means we are reading * headers, 1 means we are collecting data */ int m_mpp_state; /* because of the way this parsing algorithm * works we hold back the last two bytes of * each data chunk so that we can discard it * later if the next data chunk proves to be * a boundary; the first byte is an indicator * 0 - no content, 1 - two data bytes available */ char m_reserve[4]; int m_seen_data; int m_is_complete; int m_flag_error; int m_flag_data_before; int m_flag_data_after; int m_flag_header_folding; int m_flag_boundary_quoted; int m_flag_lf_line; int m_flag_crlf_line; int m_flag_unmatched_boundary; int m_flag_boundary_whitespace; int m_flag_missing_semicolon; int m_flag_invalid_quoting; int m_flag_invalid_part; int m_flag_invalid_header_folding; int m_flag_file_limit_exceeded; private: std::string m_header; Transaction *m_transaction; }; } // namespace RequestBodyProcessor } // namespace modsecurity #endif // SRC_REQUEST_BODY_PROCESSOR_MULTIPART_H_ modsecurity-v3.0.6/src/request_body_processor/xml.cc0000664000175000017500000001040214146026157024104 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "src/request_body_processor/xml.h" #include #include #include namespace modsecurity { namespace RequestBodyProcessor { #ifdef WITH_LIBXML2 XML::XML(Transaction *transaction) : m_transaction(transaction) { m_data.doc = NULL; m_data.parsing_ctx = NULL; m_data.sax_handler = NULL; } XML::~XML() { if (m_data.parsing_ctx != NULL) { xmlFreeParserCtxt(m_data.parsing_ctx); m_data.parsing_ctx = NULL; } if (m_data.doc != NULL) { xmlFreeDoc(m_data.doc); m_data.doc = NULL; } } bool XML::init() { //xmlParserInputBufferCreateFilenameFunc entity; if (m_transaction->m_rules->m_secXMLExternalEntity == RulesSetProperties::TrueConfigBoolean) { /*entity = */xmlParserInputBufferCreateFilenameDefault( __xmlParserInputBufferCreateFilename); } else { /*entity = */xmlParserInputBufferCreateFilenameDefault( this->unloadExternalEntity); } return true; } xmlParserInputBufferPtr XML::unloadExternalEntity(const char *URI, xmlCharEncoding enc) { return NULL; } bool XML::processChunk(const char *buf, unsigned int size, std::string *error) { /* We want to initialise our parsing context here, to * enable us to pass it the first chunk of data so that * it can attempt to auto-detect the encoding. */ if (m_data.parsing_ctx == NULL) { /* First invocation. */ ms_dbg_a(m_transaction, 4, "XML: Initialising parser."); /* NOTE When Sax interface is used libxml will not * create the document object, but we need it. msr->xml->sax_handler = (xmlSAXHandler *)apr_pcalloc(msr->mp, sizeof(xmlSAXHandler)); if (msr->xml->sax_handler == NULL) return -1; msr->xml->sax_handler->error = xml_receive_sax_error; msr->xml->sax_handler->warning = xml_receive_sax_error; msr->xml->parsing_ctx = xmlCreatePushParserCtxt(msr->xml->sax_handler, msr, buf, size, "body.xml"); */ m_data.parsing_ctx = xmlCreatePushParserCtxt(NULL, NULL, buf, size, "body.xml"); if (m_data.parsing_ctx == NULL) { ms_dbg_a(m_transaction, 4, "XML: Failed to create parsing context."); error->assign("XML: Failed to create parsing context."); return false; } xmlSetGenericErrorFunc(m_data.parsing_ctx, null_error); return true; } /* Not a first invocation. */ xmlParseChunk(m_data.parsing_ctx, buf, size, 0); if (m_data.parsing_ctx->wellFormed != 1) { error->assign("XML: Failed to create parsing context."); ms_dbg_a(m_transaction, 4, "XML: Failed parsing document."); return false; } return true; } bool XML::complete(std::string *error) { /* Only if we have a context, meaning we've done some work. */ if (m_data.parsing_ctx != NULL) { /* This is how we signalise the end of parsing to libxml. */ xmlParseChunk(m_data.parsing_ctx, NULL, 0, 1); /* Preserve the results for our reference. */ m_data.well_formed = m_data.parsing_ctx->wellFormed; m_data.doc = m_data.parsing_ctx->myDoc; /* Clean up everything else. */ xmlFreeParserCtxt(m_data.parsing_ctx); m_data.parsing_ctx = NULL; ms_dbg_a(m_transaction, 4, "XML: Parsing complete (well_formed " \ + std::to_string(m_data.well_formed) + ")."); if (m_data.well_formed != 1) { error->assign("XML: Failed parsing document."); ms_dbg_a(m_transaction, 4, "XML: Failed parsing document."); return false; } } return true; } #endif } // namespace RequestBodyProcessor } // namespace modsecurity modsecurity-v3.0.6/src/request_body_processor/multipart.cc0000664000175000017500000015742414146026157025345 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "src/request_body_processor/multipart.h" #include #include #include #include #include #include #include #include #include #include #include #include "modsecurity/rules_set.h" #include "modsecurity/collection/collections.h" #include "src/utils/string.h" namespace modsecurity { namespace RequestBodyProcessor { static const char* mime_charset_special = "!#$%&+-^_`{}~"; static const char* attr_char_special = "!#$&+-.^_`~"; MultipartPartTmpFile::~MultipartPartTmpFile() { if (!m_tmp_file_name.empty() && m_delete) { /* make sure it is closed first */ if (m_tmp_file_fd > 0) { Close(); } const int unlink_rc = unlink(m_tmp_file_name.c_str()); if (unlink_rc < 0) { ms_dbg_a(m_transaction, 1, "Multipart: Failed to delete file (part) \"" \ + m_tmp_file_name + "\" because " \ + std::to_string(errno) + "(" \ + strerror(errno) + ")"); } else { ms_dbg_a(m_transaction, 4, "Multipart: file deleted successfully (part) \"" \ + m_tmp_file_name + "\""); } } } void MultipartPartTmpFile::Open() { struct tm timeinfo; char tstr[300]; time_t tt = time(NULL); localtime_r(&tt, &timeinfo); memset(tstr, '\0', 300); strftime(tstr, 299, "/%Y%m%d-%H%M%S", &timeinfo); std::string path = m_transaction->m_rules->m_uploadDirectory.m_value; path = path + tstr + "-" + *m_transaction->m_id.get(); path += "-file-XXXXXX"; char* tmp = strdup(path.c_str()); m_tmp_file_fd = mkstemp(tmp); m_tmp_file_name.assign(tmp); free(tmp); ms_dbg_a(m_transaction, 4, "MultipartPartTmpFile: Create filename= " + m_tmp_file_name); int mode = m_transaction->m_rules->m_uploadFileMode.m_value; if ((m_tmp_file_fd != -1) && (mode != 0)) { if (fchmod(m_tmp_file_fd, mode) == -1) { m_tmp_file_fd = -1; } } } void MultipartPartTmpFile::Close() { close(m_tmp_file_fd); m_tmp_file_fd = -1; } Multipart::Multipart(const std::string &header, Transaction *transaction) : m_reqbody_no_files_length(0), m_nfiles(0), m_boundary_count(0), m_buf{0}, m_buf_contains_line(0), m_bufptr(NULL), m_bufleft(0), m_buf_offset(0), m_mpp(NULL), m_mpp_state(0), m_reserve{0}, m_seen_data(0), m_is_complete(0), m_flag_error(0), m_flag_data_before(0), m_flag_data_after(0), m_flag_header_folding(0), m_flag_boundary_quoted(0), m_flag_lf_line(0), m_flag_crlf_line(0), m_flag_unmatched_boundary(0), m_flag_boundary_whitespace(0), m_flag_missing_semicolon(0), m_flag_invalid_quoting(0), m_flag_invalid_part(0), m_flag_invalid_header_folding(0), m_flag_file_limit_exceeded(0), m_header(header), m_transaction(transaction) { } Multipart::~Multipart() { ms_dbg_a(m_transaction, 4, "Multipart: Cleanup started (keep files set to " \ + RulesSetProperties::configBooleanString( m_transaction->m_rules->m_uploadKeepFiles) \ + ")"); if (m_transaction->m_rules->m_uploadKeepFiles != RulesSetProperties::TrueConfigBoolean) { for (MultipartPart *m : m_parts) { if ((m->m_type == MULTIPART_FILE) && (m->m_tmp_file)) { // only mark for deletion for now; the file should stay on disk until // the transaction is complete ms_dbg_a(m_transaction, 9, "Multipart: Marking temporary file for deletion: " \ + m->m_tmp_file->getFilename()); m->m_tmp_file->setDelete(); } } } while (m_parts.empty() == false) { auto *a = m_parts.back(); m_parts.pop_back(); delete a; } if (m_mpp != NULL) { delete m_mpp; m_mpp = NULL; } } int Multipart::is_token_char(unsigned char c) { /* ENH Is the performance important at all? We could use a table instead. */ /* CTLs not allowed */ if ((c <= 32) || (c >= 127)) { return 0; } switch (c) { case '(' : case ')' : case '<' : case '>' : case '@' : case ',' : case ';' : case ':' : case '\\' : case '"' : case '/' : case '[' : case ']' : case '?' : case '=' : return 0; } return 1; } int Multipart::boundary_characters_valid(const char *boundary) { const unsigned char *p = (unsigned char *)boundary; unsigned char c; if (p == NULL) { return -1; } while ((c = *p) != '\0') { // Check against allowed list defined in RFC2046 page 22 if (!( ('0' <= c && c <= '9') || ('A' <= c && c <= 'Z') || ('a' <= c && c <= 'z') || (c == ' ' && *(p + 1) != '\0') // space allowed, but not as last character || c == '\'' || c == '(' || c == ')' || c == '+' || c == '_' || c == ',' || c == '-' || c == '.' || c == '/' || c == ':' || c == '=' || c == '?' )) { return 0; } p++; } return 1; } void Multipart::validate_quotes(const char *data) { int i, len; if (data == NULL) return; len = strlen(data); for (i = 0; i < len; i++) { if (data[i] == '\'') { ms_dbg_a(m_transaction, 9, "Multipart: Invalid quoting detected: " \ + std::string(data) + " length " \ + std::to_string(len) + " bytes"); m_flag_invalid_quoting = 1; } } } int Multipart::parse_content_disposition(const char *c_d_value, int offset) { const char *p = NULL; std::string filenameStar; /* accept only what we understand */ if (strncmp(c_d_value, "form-data", 9) != 0) { return -1; } /* see if there are any other parts to parse */ p = c_d_value + 9; while ((*p == '\t') || (*p == ' ')) p++; if (*p == '\0') { return 1; /* this is OK */ } if (*p != ';') { return -2; } p++; /* parse the appended parts */ while (*p != '\0') { const char *start = NULL; std::string name; std::string value; /* go over the whitespace */ while ((*p == '\t') || (*p == ' ')) { p++; } if (*p == '\0') { return -3; } start = p; while ((*p != '\0') && (*p != '=') && (*p != '\t') && (*p != ' ')) { p++; } if (*p == '\0') { return -4; } name = std::string(start, (p - start)); while ((*p == '\t') || (*p == ' ')) { p++; } if (*p == '\0') { return -5; } if (*p != '=') { return -13; } p++; while ((*p == '\t') || (*p == ' ')) { p++; } if (*p == '\0') { return -6; } if (name == "filename*") { /* filename*=charset'[optional-language]'filename */ /* Read beyond the charset and the optional language*/ const char* start_of_charset = p; while ((*p != '\0') && (isalnum(*p) || (strchr(mime_charset_special, *p)))) { p++; } if ((*p != '\'') || (p == start_of_charset)) { return -16; // Must be at least one legit char before ' for start of language } p++; while ((*p != '\0') && (*p != '\'')) { p++; } if (*p != '\'') { return -17; // Single quote for end-of-language not found } p++; /* Now read what should be the actual filename */ const char* start_of_filename = p; while ((*p != '\0') && (*p != ';')) { if (*p == '%') { if ((*(p+1) == '\0') || (!isxdigit(*(p+1))) || (!isxdigit(*(p+2)))) { return -18; } p += 3; } else if (isalnum(*p) || strchr(attr_char_special, *p)) { p++; } else { return -19; } } value.assign(start_of_filename, p - start_of_filename); } else if ((*p == '"') || (*p == '\'')) { /* Accept both quotes as some backends will accept them, but * technically "'" is invalid and so flag_invalid_quoting is * set so the user can deal with it in the rules if they so wish. */ char quote = *p; if (quote == '\'') { m_flag_invalid_quoting = 1; } p++; if (*p == '\0') { return -7; } while (*p != '\0') { if (*p == '\\') { if (*(p + 1) == '\0') { /* improper escaping */ return -8; } /* only quote and \ can be escaped */ if ((*(p + 1) == quote) || (*(p + 1) == '\\')) { p++; } else { /* improper escaping */ /* We allow for now because IE sends * improperly escaped content and there's * nothing we can do about it. * * return -9; */ } } else if (*p == quote) { break; } value.append((p++), 1); } p++; /* go over the quote at the end */ } else { /* not quoted */ start = p; while ((*p != '\0') && (is_token_char(*p))) { p++; } value.assign(start, p - start); } /* evaluate part */ if (name == "name") { validate_quotes(value.c_str()); m_transaction->m_variableMultipartName.set(value, value, offset + ((p - c_d_value) - value.size())); if (!m_mpp->m_name.empty()) { ms_dbg_a(m_transaction, 4, "Multipart: Warning: Duplicate Content-Disposition " \ "name: " + value + ". Previously: " + m_mpp->m_name + ""); return -14; } m_mpp->m_name.assign(value); m_mpp->m_nameOffset = offset + ((p - c_d_value) - value.size()); ms_dbg_a(m_transaction, 9, "Multipart: Content-Disposition name: " + value + "."); } else if (name == "filename") { validate_quotes(value.c_str()); m_transaction->m_variableMultipartFileName.set(value, value, \ offset + ((p - c_d_value) - value.size())); if (!m_mpp->m_filename.empty()) { ms_dbg_a(m_transaction, 4, "Multipart: Warning: Duplicate Content-Disposition " \ "filename: " + value + "."); return -15; } m_mpp->m_filename.assign(value); m_mpp->m_filenameOffset = offset + ((p - c_d_value) - value.size()); ms_dbg_a(m_transaction, 9, "Multipart: Content-Disposition filename: " + value + "."); } else if (name == "filename*") { if (!filenameStar.empty()) { ms_dbg_a(m_transaction, 4, "Multipart: Warning: Duplicate Content-Disposition " \ "filename*: " + value + "."); return -20; } filenameStar.assign(value); ms_dbg_a(m_transaction, 9, "Multipart: Content-Disposition filename*: " + value + "."); } else { return -11; } if (*p != '\0') { while ((*p == '\t') || (*p == ' ')) { p++; } /* the next character must be a zero or a semi-colon */ if (*p == '\0') { // Just let the 'while' condition end the loop } else { if (*p != ';') { p--; if (*p == '\'' || *p == '\"') { ms_dbg_a(m_transaction, 9, "Multipart: Invalid quoting detected: " \ + std::string(p) + " length " \ + std::to_string(strlen(p)) + " bytes"); m_flag_invalid_quoting = 1; } /* p++; */ return -12; } p++; /* move over the semi-colon */ } } /* loop will stop when (*p == '\0') */ } if (!filenameStar.empty() && m_mpp->m_filename.empty()) { ms_dbg_a(m_transaction, 4, "Multipart: Warning: no filename= but filename*:" \ + filenameStar + "."); return -21; } return 1; } int Multipart::process_part_data(std::string *error, size_t offset) { char *p = m_buf + (MULTIPART_BUF_SIZE - m_bufleft); char localreserve[2] = { '\0', '\0' }; /* initialized to quiet warning */ int bytes_reserved = 0; /* Preserve some bytes for later. */ if (((MULTIPART_BUF_SIZE - m_bufleft) >= 1) && (*(p - 1) == '\n')) { if (((MULTIPART_BUF_SIZE - m_bufleft) >= 2) && (*(p - 2) == '\r')) { /* Two bytes. */ bytes_reserved = 2; localreserve[0] = *(p - 2); localreserve[1] = *(p - 1); m_bufleft += 2; *(p - 2) = 0; } else { /* Only one byte. */ bytes_reserved = 1; localreserve[0] = *(p - 1); localreserve[1] = 0; m_bufleft += 1; *(p - 1) = 0; } } /* add data to the part we are building */ if (m_mpp->m_type == MULTIPART_FILE) { bool extract = m_transaction->m_rules->m_uploadKeepFiles \ == RulesSetProperties::TrueConfigBoolean \ || m_transaction->m_rules->m_tmpSaveUploadedFiles \ == RulesSetProperties::TrueConfigBoolean; /* remember where we started */ if (m_mpp->m_length == 0) { m_mpp->m_offset = m_buf_offset; } /* check if the file limit has been reached */ if (extract && m_transaction->m_rules->m_uploadFileLimit.m_value && (m_nfiles >= m_transaction->m_rules->m_uploadFileLimit.m_value)) { if (m_flag_file_limit_exceeded == 0) { ms_dbg_a(m_transaction, 1, "Multipart: Upload file limit exceeded " \ + std::to_string( m_transaction->m_rules->m_uploadFileLimit.m_value) \ + ". Use SecUploadFileLimit to change the limit."); error->assign("Multipart: Upload file limit exceeded " \ + std::to_string( m_transaction->m_rules->m_uploadFileLimit.m_value) \ + ". Use SecUploadFileLimit to change the limit."); m_flag_file_limit_exceeded = 1; } extract = 0; } /* only store individual files on disk if we are going * to keep them or if we need to have them approved later */ if (extract) { /* first create a temporary file if we don't have it already */ if (!m_mpp->m_tmp_file || !m_mpp->m_tmp_file->isValid()) { m_mpp->m_tmp_file = std::make_shared(m_transaction); m_transaction->m_multipartPartTmpFiles.push_back(m_mpp->m_tmp_file); m_mpp->m_tmp_file->Open(); /* do we have an opened file? */ if (!m_mpp->m_tmp_file || m_mpp->m_tmp_file->getFd() < 0) { ms_dbg_a(m_transaction, 1, "Multipart: Failed to create file: " \ + m_mpp->m_tmp_file->getFilename()); error->assign("Multipart: Failed to create file: " \ + m_mpp->m_tmp_file->getFilename()); return -1; } /* keep track of the files count */ m_nfiles++; ms_dbg_a(m_transaction, 4, "Multipart: Created temporary file " \ + std::to_string(m_nfiles) + " (mode o" + std::to_string(m_transaction->m_rules->m_uploadFileMode.m_value) + "): " \ + m_mpp->m_tmp_file->getFilename()); } /* write the reserve first */ if (m_reserve[0] != 0) { if (write(m_mpp->m_tmp_file->getFd(), &m_reserve[1], m_reserve[0]) != m_reserve[0]) { ms_dbg_a(m_transaction, 1, "Multipart: writing to \"" \ + m_mpp->m_tmp_file->getFilename() + "\" failed"); error->assign("Multipart: writing to \"" \ + m_mpp->m_tmp_file->getFilename() + "\" failed"); return -1; } m_mpp->m_tmp_file_size.first += m_reserve[0]; if (m_mpp->m_tmp_file_size.second == 0) { m_mpp->m_tmp_file_size.second = offset \ - m_mpp->m_tmp_file_size.first; } m_mpp->m_length += m_reserve[0]; } /* write data to the file */ if (write(m_mpp->m_tmp_file->getFd(), m_buf, MULTIPART_BUF_SIZE - m_bufleft) != (MULTIPART_BUF_SIZE - m_bufleft)) { ms_dbg_a(m_transaction, 1, "Multipart: writing to \"" \ + m_mpp->m_tmp_file->getFilename() + "\" failed"); error->assign("Multipart: writing to \"" \ + m_mpp->m_tmp_file->getFilename() + "\" failed"); return -1; } m_mpp->m_value.append(std::string(m_buf, MULTIPART_BUF_SIZE - m_bufleft)); m_mpp->m_valueOffset = offset - (MULTIPART_BUF_SIZE - m_bufleft); m_mpp->m_tmp_file_size.first += (MULTIPART_BUF_SIZE - m_bufleft); if (m_mpp->m_tmp_file_size.second == 0) { m_mpp->m_tmp_file_size.second = offset \ - m_mpp->m_tmp_file_size.first; } m_mpp->m_length += (MULTIPART_BUF_SIZE - m_bufleft); } else { /* just keep track of the file size */ m_mpp->m_tmp_file_size.first += (MULTIPART_BUF_SIZE - m_bufleft) \ + m_reserve[0]; if (m_mpp->m_tmp_file_size.second == 0) { m_mpp->m_tmp_file_size.second = offset \ - m_mpp->m_tmp_file_size.first; } m_mpp->m_length += (MULTIPART_BUF_SIZE - m_bufleft) + m_reserve[0]; } } else if (m_mpp->m_type == MULTIPART_FORMDATA) { std::string d; /* The buffer contains data so increase the data length counter. */ m_reqbody_no_files_length += (MULTIPART_BUF_SIZE - m_bufleft) \ + m_reserve[0]; /* add this part to the list of parts */ /* remember where we started */ if (m_mpp->m_length == 0) { m_mpp->m_offset = m_buf_offset; } if (m_reserve[0] != 0) { d.assign(&(m_reserve[1]), m_reserve[0]); d.assign(m_buf, MULTIPART_BUF_SIZE - m_bufleft); m_mpp->m_length += d.size(); } else { d.assign(m_buf, MULTIPART_BUF_SIZE - m_bufleft); m_mpp->m_length += d.size(); } m_mpp->m_value_parts.push_back(std::make_pair(d, m_buf_offset)); ms_dbg_a(m_transaction, 9, "Multipart: Added data to variable: " + d); } else { ms_dbg_a(m_transaction, 1, "Multipart: unknown part type: " \ + std::to_string(m_mpp->m_type)); error->assign("Multipart: unknown part type: " \ + std::to_string(m_mpp->m_type)); return false; } /* store the reserved bytes to the multipart * context so that they don't get lost */ if (bytes_reserved) { m_reserve[0] = bytes_reserved; m_reserve[1] = localreserve[0]; m_reserve[2] = localreserve[1]; m_buf_offset += bytes_reserved; } else { m_buf_offset -= m_reserve[0]; m_reserve[0] = 0; } return true; } int Multipart::process_part_header(std::string *error, int offset) { int i, len; /* Check for nul bytes. */ len = MULTIPART_BUF_SIZE - m_bufleft; for (i = 0; i < len; i++) { if (m_buf[i] == '\0') { ms_dbg_a(m_transaction, 1, "Multipart: Nul byte in part headers."); error->assign("Multipart: Nul byte in part headers."); return false; } } i = 0; /* The buffer is data so increase the data length counter. */ m_reqbody_no_files_length += (MULTIPART_BUF_SIZE - m_bufleft); if (len > 1) { if (m_buf[len - 2] == '\r') { m_flag_crlf_line = 1; } else { m_flag_lf_line = 1; } } else { m_flag_lf_line = 1; } /* Is this an empty line? */ if (((m_buf[0] == '\r') && (m_buf[1] == '\n') && (m_buf[2] == '\0')) || ((m_buf[0] == '\n') && (m_buf[1] == '\0'))) { /* Empty line. */ std::string header_value(""); int rc; if (m_mpp->m_headers.count("Content-Disposition") == 0) { ms_dbg_a(m_transaction, 1, "Multipart: Part missing Content-Disposition header."); error->assign("Multipart: Part missing " \ "Content-Disposition header."); return false; } header_value = m_mpp->m_headers.at("Content-Disposition").second; try { rc = parse_content_disposition(header_value.c_str(), m_mpp->m_headers.at("Content-Disposition").first); } catch (...) { ms_dbg_a(m_transaction, 1, "Multipart: Unexpected error parsing Content-Disposition header."); rc = -99; } if (rc < 0) { ms_dbg_a(m_transaction, 1, "Multipart: Invalid Content-Disposition header (" + std::to_string(rc) + "): " + header_value); error->assign("Multipart: Invalid Content-Disposition header (" + std::to_string(rc) + "): " + header_value); return false; } if (m_mpp->m_name.empty()) { ms_dbg_a(m_transaction, 1, "Multipart: Content-Disposition header missing " \ "name field."); error->assign("Multipart: Content-Disposition header missing " \ "name field."); return false; } if (!m_mpp->m_filename.empty()) { /* Some parsers use crude methods to extract the name and filename * values from the C-D header. We need to check for the case where they * didn't understand C-D but we did. */ if (strstr(header_value.c_str(), "filename=") == NULL) { ms_dbg_a(m_transaction, 1, "Multipart: Invalid Content-Disposition " \ "header (filename)."); error->assign("Multipart: Invalid Content-Disposition " \ "header (filename)."); return false; } m_mpp->m_type = MULTIPART_FILE; } else { m_mpp->m_type = MULTIPART_FORMDATA; } m_mpp_state = 1; m_mpp->m_last_header_name.assign(""); } else { /* Header line. */ if (isspace(m_buf[0])) { std::string header_value; char *data; std::string new_value; /* header folding, add data to the header we are building */ m_flag_header_folding = 1; /* RFC-2557 states header folding is SP / HTAB, but PHP and * perhaps others will take any whitespace. So, we accept, * but with a flag set. */ if ((m_buf[0] != '\t') && (m_buf[0] != ' ')) { m_flag_invalid_header_folding = 1; } if (m_mpp->m_last_header_name.empty()) { /* we are not building a header at this moment */ ms_dbg_a(m_transaction, 1, "Multipart: Invalid part header (folding error)."); error->assign("Multipart: Invalid part header " \ "(folding error)."); return false; } /* locate the beginning of data */ data = m_buf; while (isspace(*data)) { /* Flag invalid header folding if an invalid RFC-2557 * character is used anywhere in the folding prefix. */ if ((*data != '\t') && (*data != ' ')) { m_flag_invalid_header_folding = 1; } data++; i++; } new_value = std::string(data); utils::string::chomp(&new_value); /* update the header value in the table */ header_value = m_mpp->m_headers.at( m_mpp->m_last_header_name).second; new_value = header_value + " " + new_value; m_mpp->m_headers.at(m_mpp->m_last_header_name).second = new_value; ms_dbg_a(m_transaction, 9, "Multipart: Continued folder header \"" \ + m_mpp->m_last_header_name + "\" with \"" \ + std::string(data) + "\""); if (new_value.size() > MULTIPART_BUF_SIZE) { ms_dbg_a(m_transaction, 1, "Multipart: Part header too long."); error->assign("Multipart: Part header too long."); return false; } } else { char *data; std::string header_value; std::string header_name; /* new header */ data = m_buf; while ((*data != ':') && (*data != '\0')) { data++; i++; } if (*data == '\0') { ms_dbg_a(m_transaction, 1, "Multipart: Invalid part header (colon missing): " \ + std::string(m_buf)); error->assign("Multipart: Invalid part header " \ "(colon missing): " + std::string(m_buf)); return false; } /* extract header name */ header_name = std::string(m_buf, data - m_buf); if (data == m_buf) { ms_dbg_a(m_transaction, 1, "Multipart: Invalid part header " \ "(header name missing)."); error->assign("Multipart: Invalid part header " \ "(header name missing)."); return false; } /* extract the value value */ data++; i++; while ((*data == '\t') || (*data == ' ')) { data++; i++; } header_value = std::string(data); utils::string::chomp(&header_value); /* error if the name already exists */ if (m_mpp->m_headers.count(header_name) > 0) { ms_dbg_a(m_transaction, 1, "Multipart: Duplicate part header: " \ + header_name + "."); return false; } m_mpp->m_last_header_name.assign(header_name); m_mpp->m_headers.emplace( std::string(header_name), std::make_pair(offset - len + i, std::string(header_value))); ms_dbg_a(m_transaction, 9, "Multipart: Added part header \"" + header_name \ + "\" \"" + header_value + "\"."); } } return true; } int Multipart::process_boundary(int last_part) { /* if there was a part being built finish it */ if (m_mpp != NULL) { /* close the temp file */ if ((m_mpp->m_type == MULTIPART_FILE) && (m_mpp->m_tmp_file) && (m_mpp->m_tmp_file->isValid())) { m_mpp->m_tmp_file->Close(); } if (m_mpp->m_type != MULTIPART_FILE) { /* now construct a single string out of the parts */ for (const auto &i : m_mpp->m_value_parts) { if (m_mpp->m_valueOffset == 0) { m_mpp->m_valueOffset = i.second; } m_mpp->m_value.append(i.first); } } if (m_mpp->m_name.empty() == false) { /* add the part to the list of parts */ m_parts.push_back(m_mpp); if (m_mpp->m_type == MULTIPART_FILE) { ms_dbg_a(m_transaction, 9, "Multipart: Added file part to the list: name \"" \ + m_mpp->m_name + "\" " "file name \"" + m_mpp->m_filename + "\" (offset " \ + std::to_string(m_mpp->m_offset) + ", length " + std::to_string(m_mpp->m_length) + ")"); } else { ms_dbg_a(m_transaction, 9, "Multipart: Added part to the list: name \"" \ + m_mpp->m_name + "\" " "(offset " + std::to_string(m_mpp->m_offset) \ + ", length " + std::to_string(m_mpp->m_length) + ")"); } } else { m_flag_invalid_part = true; ms_dbg_a(m_transaction, 3, "Multipart: Skipping invalid part (part name missing): " "(offset " + std::to_string(m_mpp->m_offset) + ", length " + std::to_string(m_mpp->m_length) + ")"); delete m_mpp; } m_mpp = NULL; } if (last_part == 0) { /* start building a new part */ m_mpp = new MultipartPart(); m_mpp_state = 0; m_reserve[0] = 0; m_reserve[1] = 0; m_reserve[2] = 0; m_reserve[3] = 0; } return 1; } /** * Finalize multipart processing. This method is invoked at the end, when it * is clear that there is no more data to be processed. */ int Multipart::multipart_complete(std::string *error) { m_transaction->m_variableMultipartUnmatchedBoundary.set( std::to_string(m_flag_unmatched_boundary), m_transaction->m_variableOffset); m_transaction->m_variableMultipartDataBefore.set( std::to_string(m_flag_data_before), m_transaction->m_variableOffset); if (m_flag_data_before) { ms_dbg_a(m_transaction, 4, "Multipart: Warning: seen data before first boundary."); } m_transaction->m_variableMultipartDataAfter.set( std::to_string(m_flag_data_after), m_transaction->m_variableOffset); if (m_flag_data_after) { ms_dbg_a(m_transaction, 4, "Multipart: Warning: seen data after last boundary."); } m_transaction->m_variableMultipartBoundaryQuoted.set( std::to_string(m_flag_boundary_quoted), m_transaction->m_variableOffset); if (m_flag_boundary_quoted) { ms_dbg_a(m_transaction, 4, "Multipart: Warning: boundary was quoted."); } m_transaction->m_variableMultipartBoundaryWhiteSpace.set( std::to_string(m_flag_boundary_whitespace), m_transaction->m_variableOffset); if (m_flag_boundary_whitespace) { ms_dbg_a(m_transaction, 4, "Multipart: Warning: boundary whitespace in C-T header."); } m_transaction->m_variableMultipartHeaderFolding.set( std::to_string(m_flag_header_folding), m_transaction->m_variableOffset); if (m_flag_header_folding) { ms_dbg_a(m_transaction, 4, "Multipart: Warning: header folding used."); } m_transaction->m_variableMultipartLFLine.set( std::to_string(m_flag_lf_line), m_transaction->m_variableOffset); m_transaction->m_variableMultipartCrlfLFLines.set( std::to_string(m_flag_crlf_line && m_flag_lf_line), m_transaction->m_variableOffset); if (m_flag_crlf_line && m_flag_lf_line) { ms_dbg_a(m_transaction, 4, "Multipart: Warning: mixed line endings used (CRLF/LF)."); } else if (m_flag_lf_line) { ms_dbg_a(m_transaction, 4, "Multipart: Warning: incorrect line endings used (LF)."); } m_transaction->m_variableMultipartMissingSemicolon.set( std::to_string(m_flag_missing_semicolon), m_transaction->m_variableOffset); if (m_flag_missing_semicolon) { ms_dbg_a(m_transaction, 4, "Multipart: Warning: missing semicolon in C-T header."); } m_transaction->m_variableMultipartInvalidQuoting.set( std::to_string(m_flag_invalid_quoting), m_transaction->m_variableOffset); if (m_flag_invalid_quoting) { ms_dbg_a(m_transaction, 4, "Multipart: Warning: invalid quoting used."); } m_transaction->m_variableMultipartInvalidPart.set( std::to_string(m_flag_invalid_part), m_transaction->m_variableOffset); if (m_flag_invalid_part) { ms_dbg_a(m_transaction, 4, "Multipart: Warning: invalid part parsing."); } m_transaction->m_variableMultipartInvalidHeaderFolding.set( std::to_string(m_flag_invalid_header_folding), m_transaction->m_variableOffset); if (m_flag_invalid_header_folding) { ms_dbg_a(m_transaction, 4, "Multipart: Warning: invalid header folding used."); } m_transaction->m_variableMultipartStrictError.set( std::to_string(m_flag_error || m_flag_boundary_quoted != 0 || m_flag_boundary_whitespace != 0 || m_flag_data_before != 0 || m_flag_data_after != 0 || m_flag_header_folding != 0 || m_flag_lf_line != 0 || m_flag_missing_semicolon != 0 || m_flag_invalid_quoting != 0 || m_flag_invalid_part != 0 || m_flag_invalid_header_folding != 0 || m_flag_file_limit_exceeded != 0), m_transaction->m_variableOffset); if ((m_seen_data != 0) && (m_is_complete == 0)) { if (m_boundary_count > 0) { /* Check if we have the final boundary (that we haven't * processed yet) in the buffer. */ if (m_buf_contains_line) { if (((unsigned int)(MULTIPART_BUF_SIZE - m_bufleft) == (4 + m_boundary.size())) && (*(m_buf) == '-') && (*(m_buf + 1) == '-') && (strncmp(m_buf + 2, m_boundary.c_str(), m_boundary.size()) == 0) && (*(m_buf + 2 + m_boundary.size()) == '-') && (*(m_buf + 2 + m_boundary.size() + 1) == '-')) { /* Looks like the final boundary - process it. */ if (process_boundary(1 /* final */) < 0) { m_flag_error = 1; return -1; } /* The payload is complete after all. */ m_is_complete = 1; } } if (m_is_complete == 0) { ms_dbg_a(m_transaction, 1, "Multipart: Final boundary missing."); error->assign("Multipart: Final boundary missing."); return false; } } else { ms_dbg_a(m_transaction, 1, "Multipart: No boundaries found in payload."); error->assign("Multipart: No boundaries found in payload."); return false; } } int file_combined_size = 0; for (MultipartPart *m : m_parts) { // FIXME: duplicate code, see transaction. // we need a helper function for this. if (m->m_name.empty()) { continue; } size_t offset = m_transaction->m_variableOffset + 1; if (m->m_type == MULTIPART_FILE) { std::string tmp_name; std::string name; if (m->m_tmp_file && !m->m_tmp_file->getFilename().empty()) { tmp_name.assign(m->m_tmp_file->getFilename()); m_transaction->m_variableFilesTmpNames.set(m->m_tmp_file->getFilename(), m->m_tmp_file->getFilename(), m->m_filenameOffset); } if (!m->m_filename.empty()) { name.assign(m->m_filename); } m_transaction->m_variableFiles.set(m->m_name, m->m_filename, m->m_filenameOffset); m_transaction->m_variableFilesNames.set(m->m_name, m->m_name, m->m_nameOffset); m_transaction->m_variableFilesSizes.set(m->m_name, std::to_string(m->m_tmp_file_size.first), m->m_tmp_file_size.second, m->m_tmp_file_size.first); m_transaction->m_variableFilesTmpContent.set(m->m_filename, m->m_value, m->m_valueOffset); file_combined_size = file_combined_size + m->m_tmp_file_size.first; m_transaction->m_variableFilesCombinedSize.set( std::to_string(file_combined_size), m->m_tmp_file_size.second, m->m_tmp_file_size.first); } else { ms_dbg_a(m_transaction, 4, "Adding request argument (BODY): name \"" + m->m_name + "\", value \"" + m->m_value + "\""); m_transaction->m_variableArgs.set(m->m_name, m->m_value, offset + m->m_valueOffset); m_transaction->m_variableArgsPost.set(m->m_name, m->m_value, offset + m->m_valueOffset); } #if 0 if (m_transaction->m_namesArgs->empty()) { m_transaction->m_namesArgs->assign(key); } else { m_transaction->m_namesArgs->assign(*m_namesArgs + " " + key); } if (m_transaction->m_namesArgsPost->empty()) { m_transaction->m_namesArgsPost->assign(key); } else { m_transaction->m_namesArgsPost->assign( *m_namesArgsPost + " " + key); } m_transaction->m_ARGScombinedSize = \ m_transaction->m_ARGScombinedSize + \ m->m_name.length() + m->m_value.length(); m_transaction->m_ARGScombinedSizeStr->assign( std::to_string(m_transaction->->m_ARGScombinedSize)); #endif } return true; } int Multipart::count_boundary_params(const std::string& str_header_value) { std::string lower = utils::string::tolower(str_header_value); const char *header_value = lower.c_str(); char *duplicate = NULL; char *s = NULL; int count = 0; if (header_value == NULL) { return -1; } duplicate = strdup(header_value); if (duplicate == NULL) { return -1; } s = duplicate; while ((s = strstr(s, "boundary")) != NULL) { s += 8; if (strchr(s, '=') != NULL) { count++; } } free(duplicate); return count; } bool Multipart::init(std::string *error) { m_bufleft = MULTIPART_BUF_SIZE; m_bufptr = m_buf; m_buf_contains_line = true; m_mpp = NULL; const char *m_boundary_tmp = NULL; if (m_header.empty()) { m_flag_error = true; ms_dbg_a(m_transaction, 4, "Multipart: Content-Type header not available."); error->assign("Multipart: Content-Type header not available."); return false; } if (m_header.size() > 1024) { m_flag_error = 1; ms_dbg_a(m_transaction, 4, "Multipart: Invalid boundary in C-T (length)."); error->assign("Multipart: Invalid boundary in C-T (length)."); return false; } if (strncasecmp(m_header.c_str(), "multipart/form-data", 19) != 0) { m_flag_error = 1; ms_dbg_a(m_transaction, 4, "Multipart: Invalid MIME type."); error->assign("Multipart: Invalid MIME type."); return false; } /* Count how many times the word "boundary" appears in the C-T header. */ if (count_boundary_params(m_header) > 1) { m_flag_error = 1; ms_dbg_a(m_transaction, 4, "Multipart: Multiple boundary parameters in C-T."); error->assign("Multipart: Multiple boundary parameters in C-T."); return false; } m_boundary_tmp = strstr(m_header.c_str(), "boundary"); if (m_boundary_tmp) { m_boundary = std::string(m_boundary_tmp); const char *p = NULL; const char *b = NULL; int seen_semicolon = 0; int len = 0; /* Check for extra characters before the boundary. */ for (p = m_header.c_str() + 19; p < m_boundary_tmp; p++) { if (!isspace(*p)) { if ((seen_semicolon == 0) && (*p == ';')) { seen_semicolon = 1; /* It is OK to have one semicolon. */ } else { m_flag_error = 1; ms_dbg_a(m_transaction, 4, "Multipart: Invalid boundary in C-T " \ "(malformed)."); error->assign("Multipart: Invalid boundary in C-T " \ "(malformed)."); return false; } } } /* Have we seen the semicolon in the header? */ if (seen_semicolon == 0) { m_flag_missing_semicolon = 1; } b = strchr(m_boundary_tmp + 8, '='); if (b == NULL) { m_flag_error = 1; ms_dbg_a(m_transaction, 4, "Multipart: Invalid boundary in C-T (malformed)."); error->assign("Multipart: Invalid boundary in C-T (malformed)."); return false; } /* Check parameter name ends well. */ if (b != (m_boundary.c_str() + 8)) { /* Check all characters between the end of the boundary * and the = character. */ for (p = m_boundary_tmp + 8; p < b; p++) { if (isspace(*p)) { /* Flag for whitespace after parameter name. */ m_flag_boundary_whitespace = 1; } else { m_flag_error = 1; ms_dbg_a(m_transaction, 4, "Multipart: Invalid boundary in C-T " \ "(parameter name)."); error->assign("Multipart: Invalid boundary in C-T " \ "(parameter name)."); return false; } } } b++; /* Go over the = character. */ len = strlen(b); /* Flag for whitespace before parameter value. */ if (isspace(*b)) { m_flag_boundary_whitespace = 1; } /* Is the boundary quoted? */ if ((len >= 2) && (*b == '"') && (*(b + len - 1) == '"')) { /* Quoted. */ m_boundary.assign(std::string(b + 1, len - 2)); if (m_boundary.empty()) { return false; } m_flag_boundary_quoted = 1; } else { /* Not quoted. */ /* Test for partial quoting. */ if ((*b == '"') || ((len >= 2) && (*(b + len - 1) == '"'))) { m_flag_error = 1; ms_dbg_a(m_transaction, 4, "Multipart: Invalid boundary in C-T (quote)."); error->assign("Multipart: Invalid boundary in C-T (quote)."); return false; } m_boundary.assign(b); if (m_boundary.empty()) { return false; } m_flag_boundary_quoted = 0; } /* Case-insensitive test for the string "boundary" in the boundary. */ if (count_boundary_params(m_boundary) != 0) { m_flag_error = 1; ms_dbg_a(m_transaction, 4, "Multipart: Invalid boundary in C-T (content)."); error->assign("Multipart: Invalid boundary in C-T (content)."); return false; } /* Validate the characters used in the boundary. */ if (boundary_characters_valid(m_boundary.c_str()) != 1) { m_flag_error = 1; ms_dbg_a(m_transaction, 4, "Multipart: Invalid boundary in C-T (characters)."); error->assign("Multipart: Invalid boundary in C-T (characters)."); return false; } ms_dbg_a(m_transaction, 9, "Multipart: Boundary" + (m_flag_boundary_quoted ? std::string(" (quoted)") : std::string("")) + std::string(": ") + m_boundary); if (m_boundary.size() == 0) { m_flag_error = 1; ms_dbg_a(m_transaction, 4, "Multipart: Invalid boundary in C-T (empty)."); error->assign("Multipart: Invalid boundary in C-T (empty)."); return false; } } else { /* Could not find boundary in the C-T header. */ m_flag_error = 1; /* Test for case-insensitive boundary. Allowed by the RFC but * highly unusual. */ if (count_boundary_params(m_header) > 0) { ms_dbg_a(m_transaction, 4, "Multipart: Invalid boundary in C-T (case sensitivity)."); error->assign("Multipart: Invalid boundary in C-T " \ "(case sensitivity)."); return false; } ms_dbg_a(m_transaction, 4, "Multipart: Boundary not found in C-T."); error->assign("Multipart: Boundary not found in C-T."); return false; } return 1; } /* * Assuming that all data is on data. We are not processing chunks. * */ bool Multipart::process(const std::string& data, std::string *error, int offset) { const char *inptr = data.c_str(); unsigned int inleft = data.size(); size_t z = 0; if (data.size() == 0) return true; m_seen_data = true; if (m_is_complete) { m_flag_data_before = true; ms_dbg_a(m_transaction, 4, "Multipart: Ignoring data after last boundary (received " \ + std::to_string(data.size()) + " bytes)"); return true; } if (m_bufleft == 0) { m_flag_error = 1; ms_dbg_a(m_transaction, 4, "Multipart: Internal error in process_chunk: no space left " \ "in the buffer"); return false; } /* here we loop through the available data, one byte at a time */ while (inleft > 0) { char c = *inptr; int process_buffer = 0; z++; if ((c == '\r') && (m_bufleft == 1)) { /* we don't want to take \r as the last byte in the buffer */ process_buffer = 1; } else { inptr++; inleft = inleft - 1; *(m_bufptr) = c; m_bufptr++; m_bufleft--; } /* until we either reach the end of the line * or the end of our internal buffer */ if ((c == '\n') || (m_bufleft == 0) || (process_buffer)) { int processed_as_boundary = 0; *(m_bufptr) = 0; /* Do we have something that looks like a boundary? */ if (m_buf_contains_line && (strlen(m_buf) > 3) && (*(m_buf) == '-') && (*(m_buf + 1) == '-')) { /* Does it match our boundary? */ if ((strlen(m_buf) >= m_boundary.size() + 2) && (strncmp(m_buf + 2, m_boundary.c_str(), m_boundary.size()) == 0)) { char *boundary_end = m_buf + 2 + m_boundary.size(); /* if it match, AND there was a matched boundary at least, set the m_flag_unmatched_boundary flag to 2 this indicates that there were an opened boundary, which matches the reference, and here is the final boundary. The flag will differ from 0, so the previous rules ("!@eq 0") will catch all "errors", without any modification, but we can use the new, permission mode with "@eq 1" */ if (m_boundary_count > 0) { m_flag_unmatched_boundary = 2; } int is_final = 0; /* Is this the final boundary? */ if ((*boundary_end == '-') && (*(boundary_end + 1)== '-')) { is_final = 1; boundary_end += 2; if (m_is_complete != 0) { m_flag_error = 1; ms_dbg_a(m_transaction, 4, "Multipart: Invalid boundary " \ "(final duplicate)."); error->assign("Multipart: Invalid boundary " \ "(final duplicate)."); return false; } } /* Allow for CRLF and LF line endings. */ if (((*boundary_end == '\r') && (*(boundary_end + 1) == '\n') && (*(boundary_end + 2) == '\0')) || ((*boundary_end == '\n') && (*(boundary_end + 1) == '\0'))) { if (*boundary_end == '\n') { m_flag_lf_line = 1; } else { m_flag_crlf_line = 1; } if (process_boundary((is_final ? 1 : 0)) < 0) { m_flag_error = true; return false; } if (is_final) { m_is_complete = 1; } processed_as_boundary = 1; m_boundary_count++; } else { /* error */ m_flag_error = 1; ms_dbg_a(m_transaction, 4, "Multipart: Invalid boundary: " \ + std::string(m_buf)); error->assign("Multipart: Invalid boundary: " \ + std::string(m_buf)); return false; } } else { /* It looks like a boundary but */ /* we couldn't match it. */ char *p = NULL; /* Check if an attempt to use quotes around the * boundary was made. */ if ((m_flag_boundary_quoted) && (strlen(m_buf) >= m_boundary.size() + 3) && (*(m_buf + 2) == '"') && (strncmp(m_buf + 3, m_boundary.c_str(), m_boundary.size()) == 0)) { m_flag_error = 1; ms_dbg_a(m_transaction, 4, "Multipart: Invalid boundary (quotes)."); error->assign("Multipart: Invalid boundary (quotes)."); return false; } /* Check the beginning of the boundary for whitespace. */ p = m_buf + 2; while (isspace(*p)) { p++; } if ((p != m_buf + 2) && (strncmp(p, m_boundary.c_str(), m_boundary.size()) == 0)) { /* Found whitespace in front of a boundary. */ m_flag_error = 1; ms_dbg_a(m_transaction, 4, "Multipart: Invalid boundary (whitespace)."); error->assign("Multipart: Invalid boundary " \ "(whitespace)."); return false; } m_flag_unmatched_boundary = 1; } } else { /* We do not think the buffer contains a boundary. */ /* Look into the buffer to see if there's anything * there that resembles a boundary. */ if (m_buf_contains_line) { int i, len = (MULTIPART_BUF_SIZE - m_bufleft); char *p = m_buf; for (i = 0; i < len; i++) { if ((p[i] == '-') && (i + 1 < len) && (p[i + 1] == '-')) { if (strncmp(p + i + 2, m_boundary.c_str(), m_boundary.size()) == 0) { m_flag_unmatched_boundary = 1; break; } } } } } /* Process as data if it was not a boundary. */ if (processed_as_boundary == 0) { if (m_mpp == NULL) { m_flag_data_before = 1; ms_dbg_a(m_transaction, 4, "Multipart: Ignoring data before first " \ "boundary."); } else { if (m_mpp_state == 0) { if ((m_bufleft == 0) || (process_buffer)) { /* part header lines must be shorter than * MULTIPART_BUF_SIZE bytes */ m_flag_error = 1; ms_dbg_a(m_transaction, 4, "Multipart: Part header line over " \ + std::to_string(MULTIPART_BUF_SIZE) \ + " bytes long"); error->assign("Multipart: Part header line over " \ + std::to_string(MULTIPART_BUF_SIZE) \ + " bytes long"); return false; } if (process_part_header(error, offset + z) < 0) { m_flag_error = 1; return false; } } else { if (process_part_data(error, offset + z) < 0) { m_flag_error = 1; return false; } } } } /* Update the offset of the data we are about * to process. This is to allow us to know the * offsets of individual files and variables. */ m_buf_offset += (MULTIPART_BUF_SIZE - m_bufleft); /* reset the pointer to the beginning of the buffer * and continue to accept input data */ m_bufptr = m_buf; m_bufleft = MULTIPART_BUF_SIZE; m_buf_contains_line = (c == 0x0a) ? 1 : 0; } if ((m_is_complete) && (inleft != 0)) { m_flag_data_after = 1; ms_dbg_a(m_transaction, 4, "Multipart: Ignoring data after last boundary (" \ + std::to_string(inleft) + "bytes left)"); return true; } } return true; } } // namespace RequestBodyProcessor } // namespace modsecurity modsecurity-v3.0.6/src/request_body_processor/xml.h0000664000175000017500000000316714146026157023760 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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. * */ #ifdef WITH_LIBXML2 #include #include #endif #include #include #include "modsecurity/transaction.h" #include "modsecurity/rules_set.h" #ifndef SRC_REQUEST_BODY_PROCESSOR_XML_H_ #define SRC_REQUEST_BODY_PROCESSOR_XML_H_ namespace modsecurity { namespace RequestBodyProcessor { #ifdef WITH_LIBXML2 struct xml_data { xmlSAXHandler *sax_handler; xmlParserCtxtPtr parsing_ctx; xmlDocPtr doc; unsigned int well_formed; }; typedef struct xml_data xml_data; class XML { public: explicit XML(Transaction *transaction); ~XML(); bool init(); bool processChunk(const char *buf, unsigned int size, std::string *err); bool complete(std::string *err); static xmlParserInputBufferPtr unloadExternalEntity(const char *URI, xmlCharEncoding enc); static void null_error(void *ctx, const char *msg, ...) { } xml_data m_data; private: Transaction *m_transaction; std::string m_header; }; #endif } // namespace RequestBodyProcessor } // namespace modsecurity #endif // SRC_REQUEST_BODY_PROCESSOR_XML_H_ modsecurity-v3.0.6/src/audit_log/0000775000175000017500000000000014146026763020146 5ustar mhsvierulamhsvierulamodsecurity-v3.0.6/src/audit_log/writer/0000775000175000017500000000000014146026763021462 5ustar mhsvierulamhsvierulamodsecurity-v3.0.6/src/audit_log/writer/https.cc0000664000175000017500000000275714146026157023143 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "src/audit_log/writer/https.h" #include #include #include #include #include #include #include #include #include "modsecurity/rules_set.h" #include "modsecurity/audit_log.h" #include "modsecurity/transaction.h" #include "src/utils/md5.h" #include "src/utils/https_client.h" namespace modsecurity { namespace audit_log { namespace writer { Https::~Https() { } bool Https::init(std::string *error) { return true; } bool Https::write(Transaction *transaction, int parts, std::string *error) { Utils::HttpsClient m_http_client; ms_dbg_a(transaction, 7, "Sending logs to: " + m_audit->m_path1); std::string log = transaction->toJSON(parts); m_http_client.setRequestType("application/json"); m_http_client.setRequestBody(log); m_http_client.download(m_audit->m_path1); return true; } } // namespace writer } // namespace audit_log } // namespace modsecurity modsecurity-v3.0.6/src/audit_log/writer/writer.h0000664000175000017500000000266514146026157023155 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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. * */ #ifndef SRC_AUDIT_LOG_WRITER_WRITER_H_ #define SRC_AUDIT_LOG_WRITER_WRITER_H_ #include #include #include #include #include #include #include #include #include "modsecurity/transaction.h" #include "modsecurity/audit_log.h" #define SERIAL_AUDIT_LOG_BOUNDARY_LENGTH 8 namespace modsecurity { namespace audit_log { namespace writer { /** @ingroup ModSecurity_CPP_API */ class Writer { public: explicit Writer(AuditLog *audit) : m_audit(audit) { } virtual ~Writer() { } virtual bool init(std::string *error) = 0; virtual bool write(Transaction *transaction, int parts, std::string *error) = 0; static void generateBoundary(std::string *boundary); protected: AuditLog *m_audit; }; } // namespace writer } // namespace audit_log } // namespace modsecurity #endif // SRC_AUDIT_LOG_WRITER_WRITER_H_ modsecurity-v3.0.6/src/audit_log/writer/writer.cc0000664000175000017500000000211214146026157023276 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "src/audit_log/writer/writer.h" #include #include "modsecurity/audit_log.h" namespace modsecurity { namespace audit_log { namespace writer { void Writer::generateBoundary(std::string *boundary) { static const char alphanum[] = "0123456789" "ABCDEFGHIJKLMNOPQRSTUVWXYZ" "abcdefghijklmnopqrstuvwxyz"; for (int i = 0; i < SERIAL_AUDIT_LOG_BOUNDARY_LENGTH; ++i) { boundary->append(1, alphanum[rand() % (sizeof(alphanum) - 1)]); } } } // namespace writer } // namespace audit_log } // namespace modsecurity modsecurity-v3.0.6/src/audit_log/writer/parallel.cc0000664000175000017500000001253514146026157023570 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "src/audit_log/writer/parallel.h" #include #include #include #include #include #include #include #include #include #include #include "modsecurity/audit_log.h" #include "modsecurity/transaction.h" #include "src/utils/system.h" #include "src/utils/md5.h" namespace modsecurity { namespace audit_log { namespace writer { Parallel::~Parallel() { utils::SharedFiles::getInstance().close(m_audit->m_path1); utils::SharedFiles::getInstance().close(m_audit->m_path2); } inline std::string Parallel::logFilePath(time_t *t, int part) { struct tm timeinfo; char tstr[300]; std::string name(""); localtime_r(t, &timeinfo); if (part & YearMonthDayDirectory) { memset(tstr, '\0', 300); strftime(tstr, 299, "/%Y%m%d", &timeinfo); name = tstr; } if (part & YearMonthDayAndTimeDirectory) { memset(tstr, '\0', 300); strftime(tstr, 299, "/%Y%m%d-%H%M", &timeinfo); name = name + tstr; } if (part & YearMonthDayAndTimeFileName) { memset(tstr, '\0', 300); strftime(tstr, 299, "/%Y%m%d-%H%M%S", &timeinfo); name = name + tstr; } return name; } bool Parallel::init(std::string *error) { bool ret; if (!m_audit->m_path1.empty()) { ret = utils::SharedFiles::getInstance().open(m_audit->m_path1, error); if (!ret) { return false; } } if (!m_audit->m_path2.empty()) { ret = utils::SharedFiles::getInstance().open(m_audit->m_path2, error); if (!ret) { return false; } } if (m_audit->m_storage_dir.empty() == false) { if (utils::createDir(m_audit->m_storage_dir, m_audit->getDirectoryPermission(), error) == false) { return false; } } return true; } bool Parallel::write(Transaction *transaction, int parts, std::string *error) { int fd; std::string log; std::string fileName = logFilePath(&transaction->m_timeStamp, YearMonthDayDirectory | YearMonthDayAndTimeDirectory | YearMonthDayAndTimeFileName); bool ret; if (transaction->m_rules->m_auditLog->m_format == audit_log::AuditLog::JSONAuditLogFormat) { log = transaction->toJSON(parts); } else { std::string boundary; generateBoundary(&boundary); log = transaction->toOldAuditLogFormat(parts, "-" + boundary + "--"); } std::string logPath = m_audit->m_storage_dir; fileName = logPath + fileName + "-" + *transaction->m_id.get(); if (logPath.empty()) { error->assign("Log path is not valid."); return false; } ret = utils::createDir((logPath + logFilePath(&transaction->m_timeStamp, YearMonthDayDirectory)).c_str(), m_audit->getDirectoryPermission(), error); if (ret == false) { return false; } ret = utils::createDir((logPath + logFilePath(&transaction->m_timeStamp, YearMonthDayDirectory | YearMonthDayAndTimeDirectory)).c_str(), m_audit->getDirectoryPermission(), error); if (ret == false) { return false; } fd = open(fileName.c_str(), O_CREAT | O_WRONLY | O_APPEND, m_audit->getFilePermission()); if (fd < 0) { error->assign("Not able to open: " + fileName + ". " \ + strerror(errno)); return false; } close(fd); std::ofstream myfile; std::string a(fileName.c_str()); myfile.open(a, std::ofstream::out | std::ofstream::app); myfile << log; myfile.close(); if (m_audit->m_path1.empty() == false && m_audit->m_path2.empty() == false) { std::string msg = transaction->toOldAuditLogFormatIndex(fileName, log.length(), Utils::Md5::hexdigest(log)); ret = utils::SharedFiles::getInstance().write(m_audit->m_path2, msg, error); if (ret == false) { return false; } } if (m_audit->m_path1.empty() == false && m_audit->m_path2.empty() == true) { std::string msg = transaction->toOldAuditLogFormatIndex(fileName, log.length(), Utils::Md5::hexdigest(log)); ret = utils::SharedFiles::getInstance().write(m_audit->m_path1, msg, error); if (ret == false) { return false; } } if (m_audit->m_path1.empty() == true && m_audit->m_path2.empty() == false) { std::string msg = transaction->toOldAuditLogFormatIndex(fileName, log.length(), Utils::Md5::hexdigest(log)); ret = utils::SharedFiles::getInstance().write(m_audit->m_path2, msg, error); if (ret == false) { return false; } } return true; } } // namespace writer } // namespace audit_log } // namespace modsecurity modsecurity-v3.0.6/src/audit_log/writer/https.h0000664000175000017500000000243514146026157022776 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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. * */ #ifdef __cplusplus #include #include #include #endif #ifndef SRC_AUDIT_LOG_WRITER_HTTPS_H_ #define SRC_AUDIT_LOG_WRITER_HTTPS_H_ #include "src/audit_log/writer/writer.h" #include "modsecurity/transaction.h" #ifdef __cplusplus namespace modsecurity { namespace audit_log { namespace writer { /** @ingroup ModSecurity_CPP_API */ class Https : public Writer { public: explicit Https(audit_log::AuditLog *audit) : audit_log::writer::Writer(audit) { } ~Https() override; bool init(std::string *error) override; bool write(Transaction *transaction, int parts, std::string *error) override; }; } // namespace writer } // namespace audit_log } // namespace modsecurity #endif #endif // SRC_AUDIT_LOG_WRITER_HTTPS_H_ modsecurity-v3.0.6/src/audit_log/writer/serial.h0000664000175000017500000000261714146026157023115 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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. * */ #ifdef __cplusplus #include #include #include #endif #ifndef SRC_AUDIT_LOG_WRITER_SERIAL_H_ #define SRC_AUDIT_LOG_WRITER_SERIAL_H_ #include "src/audit_log/writer/writer.h" #include "src/utils/shared_files.h" #include "modsecurity/transaction.h" #include "modsecurity/audit_log.h" #include "modsecurity/rules_set.h" #ifdef __cplusplus namespace modsecurity { namespace audit_log { namespace writer { /** @ingroup ModSecurity_CPP_API */ class Serial : public Writer { public: explicit Serial(audit_log::AuditLog *audit) : audit_log::writer::Writer(audit) { } ~Serial() override; bool init(std::string *error) override; bool write(Transaction *transaction, int parts, std::string *error) override; }; } // namespace writer } // namespace audit_log } // namespace modsecurity #endif #endif // SRC_AUDIT_LOG_WRITER_SERIAL_H_ modsecurity-v3.0.6/src/audit_log/writer/parallel.h0000664000175000017500000000411214146026157023422 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #ifndef SRC_AUDIT_LOG_WRITER_PARALLEL_H_ #define SRC_AUDIT_LOG_WRITER_PARALLEL_H_ #include "src/audit_log/writer/writer.h" #include "modsecurity/transaction.h" #include "modsecurity/audit_log.h" #include "src/utils/shared_files.h" #include "modsecurity/rules_set.h" #ifdef __cplusplus namespace modsecurity { namespace audit_log { namespace writer { /** @ingroup ModSecurity_CPP_API */ class Parallel : public Writer { public: explicit Parallel(AuditLog *audit) : audit_log::writer::Writer(audit) { } ~Parallel() override; bool init(std::string *error) override; bool write(Transaction *transaction, int parts, std::string *error) override; /** * * Audit log file is saved into a directory structure. This directory * structure is based on the timestamp of the transaction creation, at * the exact moment that ModSecurity be aware of a particular * request/transaction. * The expect fromat is: * * [...]/YearMonthDay/YearMonthDayAndTime/YearMonthDayAndTime-RequestId * * Example: * * /20150710/20150710-1353/20150710-135353-143654723362.584244 * * This enumeration describes the subpaths of this structure. * */ enum AuditLogFilePath { YearMonthDayDirectory = 2, YearMonthDayAndTimeDirectory = 4, YearMonthDayAndTimeFileName = 8, }; static inline std::string logFilePath(time_t *t, int part); }; } // namespace writer } // namespace audit_log } // namespace modsecurity #endif #endif // SRC_AUDIT_LOG_WRITER_PARALLEL_H_ modsecurity-v3.0.6/src/audit_log/writer/serial.cc0000664000175000017500000000274014146026157023250 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "src/audit_log/writer/serial.h" #include "modsecurity/audit_log.h" namespace modsecurity { namespace audit_log { namespace writer { // static std::mutex serialLoggingMutex; Serial::~Serial() { utils::SharedFiles::getInstance().close(m_audit->m_path1); } bool Serial::init(std::string *error) { return utils::SharedFiles::getInstance().open(m_audit->m_path1, error); } bool Serial::write(Transaction *transaction, int parts, std::string *error) { std::string msg; if (transaction->m_rules->m_auditLog->m_format == audit_log::AuditLog::JSONAuditLogFormat) { msg = transaction->toJSON(parts); } else { std::string boundary; generateBoundary(&boundary); msg = transaction->toOldAuditLogFormat(parts, "-" + boundary + "--"); } return utils::SharedFiles::getInstance().write(m_audit->m_path1, msg, error); } } // namespace writer } // namespace audit_log } // namespace modsecurity modsecurity-v3.0.6/src/audit_log/audit_log.cc0000664000175000017500000002211414146026157022421 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "modsecurity/audit_log.h" #include #include #include #include #include "modsecurity/rule_message.h" #include "src/audit_log/writer/https.h" #include "src/audit_log/writer/parallel.h" #include "src/audit_log/writer/serial.h" #include "src/audit_log/writer/writer.h" #include "src/utils/regex.h" #define PARTS_CONSTAINS(a, c) \ if (new_parts.find(toupper(a)) != std::string::npos \ || new_parts.find(tolower(a)) != std::string::npos) { \ parts = parts | c; \ } #define PARTS_CONSTAINS_REM(a, c) \ if (new_parts.find(toupper(a)) != std::string::npos \ || new_parts.find(tolower(a)) != std::string::npos) { \ parts = parts & ~c; \ } #define AL_MERGE_STRING_CONF(a, c) \ if (a.empty() == false) { \ c = a; \ } namespace modsecurity { namespace audit_log { AuditLog::AuditLog() : m_path1(""), m_path2(""), m_storage_dir(""), m_format(NotSetAuditLogFormat), m_parts(-1), m_filePermission(-1), m_directoryPermission(-1), m_status(NotSetLogStatus), m_type(NotSetAuditLogType), m_relevant(""), m_writer(NULL) { } AuditLog::~AuditLog() { if (m_writer) { delete m_writer; m_writer = NULL; } } bool AuditLog::setStorageDirMode(int permission) { this->m_directoryPermission = permission; return true; } bool AuditLog::setFileMode(int permission) { this->m_filePermission = permission; return true; } int AuditLog::getFilePermission() const { if (m_filePermission == -1) { return m_defaultFilePermission; } return m_filePermission; } int AuditLog::getDirectoryPermission() const { if (m_directoryPermission == -1) { return m_defaultDirectoryPermission; } return m_directoryPermission; } bool AuditLog::setStatus(AuditLogStatus status) { this->m_status = status; return true; } bool AuditLog::setRelevantStatus(const std::basic_string& status) { this->m_relevant = std::string(status); return true; } bool AuditLog::setStorageDir(const std::basic_string& path) { this->m_storage_dir = path; return true; } bool AuditLog::setFilePath1(const std::basic_string& path) { this->m_path1 = path; return true; } bool AuditLog::setFilePath2(const std::basic_string& path) { this->m_path2 = path; return true; } bool AuditLog::setFormat(AuditLogFormat fmt) { this->m_format = fmt; return true; } int AuditLog::addParts(int parts, const std::string& new_parts) { PARTS_CONSTAINS('A', AAuditLogPart) PARTS_CONSTAINS('B', BAuditLogPart) PARTS_CONSTAINS('C', CAuditLogPart) PARTS_CONSTAINS('D', DAuditLogPart) PARTS_CONSTAINS('E', EAuditLogPart) PARTS_CONSTAINS('F', FAuditLogPart) PARTS_CONSTAINS('G', GAuditLogPart) PARTS_CONSTAINS('H', HAuditLogPart) PARTS_CONSTAINS('I', IAuditLogPart) PARTS_CONSTAINS('J', JAuditLogPart) PARTS_CONSTAINS('K', KAuditLogPart) PARTS_CONSTAINS('Z', ZAuditLogPart) return parts; } int AuditLog::removeParts(int parts, const std::string& new_parts) { PARTS_CONSTAINS_REM('A', AAuditLogPart) PARTS_CONSTAINS_REM('B', BAuditLogPart) PARTS_CONSTAINS_REM('C', CAuditLogPart) PARTS_CONSTAINS_REM('D', DAuditLogPart) PARTS_CONSTAINS_REM('E', EAuditLogPart) PARTS_CONSTAINS_REM('F', FAuditLogPart) PARTS_CONSTAINS_REM('G', GAuditLogPart) PARTS_CONSTAINS_REM('H', HAuditLogPart) PARTS_CONSTAINS_REM('I', IAuditLogPart) PARTS_CONSTAINS_REM('J', JAuditLogPart) PARTS_CONSTAINS_REM('K', KAuditLogPart) PARTS_CONSTAINS_REM('Z', ZAuditLogPart) return parts; } bool AuditLog::setParts(const std::basic_string& new_parts) { int parts = 0; PARTS_CONSTAINS('A', AAuditLogPart) PARTS_CONSTAINS('B', BAuditLogPart) PARTS_CONSTAINS('C', CAuditLogPart) PARTS_CONSTAINS('D', DAuditLogPart) PARTS_CONSTAINS('E', EAuditLogPart) PARTS_CONSTAINS('F', FAuditLogPart) PARTS_CONSTAINS('G', GAuditLogPart) PARTS_CONSTAINS('H', HAuditLogPart) PARTS_CONSTAINS('I', IAuditLogPart) PARTS_CONSTAINS('J', JAuditLogPart) PARTS_CONSTAINS('K', KAuditLogPart) PARTS_CONSTAINS('Z', ZAuditLogPart) m_parts = parts; return true; } int AuditLog::getParts() const { if (m_parts == -1) { return m_defaultParts; } return m_parts; } bool AuditLog::setType(AuditLogType audit_type) { this->m_type = audit_type; return true; } bool AuditLog::init(std::string *error) { audit_log::writer::Writer *tmp_writer; if (m_status == OffAuditLogStatus || m_status == NotSetLogStatus) { if (m_writer) { delete m_writer; m_writer = NULL; } return true; } if (m_type == ParallelAuditLogType) { tmp_writer = new audit_log::writer::Parallel(this); } else if (m_type == HttpsAuditLogType) { tmp_writer = new audit_log::writer::Https(this); } else { /* * if (m_type == SerialAuditLogType * || m_type == NotSetAuditLogType) * */ tmp_writer = new audit_log::writer::Serial(this); } if (tmp_writer == NULL) { error->assign("Writer memory alloc failed!"); return false; } if (tmp_writer->init(error) == false) { delete tmp_writer; return false; } /* Sanity check */ if (m_status == RelevantOnlyAuditLogStatus) { if (m_relevant.empty()) { /* error->assign("m_relevant cannot be null while status is set to " \ "RelevantOnly"); return false; */ // FIXME: this should be a warning. There is not point to // have the logs on relevant only if nothing is relevant. // // Not returning an error to keep the compatibility with v2. } } if (m_writer) { delete m_writer; } m_writer = tmp_writer; return true; } bool AuditLog::isRelevant(int status) { std::string sstatus = std::to_string(status); if (m_relevant.empty()) { return false; } if (sstatus.empty()) { return true; } return Utils::regex_search(sstatus, Utils::Regex(m_relevant)) != 0; } bool AuditLog::saveIfRelevant(Transaction *transaction) { return saveIfRelevant(transaction, -1); } bool AuditLog::saveIfRelevant(Transaction *transaction, int parts) { bool saveAnyway = false; if (m_status == OffAuditLogStatus || m_status == NotSetLogStatus) { ms_dbg_a(transaction, 5, "Audit log engine was not set."); return true; } for (RuleMessage &i : transaction->m_rulesMessages) { if (i.m_noAuditLog == false) { saveAnyway = true; break; } } if ((m_status == RelevantOnlyAuditLogStatus && this->isRelevant(transaction->m_httpCodeReturned) == false) && saveAnyway == false) { ms_dbg_a(transaction, 9, "Return code `" + std::to_string(transaction->m_httpCodeReturned) + "'" \ " is not interesting to audit logs, relevant code(s): `" + m_relevant + "'."); return false; } if (parts == -1) { parts = m_parts; } ms_dbg_a(transaction, 5, "Saving this request as part " \ "of the audit logs."); if (m_writer == NULL) { ms_dbg_a(transaction, 1, "Internal error, audit log writer is null"); } else { std::string error; bool a = m_writer->write(transaction, parts, &error); if (a == false) { ms_dbg_a(transaction, 1, "Cannot save the audit log: " + error); return false; } } return true; } bool AuditLog::close() { return true; } bool AuditLog::merge(AuditLog *from, std::string *error) { AL_MERGE_STRING_CONF(from->m_path1, m_path1); AL_MERGE_STRING_CONF(from->m_path2, m_path2); AL_MERGE_STRING_CONF(from->m_storage_dir, m_storage_dir); AL_MERGE_STRING_CONF(from->m_relevant, m_relevant); if (from->m_filePermission != -1) { m_filePermission = from->m_filePermission; } if (from->m_directoryPermission != -1) { m_directoryPermission = from->m_directoryPermission; } if (from->m_type != NotSetAuditLogType) { m_type = from->m_type; } if (from->m_status != NotSetLogStatus) { m_status = from->m_status; } if (from->m_parts != -1) { m_parts = from->m_parts; } if (from->m_format != NotSetAuditLogFormat) { m_format = from->m_format; } return init(error); } } // namespace audit_log } // namespace modsecurity modsecurity-v3.0.6/src/collection/0000775000175000017500000000000014146026763020332 5ustar mhsvierulamhsvierulamodsecurity-v3.0.6/src/collection/backend/0000775000175000017500000000000014146026763021721 5ustar mhsvierulamhsvierulamodsecurity-v3.0.6/src/collection/backend/in_memory-per_process.h0000664000175000017500000000601014146026157026404 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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. * */ #ifdef __cplusplus #include #include #include #include #include #include #include #endif #include "modsecurity/variable_value.h" #include "modsecurity/collection/collection.h" #include "src/variables/variable.h" #ifndef SRC_COLLECTION_BACKEND_IN_MEMORY_PER_PROCESS_H_ #define SRC_COLLECTION_BACKEND_IN_MEMORY_PER_PROCESS_H_ #ifdef __cplusplus namespace modsecurity { namespace collection { namespace backend { /* * FIXME: * * This was an example grabbed from: * http://stackoverflow.com/questions/8627698/case-insensitive-stl-containers-e-g-stdunordered-set * * We have to have a better hash function, maybe based on the std::hash. * */ struct MyEqual { bool operator()(const std::string& Left, const std::string& Right) const { return Left.size() == Right.size() && std::equal(Left.begin(), Left.end(), Right.begin(), [](char a, char b) { return tolower(a) == tolower(b); }); } }; struct MyHash{ size_t operator()(const std::string& Keyval) const { // You might need a better hash function than this size_t h = 0; std::for_each(Keyval.begin(), Keyval.end(), [&](char c) { h += tolower(c); }); return h; } }; class InMemoryPerProcess : public std::unordered_multimap*/MyHash, MyEqual>, public Collection { public: explicit InMemoryPerProcess(const std::string &name); ~InMemoryPerProcess(); void store(std::string key, std::string value) override; bool storeOrUpdateFirst(const std::string &key, const std::string &value) override; bool updateFirst(const std::string &key, const std::string &value) override; void del(const std::string& key) override; std::unique_ptr resolveFirst(const std::string& var) override; void resolveSingleMatch(const std::string& var, std::vector *l) override; void resolveMultiMatches(const std::string& var, std::vector *l, variables::KeyExclusions &ke) override; void resolveRegularExpression(const std::string& var, std::vector *l, variables::KeyExclusions &ke) override; private: pthread_mutex_t m_lock; }; } // namespace backend } // namespace collection } // namespace modsecurity #endif #endif // SRC_COLLECTION_BACKEND_IN_MEMORY_PER_PROCESS_H_ modsecurity-v3.0.6/src/collection/backend/lmdb.cc0000664000175000017500000003554714146026157023161 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "src/collection/backend/lmdb.h" #include #include #include #include #include "modsecurity/variable_value.h" #include "src/utils/regex.h" #include "src/variables/variable.h" #undef LMDB_STDOUT_COUT namespace modsecurity { namespace collection { namespace backend { #ifdef WITH_LMDB LMDB::LMDB(std::string name) : Collection(name), m_env(NULL) { mdb_env_create(&m_env); mdb_env_open(m_env, "./modsec-shared-collections", MDB_WRITEMAP | MDB_NOSUBDIR, 0664); } LMDB::~LMDB() { mdb_env_close(m_env); } void LMDB::string2val(const std::string& str, MDB_val *val) { val->mv_size = sizeof(char)*(str.size()); val->mv_data = const_cast(str.c_str()); } void LMDB::lmdb_debug(int rc, std::string op, std::string scope) { #ifndef LMDB_STDOUT_COUT return; #else if (rc == 0) { return; } if (op == "txn") { std::cout << scope << ", LMDB failure while starting txn: "; switch (rc) { case MDB_PANIC: std::cout << "panic: a fatal error occurred earlier "; std::cout << "and the environment must be shut down."; break; case MDB_MAP_RESIZED: std::cout << "map resized: another process wrote data "; std::cout << "beyond this MDB_env's mapsize and this "; std::cout << "environment's map must be resized as well. "; std::cout << "See mdb_env_set_mapsize()."; break; case MDB_READERS_FULL: std::cout << "max readers: a read-only transaction was "; std::cout << "requested and the reader lock table is full. "; std::cout << "See mdb_env_set_maxreaders()."; break; case ENOMEM: std::cout << "out of memory."; break; default: std::cout << "not sure what is wrong, code: " + std::to_string(rc); break; } std::cout << std::endl; } else if (op == "dbi") { std::cout << scope << ", LMDB failure while opening dbi: "; switch (rc) { case MDB_NOTFOUND: std::cout << "not found: the specified database doesn't "; std::cout << "exist in the environment and MDB_CREATE was "; std::cout << "not specified."; break; case MDB_DBS_FULL: std::cout << "full: too many databases have been opened. See "; std::cout << "mdb_env_set_maxdbs()."; break; default: std::cout << "not sure what is wrong."; break; } std::cout << std::endl; } else if (op == "get") { std::cout << scope << ", LMDB failure while getting the key: "; switch (rc) { case MDB_NOTFOUND: std::cout << "not found: the key was not in the database."; break; case EINVAL: std::cout << "an invalid parameter was specified."; break; default: std::cout << "not sure what is wrong."; break; } std::cout << std::endl; } else if (op == "del") { std::cout << scope << ", delete procedure failed: "; switch (rc) { case EACCES: std::cout << "an attempt was made to write in a "; std::cout << "read-only transaction."; break; case EINVAL: std::cout << "an invalid parameter was specified."; break; default: std::cout << "not sure what is wrong. Code: " + std::to_string(rc); break; } std::cout << std::endl; } else if (op == "commit") { std::cout << scope << ", commit procedure failed: "; switch (rc) { case EINVAL: std::cout << "an invalid parameter was specified."; break; case ENOSPC: std::cout << "no more disk space."; break; case EIO: std::cout << "a low-level I/O error occurred while writing."; break; case ENOMEM: std::cout << "out of memory."; break; default: std::cout << "not sure what is wrong. Code: " + std::to_string(rc); break; } std::cout << std::endl; } #endif } std::unique_ptr LMDB::resolveFirst(const std::string& var) { int rc; MDB_val mdb_key; MDB_val mdb_value; MDB_val mdb_value_ret; std::unique_ptr ret = NULL; MDB_txn *txn = NULL; MDB_dbi dbi; string2val(var, &mdb_key); rc = mdb_txn_begin(m_env, NULL, 0, &txn); lmdb_debug(rc, "txn", "resolveFirst"); if (rc != 0) { goto end_txn; } rc = mdb_dbi_open(txn, NULL, MDB_CREATE | MDB_DUPSORT, &dbi); lmdb_debug(rc, "dbi", "resolveFirst"); if (rc != 0) { goto end_dbi; } rc = mdb_get(txn, dbi, &mdb_key, &mdb_value_ret); lmdb_debug(rc, "get", "resolveFirst"); if (rc != 0) { goto end_get; } ret = std::unique_ptr(new std::string( reinterpret_cast(mdb_value_ret.mv_data), mdb_value_ret.mv_size)); end_get: mdb_dbi_close(m_env, dbi); end_dbi: mdb_txn_abort(txn); end_txn: return ret; } bool LMDB::storeOrUpdateFirst(const std::string &key, const std::string &value) { int rc; MDB_txn *txn; MDB_dbi dbi; MDB_val mdb_key; MDB_val mdb_value; MDB_val mdb_value_ret; string2val(key, &mdb_key); string2val(value, &mdb_value); rc = mdb_txn_begin(m_env, NULL, 0, &txn); lmdb_debug(rc, "txn", "storeOrUpdateFirst"); if (rc != 0) { goto end_txn; } rc = mdb_dbi_open(txn, NULL, MDB_CREATE | MDB_DUPSORT, &dbi); lmdb_debug(rc, "dbi", "storeOrUpdateFirst"); if (rc != 0) { goto end_dbi; } rc = mdb_get(txn, dbi, &mdb_key, &mdb_value_ret); lmdb_debug(rc, "get", "storeOrUpdateFirst"); if (rc == 0) { rc = mdb_del(txn, dbi, &mdb_key, &mdb_value_ret); lmdb_debug(rc, "del", "storeOrUpdateFirst"); if (rc != 0) { goto end_del; } } rc = mdb_put(txn, dbi, &mdb_key, &mdb_value, 0); lmdb_debug(rc, "put", "storeOrUpdateFirst"); if (rc != 0) { goto end_put; } rc = mdb_txn_commit(txn); lmdb_debug(rc, "commit", "storeOrUpdateFirst"); if (rc != 0) { goto end_commit; } end_commit: end_put: end_del: mdb_dbi_close(m_env, dbi); end_dbi: if (rc != 0) { mdb_txn_abort(txn); } end_txn: return true; } void LMDB::resolveSingleMatch(const std::string& var, std::vector *l) { int rc; MDB_txn *txn; MDB_dbi dbi; MDB_val mdb_key; MDB_val mdb_value; MDB_val mdb_value_ret; MDB_cursor *cursor; rc = mdb_txn_begin(m_env, NULL, 0, &txn); lmdb_debug(rc, "txn", "resolveSingleMatch"); if (rc != 0) { goto end_txn; } rc = mdb_dbi_open(txn, NULL, MDB_CREATE | MDB_DUPSORT, &dbi); lmdb_debug(rc, "dbi", "resolveSingleMatch"); if (rc != 0) { goto end_dbi; } string2val(var, &mdb_key); mdb_cursor_open(txn, dbi, &cursor); while ((rc = mdb_cursor_get(cursor, &mdb_key, &mdb_value_ret, MDB_NEXT_DUP)) == 0) { std::string *a = new std::string( reinterpret_cast(mdb_value_ret.mv_data), mdb_value_ret.mv_size); VariableValue *v = new VariableValue(&var, a); l->push_back(v); } mdb_cursor_close(cursor); mdb_dbi_close(m_env, dbi); end_dbi: mdb_txn_abort(txn); end_txn: return; } void LMDB::store(std::string key, std::string value) { MDB_val mdb_key, mdb_data; MDB_txn *txn = NULL; MDB_dbi dbi; int rc; MDB_stat mst; rc = mdb_txn_begin(m_env, NULL, 0, &txn); lmdb_debug(rc, "txn", "store"); if (rc != 0) { goto end_txn; } rc = mdb_dbi_open(txn, NULL, MDB_CREATE | MDB_DUPSORT, &dbi); lmdb_debug(rc, "dbi", "store"); if (rc != 0) { goto end_dbi; } string2val(key, &mdb_key); string2val(value, &mdb_data); rc = mdb_put(txn, dbi, &mdb_key, &mdb_data, 0); lmdb_debug(rc, "put", "store"); if (rc != 0) { goto end_put; } rc = mdb_txn_commit(txn); lmdb_debug(rc, "commit", "store"); if (rc != 0) { goto end_commit; } end_commit: end_put: mdb_dbi_close(m_env, dbi); end_dbi: if (rc != 0) { mdb_txn_abort(txn); } end_txn: return; } bool LMDB::updateFirst(const std::string &key, const std::string &value) { int rc; MDB_txn *txn; MDB_dbi dbi; MDB_val mdb_key; MDB_val mdb_value; MDB_val mdb_value_ret; rc = mdb_txn_begin(m_env, NULL, 0, &txn); lmdb_debug(rc, "txn", "updateFirst"); if (rc != 0) { goto end_txn; } rc = mdb_dbi_open(txn, NULL, MDB_CREATE | MDB_DUPSORT, &dbi); lmdb_debug(rc, "dbi", "updateFirst"); if (rc != 0) { goto end_dbi; } string2val(key, &mdb_key); string2val(value, &mdb_value); rc = mdb_get(txn, dbi, &mdb_key, &mdb_value_ret); lmdb_debug(rc, "get", "updateFirst"); if (rc != 0) { goto end_get; } rc = mdb_del(txn, dbi, &mdb_key, &mdb_value_ret); lmdb_debug(rc, "del", "updateFirst"); if (rc != 0) { goto end_del; } rc = mdb_put(txn, dbi, &mdb_key, &mdb_value, 0); lmdb_debug(rc, "put", "updateFirst"); if (rc != 0) { goto end_put; } rc = mdb_txn_commit(txn); lmdb_debug(rc, "commit", "updateFirst"); if (rc != 0) { goto end_commit; } end_commit: end_put: end_del: end_get: mdb_dbi_close(m_env, dbi); end_dbi: if (rc != 0) { mdb_txn_abort(txn); } end_txn: return rc == 0; } void LMDB::del(const std::string& key) { int rc; MDB_txn *txn; MDB_dbi dbi; MDB_val mdb_key; MDB_val mdb_value; MDB_val mdb_value_ret; MDB_stat mst; rc = mdb_txn_begin(m_env, NULL, 0, &txn); lmdb_debug(rc, "txn", "del"); if (rc != 0) { goto end_txn; } rc = mdb_dbi_open(txn, NULL, MDB_CREATE | MDB_DUPSORT, &dbi); lmdb_debug(rc, "dbi", "del"); if (rc != 0) { goto end_dbi; } string2val(key, &mdb_key); rc = mdb_get(txn, dbi, &mdb_key, &mdb_value_ret); lmdb_debug(rc, "get", "del"); if (rc != 0) { goto end_get; } rc = mdb_del(txn, dbi, &mdb_key, &mdb_value_ret); lmdb_debug(rc, "del", "del"); if (rc != 0) { goto end_del; } rc = mdb_txn_commit(txn); lmdb_debug(rc, "commit", "del"); if (rc != 0) { goto end_commit; } end_commit: end_del: end_get: mdb_dbi_close(m_env, dbi); end_dbi: if (rc != 0) { mdb_txn_abort(txn); } end_txn: return; } void LMDB::resolveMultiMatches(const std::string& var, std::vector *l, variables::KeyExclusions &ke) { MDB_val key, data; MDB_txn *txn = NULL; MDB_dbi dbi; int rc; MDB_stat mst; size_t keySize = var.size(); MDB_cursor *cursor; rc = mdb_txn_begin(m_env, NULL, 0, &txn); lmdb_debug(rc, "txn", "resolveMultiMatches"); if (rc != 0) { goto end_txn; } rc = mdb_dbi_open(txn, NULL, MDB_CREATE | MDB_DUPSORT, &dbi); lmdb_debug(rc, "dbi", "resolveMultiMatches"); if (rc != 0) { goto end_dbi; } rc = mdb_cursor_open(txn, dbi, &cursor); lmdb_debug(rc, "cursor_open", "resolveMultiMatches"); if (rc != 0) { goto end_cursor_open; } if (keySize == 0) { while ((rc = mdb_cursor_get(cursor, &key, &data, MDB_NEXT)) == 0) { l->insert(l->begin(), new VariableValue( &m_name, new std::string(reinterpret_cast(key.mv_data), key.mv_size), new std::string(reinterpret_cast(data.mv_data), data.mv_size))); } } else { while ((rc = mdb_cursor_get(cursor, &key, &data, MDB_NEXT)) == 0) { char *a = reinterpret_cast(key.mv_data); if (strncmp(var.c_str(), a, keySize) == 0) { l->insert(l->begin(), new VariableValue( &m_name, new std::string(reinterpret_cast(key.mv_data), key.mv_size), new std::string(reinterpret_cast(data.mv_data), data.mv_size))); } } } mdb_cursor_close(cursor); end_cursor_open: mdb_dbi_close(m_env, dbi); end_dbi: mdb_txn_abort(txn); end_txn: return; } void LMDB::resolveRegularExpression(const std::string& var, std::vector *l, variables::KeyExclusions &ke) { MDB_val key, data; MDB_txn *txn = NULL; MDB_dbi dbi; int rc; MDB_stat mst; MDB_cursor *cursor; Utils::Regex r(var, true); rc = mdb_txn_begin(m_env, NULL, 0, &txn); lmdb_debug(rc, "txn", "resolveRegularExpression"); if (rc != 0) { goto end_txn; } rc = mdb_dbi_open(txn, NULL, MDB_CREATE | MDB_DUPSORT, &dbi); lmdb_debug(rc, "dbi", "resolveRegularExpression"); if (rc != 0) { goto end_dbi; } rc = mdb_cursor_open(txn, dbi, &cursor); lmdb_debug(rc, "cursor_open", "resolveRegularExpression"); if (rc != 0) { goto end_cursor_open; } while ((rc = mdb_cursor_get(cursor, &key, &data, MDB_NEXT)) == 0) { char *a = reinterpret_cast(key.mv_data); int ret = Utils::regex_search(a, r); if (ret <= 0) { continue; } if (ke.toOmit(std::string(reinterpret_cast(key.mv_data), key.mv_size))) { continue; } VariableValue *v = new VariableValue( new std::string(reinterpret_cast(key.mv_data), key.mv_size), new std::string(reinterpret_cast(data.mv_data), data.mv_size)); l->insert(l->begin(), v); } mdb_cursor_close(cursor); end_cursor_open: mdb_dbi_close(m_env, dbi); end_dbi: mdb_txn_abort(txn); end_txn: return; } #endif } // namespace backend } // namespace collection } // namespace modsecurity modsecurity-v3.0.6/src/collection/backend/in_memory-per_process.cc0000664000175000017500000001113514146026157026546 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "src/collection/backend/in_memory-per_process.h" #ifdef __cplusplus #include #include #include #include #include #endif #include #include "modsecurity/variable_value.h" #include "src/utils/regex.h" #include "src/utils/string.h" namespace modsecurity { namespace collection { namespace backend { InMemoryPerProcess::InMemoryPerProcess(const std::string &name) : Collection(name) { this->reserve(1000); pthread_mutex_init(&m_lock, NULL); } InMemoryPerProcess::~InMemoryPerProcess() { this->clear(); pthread_mutex_destroy(&m_lock); } void InMemoryPerProcess::store(std::string key, std::string value) { pthread_mutex_lock(&m_lock); this->emplace(key, value); pthread_mutex_unlock(&m_lock); } bool InMemoryPerProcess::storeOrUpdateFirst(const std::string &key, const std::string &value) { if (updateFirst(key, value) == false) { store(key, value); } return true; } bool InMemoryPerProcess::updateFirst(const std::string &key, const std::string &value) { pthread_mutex_lock(&m_lock); auto range = this->equal_range(key); for (auto it = range.first; it != range.second; ++it) { it->second = value; pthread_mutex_unlock(&m_lock); return true; } pthread_mutex_unlock(&m_lock); return false; } void InMemoryPerProcess::del(const std::string& key) { pthread_mutex_lock(&m_lock); this->erase(key); pthread_mutex_unlock(&m_lock); } void InMemoryPerProcess::resolveSingleMatch(const std::string& var, std::vector *l) { auto range = this->equal_range(var); for (auto it = range.first; it != range.second; ++it) { l->push_back(new VariableValue(&m_name, &it->first, &it->second)); } } void InMemoryPerProcess::resolveMultiMatches(const std::string& var, std::vector *l, variables::KeyExclusions &ke) { size_t keySize = var.size(); l->reserve(15); if (keySize == 0) { for (auto &i : *this) { if (ke.toOmit(i.first)) { continue; } l->insert(l->begin(), new VariableValue(&m_name, &i.first, &i.second)); } } else { auto range = this->equal_range(var); for (auto it = range.first; it != range.second; ++it) { if (ke.toOmit(var)) { continue; } l->insert(l->begin(), new VariableValue(&m_name, &var, &it->second)); } } } void InMemoryPerProcess::resolveRegularExpression(const std::string& var, std::vector *l, variables::KeyExclusions &ke) { //if (var.find(":") == std::string::npos) { // return; //} //if (var.size() < var.find(":") + 3) { // return; //} //std::string col = std::string(var, 0, var.find(":")); //std::string name = std::string(var, var.find(":") + 2, // var.size() - var.find(":") - 3); //size_t keySize = col.size(); Utils::Regex r(var, true); for (const auto& x : *this) { //if (x.first.size() <= keySize + 1) { // continue; //} //if (x.first.at(keySize) != ':') { // continue; //} //if (std::string(x.first, 0, keySize) != col) { // continue; //} //std::string content = std::string(x.first, keySize + 1, // x.first.size() - keySize - 1); int ret = Utils::regex_search(x.first, r); if (ret <= 0) { continue; } if (ke.toOmit(x.first)) { continue; } l->insert(l->begin(), new VariableValue(&m_name, &x.first, &x.second)); } } std::unique_ptr InMemoryPerProcess::resolveFirst( const std::string& var) { auto range = equal_range(var); for (auto it = range.first; it != range.second; ++it) { return std::unique_ptr(new std::string(it->second)); } return NULL; } } // namespace backend } // namespace collection } // namespace modsecurity modsecurity-v3.0.6/src/collection/backend/lmdb.h0000664000175000017500000000451614146026157023013 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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. * */ #ifdef __cplusplus #include #include #include #include #include #include #include #include #endif #ifdef WITH_LMDB #include #include #endif // WITH_LMDB #include #include #include #include #include "modsecurity/variable_value.h" #include "modsecurity/collection/collection.h" #include "src/variables/variable.h" #ifndef SRC_COLLECTION_BACKEND_LMDB_H_ #define SRC_COLLECTION_BACKEND_LMDB_H_ #ifdef WITH_LMDB #ifdef __cplusplus namespace modsecurity { namespace collection { namespace backend { class LMDB : public Collection { public: explicit LMDB(std::string name); ~LMDB(); void store(std::string key, std::string value) override; bool storeOrUpdateFirst(const std::string &key, const std::string &value) override; bool updateFirst(const std::string &key, const std::string &value) override; void del(const std::string& key) override; std::unique_ptr resolveFirst(const std::string& var) override; void resolveSingleMatch(const std::string& var, std::vector *l) override; void resolveMultiMatches(const std::string& var, std::vector *l, variables::KeyExclusions &ke) override; void resolveRegularExpression(const std::string& var, std::vector *l, variables::KeyExclusions &ke) override; private: void string2val(const std::string& str, MDB_val *val); void inline lmdb_debug(int rc, std::string op, std::string scope); MDB_env *m_env; }; } // namespace backend } // namespace collection } // namespace modsecurity #endif #endif // WITH_LMDB #endif // SRC_COLLECTION_BACKEND_LMDB_H_ modsecurity-v3.0.6/src/collection/collections.cc0000664000175000017500000000303414146026157023154 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "modsecurity/collection/collections.h" #ifdef __cplusplus #include #include #include #include #include #endif #include "modsecurity/variable_value.h" #include "modsecurity/collection/collection.h" #include "src/collection/backend/in_memory-per_process.h" #include "src/utils/string.h" namespace modsecurity { namespace collection { Collections::Collections(Collection *global, Collection *ip, Collection *session, Collection *user, Collection *resource) : m_global_collection_key(""), m_ip_collection_key(""), m_session_collection_key(""), m_user_collection_key(""), m_resource_collection_key(""), m_global_collection(global), m_ip_collection(ip), m_session_collection(session), m_user_collection(user), m_resource_collection(resource), m_tx_collection(new backend::InMemoryPerProcess("TX")) { } Collections::~Collections() { delete m_tx_collection; } } // namespace collection } // namespace modsecurity modsecurity-v3.0.6/src/utils/0000775000175000017500000000000014146026763017337 5ustar mhsvierulamhsvierulamodsecurity-v3.0.6/src/utils/geo_lookup.cc0000664000175000017500000002213614146026157022012 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include #include #include #include #include #include #include "src/utils/geo_lookup.h" #if WITH_MAXMIND #include #elif WITH_GEOIP #include #endif namespace modsecurity { namespace Utils { GeoLookup::~GeoLookup() { cleanUp(); } void GeoLookup::cleanUp() { #ifdef WITH_MAXMIND if (m_version == VERSION_MAXMIND) { MMDB_close(&mmdb); } #endif #ifdef WITH_GEOIP if (m_version == VERSION_GEOIP && m_gi != NULL) { GeoIP_delete(m_gi); m_gi = NULL; } #endif m_version = NOT_LOADED; } bool GeoLookup::setDataBase(const std::string& filePath, std::string *err) { #ifdef WITH_MAXMIND std::string intMax; #endif #ifdef WITH_GEOIP std::string intGeo; #endif #ifdef WITH_MAXMIND int status = MMDB_open(filePath.c_str(), MMDB_MODE_MMAP, &mmdb); if (status != MMDB_SUCCESS) { intMax.assign("libMaxMind: Can't open: " + std::string(MMDB_strerror(status)) + "."); } else { m_version = VERSION_MAXMIND; } #endif #ifdef WITH_GEOIP if (m_version == NOT_LOADED) { m_gi = GeoIP_open(filePath.c_str(), GEOIP_MEMORY_CACHE); if (m_gi == NULL) { intGeo.append("GeoIP: Can't open: " + filePath + "."); } else { m_version = VERSION_GEOIP; } } #endif if (m_version == NOT_LOADED) { err->assign("Can't open: " + filePath + ". "); err->append("Support enabled for:"); #ifdef WITH_MAXMIND err->append(" libMaxMind"); #endif #ifdef WITH_GEOIP err->append(" GeoIP"); #endif err->append("."); #ifdef WITH_MAXMIND if (!intMax.empty()) { err->append(" " + intMax); } #endif #ifdef WITH_GEOIP if (!intGeo.empty()) { err->append(" " + intGeo); } #endif return false; } return true; } bool GeoLookup::lookup(const std::string& target, Transaction *trans, std::function debug) const { if (m_version == NOT_LOADED) { if (debug) { debug(4, "Database is not open. " \ "Use: SecGeoLookupDb directive."); } return false; } #ifdef WITH_MAXMIND if (m_version == VERSION_MAXMIND) { int gai_error, mmdb_error; MMDB_lookup_result_s r; r = MMDB_lookup_string(&mmdb, target.c_str(), &gai_error, &mmdb_error); if (gai_error) { if (debug) { debug(4, "MaxMind: Error from getaddrinfo for: " + target + ". " + gai_strerror(gai_error)); } return false; } if (mmdb_error != MMDB_SUCCESS) { if (debug) { debug(4, "MaxMind: Got an error from libmaxminddb: " + std::string(MMDB_strerror(mmdb_error))); } return false; } if (!r.found_entry) { return false; } else { MMDB_entry_data_s entry_data; int status = MMDB_get_value(&r.entry, &entry_data, "country", "iso_code", NULL); if (status == MMDB_SUCCESS && entry_data.has_data) { trans->m_variableGeo.set("COUNTRY_CODE", std::string(entry_data.utf8_string, entry_data.data_size), 0); } status = MMDB_get_value(&r.entry, &entry_data, "country", "names", "en", NULL); if (status == MMDB_SUCCESS && entry_data.has_data) { trans->m_variableGeo.set("COUNTRY_NAME", std::string(entry_data.utf8_string, entry_data.data_size), 0); } status = MMDB_get_value(&r.entry, &entry_data, "continent", "names", "en", NULL); if (status == MMDB_SUCCESS && entry_data.has_data) { trans->m_variableGeo.set("COUNTRY_CONTINENT", std::string(entry_data.utf8_string, entry_data.data_size), 0); } status = MMDB_get_value(&r.entry, &entry_data, "city", "names", "en", NULL); if (status == MMDB_SUCCESS && entry_data.has_data) { trans->m_variableGeo.set("CITY", std::string(entry_data.utf8_string, entry_data.data_size), 0); } status = MMDB_get_value(&r.entry, &entry_data, "postal", "code", NULL); if (status == MMDB_SUCCESS && entry_data.has_data) { trans->m_variableGeo.set("POSTAL_CODE", std::string(entry_data.utf8_string, entry_data.data_size), 0); } status = MMDB_get_value(&r.entry, &entry_data, "location", "latitude", NULL); if (status == MMDB_SUCCESS && entry_data.has_data) { trans->m_variableGeo.set("LATITUDE", std::to_string(entry_data.double_value), 0); } status = MMDB_get_value(&r.entry, &entry_data, "location", "longitude", NULL); if (status == MMDB_SUCCESS && entry_data.has_data) { trans->m_variableGeo.set("LONGITUDE", std::to_string(entry_data.double_value), 0); } /* status = MMDB_get_value(&r.entry, &entry_data, NULL); if (status == MMDB_SUCCESS && entry_data.has_data) { trans->m_variableGeo.set("COUNTRY_CODE3", std::string(entry_data.utf8_string), 0); } status = MMDB_get_value(&r.entry, &entry_data, NULL); if (status == MMDB_SUCCESS && entry_data.has_data) { trans->m_variableGeo.set("REGION", std::string(entry_data.utf8_string), 0); } status = MMDB_get_value(&r.entry, &entry_data, NULL); if (status == MMDB_SUCCESS && entry_data.has_data) { trans->m_variableGeo.set("DMA_CODE", std::string(entry_data.utf8_string), 0); } status = MMDB_get_value(&r.entry, &entry_data, NULL); if (status == MMDB_SUCCESS && entry_data.has_data) { trans->m_variableGeo.set("AREA_CODE", std::string(entry_data.utf8_string), 0); } */ } } #endif #ifdef WITH_GEOIP if (m_version == VERSION_GEOIP) { GeoIPRecord *gir; gir = GeoIP_record_by_name(m_gi, target.c_str()); if (gir == NULL) { return false; } if (trans) { if (gir->country_code) { trans->m_variableGeo.set("COUNTRY_CODE", std::string(gir->country_code), 0); } if (gir->country_code3) { trans->m_variableGeo.set("COUNTRY_CODE3", std::string(gir->country_code3), 0); } if (gir->country_name) { trans->m_variableGeo.set("COUNTRY_NAME", std::string(gir->country_name), 0); } if (gir->continent_code) { trans->m_variableGeo.set("COUNTRY_CONTINENT", std::string(gir->continent_code), 0); } if (gir->country_code && gir->region) { trans->m_variableGeo.set("REGION", std::string(GeoIP_region_name_by_code(gir->country_code, gir->region)), 0); } if (gir->city) { trans->m_variableGeo.set("CITY", std::string(gir->city), 0); } if (gir->postal_code) { trans->m_variableGeo.set("POSTAL_CODE", std::string(gir->postal_code), 0); } if (gir->latitude) { trans->m_variableGeo.set("LATITUDE", std::to_string(gir->latitude), 0); } if (gir->longitude) { trans->m_variableGeo.set("LONGITUDE", std::to_string(gir->longitude), 0); } if (gir->metro_code) { trans->m_variableGeo.set("DMA_CODE", std::to_string(gir->metro_code), 0); } if (gir->area_code) { trans->m_variableGeo.set("AREA_CODE", std::to_string(gir->area_code), 0); } } GeoIPRecord_delete(gir); } #endif return true; } } // namespace Utils } // namespace modsecurity modsecurity-v3.0.6/src/utils/ip_tree.h0000664000175000017500000000243014146026157021133 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include #include #include #ifndef SRC_UTILS_IP_TREE_H_ #define SRC_UTILS_IP_TREE_H_ #include "modsecurity/transaction.h" #include "src/utils/msc_tree.h" namespace modsecurity { namespace Utils { class IpTree { public: IpTree(); ~IpTree(); bool contains(const std::string &ip); void postOrderTraversal(TreeNode *node); bool addFromBuffer(std::istream *ss, std::string *error); bool addFromBuffer(const std::string& buffer, std::string *error); bool addFromFile(const std::string& file, std::string *error); bool addFromUrl(const std::string& url, std::string *error); private: TreeRoot *m_tree; }; } // namespace Utils } // namespace modsecurity #endif // SRC_UTILS_IP_TREE_H_ modsecurity-v3.0.6/src/utils/system.cc0000664000175000017500000001030714146026157021170 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include #include #include #ifdef __OpenBSD__ #include #else #include #endif #include #include #include #include #include #include #if defined _MSC_VER #include #elif defined __GNUC__ #include #include #endif #include "src/utils/system.h" #include "src/config.h" namespace modsecurity { namespace utils { double cpu_seconds(void) { /* * FIXME: Temporary hack to fix build on MacOS X. Very issuficient way, but * works. Worth reimplementing using mach_absolute_time(). */ #ifndef MACOSX struct timespec t; if (!clock_gettime(CLOCK_PROCESS_CPUTIME_ID, &t)) return static_cast(t.tv_sec) + static_cast(t.tv_nsec / 1000000000.0); else return static_cast(clock()) / static_cast(CLOCKS_PER_SEC); #endif return 0; } std::string find_resource(const std::string& resource, const std::string& config, std::string *err) { std::ifstream *iss; err->assign("Looking at: "); // Trying absolute or relative to the current dir. iss = new std::ifstream(resource, std::ios::in); if (iss->is_open()) { iss->close(); delete iss; return resource; } else { err->append("'" + resource + "', "); } delete iss; // What about `*' ? if (utils::expandEnv(resource, 0).size() > 0) { return resource; } else { err->append("'" + resource + "', "); } // Trying the same path of the configuration file. std::string f = get_path(config) + "/" + resource; iss = new std::ifstream(f, std::ios::in); if (iss->is_open()) { iss->close(); delete iss; return f; } else { err->append("'" + f + "', "); } delete iss; // What about `*' ? if (utils::expandEnv(f, 0).size() > 0) { return f; } else { err->append("'" + f + "'."); } return std::string(""); } std::string get_path(const std::string& file) { size_t found; found = file.find_last_of("/\\"); if (found > 0) { return file.substr(0, found); } return std::string(""); } std::list expandEnv(const std::string& var, int flags) { std::list vars; #ifdef __OpenBSD__ glob_t p; if (glob(var.c_str(), flags, NULL, &p) == false) { if (p.gl_pathc) { for (char** exp = p.gl_pathv; *exp; ++exp) { #else wordexp_t p; if (wordexp(var.c_str(), &p, flags) == false) { if (p.we_wordc) { for (char** exp = p.we_wordv; *exp; ++exp) { #endif std::ifstream *iss = new std::ifstream(exp[0], std::ios::in); if (iss->is_open()) { iss->close(); vars.push_back(exp[0]); } delete iss; } } #ifdef __OpenBSD__ globfree(&p); #else wordfree(&p); #endif } return vars; } bool createDir(std::string dir, int mode, std::string *error) { int ret = mkdir(dir.data(), mode); if (ret != 0 && errno != EEXIST) { error->assign("Not able to create directory: " + dir + ": " \ + strerror(errno) + "."); return false; } return true; } bool isFile(std::string f) { struct stat fileInfo; FILE *fp = fopen(f.c_str(), "r"); if (fp == NULL) { return false; } fstat(fileno(fp), &fileInfo); if (!S_ISREG(fileInfo.st_mode)) { fclose(fp); return false; } fclose(fp); return true; } } // namespace utils } // namespace modsecurity modsecurity-v3.0.6/src/utils/https_client.cc0000664000175000017500000000717214146026157022352 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "src/utils/https_client.h" #include "src/config.h" #ifdef MSC_WITH_CURL #include #endif #include #include #include #include #include #include #include #include "modsecurity/modsecurity.h" #include "src/unique_id.h" namespace modsecurity { namespace Utils { size_t HttpsClient::handle(char * data, size_t size, size_t nmemb, void * p) { return static_cast(p)->handle_impl(data, size, nmemb); } size_t HttpsClient::handle_impl(char* data, size_t size, size_t nmemb) { content.append(data, size * nmemb); return size * nmemb; } void HttpsClient::setKey(const std::string& key) { m_key = "ModSec-key: " + key; } void HttpsClient::setRequestBody(const std::string& requestType) { m_requestBody = requestType; } void HttpsClient::setRequestType(const std::string& requestType) { m_requestType = requestType; } #ifdef MSC_WITH_CURL bool HttpsClient::download(const std::string &uri) { CURL *curl; CURLcode res; std::string uniqueId = "ModSec-unique-id: " + UniqueId::uniqueId(); std::string status = "ModSec-status: " + std::to_string(MODSECURITY_VERSION_NUM); curl = curl_easy_init(); if (!curl) { error = "Not able to initialize libcurl"; return false; } struct curl_slist *headers_chunk = NULL; curl_easy_setopt(curl, CURLOPT_URL, uri.c_str()); headers_chunk = curl_slist_append(headers_chunk, uniqueId.c_str()); headers_chunk = curl_slist_append(headers_chunk, status.c_str()); if (m_requestType.empty() == false) { std::string hdr = "Content-Type: " + m_requestType; headers_chunk = curl_slist_append(headers_chunk, hdr.c_str()); } if (m_key.empty() == false) { headers_chunk = curl_slist_append(headers_chunk, m_key.c_str()); } /* Make it TLS 1.x only. */ curl_easy_setopt(curl, CURLOPT_SSLVERSION, CURL_SSLVERSION_TLSv1); /* those are the default options, but lets make sure */ curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 1); curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 1); /* send all data to this function */ curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, &HttpsClient::handle); /* we pass our 'chunk' struct to the callback function */ curl_easy_setopt(curl, CURLOPT_WRITEDATA, this); curl_easy_setopt(curl, CURLOPT_USERAGENT, "ModSecurity3"); curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers_chunk); /* We want Curl to return error in case there is an HTTP error code */ curl_easy_setopt(curl, CURLOPT_FAILONERROR, 1); if (m_requestBody.empty() == false) { curl_easy_setopt(curl, CURLOPT_POSTFIELDS, m_requestBody.c_str()); } res = curl_easy_perform(curl); curl_slist_free_all(headers_chunk); if (res != CURLE_OK) { error = curl_easy_strerror(res); } curl_easy_cleanup(curl); return res == CURLE_OK; } #else bool HttpsClient::download(const std::string &uri) { error = "Not compiled with libcurl support"; return false; } #endif } // namespace Utils } // namespace modsecurity modsecurity-v3.0.6/src/utils/base64.cc0000664000175000017500000001402314146026157020727 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "src/utils/base64.h" #include #include #include #include #include "mbedtls/base64.h" namespace modsecurity { namespace Utils { std::string Base64::encode(const std::string& data) { size_t encoded_len = 0; unsigned char *d; std::string ret; mbedtls_base64_encode(NULL, 0, &encoded_len, reinterpret_cast(data.c_str()), data.size()); d = reinterpret_cast(malloc(sizeof(char) * encoded_len)); if (d == NULL) { return data; } memset(d, '\0', encoded_len); mbedtls_base64_encode(d, encoded_len, &encoded_len, (unsigned char*) data.c_str(), data.size()); ret.assign(reinterpret_cast(d), encoded_len); free(d); return ret; } std::string Base64::decode(const std::string& data, bool forgiven) { if (forgiven) { return decode_forgiven(data); } return decode(data); } std::string Base64::decode(const std::string& data) { size_t decoded_len = 0; unsigned char *d; std::string ret; size_t len = strlen(data.c_str()); mbedtls_base64_decode(NULL, 0, &decoded_len, reinterpret_cast(data.c_str()), len); d = reinterpret_cast(malloc(sizeof(char) * decoded_len)); if (d == NULL) { return data; } memset(d, '\0', decoded_len); mbedtls_base64_decode(d, decoded_len, &decoded_len, reinterpret_cast(data.c_str()), len); ret.assign(reinterpret_cast(d), decoded_len); free(d); return ret; } std::string Base64::decode_forgiven(const std::string& data) { size_t decoded_len = 0; unsigned char *d; std::string ret; decode_forgiven_engine(NULL, 0, &decoded_len, reinterpret_cast(data.c_str()), data.size()); d = reinterpret_cast(malloc(sizeof(char) * decoded_len)); if (d == NULL) { return data; } memset(d, '\0', decoded_len); decode_forgiven_engine(d, decoded_len, &decoded_len, reinterpret_cast(data.c_str()), data.size()); ret.assign(reinterpret_cast(d), decoded_len); free(d); return ret; } void Base64::decode_forgiven_engine(unsigned char *plain_text, size_t plain_text_size, size_t *aiming_size, const unsigned char *encoded, size_t input_len) { int i = 0, j = 0, k = 0; int ch = 0; static const char b64_pad = '='; static int b64_reverse_t[256] = { -2, -2, -2, -2, -2, -2, -2, -2, -2, -1, -1, -2, -2, -1, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -1, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, 62, -2, -2, -2, 63, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, -2, -2, -2, -2, -2, -2, -2, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, -2, -2, -2, -2, -2, -2, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2 }; while (/*ch = *encoded++ != '\0' && */input_len-- > 0) { ch = *encoded++; if (ch == b64_pad) { if (*encoded != '=' && (i % 4) == 1) { *aiming_size = 0; return; } continue; } ch = b64_reverse_t[ch]; if (ch < 0) { continue; /*} else if (ch == -2) { *aiming_size = 0; return;*/ } switch (i % 4) { case 0: if (plain_text_size != 0) { plain_text[j] = ch << 2; } break; case 1: if (plain_text_size == 0) { j++; } else { plain_text[j++] |= ch >> 4; plain_text[j] = (ch & 0x0f) << 4; } break; case 2: if (plain_text_size == 0) { j++; } else { plain_text[j++] |= ch >>2; plain_text[j] = (ch & 0x03) << 6; } break; case 3: if (plain_text_size == 0) { j++; } else { plain_text[j++] |= ch; } break; } i++; } k = j; if (ch == b64_pad) { switch (i % 4) { case 1: *aiming_size = 0; return; case 2: k++; case 3: if (plain_text_size != 0) { plain_text[k] = 0; } } } if (plain_text_size != 0) { plain_text[j] = '\0'; } if (plain_text_size == 0) { *aiming_size = k + 1; } else { *aiming_size = j; } } } // namespace Utils } // namespace modsecurity modsecurity-v3.0.6/src/utils/regex.cc0000664000175000017500000001450214146026157020757 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "src/utils/regex.h" #include #include #include #include #include #include "src/utils/geo_lookup.h" #if PCRE_HAVE_JIT #define pcre_study_opt PCRE_STUDY_JIT_COMPILE #else #define pcre_study_opt 0 #endif namespace modsecurity { namespace Utils { // Helper function to tell us if the current config indicates CRLF is a valid newline sequence bool crlfIsNewline() { int d = 0; pcre_config(PCRE_CONFIG_NEWLINE, &d); unsigned int option_bits = (d == 13)? PCRE_NEWLINE_CR : (d == 10)? PCRE_NEWLINE_LF : (d == (13<<8 | 10))? PCRE_NEWLINE_CRLF : (d == -2)? PCRE_NEWLINE_ANYCRLF : (d == -1)? PCRE_NEWLINE_ANY : 0; bool crlf_is_newline = option_bits == PCRE_NEWLINE_ANY || option_bits == PCRE_NEWLINE_CRLF || option_bits == PCRE_NEWLINE_ANYCRLF; return crlf_is_newline; } Regex::Regex(const std::string& pattern_, bool ignoreCase) : pattern(pattern_.empty() ? ".*" : pattern_) { const char *errptr = NULL; int erroffset; int flags = (PCRE_DOTALL|PCRE_MULTILINE); if (ignoreCase == true) { flags |= PCRE_CASELESS; } m_pc = pcre_compile(pattern.c_str(), flags, &errptr, &erroffset, NULL); m_pce = pcre_study(m_pc, pcre_study_opt, &errptr); } Regex::~Regex() { if (m_pc != NULL) { pcre_free(m_pc); m_pc = NULL; } if (m_pce != NULL) { #if PCRE_HAVE_JIT pcre_free_study(m_pce); #else pcre_free(m_pce); #endif m_pce = NULL; } } std::list Regex::searchAll(const std::string& s) const { const char *subject = s.c_str(); const std::string tmpString = std::string(s.c_str(), s.size()); int ovector[OVECCOUNT]; int rc, i, offset = 0; std::list retList; do { rc = pcre_exec(m_pc, m_pce, subject, s.size(), offset, 0, ovector, OVECCOUNT); for (i = 0; i < rc; i++) { size_t start = ovector[2*i]; size_t end = ovector[2*i+1]; size_t len = end - start; if (end > s.size()) { rc = 0; break; } std::string match = std::string(tmpString, start, len); offset = start + len; retList.push_front(SMatch(match, start)); if (len == 0) { rc = 0; break; } } } while (rc > 0); return retList; } bool Regex::searchOneMatch(const std::string& s, std::vector& captures) const { const char *subject = s.c_str(); int ovector[OVECCOUNT]; int rc = pcre_exec(m_pc, m_pce, subject, s.size(), 0, 0, ovector, OVECCOUNT); for (int i = 0; i < rc; i++) { size_t start = ovector[2*i]; size_t end = ovector[2*i+1]; size_t len = end - start; if (end > s.size()) { continue; } SMatchCapture capture(i, start, len); captures.push_back(capture); } return (rc > 0); } bool Regex::searchGlobal(const std::string& s, std::vector& captures) const { const char *subject = s.c_str(); bool prev_match_zero_length = false; int startOffset = 0; while (startOffset <= s.length()) { int ovector[OVECCOUNT]; int pcre_options = 0; if (prev_match_zero_length) { pcre_options = PCRE_NOTEMPTY_ATSTART | PCRE_ANCHORED; } int rc = pcre_exec(m_pc, m_pce, subject, s.length(), startOffset, pcre_options, ovector, OVECCOUNT); if (rc > 0) { size_t firstGroupForThisFullMatch = captures.size(); for (int i = 0; i < rc; i++) { size_t start = ovector[2*i]; size_t end = ovector[2*i+1]; size_t len = end - start; if (end > s.length()) { continue; } SMatchCapture capture(firstGroupForThisFullMatch + i, start, len); captures.push_back(capture); if (i == 0) { if (len > 0) { // normal case; next call to pcre_exec should start after the end of the last full match string startOffset = end; prev_match_zero_length = false; } else { // zero-length match; modify next match attempt to avoid infinite loop prev_match_zero_length = true; } } } } else { if (prev_match_zero_length) { // The n-1 search found a zero-length match, so we did a subsequent search // with the special flags. That subsequent exec did not find a match, so now advance // by one character (unless CRLF, then advance by two) startOffset++; if (crlfIsNewline() && (startOffset < s.length()) && (s[startOffset-1] == '\r') && (s[startOffset] == '\n')) { startOffset++; } prev_match_zero_length = false; } else { // normal case; no match on most recent scan (with options=0). We are done. break; } } } return (captures.size() > 0); } int Regex::search(const std::string& s, SMatch *match) const { int ovector[OVECCOUNT]; int ret = pcre_exec(m_pc, m_pce, s.c_str(), s.size(), 0, 0, ovector, OVECCOUNT) > 0; if (ret > 0) { *match = SMatch( std::string(s, ovector[ret-1], ovector[ret] - ovector[ret-1]), 0); } return ret; } int Regex::search(const std::string& s) const { int ovector[OVECCOUNT]; return pcre_exec(m_pc, m_pce, s.c_str(), s.size(), 0, 0, ovector, OVECCOUNT) > 0; } } // namespace Utils } // namespace modsecurity modsecurity-v3.0.6/src/utils/decode.h0000664000175000017500000000177014146026157020735 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include #include #include #include "modsecurity/modsecurity.h" #include "src/utils/string.h" #ifndef SRC_UTILS_DECODE_H_ #define SRC_UTILS_DECODE_H_ namespace modsecurity { namespace utils { int urldecode_nonstrict_inplace(unsigned char *input, uint64_t input_len, int *invalid_count, int *changed); std::string uri_decode(const std::string & sSrc); } // namespace utils } // namespace modsecurity #endif // SRC_UTILS_DECODE_H_ modsecurity-v3.0.6/src/utils/system.h0000664000175000017500000000220214146026157021025 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include #include #include #include "modsecurity/modsecurity.h" #ifndef SRC_UTILS_SYSTEM_H_ #define SRC_UTILS_SYSTEM_H_ namespace modsecurity { namespace utils { double cpu_seconds(void); std::string find_resource(const std::string& file, const std::string& config, std::string *err); std::string get_path(const std::string& file); std::list expandEnv(const std::string& var, int flags); bool createDir(std::string dir, int mode, std::string *error); bool isFile(std::string f); } // namespace utils } // namespace modsecurity #endif // SRC_UTILS_SYSTEM_H_ modsecurity-v3.0.6/src/utils/acmp.cc0000664000175000017500000004244014146026157020567 0ustar mhsvierulamhsvierula/* * ModSecurity for Apache 2.x, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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. */ /* Aho-Corasick Matching */ #include "src/utils/acmp.h" #include #include #include #include #include #include #include #include #include /** * TODO: This code comes from ModSecurity 2.9.0 there are two memory leaks here * that should be mitigated. This ACMP parser should be re-written to * consume less memory. */ extern "C" { char *parse_pm_content(const char *op_parm, unsigned short int op_len, const char **error_msg) { char *parm = NULL; char *content; unsigned short int offset = 0; // char converted = 0; int i, x; unsigned char bin = 0, esc = 0, bin_offset = 0; unsigned char c = 0; unsigned char bin_parm[3] = { 0 }; char *processed = NULL; content = strdup(op_parm); if (content == NULL) { *error_msg = std::string("Error allocating memory for pattern matching content.").c_str(); return NULL; } while (offset < op_len && (content[offset] == ' ' || content[offset] == '\t')) { offset++; }; op_len = strlen(content); if (content[offset] == '\"' && content[op_len-1] == '\"') { parm = strdup(content + offset + 1); if (parm == NULL) { *error_msg = std::string("Error allocating memory for pattern matching content.").c_str(); free(content); content = NULL; return NULL; } parm[op_len - offset - 2] = '\0'; } else { parm = strdup(content + offset); if (parm == NULL) { free(content); content = NULL; *error_msg = std::string("Error allocating memory for pattern matching content.").c_str(); return NULL; } } free(content); content = NULL; op_len = strlen(parm); if (op_len == 0) { *error_msg = "Content length is 0."; free(parm); return NULL; } for (i = 0, x = 0; i < op_len; i++) { if (parm[i] == '|') { if (bin) { bin = 0; } else { bin = 1; } } else if(!esc && parm[i] == '\\') { esc = 1; } else { if (bin) { if (parm[i] == 0 || parm[i] == 1 || parm[i] == 2 || parm[i] == 3 || parm[i] == 4 || parm[i] == 5 || parm[i] == 6 || parm[i] == 7 || parm[i] == 8 || parm[i] == 9 || parm[i] == 'A' || parm[i] == 'a' || parm[i] == 'B' || parm[i] == 'b' || parm[i] == 'C' || parm[i] == 'c' || parm[i] == 'D' || parm[i] == 'd' || parm[i] == 'E' || parm[i] == 'e' || parm[i] == 'F' || parm[i] == 'f') { bin_parm[bin_offset] = (char)parm[i]; bin_offset++; if (bin_offset == 2) { c = strtol((char *)bin_parm, (char **) NULL, 16) & 0xFF; bin_offset = 0; parm[x] = c; x++; //converted = 1; } } else if (parm[i] == ' ') { } } else if (esc) { if (parm[i] == ':' || parm[i] == ';' || parm[i] == '\\' || parm[i] == '\"') { parm[x] = parm[i]; x++; } else { *error_msg = std::string("Unsupported escape sequence.").c_str(); free(parm); return NULL; } esc = 0; //converted = 1; } else { parm[x] = parm[i]; x++; } } } #if 0 if (converted) { op_len = x; } #endif //processed = memcpy(processed, parm, op_len); processed = strdup(parm); free(parm); parm = NULL; if (processed == NULL) { *error_msg = std::string("Error allocating memory for pattern matching content.").c_str(); return NULL; } return processed; } /* ******************************************************************************* ******************************************************************************* * Functions for UTF-8 support */ /* ******************************************************************************* ******************************************************************************* * Code for local / static utility functions */ /** * Returns length of given string for parser's encoding */ static size_t acmp_strlen(ACMP *parser, const char *str) { return strlen(str); } /** * Turns string to array of ucs values, depending on parser's encoding * str - string to convert, doesn't have to be NULL-terminated * ucs_chars - where to write ucs values * len - length of input string */ static void acmp_strtoucs(ACMP *parser, const char *str, long *ucs_chars, int len) { int i; const char *c = str; for (i = 0; i < len; i++) { *(ucs_chars++) = *(c++); } } /** * Returns node with given letter, or null if not found */ static acmp_node_t *acmp_child_for_code(acmp_node_t *parent_node, long ucs_code) { acmp_node_t *node = parent_node->child; if (node == NULL) return NULL; for (;;) { if (node->letter == ucs_code) return node; node = node->sibling; if (node == NULL) return NULL; } } /** * Adds node to parent node, if it is not already there */ static void acmp_add_node_to_parent(acmp_node_t *parent, acmp_node_t *child) { acmp_node_t *node = NULL; child->parent = parent; if (parent->child == NULL) { parent->child = child; return; } node = parent->child; for (;;) { if (node == child) return; if (node->sibling == NULL) { node->sibling = child; return; } node = node->sibling; } } /** * Copies values from one node to another, without child/sibling/fail pointers * and without state variables. */ static void acmp_clone_node_no_state(acmp_node_t *from, acmp_node_t *to) { memcpy(to, from, sizeof(acmp_node_t)); to->child = NULL; to->sibling = NULL; to->fail = NULL; to->hit_count = 0; } static inline acmp_node_t *acmp_btree_find(acmp_node_t *node, long letter) { acmp_btree_node_t *bnode = node->btree; for (;;) { if (bnode == NULL) return NULL; if (bnode->letter == letter) return bnode->node; if (bnode->letter > letter) { bnode = bnode->left; } else { bnode = bnode->right; } } } /** * */ static inline acmp_node_t *acmp_goto(acmp_node_t *node, long letter) { return acmp_btree_find(node, letter); } /** * Connects each node with its first fail node that is end of a phrase. */ static void acmp_connect_other_matches(ACMP *parser, acmp_node_t *node) { acmp_node_t *child, *om; for (child = node->child; child != NULL; child = child->sibling) { if (child->fail == NULL) continue; for (om = child->fail; om != parser->root_node; om = om->fail) { if (om->is_last) { child->o_match = om; break; } } } /* Go recursively through children of this node that have a child node */ for(child = node->child; child != NULL; child = child->sibling) { if (child->child != NULL) acmp_connect_other_matches(parser, child); } } /** * Adds leaves to binary tree, working from sorted array of keyword tree nodes */ static void acmp_add_btree_leaves(acmp_btree_node_t *node, acmp_node_t *nodes[], int pos, int lb, int rb) { int left = 0, right = 0; if ((pos - lb) > 1) { left = lb + (pos - lb) / 2; node->left = reinterpret_cast(calloc(1, sizeof(acmp_btree_node_t))); node->left->node = NULL; node->left->right = NULL; node->left->left = NULL; node->left->letter = 0; /* ENH: Check alloc succeded */ node->left->node = nodes[left]; node->left->letter = nodes[left]->letter; #ifdef DEBUG_ACMP fprintf(stderr, "%lc ->left %lc\n", (wint_t)node->node->letter, (wint_t)node->left->node->letter); #endif } if ((rb - pos) > 1) { right = pos + (rb - pos) / 2; node->right = reinterpret_cast(calloc(1, sizeof(acmp_btree_node_t))); node->right->node = NULL; node->right->right = NULL; node->right->left = NULL; node->right->letter = 0; /* ENH: Check alloc succeded */ node->right->node = nodes[right]; node->right->letter = nodes[right]->letter; #ifdef DEBUG_ACMP fprintf(stderr, "%lc ->right %lc\n", (wint_t)node->node->letter, (wint_t)node->right->node->letter); #endif } if (node->right != NULL) { acmp_add_btree_leaves(node->right, nodes, right, pos, rb); } if (node->left != NULL) { acmp_add_btree_leaves(node->left, nodes, left, lb, pos); } } /** * Builds balanced binary tree from children nodes of given node. */ static void acmp_build_binary_tree(ACMP *parser, acmp_node_t *node) { size_t count, i, j; acmp_node_t *child = node->child; acmp_node_t **nodes; size_t pos; /* Build an array big enough */ for (count = 0; child != NULL; child = child->sibling) count++; nodes = (acmp_node_t **)calloc(1, count * sizeof(acmp_node_t *)); /* ENH: Check alloc succeded */ /* ENH: Combine this in the loop below - we do not need two loops */ child = node->child; for (i = 0; i < count; i++) { nodes[i] = child; child = child->sibling; }; /* We have array with all children of the node and number of those children */ for (i = 0; i < count - 1; i++) for (j = i + 1; j < count; j++) { acmp_node_t *tmp; if (nodes[i]->letter < nodes[j]->letter) continue; tmp = nodes[i]; nodes[i] = nodes[j]; nodes[j] = tmp; } if (node->btree != NULL) { free(node->btree); node->btree = NULL; } node->btree = reinterpret_cast(calloc(1, sizeof(acmp_btree_node_t))); /* ENH: Check alloc succeded */ pos = count / 2; node->btree->node = nodes[pos]; node->btree->letter = nodes[pos]->letter; acmp_add_btree_leaves(node->btree, nodes, pos, -1, count); for (i = 0; i < count; i++) { if (nodes[i]->child != NULL) acmp_build_binary_tree(parser, nodes[i]); } if (nodes != NULL) { free(nodes); } } /** * Constructs fail paths on keyword trie */ static int acmp_connect_fail_branches(ACMP *parser) { /* Already connected ? */ acmp_node_t *child, *node, *goto_node; if (parser->is_failtree_done != 0) return 1; std::vector arr; std::vector arr2; std::vector tmp; parser->root_node->text = (char *)""; parser->root_node->fail = parser->root_node; /* All first-level children will fail back to root node */ for (child = parser->root_node->child; child != NULL; child = child->sibling) { child->fail = parser->root_node; arr.push_back(child); } for (;;) { while (arr.empty() == false) { node = arr.back(); arr.pop_back(); node->fail = parser->root_node; if (node->parent != parser->root_node) { goto_node = acmp_child_for_code(node->parent->fail, node->letter); node->fail = (goto_node != NULL) ? goto_node : parser->root_node; } #ifdef DEBUG_ACMP fprintf(stderr, "fail direction: *%s* => *%s*\n", node->text, node->fail->text); #endif child = node->child; while (child != NULL) { arr2.push_back(child); child = child->sibling; } } if (arr2.empty() == true) break; tmp = arr; arr = arr2; arr2 = tmp; } acmp_connect_other_matches(parser, parser->root_node); if (parser->root_node->child != NULL) acmp_build_binary_tree(parser, parser->root_node); parser->is_failtree_done = 1; return 1; } /* ******************************************************************************* ******************************************************************************* * Code for functions from header file */ /** * flags - OR-ed values of ACMP_FLAG constants */ ACMP *acmp_create(int flags) { ACMP *parser; parser = reinterpret_cast(calloc(1, sizeof(ACMP))); /* ENH: Check alloc succeded */ parser->is_case_sensitive = (flags & ACMP_FLAG_CASE_SENSITIVE) == 0 ? 0 : 1; parser->root_node = reinterpret_cast(calloc(1, sizeof(acmp_node_t))); /* ENH: Check alloc succeded */ return parser; } /** * Creates fail tree and initializes buffer */ int acmp_prepare(ACMP *parser) { int st; if (parser->bp_buff_len < parser->longest_entry) { parser->bp_buff_len = parser->longest_entry * 2; //parser->bp_buffer = (size_t *)calloc(1, sizeof(size_t) * parser->bp_buff_len); /* ENH: Check alloc succeded */ } st = acmp_connect_fail_branches(parser); parser->active_node = parser->root_node; if (st != 1) return st; parser->is_active = 1; return 1; } /** * Adds pattern to parser * parser - ACMP parser * pattern - string nwith pattern to match * callback - Optional, pointer to an acmp_callback_t function * data - pointer to data that will be passed to callback function, only used if callback * is supplied * len - Length of pattern in characters, if zero string length is used. */ int acmp_add_pattern(ACMP *parser, const char *pattern, acmp_callback_t callback, void *data, size_t len) { size_t length, i, j; long *ucs_chars; acmp_node_t *parent, *child; if (parser->is_active != 0) return -1; length = (len == 0) ? acmp_strlen(parser, pattern) : len; ucs_chars = (long *)calloc(1, length * sizeof(long)); /* ENH: Check alloc succeded */ parent = parser->root_node; acmp_strtoucs(parser, pattern, ucs_chars, length); for (i = 0; i < length; i++) { long letter = ucs_chars[i]; if (parser->is_case_sensitive == 0) { letter = tolower(letter); } child = acmp_child_for_code(parent, letter); if (child == NULL) { child = reinterpret_cast(calloc(1, sizeof(acmp_node_t))); /* ENH: Check alloc succeded */ child->pattern = (char *)""; child->letter = letter; child->depth = i; child->text = (char *)calloc(1, strlen(pattern) + 2); /* ENH: Check alloc succeded */ for (j = 0; j <= i; j++) child->text[j] = pattern[j]; } if (i == length - 1) { if (child->is_last == 0) { parser->dict_count++; child->is_last = 1; child->pattern = (char *)calloc(1, strlen(pattern) + 2); /* ENH: Check alloc succeded */ strcpy(child->pattern, pattern); } child->callback = callback; child->callback_data = data; } acmp_add_node_to_parent(parent, child); parent = child; } if (length > parser->longest_entry) parser->longest_entry = length; parser->is_failtree_done = 0; free(ucs_chars); return 1; } /** * Process the data using ACMPT to keep state, and ACMPT's parser to keep the tree */ int acmp_process_quick(ACMPT *acmpt, const char **match, const char *data, size_t len) { ACMP *parser; acmp_node_t *node, *go_to; const char *end; int offset = 0; /* if (acmpt->parser->is_failtree_done == 0) { acmp_prepare(acmpt->parser); }; */ parser = acmpt->parser; if (acmpt->ptr == NULL) acmpt->ptr = parser->root_node; node = reinterpret_cast(acmpt->ptr); end = data + len; while (data < end) { long letter = (unsigned char)*data++; if (parser->is_case_sensitive == 0) letter = tolower(letter); go_to = NULL; while (go_to == NULL) { go_to = acmp_goto(node, letter); if (go_to != NULL) { if (go_to->is_last) { *match = go_to->text; return offset; } } if (node == parser->root_node) break; if (go_to == NULL) node = node->fail; } if (go_to != NULL) node = go_to; /* If node has o_match, then we found a pattern */ if (node->o_match != NULL) { *match = node->text; return offset; } offset++; } acmpt->ptr = node; return -1; } } modsecurity-v3.0.6/src/utils/md5.cc0000664000175000017500000000141214146026157020326 0ustar mhsvierulamhsvierula #include "src/utils/md5.h" #include "others/mbedtls/md5.h" namespace modsecurity { namespace Utils { std::string Md5::hexdigest(const std::string& input) { unsigned char digest[16]; mbedtls_md5(reinterpret_cast(input.c_str()), input.size(), digest); char buf[33]; for (int i = 0; i < 16; i++) { sprintf(buf+i*2, "%02x", digest[i]); } return std::string(buf, 32); } std::string Md5::digest(const std::string& input) { unsigned char output[16]; std::string ret; mbedtls_md5(reinterpret_cast(input.c_str()), input.size(), output); ret.assign(reinterpret_cast(output), 16); return ret; } } // namespace Utils } // namespace modsecurity modsecurity-v3.0.6/src/utils/phase.h0000664000175000017500000000321414146026157020605 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include #include #include #ifndef SRC_UTILS_PHASE_H_ #define SRC_UTILS_PHASE_H_ #include "modsecurity/modsecurity.h" namespace modsecurity { namespace utils { std::string phase_name(int x) { switch (x) { case modsecurity::Phases::ConnectionPhase: return "Connection Phase"; break; case modsecurity::Phases::UriPhase: return "URI Phase"; break; case modsecurity::Phases::RequestHeadersPhase: return "Request Headers"; break; case modsecurity::Phases::RequestBodyPhase: return "Request Body"; break; case modsecurity::Phases::ResponseHeadersPhase: return "Response Headers"; break; case modsecurity::Phases::ResponseBodyPhase: return "Reponse Body"; break; case modsecurity::Phases::LoggingPhase: return "Logging"; break; } return "Phase '" + std::to_string(x) + "' is not known."; } } // namespace utils } // namespace modsecurity #endif // SRC_UTILS_PHASE_H_ modsecurity-v3.0.6/src/utils/shared_files.cc0000664000175000017500000001461714146026157022304 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "src/utils/shared_files.h" #include #include #include #include #include #include #include #include #include #include #include #include #include #include namespace modsecurity { namespace utils { std::pair SharedFiles::find_handler( const std::string &fileName) { for (const auto &i : m_handlers) { if (i.first == fileName) { return i.second; } } return std::pair(NULL, NULL); } std::pair SharedFiles::add_new_handler( const std::string &fileName, std::string *error) { int shm_id; int ret; key_t mem_key_structure; msc_file_handler_t *new_debug_log = NULL; struct shmid_ds shared_mem_info; FILE *fp; bool toBeCreated = true; fp = fopen(fileName.c_str(), "a"); if (fp == 0) { error->assign("Failed to open file: " + fileName); goto err_fh; } mem_key_structure = ftok(fileName.c_str(), 1); if (mem_key_structure < 0) { error->assign("Failed to select key for the shared memory (1): "); error->append(strerror(errno)); goto err_mem_key; } shm_id = shmget(mem_key_structure, sizeof (msc_file_handler_t) \ + fileName.size() + 1, IPC_CREAT | IPC_EXCL | 0666); if (shm_id < 0) { shm_id = shmget(mem_key_structure, sizeof (msc_file_handler_t) + fileName.size() + 1, IPC_CREAT | 0666); toBeCreated = false; if (shm_id < 0) { error->assign("Failed to allocate shared memory (1): "); error->append(strerror(errno)); goto err_shmget1; } } ret = shmctl(shm_id, IPC_STAT, &shared_mem_info); if (ret < 0) { error->assign("Failed to get information on shared memory (1): "); error->append(strerror(errno)); goto err_shmctl1; } new_debug_log = reinterpret_cast( shmat(shm_id, NULL, 0)); if ((reinterpret_cast(new_debug_log)[0]) == -1) { error->assign("Failed to attach shared memory (1): "); error->append(strerror(errno)); goto err_shmat1; } if (toBeCreated == false && shared_mem_info.shm_nattch == 0) { toBeCreated = true; } if (toBeCreated) { memset(new_debug_log, '\0', sizeof(msc_file_handler_t)); new_debug_log->shm_id_structure = shm_id; memcpy(new_debug_log->file_name, fileName.c_str(), fileName.size()); new_debug_log->file_name[fileName.size()] = '\0'; } m_handlers.push_back(std::make_pair(fileName, std::make_pair(new_debug_log, fp))); return std::make_pair(new_debug_log, fp); err_shmat1: shmdt(new_debug_log); err_shmctl1: err_shmget1: err_mem_key: fclose(fp); err_fh: return std::pair(NULL, NULL); } bool SharedFiles::open(const std::string& fileName, std::string *error) { std::pair a; bool ret = true; #if MODSEC_USE_GENERAL_LOCK pthread_mutex_lock(m_generalLock); #endif a = find_handler(fileName); if (a.first == NULL) { a = add_new_handler(fileName, error); if (error->size() > 0) { ret = false; goto out; } } if (a.first == NULL) { error->assign("Not able to open: " + fileName); ret = false; goto out; } out: #if MODSEC_USE_GENERAL_LOCK pthread_mutex_unlock(m_generalLock); #endif return ret; } void SharedFiles::close(const std::string& fileName) { std::pair a; /* int ret; */ /* int shm_id; */ /* struct shmid_ds shared_mem_info; */ /* int j = 0; */ #if MODSEC_USE_GENERAL_LOCK pthread_mutex_lock(m_generalLock); #endif if (fileName.empty()) { goto out; } a = find_handler(fileName); if (a.first == NULL || a.second == NULL) { goto out; } /* fclose(a.second); */ a.second = 0; /* * Delete the file structure will be welcomed, but we cannot delay * while the process is being killed. * for (std::pair> i : m_handlers) { if (i.first == fileName) { j++; } } m_handlers.erase(m_handlers.begin()+j); */ /* hmdt(a.second); */ shmctl(a.first->shm_id_structure, IPC_RMID, NULL); /* * * We could check to see how many process attached to the shared memory * we have, prior to the deletion of the shared memory. * ret = shmctl(a.first->shm_id_structure, IPC_STAT, &shared_mem_info); if (ret < 0) { goto out; } ret = shared_mem_info.shm_nattch; shm_id = a.first->shm_id_structure; */ out: #if MODSEC_USE_GENERAL_LOCK pthread_mutex_unlock(m_generalLock); #endif return; } bool SharedFiles::write(const std::string& fileName, const std::string &msg, std::string *error) { std::pair a; std::string lmsg = msg; size_t wrote; struct flock lock{}; bool ret = true; a = find_handler(fileName); if (a.first == NULL) { error->assign("file is not open: " + fileName); return false; } //Exclusively lock whole file lock.l_start = lock.l_len = lock.l_whence = 0; lock.l_type = F_WRLCK; fcntl(fileno(a.second), F_SETLKW, &lock); wrote = fwrite(lmsg.c_str(), 1, lmsg.size(), a.second); if (wrote < msg.size()) { error->assign("failed to write: " + fileName); ret = false; } fflush(a.second); //Remove exclusive lock lock.l_type = F_UNLCK; fcntl(fileno(a.second), F_SETLKW, &lock); return ret; } } // namespace utils } // namespace modsecurity modsecurity-v3.0.6/src/utils/sha1.cc0000664000175000017500000000270514146026157020503 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "src/utils/sha1.h" #include "others/mbedtls/sha1.h" #include #include #include namespace modsecurity { namespace Utils { std::string Sha1::hexdigest(const std::string& input) { unsigned char digest[20] = { 0 }; static const char* const lut = "0123456789abcdef"; mbedtls_sha1(reinterpret_cast(input.c_str()), input.size(), digest); std::string a; for (int i = 0; i < 20; i++) { const unsigned char c = digest[i]; a.push_back(lut[c >> 4]); a.push_back(lut[c & 15]); } return a; } std::string Sha1::digest(const std::string& input) { unsigned char output[20]; std::string ret; mbedtls_sha1(reinterpret_cast(input.c_str()), input.size(), output); ret.assign(reinterpret_cast(output), 20); return ret; } } // namespace Utils } // namespace modsecurity modsecurity-v3.0.6/src/utils/regex.h0000664000175000017500000000452014146026157020620 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include #include #include #include #include #ifndef SRC_UTILS_REGEX_H_ #define SRC_UTILS_REGEX_H_ namespace modsecurity { namespace Utils { #define OVECCOUNT 900 class SMatch { public: SMatch() : m_match(), m_offset(0) { } SMatch(const std::string &match, size_t offset) : m_match(match), m_offset(offset) { } const std::string& str() const { return m_match; } size_t offset() const { return m_offset; } private: std::string m_match; size_t m_offset; }; struct SMatchCapture { SMatchCapture(size_t group, size_t offset, size_t length) : m_group(group), m_offset(offset), m_length(length) { } size_t m_group; // E.g. 0 = full match; 6 = capture group 6 size_t m_offset; // offset of match within the analyzed string size_t m_length; }; class Regex { public: explicit Regex(const std::string& pattern_, bool ignoreCase = false); ~Regex(); // m_pc and m_pce can't be easily copied Regex(const Regex&) = delete; Regex& operator=(const Regex&) = delete; std::list searchAll(const std::string& s) const; bool searchOneMatch(const std::string& s, std::vector& captures) const; bool searchGlobal(const std::string& s, std::vector& captures) const; int search(const std::string &s, SMatch *match) const; int search(const std::string &s) const; const std::string pattern; private: pcre *m_pc = NULL; pcre_extra *m_pce = NULL; }; static inline int regex_search(const std::string& s, SMatch *match, const Regex& regex) { return regex.search(s, match); } static inline int regex_search(const std::string& s, const Regex& regex) { return regex.search(s); } } // namespace Utils } // namespace modsecurity #endif // SRC_UTILS_REGEX_H_ modsecurity-v3.0.6/src/utils/geo_lookup.h0000664000175000017500000000323614146026157021654 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include #include #include #if WITH_MAXMIND #include #endif #if WITH_GEOIP #include #endif #ifndef SRC_UTILS_GEO_LOOKUP_H_ #define SRC_UTILS_GEO_LOOKUP_H_ #include "modsecurity/transaction.h" namespace modsecurity { namespace Utils { enum GeoLookupVersion { NOT_LOADED, VERSION_MAXMIND, VERSION_GEOIP, }; class GeoLookup { public: static GeoLookup& getInstance() { static GeoLookup instance; return instance; } bool setDataBase(const std::string& filePath, std::string *err); void cleanUp(); bool lookup(const std::string& target, Transaction *transaction, std::function debug) const; private: GeoLookup() : m_version(NOT_LOADED) #if WITH_GEOIP ,m_gi(NULL) #endif { } ~GeoLookup(); GeoLookup(GeoLookup const&); void operator=(GeoLookup const&); GeoLookupVersion m_version; #if WITH_MAXMIND MMDB_s mmdb; #endif #if WITH_GEOIP GeoIP *m_gi; #endif }; } // namespace Utils } // namespace modsecurity #endif // SRC_UTILS_GEO_LOOKUP_H_ modsecurity-v3.0.6/src/utils/msc_tree.h0000664000175000017500000000466714146026157021323 0ustar mhsvierulamhsvierula/* * ModSecurity for Apache 2.x, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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. */ /* * * TODO: This is an improved copy of the ModSecurity 2.9 file, this may need * some other enhancements and/or fixes. * */ #ifndef SRC_UTILS_MSC_TREE_H_ #define SRC_UTILS_MSC_TREE_H_ typedef struct CPTData CPTData; typedef struct TreePrefix TreePrefix; typedef struct TreeNode TreeNode; typedef struct CPTTree CPTTree; typedef struct TreeRoot TreeRoot; #define IPV4_TREE 0x1 #define IPV6_TREE 0x2 #define IPV4_LEN 0x20 #define IPV6_LEN 0x80 #define TREE_CHECK(x, y) ((x) & (y)) #define MASK_BITS(x) ((x + 1) * 8) #define SHIFT_LEFT_MASK(x) ((-1) << (x)) #define SHIFT_RIGHT_MASK(x,y) ((x) >> (y)) #define NETMASK_256 0x100 #define NETMASK_128 0x80 #define NETMASK_64 0x40 #define NETMASK_32 0x20 #define NETMASK_16 0x10 #define NETMASK_8 0x8 #define NETMASK_4 0x4 #define NETMASK_2 0x2 #define FALSE 0 #define TRUE 1 extern "C" { struct CPTData { unsigned char netmask; struct CPTData *next; }; struct TreePrefix { unsigned char *buffer; unsigned int bitlen; CPTData *prefix_data; }; struct TreeNode { unsigned int bit; int count; unsigned char *netmasks; TreePrefix *prefix; struct TreeNode *left, *right; struct TreeNode *parent; }; struct CPTTree { int count; TreeNode *head; }; struct TreeRoot { CPTTree *ipv4_tree; CPTTree *ipv6_tree; }; CPTTree *CPTCreateRadixTree(); TreeNode *CPTIpMatch(unsigned char *ipdata, CPTTree *tree, int type); TreeNode *TreeAddIP(const char *buffer, CPTTree *tree, int type); unsigned char is_netmask_v4(char *ip_strv4); unsigned char is_netmask_v6(char *ip_strv6); /** @ingroup ModSecurity_Legacy */ int tree_contains_ip(TreeRoot *rtree, const char *value, char **error_msg); int add_ip_from_param(const char *param, TreeRoot **rtree, char **error_msg); int ip_tree_from_param(const char *param, TreeRoot **rtree, char **error_msg); int create_radix_tree(TreeRoot **rtree, char **error_msg); } #endif // SRC_UTILS_MSC_TREE_H_ modsecurity-v3.0.6/src/utils/https_client.h0000664000175000017500000000301614146026157022205 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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. * */ #ifdef MSC_WITH_CURL #include #endif #include #include #include #include #ifndef SRC_UTILS_HTTPS_CLIENT_H_ #define SRC_UTILS_HTTPS_CLIENT_H_ #include "modsecurity/transaction.h" namespace modsecurity { namespace Utils { class HttpsClient { public: HttpsClient() : content(""), error(""), m_key(""), m_requestBody(""), m_requestType("") { } bool download(const std::string &uri); std::string content; static size_t handle(char * data, size_t size, size_t nmemb, void * p); size_t handle_impl(char * data, size_t size, size_t nmemb); void setKey(const std::string& key); void setRequestType(const std::string& requestType); void setRequestBody(const std::string& requestType); std::string error; private: std::string m_key; std::string m_requestBody; std::string m_requestType; }; } // namespace Utils } // namespace modsecurity #endif // SRC_UTILS_HTTPS_CLIENT_H_ modsecurity-v3.0.6/src/utils/ip_tree.cc0000664000175000017500000000704714146026157021302 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "src/utils/ip_tree.h" #include #include #include #include #include #include #include #include "src/utils/geo_lookup.h" #include "src/utils/https_client.h" namespace modsecurity { namespace Utils { void IpTree::postOrderTraversal(TreeNode *node) { if (node == NULL) { return; } postOrderTraversal(node->left); postOrderTraversal(node->right); if (node->netmasks) { free(node->netmasks); node->netmasks = NULL; } if (node->prefix) { if (node->prefix->buffer) { free(node->prefix->buffer); node->prefix->buffer = NULL; } if (node->prefix->prefix_data) { free(node->prefix->prefix_data); node->prefix->prefix_data = NULL; } free(node->prefix); node->prefix = NULL; } free(node); } IpTree::IpTree() { // FIXME: deal with possible error. char *error; create_radix_tree(&m_tree, &error); } IpTree::~IpTree() { if (m_tree != NULL) { if (m_tree->ipv4_tree != NULL) { // Tree_traversal: Post-order to delete all the items. postOrderTraversal(m_tree->ipv4_tree->head); free(m_tree->ipv4_tree); m_tree->ipv4_tree = NULL; } if (m_tree->ipv6_tree != NULL) { // Tree_traversal: Post-order to delete all the items. postOrderTraversal(m_tree->ipv6_tree->head); free(m_tree->ipv6_tree); m_tree->ipv6_tree = NULL; } free(m_tree); m_tree = NULL; } } bool IpTree::addFromBuffer(std::istream *ss, std::string *error) { char *error_msg = NULL; for (std::string line; std::getline(*ss, line); ) { int res = add_ip_from_param(line.c_str(), &m_tree, &error_msg); if (res != 0) { if (error_msg != NULL) { error->assign(error_msg); } return false; } } return true; } bool IpTree::addFromBuffer(const std::string& buffer, std::string *error) { std::stringstream ss; ss << buffer; return addFromBuffer(&ss, error); } bool IpTree::addFromFile(const std::string& file, std::string *error) { std::ifstream myfile(file, std::ios::in); if (myfile.is_open() == false) { error->assign("Failed to open file: " + file); return false; } return addFromBuffer(&myfile, error); } bool IpTree::addFromUrl(const std::string& url, std::string *error) { HttpsClient c; bool ret = c.download(url); if (ret == false) { error->assign(c.error); } else { ret = addFromBuffer(c.content, error); } return ret; } bool IpTree::contains(const std::string& ip) { int res = 0; char *error_msg = NULL; res = tree_contains_ip(m_tree, ip.c_str(), &error_msg); if (res < 0) { return false; } if (res > 0) { return true; } return false; } } // namespace Utils } // namespace modsecurity modsecurity-v3.0.6/src/utils/shared_files.h0000664000175000017500000000755314146026157022147 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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. * */ #ifndef SRC_UTILS_SHARED_FILES_H_ #define SRC_UTILS_SHARED_FILES_H_ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "modsecurity/transaction.h" #include "modsecurity/audit_log.h" /** * Not using this critical section yet. * */ /* #define MODSEC_USE_GENERAL_LOCK */ namespace modsecurity { namespace utils { typedef struct msc_file_handler { int shm_id_structure; char file_name[]; } msc_file_handler_t; class SharedFiles { public: bool open(const std::string& fileName, std::string *error); void close(const std::string& fileName); bool write(const std::string& fileName, const std::string &msg, std::string *error); static SharedFiles& getInstance() { static SharedFiles instance; return instance; } protected: std::pair find_handler( const std::string &fileName); std::pair add_new_handler( const std::string &fileName, std::string *error); private: SharedFiles() #ifdef MODSEC_USE_GENERAL_LOCK : m_generalLock(NULL), m_memKeyStructure(0) #endif { #ifdef MODSEC_USE_GENERAL_LOCK int shm_id; bool toBeCreated(false); bool err = false; m_memKeyStructure = ftok(".", 1); if (m_memKeyStructure < 0) { err = true; goto err_mem_key; } shm_id = shmget(m_memKeyStructure, sizeof(pthread_mutex_t), IPC_CREAT | IPC_EXCL | 0666); if (shm_id < 0) { shm_id = shmget(m_memKeyStructure, sizeof(pthread_mutex_t), IPC_CREAT | 0666); toBeCreated = false; if (shm_id < 0) { err = true; goto err_shmget1; } } m_generalLock = reinterpret_cast( shmat(shm_id, NULL, 0)); if ((reinterpret_cast(m_generalLock)[0]) == -1) { err = true; goto err_shmat1; } if (toBeCreated) { memset(m_generalLock, '\0', sizeof(pthread_mutex_t)); pthread_mutex_init(m_generalLock, NULL); pthread_mutex_unlock(m_generalLock); } if (err) { err_mem_key: std::cerr << strerror(errno) << std::endl; err_shmget1: std::cerr << "err_shmget1" << std::endl; err_shmat1: std::cerr << "err_shmat1" << std::endl; } #endif } ~SharedFiles() { #if MODSEC_USE_GENERAL_LOCK shmdt(m_generalLock); shmctl(m_memKeyStructure, IPC_RMID, NULL); #endif } // C++ 03 // ======== // Dont forget to declare these two. You want to make sure they // are unacceptable otherwise you may accidentally get copies of // your singleton appearing. SharedFiles(SharedFiles const&); void operator=(SharedFiles const&); std::vector>> m_handlers; #if MODSEC_USE_GENERAL_LOCK pthread_mutex_t *m_generalLock; key_t m_memKeyStructure; #endif }; } // namespace utils } // namespace modsecurity #endif // SRC_UTILS_SHARED_FILES_H_ modsecurity-v3.0.6/src/utils/string.cc0000664000175000017500000001342014146026157021151 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include #include #include #ifdef __OpenBSD__ #include #else #include #endif #include #include #include #include #include #include #include #include #include #include #if defined _MSC_VER #include #elif defined __GNUC__ #include #include #endif #include "modsecurity/modsecurity.h" #include "src/utils/string.h" namespace modsecurity { namespace utils { namespace string { std::string parserSanitizer(std::string a) { a = removeWhiteSpacesIfNeeded(a); a = removeBracketsIfNeeded(a); return a; } std::string removeWhiteSpacesIfNeeded(std::string a) { while (a.size() > 1 && a.at(0) == ' ') { a.erase(0, 1); } while (a.size() > 1 && a.at(a.length()-1) == ' ') { a.pop_back(); } return a; } std::string ascTime(time_t *t) { std::string ts = std::ctime(t); ts.pop_back(); return ts; } std::string dash_if_empty(const std::string *str) { if (str == NULL || str->empty()) { return "-"; } return *str; } std::string dash_if_empty(const char *str) { if (str == NULL || strlen(str) == 0) { return "-"; } return std::string(str); } std::string limitTo(int amount, const std::string &str) { std::string ret; if (str.length() > amount) { ret.assign(str, 0, amount); ret = ret + " (" + std::to_string(str.length() - amount) + " " \ "characters omitted)"; return ret; } return str; } std::string removeBracketsIfNeeded(std::string a) { if (a.length() > 1 && a.at(0) == '"' && a.at(a.length()-1) == '"') { a.pop_back(); a.erase(0, 1); } if (a.length() > 1 && a.at(0) == '\'' && a.at(a.length()-1) == '\'') { a.pop_back(); a.erase(0, 1); } return a; } std::string string_to_hex(const std::string& input) { static const char* const lut = "0123456789ABCDEF"; size_t len = input.length(); std::string output; output.reserve(2 * len); for (size_t i = 0; i < len; ++i) { const unsigned char c = input[i]; output.push_back(lut[c >> 4]); output.push_back(lut[c & 15]); } return output; } std::string toHexIfNeeded(const std::string &str) { std::stringstream res; for (int i = 0; i < str.size(); i++) { int c = (unsigned char)str.at(i); if (c < 32 || c > 126) { res << "\\x" << std::setw(2) << std::setfill('0') << std::hex << c; } else { res << str.at(i); } } return res.str(); } std::string tolower(std::string str) { std::string value; value.resize(str.length()); std::transform(str.begin(), str.end(), value.begin(), ::tolower); return value; } std::string toupper(std::string str) { std::string value; value.resize(str.length()); std::transform(str.begin(), str.end(), value.begin(), ::toupper); return value; } std::vector ssplit(std::string str, char delimiter) { std::vector internal; std::stringstream ss(str); // Turn the string into a stream. std::string tok; while (getline(ss, tok, delimiter)) { internal.push_back(tok); } return internal; } std::pair ssplit_pair(const std::string& str, char delimiter) { std::stringstream ss(str); // Turn the string into a stream. std::string key; std::string value; getline(ss, key, delimiter); if (key.length() < str.length()) { value = str.substr(key.length()+1); } return std::make_pair(key, value); } std::vector split(std::string str, char delimiter) { std::vector internal = ssplit(str, delimiter); if (internal.size() == 0) { internal.push_back(str); } return internal; } void chomp(std::string *str) { std::string::size_type pos = str->find_last_not_of("\n\r"); if (pos != std::string::npos) { str->erase(pos+1, str->length()-pos-1); } } unsigned char x2c(unsigned char *what) { unsigned char digit; digit = (what[0] >= 'A' ? ((what[0] & 0xdf) - 'A') + 10 : (what[0] - '0')); digit *= 16; digit += (what[1] >= 'A' ? ((what[1] & 0xdf) - 'A') + 10 : (what[1] - '0')); return digit; } /** * Converts a single hexadecimal digit into a decimal value. */ unsigned char xsingle2c(unsigned char *what) { unsigned char digit; digit = (what[0] >= 'A' ? ((what[0] & 0xdf) - 'A') + 10 : (what[0] - '0')); return digit; } unsigned char *c2x(unsigned what, unsigned char *where) { static const char c2x_table[] = "0123456789abcdef"; what = what & 0xff; *where++ = c2x_table[what >> 4]; *where++ = c2x_table[what & 0x0f]; return where; } void replaceAll(std::string *str, const std::string& from, const std::string& to) { size_t start_pos = 0; while ((start_pos = str->find(from, start_pos)) != std::string::npos) { str->replace(start_pos, from.length(), to); start_pos += to.length(); } } } // namespace string } // namespace utils } // namespace modsecurity modsecurity-v3.0.6/src/utils/base64.h0000664000175000017500000000227114146026157020573 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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. * */ #ifndef SRC_UTILS_BASE64_H_ #define SRC_UTILS_BASE64_H_ #include namespace modsecurity { namespace Utils { class Base64 { public: Base64() { } static std::string encode(const std::string& data); static std::string decode(const std::string& data, bool forgiven); static std::string decode(const std::string& data); static std::string decode_forgiven(const std::string& data); static void decode_forgiven_engine(unsigned char *plain_text, size_t plain_text_size, size_t *aiming_size, const unsigned char *encoded, size_t input_len); }; } // namespace Utils } // namespace modsecurity #endif // SRC_UTILS_BASE64_H_ modsecurity-v3.0.6/src/utils/random.h0000664000175000017500000000164314146026157020771 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include #include #include #include "modsecurity/modsecurity.h" #ifndef SRC_UTILS_RANDOM_H_ #define SRC_UTILS_RANDOM_H_ namespace modsecurity { namespace utils { double random_number(const double from, const double to); double generate_transaction_unique_id(); } // namespace utils } // namespace modsecurity #endif // SRC_UTILS_RANDOM_H_ modsecurity-v3.0.6/src/utils/msc_tree.cc0000664000175000017500000007157014146026157021456 0ustar mhsvierulamhsvierula/* * ModSecurity for Apache 2.x, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include #include #include #include #include #include "src/utils/msc_tree.h" extern "C" { CPTTree *CPTCreateRadixTree() { CPTTree *tree; tree = reinterpret_cast(malloc(sizeof(CPTTree))); if(tree == NULL) return NULL; memset(tree, 0, sizeof(CPTTree)); return tree; } void ConvertIPNetmask(unsigned char *buffer, unsigned char netmask, unsigned int ip_bitmask) { int aux = 0, bytes = 0; int mask = 0; bytes = ip_bitmask/8; while(aux < bytes) { int mask_bit = ((1+aux) * 8); if (mask_bit > netmask) { mask = 0; if ((mask_bit - netmask) < 8) mask = SHIFT_LEFT_MASK(mask_bit - netmask); } else { mask = -1; } buffer[aux] &= mask; aux++; } return; } TreeNode *CPTCreateNode() { TreeNode *node; node = reinterpret_cast(malloc(sizeof(TreeNode))); if(node == NULL) return NULL; memset(node, 0, sizeof(TreeNode)); return node; } CPTData *CPTCreateCPTData(unsigned char netmask) { CPTData *prefix_data = reinterpret_cast(malloc(sizeof(CPTData))); if (prefix_data == NULL) { return NULL; } memset(prefix_data, 0, sizeof(CPTData)); prefix_data->netmask = netmask; return prefix_data; } TreePrefix *InsertDataPrefix(TreePrefix *prefix, unsigned char *ipdata, unsigned int ip_bitmask, unsigned char netmask) { if(prefix == NULL) return NULL; memcpy(prefix->buffer, ipdata, ip_bitmask/8); prefix->bitlen = ip_bitmask; prefix->prefix_data = CPTCreateCPTData(netmask); if(prefix->prefix_data == NULL) return NULL; return prefix; } TreePrefix *CPTCreatePrefix(unsigned char *ipdata, unsigned int ip_bitmask, unsigned char netmask) { TreePrefix *prefix = NULL; int bytes = ip_bitmask; if ((ip_bitmask % 8 != 0) || (ipdata == NULL)) { return NULL; } prefix = reinterpret_cast(malloc(sizeof(TreePrefix))); if (prefix == NULL) return NULL; memset(prefix, 0, sizeof(TreePrefix)); prefix->buffer = reinterpret_cast(malloc(bytes)); if (prefix->buffer == NULL) { free(prefix); return NULL; } memset(prefix->buffer, 0, bytes); return InsertDataPrefix(prefix, ipdata, ip_bitmask, netmask); } void CPTAppendToCPTDataList(CPTData *n, CPTData **list) { CPTData *temp = NULL, *prev = NULL; if (n == NULL) { return; } if (list == NULL) { return; } prev = *list; temp = *list; while (temp != NULL) { if (n->netmask > temp->netmask) break; prev = temp; temp = temp->next; } if (temp == *list) { n->next = *list; *list = n; } else { n->next = prev->next; prev->next = n; } return; } int TreePrefixContainNetmask(TreePrefix *prefix, unsigned char netmask) { CPTData *prefix_data = NULL; if (prefix == NULL) { return 0; } prefix_data = prefix->prefix_data; while (prefix_data != NULL) { if (prefix_data->netmask == netmask) return 1; prefix_data = prefix_data->next; } return 0; } int CheckBitmask(unsigned char netmask, unsigned int ip_bitmask) { switch(netmask) { case 0xff: return 1; case 0x20: if(ip_bitmask == 0x20) return 1; break; case 0x80: if(ip_bitmask == 0x80) return 1; break; } return 0; } TreeNode *CPTCreateHead(TreePrefix *prefix, TreeNode *node, CPTTree *tree, unsigned char netmask, unsigned int ip_bitmask) { if(tree == NULL) return NULL; if(prefix == NULL) return NULL; if (node != NULL) { node->prefix = prefix; node->bit = prefix->bitlen; tree->head = node; if(CheckBitmask(netmask, ip_bitmask)) return node; node->count++; node->netmasks = reinterpret_cast(malloc(node->count * sizeof(unsigned char))); if(node->netmasks) node->netmasks[0] = netmask; return node; } else { return NULL; } return NULL; } TreeNode *SetParentNode(TreeNode *node, TreeNode *new_node, CPTTree *tree) { if (node->parent == NULL) tree->head = new_node; else if (node->parent->right == node) node->parent->right = new_node; else node->parent->left = new_node; return new_node; } int InsertNetmask(TreeNode *node, TreeNode *parent, TreeNode *new_node, CPTTree *tree, unsigned char netmask, unsigned char bitlen) { if (netmask != NETMASK_256-1 && netmask != NETMASK_128) { if (netmask != NETMASK_32 || bitlen != NETMASK_32) { int i; node = new_node; parent = new_node->parent; while (parent != NULL && netmask < (parent->bit + 1)) { node = parent; parent = parent->parent; } node->count++; node->netmasks = reinterpret_cast(malloc(node->count * sizeof(unsigned char))); if(node->netmasks == NULL) return 0; if ((node->count-1) == 0) { node->netmasks[0] = netmask; return 1; } node->netmasks[node->count - 1] = netmask; i = node->count - 2; while (i >= 0) { if (netmask < node->netmasks[i]) { node->netmasks[i + 1] = netmask; break; } node->netmasks[i + 1] = node->netmasks[i]; node->netmasks[i] = netmask; i--; } } } return 0; } TreeNode *CPTAddElement(unsigned char *ipdata, unsigned int ip_bitmask, CPTTree *tree, unsigned char netmask) { unsigned char *buffer = NULL; unsigned char bitlen = 0; int bit_validation = 0, test_bit = 0; size_t i = 0; unsigned int x, y; TreeNode *node = NULL, *new_node = NULL; TreeNode *parent = NULL, *i_node = NULL; TreeNode *bottom_node = NULL; TreePrefix *prefix = NULL; if (tree == NULL) { return NULL; } ConvertIPNetmask(ipdata, netmask, ip_bitmask); prefix = CPTCreatePrefix(ipdata, ip_bitmask, netmask); if (prefix == NULL) { return NULL; } if (tree->head == NULL) { node = CPTCreateNode(); return CPTCreateHead(prefix, node, tree, netmask, ip_bitmask); } node = tree->head; buffer = prefix->buffer; bitlen = prefix->bitlen; while (node->bit < bitlen || node->prefix == NULL) { if (bitlen < node->bit) { if (node->right == NULL) break; else node = node->right; } else { x = SHIFT_RIGHT_MASK(node->bit, 3); y = SHIFT_RIGHT_MASK(NETMASK_128, (node->bit % 8)); if (TREE_CHECK(buffer[x],y)) { if (node->right == NULL) break; node = node->right; } else { if (node->left == NULL) break; else node = node->left; } } } bottom_node = node; if(node->bit < bitlen) bit_validation = node->bit; else bit_validation = bitlen; for (i = 0; (i * NETMASK_8) < bit_validation; i++) { int net = 0, div = 0; int cnt = 0; int temp; if ((temp = (buffer[i] ^ bottom_node->prefix->buffer[i])) == 0) { test_bit = (i + 1) * NETMASK_8; continue; } temp += temp; for(cnt = 0, net = NETMASK_256, div = 2; net >= NETMASK_2; net = NETMASK_256/div, div += div, cnt++) { if(temp >= net) { test_bit = (i * NETMASK_8) + cnt; break; } } break; } if (bit_validation < test_bit) test_bit = bit_validation; parent = node->parent; while (parent && test_bit <= parent->bit) { node = parent; parent = node->parent; } if (test_bit == bitlen && node->bit == bitlen) { if (node->prefix != NULL) { int found = 0; CPTData *prefix_data; prefix_data = node->prefix->prefix_data; while(prefix_data != NULL) { if (prefix_data->netmask == netmask) ++found; prefix_data = prefix_data->next; } if (found != 0) { CPTData *prefix_data = CPTCreateCPTData(netmask); CPTAppendToCPTDataList(prefix_data, &prefix->prefix_data); if(CheckBitmask(netmask, ip_bitmask)) return node; parent = node->parent; while (parent != NULL && netmask < (parent->bit + 1)) { node = parent; parent = parent->parent; } node->count++; new_node = node; node->netmasks = reinterpret_cast(malloc(node->count * sizeof(unsigned char))); if ((node->count -1) == 0) { node->netmasks[0] = netmask; return new_node; } node->netmasks[node->count - 1] = netmask; i = node->count - 2; while (i >= 0) { if (netmask < node->netmasks[i]) { node->netmasks[i + 1] = netmask; break; } node->netmasks[i + 1] = node->netmasks[i]; node->netmasks[i] = netmask; i--; } } } else { node->prefix = CPTCreatePrefix(prefix->buffer, prefix->bitlen, NETMASK_256-1); } return node; } new_node = CPTCreateNode(); if(new_node == NULL) return NULL; new_node->prefix = prefix; new_node->bit = prefix->bitlen; if (test_bit == bitlen) { x = SHIFT_RIGHT_MASK(test_bit, 3); y = SHIFT_RIGHT_MASK(NETMASK_128, (test_bit % 8)); if (TREE_CHECK(bottom_node->prefix->buffer[x],y)) { new_node->right = node; } else { new_node->left = node; } new_node->parent = node->parent; node->parent = SetParentNode(node, new_node, tree); } else { i_node = CPTCreateNode(); if (i_node == NULL) { free(new_node->prefix); free(new_node); return NULL; } //i_node->prefix = NULL; i_node->bit = test_bit; i_node->parent = node->parent; if (node->netmasks != NULL) { i = 0; int j; while(i < node->count) { if (node->netmasks[i] < test_bit + 1) break; i++; } i_node->netmasks = reinterpret_cast(malloc((node->count - i) * sizeof(unsigned char))); if(i_node->netmasks == NULL) { free(new_node->prefix); free(new_node); free(i_node); return NULL; } j = 0; while (j < (node->count - i)) { i_node->netmasks[j] = node->netmasks[i + j]; j++; } i_node->count = (node->count - i); node->count = i; if (node->count == 0) { node->netmasks = NULL; } } x = SHIFT_RIGHT_MASK(test_bit, 3); y = SHIFT_RIGHT_MASK(NETMASK_128, (test_bit % 8)); if (TREE_CHECK(buffer[x],y)) { i_node->left = node; i_node->right = new_node; } else { i_node->left = new_node; i_node->right = node; } new_node->parent = i_node; node->parent = SetParentNode(node, i_node, tree); } if (InsertNetmask(node, parent, new_node, tree, netmask, bitlen)) return new_node; return new_node; } int TreeCheckData(TreePrefix *prefix, CPTData *prefix_data, unsigned int netmask) { while(prefix_data != NULL) { if (prefix_data->netmask == netmask) { return 1; } prefix_data = prefix_data->next; } return 0; } int TreePrefixNetmask(TreePrefix *prefix, unsigned int netmask, int flag) { CPTData *prefix_data = NULL; int ret = 0; if (prefix == NULL) { //if (msr && msr->txcfg->debuglog_level >= 9) { // msr_log(msr, 9, "TreePrefixNetmask: prefix is NULL."); //} return 0; } prefix_data = prefix->prefix_data; if (flag == 1) { if(prefix_data == NULL) return 0; if (prefix_data->netmask != netmask) { //if (msr && msr->txcfg->debuglog_level >= 9) { // msr_log(msr, 9, "TreePrefixNetmask: Cannot find a prefix with correct netmask."); //} return 0; } else { //if (msr && msr->txcfg->debuglog_level >= 9) { // msr_log(msr, 9, "TreePrefixNetmask: Found a prefix with correct netmask."); //} return 1; } } //if (msr && msr->txcfg->debuglog_level >= 9) { // msr_log(msr, 9, "TreePrefixNetmask: Check if a prefix has a the correct netmask"); //} ret = TreeCheckData(prefix, prefix_data, netmask); return ret; } TreeNode *CPTRetriveNode(unsigned char *buffer, unsigned int ip_bitmask, TreeNode *node) { if(node == NULL) { //if (msr && msr->txcfg->debuglog_level >= 9) { // msr_log(msr, 9, "CPTRetriveNode: Node tree is NULL."); //} return NULL; } if(buffer == NULL) { //if (msr && msr->txcfg->debuglog_level >= 9) { // msr_log(msr, 9, "CPTRetriveNode: Empty ip address. Nothing to search for."); //} return NULL; } while (node->bit < ip_bitmask) { unsigned int x = SHIFT_RIGHT_MASK(node->bit, 3); unsigned int y = SHIFT_RIGHT_MASK(NETMASK_128, (node->bit % 8)); if (TREE_CHECK(buffer[x], y)) { node = node->right; if (node == NULL) return NULL; } else { node = node->left; if (node == NULL) return NULL; } } //if (msr && msr->txcfg->debuglog_level >= 9) { // msr_log(msr, 9, "CPTRetriveNode: Found the node for provided ip address."); //} return node; } TreeNode *CPTRetriveParentNode(TreeNode *node) { while (node != NULL && node->netmasks == NULL) node = node->parent; return node; } TreeNode *CPTFindElementIPNetblock(unsigned char *ipdata, unsigned char ip_bitmask, TreeNode *node) { TreeNode *netmask_node = NULL; int mask = 0; int i = 0, j = 0; int mask_bits = 0; node = CPTRetriveParentNode(node); if (node == NULL) { //if (msr && msr->txcfg->debuglog_level >= 9) { // msr_log(msr, 9, "CPTFindElementIPNetblock: Node tree is NULL."); //} return NULL; } netmask_node = node; while(j < netmask_node->count) { int bytes = ip_bitmask / 8; while( i < bytes ) { mask = -1; mask_bits = ((i + 1) * 8); if (mask_bits > netmask_node->netmasks[j]) { if ((mask_bits - netmask_node->netmasks[j]) < 8) mask = SHIFT_LEFT_MASK(mask_bits - netmask_node->netmasks[j]); else mask = 0; } ipdata[i] &= mask; i++; } node = CPTRetriveNode(ipdata, ip_bitmask, node); if (node && node->bit != ip_bitmask) { //if (msr && msr->txcfg->debuglog_level >= 9) { // msr_log(msr, 9, "CPTFindElementIPNetblock: Found a tree node but netmask is different."); //} return NULL; } if (node && node->prefix == NULL) { //if (msr && msr->txcfg->debuglog_level >= 9) { // msr_log(msr, 9, "CPTFindElementIPNetblock: Found a tree node but prefix is NULL."); //} return NULL; } if (memcmp(node->prefix->buffer, ipdata, bytes) == 0) { mask = SHIFT_LEFT_MASK(8 - ip_bitmask % 8); if ((ip_bitmask % 8) == 0) { if (TreePrefixNetmask(node->prefix, netmask_node->netmasks[j], FALSE)) { //if (msr && msr->txcfg->debuglog_level >= 9) { // msr_log(msr, 9, "CPTFindElementIPNetblock: Node found for provided ip address"); //} return node; } } if ((node->prefix->buffer[bytes] & mask) == (ipdata[bytes] & mask)) { if (TreePrefixNetmask(node->prefix, netmask_node->netmasks[j], FALSE)) { //if (msr && msr->txcfg->debuglog_level >= 9) { // msr_log(msr, 9, "CPTFindElementIPNetblock: Node found for provided ip address"); //} return node; } } } j++; } return CPTFindElementIPNetblock(ipdata, ip_bitmask, netmask_node->parent); } TreeNode *CPTFindElement(unsigned char *ipdata, unsigned int ip_bitmask, CPTTree *tree) { TreeNode *node = NULL; int mask = 0, bytes = 0; unsigned char temp_data[NETMASK_256-1]; if (tree == NULL) { //if (msr && msr->txcfg->debuglog_level >= 9) { // msr_log(msr, 9, "CPTFindElement: Tree is NULL. Cannot proceed searching the ip."); //} return node; } if (tree->head == NULL) { //if (msr && msr->txcfg->debuglog_level >= 9) { // msr_log(msr, 9, "CPTFindElement: Tree head is NULL. Cannot proceed searching the ip."); //} return node; } node = tree->head; if (ip_bitmask > (NETMASK_256-1)) { //if (msr && msr->txcfg->debuglog_level >= 9) { // msr_log(msr, 9, "CPTFindElement: Netmask cannot be greater than 255"); //} return NULL; } bytes = ip_bitmask/8; memset(temp_data, 0, NETMASK_256-1); memcpy(temp_data, ipdata, bytes); node = CPTRetriveNode(temp_data, ip_bitmask, node); if (node && (node->bit != ip_bitmask)) { //if (msr && msr->txcfg->debuglog_level >= 9) { // msr_log(msr, 9, "CPTFindElement: Found a tree node but netmask is different."); //} return NULL; } if(node == NULL) { //if (msr && msr->txcfg->debuglog_level >= 9) { // msr_log(msr, 9, "CPTFindElement: Node tree is NULL."); //} return node; } if(node->prefix == NULL) { //if (msr && msr->txcfg->debuglog_level >= 9) { // msr_log(msr, 9, "CPTFindElement: Found a tree node but prefix is NULL."); //} return node; } if ((node->netmasks == NULL) && memcmp(node->prefix->buffer, temp_data, bytes) == 0) { mask = SHIFT_LEFT_MASK(8 - ip_bitmask % 8); if ((ip_bitmask % 8) == 0) { if (TreePrefixNetmask(node->prefix, ip_bitmask, TRUE)) { //if (msr && msr->txcfg->debuglog_level >= 9) { //msr_log(msr, 9, "CPTFindElement: Node found for provided ip address"); //} return node; } } if ((node->prefix->buffer[bytes] & mask) == (temp_data[bytes] & mask)) { if (TreePrefixNetmask(node->prefix, ip_bitmask, TRUE)) { //if (msr && msr->txcfg->debuglog_level >= 9) { //msr_log(msr, 9, "CPTFindElement: Node found for provided ip address"); //} return node; } } } return CPTFindElementIPNetblock(temp_data, ip_bitmask, node); } TreeNode *CPTIpMatch(unsigned char *ipdata, CPTTree *tree, int type) { if(tree == NULL) { //if (msr && msr->txcfg->debuglog_level >= 9) { //msr_log(msr, 9, "CPTIpMatch: Tree is NULL. Cannot proceed searching the ip."); //} return NULL; } if(ipdata == NULL) { //if (msr && msr->txcfg->debuglog_level >= 9) { //msr_log(msr, 9, "CPTIpMatch: Empty ip address. Nothing to search for."); //} return NULL; } switch(type) { case IPV4_TREE: //if (msr && msr->txcfg->debuglog_level >= 9) { //msr_log(msr, 9, "CPTIpMatch: Searching ip type 0x%x", type); //} return CPTFindElement(ipdata, NETMASK_32, tree); case IPV6_TREE: //if (msr && msr->txcfg->debuglog_level >= 9) { //msr_log(msr, 9, "CPTIpMatch: Searching ip type 0x%x", type); //} return CPTFindElement(ipdata, NETMASK_128, tree); default: //if (msr && msr->txcfg->debuglog_level >= 9) { //msr_log(msr, 9, "CPTIpMatch: Unknown ip type 0x%x", type); //} return NULL; } } TreeNode *TreeAddIP(const char *buffer, CPTTree *tree, int type) { unsigned long ip; int ret; unsigned char netmask_v4 = NETMASK_32, netmask_v6 = NETMASK_128; char ip_strv4[NETMASK_32], ip_strv6[NETMASK_128]; struct in_addr addr4; struct in6_addr addr6; int pos = 0; char *ptr = NULL; if(tree == NULL) return NULL; pos = strchr(buffer, '/') - buffer; switch(type) { case IPV4_TREE: memset(&(addr4.s_addr), 0, sizeof(addr4.s_addr)); memset(ip_strv4, 0x0, NETMASK_32); strncpy(ip_strv4, buffer, sizeof(ip_strv4)); *(ip_strv4 + (sizeof(ip_strv4) - 1)) = '\0'; ptr = strdup(ip_strv4); netmask_v4 = is_netmask_v4(ptr); if (netmask_v4 > NETMASK_32) { free(ptr); ptr = NULL; return NULL; } if (ptr != NULL) { free(ptr); ptr = NULL; } if (netmask_v4 == 0) { return NULL; } else if (pos < strlen(ip_strv4)) { ip_strv4[pos] = '\0'; } ret = inet_pton(AF_INET, ip_strv4, &(addr4.s_addr)); if (ret <= 0) { return NULL; } tree->count++; return CPTAddElement((unsigned char *)&(addr4.s_addr), NETMASK_32, tree, netmask_v4); case IPV6_TREE: memset(&(addr6.s6_addr), 0, sizeof(addr6.s6_addr)); memset(ip_strv6, 0x0, NETMASK_128); strncpy(ip_strv6, buffer, sizeof(ip_strv6)); *(ip_strv6 + sizeof(ip_strv6) - 1) = '\0'; ptr = strdup(ip_strv6); netmask_v6 = is_netmask_v6(ptr); if (netmask_v6 > NETMASK_128) { free(ptr); ptr = NULL; return NULL; } if(ptr != NULL) { free(ptr); ptr = NULL; } if(netmask_v6 == 0) { return NULL; } else if (netmask_v6 != NETMASK_128 && pos < strlen(ip_strv6)) { ip_strv6[pos] = '\0'; } ret = inet_pton(AF_INET6, ip_strv6, &(addr6.s6_addr)); if (ret <= 0) { return NULL; } tree->count++; return CPTAddElement((unsigned char *)&(addr6.s6_addr), NETMASK_128, tree, netmask_v6); default: return NULL; } return NULL; } int tree_contains_ip(TreeRoot *rtree, const char *value, char **error_msg) { struct in_addr in; struct in6_addr in6; if (rtree == NULL) { return 0; } if (strchr(value, ':') == NULL) { if (inet_pton(AF_INET, value, &(in.s_addr)) <= 0) { //*error_msg = apr_psprintf(mp, "IPmatch: bad IPv4 " \ // "specification \"%s\".", value); return -1; } if (CPTIpMatch((unsigned char *)&(in.s_addr), rtree->ipv4_tree, IPV4_TREE) != NULL) { return 1; } } else { if (inet_pton(AF_INET6, value, &(in6.s6_addr)) <= 0) { //*error_msg = apr_psprintf(mp, "IPmatch: bad IPv6 " \ // "specification \"%s\".", value); return -1; } if (CPTIpMatch((unsigned char *)&(in6.s6_addr), rtree->ipv6_tree, IPV6_TREE) != NULL) { return 1; } } return 0; } int add_ip_from_param( const char *param, TreeRoot **rtree, char **error_msg) { char *param_copy = strdup(param); char *saved = NULL; char *str; TreeNode *tnode = NULL; str = strtok_r(param_copy, ",", &saved); while (str != NULL) { if (strchr(str, ':') == NULL) { tnode = TreeAddIP(str, (*rtree)->ipv4_tree, IPV4_TREE); } else { tnode = TreeAddIP(str, (*rtree)->ipv6_tree, IPV6_TREE); } if (tnode == NULL) { //*error_msg = apr_psprintf("Could not add entry " \ // "\"%s\" from: %s.", str, param); free(param_copy); return -1; } str = strtok_r(NULL, ",", &saved); } free(param_copy); return 0; } int ip_tree_from_param( const char *param, TreeRoot **rtree, char **error_msg) { char *param_copy = strdup(param); char *saved = NULL; char *str = NULL; TreeNode *tnode = NULL; if (create_radix_tree(rtree, error_msg)) { free(param_copy); return -1; } str = strtok_r(param_copy, ",", &saved); while (str != NULL) { if (strchr(str, ':') == NULL) { tnode = TreeAddIP(str, (*rtree)->ipv4_tree, IPV4_TREE); } else { tnode = TreeAddIP(str, (*rtree)->ipv6_tree, IPV6_TREE); } if (tnode == NULL) { //*error_msg = apr_psprintf("Could not add entry " \ // "\"%s\" from: %s.", str, param); free(param_copy); return -1; } str = strtok_r(NULL, ",", &saved); } free(param_copy); return 0; } /** \brief Validate IPv4 Netmask * * \param ip_strv6 Pointer to ipv6 address * * \retval netmask_v4 On Success */ unsigned char is_netmask_v4(char *ip_strv4) { unsigned char netmask_v4 = 32; char *mask_str = NULL; if(ip_strv4 == NULL) return netmask_v4; if ((mask_str = strchr(ip_strv4, '/'))) { int cidr; *(mask_str++) = '\0'; if (strchr(mask_str, '.') != NULL) { return 0; } cidr = atoi(mask_str); if (cidr == 32) { return 32; } if ((cidr < 0) || (cidr > 32)) { return 0; } netmask_v4 = (unsigned char)cidr; } return netmask_v4; } /** \brief Validate IPv6 Netmask * * \param ip_strv6 Pointer to ipv6 address * * \retval netmask_v6 On Success */ unsigned char is_netmask_v6(char *ip_strv6) { unsigned char netmask_v6 = 128; char *mask_str = NULL; if(ip_strv6 == NULL) return netmask_v6; if ((mask_str = strchr(ip_strv6, '/'))) { int cidr; *(mask_str++) = '\0'; if (strchr(mask_str, ':') != NULL) { return 0; } cidr = atoi(mask_str); if ((cidr < 0) || (cidr > 128)) { return 0; } netmask_v6 = (unsigned char)cidr; } return netmask_v6; } int create_radix_tree(TreeRoot **rtree, char **error_msg) { *rtree = reinterpret_cast(malloc(sizeof(TreeRoot))); if (*rtree == NULL) { //*error_msg = apr_psprintf(mp, "Failed allocating " \ // "memory to TreeRoot."); goto root_node_failed; } memset(*rtree, 0, sizeof(TreeRoot)); (*rtree)->ipv4_tree = CPTCreateRadixTree(); if ((*rtree)->ipv4_tree == NULL) { //*error_msg = apr_psprintf(mp, "IPmatch: Tree initialization " \ // "failed."); goto ipv4_tree_failed; } (*rtree)->ipv6_tree = CPTCreateRadixTree(); if ((*rtree)->ipv6_tree == NULL) { //*error_msg = apr_psprintf(mp, "IPmatch: Tree initialization " \ // "failed."); goto ipv6_tree_failed; } return 0; ipv6_tree_failed: ipv4_tree_failed: root_node_failed: return -1; } } modsecurity-v3.0.6/src/utils/acmp.h0000664000175000017500000001101614146026157020424 0ustar mhsvierulamhsvierula/* * ModSecurity for Apache 2.x, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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. */ #ifndef ACMP_H_ #define ACMP_H_ #define ACMP_FLAG_BYTE 0 #define ACMP_FLAG_CASE_SENSITIVE 1 #define ACMP_FLAG_CASE_INSENSITIVE 0 #ifdef ACMP_USE_UTF8 #define ACMP_FLAG_UTF8 0x100 #endif #include extern "C" { /** * Opaque struct with parser data */ typedef struct ACMP ACMP; /** * Used to separate state from the trie for acmp_process_quick function */ typedef struct { ACMP *parser; void *ptr; } ACMPT; /* ******************************************************************************* ******************************************************************************* * Data structures for acmp parser */ /** * Callback function. Arguments are: * ACMP * - acmp parser that initiated callback * void * - custom data you supplied when adding callback * size_t - position in bytes where pattern was found * size_t - position in chars where pattern was found, for multibyte strings */ typedef void (*acmp_callback_t)(ACMP *, void *, size_t, size_t); /** * One node in trie */ typedef struct acmp_node_t acmp_node_t; typedef struct acmp_btree_node_t acmp_btree_node_t; struct acmp_node_t { long letter; int is_last; acmp_callback_t callback; void *callback_data; int depth; acmp_node_t *child; acmp_node_t *sibling; acmp_node_t *fail; acmp_node_t *parent; acmp_node_t *o_match; acmp_btree_node_t *btree; size_t hit_count; char *text; char *pattern; }; struct acmp_btree_node_t { long letter; acmp_btree_node_t *left; acmp_btree_node_t *right; acmp_node_t *node; }; /** * Data related to parser, not to individual nodes */ struct ACMP { int is_case_sensitive; int dict_count; size_t longest_entry; acmp_node_t *root_node; const char *data_start; const char *data_end; const char *data_pos; size_t data_len; size_t *bp_buffer; size_t bp_buff_len; acmp_node_t *active_node; char u8_buff[6]; size_t u8buff_len; size_t hit_count; int is_failtree_done; int is_active; size_t byte_pos; size_t char_pos; }; //static long utf8_lcase(long ucs_code); /** * flags - OR-ed values of ACMP_FLAG constants */ ACMP *acmp_create(int flags); /** * Destroys previously created parser */ void acmp_destroy(ACMP *parser); /** * Creates parser with same options and same patterns * parser - ACMP parser to duplicate */ ACMP *acmp_duplicate(ACMP *parser); /** * Adds pattern to parser. Cannot be done after starting the search. * parser - ACMP parser * pattern - string with pattern to match * callback - Optional, pointer to an acmp_callback_t function * data - pointer to data that will be passed to callback function, only used if callback * is supplied * len - Length of pattern in characters, if zero string length is used. */ int acmp_add_pattern(ACMP *parser, const char *pattern, acmp_callback_t callback, void *data, size_t len); /** * Called to process incoming data stream. You must call acmp_done after sending * last data packet * * data - ptr to incoming data * len - size of data in bytes */ int acmp_process(ACMP *parser, const char *data, size_t len); /** * Returns number of matches on all patterns combined */ size_t acmp_match_count_total(ACMP *parser); /** * Returns number of matches for given pattern */ size_t acmp_match_count(ACMP *parser, const char *pattern); /** * Resets the state of parser so you can start using it with new set of data, * or add new patterns. */ void acmp_reset(ACMP *parser); /** * Creates an ACMPT struct that will use parser's tree, without duplicating its data */ ACMPT *acmp_duplicate_quick(ACMP *parser); /** * Process the data using ACMPT to keep state, and ACMPT's parser to keep the tree */ int acmp_process_quick(ACMPT *acmpt, const char **match, const char *data, size_t len); /** * Prepares parser for searching */ int acmp_prepare(ACMP *parser); char *parse_pm_content(const char *op_parm, unsigned short int op_len, const char **error_msg); } #endif /*ACMP_H_*/ modsecurity-v3.0.6/src/utils/string.h0000664000175000017500000001124114146026157021012 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include #include #include #ifndef SRC_UTILS_STRING_H_ #define SRC_UTILS_STRING_H_ #define VALID_HEX(X) (((X >= '0') && (X <= '9')) || \ ((X >= 'a') && (X <= 'f')) || ((X >= 'A') && (X <= 'F'))) #define ISODIGIT(X) ((X >= '0') && (X <= '7')) #define NBSP 160 namespace modsecurity { namespace utils { namespace string { const char HEX2DEC[256] = { /* 0 1 2 3 4 5 6 7 8 9 A B C D E F */ /* 0 */ (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, /* 1 */ (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, /* 2 */ (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, /* 3 */ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, /* 4 */ (char)-1, 10, 11, 12, 13, 14, 15, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, /* 5 */ (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, /* 6 */ (char)-1, 10, 11, 12, 13, 14, 15, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, /* 7 */ (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, /* 8 */ (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, /* 9 */ (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, /* A */ (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, /* B */ (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, /* C */ (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, /* D */ (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, /* E */ (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, /* F */ (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1, (char)-1 }; std::string ascTime(time_t *t); std::string dash_if_empty(const char *str); std::string dash_if_empty(const std::string *str); std::string limitTo(int amount, const std::string &str); std::string removeBracketsIfNeeded(std::string a); std::string string_to_hex(const std::string& input); std::string toHexIfNeeded(const std::string &str); std::string tolower(std::string str); std::string toupper(std::string str); std::vector ssplit(std::string str, char delimiter); std::pair ssplit_pair(const std::string& str, char delimiter); std::vector split(std::string str, char delimiter); void chomp(std::string *str); void replaceAll(std::string *str, const std::string& from, const std::string& to); std::string removeWhiteSpacesIfNeeded(std::string a); std::string parserSanitizer(std::string a); unsigned char x2c(unsigned char *what); unsigned char xsingle2c(unsigned char *what); unsigned char *c2x(unsigned what, unsigned char *where); } // namespace string } // namespace utils } // namespace modsecurity #endif // SRC_UTILS_STRING_H_ modsecurity-v3.0.6/src/utils/sha1.h0000664000175000017500000000163114146026157020342 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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. * */ #ifndef SRC_UTILS_SHA1_H_ #define SRC_UTILS_SHA1_H_ #include #include #include namespace modsecurity { namespace Utils { class Sha1 { public: Sha1() { } static std::string hexdigest(const std::string& input); static std::string digest(const std::string& input); }; } // namespace Utils } // namespace modsecurity #endif // SRC_UTILS_SHA1_H_ modsecurity-v3.0.6/src/utils/md5.h0000664000175000017500000000176214146026157020200 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include "modsecurity/actions/action.h" #include "src/actions/transformations/transformation.h" #ifndef SRC_UTILS_MD5_H_ #define SRC_UTILS_MD5_H_ #include #include namespace modsecurity { namespace Utils { class Md5 { public: Md5() { } static std::string hexdigest(const std::string& input); static std::string digest(const std::string& input); }; } // namespace Utils } // namespace modsecurity #endif // SRC_UTILS_MD5_H_modsecurity-v3.0.6/src/utils/random.cc0000664000175000017500000000206314146026157021124 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include #include #include #include #include "modsecurity/modsecurity.h" namespace modsecurity { namespace utils { double random_number(const double from, const double to) { std::random_device rd; std::mt19937 mt(rd()); return std::bind( std::uniform_real_distribution<>{from, to}, std::default_random_engine{ mt() })(); } double generate_transaction_unique_id() { return random_number(0, 100); } } // namespace utils } // namespace modsecurity modsecurity-v3.0.6/src/utils/decode.cc0000664000175000017500000000645214146026157021075 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "src/utils/decode.h" #include "modsecurity/modsecurity.h" #include "src/utils/string.h" namespace modsecurity { namespace utils { int urldecode_nonstrict_inplace(unsigned char *input, uint64_t input_len, int *invalid_count, int *changed) { unsigned char *d = (unsigned char *)input; uint64_t i, count; *changed = 0; if (input == NULL) { return -1; } i = count = 0; while (i < input_len) { if (input[i] == '%') { /* Character is a percent sign. */ /* Are there enough bytes available? */ if (i + 2 < input_len) { char c1 = input[i + 1]; char c2 = input[i + 2]; if (VALID_HEX(c1) && VALID_HEX(c2)) { uint64_t uni = string::x2c(&input[i + 1]); *d++ = (wchar_t)uni; count++; i += 3; *changed = 1; } else { /* Not a valid encoding, skip this % */ *d++ = input[i++]; count++; (*invalid_count)++; } } else { /* Not enough bytes available, copy the raw bytes. */ *d++ = input[i++]; count++; (*invalid_count)++; } } else { /* Character is not a percent sign. */ if (input[i] == '+') { *d++ = ' '; *changed = 1; } else { *d++ = input[i]; } count++; i++; } } #if 0 *d = '\0'; #endif return count; } std::string uri_decode(const std::string & sSrc) { // Note from RFC1630: "Sequences which start with a percent // sign but are not followed by two hexadecimal characters // (0-9, A-F) are reserved for future extension" const unsigned char * pSrc = (const unsigned char *)sSrc.c_str(); const int SRC_LEN = sSrc.length(); const unsigned char * const SRC_END = pSrc + SRC_LEN; // last decodable '%' const unsigned char * const SRC_LAST_DEC = SRC_END - 2; char * const pStart = new char[SRC_LEN]; char * pEnd = pStart; while (pSrc < SRC_LAST_DEC) { if (*pSrc == '%') { char dec1, dec2; if (-1 != (dec1 = string::HEX2DEC[*(pSrc + 1)]) && -1 != (dec2 = string::HEX2DEC[*(pSrc + 2)])) { *pEnd++ = (dec1 << 4) + dec2; pSrc += 3; continue; } } *pEnd++ = *pSrc++; } // the last 2- chars while (pSrc < SRC_END) { *pEnd++ = *pSrc++; } std::string sResult(pStart, pEnd); delete [] pStart; return sResult; } } // namespace utils } // namespace modsecurity modsecurity-v3.0.6/src/rules_set_properties.cc0000664000175000017500000000702714146026157022772 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include "modsecurity/rules_set_properties.h" #include "src/utils/string.h" #include "src/variables/variable.h" namespace modsecurity { void ConfigUnicodeMap::loadConfig(std::string f, double configCodePage, RulesSetProperties *driver, std::string *errg) { char *buf = NULL; char *hmap = NULL; char *p = NULL; char *savedptr = NULL; char *ucode = NULL; int code = 0; int found = 0; int length = 0; int Map = 0; int processing = 0; driver->m_unicodeMapTable.m_set = true; driver->m_unicodeMapTable.m_unicodeCodePage = configCodePage; driver->m_unicodeMapTable.m_unicodeMapTable.reset(new modsecurity::UnicodeMapHolder()); /* Setting some unicode values - http://tools.ietf.org/html/rfc3490#section-3.1 */ /* Set 0x3002 -> 0x2e */ driver->m_unicodeMapTable.m_unicodeMapTable->change(0x3002, 0x2e); /* Set 0xFF61 -> 0x2e */ driver->m_unicodeMapTable.m_unicodeMapTable->change(0xff61, 0x2e); /* Set 0xFF0E -> 0x2e */ driver->m_unicodeMapTable.m_unicodeMapTable->change(0xff0e, 0x2e); /* Set 0x002E -> 0x2e */ driver->m_unicodeMapTable.m_unicodeMapTable->change(0x002e, 0x2e); std::ifstream file_stream(f, std::ios::in | std::ios::binary); if (file_stream) { file_stream.seekg (0, file_stream.end); length = file_stream.tellg(); file_stream.seekg (0, file_stream.beg); } else { std::stringstream ss; ss << "Failed to open the unicode map file from: " << f << " "; errg->assign(ss.str()); return; } if (length <= 0) { std::stringstream ss; ss << "Failed to open the unicode map file from: " << f << " "; errg->assign(ss.str()); return; } buf = new char[length+1]; if (!buf) { std::stringstream ss; ss << "Failed to open the unicode map file from: " << f << " "; errg->assign(ss.str()); return; } memset(buf, '\0', (sizeof(char)*(length+1))); file_stream.read(buf, length); file_stream.close(); p = strtok_r(buf, CODEPAGE_SEPARATORS, &savedptr); while (p != NULL) { unsigned int codepage = atol(p); if (codepage == configCodePage) { found = 1; } if (found == 1 && (strchr(p,':') != NULL)) { char *mapping = strdup(p); processing = 1; if (mapping != NULL) { ucode = strtok_r(mapping, ":", &hmap); sscanf(ucode, "%x", &code); sscanf(hmap, "%x", &Map); if (code >= 0 && code <= 65535) { driver->m_unicodeMapTable.m_unicodeMapTable->change(code, Map); } free(mapping); mapping = NULL; } } if (processing == 1 && (strchr(p,':') == NULL)) { break; } if (!savedptr) { break; } p = strtok_r(NULL, CODEPAGE_SEPARATORS, &savedptr); } delete[] buf; } } // namespace modsecurity modsecurity-v3.0.6/src/rule_unconditional.cc0000664000175000017500000000230314146026157022376 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "modsecurity/rule_unconditional.h" namespace modsecurity { bool RuleUnconditional::evaluate(Transaction *trans, std::shared_ptr ruleMessage) { RuleWithActions::evaluate(trans, ruleMessage); // FIXME: This needs to be romeved on the runtime exeption review. bool containsBlock = false; ms_dbg_a(trans, 4, "(Rule: " + std::to_string(m_ruleId) \ + ") Executing unconditional rule..."); executeActionsIndependentOfChainedRuleResult(trans, &containsBlock, ruleMessage); executeActionsAfterFullMatch(trans, containsBlock, ruleMessage); performLogging(trans, ruleMessage); return true; } } // namespace modsecurity modsecurity-v3.0.6/src/parser/0000775000175000017500000000000014146027125017464 5ustar mhsvierulamhsvierulamodsecurity-v3.0.6/src/parser/Makefile.am0000664000175000017500000000154414146026157021530 0ustar mhsvierulamhsvierula noinst_LTLIBRARIES = libmodsec_parser.la BUILT_SOURCES = \ seclang-parser.cc \ test.cc libmodsec_parser_la_SOURCES = \ seclang-parser.yy \ seclang-scanner.ll \ test.cc libmodsec_parser_la_CPPFLAGS = \ -std=c++11 \ -I../.. \ -I../../headers \ -I../../others \ -std=c++11 \ -I.. \ -g \ -fPIC \ -O3 \ $(CURL_CFLAGS) \ $(GEOIP_CFLAGS) \ $(GLOBAL_CPPFLAGS) \ $(MODSEC_NO_LOGS) \ $(YAJL_CFLAGS) \ $(LMDB_CFLAGS) \ $(PCRE_CFLAGS) \ $(LIBXML2_CFLAGS) test.cc: seclang-parser.hh cat seclang-parser.hh | sed "s/return \*new (yyas_ ()) T (t)/return *new (yyas_ ()) T (std::move((T\&)t))/g" > seclang-parser.hh.fix && mv seclang-parser.hh.fix seclang-parser.hh touch test.cc CLEANFILES = test.cc \ seclang-scanner.cc \ seclang-parser.cc \ seclang-parser.hh \ location.hh \ position.hh \ stack.hh EXTRA_DIST = $(CLEANFILES) DISTCLAEN = modsecurity-v3.0.6/src/parser/driver.h0000664000175000017500000000464114146026157021141 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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. * */ #ifdef __cplusplus #include #include #include #include #include #endif #ifndef SRC_PARSER_DRIVER_H_ #define SRC_PARSER_DRIVER_H_ #include "modsecurity/modsecurity.h" #include "modsecurity/rules_set.h" #include "modsecurity/rules_set_properties.h" #include "modsecurity/audit_log.h" #include "src/rule_script.h" #ifndef MS_CPPCHECK_DISABLED_FOR_PARSER #include "src/parser/seclang-parser.hh" #endif using modsecurity::RuleWithOperator; using modsecurity::RulesSet; # define YY_DECL \ yy::seclang_parser::symbol_type yylex(modsecurity::Parser::Driver& driver) YY_DECL; namespace modsecurity { namespace Parser { #ifdef __cplusplus class Driver; #else typedef struct Driver_t Driver; #endif /** * * FIXME: There is a memory leak in the filename at yy::location. * The filename should be converted into a shared string to * save memory or be associated with the life cycle of the * driver class. * **/ class Driver : public RulesSetProperties { public: Driver(); virtual ~Driver(); int addSecRule(std::unique_ptr rule); int addSecAction(std::unique_ptr rule); int addSecMarker(std::string marker, std::unique_ptr fileName, int lineNumber); int addSecRuleScript(std::unique_ptr rule); bool scan_begin(); void scan_end(); bool trace_scanning; int parseFile(const std::string& f); int parse(const std::string& f, const std::string &ref); std::string file; bool trace_parsing; void error(const yy::location& l, const std::string& m); void error(const yy::location& l, const std::string& m, const std::string& c); std::list loc; std::string buffer; RuleWithActions *m_lastRule; RulesSetPhases m_rulesSetPhases; }; } // namespace Parser } // namespace modsecurity #endif // SRC_PARSER_DRIVER_H_ modsecurity-v3.0.6/src/parser/Makefile.in0000664000175000017500000006760114146027125021543 0ustar mhsvierulamhsvierula# Makefile.in generated by automake 1.15.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2017 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@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@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 = src/parser ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/build/ax_prog_doxygen.m4 \ $(top_srcdir)/build/ax_valgrind_check.m4 \ $(top_srcdir)/build/curl.m4 $(top_srcdir)/build/libgeoip.m4 \ $(top_srcdir)/build/libmaxmind.m4 \ $(top_srcdir)/build/libtool.m4 $(top_srcdir)/build/libxml.m4 \ $(top_srcdir)/build/lmdb.m4 $(top_srcdir)/build/ltoptions.m4 \ $(top_srcdir)/build/ltsugar.m4 \ $(top_srcdir)/build/ltversion.m4 \ $(top_srcdir)/build/lt~obsolete.m4 $(top_srcdir)/build/lua.m4 \ $(top_srcdir)/build/pcre.m4 $(top_srcdir)/build/ssdeep.m4 \ $(top_srcdir)/build/yajl.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libmodsec_parser_la_LIBADD = am_libmodsec_parser_la_OBJECTS = \ libmodsec_parser_la-seclang-parser.lo \ libmodsec_parser_la-seclang-scanner.lo \ libmodsec_parser_la-test.lo libmodsec_parser_la_OBJECTS = $(am_libmodsec_parser_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CXXFLAGS) $(CXXFLAGS) AM_V_CXX = $(am__v_CXX_@AM_V@) am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) am__v_CXX_0 = @echo " CXX " $@; am__v_CXX_1 = CXXLD = $(CXX) CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) am__v_CXXLD_0 = @echo " CXXLD " $@; am__v_CXXLD_1 = LEXCOMPILE = $(LEX) $(AM_LFLAGS) $(LFLAGS) LTLEXCOMPILE = $(LIBTOOL) $(AM_V_lt) $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(LEX) $(AM_LFLAGS) $(LFLAGS) AM_V_LEX = $(am__v_LEX_@AM_V@) am__v_LEX_ = $(am__v_LEX_@AM_DEFAULT_V@) am__v_LEX_0 = @echo " LEX " $@; am__v_LEX_1 = YLWRAP = $(top_srcdir)/ylwrap am__yacc_c2h = sed -e s/cc$$/hh/ -e s/cpp$$/hpp/ -e s/cxx$$/hxx/ \ -e s/c++$$/h++/ -e s/c$$/h/ YACCCOMPILE = $(YACC) $(AM_YFLAGS) $(YFLAGS) LTYACCCOMPILE = $(LIBTOOL) $(AM_V_lt) $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(YACC) $(AM_YFLAGS) $(YFLAGS) AM_V_YACC = $(am__v_YACC_@AM_V@) am__v_YACC_ = $(am__v_YACC_@AM_DEFAULT_V@) am__v_YACC_0 = @echo " YACC " $@; am__v_YACC_1 = COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libmodsec_parser_la_SOURCES) DIST_SOURCES = $(libmodsec_parser_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp \ $(top_srcdir)/ylwrap seclang-parser.cc seclang-scanner.cc DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BISON = @BISON@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CURL_CFLAGS = @CURL_CFLAGS@ CURL_CONFIG = @CURL_CONFIG@ CURL_CPPFLAGS = @CURL_CPPFLAGS@ CURL_DISPLAY = @CURL_DISPLAY@ CURL_FOUND = @CURL_FOUND@ CURL_LDADD = @CURL_LDADD@ CURL_LDFLAGS = @CURL_LDFLAGS@ CURL_USES_GNUTLS = @CURL_USES_GNUTLS@ CURL_VERSION = @CURL_VERSION@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DOXYGEN_PAPER_SIZE = @DOXYGEN_PAPER_SIZE@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ DX_CONFIG = @DX_CONFIG@ DX_DOCDIR = @DX_DOCDIR@ DX_DOT = @DX_DOT@ DX_DOXYGEN = @DX_DOXYGEN@ DX_DVIPS = @DX_DVIPS@ DX_EGREP = @DX_EGREP@ DX_ENV = @DX_ENV@ DX_FLAG_chi = @DX_FLAG_chi@ DX_FLAG_chm = @DX_FLAG_chm@ DX_FLAG_doc = @DX_FLAG_doc@ DX_FLAG_dot = @DX_FLAG_dot@ DX_FLAG_html = @DX_FLAG_html@ DX_FLAG_man = @DX_FLAG_man@ DX_FLAG_pdf = @DX_FLAG_pdf@ DX_FLAG_ps = @DX_FLAG_ps@ DX_FLAG_rtf = @DX_FLAG_rtf@ DX_FLAG_xml = @DX_FLAG_xml@ DX_HHC = @DX_HHC@ DX_LATEX = @DX_LATEX@ DX_MAKEINDEX = @DX_MAKEINDEX@ DX_PDFLATEX = @DX_PDFLATEX@ DX_PERL = @DX_PERL@ DX_PROJECT = @DX_PROJECT@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ENABLE_VALGRIND_drd = @ENABLE_VALGRIND_drd@ ENABLE_VALGRIND_helgrind = @ENABLE_VALGRIND_helgrind@ ENABLE_VALGRIND_memcheck = @ENABLE_VALGRIND_memcheck@ ENABLE_VALGRIND_sgcheck = @ENABLE_VALGRIND_sgcheck@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FLEX = @FLEX@ GEOIP_CFLAGS = @GEOIP_CFLAGS@ GEOIP_DISPLAY = @GEOIP_DISPLAY@ GEOIP_FOUND = @GEOIP_FOUND@ GEOIP_LDADD = @GEOIP_LDADD@ GEOIP_LDFLAGS = @GEOIP_LDFLAGS@ GEOIP_LIBS = @GEOIP_LIBS@ GEOIP_VERSION = @GEOIP_VERSION@ GLOBAL_CFLAGS = @GLOBAL_CFLAGS@ GLOBAL_CPPFLAGS = @GLOBAL_CPPFLAGS@ GLOBAL_LDADD = @GLOBAL_LDADD@ 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@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBXML2_CFLAGS = @LIBXML2_CFLAGS@ LIBXML2_CONFIG = @LIBXML2_CONFIG@ LIBXML2_CPPFLAGS = @LIBXML2_CPPFLAGS@ LIBXML2_DISPLAY = @LIBXML2_DISPLAY@ LIBXML2_FOUND = @LIBXML2_FOUND@ LIBXML2_LDADD = @LIBXML2_LDADD@ LIBXML2_LDFLAGS = @LIBXML2_LDFLAGS@ LIBXML2_VERSION = @LIBXML2_VERSION@ LIPO = @LIPO@ LMDB_CFLAGS = @LMDB_CFLAGS@ LMDB_DISPLAY = @LMDB_DISPLAY@ LMDB_FOUND = @LMDB_FOUND@ LMDB_LDADD = @LMDB_LDADD@ LMDB_LDFLAGS = @LMDB_LDFLAGS@ LMDB_LIBS = @LMDB_LIBS@ LMDB_VERSION = @LMDB_VERSION@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ LUA_CFLAGS = @LUA_CFLAGS@ LUA_DISPLAY = @LUA_DISPLAY@ LUA_FOUND = @LUA_FOUND@ LUA_LDADD = @LUA_LDADD@ LUA_LDFLAGS = @LUA_LDFLAGS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAXMIND_CFLAGS = @MAXMIND_CFLAGS@ MAXMIND_DISPLAY = @MAXMIND_DISPLAY@ MAXMIND_FOUND = @MAXMIND_FOUND@ MAXMIND_LDADD = @MAXMIND_LDADD@ MAXMIND_LDFLAGS = @MAXMIND_LDFLAGS@ MAXMIND_LIBS = @MAXMIND_LIBS@ MAXMIND_VERSION = @MAXMIND_VERSION@ MKDIR_P = @MKDIR_P@ MODSEC_MUTEX_ON_PM = @MODSEC_MUTEX_ON_PM@ MODSEC_NO_LOGS = @MODSEC_NO_LOGS@ MSC_BASE_DIR = @MSC_BASE_DIR@ MSC_GIT_VERSION = @MSC_GIT_VERSION@ MSC_VERSION = @MSC_VERSION@ MSC_VERSION_INFO = @MSC_VERSION_INFO@ MSC_VERSION_WITH_PATCHLEVEL = @MSC_VERSION_WITH_PATCHLEVEL@ 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_LD_PATH = @PCRE_LD_PATH@ PCRE_VERSION = @PCRE_VERSION@ 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@ SSDEEP_CFLAGS = @SSDEEP_CFLAGS@ SSDEEP_DISPLAY = @SSDEEP_DISPLAY@ SSDEEP_FOUND = @SSDEEP_FOUND@ SSDEEP_LDADD = @SSDEEP_LDADD@ SSDEEP_LDFLAGS = @SSDEEP_LDFLAGS@ STRIP = @STRIP@ VALGRIND = @VALGRIND@ VALGRIND_ENABLED = @VALGRIND_ENABLED@ VERSION = @VERSION@ YACC = @YACC@ YACC_INST = @YACC_INST@ YAJL_CFLAGS = @YAJL_CFLAGS@ YAJL_DISPLAY = @YAJL_DISPLAY@ YAJL_FOUND = @YAJL_FOUND@ YAJL_LDADD = @YAJL_LDADD@ YAJL_LDFLAGS = @YAJL_LDFLAGS@ YAJL_LIBS = @YAJL_LIBS@ YAJL_VERSION = @YAJL_VERSION@ YFLAGS = @YFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ 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@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ 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@ valgrind_enabled_tools = @valgrind_enabled_tools@ valgrind_tools = @valgrind_tools@ noinst_LTLIBRARIES = libmodsec_parser.la BUILT_SOURCES = \ seclang-parser.cc \ test.cc libmodsec_parser_la_SOURCES = \ seclang-parser.yy \ seclang-scanner.ll \ test.cc libmodsec_parser_la_CPPFLAGS = \ -std=c++11 \ -I../.. \ -I../../headers \ -I../../others \ -std=c++11 \ -I.. \ -g \ -fPIC \ -O3 \ $(CURL_CFLAGS) \ $(GEOIP_CFLAGS) \ $(GLOBAL_CPPFLAGS) \ $(MODSEC_NO_LOGS) \ $(YAJL_CFLAGS) \ $(LMDB_CFLAGS) \ $(PCRE_CFLAGS) \ $(LIBXML2_CFLAGS) CLEANFILES = test.cc \ seclang-scanner.cc \ seclang-parser.cc \ seclang-parser.hh \ location.hh \ position.hh \ stack.hh EXTRA_DIST = $(CLEANFILES) DISTCLAEN = all: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) all-am .SUFFIXES: .SUFFIXES: .cc .ll .lo .o .obj .yy $(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 src/parser/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign src/parser/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): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libmodsec_parser.la: $(libmodsec_parser_la_OBJECTS) $(libmodsec_parser_la_DEPENDENCIES) $(EXTRA_libmodsec_parser_la_DEPENDENCIES) $(AM_V_CXXLD)$(CXXLINK) $(libmodsec_parser_la_OBJECTS) $(libmodsec_parser_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmodsec_parser_la-seclang-parser.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmodsec_parser_la-seclang-scanner.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmodsec_parser_la-test.Plo@am__quote@ .cc.o: @am__fastdepCXX_TRUE@ $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< .cc.obj: @am__fastdepCXX_TRUE@ $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cc.lo: @am__fastdepCXX_TRUE@ $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ @am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< libmodsec_parser_la-seclang-parser.lo: seclang-parser.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsec_parser_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libmodsec_parser_la-seclang-parser.lo -MD -MP -MF $(DEPDIR)/libmodsec_parser_la-seclang-parser.Tpo -c -o libmodsec_parser_la-seclang-parser.lo `test -f 'seclang-parser.cc' || echo '$(srcdir)/'`seclang-parser.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmodsec_parser_la-seclang-parser.Tpo $(DEPDIR)/libmodsec_parser_la-seclang-parser.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='seclang-parser.cc' object='libmodsec_parser_la-seclang-parser.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsec_parser_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libmodsec_parser_la-seclang-parser.lo `test -f 'seclang-parser.cc' || echo '$(srcdir)/'`seclang-parser.cc libmodsec_parser_la-seclang-scanner.lo: seclang-scanner.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsec_parser_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libmodsec_parser_la-seclang-scanner.lo -MD -MP -MF $(DEPDIR)/libmodsec_parser_la-seclang-scanner.Tpo -c -o libmodsec_parser_la-seclang-scanner.lo `test -f 'seclang-scanner.cc' || echo '$(srcdir)/'`seclang-scanner.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmodsec_parser_la-seclang-scanner.Tpo $(DEPDIR)/libmodsec_parser_la-seclang-scanner.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='seclang-scanner.cc' object='libmodsec_parser_la-seclang-scanner.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsec_parser_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libmodsec_parser_la-seclang-scanner.lo `test -f 'seclang-scanner.cc' || echo '$(srcdir)/'`seclang-scanner.cc libmodsec_parser_la-test.lo: test.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsec_parser_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libmodsec_parser_la-test.lo -MD -MP -MF $(DEPDIR)/libmodsec_parser_la-test.Tpo -c -o libmodsec_parser_la-test.lo `test -f 'test.cc' || echo '$(srcdir)/'`test.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmodsec_parser_la-test.Tpo $(DEPDIR)/libmodsec_parser_la-test.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='test.cc' object='libmodsec_parser_la-test.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmodsec_parser_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libmodsec_parser_la-test.lo `test -f 'test.cc' || echo '$(srcdir)/'`test.cc .ll.cc: $(AM_V_LEX)$(am__skiplex) $(SHELL) $(YLWRAP) $< $(LEX_OUTPUT_ROOT).c $@ -- $(LEXCOMPILE) .yy.cc: $(AM_V_YACC)$(am__skipyacc) $(SHELL) $(YLWRAP) $< y.tab.c $@ y.tab.h `echo $@ | $(am__yacc_c2h)` y.output $*.output -- $(YACCCOMPILE) mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ 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-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ 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" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files 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: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) 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: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) 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." -rm -f seclang-parser.cc -rm -f seclang-scanner.cc -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ 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-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: .MAKE: all check install install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES cscopelist-am ctags \ ctags-am 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-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ 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 tags-am uninstall uninstall-am .PRECIOUS: Makefile test.cc: seclang-parser.hh cat seclang-parser.hh | sed "s/return \*new (yyas_ ()) T (t)/return *new (yyas_ ()) T (std::move((T\&)t))/g" > seclang-parser.hh.fix && mv seclang-parser.hh.fix seclang-parser.hh touch test.cc # 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: modsecurity-v3.0.6/src/parser/position.hh0000664000175000017500000000062114146026157021654 0ustar mhsvierulamhsvierula// A Bison parser, made by GNU Bison 3.7.2. // Starting with Bison 3.2, this file is useless: the structure it // used to define is now defined in "location.hh". // // To get rid of this file: // 1. add '%require "3.2"' (or newer) to your grammar file // 2. remove references to this file from your build system // 3. if you used to include it, include "location.hh" instead. #include "location.hh" modsecurity-v3.0.6/src/parser/seclang-parser.cc0000664000175000017500000121431014146026157022707 0ustar mhsvierulamhsvierula// A Bison parser, made by GNU Bison 3.7.2. // Skeleton implementation for Bison LALR(1) parsers in C++ // Copyright (C) 2002-2015, 2018-2020 Free Software Foundation, Inc. // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // You should have received a copy of the GNU General Public License // along with this program. If not, see . // As a special exception, you may create a larger work that contains // part or all of the Bison parser skeleton and distribute that work // under terms of your choice, so long as that work isn't itself a // parser generator using the skeleton or a modified version thereof // as a parser skeleton. Alternatively, if you modify or redistribute // the parser skeleton itself, you may (at your option) remove this // special exception, which will cause the skeleton and the resulting // Bison output files to be licensed under the GNU General Public // License without this special exception. // This special exception was added by the Free Software Foundation in // version 2.2 of Bison. // DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual, // especially those whose name start with YY_ or yy_. They are // private implementation details that can be changed or removed. #include "seclang-parser.hh" // Unqualified %code blocks. #line 325 "seclang-parser.yy" #include "src/parser/driver.h" #line 50 "seclang-parser.cc" #ifndef YY_ # if defined YYENABLE_NLS && YYENABLE_NLS # if ENABLE_NLS # include // FIXME: INFRINGES ON USER NAME SPACE. # define YY_(msgid) dgettext ("bison-runtime", msgid) # endif # endif # ifndef YY_ # define YY_(msgid) msgid # endif #endif // Whether we are compiled with exception support. #ifndef YY_EXCEPTIONS # if defined __GNUC__ && !defined __EXCEPTIONS # define YY_EXCEPTIONS 0 # else # define YY_EXCEPTIONS 1 # endif #endif #define YYRHSLOC(Rhs, K) ((Rhs)[K].location) /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. If N is 0, then set CURRENT to the empty location which ends the previous symbol: RHS[0] (always defined). */ # ifndef YYLLOC_DEFAULT # define YYLLOC_DEFAULT(Current, Rhs, N) \ do \ if (N) \ { \ (Current).begin = YYRHSLOC (Rhs, 1).begin; \ (Current).end = YYRHSLOC (Rhs, N).end; \ } \ else \ { \ (Current).begin = (Current).end = YYRHSLOC (Rhs, 0).end; \ } \ while (false) # endif // Enable debugging if requested. #if YYDEBUG // A pseudo ostream that takes yydebug_ into account. # define YYCDEBUG if (yydebug_) (*yycdebug_) # define YY_SYMBOL_PRINT(Title, Symbol) \ do { \ if (yydebug_) \ { \ *yycdebug_ << Title << ' '; \ yy_print_ (*yycdebug_, Symbol); \ *yycdebug_ << '\n'; \ } \ } while (false) # define YY_REDUCE_PRINT(Rule) \ do { \ if (yydebug_) \ yy_reduce_print_ (Rule); \ } while (false) # define YY_STACK_PRINT() \ do { \ if (yydebug_) \ yy_stack_print_ (); \ } while (false) #else // !YYDEBUG # define YYCDEBUG if (false) std::cerr # define YY_SYMBOL_PRINT(Title, Symbol) YYUSE (Symbol) # define YY_REDUCE_PRINT(Rule) static_cast (0) # define YY_STACK_PRINT() static_cast (0) #endif // !YYDEBUG #define yyerrok (yyerrstatus_ = 0) #define yyclearin (yyla.clear ()) #define YYACCEPT goto yyacceptlab #define YYABORT goto yyabortlab #define YYERROR goto yyerrorlab #define YYRECOVERING() (!!yyerrstatus_) namespace yy { #line 142 "seclang-parser.cc" /// Build a parser object. seclang_parser::seclang_parser (modsecurity::Parser::Driver& driver_yyarg) #if YYDEBUG : yydebug_ (false), yycdebug_ (&std::cerr), #else : #endif driver (driver_yyarg) {} seclang_parser::~seclang_parser () {} seclang_parser::syntax_error::~syntax_error () YY_NOEXCEPT YY_NOTHROW {} /*---------------. | symbol kinds. | `---------------*/ // by_state. seclang_parser::by_state::by_state () YY_NOEXCEPT : state (empty_state) {} seclang_parser::by_state::by_state (const by_state& that) YY_NOEXCEPT : state (that.state) {} void seclang_parser::by_state::clear () YY_NOEXCEPT { state = empty_state; } void seclang_parser::by_state::move (by_state& that) { state = that.state; that.clear (); } seclang_parser::by_state::by_state (state_type s) YY_NOEXCEPT : state (s) {} seclang_parser::symbol_kind_type seclang_parser::by_state::kind () const YY_NOEXCEPT { if (state == empty_state) return symbol_kind::S_YYEMPTY; else return YY_CAST (symbol_kind_type, yystos_[+state]); } seclang_parser::stack_symbol_type::stack_symbol_type () {} seclang_parser::stack_symbol_type::stack_symbol_type (YY_RVREF (stack_symbol_type) that) : super_type (YY_MOVE (that.state), YY_MOVE (that.location)) { switch (that.kind ()) { case symbol_kind::S_ACTION_ACCURACY: // "Accuracy" case symbol_kind::S_ACTION_ALLOW: // "Allow" case symbol_kind::S_ACTION_APPEND: // "Append" case symbol_kind::S_ACTION_AUDIT_LOG: // "AuditLog" case symbol_kind::S_ACTION_BLOCK: // "Block" case symbol_kind::S_ACTION_CAPTURE: // "Capture" case symbol_kind::S_ACTION_CHAIN: // "Chain" case symbol_kind::S_ACTION_CTL_AUDIT_ENGINE: // "ACTION_CTL_AUDIT_ENGINE" case symbol_kind::S_ACTION_CTL_AUDIT_LOG_PARTS: // "ACTION_CTL_AUDIT_LOG_PARTS" case symbol_kind::S_ACTION_CTL_BDY_JSON: // "ACTION_CTL_BDY_JSON" case symbol_kind::S_ACTION_CTL_BDY_XML: // "ACTION_CTL_BDY_XML" case symbol_kind::S_ACTION_CTL_BDY_URLENCODED: // "ACTION_CTL_BDY_URLENCODED" case symbol_kind::S_ACTION_CTL_FORCE_REQ_BODY_VAR: // "ACTION_CTL_FORCE_REQ_BODY_VAR" case symbol_kind::S_ACTION_CTL_REQUEST_BODY_ACCESS: // "ACTION_CTL_REQUEST_BODY_ACCESS" case symbol_kind::S_ACTION_CTL_RULE_REMOVE_BY_ID: // "ACTION_CTL_RULE_REMOVE_BY_ID" case symbol_kind::S_ACTION_CTL_RULE_REMOVE_BY_TAG: // "ACTION_CTL_RULE_REMOVE_BY_TAG" case symbol_kind::S_ACTION_CTL_RULE_REMOVE_TARGET_BY_ID: // "ACTION_CTL_RULE_REMOVE_TARGET_BY_ID" case symbol_kind::S_ACTION_CTL_RULE_REMOVE_TARGET_BY_TAG: // "ACTION_CTL_RULE_REMOVE_TARGET_BY_TAG" case symbol_kind::S_ACTION_DENY: // "Deny" case symbol_kind::S_ACTION_DEPRECATE_VAR: // "DeprecateVar" case symbol_kind::S_ACTION_DROP: // "Drop" case symbol_kind::S_ACTION_EXEC: // "Exec" case symbol_kind::S_ACTION_EXPIRE_VAR: // "ExpireVar" case symbol_kind::S_ACTION_ID: // "Id" case symbol_kind::S_ACTION_INITCOL: // "InitCol" case symbol_kind::S_ACTION_LOG: // "Log" case symbol_kind::S_ACTION_LOG_DATA: // "LogData" case symbol_kind::S_ACTION_MATURITY: // "Maturity" case symbol_kind::S_ACTION_MSG: // "Msg" case symbol_kind::S_ACTION_MULTI_MATCH: // "MultiMatch" case symbol_kind::S_ACTION_NO_AUDIT_LOG: // "NoAuditLog" case symbol_kind::S_ACTION_NO_LOG: // "NoLog" case symbol_kind::S_ACTION_PASS: // "Pass" case symbol_kind::S_ACTION_PAUSE: // "Pause" case symbol_kind::S_ACTION_PHASE: // "Phase" case symbol_kind::S_ACTION_PREPEND: // "Prepend" case symbol_kind::S_ACTION_PROXY: // "Proxy" case symbol_kind::S_ACTION_REDIRECT: // "Redirect" case symbol_kind::S_ACTION_REV: // "Rev" case symbol_kind::S_ACTION_SANITISE_ARG: // "SanitiseArg" case symbol_kind::S_ACTION_SANITISE_MATCHED: // "SanitiseMatched" case symbol_kind::S_ACTION_SANITISE_MATCHED_BYTES: // "SanitiseMatchedBytes" case symbol_kind::S_ACTION_SANITISE_REQUEST_HEADER: // "SanitiseRequestHeader" case symbol_kind::S_ACTION_SANITISE_RESPONSE_HEADER: // "SanitiseResponseHeader" case symbol_kind::S_ACTION_SETENV: // "SetEnv" case symbol_kind::S_ACTION_SETRSC: // "SetRsc" case symbol_kind::S_ACTION_SETSID: // "SetSid" case symbol_kind::S_ACTION_SETUID: // "SetUID" case symbol_kind::S_ACTION_SEVERITY: // "Severity" case symbol_kind::S_ACTION_SKIP: // "Skip" case symbol_kind::S_ACTION_SKIP_AFTER: // "SkipAfter" case symbol_kind::S_ACTION_STATUS: // "Status" case symbol_kind::S_ACTION_TAG: // "Tag" case symbol_kind::S_ACTION_TRANSFORMATION_BASE_64_ENCODE: // "ACTION_TRANSFORMATION_BASE_64_ENCODE" case symbol_kind::S_ACTION_TRANSFORMATION_BASE_64_DECODE: // "ACTION_TRANSFORMATION_BASE_64_DECODE" case symbol_kind::S_ACTION_TRANSFORMATION_BASE_64_DECODE_EXT: // "ACTION_TRANSFORMATION_BASE_64_DECODE_EXT" case symbol_kind::S_ACTION_TRANSFORMATION_CMD_LINE: // "ACTION_TRANSFORMATION_CMD_LINE" case symbol_kind::S_ACTION_TRANSFORMATION_COMPRESS_WHITESPACE: // "ACTION_TRANSFORMATION_COMPRESS_WHITESPACE" case symbol_kind::S_ACTION_TRANSFORMATION_CSS_DECODE: // "ACTION_TRANSFORMATION_CSS_DECODE" case symbol_kind::S_ACTION_TRANSFORMATION_ESCAPE_SEQ_DECODE: // "ACTION_TRANSFORMATION_ESCAPE_SEQ_DECODE" case symbol_kind::S_ACTION_TRANSFORMATION_HEX_ENCODE: // "ACTION_TRANSFORMATION_HEX_ENCODE" case symbol_kind::S_ACTION_TRANSFORMATION_HEX_DECODE: // "ACTION_TRANSFORMATION_HEX_DECODE" case symbol_kind::S_ACTION_TRANSFORMATION_HTML_ENTITY_DECODE: // "ACTION_TRANSFORMATION_HTML_ENTITY_DECODE" case symbol_kind::S_ACTION_TRANSFORMATION_JS_DECODE: // "ACTION_TRANSFORMATION_JS_DECODE" case symbol_kind::S_ACTION_TRANSFORMATION_LENGTH: // "ACTION_TRANSFORMATION_LENGTH" case symbol_kind::S_ACTION_TRANSFORMATION_LOWERCASE: // "ACTION_TRANSFORMATION_LOWERCASE" case symbol_kind::S_ACTION_TRANSFORMATION_MD5: // "ACTION_TRANSFORMATION_MD5" case symbol_kind::S_ACTION_TRANSFORMATION_NONE: // "ACTION_TRANSFORMATION_NONE" case symbol_kind::S_ACTION_TRANSFORMATION_NORMALISE_PATH: // "ACTION_TRANSFORMATION_NORMALISE_PATH" case symbol_kind::S_ACTION_TRANSFORMATION_NORMALISE_PATH_WIN: // "ACTION_TRANSFORMATION_NORMALISE_PATH_WIN" case symbol_kind::S_ACTION_TRANSFORMATION_PARITY_EVEN_7_BIT: // "ACTION_TRANSFORMATION_PARITY_EVEN_7_BIT" case symbol_kind::S_ACTION_TRANSFORMATION_PARITY_ODD_7_BIT: // "ACTION_TRANSFORMATION_PARITY_ODD_7_BIT" case symbol_kind::S_ACTION_TRANSFORMATION_PARITY_ZERO_7_BIT: // "ACTION_TRANSFORMATION_PARITY_ZERO_7_BIT" case symbol_kind::S_ACTION_TRANSFORMATION_REMOVE_COMMENTS: // "ACTION_TRANSFORMATION_REMOVE_COMMENTS" case symbol_kind::S_ACTION_TRANSFORMATION_REMOVE_COMMENTS_CHAR: // "ACTION_TRANSFORMATION_REMOVE_COMMENTS_CHAR" case symbol_kind::S_ACTION_TRANSFORMATION_REMOVE_NULLS: // "ACTION_TRANSFORMATION_REMOVE_NULLS" case symbol_kind::S_ACTION_TRANSFORMATION_REMOVE_WHITESPACE: // "ACTION_TRANSFORMATION_REMOVE_WHITESPACE" case symbol_kind::S_ACTION_TRANSFORMATION_REPLACE_COMMENTS: // "ACTION_TRANSFORMATION_REPLACE_COMMENTS" case symbol_kind::S_ACTION_TRANSFORMATION_REPLACE_NULLS: // "ACTION_TRANSFORMATION_REPLACE_NULLS" case symbol_kind::S_ACTION_TRANSFORMATION_SHA1: // "ACTION_TRANSFORMATION_SHA1" case symbol_kind::S_ACTION_TRANSFORMATION_SQL_HEX_DECODE: // "ACTION_TRANSFORMATION_SQL_HEX_DECODE" case symbol_kind::S_ACTION_TRANSFORMATION_TRIM: // "ACTION_TRANSFORMATION_TRIM" case symbol_kind::S_ACTION_TRANSFORMATION_TRIM_LEFT: // "ACTION_TRANSFORMATION_TRIM_LEFT" case symbol_kind::S_ACTION_TRANSFORMATION_TRIM_RIGHT: // "ACTION_TRANSFORMATION_TRIM_RIGHT" case symbol_kind::S_ACTION_TRANSFORMATION_UPPERCASE: // "ACTION_TRANSFORMATION_UPPERCASE" case symbol_kind::S_ACTION_TRANSFORMATION_URL_ENCODE: // "ACTION_TRANSFORMATION_URL_ENCODE" case symbol_kind::S_ACTION_TRANSFORMATION_URL_DECODE: // "ACTION_TRANSFORMATION_URL_DECODE" case symbol_kind::S_ACTION_TRANSFORMATION_URL_DECODE_UNI: // "ACTION_TRANSFORMATION_URL_DECODE_UNI" case symbol_kind::S_ACTION_TRANSFORMATION_UTF8_TO_UNICODE: // "ACTION_TRANSFORMATION_UTF8_TO_UNICODE" case symbol_kind::S_ACTION_VER: // "Ver" case symbol_kind::S_ACTION_XMLNS: // "xmlns" case symbol_kind::S_CONFIG_COMPONENT_SIG: // "CONFIG_COMPONENT_SIG" case symbol_kind::S_CONFIG_CONN_ENGINE: // "CONFIG_CONN_ENGINE" case symbol_kind::S_CONFIG_SEC_ARGUMENT_SEPARATOR: // "CONFIG_SEC_ARGUMENT_SEPARATOR" case symbol_kind::S_CONFIG_SEC_WEB_APP_ID: // "CONFIG_SEC_WEB_APP_ID" case symbol_kind::S_CONFIG_SEC_SERVER_SIG: // "CONFIG_SEC_SERVER_SIG" case symbol_kind::S_CONFIG_DIR_AUDIT_DIR: // "CONFIG_DIR_AUDIT_DIR" case symbol_kind::S_CONFIG_DIR_AUDIT_DIR_MOD: // "CONFIG_DIR_AUDIT_DIR_MOD" case symbol_kind::S_CONFIG_DIR_AUDIT_ENG: // "CONFIG_DIR_AUDIT_ENG" case symbol_kind::S_CONFIG_DIR_AUDIT_FLE_MOD: // "CONFIG_DIR_AUDIT_FLE_MOD" case symbol_kind::S_CONFIG_DIR_AUDIT_LOG: // "CONFIG_DIR_AUDIT_LOG" case symbol_kind::S_CONFIG_DIR_AUDIT_LOG2: // "CONFIG_DIR_AUDIT_LOG2" case symbol_kind::S_CONFIG_DIR_AUDIT_LOG_P: // "CONFIG_DIR_AUDIT_LOG_P" case symbol_kind::S_CONFIG_DIR_AUDIT_STS: // "CONFIG_DIR_AUDIT_STS" case symbol_kind::S_CONFIG_DIR_AUDIT_TPE: // "CONFIG_DIR_AUDIT_TPE" case symbol_kind::S_CONFIG_DIR_DEBUG_LOG: // "CONFIG_DIR_DEBUG_LOG" case symbol_kind::S_CONFIG_DIR_DEBUG_LVL: // "CONFIG_DIR_DEBUG_LVL" case symbol_kind::S_CONFIG_SEC_CACHE_TRANSFORMATIONS: // "CONFIG_SEC_CACHE_TRANSFORMATIONS" case symbol_kind::S_CONFIG_SEC_DISABLE_BACKEND_COMPRESS: // "CONFIG_SEC_DISABLE_BACKEND_COMPRESS" case symbol_kind::S_CONFIG_SEC_HASH_ENGINE: // "CONFIG_SEC_HASH_ENGINE" case symbol_kind::S_CONFIG_SEC_HASH_KEY: // "CONFIG_SEC_HASH_KEY" case symbol_kind::S_CONFIG_SEC_HASH_PARAM: // "CONFIG_SEC_HASH_PARAM" case symbol_kind::S_CONFIG_SEC_HASH_METHOD_RX: // "CONFIG_SEC_HASH_METHOD_RX" case symbol_kind::S_CONFIG_SEC_HASH_METHOD_PM: // "CONFIG_SEC_HASH_METHOD_PM" case symbol_kind::S_CONFIG_SEC_CHROOT_DIR: // "CONFIG_SEC_CHROOT_DIR" case symbol_kind::S_CONFIG_DIR_GEO_DB: // "CONFIG_DIR_GEO_DB" case symbol_kind::S_CONFIG_DIR_GSB_DB: // "CONFIG_DIR_GSB_DB" case symbol_kind::S_CONFIG_SEC_GUARDIAN_LOG: // "CONFIG_SEC_GUARDIAN_LOG" case symbol_kind::S_CONFIG_DIR_PCRE_MATCH_LIMIT: // "CONFIG_DIR_PCRE_MATCH_LIMIT" case symbol_kind::S_CONFIG_DIR_PCRE_MATCH_LIMIT_RECURSION: // "CONFIG_DIR_PCRE_MATCH_LIMIT_RECURSION" case symbol_kind::S_CONFIG_SEC_CONN_R_STATE_LIMIT: // "CONFIG_SEC_CONN_R_STATE_LIMIT" case symbol_kind::S_CONFIG_SEC_CONN_W_STATE_LIMIT: // "CONFIG_SEC_CONN_W_STATE_LIMIT" case symbol_kind::S_CONFIG_SEC_SENSOR_ID: // "CONFIG_SEC_SENSOR_ID" case symbol_kind::S_CONFIG_DIR_ARGS_LIMIT: // "CONFIG_DIR_ARGS_LIMIT" case symbol_kind::S_CONFIG_DIR_REQ_BODY_JSON_DEPTH_LIMIT: // "CONFIG_DIR_REQ_BODY_JSON_DEPTH_LIMIT" case symbol_kind::S_CONFIG_DIR_REQ_BODY: // "CONFIG_DIR_REQ_BODY" case symbol_kind::S_CONFIG_DIR_REQ_BODY_IN_MEMORY_LIMIT: // "CONFIG_DIR_REQ_BODY_IN_MEMORY_LIMIT" case symbol_kind::S_CONFIG_DIR_REQ_BODY_LIMIT: // "CONFIG_DIR_REQ_BODY_LIMIT" case symbol_kind::S_CONFIG_DIR_REQ_BODY_LIMIT_ACTION: // "CONFIG_DIR_REQ_BODY_LIMIT_ACTION" case symbol_kind::S_CONFIG_DIR_REQ_BODY_NO_FILES_LIMIT: // "CONFIG_DIR_REQ_BODY_NO_FILES_LIMIT" case symbol_kind::S_CONFIG_DIR_RES_BODY: // "CONFIG_DIR_RES_BODY" case symbol_kind::S_CONFIG_DIR_RES_BODY_LIMIT: // "CONFIG_DIR_RES_BODY_LIMIT" case symbol_kind::S_CONFIG_DIR_RES_BODY_LIMIT_ACTION: // "CONFIG_DIR_RES_BODY_LIMIT_ACTION" case symbol_kind::S_CONFIG_SEC_RULE_INHERITANCE: // "CONFIG_SEC_RULE_INHERITANCE" case symbol_kind::S_CONFIG_SEC_RULE_PERF_TIME: // "CONFIG_SEC_RULE_PERF_TIME" case symbol_kind::S_CONFIG_DIR_RULE_ENG: // "CONFIG_DIR_RULE_ENG" case symbol_kind::S_CONFIG_DIR_SEC_ACTION: // "CONFIG_DIR_SEC_ACTION" case symbol_kind::S_CONFIG_DIR_SEC_DEFAULT_ACTION: // "CONFIG_DIR_SEC_DEFAULT_ACTION" case symbol_kind::S_CONFIG_DIR_SEC_MARKER: // "CONFIG_DIR_SEC_MARKER" case symbol_kind::S_CONFIG_DIR_UNICODE_MAP_FILE: // "CONFIG_DIR_UNICODE_MAP_FILE" case symbol_kind::S_CONFIG_DIR_UNICODE_CODE_PAGE: // "CONFIG_DIR_UNICODE_CODE_PAGE" case symbol_kind::S_CONFIG_SEC_COLLECTION_TIMEOUT: // "CONFIG_SEC_COLLECTION_TIMEOUT" case symbol_kind::S_CONFIG_SEC_HTTP_BLKEY: // "CONFIG_SEC_HTTP_BLKEY" case symbol_kind::S_CONFIG_SEC_INTERCEPT_ON_ERROR: // "CONFIG_SEC_INTERCEPT_ON_ERROR" case symbol_kind::S_CONFIG_SEC_REMOTE_RULES_FAIL_ACTION: // "CONFIG_SEC_REMOTE_RULES_FAIL_ACTION" case symbol_kind::S_CONFIG_SEC_RULE_REMOVE_BY_ID: // "CONFIG_SEC_RULE_REMOVE_BY_ID" case symbol_kind::S_CONFIG_SEC_RULE_REMOVE_BY_MSG: // "CONFIG_SEC_RULE_REMOVE_BY_MSG" case symbol_kind::S_CONFIG_SEC_RULE_REMOVE_BY_TAG: // "CONFIG_SEC_RULE_REMOVE_BY_TAG" case symbol_kind::S_CONFIG_SEC_RULE_UPDATE_TARGET_BY_TAG: // "CONFIG_SEC_RULE_UPDATE_TARGET_BY_TAG" case symbol_kind::S_CONFIG_SEC_RULE_UPDATE_TARGET_BY_MSG: // "CONFIG_SEC_RULE_UPDATE_TARGET_BY_MSG" case symbol_kind::S_CONFIG_SEC_RULE_UPDATE_TARGET_BY_ID: // "CONFIG_SEC_RULE_UPDATE_TARGET_BY_ID" case symbol_kind::S_CONFIG_SEC_RULE_UPDATE_ACTION_BY_ID: // "CONFIG_SEC_RULE_UPDATE_ACTION_BY_ID" case symbol_kind::S_CONFIG_UPDLOAD_KEEP_FILES: // "CONFIG_UPDLOAD_KEEP_FILES" case symbol_kind::S_CONFIG_UPDLOAD_SAVE_TMP_FILES: // "CONFIG_UPDLOAD_SAVE_TMP_FILES" case symbol_kind::S_CONFIG_UPLOAD_DIR: // "CONFIG_UPLOAD_DIR" case symbol_kind::S_CONFIG_UPLOAD_FILE_LIMIT: // "CONFIG_UPLOAD_FILE_LIMIT" case symbol_kind::S_CONFIG_UPLOAD_FILE_MODE: // "CONFIG_UPLOAD_FILE_MODE" case symbol_kind::S_CONFIG_VALUE_ABORT: // "CONFIG_VALUE_ABORT" case symbol_kind::S_CONFIG_VALUE_DETC: // "CONFIG_VALUE_DETC" case symbol_kind::S_CONFIG_VALUE_HTTPS: // "CONFIG_VALUE_HTTPS" case symbol_kind::S_CONFIG_VALUE_OFF: // "CONFIG_VALUE_OFF" case symbol_kind::S_CONFIG_VALUE_ON: // "CONFIG_VALUE_ON" case symbol_kind::S_CONFIG_VALUE_PARALLEL: // "CONFIG_VALUE_PARALLEL" case symbol_kind::S_CONFIG_VALUE_PROCESS_PARTIAL: // "CONFIG_VALUE_PROCESS_PARTIAL" case symbol_kind::S_CONFIG_VALUE_REJECT: // "CONFIG_VALUE_REJECT" case symbol_kind::S_CONFIG_VALUE_RELEVANT_ONLY: // "CONFIG_VALUE_RELEVANT_ONLY" case symbol_kind::S_CONFIG_VALUE_SERIAL: // "CONFIG_VALUE_SERIAL" case symbol_kind::S_CONFIG_VALUE_WARN: // "CONFIG_VALUE_WARN" case symbol_kind::S_CONFIG_XML_EXTERNAL_ENTITY: // "CONFIG_XML_EXTERNAL_ENTITY" case symbol_kind::S_CONGIG_DIR_RESPONSE_BODY_MP: // "CONGIG_DIR_RESPONSE_BODY_MP" case symbol_kind::S_CONGIG_DIR_SEC_ARG_SEP: // "CONGIG_DIR_SEC_ARG_SEP" case symbol_kind::S_CONGIG_DIR_SEC_COOKIE_FORMAT: // "CONGIG_DIR_SEC_COOKIE_FORMAT" case symbol_kind::S_CONFIG_SEC_COOKIEV0_SEPARATOR: // "CONFIG_SEC_COOKIEV0_SEPARATOR" case symbol_kind::S_CONGIG_DIR_SEC_DATA_DIR: // "CONGIG_DIR_SEC_DATA_DIR" case symbol_kind::S_CONGIG_DIR_SEC_STATUS_ENGINE: // "CONGIG_DIR_SEC_STATUS_ENGINE" case symbol_kind::S_CONFIG_SEC_STREAM_IN_BODY_INSPECTION: // "CONFIG_SEC_STREAM_IN_BODY_INSPECTION" case symbol_kind::S_CONFIG_SEC_STREAM_OUT_BODY_INSPECTION: // "CONFIG_SEC_STREAM_OUT_BODY_INSPECTION" case symbol_kind::S_CONGIG_DIR_SEC_TMP_DIR: // "CONGIG_DIR_SEC_TMP_DIR" case symbol_kind::S_DIRECTIVE: // "DIRECTIVE" case symbol_kind::S_DIRECTIVE_SECRULESCRIPT: // "DIRECTIVE_SECRULESCRIPT" case symbol_kind::S_FREE_TEXT_QUOTE_MACRO_EXPANSION: // "FREE_TEXT_QUOTE_MACRO_EXPANSION" case symbol_kind::S_QUOTATION_MARK: // "QUOTATION_MARK" case symbol_kind::S_RUN_TIME_VAR_BLD: // "RUN_TIME_VAR_BLD" case symbol_kind::S_RUN_TIME_VAR_DUR: // "RUN_TIME_VAR_DUR" case symbol_kind::S_RUN_TIME_VAR_HSV: // "RUN_TIME_VAR_HSV" case symbol_kind::S_RUN_TIME_VAR_REMOTE_USER: // "RUN_TIME_VAR_REMOTE_USER" case symbol_kind::S_RUN_TIME_VAR_TIME: // "RUN_TIME_VAR_TIME" case symbol_kind::S_RUN_TIME_VAR_TIME_DAY: // "RUN_TIME_VAR_TIME_DAY" case symbol_kind::S_RUN_TIME_VAR_TIME_EPOCH: // "RUN_TIME_VAR_TIME_EPOCH" case symbol_kind::S_RUN_TIME_VAR_TIME_HOUR: // "RUN_TIME_VAR_TIME_HOUR" case symbol_kind::S_RUN_TIME_VAR_TIME_MIN: // "RUN_TIME_VAR_TIME_MIN" case symbol_kind::S_RUN_TIME_VAR_TIME_MON: // "RUN_TIME_VAR_TIME_MON" case symbol_kind::S_RUN_TIME_VAR_TIME_SEC: // "RUN_TIME_VAR_TIME_SEC" case symbol_kind::S_RUN_TIME_VAR_TIME_WDAY: // "RUN_TIME_VAR_TIME_WDAY" case symbol_kind::S_RUN_TIME_VAR_TIME_YEAR: // "RUN_TIME_VAR_TIME_YEAR" case symbol_kind::S_VARIABLE: // "VARIABLE" case symbol_kind::S_DICT_ELEMENT: // "Dictionary element" case symbol_kind::S_DICT_ELEMENT_REGEXP: // "Dictionary element, selected by regexp" value.YY_MOVE_OR_COPY< std::string > (YY_MOVE (that.value)); break; case symbol_kind::S_op: // op case symbol_kind::S_op_before_init: // op_before_init value.YY_MOVE_OR_COPY< std::unique_ptr > (YY_MOVE (that.value)); break; case symbol_kind::S_run_time_string: // run_time_string value.YY_MOVE_OR_COPY< std::unique_ptr > (YY_MOVE (that.value)); break; case symbol_kind::S_var: // var value.YY_MOVE_OR_COPY< std::unique_ptr > (YY_MOVE (that.value)); break; case symbol_kind::S_act: // act case symbol_kind::S_setvar_action: // setvar_action value.YY_MOVE_OR_COPY< std::unique_ptr > (YY_MOVE (that.value)); break; case symbol_kind::S_variables: // variables case symbol_kind::S_variables_pre_process: // variables_pre_process case symbol_kind::S_variables_may_be_quoted: // variables_may_be_quoted value.YY_MOVE_OR_COPY< std::unique_ptr > > > (YY_MOVE (that.value)); break; case symbol_kind::S_actions: // actions case symbol_kind::S_actions_may_quoted: // actions_may_quoted value.YY_MOVE_OR_COPY< std::unique_ptr > > > (YY_MOVE (that.value)); break; default: break; } #if 201103L <= YY_CPLUSPLUS // that is emptied. that.state = empty_state; #endif } seclang_parser::stack_symbol_type::stack_symbol_type (state_type s, YY_MOVE_REF (symbol_type) that) : super_type (s, YY_MOVE (that.location)) { switch (that.kind ()) { case symbol_kind::S_ACTION_ACCURACY: // "Accuracy" case symbol_kind::S_ACTION_ALLOW: // "Allow" case symbol_kind::S_ACTION_APPEND: // "Append" case symbol_kind::S_ACTION_AUDIT_LOG: // "AuditLog" case symbol_kind::S_ACTION_BLOCK: // "Block" case symbol_kind::S_ACTION_CAPTURE: // "Capture" case symbol_kind::S_ACTION_CHAIN: // "Chain" case symbol_kind::S_ACTION_CTL_AUDIT_ENGINE: // "ACTION_CTL_AUDIT_ENGINE" case symbol_kind::S_ACTION_CTL_AUDIT_LOG_PARTS: // "ACTION_CTL_AUDIT_LOG_PARTS" case symbol_kind::S_ACTION_CTL_BDY_JSON: // "ACTION_CTL_BDY_JSON" case symbol_kind::S_ACTION_CTL_BDY_XML: // "ACTION_CTL_BDY_XML" case symbol_kind::S_ACTION_CTL_BDY_URLENCODED: // "ACTION_CTL_BDY_URLENCODED" case symbol_kind::S_ACTION_CTL_FORCE_REQ_BODY_VAR: // "ACTION_CTL_FORCE_REQ_BODY_VAR" case symbol_kind::S_ACTION_CTL_REQUEST_BODY_ACCESS: // "ACTION_CTL_REQUEST_BODY_ACCESS" case symbol_kind::S_ACTION_CTL_RULE_REMOVE_BY_ID: // "ACTION_CTL_RULE_REMOVE_BY_ID" case symbol_kind::S_ACTION_CTL_RULE_REMOVE_BY_TAG: // "ACTION_CTL_RULE_REMOVE_BY_TAG" case symbol_kind::S_ACTION_CTL_RULE_REMOVE_TARGET_BY_ID: // "ACTION_CTL_RULE_REMOVE_TARGET_BY_ID" case symbol_kind::S_ACTION_CTL_RULE_REMOVE_TARGET_BY_TAG: // "ACTION_CTL_RULE_REMOVE_TARGET_BY_TAG" case symbol_kind::S_ACTION_DENY: // "Deny" case symbol_kind::S_ACTION_DEPRECATE_VAR: // "DeprecateVar" case symbol_kind::S_ACTION_DROP: // "Drop" case symbol_kind::S_ACTION_EXEC: // "Exec" case symbol_kind::S_ACTION_EXPIRE_VAR: // "ExpireVar" case symbol_kind::S_ACTION_ID: // "Id" case symbol_kind::S_ACTION_INITCOL: // "InitCol" case symbol_kind::S_ACTION_LOG: // "Log" case symbol_kind::S_ACTION_LOG_DATA: // "LogData" case symbol_kind::S_ACTION_MATURITY: // "Maturity" case symbol_kind::S_ACTION_MSG: // "Msg" case symbol_kind::S_ACTION_MULTI_MATCH: // "MultiMatch" case symbol_kind::S_ACTION_NO_AUDIT_LOG: // "NoAuditLog" case symbol_kind::S_ACTION_NO_LOG: // "NoLog" case symbol_kind::S_ACTION_PASS: // "Pass" case symbol_kind::S_ACTION_PAUSE: // "Pause" case symbol_kind::S_ACTION_PHASE: // "Phase" case symbol_kind::S_ACTION_PREPEND: // "Prepend" case symbol_kind::S_ACTION_PROXY: // "Proxy" case symbol_kind::S_ACTION_REDIRECT: // "Redirect" case symbol_kind::S_ACTION_REV: // "Rev" case symbol_kind::S_ACTION_SANITISE_ARG: // "SanitiseArg" case symbol_kind::S_ACTION_SANITISE_MATCHED: // "SanitiseMatched" case symbol_kind::S_ACTION_SANITISE_MATCHED_BYTES: // "SanitiseMatchedBytes" case symbol_kind::S_ACTION_SANITISE_REQUEST_HEADER: // "SanitiseRequestHeader" case symbol_kind::S_ACTION_SANITISE_RESPONSE_HEADER: // "SanitiseResponseHeader" case symbol_kind::S_ACTION_SETENV: // "SetEnv" case symbol_kind::S_ACTION_SETRSC: // "SetRsc" case symbol_kind::S_ACTION_SETSID: // "SetSid" case symbol_kind::S_ACTION_SETUID: // "SetUID" case symbol_kind::S_ACTION_SEVERITY: // "Severity" case symbol_kind::S_ACTION_SKIP: // "Skip" case symbol_kind::S_ACTION_SKIP_AFTER: // "SkipAfter" case symbol_kind::S_ACTION_STATUS: // "Status" case symbol_kind::S_ACTION_TAG: // "Tag" case symbol_kind::S_ACTION_TRANSFORMATION_BASE_64_ENCODE: // "ACTION_TRANSFORMATION_BASE_64_ENCODE" case symbol_kind::S_ACTION_TRANSFORMATION_BASE_64_DECODE: // "ACTION_TRANSFORMATION_BASE_64_DECODE" case symbol_kind::S_ACTION_TRANSFORMATION_BASE_64_DECODE_EXT: // "ACTION_TRANSFORMATION_BASE_64_DECODE_EXT" case symbol_kind::S_ACTION_TRANSFORMATION_CMD_LINE: // "ACTION_TRANSFORMATION_CMD_LINE" case symbol_kind::S_ACTION_TRANSFORMATION_COMPRESS_WHITESPACE: // "ACTION_TRANSFORMATION_COMPRESS_WHITESPACE" case symbol_kind::S_ACTION_TRANSFORMATION_CSS_DECODE: // "ACTION_TRANSFORMATION_CSS_DECODE" case symbol_kind::S_ACTION_TRANSFORMATION_ESCAPE_SEQ_DECODE: // "ACTION_TRANSFORMATION_ESCAPE_SEQ_DECODE" case symbol_kind::S_ACTION_TRANSFORMATION_HEX_ENCODE: // "ACTION_TRANSFORMATION_HEX_ENCODE" case symbol_kind::S_ACTION_TRANSFORMATION_HEX_DECODE: // "ACTION_TRANSFORMATION_HEX_DECODE" case symbol_kind::S_ACTION_TRANSFORMATION_HTML_ENTITY_DECODE: // "ACTION_TRANSFORMATION_HTML_ENTITY_DECODE" case symbol_kind::S_ACTION_TRANSFORMATION_JS_DECODE: // "ACTION_TRANSFORMATION_JS_DECODE" case symbol_kind::S_ACTION_TRANSFORMATION_LENGTH: // "ACTION_TRANSFORMATION_LENGTH" case symbol_kind::S_ACTION_TRANSFORMATION_LOWERCASE: // "ACTION_TRANSFORMATION_LOWERCASE" case symbol_kind::S_ACTION_TRANSFORMATION_MD5: // "ACTION_TRANSFORMATION_MD5" case symbol_kind::S_ACTION_TRANSFORMATION_NONE: // "ACTION_TRANSFORMATION_NONE" case symbol_kind::S_ACTION_TRANSFORMATION_NORMALISE_PATH: // "ACTION_TRANSFORMATION_NORMALISE_PATH" case symbol_kind::S_ACTION_TRANSFORMATION_NORMALISE_PATH_WIN: // "ACTION_TRANSFORMATION_NORMALISE_PATH_WIN" case symbol_kind::S_ACTION_TRANSFORMATION_PARITY_EVEN_7_BIT: // "ACTION_TRANSFORMATION_PARITY_EVEN_7_BIT" case symbol_kind::S_ACTION_TRANSFORMATION_PARITY_ODD_7_BIT: // "ACTION_TRANSFORMATION_PARITY_ODD_7_BIT" case symbol_kind::S_ACTION_TRANSFORMATION_PARITY_ZERO_7_BIT: // "ACTION_TRANSFORMATION_PARITY_ZERO_7_BIT" case symbol_kind::S_ACTION_TRANSFORMATION_REMOVE_COMMENTS: // "ACTION_TRANSFORMATION_REMOVE_COMMENTS" case symbol_kind::S_ACTION_TRANSFORMATION_REMOVE_COMMENTS_CHAR: // "ACTION_TRANSFORMATION_REMOVE_COMMENTS_CHAR" case symbol_kind::S_ACTION_TRANSFORMATION_REMOVE_NULLS: // "ACTION_TRANSFORMATION_REMOVE_NULLS" case symbol_kind::S_ACTION_TRANSFORMATION_REMOVE_WHITESPACE: // "ACTION_TRANSFORMATION_REMOVE_WHITESPACE" case symbol_kind::S_ACTION_TRANSFORMATION_REPLACE_COMMENTS: // "ACTION_TRANSFORMATION_REPLACE_COMMENTS" case symbol_kind::S_ACTION_TRANSFORMATION_REPLACE_NULLS: // "ACTION_TRANSFORMATION_REPLACE_NULLS" case symbol_kind::S_ACTION_TRANSFORMATION_SHA1: // "ACTION_TRANSFORMATION_SHA1" case symbol_kind::S_ACTION_TRANSFORMATION_SQL_HEX_DECODE: // "ACTION_TRANSFORMATION_SQL_HEX_DECODE" case symbol_kind::S_ACTION_TRANSFORMATION_TRIM: // "ACTION_TRANSFORMATION_TRIM" case symbol_kind::S_ACTION_TRANSFORMATION_TRIM_LEFT: // "ACTION_TRANSFORMATION_TRIM_LEFT" case symbol_kind::S_ACTION_TRANSFORMATION_TRIM_RIGHT: // "ACTION_TRANSFORMATION_TRIM_RIGHT" case symbol_kind::S_ACTION_TRANSFORMATION_UPPERCASE: // "ACTION_TRANSFORMATION_UPPERCASE" case symbol_kind::S_ACTION_TRANSFORMATION_URL_ENCODE: // "ACTION_TRANSFORMATION_URL_ENCODE" case symbol_kind::S_ACTION_TRANSFORMATION_URL_DECODE: // "ACTION_TRANSFORMATION_URL_DECODE" case symbol_kind::S_ACTION_TRANSFORMATION_URL_DECODE_UNI: // "ACTION_TRANSFORMATION_URL_DECODE_UNI" case symbol_kind::S_ACTION_TRANSFORMATION_UTF8_TO_UNICODE: // "ACTION_TRANSFORMATION_UTF8_TO_UNICODE" case symbol_kind::S_ACTION_VER: // "Ver" case symbol_kind::S_ACTION_XMLNS: // "xmlns" case symbol_kind::S_CONFIG_COMPONENT_SIG: // "CONFIG_COMPONENT_SIG" case symbol_kind::S_CONFIG_CONN_ENGINE: // "CONFIG_CONN_ENGINE" case symbol_kind::S_CONFIG_SEC_ARGUMENT_SEPARATOR: // "CONFIG_SEC_ARGUMENT_SEPARATOR" case symbol_kind::S_CONFIG_SEC_WEB_APP_ID: // "CONFIG_SEC_WEB_APP_ID" case symbol_kind::S_CONFIG_SEC_SERVER_SIG: // "CONFIG_SEC_SERVER_SIG" case symbol_kind::S_CONFIG_DIR_AUDIT_DIR: // "CONFIG_DIR_AUDIT_DIR" case symbol_kind::S_CONFIG_DIR_AUDIT_DIR_MOD: // "CONFIG_DIR_AUDIT_DIR_MOD" case symbol_kind::S_CONFIG_DIR_AUDIT_ENG: // "CONFIG_DIR_AUDIT_ENG" case symbol_kind::S_CONFIG_DIR_AUDIT_FLE_MOD: // "CONFIG_DIR_AUDIT_FLE_MOD" case symbol_kind::S_CONFIG_DIR_AUDIT_LOG: // "CONFIG_DIR_AUDIT_LOG" case symbol_kind::S_CONFIG_DIR_AUDIT_LOG2: // "CONFIG_DIR_AUDIT_LOG2" case symbol_kind::S_CONFIG_DIR_AUDIT_LOG_P: // "CONFIG_DIR_AUDIT_LOG_P" case symbol_kind::S_CONFIG_DIR_AUDIT_STS: // "CONFIG_DIR_AUDIT_STS" case symbol_kind::S_CONFIG_DIR_AUDIT_TPE: // "CONFIG_DIR_AUDIT_TPE" case symbol_kind::S_CONFIG_DIR_DEBUG_LOG: // "CONFIG_DIR_DEBUG_LOG" case symbol_kind::S_CONFIG_DIR_DEBUG_LVL: // "CONFIG_DIR_DEBUG_LVL" case symbol_kind::S_CONFIG_SEC_CACHE_TRANSFORMATIONS: // "CONFIG_SEC_CACHE_TRANSFORMATIONS" case symbol_kind::S_CONFIG_SEC_DISABLE_BACKEND_COMPRESS: // "CONFIG_SEC_DISABLE_BACKEND_COMPRESS" case symbol_kind::S_CONFIG_SEC_HASH_ENGINE: // "CONFIG_SEC_HASH_ENGINE" case symbol_kind::S_CONFIG_SEC_HASH_KEY: // "CONFIG_SEC_HASH_KEY" case symbol_kind::S_CONFIG_SEC_HASH_PARAM: // "CONFIG_SEC_HASH_PARAM" case symbol_kind::S_CONFIG_SEC_HASH_METHOD_RX: // "CONFIG_SEC_HASH_METHOD_RX" case symbol_kind::S_CONFIG_SEC_HASH_METHOD_PM: // "CONFIG_SEC_HASH_METHOD_PM" case symbol_kind::S_CONFIG_SEC_CHROOT_DIR: // "CONFIG_SEC_CHROOT_DIR" case symbol_kind::S_CONFIG_DIR_GEO_DB: // "CONFIG_DIR_GEO_DB" case symbol_kind::S_CONFIG_DIR_GSB_DB: // "CONFIG_DIR_GSB_DB" case symbol_kind::S_CONFIG_SEC_GUARDIAN_LOG: // "CONFIG_SEC_GUARDIAN_LOG" case symbol_kind::S_CONFIG_DIR_PCRE_MATCH_LIMIT: // "CONFIG_DIR_PCRE_MATCH_LIMIT" case symbol_kind::S_CONFIG_DIR_PCRE_MATCH_LIMIT_RECURSION: // "CONFIG_DIR_PCRE_MATCH_LIMIT_RECURSION" case symbol_kind::S_CONFIG_SEC_CONN_R_STATE_LIMIT: // "CONFIG_SEC_CONN_R_STATE_LIMIT" case symbol_kind::S_CONFIG_SEC_CONN_W_STATE_LIMIT: // "CONFIG_SEC_CONN_W_STATE_LIMIT" case symbol_kind::S_CONFIG_SEC_SENSOR_ID: // "CONFIG_SEC_SENSOR_ID" case symbol_kind::S_CONFIG_DIR_ARGS_LIMIT: // "CONFIG_DIR_ARGS_LIMIT" case symbol_kind::S_CONFIG_DIR_REQ_BODY_JSON_DEPTH_LIMIT: // "CONFIG_DIR_REQ_BODY_JSON_DEPTH_LIMIT" case symbol_kind::S_CONFIG_DIR_REQ_BODY: // "CONFIG_DIR_REQ_BODY" case symbol_kind::S_CONFIG_DIR_REQ_BODY_IN_MEMORY_LIMIT: // "CONFIG_DIR_REQ_BODY_IN_MEMORY_LIMIT" case symbol_kind::S_CONFIG_DIR_REQ_BODY_LIMIT: // "CONFIG_DIR_REQ_BODY_LIMIT" case symbol_kind::S_CONFIG_DIR_REQ_BODY_LIMIT_ACTION: // "CONFIG_DIR_REQ_BODY_LIMIT_ACTION" case symbol_kind::S_CONFIG_DIR_REQ_BODY_NO_FILES_LIMIT: // "CONFIG_DIR_REQ_BODY_NO_FILES_LIMIT" case symbol_kind::S_CONFIG_DIR_RES_BODY: // "CONFIG_DIR_RES_BODY" case symbol_kind::S_CONFIG_DIR_RES_BODY_LIMIT: // "CONFIG_DIR_RES_BODY_LIMIT" case symbol_kind::S_CONFIG_DIR_RES_BODY_LIMIT_ACTION: // "CONFIG_DIR_RES_BODY_LIMIT_ACTION" case symbol_kind::S_CONFIG_SEC_RULE_INHERITANCE: // "CONFIG_SEC_RULE_INHERITANCE" case symbol_kind::S_CONFIG_SEC_RULE_PERF_TIME: // "CONFIG_SEC_RULE_PERF_TIME" case symbol_kind::S_CONFIG_DIR_RULE_ENG: // "CONFIG_DIR_RULE_ENG" case symbol_kind::S_CONFIG_DIR_SEC_ACTION: // "CONFIG_DIR_SEC_ACTION" case symbol_kind::S_CONFIG_DIR_SEC_DEFAULT_ACTION: // "CONFIG_DIR_SEC_DEFAULT_ACTION" case symbol_kind::S_CONFIG_DIR_SEC_MARKER: // "CONFIG_DIR_SEC_MARKER" case symbol_kind::S_CONFIG_DIR_UNICODE_MAP_FILE: // "CONFIG_DIR_UNICODE_MAP_FILE" case symbol_kind::S_CONFIG_DIR_UNICODE_CODE_PAGE: // "CONFIG_DIR_UNICODE_CODE_PAGE" case symbol_kind::S_CONFIG_SEC_COLLECTION_TIMEOUT: // "CONFIG_SEC_COLLECTION_TIMEOUT" case symbol_kind::S_CONFIG_SEC_HTTP_BLKEY: // "CONFIG_SEC_HTTP_BLKEY" case symbol_kind::S_CONFIG_SEC_INTERCEPT_ON_ERROR: // "CONFIG_SEC_INTERCEPT_ON_ERROR" case symbol_kind::S_CONFIG_SEC_REMOTE_RULES_FAIL_ACTION: // "CONFIG_SEC_REMOTE_RULES_FAIL_ACTION" case symbol_kind::S_CONFIG_SEC_RULE_REMOVE_BY_ID: // "CONFIG_SEC_RULE_REMOVE_BY_ID" case symbol_kind::S_CONFIG_SEC_RULE_REMOVE_BY_MSG: // "CONFIG_SEC_RULE_REMOVE_BY_MSG" case symbol_kind::S_CONFIG_SEC_RULE_REMOVE_BY_TAG: // "CONFIG_SEC_RULE_REMOVE_BY_TAG" case symbol_kind::S_CONFIG_SEC_RULE_UPDATE_TARGET_BY_TAG: // "CONFIG_SEC_RULE_UPDATE_TARGET_BY_TAG" case symbol_kind::S_CONFIG_SEC_RULE_UPDATE_TARGET_BY_MSG: // "CONFIG_SEC_RULE_UPDATE_TARGET_BY_MSG" case symbol_kind::S_CONFIG_SEC_RULE_UPDATE_TARGET_BY_ID: // "CONFIG_SEC_RULE_UPDATE_TARGET_BY_ID" case symbol_kind::S_CONFIG_SEC_RULE_UPDATE_ACTION_BY_ID: // "CONFIG_SEC_RULE_UPDATE_ACTION_BY_ID" case symbol_kind::S_CONFIG_UPDLOAD_KEEP_FILES: // "CONFIG_UPDLOAD_KEEP_FILES" case symbol_kind::S_CONFIG_UPDLOAD_SAVE_TMP_FILES: // "CONFIG_UPDLOAD_SAVE_TMP_FILES" case symbol_kind::S_CONFIG_UPLOAD_DIR: // "CONFIG_UPLOAD_DIR" case symbol_kind::S_CONFIG_UPLOAD_FILE_LIMIT: // "CONFIG_UPLOAD_FILE_LIMIT" case symbol_kind::S_CONFIG_UPLOAD_FILE_MODE: // "CONFIG_UPLOAD_FILE_MODE" case symbol_kind::S_CONFIG_VALUE_ABORT: // "CONFIG_VALUE_ABORT" case symbol_kind::S_CONFIG_VALUE_DETC: // "CONFIG_VALUE_DETC" case symbol_kind::S_CONFIG_VALUE_HTTPS: // "CONFIG_VALUE_HTTPS" case symbol_kind::S_CONFIG_VALUE_OFF: // "CONFIG_VALUE_OFF" case symbol_kind::S_CONFIG_VALUE_ON: // "CONFIG_VALUE_ON" case symbol_kind::S_CONFIG_VALUE_PARALLEL: // "CONFIG_VALUE_PARALLEL" case symbol_kind::S_CONFIG_VALUE_PROCESS_PARTIAL: // "CONFIG_VALUE_PROCESS_PARTIAL" case symbol_kind::S_CONFIG_VALUE_REJECT: // "CONFIG_VALUE_REJECT" case symbol_kind::S_CONFIG_VALUE_RELEVANT_ONLY: // "CONFIG_VALUE_RELEVANT_ONLY" case symbol_kind::S_CONFIG_VALUE_SERIAL: // "CONFIG_VALUE_SERIAL" case symbol_kind::S_CONFIG_VALUE_WARN: // "CONFIG_VALUE_WARN" case symbol_kind::S_CONFIG_XML_EXTERNAL_ENTITY: // "CONFIG_XML_EXTERNAL_ENTITY" case symbol_kind::S_CONGIG_DIR_RESPONSE_BODY_MP: // "CONGIG_DIR_RESPONSE_BODY_MP" case symbol_kind::S_CONGIG_DIR_SEC_ARG_SEP: // "CONGIG_DIR_SEC_ARG_SEP" case symbol_kind::S_CONGIG_DIR_SEC_COOKIE_FORMAT: // "CONGIG_DIR_SEC_COOKIE_FORMAT" case symbol_kind::S_CONFIG_SEC_COOKIEV0_SEPARATOR: // "CONFIG_SEC_COOKIEV0_SEPARATOR" case symbol_kind::S_CONGIG_DIR_SEC_DATA_DIR: // "CONGIG_DIR_SEC_DATA_DIR" case symbol_kind::S_CONGIG_DIR_SEC_STATUS_ENGINE: // "CONGIG_DIR_SEC_STATUS_ENGINE" case symbol_kind::S_CONFIG_SEC_STREAM_IN_BODY_INSPECTION: // "CONFIG_SEC_STREAM_IN_BODY_INSPECTION" case symbol_kind::S_CONFIG_SEC_STREAM_OUT_BODY_INSPECTION: // "CONFIG_SEC_STREAM_OUT_BODY_INSPECTION" case symbol_kind::S_CONGIG_DIR_SEC_TMP_DIR: // "CONGIG_DIR_SEC_TMP_DIR" case symbol_kind::S_DIRECTIVE: // "DIRECTIVE" case symbol_kind::S_DIRECTIVE_SECRULESCRIPT: // "DIRECTIVE_SECRULESCRIPT" case symbol_kind::S_FREE_TEXT_QUOTE_MACRO_EXPANSION: // "FREE_TEXT_QUOTE_MACRO_EXPANSION" case symbol_kind::S_QUOTATION_MARK: // "QUOTATION_MARK" case symbol_kind::S_RUN_TIME_VAR_BLD: // "RUN_TIME_VAR_BLD" case symbol_kind::S_RUN_TIME_VAR_DUR: // "RUN_TIME_VAR_DUR" case symbol_kind::S_RUN_TIME_VAR_HSV: // "RUN_TIME_VAR_HSV" case symbol_kind::S_RUN_TIME_VAR_REMOTE_USER: // "RUN_TIME_VAR_REMOTE_USER" case symbol_kind::S_RUN_TIME_VAR_TIME: // "RUN_TIME_VAR_TIME" case symbol_kind::S_RUN_TIME_VAR_TIME_DAY: // "RUN_TIME_VAR_TIME_DAY" case symbol_kind::S_RUN_TIME_VAR_TIME_EPOCH: // "RUN_TIME_VAR_TIME_EPOCH" case symbol_kind::S_RUN_TIME_VAR_TIME_HOUR: // "RUN_TIME_VAR_TIME_HOUR" case symbol_kind::S_RUN_TIME_VAR_TIME_MIN: // "RUN_TIME_VAR_TIME_MIN" case symbol_kind::S_RUN_TIME_VAR_TIME_MON: // "RUN_TIME_VAR_TIME_MON" case symbol_kind::S_RUN_TIME_VAR_TIME_SEC: // "RUN_TIME_VAR_TIME_SEC" case symbol_kind::S_RUN_TIME_VAR_TIME_WDAY: // "RUN_TIME_VAR_TIME_WDAY" case symbol_kind::S_RUN_TIME_VAR_TIME_YEAR: // "RUN_TIME_VAR_TIME_YEAR" case symbol_kind::S_VARIABLE: // "VARIABLE" case symbol_kind::S_DICT_ELEMENT: // "Dictionary element" case symbol_kind::S_DICT_ELEMENT_REGEXP: // "Dictionary element, selected by regexp" value.move< std::string > (YY_MOVE (that.value)); break; case symbol_kind::S_op: // op case symbol_kind::S_op_before_init: // op_before_init value.move< std::unique_ptr > (YY_MOVE (that.value)); break; case symbol_kind::S_run_time_string: // run_time_string value.move< std::unique_ptr > (YY_MOVE (that.value)); break; case symbol_kind::S_var: // var value.move< std::unique_ptr > (YY_MOVE (that.value)); break; case symbol_kind::S_act: // act case symbol_kind::S_setvar_action: // setvar_action value.move< std::unique_ptr > (YY_MOVE (that.value)); break; case symbol_kind::S_variables: // variables case symbol_kind::S_variables_pre_process: // variables_pre_process case symbol_kind::S_variables_may_be_quoted: // variables_may_be_quoted value.move< std::unique_ptr > > > (YY_MOVE (that.value)); break; case symbol_kind::S_actions: // actions case symbol_kind::S_actions_may_quoted: // actions_may_quoted value.move< std::unique_ptr > > > (YY_MOVE (that.value)); break; default: break; } // that is emptied. that.kind_ = symbol_kind::S_YYEMPTY; } #if YY_CPLUSPLUS < 201103L seclang_parser::stack_symbol_type& seclang_parser::stack_symbol_type::operator= (const stack_symbol_type& that) { state = that.state; switch (that.kind ()) { case symbol_kind::S_ACTION_ACCURACY: // "Accuracy" case symbol_kind::S_ACTION_ALLOW: // "Allow" case symbol_kind::S_ACTION_APPEND: // "Append" case symbol_kind::S_ACTION_AUDIT_LOG: // "AuditLog" case symbol_kind::S_ACTION_BLOCK: // "Block" case symbol_kind::S_ACTION_CAPTURE: // "Capture" case symbol_kind::S_ACTION_CHAIN: // "Chain" case symbol_kind::S_ACTION_CTL_AUDIT_ENGINE: // "ACTION_CTL_AUDIT_ENGINE" case symbol_kind::S_ACTION_CTL_AUDIT_LOG_PARTS: // "ACTION_CTL_AUDIT_LOG_PARTS" case symbol_kind::S_ACTION_CTL_BDY_JSON: // "ACTION_CTL_BDY_JSON" case symbol_kind::S_ACTION_CTL_BDY_XML: // "ACTION_CTL_BDY_XML" case symbol_kind::S_ACTION_CTL_BDY_URLENCODED: // "ACTION_CTL_BDY_URLENCODED" case symbol_kind::S_ACTION_CTL_FORCE_REQ_BODY_VAR: // "ACTION_CTL_FORCE_REQ_BODY_VAR" case symbol_kind::S_ACTION_CTL_REQUEST_BODY_ACCESS: // "ACTION_CTL_REQUEST_BODY_ACCESS" case symbol_kind::S_ACTION_CTL_RULE_REMOVE_BY_ID: // "ACTION_CTL_RULE_REMOVE_BY_ID" case symbol_kind::S_ACTION_CTL_RULE_REMOVE_BY_TAG: // "ACTION_CTL_RULE_REMOVE_BY_TAG" case symbol_kind::S_ACTION_CTL_RULE_REMOVE_TARGET_BY_ID: // "ACTION_CTL_RULE_REMOVE_TARGET_BY_ID" case symbol_kind::S_ACTION_CTL_RULE_REMOVE_TARGET_BY_TAG: // "ACTION_CTL_RULE_REMOVE_TARGET_BY_TAG" case symbol_kind::S_ACTION_DENY: // "Deny" case symbol_kind::S_ACTION_DEPRECATE_VAR: // "DeprecateVar" case symbol_kind::S_ACTION_DROP: // "Drop" case symbol_kind::S_ACTION_EXEC: // "Exec" case symbol_kind::S_ACTION_EXPIRE_VAR: // "ExpireVar" case symbol_kind::S_ACTION_ID: // "Id" case symbol_kind::S_ACTION_INITCOL: // "InitCol" case symbol_kind::S_ACTION_LOG: // "Log" case symbol_kind::S_ACTION_LOG_DATA: // "LogData" case symbol_kind::S_ACTION_MATURITY: // "Maturity" case symbol_kind::S_ACTION_MSG: // "Msg" case symbol_kind::S_ACTION_MULTI_MATCH: // "MultiMatch" case symbol_kind::S_ACTION_NO_AUDIT_LOG: // "NoAuditLog" case symbol_kind::S_ACTION_NO_LOG: // "NoLog" case symbol_kind::S_ACTION_PASS: // "Pass" case symbol_kind::S_ACTION_PAUSE: // "Pause" case symbol_kind::S_ACTION_PHASE: // "Phase" case symbol_kind::S_ACTION_PREPEND: // "Prepend" case symbol_kind::S_ACTION_PROXY: // "Proxy" case symbol_kind::S_ACTION_REDIRECT: // "Redirect" case symbol_kind::S_ACTION_REV: // "Rev" case symbol_kind::S_ACTION_SANITISE_ARG: // "SanitiseArg" case symbol_kind::S_ACTION_SANITISE_MATCHED: // "SanitiseMatched" case symbol_kind::S_ACTION_SANITISE_MATCHED_BYTES: // "SanitiseMatchedBytes" case symbol_kind::S_ACTION_SANITISE_REQUEST_HEADER: // "SanitiseRequestHeader" case symbol_kind::S_ACTION_SANITISE_RESPONSE_HEADER: // "SanitiseResponseHeader" case symbol_kind::S_ACTION_SETENV: // "SetEnv" case symbol_kind::S_ACTION_SETRSC: // "SetRsc" case symbol_kind::S_ACTION_SETSID: // "SetSid" case symbol_kind::S_ACTION_SETUID: // "SetUID" case symbol_kind::S_ACTION_SEVERITY: // "Severity" case symbol_kind::S_ACTION_SKIP: // "Skip" case symbol_kind::S_ACTION_SKIP_AFTER: // "SkipAfter" case symbol_kind::S_ACTION_STATUS: // "Status" case symbol_kind::S_ACTION_TAG: // "Tag" case symbol_kind::S_ACTION_TRANSFORMATION_BASE_64_ENCODE: // "ACTION_TRANSFORMATION_BASE_64_ENCODE" case symbol_kind::S_ACTION_TRANSFORMATION_BASE_64_DECODE: // "ACTION_TRANSFORMATION_BASE_64_DECODE" case symbol_kind::S_ACTION_TRANSFORMATION_BASE_64_DECODE_EXT: // "ACTION_TRANSFORMATION_BASE_64_DECODE_EXT" case symbol_kind::S_ACTION_TRANSFORMATION_CMD_LINE: // "ACTION_TRANSFORMATION_CMD_LINE" case symbol_kind::S_ACTION_TRANSFORMATION_COMPRESS_WHITESPACE: // "ACTION_TRANSFORMATION_COMPRESS_WHITESPACE" case symbol_kind::S_ACTION_TRANSFORMATION_CSS_DECODE: // "ACTION_TRANSFORMATION_CSS_DECODE" case symbol_kind::S_ACTION_TRANSFORMATION_ESCAPE_SEQ_DECODE: // "ACTION_TRANSFORMATION_ESCAPE_SEQ_DECODE" case symbol_kind::S_ACTION_TRANSFORMATION_HEX_ENCODE: // "ACTION_TRANSFORMATION_HEX_ENCODE" case symbol_kind::S_ACTION_TRANSFORMATION_HEX_DECODE: // "ACTION_TRANSFORMATION_HEX_DECODE" case symbol_kind::S_ACTION_TRANSFORMATION_HTML_ENTITY_DECODE: // "ACTION_TRANSFORMATION_HTML_ENTITY_DECODE" case symbol_kind::S_ACTION_TRANSFORMATION_JS_DECODE: // "ACTION_TRANSFORMATION_JS_DECODE" case symbol_kind::S_ACTION_TRANSFORMATION_LENGTH: // "ACTION_TRANSFORMATION_LENGTH" case symbol_kind::S_ACTION_TRANSFORMATION_LOWERCASE: // "ACTION_TRANSFORMATION_LOWERCASE" case symbol_kind::S_ACTION_TRANSFORMATION_MD5: // "ACTION_TRANSFORMATION_MD5" case symbol_kind::S_ACTION_TRANSFORMATION_NONE: // "ACTION_TRANSFORMATION_NONE" case symbol_kind::S_ACTION_TRANSFORMATION_NORMALISE_PATH: // "ACTION_TRANSFORMATION_NORMALISE_PATH" case symbol_kind::S_ACTION_TRANSFORMATION_NORMALISE_PATH_WIN: // "ACTION_TRANSFORMATION_NORMALISE_PATH_WIN" case symbol_kind::S_ACTION_TRANSFORMATION_PARITY_EVEN_7_BIT: // "ACTION_TRANSFORMATION_PARITY_EVEN_7_BIT" case symbol_kind::S_ACTION_TRANSFORMATION_PARITY_ODD_7_BIT: // "ACTION_TRANSFORMATION_PARITY_ODD_7_BIT" case symbol_kind::S_ACTION_TRANSFORMATION_PARITY_ZERO_7_BIT: // "ACTION_TRANSFORMATION_PARITY_ZERO_7_BIT" case symbol_kind::S_ACTION_TRANSFORMATION_REMOVE_COMMENTS: // "ACTION_TRANSFORMATION_REMOVE_COMMENTS" case symbol_kind::S_ACTION_TRANSFORMATION_REMOVE_COMMENTS_CHAR: // "ACTION_TRANSFORMATION_REMOVE_COMMENTS_CHAR" case symbol_kind::S_ACTION_TRANSFORMATION_REMOVE_NULLS: // "ACTION_TRANSFORMATION_REMOVE_NULLS" case symbol_kind::S_ACTION_TRANSFORMATION_REMOVE_WHITESPACE: // "ACTION_TRANSFORMATION_REMOVE_WHITESPACE" case symbol_kind::S_ACTION_TRANSFORMATION_REPLACE_COMMENTS: // "ACTION_TRANSFORMATION_REPLACE_COMMENTS" case symbol_kind::S_ACTION_TRANSFORMATION_REPLACE_NULLS: // "ACTION_TRANSFORMATION_REPLACE_NULLS" case symbol_kind::S_ACTION_TRANSFORMATION_SHA1: // "ACTION_TRANSFORMATION_SHA1" case symbol_kind::S_ACTION_TRANSFORMATION_SQL_HEX_DECODE: // "ACTION_TRANSFORMATION_SQL_HEX_DECODE" case symbol_kind::S_ACTION_TRANSFORMATION_TRIM: // "ACTION_TRANSFORMATION_TRIM" case symbol_kind::S_ACTION_TRANSFORMATION_TRIM_LEFT: // "ACTION_TRANSFORMATION_TRIM_LEFT" case symbol_kind::S_ACTION_TRANSFORMATION_TRIM_RIGHT: // "ACTION_TRANSFORMATION_TRIM_RIGHT" case symbol_kind::S_ACTION_TRANSFORMATION_UPPERCASE: // "ACTION_TRANSFORMATION_UPPERCASE" case symbol_kind::S_ACTION_TRANSFORMATION_URL_ENCODE: // "ACTION_TRANSFORMATION_URL_ENCODE" case symbol_kind::S_ACTION_TRANSFORMATION_URL_DECODE: // "ACTION_TRANSFORMATION_URL_DECODE" case symbol_kind::S_ACTION_TRANSFORMATION_URL_DECODE_UNI: // "ACTION_TRANSFORMATION_URL_DECODE_UNI" case symbol_kind::S_ACTION_TRANSFORMATION_UTF8_TO_UNICODE: // "ACTION_TRANSFORMATION_UTF8_TO_UNICODE" case symbol_kind::S_ACTION_VER: // "Ver" case symbol_kind::S_ACTION_XMLNS: // "xmlns" case symbol_kind::S_CONFIG_COMPONENT_SIG: // "CONFIG_COMPONENT_SIG" case symbol_kind::S_CONFIG_CONN_ENGINE: // "CONFIG_CONN_ENGINE" case symbol_kind::S_CONFIG_SEC_ARGUMENT_SEPARATOR: // "CONFIG_SEC_ARGUMENT_SEPARATOR" case symbol_kind::S_CONFIG_SEC_WEB_APP_ID: // "CONFIG_SEC_WEB_APP_ID" case symbol_kind::S_CONFIG_SEC_SERVER_SIG: // "CONFIG_SEC_SERVER_SIG" case symbol_kind::S_CONFIG_DIR_AUDIT_DIR: // "CONFIG_DIR_AUDIT_DIR" case symbol_kind::S_CONFIG_DIR_AUDIT_DIR_MOD: // "CONFIG_DIR_AUDIT_DIR_MOD" case symbol_kind::S_CONFIG_DIR_AUDIT_ENG: // "CONFIG_DIR_AUDIT_ENG" case symbol_kind::S_CONFIG_DIR_AUDIT_FLE_MOD: // "CONFIG_DIR_AUDIT_FLE_MOD" case symbol_kind::S_CONFIG_DIR_AUDIT_LOG: // "CONFIG_DIR_AUDIT_LOG" case symbol_kind::S_CONFIG_DIR_AUDIT_LOG2: // "CONFIG_DIR_AUDIT_LOG2" case symbol_kind::S_CONFIG_DIR_AUDIT_LOG_P: // "CONFIG_DIR_AUDIT_LOG_P" case symbol_kind::S_CONFIG_DIR_AUDIT_STS: // "CONFIG_DIR_AUDIT_STS" case symbol_kind::S_CONFIG_DIR_AUDIT_TPE: // "CONFIG_DIR_AUDIT_TPE" case symbol_kind::S_CONFIG_DIR_DEBUG_LOG: // "CONFIG_DIR_DEBUG_LOG" case symbol_kind::S_CONFIG_DIR_DEBUG_LVL: // "CONFIG_DIR_DEBUG_LVL" case symbol_kind::S_CONFIG_SEC_CACHE_TRANSFORMATIONS: // "CONFIG_SEC_CACHE_TRANSFORMATIONS" case symbol_kind::S_CONFIG_SEC_DISABLE_BACKEND_COMPRESS: // "CONFIG_SEC_DISABLE_BACKEND_COMPRESS" case symbol_kind::S_CONFIG_SEC_HASH_ENGINE: // "CONFIG_SEC_HASH_ENGINE" case symbol_kind::S_CONFIG_SEC_HASH_KEY: // "CONFIG_SEC_HASH_KEY" case symbol_kind::S_CONFIG_SEC_HASH_PARAM: // "CONFIG_SEC_HASH_PARAM" case symbol_kind::S_CONFIG_SEC_HASH_METHOD_RX: // "CONFIG_SEC_HASH_METHOD_RX" case symbol_kind::S_CONFIG_SEC_HASH_METHOD_PM: // "CONFIG_SEC_HASH_METHOD_PM" case symbol_kind::S_CONFIG_SEC_CHROOT_DIR: // "CONFIG_SEC_CHROOT_DIR" case symbol_kind::S_CONFIG_DIR_GEO_DB: // "CONFIG_DIR_GEO_DB" case symbol_kind::S_CONFIG_DIR_GSB_DB: // "CONFIG_DIR_GSB_DB" case symbol_kind::S_CONFIG_SEC_GUARDIAN_LOG: // "CONFIG_SEC_GUARDIAN_LOG" case symbol_kind::S_CONFIG_DIR_PCRE_MATCH_LIMIT: // "CONFIG_DIR_PCRE_MATCH_LIMIT" case symbol_kind::S_CONFIG_DIR_PCRE_MATCH_LIMIT_RECURSION: // "CONFIG_DIR_PCRE_MATCH_LIMIT_RECURSION" case symbol_kind::S_CONFIG_SEC_CONN_R_STATE_LIMIT: // "CONFIG_SEC_CONN_R_STATE_LIMIT" case symbol_kind::S_CONFIG_SEC_CONN_W_STATE_LIMIT: // "CONFIG_SEC_CONN_W_STATE_LIMIT" case symbol_kind::S_CONFIG_SEC_SENSOR_ID: // "CONFIG_SEC_SENSOR_ID" case symbol_kind::S_CONFIG_DIR_ARGS_LIMIT: // "CONFIG_DIR_ARGS_LIMIT" case symbol_kind::S_CONFIG_DIR_REQ_BODY_JSON_DEPTH_LIMIT: // "CONFIG_DIR_REQ_BODY_JSON_DEPTH_LIMIT" case symbol_kind::S_CONFIG_DIR_REQ_BODY: // "CONFIG_DIR_REQ_BODY" case symbol_kind::S_CONFIG_DIR_REQ_BODY_IN_MEMORY_LIMIT: // "CONFIG_DIR_REQ_BODY_IN_MEMORY_LIMIT" case symbol_kind::S_CONFIG_DIR_REQ_BODY_LIMIT: // "CONFIG_DIR_REQ_BODY_LIMIT" case symbol_kind::S_CONFIG_DIR_REQ_BODY_LIMIT_ACTION: // "CONFIG_DIR_REQ_BODY_LIMIT_ACTION" case symbol_kind::S_CONFIG_DIR_REQ_BODY_NO_FILES_LIMIT: // "CONFIG_DIR_REQ_BODY_NO_FILES_LIMIT" case symbol_kind::S_CONFIG_DIR_RES_BODY: // "CONFIG_DIR_RES_BODY" case symbol_kind::S_CONFIG_DIR_RES_BODY_LIMIT: // "CONFIG_DIR_RES_BODY_LIMIT" case symbol_kind::S_CONFIG_DIR_RES_BODY_LIMIT_ACTION: // "CONFIG_DIR_RES_BODY_LIMIT_ACTION" case symbol_kind::S_CONFIG_SEC_RULE_INHERITANCE: // "CONFIG_SEC_RULE_INHERITANCE" case symbol_kind::S_CONFIG_SEC_RULE_PERF_TIME: // "CONFIG_SEC_RULE_PERF_TIME" case symbol_kind::S_CONFIG_DIR_RULE_ENG: // "CONFIG_DIR_RULE_ENG" case symbol_kind::S_CONFIG_DIR_SEC_ACTION: // "CONFIG_DIR_SEC_ACTION" case symbol_kind::S_CONFIG_DIR_SEC_DEFAULT_ACTION: // "CONFIG_DIR_SEC_DEFAULT_ACTION" case symbol_kind::S_CONFIG_DIR_SEC_MARKER: // "CONFIG_DIR_SEC_MARKER" case symbol_kind::S_CONFIG_DIR_UNICODE_MAP_FILE: // "CONFIG_DIR_UNICODE_MAP_FILE" case symbol_kind::S_CONFIG_DIR_UNICODE_CODE_PAGE: // "CONFIG_DIR_UNICODE_CODE_PAGE" case symbol_kind::S_CONFIG_SEC_COLLECTION_TIMEOUT: // "CONFIG_SEC_COLLECTION_TIMEOUT" case symbol_kind::S_CONFIG_SEC_HTTP_BLKEY: // "CONFIG_SEC_HTTP_BLKEY" case symbol_kind::S_CONFIG_SEC_INTERCEPT_ON_ERROR: // "CONFIG_SEC_INTERCEPT_ON_ERROR" case symbol_kind::S_CONFIG_SEC_REMOTE_RULES_FAIL_ACTION: // "CONFIG_SEC_REMOTE_RULES_FAIL_ACTION" case symbol_kind::S_CONFIG_SEC_RULE_REMOVE_BY_ID: // "CONFIG_SEC_RULE_REMOVE_BY_ID" case symbol_kind::S_CONFIG_SEC_RULE_REMOVE_BY_MSG: // "CONFIG_SEC_RULE_REMOVE_BY_MSG" case symbol_kind::S_CONFIG_SEC_RULE_REMOVE_BY_TAG: // "CONFIG_SEC_RULE_REMOVE_BY_TAG" case symbol_kind::S_CONFIG_SEC_RULE_UPDATE_TARGET_BY_TAG: // "CONFIG_SEC_RULE_UPDATE_TARGET_BY_TAG" case symbol_kind::S_CONFIG_SEC_RULE_UPDATE_TARGET_BY_MSG: // "CONFIG_SEC_RULE_UPDATE_TARGET_BY_MSG" case symbol_kind::S_CONFIG_SEC_RULE_UPDATE_TARGET_BY_ID: // "CONFIG_SEC_RULE_UPDATE_TARGET_BY_ID" case symbol_kind::S_CONFIG_SEC_RULE_UPDATE_ACTION_BY_ID: // "CONFIG_SEC_RULE_UPDATE_ACTION_BY_ID" case symbol_kind::S_CONFIG_UPDLOAD_KEEP_FILES: // "CONFIG_UPDLOAD_KEEP_FILES" case symbol_kind::S_CONFIG_UPDLOAD_SAVE_TMP_FILES: // "CONFIG_UPDLOAD_SAVE_TMP_FILES" case symbol_kind::S_CONFIG_UPLOAD_DIR: // "CONFIG_UPLOAD_DIR" case symbol_kind::S_CONFIG_UPLOAD_FILE_LIMIT: // "CONFIG_UPLOAD_FILE_LIMIT" case symbol_kind::S_CONFIG_UPLOAD_FILE_MODE: // "CONFIG_UPLOAD_FILE_MODE" case symbol_kind::S_CONFIG_VALUE_ABORT: // "CONFIG_VALUE_ABORT" case symbol_kind::S_CONFIG_VALUE_DETC: // "CONFIG_VALUE_DETC" case symbol_kind::S_CONFIG_VALUE_HTTPS: // "CONFIG_VALUE_HTTPS" case symbol_kind::S_CONFIG_VALUE_OFF: // "CONFIG_VALUE_OFF" case symbol_kind::S_CONFIG_VALUE_ON: // "CONFIG_VALUE_ON" case symbol_kind::S_CONFIG_VALUE_PARALLEL: // "CONFIG_VALUE_PARALLEL" case symbol_kind::S_CONFIG_VALUE_PROCESS_PARTIAL: // "CONFIG_VALUE_PROCESS_PARTIAL" case symbol_kind::S_CONFIG_VALUE_REJECT: // "CONFIG_VALUE_REJECT" case symbol_kind::S_CONFIG_VALUE_RELEVANT_ONLY: // "CONFIG_VALUE_RELEVANT_ONLY" case symbol_kind::S_CONFIG_VALUE_SERIAL: // "CONFIG_VALUE_SERIAL" case symbol_kind::S_CONFIG_VALUE_WARN: // "CONFIG_VALUE_WARN" case symbol_kind::S_CONFIG_XML_EXTERNAL_ENTITY: // "CONFIG_XML_EXTERNAL_ENTITY" case symbol_kind::S_CONGIG_DIR_RESPONSE_BODY_MP: // "CONGIG_DIR_RESPONSE_BODY_MP" case symbol_kind::S_CONGIG_DIR_SEC_ARG_SEP: // "CONGIG_DIR_SEC_ARG_SEP" case symbol_kind::S_CONGIG_DIR_SEC_COOKIE_FORMAT: // "CONGIG_DIR_SEC_COOKIE_FORMAT" case symbol_kind::S_CONFIG_SEC_COOKIEV0_SEPARATOR: // "CONFIG_SEC_COOKIEV0_SEPARATOR" case symbol_kind::S_CONGIG_DIR_SEC_DATA_DIR: // "CONGIG_DIR_SEC_DATA_DIR" case symbol_kind::S_CONGIG_DIR_SEC_STATUS_ENGINE: // "CONGIG_DIR_SEC_STATUS_ENGINE" case symbol_kind::S_CONFIG_SEC_STREAM_IN_BODY_INSPECTION: // "CONFIG_SEC_STREAM_IN_BODY_INSPECTION" case symbol_kind::S_CONFIG_SEC_STREAM_OUT_BODY_INSPECTION: // "CONFIG_SEC_STREAM_OUT_BODY_INSPECTION" case symbol_kind::S_CONGIG_DIR_SEC_TMP_DIR: // "CONGIG_DIR_SEC_TMP_DIR" case symbol_kind::S_DIRECTIVE: // "DIRECTIVE" case symbol_kind::S_DIRECTIVE_SECRULESCRIPT: // "DIRECTIVE_SECRULESCRIPT" case symbol_kind::S_FREE_TEXT_QUOTE_MACRO_EXPANSION: // "FREE_TEXT_QUOTE_MACRO_EXPANSION" case symbol_kind::S_QUOTATION_MARK: // "QUOTATION_MARK" case symbol_kind::S_RUN_TIME_VAR_BLD: // "RUN_TIME_VAR_BLD" case symbol_kind::S_RUN_TIME_VAR_DUR: // "RUN_TIME_VAR_DUR" case symbol_kind::S_RUN_TIME_VAR_HSV: // "RUN_TIME_VAR_HSV" case symbol_kind::S_RUN_TIME_VAR_REMOTE_USER: // "RUN_TIME_VAR_REMOTE_USER" case symbol_kind::S_RUN_TIME_VAR_TIME: // "RUN_TIME_VAR_TIME" case symbol_kind::S_RUN_TIME_VAR_TIME_DAY: // "RUN_TIME_VAR_TIME_DAY" case symbol_kind::S_RUN_TIME_VAR_TIME_EPOCH: // "RUN_TIME_VAR_TIME_EPOCH" case symbol_kind::S_RUN_TIME_VAR_TIME_HOUR: // "RUN_TIME_VAR_TIME_HOUR" case symbol_kind::S_RUN_TIME_VAR_TIME_MIN: // "RUN_TIME_VAR_TIME_MIN" case symbol_kind::S_RUN_TIME_VAR_TIME_MON: // "RUN_TIME_VAR_TIME_MON" case symbol_kind::S_RUN_TIME_VAR_TIME_SEC: // "RUN_TIME_VAR_TIME_SEC" case symbol_kind::S_RUN_TIME_VAR_TIME_WDAY: // "RUN_TIME_VAR_TIME_WDAY" case symbol_kind::S_RUN_TIME_VAR_TIME_YEAR: // "RUN_TIME_VAR_TIME_YEAR" case symbol_kind::S_VARIABLE: // "VARIABLE" case symbol_kind::S_DICT_ELEMENT: // "Dictionary element" case symbol_kind::S_DICT_ELEMENT_REGEXP: // "Dictionary element, selected by regexp" value.copy< std::string > (that.value); break; case symbol_kind::S_op: // op case symbol_kind::S_op_before_init: // op_before_init value.copy< std::unique_ptr > (that.value); break; case symbol_kind::S_run_time_string: // run_time_string value.copy< std::unique_ptr > (that.value); break; case symbol_kind::S_var: // var value.copy< std::unique_ptr > (that.value); break; case symbol_kind::S_act: // act case symbol_kind::S_setvar_action: // setvar_action value.copy< std::unique_ptr > (that.value); break; case symbol_kind::S_variables: // variables case symbol_kind::S_variables_pre_process: // variables_pre_process case symbol_kind::S_variables_may_be_quoted: // variables_may_be_quoted value.copy< std::unique_ptr > > > (that.value); break; case symbol_kind::S_actions: // actions case symbol_kind::S_actions_may_quoted: // actions_may_quoted value.copy< std::unique_ptr > > > (that.value); break; default: break; } location = that.location; return *this; } seclang_parser::stack_symbol_type& seclang_parser::stack_symbol_type::operator= (stack_symbol_type& that) { state = that.state; switch (that.kind ()) { case symbol_kind::S_ACTION_ACCURACY: // "Accuracy" case symbol_kind::S_ACTION_ALLOW: // "Allow" case symbol_kind::S_ACTION_APPEND: // "Append" case symbol_kind::S_ACTION_AUDIT_LOG: // "AuditLog" case symbol_kind::S_ACTION_BLOCK: // "Block" case symbol_kind::S_ACTION_CAPTURE: // "Capture" case symbol_kind::S_ACTION_CHAIN: // "Chain" case symbol_kind::S_ACTION_CTL_AUDIT_ENGINE: // "ACTION_CTL_AUDIT_ENGINE" case symbol_kind::S_ACTION_CTL_AUDIT_LOG_PARTS: // "ACTION_CTL_AUDIT_LOG_PARTS" case symbol_kind::S_ACTION_CTL_BDY_JSON: // "ACTION_CTL_BDY_JSON" case symbol_kind::S_ACTION_CTL_BDY_XML: // "ACTION_CTL_BDY_XML" case symbol_kind::S_ACTION_CTL_BDY_URLENCODED: // "ACTION_CTL_BDY_URLENCODED" case symbol_kind::S_ACTION_CTL_FORCE_REQ_BODY_VAR: // "ACTION_CTL_FORCE_REQ_BODY_VAR" case symbol_kind::S_ACTION_CTL_REQUEST_BODY_ACCESS: // "ACTION_CTL_REQUEST_BODY_ACCESS" case symbol_kind::S_ACTION_CTL_RULE_REMOVE_BY_ID: // "ACTION_CTL_RULE_REMOVE_BY_ID" case symbol_kind::S_ACTION_CTL_RULE_REMOVE_BY_TAG: // "ACTION_CTL_RULE_REMOVE_BY_TAG" case symbol_kind::S_ACTION_CTL_RULE_REMOVE_TARGET_BY_ID: // "ACTION_CTL_RULE_REMOVE_TARGET_BY_ID" case symbol_kind::S_ACTION_CTL_RULE_REMOVE_TARGET_BY_TAG: // "ACTION_CTL_RULE_REMOVE_TARGET_BY_TAG" case symbol_kind::S_ACTION_DENY: // "Deny" case symbol_kind::S_ACTION_DEPRECATE_VAR: // "DeprecateVar" case symbol_kind::S_ACTION_DROP: // "Drop" case symbol_kind::S_ACTION_EXEC: // "Exec" case symbol_kind::S_ACTION_EXPIRE_VAR: // "ExpireVar" case symbol_kind::S_ACTION_ID: // "Id" case symbol_kind::S_ACTION_INITCOL: // "InitCol" case symbol_kind::S_ACTION_LOG: // "Log" case symbol_kind::S_ACTION_LOG_DATA: // "LogData" case symbol_kind::S_ACTION_MATURITY: // "Maturity" case symbol_kind::S_ACTION_MSG: // "Msg" case symbol_kind::S_ACTION_MULTI_MATCH: // "MultiMatch" case symbol_kind::S_ACTION_NO_AUDIT_LOG: // "NoAuditLog" case symbol_kind::S_ACTION_NO_LOG: // "NoLog" case symbol_kind::S_ACTION_PASS: // "Pass" case symbol_kind::S_ACTION_PAUSE: // "Pause" case symbol_kind::S_ACTION_PHASE: // "Phase" case symbol_kind::S_ACTION_PREPEND: // "Prepend" case symbol_kind::S_ACTION_PROXY: // "Proxy" case symbol_kind::S_ACTION_REDIRECT: // "Redirect" case symbol_kind::S_ACTION_REV: // "Rev" case symbol_kind::S_ACTION_SANITISE_ARG: // "SanitiseArg" case symbol_kind::S_ACTION_SANITISE_MATCHED: // "SanitiseMatched" case symbol_kind::S_ACTION_SANITISE_MATCHED_BYTES: // "SanitiseMatchedBytes" case symbol_kind::S_ACTION_SANITISE_REQUEST_HEADER: // "SanitiseRequestHeader" case symbol_kind::S_ACTION_SANITISE_RESPONSE_HEADER: // "SanitiseResponseHeader" case symbol_kind::S_ACTION_SETENV: // "SetEnv" case symbol_kind::S_ACTION_SETRSC: // "SetRsc" case symbol_kind::S_ACTION_SETSID: // "SetSid" case symbol_kind::S_ACTION_SETUID: // "SetUID" case symbol_kind::S_ACTION_SEVERITY: // "Severity" case symbol_kind::S_ACTION_SKIP: // "Skip" case symbol_kind::S_ACTION_SKIP_AFTER: // "SkipAfter" case symbol_kind::S_ACTION_STATUS: // "Status" case symbol_kind::S_ACTION_TAG: // "Tag" case symbol_kind::S_ACTION_TRANSFORMATION_BASE_64_ENCODE: // "ACTION_TRANSFORMATION_BASE_64_ENCODE" case symbol_kind::S_ACTION_TRANSFORMATION_BASE_64_DECODE: // "ACTION_TRANSFORMATION_BASE_64_DECODE" case symbol_kind::S_ACTION_TRANSFORMATION_BASE_64_DECODE_EXT: // "ACTION_TRANSFORMATION_BASE_64_DECODE_EXT" case symbol_kind::S_ACTION_TRANSFORMATION_CMD_LINE: // "ACTION_TRANSFORMATION_CMD_LINE" case symbol_kind::S_ACTION_TRANSFORMATION_COMPRESS_WHITESPACE: // "ACTION_TRANSFORMATION_COMPRESS_WHITESPACE" case symbol_kind::S_ACTION_TRANSFORMATION_CSS_DECODE: // "ACTION_TRANSFORMATION_CSS_DECODE" case symbol_kind::S_ACTION_TRANSFORMATION_ESCAPE_SEQ_DECODE: // "ACTION_TRANSFORMATION_ESCAPE_SEQ_DECODE" case symbol_kind::S_ACTION_TRANSFORMATION_HEX_ENCODE: // "ACTION_TRANSFORMATION_HEX_ENCODE" case symbol_kind::S_ACTION_TRANSFORMATION_HEX_DECODE: // "ACTION_TRANSFORMATION_HEX_DECODE" case symbol_kind::S_ACTION_TRANSFORMATION_HTML_ENTITY_DECODE: // "ACTION_TRANSFORMATION_HTML_ENTITY_DECODE" case symbol_kind::S_ACTION_TRANSFORMATION_JS_DECODE: // "ACTION_TRANSFORMATION_JS_DECODE" case symbol_kind::S_ACTION_TRANSFORMATION_LENGTH: // "ACTION_TRANSFORMATION_LENGTH" case symbol_kind::S_ACTION_TRANSFORMATION_LOWERCASE: // "ACTION_TRANSFORMATION_LOWERCASE" case symbol_kind::S_ACTION_TRANSFORMATION_MD5: // "ACTION_TRANSFORMATION_MD5" case symbol_kind::S_ACTION_TRANSFORMATION_NONE: // "ACTION_TRANSFORMATION_NONE" case symbol_kind::S_ACTION_TRANSFORMATION_NORMALISE_PATH: // "ACTION_TRANSFORMATION_NORMALISE_PATH" case symbol_kind::S_ACTION_TRANSFORMATION_NORMALISE_PATH_WIN: // "ACTION_TRANSFORMATION_NORMALISE_PATH_WIN" case symbol_kind::S_ACTION_TRANSFORMATION_PARITY_EVEN_7_BIT: // "ACTION_TRANSFORMATION_PARITY_EVEN_7_BIT" case symbol_kind::S_ACTION_TRANSFORMATION_PARITY_ODD_7_BIT: // "ACTION_TRANSFORMATION_PARITY_ODD_7_BIT" case symbol_kind::S_ACTION_TRANSFORMATION_PARITY_ZERO_7_BIT: // "ACTION_TRANSFORMATION_PARITY_ZERO_7_BIT" case symbol_kind::S_ACTION_TRANSFORMATION_REMOVE_COMMENTS: // "ACTION_TRANSFORMATION_REMOVE_COMMENTS" case symbol_kind::S_ACTION_TRANSFORMATION_REMOVE_COMMENTS_CHAR: // "ACTION_TRANSFORMATION_REMOVE_COMMENTS_CHAR" case symbol_kind::S_ACTION_TRANSFORMATION_REMOVE_NULLS: // "ACTION_TRANSFORMATION_REMOVE_NULLS" case symbol_kind::S_ACTION_TRANSFORMATION_REMOVE_WHITESPACE: // "ACTION_TRANSFORMATION_REMOVE_WHITESPACE" case symbol_kind::S_ACTION_TRANSFORMATION_REPLACE_COMMENTS: // "ACTION_TRANSFORMATION_REPLACE_COMMENTS" case symbol_kind::S_ACTION_TRANSFORMATION_REPLACE_NULLS: // "ACTION_TRANSFORMATION_REPLACE_NULLS" case symbol_kind::S_ACTION_TRANSFORMATION_SHA1: // "ACTION_TRANSFORMATION_SHA1" case symbol_kind::S_ACTION_TRANSFORMATION_SQL_HEX_DECODE: // "ACTION_TRANSFORMATION_SQL_HEX_DECODE" case symbol_kind::S_ACTION_TRANSFORMATION_TRIM: // "ACTION_TRANSFORMATION_TRIM" case symbol_kind::S_ACTION_TRANSFORMATION_TRIM_LEFT: // "ACTION_TRANSFORMATION_TRIM_LEFT" case symbol_kind::S_ACTION_TRANSFORMATION_TRIM_RIGHT: // "ACTION_TRANSFORMATION_TRIM_RIGHT" case symbol_kind::S_ACTION_TRANSFORMATION_UPPERCASE: // "ACTION_TRANSFORMATION_UPPERCASE" case symbol_kind::S_ACTION_TRANSFORMATION_URL_ENCODE: // "ACTION_TRANSFORMATION_URL_ENCODE" case symbol_kind::S_ACTION_TRANSFORMATION_URL_DECODE: // "ACTION_TRANSFORMATION_URL_DECODE" case symbol_kind::S_ACTION_TRANSFORMATION_URL_DECODE_UNI: // "ACTION_TRANSFORMATION_URL_DECODE_UNI" case symbol_kind::S_ACTION_TRANSFORMATION_UTF8_TO_UNICODE: // "ACTION_TRANSFORMATION_UTF8_TO_UNICODE" case symbol_kind::S_ACTION_VER: // "Ver" case symbol_kind::S_ACTION_XMLNS: // "xmlns" case symbol_kind::S_CONFIG_COMPONENT_SIG: // "CONFIG_COMPONENT_SIG" case symbol_kind::S_CONFIG_CONN_ENGINE: // "CONFIG_CONN_ENGINE" case symbol_kind::S_CONFIG_SEC_ARGUMENT_SEPARATOR: // "CONFIG_SEC_ARGUMENT_SEPARATOR" case symbol_kind::S_CONFIG_SEC_WEB_APP_ID: // "CONFIG_SEC_WEB_APP_ID" case symbol_kind::S_CONFIG_SEC_SERVER_SIG: // "CONFIG_SEC_SERVER_SIG" case symbol_kind::S_CONFIG_DIR_AUDIT_DIR: // "CONFIG_DIR_AUDIT_DIR" case symbol_kind::S_CONFIG_DIR_AUDIT_DIR_MOD: // "CONFIG_DIR_AUDIT_DIR_MOD" case symbol_kind::S_CONFIG_DIR_AUDIT_ENG: // "CONFIG_DIR_AUDIT_ENG" case symbol_kind::S_CONFIG_DIR_AUDIT_FLE_MOD: // "CONFIG_DIR_AUDIT_FLE_MOD" case symbol_kind::S_CONFIG_DIR_AUDIT_LOG: // "CONFIG_DIR_AUDIT_LOG" case symbol_kind::S_CONFIG_DIR_AUDIT_LOG2: // "CONFIG_DIR_AUDIT_LOG2" case symbol_kind::S_CONFIG_DIR_AUDIT_LOG_P: // "CONFIG_DIR_AUDIT_LOG_P" case symbol_kind::S_CONFIG_DIR_AUDIT_STS: // "CONFIG_DIR_AUDIT_STS" case symbol_kind::S_CONFIG_DIR_AUDIT_TPE: // "CONFIG_DIR_AUDIT_TPE" case symbol_kind::S_CONFIG_DIR_DEBUG_LOG: // "CONFIG_DIR_DEBUG_LOG" case symbol_kind::S_CONFIG_DIR_DEBUG_LVL: // "CONFIG_DIR_DEBUG_LVL" case symbol_kind::S_CONFIG_SEC_CACHE_TRANSFORMATIONS: // "CONFIG_SEC_CACHE_TRANSFORMATIONS" case symbol_kind::S_CONFIG_SEC_DISABLE_BACKEND_COMPRESS: // "CONFIG_SEC_DISABLE_BACKEND_COMPRESS" case symbol_kind::S_CONFIG_SEC_HASH_ENGINE: // "CONFIG_SEC_HASH_ENGINE" case symbol_kind::S_CONFIG_SEC_HASH_KEY: // "CONFIG_SEC_HASH_KEY" case symbol_kind::S_CONFIG_SEC_HASH_PARAM: // "CONFIG_SEC_HASH_PARAM" case symbol_kind::S_CONFIG_SEC_HASH_METHOD_RX: // "CONFIG_SEC_HASH_METHOD_RX" case symbol_kind::S_CONFIG_SEC_HASH_METHOD_PM: // "CONFIG_SEC_HASH_METHOD_PM" case symbol_kind::S_CONFIG_SEC_CHROOT_DIR: // "CONFIG_SEC_CHROOT_DIR" case symbol_kind::S_CONFIG_DIR_GEO_DB: // "CONFIG_DIR_GEO_DB" case symbol_kind::S_CONFIG_DIR_GSB_DB: // "CONFIG_DIR_GSB_DB" case symbol_kind::S_CONFIG_SEC_GUARDIAN_LOG: // "CONFIG_SEC_GUARDIAN_LOG" case symbol_kind::S_CONFIG_DIR_PCRE_MATCH_LIMIT: // "CONFIG_DIR_PCRE_MATCH_LIMIT" case symbol_kind::S_CONFIG_DIR_PCRE_MATCH_LIMIT_RECURSION: // "CONFIG_DIR_PCRE_MATCH_LIMIT_RECURSION" case symbol_kind::S_CONFIG_SEC_CONN_R_STATE_LIMIT: // "CONFIG_SEC_CONN_R_STATE_LIMIT" case symbol_kind::S_CONFIG_SEC_CONN_W_STATE_LIMIT: // "CONFIG_SEC_CONN_W_STATE_LIMIT" case symbol_kind::S_CONFIG_SEC_SENSOR_ID: // "CONFIG_SEC_SENSOR_ID" case symbol_kind::S_CONFIG_DIR_ARGS_LIMIT: // "CONFIG_DIR_ARGS_LIMIT" case symbol_kind::S_CONFIG_DIR_REQ_BODY_JSON_DEPTH_LIMIT: // "CONFIG_DIR_REQ_BODY_JSON_DEPTH_LIMIT" case symbol_kind::S_CONFIG_DIR_REQ_BODY: // "CONFIG_DIR_REQ_BODY" case symbol_kind::S_CONFIG_DIR_REQ_BODY_IN_MEMORY_LIMIT: // "CONFIG_DIR_REQ_BODY_IN_MEMORY_LIMIT" case symbol_kind::S_CONFIG_DIR_REQ_BODY_LIMIT: // "CONFIG_DIR_REQ_BODY_LIMIT" case symbol_kind::S_CONFIG_DIR_REQ_BODY_LIMIT_ACTION: // "CONFIG_DIR_REQ_BODY_LIMIT_ACTION" case symbol_kind::S_CONFIG_DIR_REQ_BODY_NO_FILES_LIMIT: // "CONFIG_DIR_REQ_BODY_NO_FILES_LIMIT" case symbol_kind::S_CONFIG_DIR_RES_BODY: // "CONFIG_DIR_RES_BODY" case symbol_kind::S_CONFIG_DIR_RES_BODY_LIMIT: // "CONFIG_DIR_RES_BODY_LIMIT" case symbol_kind::S_CONFIG_DIR_RES_BODY_LIMIT_ACTION: // "CONFIG_DIR_RES_BODY_LIMIT_ACTION" case symbol_kind::S_CONFIG_SEC_RULE_INHERITANCE: // "CONFIG_SEC_RULE_INHERITANCE" case symbol_kind::S_CONFIG_SEC_RULE_PERF_TIME: // "CONFIG_SEC_RULE_PERF_TIME" case symbol_kind::S_CONFIG_DIR_RULE_ENG: // "CONFIG_DIR_RULE_ENG" case symbol_kind::S_CONFIG_DIR_SEC_ACTION: // "CONFIG_DIR_SEC_ACTION" case symbol_kind::S_CONFIG_DIR_SEC_DEFAULT_ACTION: // "CONFIG_DIR_SEC_DEFAULT_ACTION" case symbol_kind::S_CONFIG_DIR_SEC_MARKER: // "CONFIG_DIR_SEC_MARKER" case symbol_kind::S_CONFIG_DIR_UNICODE_MAP_FILE: // "CONFIG_DIR_UNICODE_MAP_FILE" case symbol_kind::S_CONFIG_DIR_UNICODE_CODE_PAGE: // "CONFIG_DIR_UNICODE_CODE_PAGE" case symbol_kind::S_CONFIG_SEC_COLLECTION_TIMEOUT: // "CONFIG_SEC_COLLECTION_TIMEOUT" case symbol_kind::S_CONFIG_SEC_HTTP_BLKEY: // "CONFIG_SEC_HTTP_BLKEY" case symbol_kind::S_CONFIG_SEC_INTERCEPT_ON_ERROR: // "CONFIG_SEC_INTERCEPT_ON_ERROR" case symbol_kind::S_CONFIG_SEC_REMOTE_RULES_FAIL_ACTION: // "CONFIG_SEC_REMOTE_RULES_FAIL_ACTION" case symbol_kind::S_CONFIG_SEC_RULE_REMOVE_BY_ID: // "CONFIG_SEC_RULE_REMOVE_BY_ID" case symbol_kind::S_CONFIG_SEC_RULE_REMOVE_BY_MSG: // "CONFIG_SEC_RULE_REMOVE_BY_MSG" case symbol_kind::S_CONFIG_SEC_RULE_REMOVE_BY_TAG: // "CONFIG_SEC_RULE_REMOVE_BY_TAG" case symbol_kind::S_CONFIG_SEC_RULE_UPDATE_TARGET_BY_TAG: // "CONFIG_SEC_RULE_UPDATE_TARGET_BY_TAG" case symbol_kind::S_CONFIG_SEC_RULE_UPDATE_TARGET_BY_MSG: // "CONFIG_SEC_RULE_UPDATE_TARGET_BY_MSG" case symbol_kind::S_CONFIG_SEC_RULE_UPDATE_TARGET_BY_ID: // "CONFIG_SEC_RULE_UPDATE_TARGET_BY_ID" case symbol_kind::S_CONFIG_SEC_RULE_UPDATE_ACTION_BY_ID: // "CONFIG_SEC_RULE_UPDATE_ACTION_BY_ID" case symbol_kind::S_CONFIG_UPDLOAD_KEEP_FILES: // "CONFIG_UPDLOAD_KEEP_FILES" case symbol_kind::S_CONFIG_UPDLOAD_SAVE_TMP_FILES: // "CONFIG_UPDLOAD_SAVE_TMP_FILES" case symbol_kind::S_CONFIG_UPLOAD_DIR: // "CONFIG_UPLOAD_DIR" case symbol_kind::S_CONFIG_UPLOAD_FILE_LIMIT: // "CONFIG_UPLOAD_FILE_LIMIT" case symbol_kind::S_CONFIG_UPLOAD_FILE_MODE: // "CONFIG_UPLOAD_FILE_MODE" case symbol_kind::S_CONFIG_VALUE_ABORT: // "CONFIG_VALUE_ABORT" case symbol_kind::S_CONFIG_VALUE_DETC: // "CONFIG_VALUE_DETC" case symbol_kind::S_CONFIG_VALUE_HTTPS: // "CONFIG_VALUE_HTTPS" case symbol_kind::S_CONFIG_VALUE_OFF: // "CONFIG_VALUE_OFF" case symbol_kind::S_CONFIG_VALUE_ON: // "CONFIG_VALUE_ON" case symbol_kind::S_CONFIG_VALUE_PARALLEL: // "CONFIG_VALUE_PARALLEL" case symbol_kind::S_CONFIG_VALUE_PROCESS_PARTIAL: // "CONFIG_VALUE_PROCESS_PARTIAL" case symbol_kind::S_CONFIG_VALUE_REJECT: // "CONFIG_VALUE_REJECT" case symbol_kind::S_CONFIG_VALUE_RELEVANT_ONLY: // "CONFIG_VALUE_RELEVANT_ONLY" case symbol_kind::S_CONFIG_VALUE_SERIAL: // "CONFIG_VALUE_SERIAL" case symbol_kind::S_CONFIG_VALUE_WARN: // "CONFIG_VALUE_WARN" case symbol_kind::S_CONFIG_XML_EXTERNAL_ENTITY: // "CONFIG_XML_EXTERNAL_ENTITY" case symbol_kind::S_CONGIG_DIR_RESPONSE_BODY_MP: // "CONGIG_DIR_RESPONSE_BODY_MP" case symbol_kind::S_CONGIG_DIR_SEC_ARG_SEP: // "CONGIG_DIR_SEC_ARG_SEP" case symbol_kind::S_CONGIG_DIR_SEC_COOKIE_FORMAT: // "CONGIG_DIR_SEC_COOKIE_FORMAT" case symbol_kind::S_CONFIG_SEC_COOKIEV0_SEPARATOR: // "CONFIG_SEC_COOKIEV0_SEPARATOR" case symbol_kind::S_CONGIG_DIR_SEC_DATA_DIR: // "CONGIG_DIR_SEC_DATA_DIR" case symbol_kind::S_CONGIG_DIR_SEC_STATUS_ENGINE: // "CONGIG_DIR_SEC_STATUS_ENGINE" case symbol_kind::S_CONFIG_SEC_STREAM_IN_BODY_INSPECTION: // "CONFIG_SEC_STREAM_IN_BODY_INSPECTION" case symbol_kind::S_CONFIG_SEC_STREAM_OUT_BODY_INSPECTION: // "CONFIG_SEC_STREAM_OUT_BODY_INSPECTION" case symbol_kind::S_CONGIG_DIR_SEC_TMP_DIR: // "CONGIG_DIR_SEC_TMP_DIR" case symbol_kind::S_DIRECTIVE: // "DIRECTIVE" case symbol_kind::S_DIRECTIVE_SECRULESCRIPT: // "DIRECTIVE_SECRULESCRIPT" case symbol_kind::S_FREE_TEXT_QUOTE_MACRO_EXPANSION: // "FREE_TEXT_QUOTE_MACRO_EXPANSION" case symbol_kind::S_QUOTATION_MARK: // "QUOTATION_MARK" case symbol_kind::S_RUN_TIME_VAR_BLD: // "RUN_TIME_VAR_BLD" case symbol_kind::S_RUN_TIME_VAR_DUR: // "RUN_TIME_VAR_DUR" case symbol_kind::S_RUN_TIME_VAR_HSV: // "RUN_TIME_VAR_HSV" case symbol_kind::S_RUN_TIME_VAR_REMOTE_USER: // "RUN_TIME_VAR_REMOTE_USER" case symbol_kind::S_RUN_TIME_VAR_TIME: // "RUN_TIME_VAR_TIME" case symbol_kind::S_RUN_TIME_VAR_TIME_DAY: // "RUN_TIME_VAR_TIME_DAY" case symbol_kind::S_RUN_TIME_VAR_TIME_EPOCH: // "RUN_TIME_VAR_TIME_EPOCH" case symbol_kind::S_RUN_TIME_VAR_TIME_HOUR: // "RUN_TIME_VAR_TIME_HOUR" case symbol_kind::S_RUN_TIME_VAR_TIME_MIN: // "RUN_TIME_VAR_TIME_MIN" case symbol_kind::S_RUN_TIME_VAR_TIME_MON: // "RUN_TIME_VAR_TIME_MON" case symbol_kind::S_RUN_TIME_VAR_TIME_SEC: // "RUN_TIME_VAR_TIME_SEC" case symbol_kind::S_RUN_TIME_VAR_TIME_WDAY: // "RUN_TIME_VAR_TIME_WDAY" case symbol_kind::S_RUN_TIME_VAR_TIME_YEAR: // "RUN_TIME_VAR_TIME_YEAR" case symbol_kind::S_VARIABLE: // "VARIABLE" case symbol_kind::S_DICT_ELEMENT: // "Dictionary element" case symbol_kind::S_DICT_ELEMENT_REGEXP: // "Dictionary element, selected by regexp" value.move< std::string > (that.value); break; case symbol_kind::S_op: // op case symbol_kind::S_op_before_init: // op_before_init value.move< std::unique_ptr > (that.value); break; case symbol_kind::S_run_time_string: // run_time_string value.move< std::unique_ptr > (that.value); break; case symbol_kind::S_var: // var value.move< std::unique_ptr > (that.value); break; case symbol_kind::S_act: // act case symbol_kind::S_setvar_action: // setvar_action value.move< std::unique_ptr > (that.value); break; case symbol_kind::S_variables: // variables case symbol_kind::S_variables_pre_process: // variables_pre_process case symbol_kind::S_variables_may_be_quoted: // variables_may_be_quoted value.move< std::unique_ptr > > > (that.value); break; case symbol_kind::S_actions: // actions case symbol_kind::S_actions_may_quoted: // actions_may_quoted value.move< std::unique_ptr > > > (that.value); break; default: break; } location = that.location; // that is emptied. that.state = empty_state; return *this; } #endif template void seclang_parser::yy_destroy_ (const char* yymsg, basic_symbol& yysym) const { if (yymsg) YY_SYMBOL_PRINT (yymsg, yysym); } #if YYDEBUG template void seclang_parser::yy_print_ (std::ostream& yyo, const basic_symbol& yysym) const { std::ostream& yyoutput = yyo; YYUSE (yyoutput); if (yysym.empty ()) yyo << "empty symbol"; else { symbol_kind_type yykind = yysym.kind (); yyo << (yykind < YYNTOKENS ? "token" : "nterm") << ' ' << yysym.name () << " (" << yysym.location << ": "; YYUSE (yykind); yyo << ')'; } } #endif void seclang_parser::yypush_ (const char* m, YY_MOVE_REF (stack_symbol_type) sym) { if (m) YY_SYMBOL_PRINT (m, sym); yystack_.push (YY_MOVE (sym)); } void seclang_parser::yypush_ (const char* m, state_type s, YY_MOVE_REF (symbol_type) sym) { #if 201103L <= YY_CPLUSPLUS yypush_ (m, stack_symbol_type (s, std::move (sym))); #else stack_symbol_type ss (s, sym); yypush_ (m, ss); #endif } void seclang_parser::yypop_ (int n) { yystack_.pop (n); } #if YYDEBUG std::ostream& seclang_parser::debug_stream () const { return *yycdebug_; } void seclang_parser::set_debug_stream (std::ostream& o) { yycdebug_ = &o; } seclang_parser::debug_level_type seclang_parser::debug_level () const { return yydebug_; } void seclang_parser::set_debug_level (debug_level_type l) { yydebug_ = l; } #endif // YYDEBUG seclang_parser::state_type seclang_parser::yy_lr_goto_state_ (state_type yystate, int yysym) { int yyr = yypgoto_[yysym - YYNTOKENS] + yystate; if (0 <= yyr && yyr <= yylast_ && yycheck_[yyr] == yystate) return yytable_[yyr]; else return yydefgoto_[yysym - YYNTOKENS]; } bool seclang_parser::yy_pact_value_is_default_ (int yyvalue) { return yyvalue == yypact_ninf_; } bool seclang_parser::yy_table_value_is_error_ (int yyvalue) { return yyvalue == yytable_ninf_; } int seclang_parser::operator() () { return parse (); } int seclang_parser::parse () { int yyn; /// Length of the RHS of the rule being reduced. int yylen = 0; // Error handling. int yynerrs_ = 0; int yyerrstatus_ = 0; /// The lookahead symbol. symbol_type yyla; /// The locations where the error started and ended. stack_symbol_type yyerror_range[3]; /// The return value of parse (). int yyresult; #if YY_EXCEPTIONS try #endif // YY_EXCEPTIONS { YYCDEBUG << "Starting parse\n"; // User initialization code. #line 318 "seclang-parser.yy" { // Initialize the initial location. yyla.location.begin.filename = yyla.location.end.filename = new std::string(driver.file); } #line 1328 "seclang-parser.cc" /* Initialize the stack. The initial state will be set in yynewstate, since the latter expects the semantical and the location values to have been already stored, initialize these stacks with a primary value. */ yystack_.clear (); yypush_ (YY_NULLPTR, 0, YY_MOVE (yyla)); /*-----------------------------------------------. | yynewstate -- push a new symbol on the stack. | `-----------------------------------------------*/ yynewstate: YYCDEBUG << "Entering state " << int (yystack_[0].state) << '\n'; YY_STACK_PRINT (); // Accept? if (yystack_[0].state == yyfinal_) YYACCEPT; goto yybackup; /*-----------. | yybackup. | `-----------*/ yybackup: // Try to take a decision without lookahead. yyn = yypact_[+yystack_[0].state]; if (yy_pact_value_is_default_ (yyn)) goto yydefault; // Read a lookahead token. if (yyla.empty ()) { YYCDEBUG << "Reading a token\n"; #if YY_EXCEPTIONS try #endif // YY_EXCEPTIONS { symbol_type yylookahead (yylex (driver)); yyla.move (yylookahead); } #if YY_EXCEPTIONS catch (const syntax_error& yyexc) { YYCDEBUG << "Caught exception: " << yyexc.what() << '\n'; error (yyexc); goto yyerrlab1; } #endif // YY_EXCEPTIONS } YY_SYMBOL_PRINT ("Next token is", yyla); if (yyla.kind () == symbol_kind::S_YYerror) { // The scanner already issued an error message, process directly // to error recovery. But do not keep the error token as // lookahead, it is too special and may lead us to an endless // loop in error recovery. */ yyla.kind_ = symbol_kind::S_YYUNDEF; goto yyerrlab1; } /* If the proper action on seeing token YYLA.TYPE is to reduce or to detect an error, take that action. */ yyn += yyla.kind (); if (yyn < 0 || yylast_ < yyn || yycheck_[yyn] != yyla.kind ()) { goto yydefault; } // Reduce or error. yyn = yytable_[yyn]; if (yyn <= 0) { if (yy_table_value_is_error_ (yyn)) goto yyerrlab; yyn = -yyn; goto yyreduce; } // Count tokens shifted since error; after three, turn off error status. if (yyerrstatus_) --yyerrstatus_; // Shift the lookahead token. yypush_ ("Shifting", state_type (yyn), YY_MOVE (yyla)); goto yynewstate; /*-----------------------------------------------------------. | yydefault -- do the default action for the current state. | `-----------------------------------------------------------*/ yydefault: yyn = yydefact_[+yystack_[0].state]; if (yyn == 0) goto yyerrlab; goto yyreduce; /*-----------------------------. | yyreduce -- do a reduction. | `-----------------------------*/ yyreduce: yylen = yyr2_[yyn]; { stack_symbol_type yylhs; yylhs.state = yy_lr_goto_state_ (yystack_[yylen].state, yyr1_[yyn]); /* Variants are always initialized to an empty instance of the correct type. The default '$$ = $1' action is NOT applied when using variants. */ switch (yyr1_[yyn]) { case symbol_kind::S_ACTION_ACCURACY: // "Accuracy" case symbol_kind::S_ACTION_ALLOW: // "Allow" case symbol_kind::S_ACTION_APPEND: // "Append" case symbol_kind::S_ACTION_AUDIT_LOG: // "AuditLog" case symbol_kind::S_ACTION_BLOCK: // "Block" case symbol_kind::S_ACTION_CAPTURE: // "Capture" case symbol_kind::S_ACTION_CHAIN: // "Chain" case symbol_kind::S_ACTION_CTL_AUDIT_ENGINE: // "ACTION_CTL_AUDIT_ENGINE" case symbol_kind::S_ACTION_CTL_AUDIT_LOG_PARTS: // "ACTION_CTL_AUDIT_LOG_PARTS" case symbol_kind::S_ACTION_CTL_BDY_JSON: // "ACTION_CTL_BDY_JSON" case symbol_kind::S_ACTION_CTL_BDY_XML: // "ACTION_CTL_BDY_XML" case symbol_kind::S_ACTION_CTL_BDY_URLENCODED: // "ACTION_CTL_BDY_URLENCODED" case symbol_kind::S_ACTION_CTL_FORCE_REQ_BODY_VAR: // "ACTION_CTL_FORCE_REQ_BODY_VAR" case symbol_kind::S_ACTION_CTL_REQUEST_BODY_ACCESS: // "ACTION_CTL_REQUEST_BODY_ACCESS" case symbol_kind::S_ACTION_CTL_RULE_REMOVE_BY_ID: // "ACTION_CTL_RULE_REMOVE_BY_ID" case symbol_kind::S_ACTION_CTL_RULE_REMOVE_BY_TAG: // "ACTION_CTL_RULE_REMOVE_BY_TAG" case symbol_kind::S_ACTION_CTL_RULE_REMOVE_TARGET_BY_ID: // "ACTION_CTL_RULE_REMOVE_TARGET_BY_ID" case symbol_kind::S_ACTION_CTL_RULE_REMOVE_TARGET_BY_TAG: // "ACTION_CTL_RULE_REMOVE_TARGET_BY_TAG" case symbol_kind::S_ACTION_DENY: // "Deny" case symbol_kind::S_ACTION_DEPRECATE_VAR: // "DeprecateVar" case symbol_kind::S_ACTION_DROP: // "Drop" case symbol_kind::S_ACTION_EXEC: // "Exec" case symbol_kind::S_ACTION_EXPIRE_VAR: // "ExpireVar" case symbol_kind::S_ACTION_ID: // "Id" case symbol_kind::S_ACTION_INITCOL: // "InitCol" case symbol_kind::S_ACTION_LOG: // "Log" case symbol_kind::S_ACTION_LOG_DATA: // "LogData" case symbol_kind::S_ACTION_MATURITY: // "Maturity" case symbol_kind::S_ACTION_MSG: // "Msg" case symbol_kind::S_ACTION_MULTI_MATCH: // "MultiMatch" case symbol_kind::S_ACTION_NO_AUDIT_LOG: // "NoAuditLog" case symbol_kind::S_ACTION_NO_LOG: // "NoLog" case symbol_kind::S_ACTION_PASS: // "Pass" case symbol_kind::S_ACTION_PAUSE: // "Pause" case symbol_kind::S_ACTION_PHASE: // "Phase" case symbol_kind::S_ACTION_PREPEND: // "Prepend" case symbol_kind::S_ACTION_PROXY: // "Proxy" case symbol_kind::S_ACTION_REDIRECT: // "Redirect" case symbol_kind::S_ACTION_REV: // "Rev" case symbol_kind::S_ACTION_SANITISE_ARG: // "SanitiseArg" case symbol_kind::S_ACTION_SANITISE_MATCHED: // "SanitiseMatched" case symbol_kind::S_ACTION_SANITISE_MATCHED_BYTES: // "SanitiseMatchedBytes" case symbol_kind::S_ACTION_SANITISE_REQUEST_HEADER: // "SanitiseRequestHeader" case symbol_kind::S_ACTION_SANITISE_RESPONSE_HEADER: // "SanitiseResponseHeader" case symbol_kind::S_ACTION_SETENV: // "SetEnv" case symbol_kind::S_ACTION_SETRSC: // "SetRsc" case symbol_kind::S_ACTION_SETSID: // "SetSid" case symbol_kind::S_ACTION_SETUID: // "SetUID" case symbol_kind::S_ACTION_SEVERITY: // "Severity" case symbol_kind::S_ACTION_SKIP: // "Skip" case symbol_kind::S_ACTION_SKIP_AFTER: // "SkipAfter" case symbol_kind::S_ACTION_STATUS: // "Status" case symbol_kind::S_ACTION_TAG: // "Tag" case symbol_kind::S_ACTION_TRANSFORMATION_BASE_64_ENCODE: // "ACTION_TRANSFORMATION_BASE_64_ENCODE" case symbol_kind::S_ACTION_TRANSFORMATION_BASE_64_DECODE: // "ACTION_TRANSFORMATION_BASE_64_DECODE" case symbol_kind::S_ACTION_TRANSFORMATION_BASE_64_DECODE_EXT: // "ACTION_TRANSFORMATION_BASE_64_DECODE_EXT" case symbol_kind::S_ACTION_TRANSFORMATION_CMD_LINE: // "ACTION_TRANSFORMATION_CMD_LINE" case symbol_kind::S_ACTION_TRANSFORMATION_COMPRESS_WHITESPACE: // "ACTION_TRANSFORMATION_COMPRESS_WHITESPACE" case symbol_kind::S_ACTION_TRANSFORMATION_CSS_DECODE: // "ACTION_TRANSFORMATION_CSS_DECODE" case symbol_kind::S_ACTION_TRANSFORMATION_ESCAPE_SEQ_DECODE: // "ACTION_TRANSFORMATION_ESCAPE_SEQ_DECODE" case symbol_kind::S_ACTION_TRANSFORMATION_HEX_ENCODE: // "ACTION_TRANSFORMATION_HEX_ENCODE" case symbol_kind::S_ACTION_TRANSFORMATION_HEX_DECODE: // "ACTION_TRANSFORMATION_HEX_DECODE" case symbol_kind::S_ACTION_TRANSFORMATION_HTML_ENTITY_DECODE: // "ACTION_TRANSFORMATION_HTML_ENTITY_DECODE" case symbol_kind::S_ACTION_TRANSFORMATION_JS_DECODE: // "ACTION_TRANSFORMATION_JS_DECODE" case symbol_kind::S_ACTION_TRANSFORMATION_LENGTH: // "ACTION_TRANSFORMATION_LENGTH" case symbol_kind::S_ACTION_TRANSFORMATION_LOWERCASE: // "ACTION_TRANSFORMATION_LOWERCASE" case symbol_kind::S_ACTION_TRANSFORMATION_MD5: // "ACTION_TRANSFORMATION_MD5" case symbol_kind::S_ACTION_TRANSFORMATION_NONE: // "ACTION_TRANSFORMATION_NONE" case symbol_kind::S_ACTION_TRANSFORMATION_NORMALISE_PATH: // "ACTION_TRANSFORMATION_NORMALISE_PATH" case symbol_kind::S_ACTION_TRANSFORMATION_NORMALISE_PATH_WIN: // "ACTION_TRANSFORMATION_NORMALISE_PATH_WIN" case symbol_kind::S_ACTION_TRANSFORMATION_PARITY_EVEN_7_BIT: // "ACTION_TRANSFORMATION_PARITY_EVEN_7_BIT" case symbol_kind::S_ACTION_TRANSFORMATION_PARITY_ODD_7_BIT: // "ACTION_TRANSFORMATION_PARITY_ODD_7_BIT" case symbol_kind::S_ACTION_TRANSFORMATION_PARITY_ZERO_7_BIT: // "ACTION_TRANSFORMATION_PARITY_ZERO_7_BIT" case symbol_kind::S_ACTION_TRANSFORMATION_REMOVE_COMMENTS: // "ACTION_TRANSFORMATION_REMOVE_COMMENTS" case symbol_kind::S_ACTION_TRANSFORMATION_REMOVE_COMMENTS_CHAR: // "ACTION_TRANSFORMATION_REMOVE_COMMENTS_CHAR" case symbol_kind::S_ACTION_TRANSFORMATION_REMOVE_NULLS: // "ACTION_TRANSFORMATION_REMOVE_NULLS" case symbol_kind::S_ACTION_TRANSFORMATION_REMOVE_WHITESPACE: // "ACTION_TRANSFORMATION_REMOVE_WHITESPACE" case symbol_kind::S_ACTION_TRANSFORMATION_REPLACE_COMMENTS: // "ACTION_TRANSFORMATION_REPLACE_COMMENTS" case symbol_kind::S_ACTION_TRANSFORMATION_REPLACE_NULLS: // "ACTION_TRANSFORMATION_REPLACE_NULLS" case symbol_kind::S_ACTION_TRANSFORMATION_SHA1: // "ACTION_TRANSFORMATION_SHA1" case symbol_kind::S_ACTION_TRANSFORMATION_SQL_HEX_DECODE: // "ACTION_TRANSFORMATION_SQL_HEX_DECODE" case symbol_kind::S_ACTION_TRANSFORMATION_TRIM: // "ACTION_TRANSFORMATION_TRIM" case symbol_kind::S_ACTION_TRANSFORMATION_TRIM_LEFT: // "ACTION_TRANSFORMATION_TRIM_LEFT" case symbol_kind::S_ACTION_TRANSFORMATION_TRIM_RIGHT: // "ACTION_TRANSFORMATION_TRIM_RIGHT" case symbol_kind::S_ACTION_TRANSFORMATION_UPPERCASE: // "ACTION_TRANSFORMATION_UPPERCASE" case symbol_kind::S_ACTION_TRANSFORMATION_URL_ENCODE: // "ACTION_TRANSFORMATION_URL_ENCODE" case symbol_kind::S_ACTION_TRANSFORMATION_URL_DECODE: // "ACTION_TRANSFORMATION_URL_DECODE" case symbol_kind::S_ACTION_TRANSFORMATION_URL_DECODE_UNI: // "ACTION_TRANSFORMATION_URL_DECODE_UNI" case symbol_kind::S_ACTION_TRANSFORMATION_UTF8_TO_UNICODE: // "ACTION_TRANSFORMATION_UTF8_TO_UNICODE" case symbol_kind::S_ACTION_VER: // "Ver" case symbol_kind::S_ACTION_XMLNS: // "xmlns" case symbol_kind::S_CONFIG_COMPONENT_SIG: // "CONFIG_COMPONENT_SIG" case symbol_kind::S_CONFIG_CONN_ENGINE: // "CONFIG_CONN_ENGINE" case symbol_kind::S_CONFIG_SEC_ARGUMENT_SEPARATOR: // "CONFIG_SEC_ARGUMENT_SEPARATOR" case symbol_kind::S_CONFIG_SEC_WEB_APP_ID: // "CONFIG_SEC_WEB_APP_ID" case symbol_kind::S_CONFIG_SEC_SERVER_SIG: // "CONFIG_SEC_SERVER_SIG" case symbol_kind::S_CONFIG_DIR_AUDIT_DIR: // "CONFIG_DIR_AUDIT_DIR" case symbol_kind::S_CONFIG_DIR_AUDIT_DIR_MOD: // "CONFIG_DIR_AUDIT_DIR_MOD" case symbol_kind::S_CONFIG_DIR_AUDIT_ENG: // "CONFIG_DIR_AUDIT_ENG" case symbol_kind::S_CONFIG_DIR_AUDIT_FLE_MOD: // "CONFIG_DIR_AUDIT_FLE_MOD" case symbol_kind::S_CONFIG_DIR_AUDIT_LOG: // "CONFIG_DIR_AUDIT_LOG" case symbol_kind::S_CONFIG_DIR_AUDIT_LOG2: // "CONFIG_DIR_AUDIT_LOG2" case symbol_kind::S_CONFIG_DIR_AUDIT_LOG_P: // "CONFIG_DIR_AUDIT_LOG_P" case symbol_kind::S_CONFIG_DIR_AUDIT_STS: // "CONFIG_DIR_AUDIT_STS" case symbol_kind::S_CONFIG_DIR_AUDIT_TPE: // "CONFIG_DIR_AUDIT_TPE" case symbol_kind::S_CONFIG_DIR_DEBUG_LOG: // "CONFIG_DIR_DEBUG_LOG" case symbol_kind::S_CONFIG_DIR_DEBUG_LVL: // "CONFIG_DIR_DEBUG_LVL" case symbol_kind::S_CONFIG_SEC_CACHE_TRANSFORMATIONS: // "CONFIG_SEC_CACHE_TRANSFORMATIONS" case symbol_kind::S_CONFIG_SEC_DISABLE_BACKEND_COMPRESS: // "CONFIG_SEC_DISABLE_BACKEND_COMPRESS" case symbol_kind::S_CONFIG_SEC_HASH_ENGINE: // "CONFIG_SEC_HASH_ENGINE" case symbol_kind::S_CONFIG_SEC_HASH_KEY: // "CONFIG_SEC_HASH_KEY" case symbol_kind::S_CONFIG_SEC_HASH_PARAM: // "CONFIG_SEC_HASH_PARAM" case symbol_kind::S_CONFIG_SEC_HASH_METHOD_RX: // "CONFIG_SEC_HASH_METHOD_RX" case symbol_kind::S_CONFIG_SEC_HASH_METHOD_PM: // "CONFIG_SEC_HASH_METHOD_PM" case symbol_kind::S_CONFIG_SEC_CHROOT_DIR: // "CONFIG_SEC_CHROOT_DIR" case symbol_kind::S_CONFIG_DIR_GEO_DB: // "CONFIG_DIR_GEO_DB" case symbol_kind::S_CONFIG_DIR_GSB_DB: // "CONFIG_DIR_GSB_DB" case symbol_kind::S_CONFIG_SEC_GUARDIAN_LOG: // "CONFIG_SEC_GUARDIAN_LOG" case symbol_kind::S_CONFIG_DIR_PCRE_MATCH_LIMIT: // "CONFIG_DIR_PCRE_MATCH_LIMIT" case symbol_kind::S_CONFIG_DIR_PCRE_MATCH_LIMIT_RECURSION: // "CONFIG_DIR_PCRE_MATCH_LIMIT_RECURSION" case symbol_kind::S_CONFIG_SEC_CONN_R_STATE_LIMIT: // "CONFIG_SEC_CONN_R_STATE_LIMIT" case symbol_kind::S_CONFIG_SEC_CONN_W_STATE_LIMIT: // "CONFIG_SEC_CONN_W_STATE_LIMIT" case symbol_kind::S_CONFIG_SEC_SENSOR_ID: // "CONFIG_SEC_SENSOR_ID" case symbol_kind::S_CONFIG_DIR_ARGS_LIMIT: // "CONFIG_DIR_ARGS_LIMIT" case symbol_kind::S_CONFIG_DIR_REQ_BODY_JSON_DEPTH_LIMIT: // "CONFIG_DIR_REQ_BODY_JSON_DEPTH_LIMIT" case symbol_kind::S_CONFIG_DIR_REQ_BODY: // "CONFIG_DIR_REQ_BODY" case symbol_kind::S_CONFIG_DIR_REQ_BODY_IN_MEMORY_LIMIT: // "CONFIG_DIR_REQ_BODY_IN_MEMORY_LIMIT" case symbol_kind::S_CONFIG_DIR_REQ_BODY_LIMIT: // "CONFIG_DIR_REQ_BODY_LIMIT" case symbol_kind::S_CONFIG_DIR_REQ_BODY_LIMIT_ACTION: // "CONFIG_DIR_REQ_BODY_LIMIT_ACTION" case symbol_kind::S_CONFIG_DIR_REQ_BODY_NO_FILES_LIMIT: // "CONFIG_DIR_REQ_BODY_NO_FILES_LIMIT" case symbol_kind::S_CONFIG_DIR_RES_BODY: // "CONFIG_DIR_RES_BODY" case symbol_kind::S_CONFIG_DIR_RES_BODY_LIMIT: // "CONFIG_DIR_RES_BODY_LIMIT" case symbol_kind::S_CONFIG_DIR_RES_BODY_LIMIT_ACTION: // "CONFIG_DIR_RES_BODY_LIMIT_ACTION" case symbol_kind::S_CONFIG_SEC_RULE_INHERITANCE: // "CONFIG_SEC_RULE_INHERITANCE" case symbol_kind::S_CONFIG_SEC_RULE_PERF_TIME: // "CONFIG_SEC_RULE_PERF_TIME" case symbol_kind::S_CONFIG_DIR_RULE_ENG: // "CONFIG_DIR_RULE_ENG" case symbol_kind::S_CONFIG_DIR_SEC_ACTION: // "CONFIG_DIR_SEC_ACTION" case symbol_kind::S_CONFIG_DIR_SEC_DEFAULT_ACTION: // "CONFIG_DIR_SEC_DEFAULT_ACTION" case symbol_kind::S_CONFIG_DIR_SEC_MARKER: // "CONFIG_DIR_SEC_MARKER" case symbol_kind::S_CONFIG_DIR_UNICODE_MAP_FILE: // "CONFIG_DIR_UNICODE_MAP_FILE" case symbol_kind::S_CONFIG_DIR_UNICODE_CODE_PAGE: // "CONFIG_DIR_UNICODE_CODE_PAGE" case symbol_kind::S_CONFIG_SEC_COLLECTION_TIMEOUT: // "CONFIG_SEC_COLLECTION_TIMEOUT" case symbol_kind::S_CONFIG_SEC_HTTP_BLKEY: // "CONFIG_SEC_HTTP_BLKEY" case symbol_kind::S_CONFIG_SEC_INTERCEPT_ON_ERROR: // "CONFIG_SEC_INTERCEPT_ON_ERROR" case symbol_kind::S_CONFIG_SEC_REMOTE_RULES_FAIL_ACTION: // "CONFIG_SEC_REMOTE_RULES_FAIL_ACTION" case symbol_kind::S_CONFIG_SEC_RULE_REMOVE_BY_ID: // "CONFIG_SEC_RULE_REMOVE_BY_ID" case symbol_kind::S_CONFIG_SEC_RULE_REMOVE_BY_MSG: // "CONFIG_SEC_RULE_REMOVE_BY_MSG" case symbol_kind::S_CONFIG_SEC_RULE_REMOVE_BY_TAG: // "CONFIG_SEC_RULE_REMOVE_BY_TAG" case symbol_kind::S_CONFIG_SEC_RULE_UPDATE_TARGET_BY_TAG: // "CONFIG_SEC_RULE_UPDATE_TARGET_BY_TAG" case symbol_kind::S_CONFIG_SEC_RULE_UPDATE_TARGET_BY_MSG: // "CONFIG_SEC_RULE_UPDATE_TARGET_BY_MSG" case symbol_kind::S_CONFIG_SEC_RULE_UPDATE_TARGET_BY_ID: // "CONFIG_SEC_RULE_UPDATE_TARGET_BY_ID" case symbol_kind::S_CONFIG_SEC_RULE_UPDATE_ACTION_BY_ID: // "CONFIG_SEC_RULE_UPDATE_ACTION_BY_ID" case symbol_kind::S_CONFIG_UPDLOAD_KEEP_FILES: // "CONFIG_UPDLOAD_KEEP_FILES" case symbol_kind::S_CONFIG_UPDLOAD_SAVE_TMP_FILES: // "CONFIG_UPDLOAD_SAVE_TMP_FILES" case symbol_kind::S_CONFIG_UPLOAD_DIR: // "CONFIG_UPLOAD_DIR" case symbol_kind::S_CONFIG_UPLOAD_FILE_LIMIT: // "CONFIG_UPLOAD_FILE_LIMIT" case symbol_kind::S_CONFIG_UPLOAD_FILE_MODE: // "CONFIG_UPLOAD_FILE_MODE" case symbol_kind::S_CONFIG_VALUE_ABORT: // "CONFIG_VALUE_ABORT" case symbol_kind::S_CONFIG_VALUE_DETC: // "CONFIG_VALUE_DETC" case symbol_kind::S_CONFIG_VALUE_HTTPS: // "CONFIG_VALUE_HTTPS" case symbol_kind::S_CONFIG_VALUE_OFF: // "CONFIG_VALUE_OFF" case symbol_kind::S_CONFIG_VALUE_ON: // "CONFIG_VALUE_ON" case symbol_kind::S_CONFIG_VALUE_PARALLEL: // "CONFIG_VALUE_PARALLEL" case symbol_kind::S_CONFIG_VALUE_PROCESS_PARTIAL: // "CONFIG_VALUE_PROCESS_PARTIAL" case symbol_kind::S_CONFIG_VALUE_REJECT: // "CONFIG_VALUE_REJECT" case symbol_kind::S_CONFIG_VALUE_RELEVANT_ONLY: // "CONFIG_VALUE_RELEVANT_ONLY" case symbol_kind::S_CONFIG_VALUE_SERIAL: // "CONFIG_VALUE_SERIAL" case symbol_kind::S_CONFIG_VALUE_WARN: // "CONFIG_VALUE_WARN" case symbol_kind::S_CONFIG_XML_EXTERNAL_ENTITY: // "CONFIG_XML_EXTERNAL_ENTITY" case symbol_kind::S_CONGIG_DIR_RESPONSE_BODY_MP: // "CONGIG_DIR_RESPONSE_BODY_MP" case symbol_kind::S_CONGIG_DIR_SEC_ARG_SEP: // "CONGIG_DIR_SEC_ARG_SEP" case symbol_kind::S_CONGIG_DIR_SEC_COOKIE_FORMAT: // "CONGIG_DIR_SEC_COOKIE_FORMAT" case symbol_kind::S_CONFIG_SEC_COOKIEV0_SEPARATOR: // "CONFIG_SEC_COOKIEV0_SEPARATOR" case symbol_kind::S_CONGIG_DIR_SEC_DATA_DIR: // "CONGIG_DIR_SEC_DATA_DIR" case symbol_kind::S_CONGIG_DIR_SEC_STATUS_ENGINE: // "CONGIG_DIR_SEC_STATUS_ENGINE" case symbol_kind::S_CONFIG_SEC_STREAM_IN_BODY_INSPECTION: // "CONFIG_SEC_STREAM_IN_BODY_INSPECTION" case symbol_kind::S_CONFIG_SEC_STREAM_OUT_BODY_INSPECTION: // "CONFIG_SEC_STREAM_OUT_BODY_INSPECTION" case symbol_kind::S_CONGIG_DIR_SEC_TMP_DIR: // "CONGIG_DIR_SEC_TMP_DIR" case symbol_kind::S_DIRECTIVE: // "DIRECTIVE" case symbol_kind::S_DIRECTIVE_SECRULESCRIPT: // "DIRECTIVE_SECRULESCRIPT" case symbol_kind::S_FREE_TEXT_QUOTE_MACRO_EXPANSION: // "FREE_TEXT_QUOTE_MACRO_EXPANSION" case symbol_kind::S_QUOTATION_MARK: // "QUOTATION_MARK" case symbol_kind::S_RUN_TIME_VAR_BLD: // "RUN_TIME_VAR_BLD" case symbol_kind::S_RUN_TIME_VAR_DUR: // "RUN_TIME_VAR_DUR" case symbol_kind::S_RUN_TIME_VAR_HSV: // "RUN_TIME_VAR_HSV" case symbol_kind::S_RUN_TIME_VAR_REMOTE_USER: // "RUN_TIME_VAR_REMOTE_USER" case symbol_kind::S_RUN_TIME_VAR_TIME: // "RUN_TIME_VAR_TIME" case symbol_kind::S_RUN_TIME_VAR_TIME_DAY: // "RUN_TIME_VAR_TIME_DAY" case symbol_kind::S_RUN_TIME_VAR_TIME_EPOCH: // "RUN_TIME_VAR_TIME_EPOCH" case symbol_kind::S_RUN_TIME_VAR_TIME_HOUR: // "RUN_TIME_VAR_TIME_HOUR" case symbol_kind::S_RUN_TIME_VAR_TIME_MIN: // "RUN_TIME_VAR_TIME_MIN" case symbol_kind::S_RUN_TIME_VAR_TIME_MON: // "RUN_TIME_VAR_TIME_MON" case symbol_kind::S_RUN_TIME_VAR_TIME_SEC: // "RUN_TIME_VAR_TIME_SEC" case symbol_kind::S_RUN_TIME_VAR_TIME_WDAY: // "RUN_TIME_VAR_TIME_WDAY" case symbol_kind::S_RUN_TIME_VAR_TIME_YEAR: // "RUN_TIME_VAR_TIME_YEAR" case symbol_kind::S_VARIABLE: // "VARIABLE" case symbol_kind::S_DICT_ELEMENT: // "Dictionary element" case symbol_kind::S_DICT_ELEMENT_REGEXP: // "Dictionary element, selected by regexp" yylhs.value.emplace< std::string > (); break; case symbol_kind::S_op: // op case symbol_kind::S_op_before_init: // op_before_init yylhs.value.emplace< std::unique_ptr > (); break; case symbol_kind::S_run_time_string: // run_time_string yylhs.value.emplace< std::unique_ptr > (); break; case symbol_kind::S_var: // var yylhs.value.emplace< std::unique_ptr > (); break; case symbol_kind::S_act: // act case symbol_kind::S_setvar_action: // setvar_action yylhs.value.emplace< std::unique_ptr > (); break; case symbol_kind::S_variables: // variables case symbol_kind::S_variables_pre_process: // variables_pre_process case symbol_kind::S_variables_may_be_quoted: // variables_may_be_quoted yylhs.value.emplace< std::unique_ptr > > > (); break; case symbol_kind::S_actions: // actions case symbol_kind::S_actions_may_quoted: // actions_may_quoted yylhs.value.emplace< std::unique_ptr > > > (); break; default: break; } // Default location. { stack_type::slice range (yystack_, yylen); YYLLOC_DEFAULT (yylhs.location, range, yylen); yyerror_range[1].location = yylhs.location; } // Perform the reduction. YY_REDUCE_PRINT (yyn); #if YY_EXCEPTIONS try #endif // YY_EXCEPTIONS { switch (yyn) { case 2: // input: "end of file" #line 712 "seclang-parser.yy" { return 0; } #line 1698 "seclang-parser.cc" break; case 6: // audit_log: "CONFIG_DIR_AUDIT_DIR_MOD" #line 725 "seclang-parser.yy" { driver.m_auditLog->setStorageDirMode(strtol(yystack_[0].value.as < std::string > ().c_str(), NULL, 8)); } #line 1706 "seclang-parser.cc" break; case 7: // audit_log: "CONFIG_DIR_AUDIT_DIR" #line 731 "seclang-parser.yy" { driver.m_auditLog->setStorageDir(yystack_[0].value.as < std::string > ()); } #line 1714 "seclang-parser.cc" break; case 8: // audit_log: "CONFIG_DIR_AUDIT_ENG" "CONFIG_VALUE_RELEVANT_ONLY" #line 737 "seclang-parser.yy" { driver.m_auditLog->setStatus(modsecurity::audit_log::AuditLog::RelevantOnlyAuditLogStatus); } #line 1722 "seclang-parser.cc" break; case 9: // audit_log: "CONFIG_DIR_AUDIT_ENG" "CONFIG_VALUE_OFF" #line 741 "seclang-parser.yy" { driver.m_auditLog->setStatus(modsecurity::audit_log::AuditLog::OffAuditLogStatus); } #line 1730 "seclang-parser.cc" break; case 10: // audit_log: "CONFIG_DIR_AUDIT_ENG" "CONFIG_VALUE_ON" #line 745 "seclang-parser.yy" { driver.m_auditLog->setStatus(modsecurity::audit_log::AuditLog::OnAuditLogStatus); } #line 1738 "seclang-parser.cc" break; case 11: // audit_log: "CONFIG_DIR_AUDIT_FLE_MOD" #line 751 "seclang-parser.yy" { driver.m_auditLog->setFileMode(strtol(yystack_[0].value.as < std::string > ().c_str(), NULL, 8)); } #line 1746 "seclang-parser.cc" break; case 12: // audit_log: "CONFIG_DIR_AUDIT_LOG2" #line 757 "seclang-parser.yy" { driver.m_auditLog->setFilePath2(yystack_[0].value.as < std::string > ()); } #line 1754 "seclang-parser.cc" break; case 13: // audit_log: "CONFIG_DIR_AUDIT_LOG_P" #line 763 "seclang-parser.yy" { driver.m_auditLog->setParts(yystack_[0].value.as < std::string > ()); } #line 1762 "seclang-parser.cc" break; case 14: // audit_log: "CONFIG_DIR_AUDIT_LOG" #line 769 "seclang-parser.yy" { driver.m_auditLog->setFilePath1(yystack_[0].value.as < std::string > ()); } #line 1770 "seclang-parser.cc" break; case 15: // audit_log: CONFIG_DIR_AUDIT_LOG_FMT JSON #line 774 "seclang-parser.yy" { driver.m_auditLog->setFormat(modsecurity::audit_log::AuditLog::JSONAuditLogFormat); } #line 1778 "seclang-parser.cc" break; case 16: // audit_log: CONFIG_DIR_AUDIT_LOG_FMT NATIVE #line 779 "seclang-parser.yy" { driver.m_auditLog->setFormat(modsecurity::audit_log::AuditLog::NativeAuditLogFormat); } #line 1786 "seclang-parser.cc" break; case 17: // audit_log: "CONFIG_DIR_AUDIT_STS" #line 785 "seclang-parser.yy" { std::string relevant_status(yystack_[0].value.as < std::string > ()); driver.m_auditLog->setRelevantStatus(relevant_status); } #line 1795 "seclang-parser.cc" break; case 18: // audit_log: "CONFIG_DIR_AUDIT_TPE" "CONFIG_VALUE_SERIAL" #line 792 "seclang-parser.yy" { driver.m_auditLog->setType(modsecurity::audit_log::AuditLog::SerialAuditLogType); } #line 1803 "seclang-parser.cc" break; case 19: // audit_log: "CONFIG_DIR_AUDIT_TPE" "CONFIG_VALUE_PARALLEL" #line 796 "seclang-parser.yy" { driver.m_auditLog->setType(modsecurity::audit_log::AuditLog::ParallelAuditLogType); } #line 1811 "seclang-parser.cc" break; case 20: // audit_log: "CONFIG_DIR_AUDIT_TPE" "CONFIG_VALUE_HTTPS" #line 800 "seclang-parser.yy" { driver.m_auditLog->setType(modsecurity::audit_log::AuditLog::HttpsAuditLogType); } #line 1819 "seclang-parser.cc" break; case 21: // audit_log: "CONFIG_UPDLOAD_KEEP_FILES" "CONFIG_VALUE_ON" #line 806 "seclang-parser.yy" { driver.m_uploadKeepFiles = modsecurity::RulesSetProperties::TrueConfigBoolean; } #line 1827 "seclang-parser.cc" break; case 22: // audit_log: "CONFIG_UPDLOAD_KEEP_FILES" "CONFIG_VALUE_OFF" #line 810 "seclang-parser.yy" { driver.m_uploadKeepFiles = modsecurity::RulesSetProperties::FalseConfigBoolean; } #line 1835 "seclang-parser.cc" break; case 23: // audit_log: "CONFIG_UPDLOAD_KEEP_FILES" "CONFIG_VALUE_RELEVANT_ONLY" #line 814 "seclang-parser.yy" { driver.error(yystack_[2].location, "SecUploadKeepFiles RelevantOnly is not currently supported. Accepted values are On or Off"); YYERROR; } #line 1844 "seclang-parser.cc" break; case 24: // audit_log: "CONFIG_UPLOAD_FILE_LIMIT" #line 819 "seclang-parser.yy" { driver.m_uploadFileLimit.m_set = true; driver.m_uploadFileLimit.m_value = strtol(yystack_[0].value.as < std::string > ().c_str(), NULL, 10); } #line 1853 "seclang-parser.cc" break; case 25: // audit_log: "CONFIG_UPLOAD_FILE_MODE" #line 824 "seclang-parser.yy" { driver.m_uploadFileMode.m_set = true; driver.m_uploadFileMode.m_value = strtol(yystack_[0].value.as < std::string > ().c_str(), NULL, 8); } #line 1862 "seclang-parser.cc" break; case 26: // audit_log: "CONFIG_UPLOAD_DIR" #line 829 "seclang-parser.yy" { driver.m_uploadDirectory.m_set = true; driver.m_uploadDirectory.m_value = yystack_[0].value.as < std::string > (); } #line 1871 "seclang-parser.cc" break; case 27: // audit_log: "CONFIG_UPDLOAD_SAVE_TMP_FILES" "CONFIG_VALUE_ON" #line 834 "seclang-parser.yy" { driver.m_tmpSaveUploadedFiles = modsecurity::RulesSetProperties::TrueConfigBoolean; } #line 1879 "seclang-parser.cc" break; case 28: // audit_log: "CONFIG_UPDLOAD_SAVE_TMP_FILES" "CONFIG_VALUE_OFF" #line 838 "seclang-parser.yy" { driver.m_tmpSaveUploadedFiles = modsecurity::RulesSetProperties::FalseConfigBoolean; } #line 1887 "seclang-parser.cc" break; case 29: // actions: "QUOTATION_MARK" actions_may_quoted "QUOTATION_MARK" #line 845 "seclang-parser.yy" { yylhs.value.as < std::unique_ptr > > > () = std::move(yystack_[1].value.as < std::unique_ptr > > > ()); } #line 1895 "seclang-parser.cc" break; case 30: // actions: actions_may_quoted #line 849 "seclang-parser.yy" { yylhs.value.as < std::unique_ptr > > > () = std::move(yystack_[0].value.as < std::unique_ptr > > > ()); } #line 1903 "seclang-parser.cc" break; case 31: // actions_may_quoted: actions_may_quoted "," act #line 856 "seclang-parser.yy" { ACTION_INIT(yystack_[0].value.as < std::unique_ptr > (), yystack_[3].location) yystack_[2].value.as < std::unique_ptr > > > ()->push_back(std::move(yystack_[0].value.as < std::unique_ptr > ())); yylhs.value.as < std::unique_ptr > > > () = std::move(yystack_[2].value.as < std::unique_ptr > > > ()); } #line 1913 "seclang-parser.cc" break; case 32: // actions_may_quoted: act #line 862 "seclang-parser.yy" { std::unique_ptr>> b(new std::vector>()); ACTION_INIT(yystack_[0].value.as < std::unique_ptr > (), yystack_[1].location) b->push_back(std::move(yystack_[0].value.as < std::unique_ptr > ())); yylhs.value.as < std::unique_ptr > > > () = std::move(b); } #line 1924 "seclang-parser.cc" break; case 33: // op: op_before_init #line 872 "seclang-parser.yy" { yylhs.value.as < std::unique_ptr > () = std::move(yystack_[0].value.as < std::unique_ptr > ()); std::string error; if (yylhs.value.as < std::unique_ptr > ()->init(*yystack_[0].location.end.filename, &error) == false) { driver.error(yystack_[1].location, error); YYERROR; } } #line 1937 "seclang-parser.cc" break; case 34: // op: "NOT" op_before_init #line 881 "seclang-parser.yy" { yylhs.value.as < std::unique_ptr > () = std::move(yystack_[0].value.as < std::unique_ptr > ()); yylhs.value.as < std::unique_ptr > ()->m_negation = true; std::string error; if (yylhs.value.as < std::unique_ptr > ()->init(*yystack_[1].location.end.filename, &error) == false) { driver.error(yystack_[2].location, error); YYERROR; } } #line 1951 "seclang-parser.cc" break; case 35: // op: run_time_string #line 891 "seclang-parser.yy" { OPERATOR_CONTAINER(yylhs.value.as < std::unique_ptr > (), new operators::Rx(std::move(yystack_[0].value.as < std::unique_ptr > ()))); std::string error; if (yylhs.value.as < std::unique_ptr > ()->init(*yystack_[0].location.end.filename, &error) == false) { driver.error(yystack_[1].location, error); YYERROR; } } #line 1964 "seclang-parser.cc" break; case 36: // op: "NOT" run_time_string #line 900 "seclang-parser.yy" { OPERATOR_CONTAINER(yylhs.value.as < std::unique_ptr > (), new operators::Rx(std::move(yystack_[0].value.as < std::unique_ptr > ()))); yylhs.value.as < std::unique_ptr > ()->m_negation = true; std::string error; if (yylhs.value.as < std::unique_ptr > ()->init(*yystack_[1].location.end.filename, &error) == false) { driver.error(yystack_[2].location, error); YYERROR; } } #line 1978 "seclang-parser.cc" break; case 37: // op_before_init: "OPERATOR_UNCONDITIONAL_MATCH" #line 913 "seclang-parser.yy" { OPERATOR_CONTAINER(yylhs.value.as < std::unique_ptr > (), new operators::UnconditionalMatch()); } #line 1986 "seclang-parser.cc" break; case 38: // op_before_init: "OPERATOR_DETECT_SQLI" #line 917 "seclang-parser.yy" { OPERATOR_CONTAINER(yylhs.value.as < std::unique_ptr > (), new operators::DetectSQLi()); } #line 1994 "seclang-parser.cc" break; case 39: // op_before_init: "OPERATOR_DETECT_XSS" #line 921 "seclang-parser.yy" { OPERATOR_CONTAINER(yylhs.value.as < std::unique_ptr > (), new operators::DetectXSS()); } #line 2002 "seclang-parser.cc" break; case 40: // op_before_init: "OPERATOR_VALIDATE_URL_ENCODING" #line 925 "seclang-parser.yy" { OPERATOR_CONTAINER(yylhs.value.as < std::unique_ptr > (), new operators::ValidateUrlEncoding()); } #line 2010 "seclang-parser.cc" break; case 41: // op_before_init: "OPERATOR_VALIDATE_UTF8_ENCODING" #line 929 "seclang-parser.yy" { OPERATOR_CONTAINER(yylhs.value.as < std::unique_ptr > (), new operators::ValidateUtf8Encoding()); } #line 2018 "seclang-parser.cc" break; case 42: // op_before_init: "OPERATOR_INSPECT_FILE" run_time_string #line 933 "seclang-parser.yy" { OPERATOR_CONTAINER(yylhs.value.as < std::unique_ptr > (), new operators::InspectFile(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } #line 2026 "seclang-parser.cc" break; case 43: // op_before_init: "OPERATOR_FUZZY_HASH" run_time_string #line 937 "seclang-parser.yy" { OPERATOR_CONTAINER(yylhs.value.as < std::unique_ptr > (), new operators::FuzzyHash(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } #line 2034 "seclang-parser.cc" break; case 44: // op_before_init: "OPERATOR_VALIDATE_BYTE_RANGE" run_time_string #line 941 "seclang-parser.yy" { OPERATOR_CONTAINER(yylhs.value.as < std::unique_ptr > (), new operators::ValidateByteRange(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } #line 2042 "seclang-parser.cc" break; case 45: // op_before_init: "OPERATOR_VALIDATE_DTD" run_time_string #line 945 "seclang-parser.yy" { OPERATOR_CONTAINER(yylhs.value.as < std::unique_ptr > (), new operators::ValidateDTD(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } #line 2050 "seclang-parser.cc" break; case 46: // op_before_init: "OPERATOR_VALIDATE_HASH" run_time_string #line 949 "seclang-parser.yy" { /* $$ = new operators::ValidateHash($1); */ OPERATOR_NOT_SUPPORTED("ValidateHash", yystack_[2].location); } #line 2059 "seclang-parser.cc" break; case 47: // op_before_init: "OPERATOR_VALIDATE_SCHEMA" run_time_string #line 954 "seclang-parser.yy" { OPERATOR_CONTAINER(yylhs.value.as < std::unique_ptr > (), new operators::ValidateSchema(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } #line 2067 "seclang-parser.cc" break; case 48: // op_before_init: "OPERATOR_VERIFY_CC" run_time_string #line 958 "seclang-parser.yy" { OPERATOR_CONTAINER(yylhs.value.as < std::unique_ptr > (), new operators::VerifyCC(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } #line 2075 "seclang-parser.cc" break; case 49: // op_before_init: "OPERATOR_VERIFY_CPF" run_time_string #line 962 "seclang-parser.yy" { OPERATOR_CONTAINER(yylhs.value.as < std::unique_ptr > (), new operators::VerifyCPF(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } #line 2083 "seclang-parser.cc" break; case 50: // op_before_init: "OPERATOR_VERIFY_SSN" run_time_string #line 966 "seclang-parser.yy" { OPERATOR_CONTAINER(yylhs.value.as < std::unique_ptr > (), new operators::VerifySSN(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } #line 2091 "seclang-parser.cc" break; case 51: // op_before_init: "OPERATOR_VERIFY_SVNR" run_time_string #line 970 "seclang-parser.yy" { OPERATOR_CONTAINER(yylhs.value.as < std::unique_ptr > (), new operators::VerifySVNR(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } #line 2099 "seclang-parser.cc" break; case 52: // op_before_init: "OPERATOR_GSB_LOOKUP" run_time_string #line 974 "seclang-parser.yy" { /* $$ = new operators::GsbLookup($1); */ OPERATOR_NOT_SUPPORTED("GsbLookup", yystack_[2].location); } #line 2108 "seclang-parser.cc" break; case 53: // op_before_init: "OPERATOR_RSUB" run_time_string #line 979 "seclang-parser.yy" { /* $$ = new operators::Rsub($1); */ OPERATOR_NOT_SUPPORTED("Rsub", yystack_[2].location); } #line 2117 "seclang-parser.cc" break; case 54: // op_before_init: "OPERATOR_WITHIN" run_time_string #line 984 "seclang-parser.yy" { OPERATOR_CONTAINER(yylhs.value.as < std::unique_ptr > (), new operators::Within(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } #line 2125 "seclang-parser.cc" break; case 55: // op_before_init: "OPERATOR_CONTAINS_WORD" run_time_string #line 988 "seclang-parser.yy" { OPERATOR_CONTAINER(yylhs.value.as < std::unique_ptr > (), new operators::ContainsWord(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } #line 2133 "seclang-parser.cc" break; case 56: // op_before_init: "OPERATOR_CONTAINS" run_time_string #line 992 "seclang-parser.yy" { OPERATOR_CONTAINER(yylhs.value.as < std::unique_ptr > (), new operators::Contains(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } #line 2141 "seclang-parser.cc" break; case 57: // op_before_init: "OPERATOR_ENDS_WITH" run_time_string #line 996 "seclang-parser.yy" { OPERATOR_CONTAINER(yylhs.value.as < std::unique_ptr > (), new operators::EndsWith(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } #line 2149 "seclang-parser.cc" break; case 58: // op_before_init: "OPERATOR_EQ" run_time_string #line 1000 "seclang-parser.yy" { OPERATOR_CONTAINER(yylhs.value.as < std::unique_ptr > (), new operators::Eq(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } #line 2157 "seclang-parser.cc" break; case 59: // op_before_init: "OPERATOR_GE" run_time_string #line 1004 "seclang-parser.yy" { OPERATOR_CONTAINER(yylhs.value.as < std::unique_ptr > (), new operators::Ge(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } #line 2165 "seclang-parser.cc" break; case 60: // op_before_init: "OPERATOR_GT" run_time_string #line 1008 "seclang-parser.yy" { OPERATOR_CONTAINER(yylhs.value.as < std::unique_ptr > (), new operators::Gt(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } #line 2173 "seclang-parser.cc" break; case 61: // op_before_init: "OPERATOR_IP_MATCH_FROM_FILE" run_time_string #line 1012 "seclang-parser.yy" { OPERATOR_CONTAINER(yylhs.value.as < std::unique_ptr > (), new operators::IpMatchF(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } #line 2181 "seclang-parser.cc" break; case 62: // op_before_init: "OPERATOR_IP_MATCH" run_time_string #line 1016 "seclang-parser.yy" { OPERATOR_CONTAINER(yylhs.value.as < std::unique_ptr > (), new operators::IpMatch(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } #line 2189 "seclang-parser.cc" break; case 63: // op_before_init: "OPERATOR_LE" run_time_string #line 1020 "seclang-parser.yy" { OPERATOR_CONTAINER(yylhs.value.as < std::unique_ptr > (), new operators::Le(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } #line 2197 "seclang-parser.cc" break; case 64: // op_before_init: "OPERATOR_LT" run_time_string #line 1024 "seclang-parser.yy" { OPERATOR_CONTAINER(yylhs.value.as < std::unique_ptr > (), new operators::Lt(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } #line 2205 "seclang-parser.cc" break; case 65: // op_before_init: "OPERATOR_PM_FROM_FILE" run_time_string #line 1028 "seclang-parser.yy" { OPERATOR_CONTAINER(yylhs.value.as < std::unique_ptr > (), new operators::PmFromFile(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } #line 2213 "seclang-parser.cc" break; case 66: // op_before_init: "OPERATOR_PM" run_time_string #line 1032 "seclang-parser.yy" { OPERATOR_CONTAINER(yylhs.value.as < std::unique_ptr > (), new operators::Pm(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } #line 2221 "seclang-parser.cc" break; case 67: // op_before_init: "OPERATOR_RBL" run_time_string #line 1036 "seclang-parser.yy" { OPERATOR_CONTAINER(yylhs.value.as < std::unique_ptr > (), new operators::Rbl(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } #line 2229 "seclang-parser.cc" break; case 68: // op_before_init: "OPERATOR_RX" run_time_string #line 1040 "seclang-parser.yy" { OPERATOR_CONTAINER(yylhs.value.as < std::unique_ptr > (), new operators::Rx(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } #line 2237 "seclang-parser.cc" break; case 69: // op_before_init: "OPERATOR_RX_GLOBAL" run_time_string #line 1044 "seclang-parser.yy" { OPERATOR_CONTAINER(yylhs.value.as < std::unique_ptr > (), new operators::RxGlobal(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } #line 2245 "seclang-parser.cc" break; case 70: // op_before_init: "OPERATOR_STR_EQ" run_time_string #line 1048 "seclang-parser.yy" { OPERATOR_CONTAINER(yylhs.value.as < std::unique_ptr > (), new operators::StrEq(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } #line 2253 "seclang-parser.cc" break; case 71: // op_before_init: "OPERATOR_STR_MATCH" run_time_string #line 1052 "seclang-parser.yy" { OPERATOR_CONTAINER(yylhs.value.as < std::unique_ptr > (), new operators::StrMatch(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } #line 2261 "seclang-parser.cc" break; case 72: // op_before_init: "OPERATOR_BEGINS_WITH" run_time_string #line 1056 "seclang-parser.yy" { OPERATOR_CONTAINER(yylhs.value.as < std::unique_ptr > (), new operators::BeginsWith(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } #line 2269 "seclang-parser.cc" break; case 73: // op_before_init: "OPERATOR_GEOLOOKUP" #line 1060 "seclang-parser.yy" { #if defined(WITH_GEOIP) or defined(WITH_MAXMIND) OPERATOR_CONTAINER(yylhs.value.as < std::unique_ptr > (), new operators::GeoLookup()); #else std::stringstream ss; ss << "This version of ModSecurity was not compiled with GeoIP or MaxMind support."; driver.error(yystack_[1].location, ss.str()); YYERROR; #endif // WITH_GEOIP } #line 2284 "seclang-parser.cc" break; case 75: // expression: "DIRECTIVE" variables op actions #line 1075 "seclang-parser.yy" { std::vector *a = new std::vector(); std::vector *t = new std::vector(); for (auto &i : *yystack_[0].value.as < std::unique_ptr > > > ().get()) { if (dynamic_cast(i.get())) { t->push_back(dynamic_cast(i.release())); } else { a->push_back(i.release()); } } variables::Variables *v = new variables::Variables(); for (auto &i : *yystack_[2].value.as < std::unique_ptr > > > ().get()) { v->push_back(i.release()); } Operator *op = yystack_[1].value.as < std::unique_ptr > ().release(); std::unique_ptr rule(new RuleWithOperator( /* op */ op, /* variables */ v, /* actions */ a, /* transformations */ t, /* file name */ std::unique_ptr(new std::string(*yystack_[3].location.end.filename)), /* line number */ yystack_[3].location.end.line )); if (driver.addSecRule(std::move(rule)) == false) { YYERROR; } } #line 2318 "seclang-parser.cc" break; case 76: // expression: "DIRECTIVE" variables op #line 1105 "seclang-parser.yy" { variables::Variables *v = new variables::Variables(); for (auto &i : *yystack_[1].value.as < std::unique_ptr > > > ().get()) { v->push_back(i.release()); } std::unique_ptr rule(new RuleWithOperator( /* op */ yystack_[0].value.as < std::unique_ptr > ().release(), /* variables */ v, /* actions */ NULL, /* transformations */ NULL, /* file name */ std::unique_ptr(new std::string(*yystack_[2].location.end.filename)), /* line number */ yystack_[2].location.end.line )); if (driver.addSecRule(std::move(rule)) == false) { YYERROR; } } #line 2341 "seclang-parser.cc" break; case 77: // expression: "CONFIG_DIR_SEC_ACTION" actions #line 1124 "seclang-parser.yy" { std::vector *a = new std::vector(); std::vector *t = new std::vector(); for (auto &i : *yystack_[0].value.as < std::unique_ptr > > > ().get()) { if (dynamic_cast(i.get())) { t->push_back(dynamic_cast(i.release())); } else { a->push_back(i.release()); } } std::unique_ptr rule(new RuleUnconditional( /* actions */ a, /* transformations */ t, /* file name */ std::unique_ptr(new std::string(*yystack_[1].location.end.filename)), /* line number */ yystack_[1].location.end.line )); driver.addSecAction(std::move(rule)); } #line 2364 "seclang-parser.cc" break; case 78: // expression: "DIRECTIVE_SECRULESCRIPT" actions #line 1143 "seclang-parser.yy" { std::string err; std::vector *a = new std::vector(); std::vector *t = new std::vector(); for (auto &i : *yystack_[0].value.as < std::unique_ptr > > > ().get()) { if (dynamic_cast(i.get())) { t->push_back(dynamic_cast(i.release())); } else { a->push_back(i.release()); } } std::unique_ptr r(new RuleScript( /* path to script */ yystack_[1].value.as < std::string > (), /* actions */ a, /* transformations */ t, /* file name */ std::unique_ptr(new std::string(*yystack_[1].location.end.filename)), /* line number */ yystack_[1].location.end.line )); if (r->init(&err) == false) { driver.error(yystack_[2].location, "Failed to load script: " + err); YYERROR; } if (driver.addSecRuleScript(std::move(r)) == false) { YYERROR; } } #line 2396 "seclang-parser.cc" break; case 79: // expression: "CONFIG_DIR_SEC_DEFAULT_ACTION" actions #line 1171 "seclang-parser.yy" { bool hasDisruptive = false; std::vector *actions = new std::vector(); for (auto &i : *yystack_[0].value.as < std::unique_ptr > > > ().get()) { actions->push_back(i.release()); } std::vector checkedActions; int definedPhase = -1; int secRuleDefinedPhase = -1; for (actions::Action *a : *actions) { actions::Phase *phase = dynamic_cast(a); if (a->isDisruptive() == true && dynamic_cast(a) == NULL) { hasDisruptive = true; } if (phase != NULL) { definedPhase = phase->m_phase; secRuleDefinedPhase = phase->m_secRulesPhase; delete phase; } else if (a->action_kind == actions::Action::RunTimeOnlyIfMatchKind || a->action_kind == actions::Action::RunTimeBeforeMatchAttemptKind) { actions::transformations::None *none = dynamic_cast(a); if (none != NULL) { driver.error(yystack_[2].location, "The transformation none is not suitable to be part of the SecDefaultActions"); YYERROR; } checkedActions.push_back(a); } else { driver.error(yystack_[2].location, "The action '" + *a->m_name.get() + "' is not suitable to be part of the SecDefaultActions"); YYERROR; } } if (definedPhase == -1) { definedPhase = modsecurity::Phases::RequestHeadersPhase; } if (hasDisruptive == false) { driver.error(yystack_[2].location, "SecDefaultAction must specify a disruptive action."); YYERROR; } if (!driver.m_defaultActions[definedPhase].empty()) { std::stringstream ss; ss << "SecDefaultActions can only be placed once per phase and configuration context. Phase "; ss << secRuleDefinedPhase; ss << " was informed already."; driver.error(yystack_[2].location, ss.str()); YYERROR; } for (actions::Action *a : checkedActions) { driver.m_defaultActions[definedPhase].push_back( std::unique_ptr(a)); } delete actions; } #line 2457 "seclang-parser.cc" break; case 80: // expression: "CONFIG_DIR_SEC_MARKER" #line 1228 "seclang-parser.yy" { driver.addSecMarker(modsecurity::utils::string::removeBracketsIfNeeded(yystack_[0].value.as < std::string > ()), /* file name */ std::unique_ptr(new std::string(*yystack_[0].location.end.filename)), /* line number */ yystack_[0].location.end.line ); } #line 2468 "seclang-parser.cc" break; case 81: // expression: "CONFIG_DIR_RULE_ENG" "CONFIG_VALUE_OFF" #line 1235 "seclang-parser.yy" { driver.m_secRuleEngine = modsecurity::RulesSet::DisabledRuleEngine; } #line 2476 "seclang-parser.cc" break; case 82: // expression: "CONFIG_DIR_RULE_ENG" "CONFIG_VALUE_ON" #line 1239 "seclang-parser.yy" { driver.m_secRuleEngine = modsecurity::RulesSet::EnabledRuleEngine; } #line 2484 "seclang-parser.cc" break; case 83: // expression: "CONFIG_DIR_RULE_ENG" "CONFIG_VALUE_DETC" #line 1243 "seclang-parser.yy" { driver.m_secRuleEngine = modsecurity::RulesSet::DetectionOnlyRuleEngine; } #line 2492 "seclang-parser.cc" break; case 84: // expression: "CONFIG_DIR_REQ_BODY" "CONFIG_VALUE_ON" #line 1247 "seclang-parser.yy" { driver.m_secRequestBodyAccess = modsecurity::RulesSetProperties::TrueConfigBoolean; } #line 2500 "seclang-parser.cc" break; case 85: // expression: "CONFIG_DIR_REQ_BODY" "CONFIG_VALUE_OFF" #line 1251 "seclang-parser.yy" { driver.m_secRequestBodyAccess = modsecurity::RulesSetProperties::FalseConfigBoolean; } #line 2508 "seclang-parser.cc" break; case 86: // expression: "CONFIG_DIR_RES_BODY" "CONFIG_VALUE_ON" #line 1255 "seclang-parser.yy" { driver.m_secResponseBodyAccess = modsecurity::RulesSetProperties::TrueConfigBoolean; } #line 2516 "seclang-parser.cc" break; case 87: // expression: "CONFIG_DIR_RES_BODY" "CONFIG_VALUE_OFF" #line 1259 "seclang-parser.yy" { driver.m_secResponseBodyAccess = modsecurity::RulesSetProperties::FalseConfigBoolean; } #line 2524 "seclang-parser.cc" break; case 88: // expression: "CONFIG_SEC_ARGUMENT_SEPARATOR" #line 1263 "seclang-parser.yy" { if (yystack_[0].value.as < std::string > ().length() != 1) { driver.error(yystack_[1].location, "Argument separator should be set to a single character."); YYERROR; } driver.m_secArgumentSeparator.m_value = yystack_[0].value.as < std::string > (); driver.m_secArgumentSeparator.m_set = true; } #line 2537 "seclang-parser.cc" break; case 89: // expression: "CONFIG_COMPONENT_SIG" #line 1272 "seclang-parser.yy" { driver.m_components.push_back(yystack_[0].value.as < std::string > ()); } #line 2545 "seclang-parser.cc" break; case 90: // expression: "CONFIG_CONN_ENGINE" "CONFIG_VALUE_ON" #line 1276 "seclang-parser.yy" { driver.error(yystack_[2].location, "SecConnEngine is not yet supported."); YYERROR; } #line 2554 "seclang-parser.cc" break; case 91: // expression: "CONFIG_CONN_ENGINE" "CONFIG_VALUE_OFF" #line 1281 "seclang-parser.yy" { } #line 2561 "seclang-parser.cc" break; case 92: // expression: "CONFIG_SEC_WEB_APP_ID" #line 1284 "seclang-parser.yy" { driver.m_secWebAppId.m_value = yystack_[0].value.as < std::string > (); driver.m_secWebAppId.m_set = true; } #line 2570 "seclang-parser.cc" break; case 93: // expression: "CONFIG_SEC_SERVER_SIG" #line 1289 "seclang-parser.yy" { driver.error(yystack_[1].location, "SecServerSignature is not supported."); YYERROR; } #line 2579 "seclang-parser.cc" break; case 94: // expression: "CONFIG_SEC_CACHE_TRANSFORMATIONS" #line 1294 "seclang-parser.yy" { driver.error(yystack_[1].location, "SecCacheTransformations is not supported."); YYERROR; } #line 2588 "seclang-parser.cc" break; case 95: // expression: "CONFIG_SEC_DISABLE_BACKEND_COMPRESS" "CONFIG_VALUE_ON" #line 1299 "seclang-parser.yy" { driver.error(yystack_[2].location, "SecDisableBackendCompression is not supported."); YYERROR; } #line 2597 "seclang-parser.cc" break; case 96: // expression: "CONFIG_SEC_DISABLE_BACKEND_COMPRESS" "CONFIG_VALUE_OFF" #line 1304 "seclang-parser.yy" { } #line 2604 "seclang-parser.cc" break; case 97: // expression: "CONFIG_CONTENT_INJECTION" "CONFIG_VALUE_ON" #line 1307 "seclang-parser.yy" { driver.error(yystack_[2].location, "SecContentInjection is not yet supported."); YYERROR; } #line 2613 "seclang-parser.cc" break; case 98: // expression: "CONFIG_CONTENT_INJECTION" "CONFIG_VALUE_OFF" #line 1312 "seclang-parser.yy" { } #line 2620 "seclang-parser.cc" break; case 99: // expression: "CONFIG_SEC_CHROOT_DIR" #line 1315 "seclang-parser.yy" { driver.error(yystack_[1].location, "SecChrootDir is not supported."); YYERROR; } #line 2629 "seclang-parser.cc" break; case 100: // expression: "CONFIG_SEC_HASH_ENGINE" "CONFIG_VALUE_ON" #line 1320 "seclang-parser.yy" { driver.error(yystack_[2].location, "SecHashEngine is not yet supported."); YYERROR; } #line 2638 "seclang-parser.cc" break; case 101: // expression: "CONFIG_SEC_HASH_ENGINE" "CONFIG_VALUE_OFF" #line 1325 "seclang-parser.yy" { } #line 2645 "seclang-parser.cc" break; case 102: // expression: "CONFIG_SEC_HASH_KEY" #line 1328 "seclang-parser.yy" { driver.error(yystack_[1].location, "SecHashKey is not yet supported."); YYERROR; } #line 2654 "seclang-parser.cc" break; case 103: // expression: "CONFIG_SEC_HASH_PARAM" #line 1333 "seclang-parser.yy" { driver.error(yystack_[1].location, "SecHashParam is not yet supported."); YYERROR; } #line 2663 "seclang-parser.cc" break; case 104: // expression: "CONFIG_SEC_HASH_METHOD_RX" #line 1338 "seclang-parser.yy" { driver.error(yystack_[1].location, "SecHashMethodRx is not yet supported."); YYERROR; } #line 2672 "seclang-parser.cc" break; case 105: // expression: "CONFIG_SEC_HASH_METHOD_PM" #line 1343 "seclang-parser.yy" { driver.error(yystack_[1].location, "SecHashMethodPm is not yet supported."); YYERROR; } #line 2681 "seclang-parser.cc" break; case 106: // expression: "CONFIG_DIR_GSB_DB" #line 1348 "seclang-parser.yy" { driver.error(yystack_[1].location, "SecGsbLookupDb is not supported."); YYERROR; } #line 2690 "seclang-parser.cc" break; case 107: // expression: "CONFIG_SEC_GUARDIAN_LOG" #line 1353 "seclang-parser.yy" { driver.error(yystack_[1].location, "SecGuardianLog is not supported."); YYERROR; } #line 2699 "seclang-parser.cc" break; case 108: // expression: "CONFIG_SEC_INTERCEPT_ON_ERROR" "CONFIG_VALUE_ON" #line 1358 "seclang-parser.yy" { driver.error(yystack_[2].location, "SecInterceptOnError is not yet supported."); YYERROR; } #line 2708 "seclang-parser.cc" break; case 109: // expression: "CONFIG_SEC_INTERCEPT_ON_ERROR" "CONFIG_VALUE_OFF" #line 1363 "seclang-parser.yy" { } #line 2715 "seclang-parser.cc" break; case 110: // expression: "CONFIG_SEC_CONN_R_STATE_LIMIT" #line 1366 "seclang-parser.yy" { driver.error(yystack_[1].location, "SecConnReadStateLimit is not yet supported."); YYERROR; } #line 2724 "seclang-parser.cc" break; case 111: // expression: "CONFIG_SEC_CONN_W_STATE_LIMIT" #line 1371 "seclang-parser.yy" { driver.error(yystack_[1].location, "SecConnWriteStateLimit is not yet supported."); YYERROR; } #line 2733 "seclang-parser.cc" break; case 112: // expression: "CONFIG_SEC_SENSOR_ID" #line 1376 "seclang-parser.yy" { driver.error(yystack_[1].location, "SecSensorId is not yet supported."); YYERROR; } #line 2742 "seclang-parser.cc" break; case 113: // expression: "CONFIG_SEC_RULE_INHERITANCE" "CONFIG_VALUE_ON" #line 1381 "seclang-parser.yy" { driver.error(yystack_[2].location, "SecRuleInheritance is not yet supported."); YYERROR; } #line 2751 "seclang-parser.cc" break; case 114: // expression: "CONFIG_SEC_RULE_INHERITANCE" "CONFIG_VALUE_OFF" #line 1386 "seclang-parser.yy" { } #line 2758 "seclang-parser.cc" break; case 115: // expression: "CONFIG_SEC_RULE_PERF_TIME" #line 1389 "seclang-parser.yy" { driver.error(yystack_[1].location, "SecRulePerfTime is not yet supported."); YYERROR; } #line 2767 "seclang-parser.cc" break; case 116: // expression: "CONFIG_SEC_STREAM_IN_BODY_INSPECTION" #line 1394 "seclang-parser.yy" { driver.error(yystack_[1].location, "SecStreamInBodyInspection is not supported."); YYERROR; } #line 2776 "seclang-parser.cc" break; case 117: // expression: "CONFIG_SEC_STREAM_OUT_BODY_INSPECTION" #line 1399 "seclang-parser.yy" { driver.error(yystack_[1].location, "SecStreamOutBodyInspection is not supported."); YYERROR; } #line 2785 "seclang-parser.cc" break; case 118: // expression: "CONFIG_SEC_RULE_REMOVE_BY_ID" #line 1404 "seclang-parser.yy" { std::string error; if (driver.m_exceptions.load(yystack_[0].value.as < std::string > (), &error) == false) { std::stringstream ss; ss << "SecRuleRemoveById: failed to load:"; ss << yystack_[0].value.as < std::string > (); ss << ". "; ss << error; driver.error(yystack_[1].location, ss.str()); YYERROR; } } #line 2802 "seclang-parser.cc" break; case 119: // expression: "CONFIG_SEC_RULE_REMOVE_BY_TAG" #line 1417 "seclang-parser.yy" { std::string error; if (driver.m_exceptions.loadRemoveRuleByTag(yystack_[0].value.as < std::string > (), &error) == false) { std::stringstream ss; ss << "SecRuleRemoveByTag: failed to load:"; ss << yystack_[0].value.as < std::string > (); ss << ". "; ss << error; driver.error(yystack_[1].location, ss.str()); YYERROR; } } #line 2819 "seclang-parser.cc" break; case 120: // expression: "CONFIG_SEC_RULE_REMOVE_BY_MSG" #line 1430 "seclang-parser.yy" { std::string error; if (driver.m_exceptions.loadRemoveRuleByMsg(yystack_[0].value.as < std::string > (), &error) == false) { std::stringstream ss; ss << "SecRuleRemoveByMsg: failed to load:"; ss << yystack_[0].value.as < std::string > (); ss << ". "; ss << error; driver.error(yystack_[1].location, ss.str()); YYERROR; } } #line 2836 "seclang-parser.cc" break; case 121: // expression: "CONFIG_SEC_RULE_UPDATE_TARGET_BY_TAG" variables_pre_process #line 1443 "seclang-parser.yy" { std::string error; if (driver.m_exceptions.loadUpdateTargetByTag(yystack_[1].value.as < std::string > (), std::move(yystack_[0].value.as < std::unique_ptr > > > ()), &error) == false) { std::stringstream ss; ss << "SecRuleUpdateTargetByTag: failed to load:"; ss << yystack_[1].value.as < std::string > (); ss << ". "; ss << error; driver.error(yystack_[2].location, ss.str()); YYERROR; } } #line 2853 "seclang-parser.cc" break; case 122: // expression: "CONFIG_SEC_RULE_UPDATE_TARGET_BY_MSG" variables_pre_process #line 1456 "seclang-parser.yy" { std::string error; if (driver.m_exceptions.loadUpdateTargetByMsg(yystack_[1].value.as < std::string > (), std::move(yystack_[0].value.as < std::unique_ptr > > > ()), &error) == false) { std::stringstream ss; ss << "SecRuleUpdateTargetByMsg: failed to load:"; ss << yystack_[1].value.as < std::string > (); ss << ". "; ss << error; driver.error(yystack_[2].location, ss.str()); YYERROR; } } #line 2870 "seclang-parser.cc" break; case 123: // expression: "CONFIG_SEC_RULE_UPDATE_TARGET_BY_ID" variables_pre_process #line 1469 "seclang-parser.yy" { std::string error; double ruleId; try { ruleId = std::stod(yystack_[1].value.as < std::string > ()); } catch (...) { std::stringstream ss; ss << "SecRuleUpdateTargetById: failed to load:"; ss << "The input \"" + yystack_[1].value.as < std::string > () + "\" does not "; ss << "seems to be a valid rule id."; ss << ". "; driver.error(yystack_[2].location, ss.str()); YYERROR; } if (driver.m_exceptions.loadUpdateTargetById(ruleId, std::move(yystack_[0].value.as < std::unique_ptr > > > ()), &error) == false) { std::stringstream ss; ss << "SecRuleUpdateTargetById: failed to load:"; ss << yystack_[1].value.as < std::string > (); ss << ". "; ss << error; driver.error(yystack_[2].location, ss.str()); YYERROR; } } #line 2900 "seclang-parser.cc" break; case 124: // expression: "CONFIG_SEC_RULE_UPDATE_ACTION_BY_ID" actions #line 1495 "seclang-parser.yy" { std::string error; double ruleId; try { ruleId = std::stod(yystack_[1].value.as < std::string > ()); } catch (...) { std::stringstream ss; ss << "SecRuleUpdateActionById: failed to load:"; ss << "The input \"" + yystack_[1].value.as < std::string > () + "\" does not "; ss << "seems to be a valid rule id."; ss << ". "; driver.error(yystack_[2].location, ss.str()); YYERROR; } if (driver.m_exceptions.loadUpdateActionById(ruleId, std::move(yystack_[0].value.as < std::unique_ptr > > > ()), &error) == false) { std::stringstream ss; ss << "SecRuleUpdateActionById: failed to load:"; ss << yystack_[1].value.as < std::string > (); ss << ". "; ss << error; driver.error(yystack_[2].location, ss.str()); YYERROR; } } #line 2931 "seclang-parser.cc" break; case 125: // expression: "CONFIG_DIR_DEBUG_LVL" #line 1523 "seclang-parser.yy" { if (driver.m_debugLog != NULL) { driver.m_debugLog->setDebugLogLevel(atoi(yystack_[0].value.as < std::string > ().c_str())); } else { std::stringstream ss; ss << "Internal error, there is no DebugLog "; ss << "object associated with the driver class"; driver.error(yystack_[1].location, ss.str()); YYERROR; } } #line 2947 "seclang-parser.cc" break; case 126: // expression: "CONFIG_DIR_DEBUG_LOG" #line 1535 "seclang-parser.yy" { if (driver.m_debugLog != NULL) { std::string error; driver.m_debugLog->setDebugLogFile(yystack_[0].value.as < std::string > (), &error); if (error.size() > 0) { std::stringstream ss; ss << "Failed to start DebugLog: " << error; driver.error(yystack_[1].location, ss.str()); YYERROR; } } else { std::stringstream ss; ss << "Internal error, there is no DebugLog "; ss << "object associated with the driver class"; driver.error(yystack_[1].location, ss.str()); YYERROR; } } #line 2970 "seclang-parser.cc" break; case 127: // expression: "CONFIG_DIR_GEO_DB" #line 1555 "seclang-parser.yy" { #if defined(WITH_GEOIP) or defined(WITH_MAXMIND) std::string err; std::string file = modsecurity::utils::find_resource(yystack_[0].value.as < std::string > (), *yystack_[0].location.end.filename, &err); if (file.empty()) { std::stringstream ss; ss << "Failed to load locate the GeoDB file from: " << yystack_[0].value.as < std::string > () << " "; ss << err; driver.error(yystack_[1].location, ss.str()); YYERROR; } if (Utils::GeoLookup::getInstance().setDataBase(file, &err) == false) { std::stringstream ss; ss << "Failed to load the GeoDB from: "; ss << file << ". " << err; driver.error(yystack_[1].location, ss.str()); YYERROR; } #else std::stringstream ss; ss << "This version of ModSecurity was not compiled with GeoIP or MaxMind support."; driver.error(yystack_[1].location, ss.str()); YYERROR; #endif // WITH_GEOIP } #line 3001 "seclang-parser.cc" break; case 128: // expression: "CONFIG_DIR_ARGS_LIMIT" #line 1582 "seclang-parser.yy" { driver.m_argumentsLimit.m_set = true; driver.m_argumentsLimit.m_value = atoi(yystack_[0].value.as < std::string > ().c_str()); } #line 3010 "seclang-parser.cc" break; case 129: // expression: "CONFIG_DIR_REQ_BODY_JSON_DEPTH_LIMIT" #line 1587 "seclang-parser.yy" { driver.m_requestBodyJsonDepthLimit.m_set = true; driver.m_requestBodyJsonDepthLimit.m_value = atoi(yystack_[0].value.as < std::string > ().c_str()); } #line 3019 "seclang-parser.cc" break; case 130: // expression: "CONFIG_DIR_REQ_BODY_LIMIT" #line 1593 "seclang-parser.yy" { driver.m_requestBodyLimit.m_set = true; driver.m_requestBodyLimit.m_value = atoi(yystack_[0].value.as < std::string > ().c_str()); } #line 3028 "seclang-parser.cc" break; case 131: // expression: "CONFIG_DIR_REQ_BODY_NO_FILES_LIMIT" #line 1598 "seclang-parser.yy" { driver.m_requestBodyNoFilesLimit.m_set = true; driver.m_requestBodyNoFilesLimit.m_value = atoi(yystack_[0].value.as < std::string > ().c_str()); } #line 3037 "seclang-parser.cc" break; case 132: // expression: "CONFIG_DIR_REQ_BODY_IN_MEMORY_LIMIT" #line 1603 "seclang-parser.yy" { std::stringstream ss; ss << "As of ModSecurity version 3.0, SecRequestBodyInMemoryLimit is no longer "; ss << "supported. Instead, you can use your web server configurations to control "; ss << "those values. ModSecurity will follow the web server decision."; driver.error(yystack_[1].location, ss.str()); YYERROR; } #line 3050 "seclang-parser.cc" break; case 133: // expression: "CONFIG_DIR_RES_BODY_LIMIT" #line 1612 "seclang-parser.yy" { driver.m_responseBodyLimit.m_set = true; driver.m_responseBodyLimit.m_value = atoi(yystack_[0].value.as < std::string > ().c_str()); } #line 3059 "seclang-parser.cc" break; case 134: // expression: "CONFIG_DIR_REQ_BODY_LIMIT_ACTION" "CONFIG_VALUE_PROCESS_PARTIAL" #line 1617 "seclang-parser.yy" { driver.m_requestBodyLimitAction = modsecurity::RulesSet::BodyLimitAction::ProcessPartialBodyLimitAction; } #line 3067 "seclang-parser.cc" break; case 135: // expression: "CONFIG_DIR_REQ_BODY_LIMIT_ACTION" "CONFIG_VALUE_REJECT" #line 1621 "seclang-parser.yy" { driver.m_requestBodyLimitAction = modsecurity::RulesSet::BodyLimitAction::RejectBodyLimitAction; } #line 3075 "seclang-parser.cc" break; case 136: // expression: "CONFIG_DIR_RES_BODY_LIMIT_ACTION" "CONFIG_VALUE_PROCESS_PARTIAL" #line 1625 "seclang-parser.yy" { driver.m_responseBodyLimitAction = modsecurity::RulesSet::BodyLimitAction::ProcessPartialBodyLimitAction; } #line 3083 "seclang-parser.cc" break; case 137: // expression: "CONFIG_DIR_RES_BODY_LIMIT_ACTION" "CONFIG_VALUE_REJECT" #line 1629 "seclang-parser.yy" { driver.m_responseBodyLimitAction = modsecurity::RulesSet::BodyLimitAction::RejectBodyLimitAction; } #line 3091 "seclang-parser.cc" break; case 138: // expression: "CONFIG_SEC_REMOTE_RULES_FAIL_ACTION" "CONFIG_VALUE_ABORT" #line 1633 "seclang-parser.yy" { driver.m_remoteRulesActionOnFailed = RulesSet::OnFailedRemoteRulesAction::AbortOnFailedRemoteRulesAction; } #line 3099 "seclang-parser.cc" break; case 139: // expression: "CONFIG_SEC_REMOTE_RULES_FAIL_ACTION" "CONFIG_VALUE_WARN" #line 1637 "seclang-parser.yy" { driver.m_remoteRulesActionOnFailed = RulesSet::OnFailedRemoteRulesAction::WarnOnFailedRemoteRulesAction; } #line 3107 "seclang-parser.cc" break; case 142: // expression: "CONGIG_DIR_RESPONSE_BODY_MP" #line 1651 "seclang-parser.yy" { std::istringstream buf(yystack_[0].value.as < std::string > ()); std::istream_iterator beg(buf), end; std::set tokens(beg, end); driver.m_responseBodyTypeToBeInspected.m_set = true; for (std::set::iterator it=tokens.begin(); it!=tokens.end(); ++it) { driver.m_responseBodyTypeToBeInspected.m_value.insert(*it); } } #line 3123 "seclang-parser.cc" break; case 143: // expression: "CONGIG_DIR_RESPONSE_BODY_MP_CLEAR" #line 1663 "seclang-parser.yy" { driver.m_responseBodyTypeToBeInspected.m_set = true; driver.m_responseBodyTypeToBeInspected.m_clear = true; driver.m_responseBodyTypeToBeInspected.m_value.clear(); } #line 3133 "seclang-parser.cc" break; case 144: // expression: "CONFIG_XML_EXTERNAL_ENTITY" "CONFIG_VALUE_OFF" #line 1669 "seclang-parser.yy" { driver.m_secXMLExternalEntity = modsecurity::RulesSetProperties::FalseConfigBoolean; } #line 3141 "seclang-parser.cc" break; case 145: // expression: "CONFIG_XML_EXTERNAL_ENTITY" "CONFIG_VALUE_ON" #line 1673 "seclang-parser.yy" { driver.m_secXMLExternalEntity = modsecurity::RulesSetProperties::TrueConfigBoolean; } #line 3149 "seclang-parser.cc" break; case 146: // expression: "CONGIG_DIR_SEC_TMP_DIR" #line 1677 "seclang-parser.yy" { /* Parser error disabled to avoid breaking default installations with modsecurity.conf-recommended std::stringstream ss; ss << "As of ModSecurity version 3.0, SecTmpDir is no longer supported."; ss << " Instead, you can use your web server configurations to control when"; ss << "and where to swap. ModSecurity will follow the web server decision."; driver.error(@0, ss.str()); YYERROR; */ } #line 3164 "seclang-parser.cc" break; case 149: // expression: "CONGIG_DIR_SEC_COOKIE_FORMAT" #line 1698 "seclang-parser.yy" { if (atoi(yystack_[0].value.as < std::string > ().c_str()) == 1) { driver.error(yystack_[1].location, "SecCookieFormat 1 is not yet supported."); YYERROR; } } #line 3175 "seclang-parser.cc" break; case 150: // expression: "CONFIG_SEC_COOKIEV0_SEPARATOR" #line 1705 "seclang-parser.yy" { driver.error(yystack_[1].location, "SecCookieV0Separator is not yet supported."); YYERROR; } #line 3184 "seclang-parser.cc" break; case 152: // expression: "CONFIG_DIR_UNICODE_MAP_FILE" #line 1715 "seclang-parser.yy" { std::string error; std::vector param; double num = 0; std::string f; std::string file; std::string err; param = utils::string::ssplit(yystack_[0].value.as < std::string > (), ' '); if (param.size() <= 1) { std::stringstream ss; ss << "Failed to process unicode map, missing "; ss << "parameter: " << yystack_[0].value.as < std::string > () << " "; driver.error(yystack_[1].location, ss.str()); YYERROR; } try { num = std::stod(param.back()); } catch (...) { std::stringstream ss; ss << "Failed to process unicode map, last parameter is "; ss << "expected to be a number: " << param.back() << " "; driver.error(yystack_[1].location, ss.str()); YYERROR; } param.pop_back(); while (param.size() > 0) { if (f.empty()) { f = param.back(); } else { f = param.back() + " " + f; } param.pop_back(); } file = modsecurity::utils::find_resource(f, *yystack_[0].location.end.filename, &err); if (file.empty()) { std::stringstream ss; ss << "Failed to locate the unicode map file from: " << f << " "; ss << err; driver.error(yystack_[1].location, ss.str()); YYERROR; } ConfigUnicodeMap::loadConfig(file, num, &driver, &error); if (!error.empty()) { driver.error(yystack_[1].location, error); YYERROR; } } #line 3242 "seclang-parser.cc" break; case 153: // expression: "CONFIG_SEC_COLLECTION_TIMEOUT" #line 1769 "seclang-parser.yy" { /* Parser error disabled to avoid breaking default CRS installations with crs-setup.conf-recommended driver.error(@0, "SecCollectionTimeout is not yet supported."); YYERROR; */ } #line 3253 "seclang-parser.cc" break; case 154: // expression: "CONFIG_SEC_HTTP_BLKEY" #line 1776 "seclang-parser.yy" { driver.m_httpblKey.m_set = true; driver.m_httpblKey.m_value = yystack_[0].value.as < std::string > (); } #line 3262 "seclang-parser.cc" break; case 155: // variables: variables_pre_process #line 1784 "seclang-parser.yy" { std::unique_ptr > > originalList = std::move(yystack_[0].value.as < std::unique_ptr > > > ()); std::unique_ptr>> newList(new std::vector>()); std::unique_ptr>> newNewList(new std::vector>()); std::unique_ptr>> exclusionVars(new std::vector>()); while (!originalList->empty()) { std::unique_ptr var = std::move(originalList->back()); originalList->pop_back(); if (dynamic_cast(var.get())) { exclusionVars->push_back(std::move(var)); } else { newList->push_back(std::move(var)); } } while (!newList->empty()) { bool doNotAdd = false; std::unique_ptr var = std::move(newList->back()); newList->pop_back(); for (auto &i : *exclusionVars) { if (*var == *i) { doNotAdd = true; } if (i->belongsToCollection(var.get())) { var->addsKeyExclusion(i.get()); } } if (!doNotAdd) { newNewList->push_back(std::move(var)); } } yylhs.value.as < std::unique_ptr > > > () = std::move(newNewList); } #line 3300 "seclang-parser.cc" break; case 156: // variables_pre_process: variables_may_be_quoted #line 1821 "seclang-parser.yy" { yylhs.value.as < std::unique_ptr > > > () = std::move(yystack_[0].value.as < std::unique_ptr > > > ()); } #line 3308 "seclang-parser.cc" break; case 157: // variables_pre_process: "QUOTATION_MARK" variables_may_be_quoted "QUOTATION_MARK" #line 1825 "seclang-parser.yy" { yylhs.value.as < std::unique_ptr > > > () = std::move(yystack_[1].value.as < std::unique_ptr > > > ()); } #line 3316 "seclang-parser.cc" break; case 158: // variables_may_be_quoted: variables_may_be_quoted PIPE var #line 1832 "seclang-parser.yy" { yystack_[2].value.as < std::unique_ptr > > > ()->push_back(std::move(yystack_[0].value.as < std::unique_ptr > ())); yylhs.value.as < std::unique_ptr > > > () = std::move(yystack_[2].value.as < std::unique_ptr > > > ()); } #line 3325 "seclang-parser.cc" break; case 159: // variables_may_be_quoted: variables_may_be_quoted PIPE VAR_EXCLUSION var #line 1837 "seclang-parser.yy" { std::unique_ptr c(new VariableModificatorExclusion(std::move(yystack_[0].value.as < std::unique_ptr > ()))); yystack_[3].value.as < std::unique_ptr > > > ()->push_back(std::move(c)); yylhs.value.as < std::unique_ptr > > > () = std::move(yystack_[3].value.as < std::unique_ptr > > > ()); } #line 3335 "seclang-parser.cc" break; case 160: // variables_may_be_quoted: variables_may_be_quoted PIPE VAR_COUNT var #line 1843 "seclang-parser.yy" { std::unique_ptr c(new VariableModificatorCount(std::move(yystack_[0].value.as < std::unique_ptr > ()))); yystack_[3].value.as < std::unique_ptr > > > ()->push_back(std::move(c)); yylhs.value.as < std::unique_ptr > > > () = std::move(yystack_[3].value.as < std::unique_ptr > > > ()); } #line 3345 "seclang-parser.cc" break; case 161: // variables_may_be_quoted: var #line 1849 "seclang-parser.yy" { std::unique_ptr>> b(new std::vector>()); b->push_back(std::move(yystack_[0].value.as < std::unique_ptr > ())); yylhs.value.as < std::unique_ptr > > > () = std::move(b); } #line 3355 "seclang-parser.cc" break; case 162: // variables_may_be_quoted: VAR_EXCLUSION var #line 1855 "seclang-parser.yy" { std::unique_ptr>> b(new std::vector>()); std::unique_ptr c(new VariableModificatorExclusion(std::move(yystack_[0].value.as < std::unique_ptr > ()))); b->push_back(std::move(c)); yylhs.value.as < std::unique_ptr > > > () = std::move(b); } #line 3366 "seclang-parser.cc" break; case 163: // variables_may_be_quoted: VAR_COUNT var #line 1862 "seclang-parser.yy" { std::unique_ptr>> b(new std::vector>()); std::unique_ptr c(new VariableModificatorCount(std::move(yystack_[0].value.as < std::unique_ptr > ()))); b->push_back(std::move(c)); yylhs.value.as < std::unique_ptr > > > () = std::move(b); } #line 3377 "seclang-parser.cc" break; case 164: // var: VARIABLE_ARGS "Dictionary element" #line 1872 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::Args_DictElement(yystack_[0].value.as < std::string > ())); } #line 3385 "seclang-parser.cc" break; case 165: // var: VARIABLE_ARGS "Dictionary element, selected by regexp" #line 1876 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::Args_DictElementRegexp(yystack_[0].value.as < std::string > ())); } #line 3393 "seclang-parser.cc" break; case 166: // var: VARIABLE_ARGS #line 1880 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::Args_NoDictElement()); } #line 3401 "seclang-parser.cc" break; case 167: // var: VARIABLE_ARGS_POST "Dictionary element" #line 1884 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::ArgsPost_DictElement(yystack_[0].value.as < std::string > ())); } #line 3409 "seclang-parser.cc" break; case 168: // var: VARIABLE_ARGS_POST "Dictionary element, selected by regexp" #line 1888 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::ArgsPost_DictElementRegexp(yystack_[0].value.as < std::string > ())); } #line 3417 "seclang-parser.cc" break; case 169: // var: VARIABLE_ARGS_POST #line 1892 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::ArgsPost_NoDictElement()); } #line 3425 "seclang-parser.cc" break; case 170: // var: VARIABLE_ARGS_GET "Dictionary element" #line 1896 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::ArgsGet_DictElement(yystack_[0].value.as < std::string > ())); } #line 3433 "seclang-parser.cc" break; case 171: // var: VARIABLE_ARGS_GET "Dictionary element, selected by regexp" #line 1900 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::ArgsGet_DictElementRegexp(yystack_[0].value.as < std::string > ())); } #line 3441 "seclang-parser.cc" break; case 172: // var: VARIABLE_ARGS_GET #line 1904 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::ArgsGet_NoDictElement()); } #line 3449 "seclang-parser.cc" break; case 173: // var: VARIABLE_FILES_SIZES "Dictionary element" #line 1908 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::FilesSizes_DictElement(yystack_[0].value.as < std::string > ())); } #line 3457 "seclang-parser.cc" break; case 174: // var: VARIABLE_FILES_SIZES "Dictionary element, selected by regexp" #line 1912 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::FilesSizes_DictElementRegexp(yystack_[0].value.as < std::string > ())); } #line 3465 "seclang-parser.cc" break; case 175: // var: VARIABLE_FILES_SIZES #line 1916 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::FilesSizes_NoDictElement()); } #line 3473 "seclang-parser.cc" break; case 176: // var: VARIABLE_FILES_NAMES "Dictionary element" #line 1920 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::FilesNames_DictElement(yystack_[0].value.as < std::string > ())); } #line 3481 "seclang-parser.cc" break; case 177: // var: VARIABLE_FILES_NAMES "Dictionary element, selected by regexp" #line 1924 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::FilesNames_DictElementRegexp(yystack_[0].value.as < std::string > ())); } #line 3489 "seclang-parser.cc" break; case 178: // var: VARIABLE_FILES_NAMES #line 1928 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::FilesNames_NoDictElement()); } #line 3497 "seclang-parser.cc" break; case 179: // var: VARIABLE_FILES_TMP_CONTENT "Dictionary element" #line 1932 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::FilesTmpContent_DictElement(yystack_[0].value.as < std::string > ())); } #line 3505 "seclang-parser.cc" break; case 180: // var: VARIABLE_FILES_TMP_CONTENT "Dictionary element, selected by regexp" #line 1936 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::FilesTmpContent_DictElementRegexp(yystack_[0].value.as < std::string > ())); } #line 3513 "seclang-parser.cc" break; case 181: // var: VARIABLE_FILES_TMP_CONTENT #line 1940 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::FilesTmpContent_NoDictElement()); } #line 3521 "seclang-parser.cc" break; case 182: // var: VARIABLE_MULTIPART_FILENAME "Dictionary element" #line 1944 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::MultiPartFileName_DictElement(yystack_[0].value.as < std::string > ())); } #line 3529 "seclang-parser.cc" break; case 183: // var: VARIABLE_MULTIPART_FILENAME "Dictionary element, selected by regexp" #line 1948 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::MultiPartFileName_DictElementRegexp(yystack_[0].value.as < std::string > ())); } #line 3537 "seclang-parser.cc" break; case 184: // var: VARIABLE_MULTIPART_FILENAME #line 1952 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::MultiPartFileName_NoDictElement()); } #line 3545 "seclang-parser.cc" break; case 185: // var: VARIABLE_MULTIPART_NAME "Dictionary element" #line 1956 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::MultiPartName_DictElement(yystack_[0].value.as < std::string > ())); } #line 3553 "seclang-parser.cc" break; case 186: // var: VARIABLE_MULTIPART_NAME "Dictionary element, selected by regexp" #line 1960 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::MultiPartName_DictElementRegexp(yystack_[0].value.as < std::string > ())); } #line 3561 "seclang-parser.cc" break; case 187: // var: VARIABLE_MULTIPART_NAME #line 1964 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::MultiPartName_NoDictElement()); } #line 3569 "seclang-parser.cc" break; case 188: // var: VARIABLE_MATCHED_VARS_NAMES "Dictionary element" #line 1968 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::MatchedVarsNames_DictElement(yystack_[0].value.as < std::string > ())); } #line 3577 "seclang-parser.cc" break; case 189: // var: VARIABLE_MATCHED_VARS_NAMES "Dictionary element, selected by regexp" #line 1972 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::MatchedVarsNames_DictElementRegexp(yystack_[0].value.as < std::string > ())); } #line 3585 "seclang-parser.cc" break; case 190: // var: VARIABLE_MATCHED_VARS_NAMES #line 1976 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::MatchedVarsNames_NoDictElement()); } #line 3593 "seclang-parser.cc" break; case 191: // var: VARIABLE_MATCHED_VARS "Dictionary element" #line 1980 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::MatchedVars_DictElement(yystack_[0].value.as < std::string > ())); } #line 3601 "seclang-parser.cc" break; case 192: // var: VARIABLE_MATCHED_VARS "Dictionary element, selected by regexp" #line 1984 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::MatchedVars_DictElementRegexp(yystack_[0].value.as < std::string > ())); } #line 3609 "seclang-parser.cc" break; case 193: // var: VARIABLE_MATCHED_VARS #line 1988 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::MatchedVars_NoDictElement()); } #line 3617 "seclang-parser.cc" break; case 194: // var: VARIABLE_FILES "Dictionary element" #line 1992 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::Files_DictElement(yystack_[0].value.as < std::string > ())); } #line 3625 "seclang-parser.cc" break; case 195: // var: VARIABLE_FILES "Dictionary element, selected by regexp" #line 1996 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::Files_DictElementRegexp(yystack_[0].value.as < std::string > ())); } #line 3633 "seclang-parser.cc" break; case 196: // var: VARIABLE_FILES #line 2000 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::Files_NoDictElement()); } #line 3641 "seclang-parser.cc" break; case 197: // var: VARIABLE_REQUEST_COOKIES "Dictionary element" #line 2004 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::RequestCookies_DictElement(yystack_[0].value.as < std::string > ())); } #line 3649 "seclang-parser.cc" break; case 198: // var: VARIABLE_REQUEST_COOKIES "Dictionary element, selected by regexp" #line 2008 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::RequestCookies_DictElementRegexp(yystack_[0].value.as < std::string > ())); } #line 3657 "seclang-parser.cc" break; case 199: // var: VARIABLE_REQUEST_COOKIES #line 2012 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::RequestCookies_NoDictElement()); } #line 3665 "seclang-parser.cc" break; case 200: // var: VARIABLE_REQUEST_HEADERS "Dictionary element" #line 2016 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::RequestHeaders_DictElement(yystack_[0].value.as < std::string > ())); } #line 3673 "seclang-parser.cc" break; case 201: // var: VARIABLE_REQUEST_HEADERS "Dictionary element, selected by regexp" #line 2020 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::RequestHeaders_DictElementRegexp(yystack_[0].value.as < std::string > ())); } #line 3681 "seclang-parser.cc" break; case 202: // var: VARIABLE_REQUEST_HEADERS #line 2024 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::RequestHeaders_NoDictElement()); } #line 3689 "seclang-parser.cc" break; case 203: // var: VARIABLE_RESPONSE_HEADERS "Dictionary element" #line 2028 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::ResponseHeaders_DictElement(yystack_[0].value.as < std::string > ())); } #line 3697 "seclang-parser.cc" break; case 204: // var: VARIABLE_RESPONSE_HEADERS "Dictionary element, selected by regexp" #line 2032 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::ResponseHeaders_DictElementRegexp(yystack_[0].value.as < std::string > ())); } #line 3705 "seclang-parser.cc" break; case 205: // var: VARIABLE_RESPONSE_HEADERS #line 2036 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::ResponseHeaders_NoDictElement()); } #line 3713 "seclang-parser.cc" break; case 206: // var: VARIABLE_GEO "Dictionary element" #line 2040 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::Geo_DictElement(yystack_[0].value.as < std::string > ())); } #line 3721 "seclang-parser.cc" break; case 207: // var: VARIABLE_GEO "Dictionary element, selected by regexp" #line 2044 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::Geo_DictElementRegexp(yystack_[0].value.as < std::string > ())); } #line 3729 "seclang-parser.cc" break; case 208: // var: VARIABLE_GEO #line 2048 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::Geo_NoDictElement()); } #line 3737 "seclang-parser.cc" break; case 209: // var: VARIABLE_REQUEST_COOKIES_NAMES "Dictionary element" #line 2052 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::RequestCookiesNames_DictElement(yystack_[0].value.as < std::string > ())); } #line 3745 "seclang-parser.cc" break; case 210: // var: VARIABLE_REQUEST_COOKIES_NAMES "Dictionary element, selected by regexp" #line 2056 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::RequestCookiesNames_DictElementRegexp(yystack_[0].value.as < std::string > ())); } #line 3753 "seclang-parser.cc" break; case 211: // var: VARIABLE_REQUEST_COOKIES_NAMES #line 2060 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::RequestCookiesNames_NoDictElement()); } #line 3761 "seclang-parser.cc" break; case 212: // var: VARIABLE_RULE "Dictionary element" #line 2064 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::Rule_DictElement(yystack_[0].value.as < std::string > ())); } #line 3769 "seclang-parser.cc" break; case 213: // var: VARIABLE_RULE "Dictionary element, selected by regexp" #line 2068 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::Rule_DictElementRegexp(yystack_[0].value.as < std::string > ())); } #line 3777 "seclang-parser.cc" break; case 214: // var: VARIABLE_RULE #line 2072 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::Rule_NoDictElement()); } #line 3785 "seclang-parser.cc" break; case 215: // var: "RUN_TIME_VAR_ENV" "Dictionary element" #line 2076 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::Env("ENV:" + yystack_[0].value.as < std::string > ())); } #line 3793 "seclang-parser.cc" break; case 216: // var: "RUN_TIME_VAR_ENV" "Dictionary element, selected by regexp" #line 2080 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::Env("ENV:" + yystack_[0].value.as < std::string > ())); } #line 3801 "seclang-parser.cc" break; case 217: // var: "RUN_TIME_VAR_ENV" #line 2084 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::Env("ENV")); } #line 3809 "seclang-parser.cc" break; case 218: // var: "RUN_TIME_VAR_XML" "Dictionary element" #line 2088 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::XML("XML:" + yystack_[0].value.as < std::string > ())); } #line 3817 "seclang-parser.cc" break; case 219: // var: "RUN_TIME_VAR_XML" "Dictionary element, selected by regexp" #line 2092 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::XML("XML:" + yystack_[0].value.as < std::string > ())); } #line 3825 "seclang-parser.cc" break; case 220: // var: "RUN_TIME_VAR_XML" #line 2096 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::XML_NoDictElement()); } #line 3833 "seclang-parser.cc" break; case 221: // var: "FILES_TMPNAMES" "Dictionary element" #line 2100 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::FilesTmpNames_DictElement(yystack_[0].value.as < std::string > ())); } #line 3841 "seclang-parser.cc" break; case 222: // var: "FILES_TMPNAMES" "Dictionary element, selected by regexp" #line 2104 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::FilesTmpNames_DictElementRegexp(yystack_[0].value.as < std::string > ())); } #line 3849 "seclang-parser.cc" break; case 223: // var: "FILES_TMPNAMES" #line 2108 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::FilesTmpNames_NoDictElement()); } #line 3857 "seclang-parser.cc" break; case 224: // var: "RESOURCE" run_time_string #line 2112 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::Resource_DynamicElement(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } #line 3865 "seclang-parser.cc" break; case 225: // var: "RESOURCE" "Dictionary element" #line 2116 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::Resource_DictElement(yystack_[0].value.as < std::string > ())); } #line 3873 "seclang-parser.cc" break; case 226: // var: "RESOURCE" "Dictionary element, selected by regexp" #line 2120 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::Resource_DictElementRegexp(yystack_[0].value.as < std::string > ())); } #line 3881 "seclang-parser.cc" break; case 227: // var: "RESOURCE" #line 2124 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::Resource_NoDictElement()); } #line 3889 "seclang-parser.cc" break; case 228: // var: "VARIABLE_IP" run_time_string #line 2128 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::Ip_DynamicElement(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } #line 3897 "seclang-parser.cc" break; case 229: // var: "VARIABLE_IP" "Dictionary element" #line 2132 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::Ip_DictElement(yystack_[0].value.as < std::string > ())); } #line 3905 "seclang-parser.cc" break; case 230: // var: "VARIABLE_IP" "Dictionary element, selected by regexp" #line 2136 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::Ip_DictElementRegexp(yystack_[0].value.as < std::string > ())); } #line 3913 "seclang-parser.cc" break; case 231: // var: "VARIABLE_IP" #line 2140 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::Ip_NoDictElement()); } #line 3921 "seclang-parser.cc" break; case 232: // var: "VARIABLE_GLOBAL" run_time_string #line 2144 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::Global_DynamicElement(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } #line 3929 "seclang-parser.cc" break; case 233: // var: "VARIABLE_GLOBAL" "Dictionary element" #line 2148 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::Global_DictElement(yystack_[0].value.as < std::string > ())); } #line 3937 "seclang-parser.cc" break; case 234: // var: "VARIABLE_GLOBAL" "Dictionary element, selected by regexp" #line 2152 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::Global_DictElementRegexp(yystack_[0].value.as < std::string > ())); } #line 3945 "seclang-parser.cc" break; case 235: // var: "VARIABLE_GLOBAL" #line 2156 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::Global_NoDictElement()); } #line 3953 "seclang-parser.cc" break; case 236: // var: "VARIABLE_USER" run_time_string #line 2160 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::User_DynamicElement(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } #line 3961 "seclang-parser.cc" break; case 237: // var: "VARIABLE_USER" "Dictionary element" #line 2164 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::User_DictElement(yystack_[0].value.as < std::string > ())); } #line 3969 "seclang-parser.cc" break; case 238: // var: "VARIABLE_USER" "Dictionary element, selected by regexp" #line 2168 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::User_DictElementRegexp(yystack_[0].value.as < std::string > ())); } #line 3977 "seclang-parser.cc" break; case 239: // var: "VARIABLE_USER" #line 2172 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::User_NoDictElement()); } #line 3985 "seclang-parser.cc" break; case 240: // var: "VARIABLE_TX" run_time_string #line 2176 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::Tx_DynamicElement(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } #line 3993 "seclang-parser.cc" break; case 241: // var: "VARIABLE_TX" "Dictionary element" #line 2180 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::Tx_DictElement(yystack_[0].value.as < std::string > ())); } #line 4001 "seclang-parser.cc" break; case 242: // var: "VARIABLE_TX" "Dictionary element, selected by regexp" #line 2184 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::Tx_DictElementRegexp(yystack_[0].value.as < std::string > ())); } #line 4009 "seclang-parser.cc" break; case 243: // var: "VARIABLE_TX" #line 2188 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::Tx_NoDictElement()); } #line 4017 "seclang-parser.cc" break; case 244: // var: "VARIABLE_SESSION" run_time_string #line 2192 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::Session_DynamicElement(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } #line 4025 "seclang-parser.cc" break; case 245: // var: "VARIABLE_SESSION" "Dictionary element" #line 2196 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::Session_DictElement(yystack_[0].value.as < std::string > ())); } #line 4033 "seclang-parser.cc" break; case 246: // var: "VARIABLE_SESSION" "Dictionary element, selected by regexp" #line 2200 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::Session_DictElementRegexp(yystack_[0].value.as < std::string > ())); } #line 4041 "seclang-parser.cc" break; case 247: // var: "VARIABLE_SESSION" #line 2204 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::Session_NoDictElement()); } #line 4049 "seclang-parser.cc" break; case 248: // var: "Variable ARGS_NAMES" "Dictionary element" #line 2208 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::ArgsNames_DictElement(yystack_[0].value.as < std::string > ())); } #line 4057 "seclang-parser.cc" break; case 249: // var: "Variable ARGS_NAMES" "Dictionary element, selected by regexp" #line 2212 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::ArgsNames_DictElementRegexp(yystack_[0].value.as < std::string > ())); } #line 4065 "seclang-parser.cc" break; case 250: // var: "Variable ARGS_NAMES" #line 2216 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::ArgsNames_NoDictElement()); } #line 4073 "seclang-parser.cc" break; case 251: // var: VARIABLE_ARGS_GET_NAMES "Dictionary element" #line 2220 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::ArgsGetNames_DictElement(yystack_[0].value.as < std::string > ())); } #line 4081 "seclang-parser.cc" break; case 252: // var: VARIABLE_ARGS_GET_NAMES "Dictionary element, selected by regexp" #line 2224 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::ArgsGetNames_DictElementRegexp(yystack_[0].value.as < std::string > ())); } #line 4089 "seclang-parser.cc" break; case 253: // var: VARIABLE_ARGS_GET_NAMES #line 2228 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::ArgsGetNames_NoDictElement()); } #line 4097 "seclang-parser.cc" break; case 254: // var: VARIABLE_ARGS_POST_NAMES "Dictionary element" #line 2233 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::ArgsPostNames_DictElement(yystack_[0].value.as < std::string > ())); } #line 4105 "seclang-parser.cc" break; case 255: // var: VARIABLE_ARGS_POST_NAMES "Dictionary element, selected by regexp" #line 2237 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::ArgsPostNames_DictElementRegexp(yystack_[0].value.as < std::string > ())); } #line 4113 "seclang-parser.cc" break; case 256: // var: VARIABLE_ARGS_POST_NAMES #line 2241 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::ArgsPostNames_NoDictElement()); } #line 4121 "seclang-parser.cc" break; case 257: // var: VARIABLE_REQUEST_HEADERS_NAMES "Dictionary element" #line 2246 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::RequestHeadersNames_DictElement(yystack_[0].value.as < std::string > ())); } #line 4129 "seclang-parser.cc" break; case 258: // var: VARIABLE_REQUEST_HEADERS_NAMES "Dictionary element, selected by regexp" #line 2250 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::RequestHeadersNames_DictElementRegexp(yystack_[0].value.as < std::string > ())); } #line 4137 "seclang-parser.cc" break; case 259: // var: VARIABLE_REQUEST_HEADERS_NAMES #line 2254 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::RequestHeadersNames_NoDictElement()); } #line 4145 "seclang-parser.cc" break; case 260: // var: VARIABLE_RESPONSE_CONTENT_TYPE #line 2259 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::ResponseContentType()); } #line 4153 "seclang-parser.cc" break; case 261: // var: VARIABLE_RESPONSE_HEADERS_NAMES "Dictionary element" #line 2264 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::ResponseHeadersNames_DictElement(yystack_[0].value.as < std::string > ())); } #line 4161 "seclang-parser.cc" break; case 262: // var: VARIABLE_RESPONSE_HEADERS_NAMES "Dictionary element, selected by regexp" #line 2268 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::ResponseHeadersNames_DictElementRegexp(yystack_[0].value.as < std::string > ())); } #line 4169 "seclang-parser.cc" break; case 263: // var: VARIABLE_RESPONSE_HEADERS_NAMES #line 2272 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::ResponseHeadersNames_NoDictElement()); } #line 4177 "seclang-parser.cc" break; case 264: // var: VARIABLE_ARGS_COMBINED_SIZE #line 2276 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::ArgsCombinedSize()); } #line 4185 "seclang-parser.cc" break; case 265: // var: "AUTH_TYPE" #line 2280 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::AuthType()); } #line 4193 "seclang-parser.cc" break; case 266: // var: "FILES_COMBINED_SIZE" #line 2284 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::FilesCombinedSize()); } #line 4201 "seclang-parser.cc" break; case 267: // var: "FULL_REQUEST" #line 2288 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::FullRequest()); } #line 4209 "seclang-parser.cc" break; case 268: // var: "FULL_REQUEST_LENGTH" #line 2292 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::FullRequestLength()); } #line 4217 "seclang-parser.cc" break; case 269: // var: "INBOUND_DATA_ERROR" #line 2296 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::InboundDataError()); } #line 4225 "seclang-parser.cc" break; case 270: // var: "MATCHED_VAR" #line 2300 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::MatchedVar()); } #line 4233 "seclang-parser.cc" break; case 271: // var: "MATCHED_VAR_NAME" #line 2304 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::MatchedVarName()); } #line 4241 "seclang-parser.cc" break; case 272: // var: VARIABLE_MULTIPART_BOUNDARY_QUOTED #line 2308 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::MultipartBoundaryQuoted()); } #line 4249 "seclang-parser.cc" break; case 273: // var: VARIABLE_MULTIPART_BOUNDARY_WHITESPACE #line 2312 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::MultipartBoundaryWhiteSpace()); } #line 4257 "seclang-parser.cc" break; case 274: // var: "MULTIPART_CRLF_LF_LINES" #line 2316 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::MultipartCrlfLFLines()); } #line 4265 "seclang-parser.cc" break; case 275: // var: "MULTIPART_DATA_AFTER" #line 2320 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::MultipartDateAfter()); } #line 4273 "seclang-parser.cc" break; case 276: // var: VARIABLE_MULTIPART_DATA_BEFORE #line 2324 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::MultipartDateBefore()); } #line 4281 "seclang-parser.cc" break; case 277: // var: "MULTIPART_FILE_LIMIT_EXCEEDED" #line 2328 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::MultipartFileLimitExceeded()); } #line 4289 "seclang-parser.cc" break; case 278: // var: "MULTIPART_HEADER_FOLDING" #line 2332 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::MultipartHeaderFolding()); } #line 4297 "seclang-parser.cc" break; case 279: // var: "MULTIPART_INVALID_HEADER_FOLDING" #line 2336 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::MultipartInvalidHeaderFolding()); } #line 4305 "seclang-parser.cc" break; case 280: // var: VARIABLE_MULTIPART_INVALID_PART #line 2340 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::MultipartInvalidPart()); } #line 4313 "seclang-parser.cc" break; case 281: // var: "MULTIPART_INVALID_QUOTING" #line 2344 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::MultipartInvalidQuoting()); } #line 4321 "seclang-parser.cc" break; case 282: // var: VARIABLE_MULTIPART_LF_LINE #line 2348 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::MultipartLFLine()); } #line 4329 "seclang-parser.cc" break; case 283: // var: VARIABLE_MULTIPART_MISSING_SEMICOLON #line 2352 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::MultipartMissingSemicolon()); } #line 4337 "seclang-parser.cc" break; case 284: // var: VARIABLE_MULTIPART_SEMICOLON_MISSING #line 2356 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::MultipartMissingSemicolon()); } #line 4345 "seclang-parser.cc" break; case 285: // var: "MULTIPART_STRICT_ERROR" #line 2360 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::MultipartStrictError()); } #line 4353 "seclang-parser.cc" break; case 286: // var: "MULTIPART_UNMATCHED_BOUNDARY" #line 2364 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::MultipartUnmatchedBoundary()); } #line 4361 "seclang-parser.cc" break; case 287: // var: "OUTBOUND_DATA_ERROR" #line 2368 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::OutboundDataError()); } #line 4369 "seclang-parser.cc" break; case 288: // var: "PATH_INFO" #line 2372 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::PathInfo()); } #line 4377 "seclang-parser.cc" break; case 289: // var: "QUERY_STRING" #line 2376 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::QueryString()); } #line 4385 "seclang-parser.cc" break; case 290: // var: "REMOTE_ADDR" #line 2380 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::RemoteAddr()); } #line 4393 "seclang-parser.cc" break; case 291: // var: "REMOTE_HOST" #line 2384 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::RemoteHost()); } #line 4401 "seclang-parser.cc" break; case 292: // var: "REMOTE_PORT" #line 2388 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::RemotePort()); } #line 4409 "seclang-parser.cc" break; case 293: // var: "REQBODY_ERROR" #line 2392 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::ReqbodyError()); } #line 4417 "seclang-parser.cc" break; case 294: // var: "REQBODY_ERROR_MSG" #line 2396 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::ReqbodyErrorMsg()); } #line 4425 "seclang-parser.cc" break; case 295: // var: "REQBODY_PROCESSOR" #line 2400 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::ReqbodyProcessor()); } #line 4433 "seclang-parser.cc" break; case 296: // var: "REQBODY_PROCESSOR_ERROR" #line 2404 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::ReqbodyProcessorError()); } #line 4441 "seclang-parser.cc" break; case 297: // var: "REQBODY_PROCESSOR_ERROR_MSG" #line 2408 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::ReqbodyProcessorErrorMsg()); } #line 4449 "seclang-parser.cc" break; case 298: // var: "REQUEST_BASENAME" #line 2412 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::RequestBasename()); } #line 4457 "seclang-parser.cc" break; case 299: // var: "REQUEST_BODY" #line 2416 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::RequestBody()); } #line 4465 "seclang-parser.cc" break; case 300: // var: "REQUEST_BODY_LENGTH" #line 2420 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::RequestBodyLength()); } #line 4473 "seclang-parser.cc" break; case 301: // var: "REQUEST_FILENAME" #line 2424 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::RequestFilename()); } #line 4481 "seclang-parser.cc" break; case 302: // var: "REQUEST_LINE" #line 2428 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::RequestLine()); } #line 4489 "seclang-parser.cc" break; case 303: // var: "REQUEST_METHOD" #line 2432 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::RequestMethod()); } #line 4497 "seclang-parser.cc" break; case 304: // var: "REQUEST_PROTOCOL" #line 2436 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::RequestProtocol()); } #line 4505 "seclang-parser.cc" break; case 305: // var: "REQUEST_URI" #line 2440 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::RequestURI()); } #line 4513 "seclang-parser.cc" break; case 306: // var: "REQUEST_URI_RAW" #line 2444 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::RequestURIRaw()); } #line 4521 "seclang-parser.cc" break; case 307: // var: "RESPONSE_BODY" #line 2448 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::ResponseBody()); } #line 4529 "seclang-parser.cc" break; case 308: // var: "RESPONSE_CONTENT_LENGTH" #line 2452 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::ResponseContentLength()); } #line 4537 "seclang-parser.cc" break; case 309: // var: "RESPONSE_PROTOCOL" #line 2456 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::ResponseProtocol()); } #line 4545 "seclang-parser.cc" break; case 310: // var: "RESPONSE_STATUS" #line 2460 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::ResponseStatus()); } #line 4553 "seclang-parser.cc" break; case 311: // var: "SERVER_ADDR" #line 2464 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::ServerAddr()); } #line 4561 "seclang-parser.cc" break; case 312: // var: "SERVER_NAME" #line 2468 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::ServerName()); } #line 4569 "seclang-parser.cc" break; case 313: // var: "SERVER_PORT" #line 2472 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::ServerPort()); } #line 4577 "seclang-parser.cc" break; case 314: // var: "SESSIONID" #line 2476 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::SessionID()); } #line 4585 "seclang-parser.cc" break; case 315: // var: "UNIQUE_ID" #line 2480 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::UniqueID()); } #line 4593 "seclang-parser.cc" break; case 316: // var: "URLENCODED_ERROR" #line 2484 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::UrlEncodedError()); } #line 4601 "seclang-parser.cc" break; case 317: // var: "USERID" #line 2488 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::UserID()); } #line 4609 "seclang-parser.cc" break; case 318: // var: "VARIABLE_STATUS" #line 2492 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::Status()); } #line 4617 "seclang-parser.cc" break; case 319: // var: "VARIABLE_STATUS_LINE" #line 2496 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::Status()); } #line 4625 "seclang-parser.cc" break; case 320: // var: "WEBAPPID" #line 2500 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::WebAppId()); } #line 4633 "seclang-parser.cc" break; case 321: // var: "RUN_TIME_VAR_DUR" #line 2504 "seclang-parser.yy" { std::string name(yystack_[0].value.as < std::string > ()); char z = name.at(0); std::unique_ptr c(new Duration(name)); yylhs.value.as < std::unique_ptr > () = std::move(c); } #line 4644 "seclang-parser.cc" break; case 322: // var: "RUN_TIME_VAR_BLD" #line 2512 "seclang-parser.yy" { std::string name(yystack_[0].value.as < std::string > ()); char z = name.at(0); std::unique_ptr c(new ModsecBuild(name)); yylhs.value.as < std::unique_ptr > () = std::move(c); } #line 4655 "seclang-parser.cc" break; case 323: // var: "RUN_TIME_VAR_HSV" #line 2519 "seclang-parser.yy" { std::string name(yystack_[0].value.as < std::string > ()); char z = name.at(0); std::unique_ptr c(new HighestSeverity(name)); yylhs.value.as < std::unique_ptr > () = std::move(c); } #line 4666 "seclang-parser.cc" break; case 324: // var: "RUN_TIME_VAR_REMOTE_USER" #line 2526 "seclang-parser.yy" { std::string name(yystack_[0].value.as < std::string > ()); char z = name.at(0); std::unique_ptr c(new RemoteUser(name)); yylhs.value.as < std::unique_ptr > () = std::move(c); } #line 4677 "seclang-parser.cc" break; case 325: // var: "RUN_TIME_VAR_TIME" #line 2533 "seclang-parser.yy" { std::string name(yystack_[0].value.as < std::string > ()); char z = name.at(0); std::unique_ptr c(new Time(name)); yylhs.value.as < std::unique_ptr > () = std::move(c); } #line 4688 "seclang-parser.cc" break; case 326: // var: "RUN_TIME_VAR_TIME_DAY" #line 2540 "seclang-parser.yy" { std::string name(yystack_[0].value.as < std::string > ()); char z = name.at(0); std::unique_ptr c(new TimeDay(name)); yylhs.value.as < std::unique_ptr > () = std::move(c); } #line 4699 "seclang-parser.cc" break; case 327: // var: "RUN_TIME_VAR_TIME_EPOCH" #line 2547 "seclang-parser.yy" { std::string name(yystack_[0].value.as < std::string > ()); char z = name.at(0); std::unique_ptr c(new TimeEpoch(name)); yylhs.value.as < std::unique_ptr > () = std::move(c); } #line 4710 "seclang-parser.cc" break; case 328: // var: "RUN_TIME_VAR_TIME_HOUR" #line 2554 "seclang-parser.yy" { std::string name(yystack_[0].value.as < std::string > ()); char z = name.at(0); std::unique_ptr c(new TimeHour(name)); yylhs.value.as < std::unique_ptr > () = std::move(c); } #line 4721 "seclang-parser.cc" break; case 329: // var: "RUN_TIME_VAR_TIME_MIN" #line 2561 "seclang-parser.yy" { std::string name(yystack_[0].value.as < std::string > ()); char z = name.at(0); std::unique_ptr c(new TimeMin(name)); yylhs.value.as < std::unique_ptr > () = std::move(c); } #line 4732 "seclang-parser.cc" break; case 330: // var: "RUN_TIME_VAR_TIME_MON" #line 2568 "seclang-parser.yy" { std::string name(yystack_[0].value.as < std::string > ()); char z = name.at(0); std::unique_ptr c(new TimeMon(name)); yylhs.value.as < std::unique_ptr > () = std::move(c); } #line 4743 "seclang-parser.cc" break; case 331: // var: "RUN_TIME_VAR_TIME_SEC" #line 2575 "seclang-parser.yy" { std::string name(yystack_[0].value.as < std::string > ()); char z = name.at(0); std::unique_ptr c(new TimeSec(name)); yylhs.value.as < std::unique_ptr > () = std::move(c); } #line 4754 "seclang-parser.cc" break; case 332: // var: "RUN_TIME_VAR_TIME_WDAY" #line 2582 "seclang-parser.yy" { std::string name(yystack_[0].value.as < std::string > ()); char z = name.at(0); std::unique_ptr c(new TimeWDay(name)); yylhs.value.as < std::unique_ptr > () = std::move(c); } #line 4765 "seclang-parser.cc" break; case 333: // var: "RUN_TIME_VAR_TIME_YEAR" #line 2589 "seclang-parser.yy" { std::string name(yystack_[0].value.as < std::string > ()); char z = name.at(0); std::unique_ptr c(new TimeYear(name)); yylhs.value.as < std::unique_ptr > () = std::move(c); } #line 4776 "seclang-parser.cc" break; case 334: // act: "Accuracy" #line 2599 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::Accuracy(yystack_[0].value.as < std::string > ())); } #line 4784 "seclang-parser.cc" break; case 335: // act: "Allow" #line 2603 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::disruptive::Allow(yystack_[0].value.as < std::string > ())); } #line 4792 "seclang-parser.cc" break; case 336: // act: "Append" #line 2607 "seclang-parser.yy" { ACTION_NOT_SUPPORTED("Append", yystack_[1].location); } #line 4800 "seclang-parser.cc" break; case 337: // act: "AuditLog" #line 2611 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::AuditLog(yystack_[0].value.as < std::string > ())); } #line 4808 "seclang-parser.cc" break; case 338: // act: "Block" #line 2615 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::Block(yystack_[0].value.as < std::string > ())); } #line 4816 "seclang-parser.cc" break; case 339: // act: "Capture" #line 2619 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::Capture(yystack_[0].value.as < std::string > ())); } #line 4824 "seclang-parser.cc" break; case 340: // act: "Chain" #line 2623 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::Chain(yystack_[0].value.as < std::string > ())); } #line 4832 "seclang-parser.cc" break; case 341: // act: "ACTION_CTL_AUDIT_ENGINE" "CONFIG_VALUE_ON" #line 2627 "seclang-parser.yy" { //ACTION_NOT_SUPPORTED("CtlAuditEngine", @0); ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::Action(yystack_[1].value.as < std::string > ())); } #line 4841 "seclang-parser.cc" break; case 342: // act: "ACTION_CTL_AUDIT_ENGINE" "CONFIG_VALUE_OFF" #line 2632 "seclang-parser.yy" { //ACTION_NOT_SUPPORTED("CtlAuditEngine", @0); ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::Action(yystack_[1].value.as < std::string > ())); } #line 4850 "seclang-parser.cc" break; case 343: // act: "ACTION_CTL_AUDIT_ENGINE" "CONFIG_VALUE_RELEVANT_ONLY" #line 2637 "seclang-parser.yy" { //ACTION_NOT_SUPPORTED("CtlAuditEngine", @0); ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::Action(yystack_[1].value.as < std::string > ())); } #line 4859 "seclang-parser.cc" break; case 344: // act: "ACTION_CTL_AUDIT_LOG_PARTS" #line 2642 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::ctl::AuditLogParts(yystack_[0].value.as < std::string > ())); } #line 4867 "seclang-parser.cc" break; case 345: // act: "ACTION_CTL_BDY_JSON" #line 2646 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::ctl::RequestBodyProcessorJSON(yystack_[0].value.as < std::string > ())); } #line 4875 "seclang-parser.cc" break; case 346: // act: "ACTION_CTL_BDY_XML" #line 2650 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::ctl::RequestBodyProcessorXML(yystack_[0].value.as < std::string > ())); } #line 4883 "seclang-parser.cc" break; case 347: // act: "ACTION_CTL_BDY_URLENCODED" #line 2654 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::ctl::RequestBodyProcessorURLENCODED(yystack_[0].value.as < std::string > ())); } #line 4891 "seclang-parser.cc" break; case 348: // act: "ACTION_CTL_FORCE_REQ_BODY_VAR" "CONFIG_VALUE_ON" #line 2658 "seclang-parser.yy" { //ACTION_NOT_SUPPORTED("CtlForceReequestBody", @0); ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::Action(yystack_[1].value.as < std::string > ())); } #line 4900 "seclang-parser.cc" break; case 349: // act: "ACTION_CTL_FORCE_REQ_BODY_VAR" "CONFIG_VALUE_OFF" #line 2663 "seclang-parser.yy" { //ACTION_NOT_SUPPORTED("CtlForceReequestBody", @0); ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::Action(yystack_[1].value.as < std::string > ())); } #line 4909 "seclang-parser.cc" break; case 350: // act: "ACTION_CTL_REQUEST_BODY_ACCESS" "CONFIG_VALUE_ON" #line 2668 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::ctl::RequestBodyAccess(yystack_[1].value.as < std::string > () + "true")); } #line 4917 "seclang-parser.cc" break; case 351: // act: "ACTION_CTL_REQUEST_BODY_ACCESS" "CONFIG_VALUE_OFF" #line 2672 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::ctl::RequestBodyAccess(yystack_[1].value.as < std::string > () + "false")); } #line 4925 "seclang-parser.cc" break; case 352: // act: "ACTION_CTL_RULE_ENGINE" "CONFIG_VALUE_ON" #line 2676 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::ctl::RuleEngine("ctl:RuleEngine=on")); } #line 4933 "seclang-parser.cc" break; case 353: // act: "ACTION_CTL_RULE_ENGINE" "CONFIG_VALUE_OFF" #line 2680 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::ctl::RuleEngine("ctl:RuleEngine=off")); } #line 4941 "seclang-parser.cc" break; case 354: // act: "ACTION_CTL_RULE_ENGINE" "CONFIG_VALUE_DETC" #line 2684 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::ctl::RuleEngine("ctl:RuleEngine=detectiononly")); } #line 4949 "seclang-parser.cc" break; case 355: // act: "ACTION_CTL_RULE_REMOVE_BY_ID" #line 2688 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::ctl::RuleRemoveById(yystack_[0].value.as < std::string > ())); } #line 4957 "seclang-parser.cc" break; case 356: // act: "ACTION_CTL_RULE_REMOVE_BY_TAG" #line 2692 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::ctl::RuleRemoveByTag(yystack_[0].value.as < std::string > ())); } #line 4965 "seclang-parser.cc" break; case 357: // act: "ACTION_CTL_RULE_REMOVE_TARGET_BY_ID" #line 2696 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::ctl::RuleRemoveTargetById(yystack_[0].value.as < std::string > ())); } #line 4973 "seclang-parser.cc" break; case 358: // act: "ACTION_CTL_RULE_REMOVE_TARGET_BY_TAG" #line 2700 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::ctl::RuleRemoveTargetByTag(yystack_[0].value.as < std::string > ())); } #line 4981 "seclang-parser.cc" break; case 359: // act: "Deny" #line 2704 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::disruptive::Deny(yystack_[0].value.as < std::string > ())); } #line 4989 "seclang-parser.cc" break; case 360: // act: "DeprecateVar" #line 2708 "seclang-parser.yy" { ACTION_NOT_SUPPORTED("DeprecateVar", yystack_[1].location); } #line 4997 "seclang-parser.cc" break; case 361: // act: "Drop" #line 2712 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::disruptive::Drop(yystack_[0].value.as < std::string > ())); } #line 5005 "seclang-parser.cc" break; case 362: // act: "Exec" #line 2716 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::Exec(yystack_[0].value.as < std::string > ())); } #line 5013 "seclang-parser.cc" break; case 363: // act: "ExpireVar" #line 2720 "seclang-parser.yy" { //ACTION_NOT_SUPPORTED("ExpireVar", @0); ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::Action(yystack_[0].value.as < std::string > ())); } #line 5022 "seclang-parser.cc" break; case 364: // act: "Id" #line 2725 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::RuleId(yystack_[0].value.as < std::string > ())); } #line 5030 "seclang-parser.cc" break; case 365: // act: "InitCol" run_time_string #line 2729 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::InitCol(yystack_[1].value.as < std::string > (), std::move(yystack_[0].value.as < std::unique_ptr > ()))); } #line 5038 "seclang-parser.cc" break; case 366: // act: "LogData" run_time_string #line 2733 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::LogData(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } #line 5046 "seclang-parser.cc" break; case 367: // act: "Log" #line 2737 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::Log(yystack_[0].value.as < std::string > ())); } #line 5054 "seclang-parser.cc" break; case 368: // act: "Maturity" #line 2741 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::Maturity(yystack_[0].value.as < std::string > ())); } #line 5062 "seclang-parser.cc" break; case 369: // act: "Msg" run_time_string #line 2745 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::Msg(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } #line 5070 "seclang-parser.cc" break; case 370: // act: "MultiMatch" #line 2749 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::MultiMatch(yystack_[0].value.as < std::string > ())); } #line 5078 "seclang-parser.cc" break; case 371: // act: "NoAuditLog" #line 2753 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::NoAuditLog(yystack_[0].value.as < std::string > ())); } #line 5086 "seclang-parser.cc" break; case 372: // act: "NoLog" #line 2757 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::NoLog(yystack_[0].value.as < std::string > ())); } #line 5094 "seclang-parser.cc" break; case 373: // act: "Pass" #line 2761 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::disruptive::Pass(yystack_[0].value.as < std::string > ())); } #line 5102 "seclang-parser.cc" break; case 374: // act: "Pause" #line 2765 "seclang-parser.yy" { ACTION_NOT_SUPPORTED("Pause", yystack_[1].location); } #line 5110 "seclang-parser.cc" break; case 375: // act: "Phase" #line 2769 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::Phase(yystack_[0].value.as < std::string > ())); } #line 5118 "seclang-parser.cc" break; case 376: // act: "Prepend" #line 2773 "seclang-parser.yy" { ACTION_NOT_SUPPORTED("Prepend", yystack_[1].location); } #line 5126 "seclang-parser.cc" break; case 377: // act: "Proxy" #line 2777 "seclang-parser.yy" { ACTION_NOT_SUPPORTED("Proxy", yystack_[1].location); } #line 5134 "seclang-parser.cc" break; case 378: // act: "Redirect" run_time_string #line 2781 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::disruptive::Redirect(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } #line 5142 "seclang-parser.cc" break; case 379: // act: "Rev" #line 2785 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::Rev(yystack_[0].value.as < std::string > ())); } #line 5150 "seclang-parser.cc" break; case 380: // act: "SanitiseArg" #line 2789 "seclang-parser.yy" { ACTION_NOT_SUPPORTED("SanitiseArg", yystack_[1].location); } #line 5158 "seclang-parser.cc" break; case 381: // act: "SanitiseMatched" #line 2793 "seclang-parser.yy" { ACTION_NOT_SUPPORTED("SanitiseMatched", yystack_[1].location); } #line 5166 "seclang-parser.cc" break; case 382: // act: "SanitiseMatchedBytes" #line 2797 "seclang-parser.yy" { ACTION_NOT_SUPPORTED("SanitiseMatchedBytes", yystack_[1].location); } #line 5174 "seclang-parser.cc" break; case 383: // act: "SanitiseRequestHeader" #line 2801 "seclang-parser.yy" { ACTION_NOT_SUPPORTED("SanitiseRequestHeader", yystack_[1].location); } #line 5182 "seclang-parser.cc" break; case 384: // act: "SanitiseResponseHeader" #line 2805 "seclang-parser.yy" { ACTION_NOT_SUPPORTED("SanitiseResponseHeader", yystack_[1].location); } #line 5190 "seclang-parser.cc" break; case 385: // act: "SetEnv" run_time_string #line 2809 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::SetENV(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } #line 5198 "seclang-parser.cc" break; case 386: // act: "SetRsc" run_time_string #line 2813 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::SetRSC(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } #line 5206 "seclang-parser.cc" break; case 387: // act: "SetSid" run_time_string #line 2817 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::SetSID(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } #line 5214 "seclang-parser.cc" break; case 388: // act: "SetUID" run_time_string #line 2821 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::SetUID(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } #line 5222 "seclang-parser.cc" break; case 389: // act: "SetVar" setvar_action #line 2825 "seclang-parser.yy" { yylhs.value.as < std::unique_ptr > () = std::move(yystack_[0].value.as < std::unique_ptr > ()); } #line 5230 "seclang-parser.cc" break; case 390: // act: "Severity" #line 2829 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::Severity(yystack_[0].value.as < std::string > ())); } #line 5238 "seclang-parser.cc" break; case 391: // act: "Skip" #line 2833 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::Skip(yystack_[0].value.as < std::string > ())); } #line 5246 "seclang-parser.cc" break; case 392: // act: "SkipAfter" #line 2837 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::SkipAfter(yystack_[0].value.as < std::string > ())); } #line 5254 "seclang-parser.cc" break; case 393: // act: "Status" #line 2841 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::data::Status(yystack_[0].value.as < std::string > ())); } #line 5262 "seclang-parser.cc" break; case 394: // act: "Tag" run_time_string #line 2845 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::Tag(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } #line 5270 "seclang-parser.cc" break; case 395: // act: "Ver" #line 2849 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::Ver(yystack_[0].value.as < std::string > ())); } #line 5278 "seclang-parser.cc" break; case 396: // act: "xmlns" #line 2853 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::XmlNS(yystack_[0].value.as < std::string > ())); } #line 5286 "seclang-parser.cc" break; case 397: // act: "ACTION_TRANSFORMATION_PARITY_ZERO_7_BIT" #line 2857 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::transformations::ParityZero7bit(yystack_[0].value.as < std::string > ())); } #line 5294 "seclang-parser.cc" break; case 398: // act: "ACTION_TRANSFORMATION_PARITY_ODD_7_BIT" #line 2861 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::transformations::ParityOdd7bit(yystack_[0].value.as < std::string > ())); } #line 5302 "seclang-parser.cc" break; case 399: // act: "ACTION_TRANSFORMATION_PARITY_EVEN_7_BIT" #line 2865 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::transformations::ParityEven7bit(yystack_[0].value.as < std::string > ())); } #line 5310 "seclang-parser.cc" break; case 400: // act: "ACTION_TRANSFORMATION_SQL_HEX_DECODE" #line 2869 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::transformations::SqlHexDecode(yystack_[0].value.as < std::string > ())); } #line 5318 "seclang-parser.cc" break; case 401: // act: "ACTION_TRANSFORMATION_BASE_64_ENCODE" #line 2873 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::transformations::Base64Encode(yystack_[0].value.as < std::string > ())); } #line 5326 "seclang-parser.cc" break; case 402: // act: "ACTION_TRANSFORMATION_BASE_64_DECODE" #line 2877 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::transformations::Base64Decode(yystack_[0].value.as < std::string > ())); } #line 5334 "seclang-parser.cc" break; case 403: // act: "ACTION_TRANSFORMATION_BASE_64_DECODE_EXT" #line 2881 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::transformations::Base64DecodeExt(yystack_[0].value.as < std::string > ())); } #line 5342 "seclang-parser.cc" break; case 404: // act: "ACTION_TRANSFORMATION_CMD_LINE" #line 2885 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::transformations::CmdLine(yystack_[0].value.as < std::string > ())); } #line 5350 "seclang-parser.cc" break; case 405: // act: "ACTION_TRANSFORMATION_SHA1" #line 2889 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::transformations::Sha1(yystack_[0].value.as < std::string > ())); } #line 5358 "seclang-parser.cc" break; case 406: // act: "ACTION_TRANSFORMATION_MD5" #line 2893 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::transformations::Md5(yystack_[0].value.as < std::string > ())); } #line 5366 "seclang-parser.cc" break; case 407: // act: "ACTION_TRANSFORMATION_ESCAPE_SEQ_DECODE" #line 2897 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::transformations::EscapeSeqDecode(yystack_[0].value.as < std::string > ())); } #line 5374 "seclang-parser.cc" break; case 408: // act: "ACTION_TRANSFORMATION_HEX_ENCODE" #line 2901 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::transformations::HexEncode(yystack_[0].value.as < std::string > ())); } #line 5382 "seclang-parser.cc" break; case 409: // act: "ACTION_TRANSFORMATION_HEX_DECODE" #line 2905 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::transformations::HexDecode(yystack_[0].value.as < std::string > ())); } #line 5390 "seclang-parser.cc" break; case 410: // act: "ACTION_TRANSFORMATION_LOWERCASE" #line 2909 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::transformations::LowerCase(yystack_[0].value.as < std::string > ())); } #line 5398 "seclang-parser.cc" break; case 411: // act: "ACTION_TRANSFORMATION_UPPERCASE" #line 2913 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::transformations::UpperCase(yystack_[0].value.as < std::string > ())); } #line 5406 "seclang-parser.cc" break; case 412: // act: "ACTION_TRANSFORMATION_URL_DECODE_UNI" #line 2917 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::transformations::UrlDecodeUni(yystack_[0].value.as < std::string > ())); } #line 5414 "seclang-parser.cc" break; case 413: // act: "ACTION_TRANSFORMATION_URL_DECODE" #line 2921 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::transformations::UrlDecode(yystack_[0].value.as < std::string > ())); } #line 5422 "seclang-parser.cc" break; case 414: // act: "ACTION_TRANSFORMATION_URL_ENCODE" #line 2925 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::transformations::UrlEncode(yystack_[0].value.as < std::string > ())); } #line 5430 "seclang-parser.cc" break; case 415: // act: "ACTION_TRANSFORMATION_NONE" #line 2929 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::transformations::None(yystack_[0].value.as < std::string > ())); } #line 5438 "seclang-parser.cc" break; case 416: // act: "ACTION_TRANSFORMATION_COMPRESS_WHITESPACE" #line 2933 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::transformations::CompressWhitespace(yystack_[0].value.as < std::string > ())); } #line 5446 "seclang-parser.cc" break; case 417: // act: "ACTION_TRANSFORMATION_REMOVE_WHITESPACE" #line 2937 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::transformations::RemoveWhitespace(yystack_[0].value.as < std::string > ())); } #line 5454 "seclang-parser.cc" break; case 418: // act: "ACTION_TRANSFORMATION_REPLACE_NULLS" #line 2941 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::transformations::ReplaceNulls(yystack_[0].value.as < std::string > ())); } #line 5462 "seclang-parser.cc" break; case 419: // act: "ACTION_TRANSFORMATION_REMOVE_NULLS" #line 2945 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::transformations::RemoveNulls(yystack_[0].value.as < std::string > ())); } #line 5470 "seclang-parser.cc" break; case 420: // act: "ACTION_TRANSFORMATION_HTML_ENTITY_DECODE" #line 2949 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::transformations::HtmlEntityDecode(yystack_[0].value.as < std::string > ())); } #line 5478 "seclang-parser.cc" break; case 421: // act: "ACTION_TRANSFORMATION_JS_DECODE" #line 2953 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::transformations::JsDecode(yystack_[0].value.as < std::string > ())); } #line 5486 "seclang-parser.cc" break; case 422: // act: "ACTION_TRANSFORMATION_CSS_DECODE" #line 2957 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::transformations::CssDecode(yystack_[0].value.as < std::string > ())); } #line 5494 "seclang-parser.cc" break; case 423: // act: "ACTION_TRANSFORMATION_TRIM" #line 2961 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::transformations::Trim(yystack_[0].value.as < std::string > ())); } #line 5502 "seclang-parser.cc" break; case 424: // act: "ACTION_TRANSFORMATION_TRIM_LEFT" #line 2965 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::transformations::TrimLeft(yystack_[0].value.as < std::string > ())); } #line 5510 "seclang-parser.cc" break; case 425: // act: "ACTION_TRANSFORMATION_TRIM_RIGHT" #line 2969 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::transformations::TrimRight(yystack_[0].value.as < std::string > ())); } #line 5518 "seclang-parser.cc" break; case 426: // act: "ACTION_TRANSFORMATION_NORMALISE_PATH_WIN" #line 2973 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::transformations::NormalisePathWin(yystack_[0].value.as < std::string > ())); } #line 5526 "seclang-parser.cc" break; case 427: // act: "ACTION_TRANSFORMATION_NORMALISE_PATH" #line 2977 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::transformations::NormalisePath(yystack_[0].value.as < std::string > ())); } #line 5534 "seclang-parser.cc" break; case 428: // act: "ACTION_TRANSFORMATION_LENGTH" #line 2981 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::transformations::Length(yystack_[0].value.as < std::string > ())); } #line 5542 "seclang-parser.cc" break; case 429: // act: "ACTION_TRANSFORMATION_UTF8_TO_UNICODE" #line 2985 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::transformations::Utf8ToUnicode(yystack_[0].value.as < std::string > ())); } #line 5550 "seclang-parser.cc" break; case 430: // act: "ACTION_TRANSFORMATION_REMOVE_COMMENTS_CHAR" #line 2989 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::transformations::RemoveCommentsChar(yystack_[0].value.as < std::string > ())); } #line 5558 "seclang-parser.cc" break; case 431: // act: "ACTION_TRANSFORMATION_REMOVE_COMMENTS" #line 2993 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::transformations::RemoveComments(yystack_[0].value.as < std::string > ())); } #line 5566 "seclang-parser.cc" break; case 432: // act: "ACTION_TRANSFORMATION_REPLACE_COMMENTS" #line 2997 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::transformations::ReplaceComments(yystack_[0].value.as < std::string > ())); } #line 5574 "seclang-parser.cc" break; case 433: // setvar_action: "NOT" var #line 3004 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::SetVar(actions::SetVarOperation::unsetOperation, std::move(yystack_[0].value.as < std::unique_ptr > ()))); } #line 5582 "seclang-parser.cc" break; case 434: // setvar_action: var #line 3008 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::SetVar(actions::SetVarOperation::setToOneOperation, std::move(yystack_[0].value.as < std::unique_ptr > ()))); } #line 5590 "seclang-parser.cc" break; case 435: // setvar_action: var SETVAR_OPERATION_EQUALS run_time_string #line 3012 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::SetVar(actions::SetVarOperation::setOperation, std::move(yystack_[2].value.as < std::unique_ptr > ()), std::move(yystack_[0].value.as < std::unique_ptr > ()))); } #line 5598 "seclang-parser.cc" break; case 436: // setvar_action: var SETVAR_OPERATION_EQUALS_PLUS run_time_string #line 3016 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::SetVar(actions::SetVarOperation::sumAndSetOperation, std::move(yystack_[2].value.as < std::unique_ptr > ()), std::move(yystack_[0].value.as < std::unique_ptr > ()))); } #line 5606 "seclang-parser.cc" break; case 437: // setvar_action: var SETVAR_OPERATION_EQUALS_MINUS run_time_string #line 3020 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::SetVar(actions::SetVarOperation::substractAndSetOperation, std::move(yystack_[2].value.as < std::unique_ptr > ()), std::move(yystack_[0].value.as < std::unique_ptr > ()))); } #line 5614 "seclang-parser.cc" break; case 438: // run_time_string: run_time_string "FREE_TEXT_QUOTE_MACRO_EXPANSION" #line 3027 "seclang-parser.yy" { yystack_[1].value.as < std::unique_ptr > ()->appendText(yystack_[0].value.as < std::string > ()); yylhs.value.as < std::unique_ptr > () = std::move(yystack_[1].value.as < std::unique_ptr > ()); } #line 5623 "seclang-parser.cc" break; case 439: // run_time_string: run_time_string var #line 3032 "seclang-parser.yy" { yystack_[1].value.as < std::unique_ptr > ()->appendVar(std::move(yystack_[0].value.as < std::unique_ptr > ())); yylhs.value.as < std::unique_ptr > () = std::move(yystack_[1].value.as < std::unique_ptr > ()); } #line 5632 "seclang-parser.cc" break; case 440: // run_time_string: "FREE_TEXT_QUOTE_MACRO_EXPANSION" #line 3037 "seclang-parser.yy" { std::unique_ptr r(new RunTimeString()); r->appendText(yystack_[0].value.as < std::string > ()); yylhs.value.as < std::unique_ptr > () = std::move(r); } #line 5642 "seclang-parser.cc" break; case 441: // run_time_string: var #line 3043 "seclang-parser.yy" { std::unique_ptr r(new RunTimeString()); r->appendVar(std::move(yystack_[0].value.as < std::unique_ptr > ())); yylhs.value.as < std::unique_ptr > () = std::move(r); } #line 5652 "seclang-parser.cc" break; #line 5656 "seclang-parser.cc" default: break; } } #if YY_EXCEPTIONS catch (const syntax_error& yyexc) { YYCDEBUG << "Caught exception: " << yyexc.what() << '\n'; error (yyexc); YYERROR; } #endif // YY_EXCEPTIONS YY_SYMBOL_PRINT ("-> $$ =", yylhs); yypop_ (yylen); yylen = 0; // Shift the result of the reduction. yypush_ (YY_NULLPTR, YY_MOVE (yylhs)); } goto yynewstate; /*--------------------------------------. | yyerrlab -- here on detecting error. | `--------------------------------------*/ yyerrlab: // If not already recovering from an error, report this error. if (!yyerrstatus_) { ++yynerrs_; context yyctx (*this, yyla); std::string msg = yysyntax_error_ (yyctx); error (yyla.location, YY_MOVE (msg)); } yyerror_range[1].location = yyla.location; if (yyerrstatus_ == 3) { /* If just tried and failed to reuse lookahead token after an error, discard it. */ // Return failure if at end of input. if (yyla.kind () == symbol_kind::S_YYEOF) YYABORT; else if (!yyla.empty ()) { yy_destroy_ ("Error: discarding", yyla); yyla.clear (); } } // Else will try to reuse lookahead token after shifting the error token. goto yyerrlab1; /*---------------------------------------------------. | yyerrorlab -- error raised explicitly by YYERROR. | `---------------------------------------------------*/ yyerrorlab: /* Pacify compilers when the user code never invokes YYERROR and the label yyerrorlab therefore never appears in user code. */ if (false) YYERROR; /* Do not reclaim the symbols of the rule whose action triggered this YYERROR. */ yypop_ (yylen); yylen = 0; YY_STACK_PRINT (); goto yyerrlab1; /*-------------------------------------------------------------. | yyerrlab1 -- common code for both syntax error and YYERROR. | `-------------------------------------------------------------*/ yyerrlab1: yyerrstatus_ = 3; // Each real token shifted decrements this. // Pop stack until we find a state that shifts the error token. for (;;) { yyn = yypact_[+yystack_[0].state]; if (!yy_pact_value_is_default_ (yyn)) { yyn += symbol_kind::S_YYerror; if (0 <= yyn && yyn <= yylast_ && yycheck_[yyn] == symbol_kind::S_YYerror) { yyn = yytable_[yyn]; if (0 < yyn) break; } } // Pop the current state because it cannot handle the error token. if (yystack_.size () == 1) YYABORT; yyerror_range[1].location = yystack_[0].location; yy_destroy_ ("Error: popping", yystack_[0]); yypop_ (); YY_STACK_PRINT (); } { stack_symbol_type error_token; yyerror_range[2].location = yyla.location; YYLLOC_DEFAULT (error_token.location, yyerror_range, 2); // Shift the error token. error_token.state = state_type (yyn); yypush_ ("Shifting", YY_MOVE (error_token)); } goto yynewstate; /*-------------------------------------. | yyacceptlab -- YYACCEPT comes here. | `-------------------------------------*/ yyacceptlab: yyresult = 0; goto yyreturn; /*-----------------------------------. | yyabortlab -- YYABORT comes here. | `-----------------------------------*/ yyabortlab: yyresult = 1; goto yyreturn; /*-----------------------------------------------------. | yyreturn -- parsing is finished, return the result. | `-----------------------------------------------------*/ yyreturn: if (!yyla.empty ()) yy_destroy_ ("Cleanup: discarding lookahead", yyla); /* Do not reclaim the symbols of the rule whose action triggered this YYABORT or YYACCEPT. */ yypop_ (yylen); YY_STACK_PRINT (); while (1 < yystack_.size ()) { yy_destroy_ ("Cleanup: popping", yystack_[0]); yypop_ (); } return yyresult; } #if YY_EXCEPTIONS catch (...) { YYCDEBUG << "Exception caught: cleaning lookahead and stack\n"; // Do not try to display the values of the reclaimed symbols, // as their printers might throw an exception. if (!yyla.empty ()) yy_destroy_ (YY_NULLPTR, yyla); while (1 < yystack_.size ()) { yy_destroy_ (YY_NULLPTR, yystack_[0]); yypop_ (); } throw; } #endif // YY_EXCEPTIONS } void seclang_parser::error (const syntax_error& yyexc) { error (yyexc.location, yyexc.what ()); } /* Return YYSTR after stripping away unnecessary quotes and backslashes, so that it's suitable for yyerror. The heuristic is that double-quoting is unnecessary unless the string contains an apostrophe, a comma, or backslash (other than backslash-backslash). YYSTR is taken from yytname. */ std::string seclang_parser::yytnamerr_ (const char *yystr) { if (*yystr == '"') { std::string yyr; char const *yyp = yystr; for (;;) switch (*++yyp) { case '\'': case ',': goto do_not_strip_quotes; case '\\': if (*++yyp != '\\') goto do_not_strip_quotes; else goto append; append: default: yyr += *yyp; break; case '"': return yyr; } do_not_strip_quotes: ; } return yystr; } std::string seclang_parser::symbol_name (symbol_kind_type yysymbol) { return yytnamerr_ (yytname_[yysymbol]); } // seclang_parser::context. seclang_parser::context::context (const seclang_parser& yyparser, const symbol_type& yyla) : yyparser_ (yyparser) , yyla_ (yyla) {} int seclang_parser::context::expected_tokens (symbol_kind_type yyarg[], int yyargn) const { // Actual number of expected tokens int yycount = 0; int yyn = yypact_[+yyparser_.yystack_[0].state]; if (!yy_pact_value_is_default_ (yyn)) { /* Start YYX at -YYN if negative to avoid negative indexes in YYCHECK. In other words, skip the first -YYN actions for this state because they are default actions. */ int yyxbegin = yyn < 0 ? -yyn : 0; // Stay within bounds of both yycheck and yytname. int yychecklim = yylast_ - yyn + 1; int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; for (int yyx = yyxbegin; yyx < yyxend; ++yyx) if (yycheck_[yyx + yyn] == yyx && yyx != symbol_kind::S_YYerror && !yy_table_value_is_error_ (yytable_[yyx + yyn])) { if (!yyarg) ++yycount; else if (yycount == yyargn) return 0; else yyarg[yycount++] = YY_CAST (symbol_kind_type, yyx); } } if (yyarg && yycount == 0 && 0 < yyargn) yyarg[0] = symbol_kind::S_YYEMPTY; return yycount; } int seclang_parser::yy_syntax_error_arguments_ (const context& yyctx, symbol_kind_type yyarg[], int yyargn) const { /* There are many possibilities here to consider: - If this state is a consistent state with a default action, then the only way this function was invoked is if the default action is an error action. In that case, don't check for expected tokens because there are none. - The only way there can be no lookahead present (in yyla) is if this state is a consistent state with a default action. Thus, detecting the absence of a lookahead is sufficient to determine that there is no unexpected or expected token to report. In that case, just report a simple "syntax error". - Don't assume there isn't a lookahead just because this state is a consistent state with a default action. There might have been a previous inconsistent state, consistent state with a non-default action, or user semantic action that manipulated yyla. (However, yyla is currently not documented for users.) - Of course, the expected token list depends on states to have correct lookahead information, and it depends on the parser not to perform extra reductions after fetching a lookahead from the scanner and before detecting a syntax error. Thus, state merging (from LALR or IELR) and default reductions corrupt the expected token list. However, the list is correct for canonical LR with one exception: it will still contain any token that will not be accepted due to an error action in a later state. */ if (!yyctx.lookahead ().empty ()) { if (yyarg) yyarg[0] = yyctx.token (); int yyn = yyctx.expected_tokens (yyarg ? yyarg + 1 : yyarg, yyargn - 1); return yyn + 1; } return 0; } // Generate an error message. std::string seclang_parser::yysyntax_error_ (const context& yyctx) const { // Its maximum. enum { YYARGS_MAX = 5 }; // Arguments of yyformat. symbol_kind_type yyarg[YYARGS_MAX]; int yycount = yy_syntax_error_arguments_ (yyctx, yyarg, YYARGS_MAX); char const* yyformat = YY_NULLPTR; switch (yycount) { #define YYCASE_(N, S) \ case N: \ yyformat = S; \ break default: // Avoid compiler warnings. YYCASE_ (0, YY_("syntax error")); YYCASE_ (1, YY_("syntax error, unexpected %s")); YYCASE_ (2, YY_("syntax error, unexpected %s, expecting %s")); YYCASE_ (3, YY_("syntax error, unexpected %s, expecting %s or %s")); YYCASE_ (4, YY_("syntax error, unexpected %s, expecting %s or %s or %s")); YYCASE_ (5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")); #undef YYCASE_ } std::string yyres; // Argument number. std::ptrdiff_t yyi = 0; for (char const* yyp = yyformat; *yyp; ++yyp) if (yyp[0] == '%' && yyp[1] == 's' && yyi < yycount) { yyres += symbol_name (yyarg[yyi++]); ++yyp; } else yyres += *yyp; return yyres; } const short seclang_parser::yypact_ninf_ = -413; const signed char seclang_parser::yytable_ninf_ = -1; const short seclang_parser::yypact_[] = { 2507, -413, -256, -413, -91, -413, -251, -413, -413, -413, -413, -413, -275, -413, -413, -413, -413, -413, -290, -413, -413, -413, -249, -158, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -155, -413, -413, -156, -413, -148, -413, -149, -144, -413, -283, 2855, 2855, -413, -413, -413, -413, -142, -300, -413, -413, -413, 1149, 1149, 1149, 2855, -269, -133, -413, -413, -413, -131, -413, -413, -413, -413, -413, -413, -413, -413, -413, 1149, 2855, 2668, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, 2125, -261, -413, -413, -413, -413, -413, -413, -413, -267, -413, -413, -413, -413, -129, -127, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, 2219, -413, 2219, -413, 2219, -413, -413, -413, -413, -413, -413, -413, -413, 2219, -413, -413, -413, -413, -413, -413, 2219, 2219, 2219, 2219, -413, -413, -413, -413, 2219, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, 3038, -413, 2, -413, -413, -413, -413, -413, -413, 2550, 2550, -161, -159, -157, -154, -152, -150, -147, -145, -143, -140, -138, -136, -132, -130, -128, -126, -413, -124, -122, -120, -118, -413, -413, -116, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -114, -413, -413, -413, -413, -413, 49, -413, -413, -413, -112, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, 457, 546, 635, 969, 1058, -110, -108, 1482, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, 4, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, 1662, -413, -413, -413, -413, 2550, -53, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, 2324, 2324, 2324, 2324, 2324, 2324, 2324, 2324, 2324, 3, 3038, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, -413, 2324, -413, -413, -413, -413, 2324, -413, -413, 2324, -413, -413, 2324, -413, -413, 2324, -413, -413, 2324, -413, -413, -413, -413, 8, 1573, 1993, 2219, 2219, 2219, -413, -413, 2219, 2219, 2219, -413, 2219, 2219, 2219, 2219, 2219, 2219, 2219, 2219, 2219, 2219, 2219, 2219, 2219, 2219, 2219, 2219, -413, 2219, 2219, 2219, 2219, -413, -413, 2219, 2219, 2219, 2219, 2219, 2855, -413, 2324, -413, 2219, 2219, 2219, -413, -413, -413, -413, -413, 2550, 2550, -413, -413, 2324, 2324, 2324, 2324, 2324, 2324, 2324, 2324, 2324, 2324, 2324, 2324, 2324, 2324, 2324, 2324, 2324, 2324, 2324, 2324, 2324, 2324, 2324, 2324, 2324, 2324, 2324, 2324, 2324, 2324, 2324, 2324, -413, 2324, 2324, 2324, -413, -413 }; const short seclang_parser::yydefact_[] = { 0, 2, 0, 143, 0, 89, 0, 88, 92, 93, 7, 6, 0, 11, 14, 12, 13, 17, 0, 126, 125, 94, 0, 0, 102, 103, 104, 105, 99, 127, 106, 107, 141, 140, 110, 111, 112, 128, 129, 0, 132, 130, 0, 131, 0, 133, 0, 0, 115, 0, 0, 0, 80, 152, 153, 154, 0, 0, 118, 120, 119, 0, 0, 0, 0, 0, 0, 26, 24, 25, 0, 142, 148, 149, 150, 147, 151, 116, 117, 146, 0, 0, 0, 4, 74, 5, 98, 97, 15, 16, 91, 90, 9, 10, 8, 20, 19, 18, 96, 95, 101, 100, 85, 84, 134, 135, 87, 86, 136, 137, 114, 113, 83, 81, 82, 0, 0, 334, 335, 336, 337, 338, 339, 340, 0, 344, 345, 346, 347, 0, 0, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 0, 367, 0, 368, 0, 370, 371, 372, 373, 374, 375, 376, 377, 0, 379, 380, 381, 382, 383, 384, 0, 0, 0, 0, 390, 391, 392, 393, 0, 401, 402, 403, 404, 416, 422, 407, 408, 409, 420, 421, 428, 410, 406, 415, 427, 426, 399, 398, 397, 431, 430, 419, 417, 432, 418, 405, 400, 423, 424, 425, 411, 414, 413, 412, 429, 395, 396, 0, 77, 30, 32, 79, 109, 108, 138, 139, 0, 0, 166, 169, 172, 175, 178, 181, 184, 187, 190, 193, 196, 199, 202, 205, 208, 211, 264, 253, 214, 250, 256, 265, 266, 223, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 294, 293, 297, 296, 295, 298, 300, 299, 301, 259, 302, 303, 304, 306, 305, 227, 307, 308, 260, 263, 309, 310, 311, 312, 313, 314, 315, 316, 317, 320, 318, 319, 231, 235, 243, 247, 239, 217, 220, 0, 322, 321, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 121, 156, 161, 122, 123, 124, 22, 21, 23, 28, 27, 144, 145, 0, 155, 78, 1, 3, 0, 434, 389, 354, 353, 352, 342, 341, 343, 349, 348, 351, 350, 440, 441, 365, 366, 369, 378, 385, 386, 387, 388, 394, 0, 0, 163, 162, 164, 165, 167, 168, 170, 171, 173, 174, 176, 177, 179, 180, 182, 183, 185, 186, 188, 189, 191, 192, 194, 195, 197, 198, 200, 201, 203, 204, 206, 207, 209, 210, 251, 252, 212, 213, 248, 249, 254, 255, 221, 222, 257, 258, 225, 226, 224, 261, 262, 229, 230, 228, 233, 234, 232, 241, 242, 240, 245, 246, 244, 237, 238, 236, 215, 216, 218, 219, 0, 0, 0, 0, 0, 0, 38, 39, 0, 0, 0, 73, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 37, 0, 0, 0, 0, 40, 41, 0, 0, 0, 0, 0, 76, 33, 35, 433, 0, 0, 0, 438, 439, 29, 31, 157, 0, 0, 158, 34, 36, 72, 56, 55, 57, 58, 43, 59, 52, 60, 42, 61, 62, 63, 64, 65, 66, 67, 53, 68, 69, 70, 71, 44, 45, 46, 47, 48, 49, 50, 51, 54, 75, 435, 436, 437, 160, 159 }; const short seclang_parser::yypgoto_[] = { -413, -413, -70, -413, -47, -192, -413, -412, -413, -413, -55, -153, -61, -332, -413, -134 }; const short seclang_parser::yydefgoto_[] = { -1, 82, 83, 84, 209, 210, 476, 477, 85, 335, 322, 323, 354, 211, 342, 355 }; const short seclang_parser::yytable_[] = { 324, 324, 324, 215, 212, 365, 365, 325, 326, 356, 437, 357, 339, 216, 437, 95, 364, 327, 96, 324, 358, 112, 97, 113, 114, 336, 491, 359, 360, 361, 362, 92, 93, 486, 337, 363, 94, 328, 329, 346, 347, 0, 330, 343, 348, 344, 345, 480, 481, 482, 86, 87, 88, 89, 341, 90, 91, 98, 99, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 100, 101, 414, 102, 103, 104, 105, 436, 366, 367, 106, 107, 108, 109, 110, 111, 213, 214, 0, 419, 422, 425, 428, 431, 0, 331, 332, 333, 334, 349, 350, 351, 352, 368, 369, 370, 371, 372, 373, 0, 374, 375, 376, 377, 378, 379, 0, 380, 381, 382, 383, 384, 385, 478, 386, 387, 388, 389, 390, 391, 0, 0, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 415, 416, 432, 433, 434, 435, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 324, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 479, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 484, 484, 484, 484, 484, 484, 484, 484, 484, 0, 492, 493, 494, 495, 0, 0, 496, 497, 498, 0, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 485, 515, 516, 517, 518, 487, 0, 519, 520, 521, 522, 523, 0, 0, 0, 0, 525, 526, 527, 0, 0, 0, 0, 484, 0, 0, 0, 0, 484, 0, 0, 484, 0, 0, 484, 0, 0, 484, 0, 0, 484, 0, 0, 0, 0, 353, 490, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 0, 412, 413, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 484, 0, 0, 0, 0, 0, 0, 0, 0, 0, 528, 529, 524, 0, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 0, 484, 484, 484, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 353, 0, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 0, 417, 418, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 353, 0, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 0, 420, 421, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 353, 0, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 0, 423, 424, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 353, 0, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 0, 426, 427, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 353, 0, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 0, 429, 430, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 488, 489, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 0, 0, 0, 0, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 0, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 0, 0, 0, 0, 0, 0, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 353, 0, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 0, 0, 0, 0, 0, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 0, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 0, 0, 0, 0, 340, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 0, 353, 0, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 353, 0, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 4, 483, 0, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 0, 0, 0, 338, 0, 0, 0, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 0, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 115, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 0, 0, 0, 0, 0, 0, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 208, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207 }; const short seclang_parser::yycheck_[] = { 61, 62, 63, 303, 51, 3, 3, 62, 63, 143, 6, 145, 82, 313, 6, 305, 208, 64, 308, 80, 154, 304, 312, 306, 307, 80, 438, 161, 162, 163, 164, 306, 307, 365, 81, 169, 311, 306, 307, 306, 307, -1, 311, 304, 311, 306, 307, 100, 101, 102, 306, 307, 143, 144, 115, 306, 307, 306, 307, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 306, 307, 284, 306, 307, 309, 310, 308, 217, 218, 306, 307, 309, 310, 306, 307, 306, 307, -1, 301, 302, 303, 304, 305, -1, 306, 307, 306, 307, 306, 307, 306, 307, 342, 343, 342, 343, 342, 343, -1, 342, 343, 342, 343, 342, 343, -1, 342, 343, 342, 343, 342, 343, 335, 342, 343, 342, 343, 342, 343, -1, -1, 342, 343, 342, 343, 342, 343, 342, 343, 342, 343, 342, 343, 342, 343, 342, 343, 342, 343, 342, 343, 342, 343, 342, 343, 342, 343, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 308, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 340, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 355, 356, 357, 358, 359, 360, 361, 362, 363, -1, 438, 439, 440, 441, -1, -1, 444, 445, 446, -1, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 327, 465, 466, 467, 468, 327, -1, 471, 472, 473, 474, 475, -1, -1, -1, -1, 480, 481, 482, -1, -1, -1, -1, 414, -1, -1, -1, -1, 419, -1, -1, 422, -1, -1, 425, -1, -1, 428, -1, -1, 431, -1, -1, -1, -1, 326, 437, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, -1, 342, 343, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 478, -1, -1, -1, -1, -1, -1, -1, -1, -1, 488, 489, 476, -1, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, -1, 525, 526, 527, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 326, -1, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, -1, 342, 343, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 326, -1, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, -1, 342, 343, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 326, -1, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, -1, 342, 343, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 326, -1, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, -1, 342, 343, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 326, -1, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, -1, 342, 343, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, -1, -1, -1, -1, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, -1, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, -1, -1, -1, -1, -1, -1, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 326, -1, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, -1, -1, -1, -1, -1, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, -1, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, -1, -1, -1, -1, 103, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, -1, 326, -1, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, -1, -1, -1, 4, 5, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 326, -1, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 142, 326, -1, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, -1, -1, -1, 0, -1, -1, -1, 4, 5, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, -1, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 142, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 99, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, -1, -1, -1, -1, -1, -1, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 99, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 327, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236 }; const short seclang_parser::yystos_[] = { 0, 0, 4, 5, 142, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 345, 346, 347, 352, 306, 307, 143, 144, 306, 307, 306, 307, 311, 305, 308, 312, 306, 307, 306, 307, 306, 307, 309, 310, 306, 307, 309, 310, 306, 307, 304, 306, 307, 99, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 327, 348, 349, 357, 348, 306, 307, 303, 313, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 354, 355, 356, 354, 354, 348, 306, 307, 311, 306, 307, 306, 307, 353, 354, 348, 0, 346, 103, 356, 358, 304, 306, 307, 306, 307, 311, 306, 307, 306, 307, 326, 356, 359, 359, 359, 359, 359, 359, 359, 359, 359, 349, 3, 356, 356, 342, 343, 342, 343, 342, 343, 342, 343, 342, 343, 342, 343, 342, 343, 342, 343, 342, 343, 342, 343, 342, 343, 342, 343, 342, 343, 342, 343, 342, 343, 342, 343, 342, 343, 342, 343, 342, 343, 342, 343, 342, 343, 342, 343, 342, 343, 359, 342, 343, 342, 343, 359, 342, 343, 359, 342, 343, 359, 342, 343, 359, 342, 343, 359, 342, 343, 342, 343, 355, 6, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 350, 351, 359, 356, 100, 101, 102, 326, 356, 327, 357, 327, 8, 9, 356, 351, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 348, 359, 359, 359, 356, 356 }; const short seclang_parser::yyr1_[] = { 0, 344, 345, 345, 345, 346, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 348, 348, 349, 349, 350, 350, 350, 350, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 353, 354, 354, 355, 355, 355, 355, 355, 355, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 358, 358, 358, 358, 358, 359, 359, 359, 359 }; const signed char seclang_parser::yyr2_[] = { 0, 2, 1, 2, 1, 1, 1, 1, 2, 2, 2, 1, 1, 1, 1, 2, 2, 1, 2, 2, 2, 2, 2, 2, 1, 1, 1, 2, 2, 3, 1, 3, 1, 1, 2, 1, 2, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 4, 3, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 1, 1, 2, 2, 1, 1, 1, 2, 2, 2, 2, 1, 2, 2, 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 1, 2, 2, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 4, 4, 1, 2, 2, 2, 2, 1, 2, 2, 1, 2, 2, 1, 2, 2, 1, 2, 2, 1, 2, 2, 1, 2, 2, 1, 2, 2, 1, 2, 2, 1, 2, 2, 1, 2, 2, 1, 2, 2, 1, 2, 2, 1, 2, 2, 1, 2, 2, 1, 2, 2, 1, 2, 2, 1, 2, 2, 1, 2, 2, 1, 2, 2, 1, 2, 2, 2, 1, 2, 2, 2, 1, 2, 2, 2, 1, 2, 2, 2, 1, 2, 2, 2, 1, 2, 2, 2, 1, 2, 2, 1, 2, 2, 1, 2, 2, 1, 2, 2, 1, 1, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 3, 3, 3, 2, 2, 1, 1 }; #if YYDEBUG || 1 // YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. // First, the terminals, then, starting at \a YYNTOKENS, nonterminals. const char* const seclang_parser::yytname_[] = { "\"end of file\"", "error", "\"invalid token\"", "\",\"", "\"CONFIG_CONTENT_INJECTION\"", "\"CONGIG_DIR_RESPONSE_BODY_MP_CLEAR\"", "PIPE", "NEW_LINE", "VAR_COUNT", "VAR_EXCLUSION", "VARIABLE_ARGS", "VARIABLE_ARGS_POST", "VARIABLE_ARGS_GET", "VARIABLE_FILES_SIZES", "VARIABLE_FILES_NAMES", "VARIABLE_FILES_TMP_CONTENT", "VARIABLE_MULTIPART_FILENAME", "VARIABLE_MULTIPART_NAME", "VARIABLE_MATCHED_VARS_NAMES", "VARIABLE_MATCHED_VARS", "VARIABLE_FILES", "VARIABLE_REQUEST_COOKIES", "VARIABLE_REQUEST_HEADERS", "VARIABLE_RESPONSE_HEADERS", "VARIABLE_GEO", "VARIABLE_REQUEST_COOKIES_NAMES", "VARIABLE_ARGS_COMBINED_SIZE", "VARIABLE_ARGS_GET_NAMES", "VARIABLE_RULE", "\"Variable ARGS_NAMES\"", "VARIABLE_ARGS_POST_NAMES", "\"AUTH_TYPE\"", "\"FILES_COMBINED_SIZE\"", "\"FILES_TMPNAMES\"", "\"FULL_REQUEST\"", "\"FULL_REQUEST_LENGTH\"", "\"INBOUND_DATA_ERROR\"", "\"MATCHED_VAR\"", "\"MATCHED_VAR_NAME\"", "VARIABLE_MULTIPART_BOUNDARY_QUOTED", "VARIABLE_MULTIPART_BOUNDARY_WHITESPACE", "\"MULTIPART_CRLF_LF_LINES\"", "\"MULTIPART_DATA_AFTER\"", "VARIABLE_MULTIPART_DATA_BEFORE", "\"MULTIPART_FILE_LIMIT_EXCEEDED\"", "\"MULTIPART_HEADER_FOLDING\"", "\"MULTIPART_INVALID_HEADER_FOLDING\"", "VARIABLE_MULTIPART_INVALID_PART", "\"MULTIPART_INVALID_QUOTING\"", "VARIABLE_MULTIPART_LF_LINE", "VARIABLE_MULTIPART_MISSING_SEMICOLON", "VARIABLE_MULTIPART_SEMICOLON_MISSING", "\"MULTIPART_STRICT_ERROR\"", "\"MULTIPART_UNMATCHED_BOUNDARY\"", "\"OUTBOUND_DATA_ERROR\"", "\"PATH_INFO\"", "\"QUERY_STRING\"", "\"REMOTE_ADDR\"", "\"REMOTE_HOST\"", "\"REMOTE_PORT\"", "\"REQBODY_ERROR_MSG\"", "\"REQBODY_ERROR\"", "\"REQBODY_PROCESSOR_ERROR_MSG\"", "\"REQBODY_PROCESSOR_ERROR\"", "\"REQBODY_PROCESSOR\"", "\"REQUEST_BASENAME\"", "\"REQUEST_BODY_LENGTH\"", "\"REQUEST_BODY\"", "\"REQUEST_FILENAME\"", "VARIABLE_REQUEST_HEADERS_NAMES", "\"REQUEST_LINE\"", "\"REQUEST_METHOD\"", "\"REQUEST_PROTOCOL\"", "\"REQUEST_URI_RAW\"", "\"REQUEST_URI\"", "\"RESOURCE\"", "\"RESPONSE_BODY\"", "\"RESPONSE_CONTENT_LENGTH\"", "VARIABLE_RESPONSE_CONTENT_TYPE", "VARIABLE_RESPONSE_HEADERS_NAMES", "\"RESPONSE_PROTOCOL\"", "\"RESPONSE_STATUS\"", "\"SERVER_ADDR\"", "\"SERVER_NAME\"", "\"SERVER_PORT\"", "\"SESSIONID\"", "\"UNIQUE_ID\"", "\"URLENCODED_ERROR\"", "\"USERID\"", "\"WEBAPPID\"", "\"VARIABLE_STATUS\"", "\"VARIABLE_STATUS_LINE\"", "\"VARIABLE_IP\"", "\"VARIABLE_GLOBAL\"", "\"VARIABLE_TX\"", "\"VARIABLE_SESSION\"", "\"VARIABLE_USER\"", "\"RUN_TIME_VAR_ENV\"", "\"RUN_TIME_VAR_XML\"", "\"SetVar\"", "SETVAR_OPERATION_EQUALS", "SETVAR_OPERATION_EQUALS_PLUS", "SETVAR_OPERATION_EQUALS_MINUS", "\"NOT\"", "\"OPERATOR_BEGINS_WITH\"", "\"OPERATOR_CONTAINS\"", "\"OPERATOR_CONTAINS_WORD\"", "\"OPERATOR_DETECT_SQLI\"", "\"OPERATOR_DETECT_XSS\"", "\"OPERATOR_ENDS_WITH\"", "\"OPERATOR_EQ\"", "\"OPERATOR_FUZZY_HASH\"", "\"OPERATOR_GEOLOOKUP\"", "\"OPERATOR_GE\"", "\"OPERATOR_GSB_LOOKUP\"", "\"OPERATOR_GT\"", "\"OPERATOR_INSPECT_FILE\"", "\"OPERATOR_IP_MATCH_FROM_FILE\"", "\"OPERATOR_IP_MATCH\"", "\"OPERATOR_LE\"", "\"OPERATOR_LT\"", "\"OPERATOR_PM_FROM_FILE\"", "\"OPERATOR_PM\"", "\"OPERATOR_RBL\"", "\"OPERATOR_RSUB\"", "\"Operator RX (content only)\"", "\"OPERATOR_RX\"", "\"OPERATOR_RX_GLOBAL\"", "\"OPERATOR_STR_EQ\"", "\"OPERATOR_STR_MATCH\"", "\"OPERATOR_UNCONDITIONAL_MATCH\"", "\"OPERATOR_VALIDATE_BYTE_RANGE\"", "\"OPERATOR_VALIDATE_DTD\"", "\"OPERATOR_VALIDATE_HASH\"", "\"OPERATOR_VALIDATE_SCHEMA\"", "\"OPERATOR_VALIDATE_URL_ENCODING\"", "\"OPERATOR_VALIDATE_UTF8_ENCODING\"", "\"OPERATOR_VERIFY_CC\"", "\"OPERATOR_VERIFY_CPF\"", "\"OPERATOR_VERIFY_SSN\"", "\"OPERATOR_VERIFY_SVNR\"", "\"OPERATOR_WITHIN\"", "CONFIG_DIR_AUDIT_LOG_FMT", "JSON", "NATIVE", "\"ACTION_CTL_RULE_ENGINE\"", "\"Accuracy\"", "\"Allow\"", "\"Append\"", "\"AuditLog\"", "\"Block\"", "\"Capture\"", "\"Chain\"", "\"ACTION_CTL_AUDIT_ENGINE\"", "\"ACTION_CTL_AUDIT_LOG_PARTS\"", "\"ACTION_CTL_BDY_JSON\"", "\"ACTION_CTL_BDY_XML\"", "\"ACTION_CTL_BDY_URLENCODED\"", "\"ACTION_CTL_FORCE_REQ_BODY_VAR\"", "\"ACTION_CTL_REQUEST_BODY_ACCESS\"", "\"ACTION_CTL_RULE_REMOVE_BY_ID\"", "\"ACTION_CTL_RULE_REMOVE_BY_TAG\"", "\"ACTION_CTL_RULE_REMOVE_TARGET_BY_ID\"", "\"ACTION_CTL_RULE_REMOVE_TARGET_BY_TAG\"", "\"Deny\"", "\"DeprecateVar\"", "\"Drop\"", "\"Exec\"", "\"ExpireVar\"", "\"Id\"", "\"InitCol\"", "\"Log\"", "\"LogData\"", "\"Maturity\"", "\"Msg\"", "\"MultiMatch\"", "\"NoAuditLog\"", "\"NoLog\"", "\"Pass\"", "\"Pause\"", "\"Phase\"", "\"Prepend\"", "\"Proxy\"", "\"Redirect\"", "\"Rev\"", "\"SanitiseArg\"", "\"SanitiseMatched\"", "\"SanitiseMatchedBytes\"", "\"SanitiseRequestHeader\"", "\"SanitiseResponseHeader\"", "\"SetEnv\"", "\"SetRsc\"", "\"SetSid\"", "\"SetUID\"", "\"Severity\"", "\"Skip\"", "\"SkipAfter\"", "\"Status\"", "\"Tag\"", "\"ACTION_TRANSFORMATION_BASE_64_ENCODE\"", "\"ACTION_TRANSFORMATION_BASE_64_DECODE\"", "\"ACTION_TRANSFORMATION_BASE_64_DECODE_EXT\"", "\"ACTION_TRANSFORMATION_CMD_LINE\"", "\"ACTION_TRANSFORMATION_COMPRESS_WHITESPACE\"", "\"ACTION_TRANSFORMATION_CSS_DECODE\"", "\"ACTION_TRANSFORMATION_ESCAPE_SEQ_DECODE\"", "\"ACTION_TRANSFORMATION_HEX_ENCODE\"", "\"ACTION_TRANSFORMATION_HEX_DECODE\"", "\"ACTION_TRANSFORMATION_HTML_ENTITY_DECODE\"", "\"ACTION_TRANSFORMATION_JS_DECODE\"", "\"ACTION_TRANSFORMATION_LENGTH\"", "\"ACTION_TRANSFORMATION_LOWERCASE\"", "\"ACTION_TRANSFORMATION_MD5\"", "\"ACTION_TRANSFORMATION_NONE\"", "\"ACTION_TRANSFORMATION_NORMALISE_PATH\"", "\"ACTION_TRANSFORMATION_NORMALISE_PATH_WIN\"", "\"ACTION_TRANSFORMATION_PARITY_EVEN_7_BIT\"", "\"ACTION_TRANSFORMATION_PARITY_ODD_7_BIT\"", "\"ACTION_TRANSFORMATION_PARITY_ZERO_7_BIT\"", "\"ACTION_TRANSFORMATION_REMOVE_COMMENTS\"", "\"ACTION_TRANSFORMATION_REMOVE_COMMENTS_CHAR\"", "\"ACTION_TRANSFORMATION_REMOVE_NULLS\"", "\"ACTION_TRANSFORMATION_REMOVE_WHITESPACE\"", "\"ACTION_TRANSFORMATION_REPLACE_COMMENTS\"", "\"ACTION_TRANSFORMATION_REPLACE_NULLS\"", "\"ACTION_TRANSFORMATION_SHA1\"", "\"ACTION_TRANSFORMATION_SQL_HEX_DECODE\"", "\"ACTION_TRANSFORMATION_TRIM\"", "\"ACTION_TRANSFORMATION_TRIM_LEFT\"", "\"ACTION_TRANSFORMATION_TRIM_RIGHT\"", "\"ACTION_TRANSFORMATION_UPPERCASE\"", "\"ACTION_TRANSFORMATION_URL_ENCODE\"", "\"ACTION_TRANSFORMATION_URL_DECODE\"", "\"ACTION_TRANSFORMATION_URL_DECODE_UNI\"", "\"ACTION_TRANSFORMATION_UTF8_TO_UNICODE\"", "\"Ver\"", "\"xmlns\"", "\"CONFIG_COMPONENT_SIG\"", "\"CONFIG_CONN_ENGINE\"", "\"CONFIG_SEC_ARGUMENT_SEPARATOR\"", "\"CONFIG_SEC_WEB_APP_ID\"", "\"CONFIG_SEC_SERVER_SIG\"", "\"CONFIG_DIR_AUDIT_DIR\"", "\"CONFIG_DIR_AUDIT_DIR_MOD\"", "\"CONFIG_DIR_AUDIT_ENG\"", "\"CONFIG_DIR_AUDIT_FLE_MOD\"", "\"CONFIG_DIR_AUDIT_LOG\"", "\"CONFIG_DIR_AUDIT_LOG2\"", "\"CONFIG_DIR_AUDIT_LOG_P\"", "\"CONFIG_DIR_AUDIT_STS\"", "\"CONFIG_DIR_AUDIT_TPE\"", "\"CONFIG_DIR_DEBUG_LOG\"", "\"CONFIG_DIR_DEBUG_LVL\"", "\"CONFIG_SEC_CACHE_TRANSFORMATIONS\"", "\"CONFIG_SEC_DISABLE_BACKEND_COMPRESS\"", "\"CONFIG_SEC_HASH_ENGINE\"", "\"CONFIG_SEC_HASH_KEY\"", "\"CONFIG_SEC_HASH_PARAM\"", "\"CONFIG_SEC_HASH_METHOD_RX\"", "\"CONFIG_SEC_HASH_METHOD_PM\"", "\"CONFIG_SEC_CHROOT_DIR\"", "\"CONFIG_DIR_GEO_DB\"", "\"CONFIG_DIR_GSB_DB\"", "\"CONFIG_SEC_GUARDIAN_LOG\"", "\"CONFIG_DIR_PCRE_MATCH_LIMIT\"", "\"CONFIG_DIR_PCRE_MATCH_LIMIT_RECURSION\"", "\"CONFIG_SEC_CONN_R_STATE_LIMIT\"", "\"CONFIG_SEC_CONN_W_STATE_LIMIT\"", "\"CONFIG_SEC_SENSOR_ID\"", "\"CONFIG_DIR_ARGS_LIMIT\"", "\"CONFIG_DIR_REQ_BODY_JSON_DEPTH_LIMIT\"", "\"CONFIG_DIR_REQ_BODY\"", "\"CONFIG_DIR_REQ_BODY_IN_MEMORY_LIMIT\"", "\"CONFIG_DIR_REQ_BODY_LIMIT\"", "\"CONFIG_DIR_REQ_BODY_LIMIT_ACTION\"", "\"CONFIG_DIR_REQ_BODY_NO_FILES_LIMIT\"", "\"CONFIG_DIR_RES_BODY\"", "\"CONFIG_DIR_RES_BODY_LIMIT\"", "\"CONFIG_DIR_RES_BODY_LIMIT_ACTION\"", "\"CONFIG_SEC_RULE_INHERITANCE\"", "\"CONFIG_SEC_RULE_PERF_TIME\"", "\"CONFIG_DIR_RULE_ENG\"", "\"CONFIG_DIR_SEC_ACTION\"", "\"CONFIG_DIR_SEC_DEFAULT_ACTION\"", "\"CONFIG_DIR_SEC_MARKER\"", "\"CONFIG_DIR_UNICODE_MAP_FILE\"", "\"CONFIG_DIR_UNICODE_CODE_PAGE\"", "\"CONFIG_SEC_COLLECTION_TIMEOUT\"", "\"CONFIG_SEC_HTTP_BLKEY\"", "\"CONFIG_SEC_INTERCEPT_ON_ERROR\"", "\"CONFIG_SEC_REMOTE_RULES_FAIL_ACTION\"", "\"CONFIG_SEC_RULE_REMOVE_BY_ID\"", "\"CONFIG_SEC_RULE_REMOVE_BY_MSG\"", "\"CONFIG_SEC_RULE_REMOVE_BY_TAG\"", "\"CONFIG_SEC_RULE_UPDATE_TARGET_BY_TAG\"", "\"CONFIG_SEC_RULE_UPDATE_TARGET_BY_MSG\"", "\"CONFIG_SEC_RULE_UPDATE_TARGET_BY_ID\"", "\"CONFIG_SEC_RULE_UPDATE_ACTION_BY_ID\"", "\"CONFIG_UPDLOAD_KEEP_FILES\"", "\"CONFIG_UPDLOAD_SAVE_TMP_FILES\"", "\"CONFIG_UPLOAD_DIR\"", "\"CONFIG_UPLOAD_FILE_LIMIT\"", "\"CONFIG_UPLOAD_FILE_MODE\"", "\"CONFIG_VALUE_ABORT\"", "\"CONFIG_VALUE_DETC\"", "\"CONFIG_VALUE_HTTPS\"", "\"CONFIG_VALUE_OFF\"", "\"CONFIG_VALUE_ON\"", "\"CONFIG_VALUE_PARALLEL\"", "\"CONFIG_VALUE_PROCESS_PARTIAL\"", "\"CONFIG_VALUE_REJECT\"", "\"CONFIG_VALUE_RELEVANT_ONLY\"", "\"CONFIG_VALUE_SERIAL\"", "\"CONFIG_VALUE_WARN\"", "\"CONFIG_XML_EXTERNAL_ENTITY\"", "\"CONGIG_DIR_RESPONSE_BODY_MP\"", "\"CONGIG_DIR_SEC_ARG_SEP\"", "\"CONGIG_DIR_SEC_COOKIE_FORMAT\"", "\"CONFIG_SEC_COOKIEV0_SEPARATOR\"", "\"CONGIG_DIR_SEC_DATA_DIR\"", "\"CONGIG_DIR_SEC_STATUS_ENGINE\"", "\"CONFIG_SEC_STREAM_IN_BODY_INSPECTION\"", "\"CONFIG_SEC_STREAM_OUT_BODY_INSPECTION\"", "\"CONGIG_DIR_SEC_TMP_DIR\"", "\"DIRECTIVE\"", "\"DIRECTIVE_SECRULESCRIPT\"", "\"FREE_TEXT_QUOTE_MACRO_EXPANSION\"", "\"QUOTATION_MARK\"", "\"RUN_TIME_VAR_BLD\"", "\"RUN_TIME_VAR_DUR\"", "\"RUN_TIME_VAR_HSV\"", "\"RUN_TIME_VAR_REMOTE_USER\"", "\"RUN_TIME_VAR_TIME\"", "\"RUN_TIME_VAR_TIME_DAY\"", "\"RUN_TIME_VAR_TIME_EPOCH\"", "\"RUN_TIME_VAR_TIME_HOUR\"", "\"RUN_TIME_VAR_TIME_MIN\"", "\"RUN_TIME_VAR_TIME_MON\"", "\"RUN_TIME_VAR_TIME_SEC\"", "\"RUN_TIME_VAR_TIME_WDAY\"", "\"RUN_TIME_VAR_TIME_YEAR\"", "\"VARIABLE\"", "\"Dictionary element\"", "\"Dictionary element, selected by regexp\"", "$accept", "input", "line", "audit_log", "actions", "actions_may_quoted", "op", "op_before_init", "expression", "variables", "variables_pre_process", "variables_may_be_quoted", "var", "act", "setvar_action", "run_time_string", YY_NULLPTR }; #endif #if YYDEBUG const short seclang_parser::yyrline_[] = { 0, 711, 711, 715, 716, 719, 724, 730, 736, 740, 744, 750, 756, 762, 768, 773, 778, 784, 791, 795, 799, 805, 809, 813, 818, 823, 828, 833, 837, 844, 848, 855, 861, 871, 880, 890, 899, 912, 916, 920, 924, 928, 932, 936, 940, 944, 948, 953, 957, 961, 965, 969, 973, 978, 983, 987, 991, 995, 999, 1003, 1007, 1011, 1015, 1019, 1023, 1027, 1031, 1035, 1039, 1043, 1047, 1051, 1055, 1059, 1073, 1074, 1104, 1123, 1142, 1170, 1227, 1234, 1238, 1242, 1246, 1250, 1254, 1258, 1262, 1271, 1275, 1280, 1283, 1288, 1293, 1298, 1303, 1306, 1311, 1314, 1319, 1324, 1327, 1332, 1337, 1342, 1347, 1352, 1357, 1362, 1365, 1370, 1375, 1380, 1385, 1388, 1393, 1398, 1403, 1416, 1429, 1442, 1455, 1468, 1494, 1522, 1534, 1554, 1581, 1586, 1592, 1597, 1602, 1611, 1616, 1620, 1624, 1628, 1632, 1636, 1640, 1645, 1650, 1662, 1668, 1672, 1676, 1687, 1696, 1697, 1704, 1709, 1714, 1768, 1775, 1783, 1820, 1824, 1831, 1836, 1842, 1848, 1854, 1861, 1871, 1875, 1879, 1883, 1887, 1891, 1895, 1899, 1903, 1907, 1911, 1915, 1919, 1923, 1927, 1931, 1935, 1939, 1943, 1947, 1951, 1955, 1959, 1963, 1967, 1971, 1975, 1979, 1983, 1987, 1991, 1995, 1999, 2003, 2007, 2011, 2015, 2019, 2023, 2027, 2031, 2035, 2039, 2043, 2047, 2051, 2055, 2059, 2063, 2067, 2071, 2075, 2079, 2083, 2087, 2091, 2095, 2099, 2103, 2107, 2111, 2115, 2119, 2123, 2127, 2131, 2135, 2139, 2143, 2147, 2151, 2155, 2159, 2163, 2167, 2171, 2175, 2179, 2183, 2187, 2191, 2195, 2199, 2203, 2207, 2211, 2215, 2219, 2223, 2227, 2232, 2236, 2240, 2245, 2249, 2253, 2258, 2263, 2267, 2271, 2275, 2279, 2283, 2287, 2291, 2295, 2299, 2303, 2307, 2311, 2315, 2319, 2323, 2327, 2331, 2335, 2339, 2343, 2347, 2351, 2355, 2359, 2363, 2367, 2371, 2375, 2379, 2383, 2387, 2391, 2395, 2399, 2403, 2407, 2411, 2415, 2419, 2423, 2427, 2431, 2435, 2439, 2443, 2447, 2451, 2455, 2459, 2463, 2467, 2471, 2475, 2479, 2483, 2487, 2491, 2495, 2499, 2503, 2511, 2518, 2525, 2532, 2539, 2546, 2553, 2560, 2567, 2574, 2581, 2588, 2598, 2602, 2606, 2610, 2614, 2618, 2622, 2626, 2631, 2636, 2641, 2645, 2649, 2653, 2657, 2662, 2667, 2671, 2675, 2679, 2683, 2687, 2691, 2695, 2699, 2703, 2707, 2711, 2715, 2719, 2724, 2728, 2732, 2736, 2740, 2744, 2748, 2752, 2756, 2760, 2764, 2768, 2772, 2776, 2780, 2784, 2788, 2792, 2796, 2800, 2804, 2808, 2812, 2816, 2820, 2824, 2828, 2832, 2836, 2840, 2844, 2848, 2852, 2856, 2860, 2864, 2868, 2872, 2876, 2880, 2884, 2888, 2892, 2896, 2900, 2904, 2908, 2912, 2916, 2920, 2924, 2928, 2932, 2936, 2940, 2944, 2948, 2952, 2956, 2960, 2964, 2968, 2972, 2976, 2980, 2984, 2988, 2992, 2996, 3003, 3007, 3011, 3015, 3019, 3026, 3031, 3036, 3042 }; void seclang_parser::yy_stack_print_ () const { *yycdebug_ << "Stack now"; for (stack_type::const_iterator i = yystack_.begin (), i_end = yystack_.end (); i != i_end; ++i) *yycdebug_ << ' ' << int (i->state); *yycdebug_ << '\n'; } void seclang_parser::yy_reduce_print_ (int yyrule) const { int yylno = yyrline_[yyrule]; int yynrhs = yyr2_[yyrule]; // Print the symbols being reduced, and their result. *yycdebug_ << "Reducing stack by rule " << yyrule - 1 << " (line " << yylno << "):\n"; // The symbols being reduced. for (int yyi = 0; yyi < yynrhs; yyi++) YY_SYMBOL_PRINT (" $" << yyi + 1 << " =", yystack_[(yynrhs) - (yyi + 1)]); } #endif // YYDEBUG } // yy #line 7228 "seclang-parser.cc" #line 3049 "seclang-parser.yy" void yy::seclang_parser::error (const location_type& l, const std::string& m) { driver.error (l, m); } modsecurity-v3.0.6/src/parser/driver.cc0000664000175000017500000001401614146026157021274 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "src/parser/driver.h" #include "modsecurity/rules_set_properties.h" #include "src/parser/seclang-parser.hh" #include "modsecurity/audit_log.h" #include "modsecurity/rule_marker.h" using modsecurity::audit_log::AuditLog; using modsecurity::RuleWithOperator; namespace modsecurity { namespace Parser { Driver::Driver() : RulesSetProperties(), trace_scanning(false), trace_parsing(false), m_lastRule(nullptr) { } Driver::~Driver() { while (loc.empty() == false) { yy::location *a = loc.back(); loc.pop_back(); delete a; } } int Driver::addSecMarker(std::string marker, std::unique_ptr fileName, int lineNumber) { // FIXME: we might move this to the parser. for (int i = 0; i < modsecurity::Phases::NUMBER_OF_PHASES; i++) { RuleMarker *r = new RuleMarker(marker, std::unique_ptr(new std::string(*fileName)), lineNumber); std::unique_ptr rule(r); rule->setPhase(i); m_rulesSetPhases.insert(std::move(rule)); } return 0; } int Driver::addSecAction(std::unique_ptr rule) { if (rule->getPhase() >= modsecurity::Phases::NUMBER_OF_PHASES) { m_parserError << "Unknown phase: " << std::to_string(rule->getPhase()); m_parserError << std::endl; return false; } m_rulesSetPhases.insert(std::move(rule)); return true; } int Driver::addSecRuleScript(std::unique_ptr rule) { m_rulesSetPhases.insert(std::move(rule)); return true; } int Driver::addSecRule(std::unique_ptr r) { if (r->getPhase() >= modsecurity::Phases::NUMBER_OF_PHASES) { m_parserError << "Unknown phase: " << std::to_string(r->getPhase()); m_parserError << std::endl; return false; } /* is it a chained rule? */ if (m_lastRule != nullptr && m_lastRule->isChained()) { r->setPhase(m_lastRule->getPhase()); if (r->hasDisruptiveAction()) { m_parserError << "Disruptive actions can only be specified by"; m_parserError << " chain starter rules."; return false; } m_lastRule->m_chainedRuleChild = std::move(r); m_lastRule->m_chainedRuleChild->m_chainedRuleParent = m_lastRule; m_lastRule = m_lastRule->m_chainedRuleChild.get(); return true; } std::shared_ptr rule(std::move(r)); /* * Checking if the rule has an ID and also checking if this ID is not used * by other rule */ if (rule->m_ruleId == 0) { m_parserError << "Rules must have an ID. File: "; m_parserError << rule->getFileName() << " at line: "; m_parserError << std::to_string(rule->getLineNumber()) << std::endl; return false; } for (int i = 0; i < modsecurity::Phases::NUMBER_OF_PHASES; i++) { Rules *rules = m_rulesSetPhases[i]; for (int j = 0; j < rules->size(); j++) { RuleWithOperator *lr = dynamic_cast(rules->at(j).get()); if (lr && lr->m_ruleId == rule->m_ruleId) { m_parserError << "Rule id: " << std::to_string(rule->m_ruleId) \ << " is duplicated" << std::endl; return false; } } } m_lastRule = rule.get(); m_rulesSetPhases.insert(rule); return true; } int Driver::parse(const std::string &f, const std::string &ref) { m_lastRule = nullptr; loc.push_back(new yy::location()); if (ref.empty()) { loc.back()->begin.filename = loc.back()->end.filename = new std::string("<>"); } else { loc.back()->begin.filename = loc.back()->end.filename = new std::string(ref); } if (f.empty()) { return 1; } buffer = f; scan_begin(); yy::seclang_parser parser(*this); parser.set_debug_level(trace_parsing); int res = parser.parse(); scan_end(); /* * need to check for rules marked as chained but without * a chained rule. * */ /* if (m_lastRule != nullptr && m_lastRule->isChained()) { m_parserError << "Last rule is marked as chained but there " \ "isn't a subsequent rule." << std::endl; return false; } */ /* if (m_auditLog->init(&error) == false) { m_parserError << "Problems while initializing the audit logs: " \ << error << std::endl; return false; } */ return res == 0; } int Driver::parseFile(const std::string &f) { std::ifstream t(f); std::string str; if (utils::isFile(f) == false) { m_parserError << "Failed to open the file: " << f << std::endl; return false; } t.seekg(0, std::ios::end); str.reserve(t.tellg()); t.seekg(0, std::ios::beg); str.assign((std::istreambuf_iterator(t)), std::istreambuf_iterator()); return parse(str, f); } void Driver::error(const yy::location& l, const std::string& m) { error(l, m, ""); } void Driver::error(const yy::location& l, const std::string& m, const std::string& c) { if (m_parserError.tellp() == 0) { m_parserError << "Rules error. "; m_parserError << "File: " << *l.end.filename << ". "; m_parserError << "Line: " << l.end.line << ". "; m_parserError << "Column: " << l.end.column - 1 << ". "; } if (m.empty() == false) { m_parserError << "" << m << " "; } if (c.empty() == false) { m_parserError << c; } } } // namespace Parser } // namespace modsecurity modsecurity-v3.0.6/src/parser/stack.hh0000664000175000017500000000050014146026157021111 0ustar mhsvierulamhsvierula// A Bison parser, made by GNU Bison 3.7.2. // Starting with Bison 3.2, this file is useless: the structure it // used to define is now defined with the parser itself. // // To get rid of this file: // 1. add '%require "3.2"' (or newer) to your grammar file // 2. remove references to this file from your build system. modsecurity-v3.0.6/src/parser/seclang-scanner.cc0000664000175000017500000144340714146026157023057 0ustar mhsvierulamhsvierula #line 3 "seclang-scanner.cc" #define YY_INT_ALIGNED short int /* A lexical scanner generated by flex */ /* %not-for-header */ /* %if-c-only */ /* %if-not-reentrant */ /* %endif */ /* %endif */ /* %ok-for-header */ #define FLEX_SCANNER #define YY_FLEX_MAJOR_VERSION 2 #define YY_FLEX_MINOR_VERSION 6 #define YY_FLEX_SUBMINOR_VERSION 4 #if YY_FLEX_SUBMINOR_VERSION > 0 #define FLEX_BETA #endif /* %if-c++-only */ /* %endif */ /* %if-c-only */ /* %endif */ /* %if-c-only */ /* %endif */ /* First, we deal with platform-specific or compiler-specific issues. */ /* begin standard C headers. */ /* %if-c-only */ #include #include #include #include /* %endif */ /* %if-tables-serialization */ /* %endif */ /* end standard C headers. */ /* %if-c-or-c++ */ /* flex integer type definitions */ #ifndef FLEXINT_H #define FLEXINT_H /* C99 systems have . Non-C99 systems may or may not. */ #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, * if you want the limit (max/min) macros for int types. */ #ifndef __STDC_LIMIT_MACROS #define __STDC_LIMIT_MACROS 1 #endif #include typedef int8_t flex_int8_t; typedef uint8_t flex_uint8_t; typedef int16_t flex_int16_t; typedef uint16_t flex_uint16_t; typedef int32_t flex_int32_t; typedef uint32_t flex_uint32_t; #else typedef signed char flex_int8_t; typedef short int flex_int16_t; typedef int flex_int32_t; typedef unsigned char flex_uint8_t; typedef unsigned short int flex_uint16_t; typedef unsigned int flex_uint32_t; /* Limits of integral types. */ #ifndef INT8_MIN #define INT8_MIN (-128) #endif #ifndef INT16_MIN #define INT16_MIN (-32767-1) #endif #ifndef INT32_MIN #define INT32_MIN (-2147483647-1) #endif #ifndef INT8_MAX #define INT8_MAX (127) #endif #ifndef INT16_MAX #define INT16_MAX (32767) #endif #ifndef INT32_MAX #define INT32_MAX (2147483647) #endif #ifndef UINT8_MAX #define UINT8_MAX (255U) #endif #ifndef UINT16_MAX #define UINT16_MAX (65535U) #endif #ifndef UINT32_MAX #define UINT32_MAX (4294967295U) #endif #ifndef SIZE_MAX #define SIZE_MAX (~(size_t)0) #endif #endif /* ! C99 */ #endif /* ! FLEXINT_H */ /* %endif */ /* begin standard C++ headers. */ /* %if-c++-only */ /* %endif */ /* TODO: this is always defined, so inline it */ #define yyconst const #if defined(__GNUC__) && __GNUC__ >= 3 #define yynoreturn __attribute__((__noreturn__)) #else #define yynoreturn #endif /* %not-for-header */ /* Returned upon end-of-file. */ #define YY_NULL 0 /* %ok-for-header */ /* %not-for-header */ /* Promotes a possibly negative, possibly signed char to an * integer in range [0..255] for use as an array index. */ #define YY_SC_TO_UI(c) ((YY_CHAR) (c)) /* %ok-for-header */ /* %if-reentrant */ /* %endif */ /* %if-not-reentrant */ /* %endif */ /* Enter a start condition. This macro really ought to take a parameter, * but we do it the disgusting crufty way forced on us by the ()-less * definition of BEGIN. */ #define BEGIN (yy_start) = 1 + 2 * /* Translate the current start state into a value that can be later handed * to BEGIN to return to the state. The YYSTATE alias is for lex * compatibility. */ #define YY_START (((yy_start) - 1) / 2) #define YYSTATE YY_START /* Action number for EOF rule of a given start state. */ #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) /* Special action meaning "start processing a new file". */ #define YY_NEW_FILE yyrestart( yyin ) #define YY_END_OF_BUFFER_CHAR 0 /* Size of default input buffer. */ #ifndef YY_BUF_SIZE #ifdef __ia64__ /* On IA-64, the buffer size is 16k, not 8k. * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case. * Ditto for the __ia64__ case accordingly. */ #define YY_BUF_SIZE 32768 #else #define YY_BUF_SIZE 16384 #endif /* __ia64__ */ #endif /* The state buf must be large enough to hold one state per character in the main buffer. */ #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) #ifndef YY_TYPEDEF_YY_BUFFER_STATE #define YY_TYPEDEF_YY_BUFFER_STATE typedef struct yy_buffer_state *YY_BUFFER_STATE; #endif #ifndef YY_TYPEDEF_YY_SIZE_T #define YY_TYPEDEF_YY_SIZE_T typedef size_t yy_size_t; #endif /* %if-not-reentrant */ extern int yyleng; /* %endif */ /* %if-c-only */ /* %if-not-reentrant */ extern FILE *yyin, *yyout; /* %endif */ /* %endif */ #define EOB_ACT_CONTINUE_SCAN 0 #define EOB_ACT_END_OF_FILE 1 #define EOB_ACT_LAST_MATCH 2 #define YY_LESS_LINENO(n) #define YY_LINENO_REWIND_TO(ptr) /* Return all but the first "n" matched characters back to the input stream. */ #define yyless(n) \ do \ { \ /* Undo effects of setting up yytext. */ \ int yyless_macro_arg = (n); \ YY_LESS_LINENO(yyless_macro_arg);\ *yy_cp = (yy_hold_char); \ YY_RESTORE_YY_MORE_OFFSET \ (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ YY_DO_BEFORE_ACTION; /* set up yytext again */ \ } \ while ( 0 ) #define unput(c) yyunput( c, (yytext_ptr) ) #ifndef YY_STRUCT_YY_BUFFER_STATE #define YY_STRUCT_YY_BUFFER_STATE struct yy_buffer_state { /* %if-c-only */ FILE *yy_input_file; /* %endif */ /* %if-c++-only */ /* %endif */ char *yy_ch_buf; /* input buffer */ char *yy_buf_pos; /* current position in input buffer */ /* Size of input buffer in bytes, not including room for EOB * characters. */ int yy_buf_size; /* Number of characters read into yy_ch_buf, not including EOB * characters. */ int yy_n_chars; /* Whether we "own" the buffer - i.e., we know we created it, * and can realloc() it to grow it, and should free() it to * delete it. */ int yy_is_our_buffer; /* Whether this is an "interactive" input source; if so, and * if we're using stdio for input, then we want to use getc() * instead of fread(), to make sure we stop fetching input after * each newline. */ int yy_is_interactive; /* Whether we're considered to be at the beginning of a line. * If so, '^' rules will be active on the next match, otherwise * not. */ int yy_at_bol; int yy_bs_lineno; /**< The line count. */ int yy_bs_column; /**< The column count. */ /* Whether to try to fill the input buffer when we reach the * end of it. */ int yy_fill_buffer; int yy_buffer_status; #define YY_BUFFER_NEW 0 #define YY_BUFFER_NORMAL 1 /* When an EOF's been seen but there's still some text to process * then we mark the buffer as YY_EOF_PENDING, to indicate that we * shouldn't try reading from the input source any more. We might * still have a bunch of tokens to match, though, because of * possible backing-up. * * When we actually see the EOF, we change the status to "new" * (via yyrestart()), so that the user can continue scanning by * just pointing yyin at a new input file. */ #define YY_BUFFER_EOF_PENDING 2 }; #endif /* !YY_STRUCT_YY_BUFFER_STATE */ /* %if-c-only Standard (non-C++) definition */ /* %not-for-header */ /* %if-not-reentrant */ /* Stack of input buffers. */ static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */ static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */ static YY_BUFFER_STATE * yy_buffer_stack = NULL; /**< Stack as an array. */ /* %endif */ /* %ok-for-header */ /* %endif */ /* We provide macros for accessing buffer states in case in the * future we want to put the buffer states in a more general * "scanner state". * * Returns the top of the stack, or NULL. */ #define YY_CURRENT_BUFFER ( (yy_buffer_stack) \ ? (yy_buffer_stack)[(yy_buffer_stack_top)] \ : NULL) /* Same as previous macro, but useful when we know that the buffer stack is not * NULL or when we need an lvalue. For internal use only. */ #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)] /* %if-c-only Standard (non-C++) definition */ /* %if-not-reentrant */ /* %not-for-header */ /* yy_hold_char holds the character lost when yytext is formed. */ static char yy_hold_char; static int yy_n_chars; /* number of characters read into yy_ch_buf */ int yyleng; /* Points to current character in buffer. */ static char *yy_c_buf_p = NULL; static int yy_init = 0; /* whether we need to initialize */ static int yy_start = 0; /* start state number */ /* Flag which is used to allow yywrap()'s to do buffer switches * instead of setting up a fresh yyin. A bit of a hack ... */ static int yy_did_buffer_switch_on_eof; /* %ok-for-header */ /* %endif */ void yyrestart ( FILE *input_file ); void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer ); YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size ); void yy_delete_buffer ( YY_BUFFER_STATE b ); void yy_flush_buffer ( YY_BUFFER_STATE b ); void yypush_buffer_state ( YY_BUFFER_STATE new_buffer ); void yypop_buffer_state ( void ); static void yyensure_buffer_stack ( void ); static void yy_load_buffer_state ( void ); static void yy_init_buffer ( YY_BUFFER_STATE b, FILE *file ); #define YY_FLUSH_BUFFER yy_flush_buffer( YY_CURRENT_BUFFER ) YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size ); YY_BUFFER_STATE yy_scan_string ( const char *yy_str ); YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, int len ); /* %endif */ void *yyalloc ( yy_size_t ); void *yyrealloc ( void *, yy_size_t ); void yyfree ( void * ); #define yy_new_buffer yy_create_buffer #define yy_set_interactive(is_interactive) \ { \ if ( ! YY_CURRENT_BUFFER ){ \ yyensure_buffer_stack (); \ YY_CURRENT_BUFFER_LVALUE = \ yy_create_buffer( yyin, YY_BUF_SIZE ); \ } \ YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ } #define yy_set_bol(at_bol) \ { \ if ( ! YY_CURRENT_BUFFER ){\ yyensure_buffer_stack (); \ YY_CURRENT_BUFFER_LVALUE = \ yy_create_buffer( yyin, YY_BUF_SIZE ); \ } \ YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ } #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) /* %% [1.0] yytext/yyin/yyout/yy_state_type/yylineno etc. def's & init go here */ /* Begin user sect3 */ #define yywrap() (/*CONSTCOND*/1) #define YY_SKIP_YYWRAP #define FLEX_DEBUG typedef flex_uint8_t YY_CHAR; FILE *yyin = NULL, *yyout = NULL; typedef int yy_state_type; extern int yylineno; int yylineno = 1; extern char *yytext; #ifdef yytext_ptr #undef yytext_ptr #endif #define yytext_ptr yytext /* %% [1.5] DFA */ /* %if-c-only Standard (non-C++) definition */ static yy_state_type yy_get_previous_state ( void ); static yy_state_type yy_try_NUL_trans ( yy_state_type current_state ); static int yy_get_next_buffer ( void ); static void yynoreturn yy_fatal_error ( const char* msg ); /* %endif */ /* Done after the current pattern has been matched and before the * corresponding action - sets up yytext. */ #define YY_DO_BEFORE_ACTION \ (yytext_ptr) = yy_bp; \ /* %% [2.0] code to fiddle yytext and yyleng for yymore() goes here \ */\ yyleng = (int) (yy_cp - yy_bp); \ (yy_hold_char) = *yy_cp; \ *yy_cp = '\0'; \ /* %% [3.0] code to copy yytext_ptr to yytext[] goes here, if %array \ */\ (yy_c_buf_p) = yy_cp; /* %% [4.0] data tables for the DFA and the user's section 1 definitions go here */ #define YY_NUM_RULES 541 #define YY_END_OF_BUFFER 542 /* This struct is not used in this scanner, but its presence is necessary. */ struct yy_trans_info { flex_int32_t yy_verify; flex_int32_t yy_nxt; }; static const flex_int16_t yy_accept[3943] = { 0, 0, 0, 0, 0, 272, 272, 280, 280, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 284, 284, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 542, 534, 528, 265, 269, 270, 268, 271, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 288, 288, 541, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 125, 272, 278, 280, 282, 276, 275, 277, 274, 280, 273, 492, 492, 491, 492, 492, 492, 120, 119, 118, 127, 127, 127, 134, 126, 127, 129, 129, 129, 128, 134, 129, 132, 132, 132, 131, 134, 130, 132, 533, 533, 533, 541, 494, 493, 443, 446, 541, 446, 443, 443, 443, 432, 432, 432, 435, 437, 432, 436, 432, 426, 432, 502, 502, 502, 501, 506, 502, 504, 504, 504, 503, 506, 504, 117, 117, 109, 117, 114, 108, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 112, 117, 111, 541, 511, 541, 507, 520, 541, 284, 285, 541, 498, 498, 497, 500, 498, 496, 496, 495, 500, 496, 149, 535, 536, 537, 136, 135, 136, 136, 136, 136, 136, 136, 140, 139, 144, 145, 145, 144, 142, 141, 139, 147, 148, 148, 146, 147, 528, 265, 0, 268, 268, 268, 0, 0, 0, 0, 0, 0, 0, 0, 217, 0, 0, 0, 0, 0, 529, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 411, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 416, 0, 0, 0, 0, 0, 121, 0, 124, 272, 278, 280, 282, 279, 280, 281, 282, 283, 528, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 127, 0, 127, 127, 127, 0, 133, 121, 127, 127, 129, 0, 0, 129, 129, 129, 0, 129, 121, 129, 132, 0, 0, 132, 132, 132, 0, 132, 121, 132, 533, 533, 533, 0, 531, 533, 443, 0, 443, 0, 443, 443, 0, 443, 443, 432, 0, 0, 431, 432, 432, 432, 0, 432, 505, 432, 432, 0, 431, 0, 432, 424, 425, 432, 432, 502, 0, 0, 502, 502, 502, 0, 502, 121, 502, 504, 0, 504, 504, 0, 504, 0, 0, 121, 504, 504, 0, 109, 0, 108, 0, 110, 114, 115, 0, 108, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 105, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 106, 0, 0, 112, 0, 113, 111, 111, 0, 511, 0, 520, 0, 511, 509, 519, 0, 507, 520, 0, 0, 527, 0, 510, 0, 284, 285, 0, 285, 0, 0, 498, 0, 498, 0, 499, 498, 496, 0, 0, 496, 0, 496, 535, 536, 537, 0, 0, 0, 0, 0, 0, 137, 138, 144, 0, 0, 144, 0, 144, 143, 147, 0, 0, 147, 0, 147, 268, 0, 0, 0, 0, 0, 0, 0, 216, 0, 0, 0, 0, 0, 0, 0, 529, 530, 0, 0, 0, 394, 0, 0, 384, 0, 0, 0, 419, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 422, 0, 0, 0, 0, 392, 121, 122, 123, 0, 0, 0, 0, 464, 0, 465, 0, 466, 0, 0, 469, 470, 472, 0, 0, 474, 0, 0, 0, 0, 0, 0, 465, 0, 0, 0, 127, 0, 0, 121, 122, 0, 129, 0, 0, 121, 122, 0, 132, 0, 0, 121, 122, 531, 532, 443, 0, 443, 0, 438, 0, 438, 0, 443, 0, 432, 0, 0, 432, 0, 431, 0, 432, 432, 432, 432, 432, 0, 0, 0, 0, 432, 432, 432, 0, 502, 0, 0, 121, 122, 0, 504, 0, 0, 121, 121, 122, 116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 104, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 106, 107, 509, 519, 515, 518, 0, 522, 0, 0, 527, 0, 0, 510, 508, 517, 0, 0, 286, 0, 0, 498, 0, 0, 0, 496, 0, 0, 0, 0, 0, 0, 0, 144, 0, 0, 0, 147, 0, 0, 268, 0, 0, 0, 0, 0, 168, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 223, 530, 360, 0, 0, 395, 0, 0, 385, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 388, 0, 0, 0, 407, 0, 0, 417, 0, 0, 393, 122, 0, 0, 0, 0, 0, 0, 0, 0, 0, 471, 473, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 127, 0, 122, 129, 0, 122, 132, 0, 122, 532, 443, 0, 0, 0, 0, 443, 0, 0, 439, 444, 440, 439, 444, 440, 432, 0, 432, 432, 432, 0, 432, 0, 0, 0, 0, 432, 0, 431, 0, 432, 432, 427, 433, 428, 427, 433, 428, 0, 0, 432, 432, 502, 0, 122, 504, 0, 122, 122, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 7, 0, 0, 0, 8, 0, 0, 0, 49, 0, 0, 0, 13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 107, 515, 518, 514, 522, 0, 525, 0, 0, 521, 0, 0, 508, 517, 513, 516, 286, 0, 287, 498, 0, 496, 0, 0, 0, 0, 0, 144, 0, 147, 0, 268, 268, 213, 0, 0, 215, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 361, 0, 0, 0, 376, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 389, 0, 0, 0, 0, 0, 0, 423, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 490, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 441, 441, 441, 0, 0, 429, 429, 0, 0, 0, 432, 432, 0, 429, 0, 432, 0, 0, 0, 0, 0, 0, 0, 26, 0, 0, 2, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 14, 0, 0, 16, 0, 53, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 75, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 514, 525, 0, 526, 521, 0, 523, 0, 513, 516, 512, 287, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 268, 268, 0, 0, 0, 169, 0, 0, 220, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 222, 0, 0, 0, 0, 0, 0, 377, 0, 0, 410, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 414, 0, 0, 0, 0, 0, 0, 0, 0, 0, 358, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 476, 0, 0, 0, 0, 0, 0, 0, 0, 0, 445, 442, 445, 442, 434, 430, 434, 430, 0, 429, 0, 0, 0, 432, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 41, 41, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 62, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 84, 0, 0, 0, 0, 74, 0, 92, 0, 0, 0, 0, 0, 0, 0, 0, 526, 523, 0, 524, 512, 0, 0, 0, 268, 268, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 259, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 418, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 413, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 460, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 41, 0, 41, 41, 0, 0, 0, 0, 0, 0, 0, 50, 0, 0, 15, 0, 52, 0, 54, 22, 55, 56, 58, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, 0, 0, 65, 524, 0, 0, 268, 268, 0, 0, 0, 218, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 362, 0, 0, 0, 397, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 412, 0, 0, 0, 0, 421, 0, 0, 400, 0, 0, 403, 404, 405, 0, 0, 0, 0, 359, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 468, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 27, 0, 0, 0, 0, 0, 0, 40, 41, 40, 0, 41, 0, 0, 102, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 57, 0, 0, 23, 0, 0, 0, 0, 0, 0, 0, 0, 0, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, 0, 268, 268, 0, 0, 0, 0, 538, 0, 0, 261, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 363, 0, 0, 364, 296, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 324, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 420, 0, 0, 0, 0, 355, 0, 0, 402, 408, 406, 356, 0, 0, 0, 462, 0, 0, 463, 0, 0, 0, 0, 467, 0, 475, 477, 0, 0, 485, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 40, 0, 40, 0, 0, 0, 0, 0, 0, 50, 0, 0, 0, 0, 0, 0, 51, 0, 0, 0, 0, 0, 0, 0, 73, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 268, 268, 266, 0, 266, 218, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 243, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 292, 365, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 401, 0, 0, 0, 0, 0, 0, 480, 0, 489, 0, 0, 0, 0, 0, 0, 0, 0, 0, 486, 487, 0, 0, 0, 0, 0, 0, 25, 0, 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 46, 48, 0, 48, 10, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 60, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 90, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 93, 0, 0, 0, 0, 0, 268, 0, 266, 266, 266, 266, 266, 0, 539, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 234, 0, 0, 0, 0, 0, 0, 0, 0, 0, 293, 0, 0, 368, 366, 0, 0, 0, 0, 0, 302, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 326, 327, 328, 399, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 344, 0, 0, 0, 0, 0, 352, 353, 354, 415, 0, 0, 478, 0, 0, 451, 448, 0, 0, 471, 0, 0, 0, 0, 0, 0, 0, 488, 0, 0, 457, 0, 454, 0, 0, 0, 0, 25, 0, 0, 0, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 44, 44, 0, 0, 48, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 61, 0, 0, 0, 91, 0, 78, 77, 0, 79, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 94, 80, 83, 81, 0, 268, 268, 0, 0, 0, 0, 221, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 231, 0, 0, 0, 0, 0, 0, 0, 0, 0, 244, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 253, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 369, 367, 0, 0, 299, 0, 0, 374, 0, 396, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 325, 0, 0, 0, 336, 0, 0, 0, 340, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 450, 479, 0, 0, 0, 482, 0, 0, 0, 0, 0, 456, 0, 0, 0, 0, 24, 0, 0, 24, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 44, 44, 0, 44, 0, 44, 44, 0, 0, 47, 0, 0, 47, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 59, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 267, 267, 267, 267, 267, 214, 0, 0, 0, 0, 0, 166, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 241, 0, 0, 0, 0, 0, 0, 0, 174, 0, 0, 0, 0, 0, 0, 242, 0, 0, 0, 191, 0, 0, 0, 0, 190, 0, 0, 0, 0, 0, 0, 0, 0, 0, 235, 0, 0, 0, 0, 0, 153, 153, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 375, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 330, 0, 0, 0, 0, 0, 0, 0, 0, 0, 345, 0, 0, 0, 0, 0, 0, 461, 0, 0, 0, 483, 0, 0, 0, 0, 0, 0, 24, 25, 26, 0, 0, 0, 0, 0, 0, 103, 44, 43, 44, 44, 43, 0, 0, 44, 43, 0, 0, 44, 43, 44, 44, 45, 47, 48, 0, 0, 0, 50, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 60, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 88, 0, 0, 0, 0, 0, 0, 219, 0, 0, 161, 0, 163, 0, 0, 0, 0, 0, 0, 0, 0, 0, 239, 0, 0, 0, 0, 0, 0, 0, 232, 0, 0, 0, 0, 0, 0, 249, 0, 0, 264, 264, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 209, 0, 0, 0, 0, 0, 0, 0, 0, 290, 0, 0, 390, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 320, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 341, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 44, 0, 43, 0, 44, 44, 43, 0, 43, 0, 0, 43, 0, 0, 45, 43, 45, 45, 43, 0, 44, 43, 44, 0, 0, 0, 0, 50, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 60, 0, 60, 0, 60, 0, 0, 71, 70, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 87, 69, 82, 0, 0, 0, 170, 0, 0, 0, 0, 0, 0, 173, 0, 0, 0, 0, 0, 0, 0, 0, 0, 175, 0, 0, 0, 0, 0, 246, 245, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 236, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 152, 0, 0, 0, 0, 291, 294, 0, 391, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 319, 0, 0, 0, 0, 0, 0, 0, 0, 378, 0, 380, 0, 343, 0, 0, 0, 351, 0, 0, 0, 0, 0, 484, 0, 0, 0, 0, 0, 0, 0, 0, 0, 35, 0, 0, 42, 44, 42, 0, 44, 42, 0, 0, 42, 44, 0, 42, 0, 42, 45, 45, 42, 45, 26, 0, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 60, 0, 0, 0, 0, 0, 96, 96, 0, 67, 0, 0, 0, 0, 98, 0, 0, 0, 0, 0, 0, 0, 0, 0, 240, 0, 0, 0, 0, 0, 0, 0, 0, 260, 0, 177, 177, 0, 247, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 210, 0, 0, 0, 152, 0, 0, 295, 0, 0, 0, 398, 0, 0, 301, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 334, 0, 379, 0, 337, 381, 0, 342, 0, 382, 0, 357, 0, 467, 0, 0, 0, 0, 0, 0, 0, 28, 0, 0, 0, 0, 0, 0, 42, 42, 0, 42, 0, 44, 0, 42, 45, 43, 45, 45, 0, 0, 0, 0, 0, 0, 0, 0, 0, 60, 0, 0, 0, 0, 0, 0, 68, 66, 100, 0, 0, 0, 0, 0, 0, 167, 0, 0, 0, 0, 0, 0, 0, 0, 0, 228, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 0, 0, 0, 237, 0, 0, 0, 233, 233, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 370, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 316, 0, 0, 0, 0, 0, 329, 333, 0, 0, 0, 0, 383, 0, 350, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 43, 43, 45, 45, 43, 45, 0, 0, 0, 0, 0, 0, 60, 0, 72, 0, 76, 0, 0, 0, 0, 0, 101, 0, 0, 0, 0, 0, 164, 0, 0, 0, 0, 0, 0, 0, 0, 0, 176, 0, 248, 0, 0, 0, 540, 0, 0, 0, 0, 0, 0, 0, 0, 0, 254, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 207, 0, 289, 0, 371, 0, 300, 372, 0, 0, 0, 0, 310, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 481, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 43, 0, 0, 0, 0, 0, 60, 0, 89, 95, 95, 0, 86, 0, 180, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 154, 0, 0, 250, 179, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 194, 194, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 212, 0, 297, 298, 373, 0, 0, 0, 0, 309, 0, 0, 0, 0, 0, 0, 0, 0, 0, 323, 0, 335, 0, 0, 0, 0, 0, 409, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 155, 0, 165, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 186, 0, 0, 0, 0, 0, 0, 0, 0, 195, 195, 0, 197, 197, 0, 0, 0, 0, 0, 0, 0, 0, 0, 211, 224, 0, 0, 0, 306, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 449, 0, 0, 0, 455, 0, 0, 29, 0, 0, 0, 36, 0, 0, 19, 0, 0, 85, 99, 0, 0, 162, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 184, 0, 0, 189, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 193, 0, 0, 0, 307, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 386, 338, 0, 347, 0, 452, 0, 0, 458, 0, 0, 0, 0, 37, 0, 20, 0, 160, 227, 227, 0, 160, 156, 0, 0, 0, 263, 0, 251, 0, 230, 0, 0, 0, 0, 0, 0, 0, 0, 188, 0, 0, 196, 198, 0, 0, 0, 0, 151, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 314, 0, 0, 0, 321, 0, 0, 387, 339, 0, 348, 453, 0, 459, 0, 34, 0, 0, 21, 0, 0, 0, 157, 0, 0, 252, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 151, 0, 0, 208, 0, 0, 305, 0, 0, 0, 0, 0, 0, 0, 332, 346, 349, 0, 0, 0, 0, 159, 0, 0, 238, 0, 0, 0, 229, 0, 0, 262, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 311, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 158, 150, 0, 0, 0, 0, 0, 0, 183, 0, 0, 225, 225, 0, 206, 0, 204, 0, 0, 0, 256, 0, 303, 0, 0, 0, 315, 0, 0, 0, 0, 0, 0, 0, 0, 0, 150, 0, 0, 0, 0, 0, 187, 0, 0, 0, 202, 0, 200, 0, 257, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 38, 0, 171, 171, 0, 0, 0, 0, 0, 0, 0, 205, 203, 0, 0, 0, 0, 0, 317, 318, 0, 331, 0, 0, 0, 0, 39, 0, 258, 178, 0, 0, 185, 0, 201, 199, 0, 0, 0, 322, 0, 0, 0, 31, 172, 182, 0, 226, 304, 308, 0, 33, 30, 0, 181, 0, 0, 0, 0, 313, 0, 0, 0, 32, 0 } ; static const YY_CHAR yy_ec[256] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 1, 1, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 6, 7, 8, 9, 10, 11, 12, 1, 1, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 22, 28, 9, 1, 29, 1, 1, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 9, 57, 9, 1, 58, 1, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 } ; static const YY_CHAR yy_meta[88] = { 0, 1, 2, 3, 4, 5, 1, 6, 1, 7, 1, 1, 8, 9, 1, 10, 9, 9, 9, 11, 11, 11, 11, 11, 11, 11, 11, 11, 9, 12, 1, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 14, 15, 15, 15, 16, 15, 14, 15, 15, 15, 15, 15, 15, 15, 13, 1, 9, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, 15, 15, 15, 16, 15, 14, 15, 15, 15, 15, 15, 15, 15, 15, 17, 18, 1 } ; static const flex_int16_t yy_base[4228] = { 0, 0, 80, 161, 0, 4, 8, 14, 247, 21, 87, 101, 254, 25, 40, 53, 261, 265, 275, 284, 290, 94, 304,11842,11841,11838,11830, 324, 347, 365, 383, 413, 434, 314, 448, 335, 397, 505, 0, 457, 464, 591, 597, 603, 609, 419, 425, 271, 298, 102, 612, 11826,11825,11822,11751,11668,11599,11593,11592, 614, 622, 0, 0,11563,11519, 428, 611, 646, 668, 0, 0, 57, 79, 620, 627,11542,14231, 673,14231,14231,14231, 308,14231, 4, 25, 59, 52, 71, 72, 96, 279, 315, 97, 220, 271, 8,14231, 443,14231, 655, 269, 312, 578, 673, 330, 429, 681, 327, 358, 368, 686, 679, 699, 707, 421, 422, 38,11531, 133, 765, 771, 783,14231,14231,14231,14231, 789,14231,14231, 631,14231, 815, 76, 764,14231,14231,14231, 278, 798, 348, 417, 11481, 801, 372, 829, 752,11455, 540, 814, 855, 895, 883,11449, 546,11448, 904, 830, 901,14231, 913,14231, 14231, 918,11445,11420,11414, 924, 957, 964, 934, 980, 991,11413, 601, 1012,11410, 1024, 725, 1042, 770, 1054, 831,11402, 625, 1063, 645, 978, 802, 867, 663, 1072, 14231, 1081,14231,11450, 484, 475, 1047, 719, 764, 874, 717, 940, 752, 1056, 800, 953, 1064, 818, 1059, 917, 821, 885, 405, 1139,14231,11449, 1143, 1147, 476, 309, 1153, 1159, 410, 1011, 490, 493, 1096, 1114,11392, 911, 1122, 1124, 1129,11384, 943, 1158,14231, 0, 0, 0, 14231,14231, 990, 1017, 1053, 1062, 1105, 1118,14231, 120, 1162,11378, 1113, 1168,14231,14231, 282, 1178,11377, 1116, 11374, 1199, 1200,14231, 495, 0, 1187,11279, 1135, 1140, 1144, 1149, 1180, 1172, 1168, 1184,14231, 1173, 1178, 1184, 1199, 1182, 636,11133, 1229, 620, 1196, 1187, 1190, 1187, 1198, 1200, 1198, 1199, 1213, 1221, 297, 1205, 1225, 1220, 1213, 1214, 1234, 1230, 1232, 1236, 1245, 1237, 735, 1243, 1246, 1254, 1261, 1252, 641,11127,11044, 642, 1321, 1327, 1333,14231, 1293,14231, 1304,14231, 1294, 1279, 1270, 1283, 1297, 1268, 1304, 1311, 1298, 1302, 1317, 1302, 1314, 1328, 1321, 1329, 1354, 1321, 1339, 920,11069, 670, 1395, 1405, 1400,14231, 1409, 1410, 1406, 1416,11025,11019, 998, 1423, 1431, 1417, 1429, 1435, 1440, 1439,11018,11015, 1391, 1454, 1467, 1448, 1468, 1474, 1484, 1498, 1504,14231, 1510, 933, 1514, 1525,10936, 1518,10980, 1541, 1561, 346, 1578, 1584, 1585,10929,10926, 1609, 1527, 1624, 1642, 1500, 1648,14231, 1673, 1677, 1615, 1707, 842, 1708,14231,14231, 1733, 1739, 1488,10900,10894, 1005, 1722, 1549, 1633, 1684, 1745, 1701, 1568,10893, 1172, 1751, 1671, 1599, 1664, 1605, 1764, 1767, 1734, 1780,14231,10944, 949, 816,14231, 1784,14231,10936, 1463, 1335, 1402, 1444, 1474, 1477, 1503, 1529, 1581, 1753, 1658, 1746,10905, 1734, 1739, 1728, 1761, 1758, 1774, 1771, 14231, 1761, 1780, 1778, 1780, 1771, 1767, 1779, 1791, 1829, 1792, 1782, 1806, 1533,10929, 1879,14231,10926,14231, 1883, 1907, 1911, 1567, 701, 1917, 1075, 1691, 1560, 1847,10801, 1923, 1930, 1861, 898, 1755, 1100, 1889, 1035, 1936, 1851, 1110, 1937, 1942,10797, 1860,10707, 1293, 1888,14231, 1941, 1943,10657,10639, 1428, 1945, 1947, 0, 0, 0, 1829, 1030, 1882, 1899, 1476, 1921,14231,14231, 1956,10621,10617, 1955, 1948, 1968,14231, 1979,10545,10505, 1996, 1978, 2008, 10495, 1919, 1940, 1946, 1936, 1954, 1955, 1975,14231, 1985, 1984, 1984, 1986, 2035, 1983, 1982, 1967, 2026, 1980, 1992, 2001, 1633, 1998, 1992, 1669, 2007, 2005, 2003,14231, 2018, 2003, 2009, 2031, 2026, 2022, 2030, 2067, 2059, 2047, 2041, 2046, 2057, 2073,14231, 2068, 2084, 2072, 2091, 2109, 2036, 2123,14231, 2087, 2085, 2080, 2097,14231, 2078, 2093, 2107, 14231, 2092, 2099,14231,14231, 2108, 2103, 2098, 2114, 2105, 2121, 2113, 2108, 2110, 2111, 2118, 2131, 2123, 2114, 2164, 10470,10495, 2185, 2196,10438, 2168,10370,10392, 2200, 2207, 10391, 2208,10360,10313, 2217, 2224, 2198, 2211, 2233, 2186, 2253, 856, 2273,10316, 2215, 2178, 2293,10209, 2237,10091, 10101, 2316, 2307, 2339, 2193, 2360, 2393, 2408, 2426, 2446, 10122, 2288, 2295, 2383, 2461, 2486, 2495, 9759, 2260, 9311, 9338, 2425, 2447, 2184, 2327, 9309, 9336, 2457, 2281, 2476, 14231, 2194, 2214, 2226, 2260, 2274, 2265, 2294, 9364, 2293, 2305, 2320, 2312, 2330, 2327, 2515, 2319, 2337, 2355, 9363, 2364, 2368, 2435,14231, 2436, 2440, 2443, 2449, 2462, 2482, 9362, 2483, 2510, 2490, 2480, 2478, 2498, 2520, 2497, 2516, 2499, 2525, 2521, 2519, 2536, 2533, 2533, 2524, 2555, 9361, 9360, 2534, 2402, 2419, 2472, 2504, 2482, 2602, 2608, 2579, 2609, 9384, 2580, 2615, 1372, 2616, 2622, 2623, 9380, 2630, 2634, 2636, 2555, 2372, 9297, 9324, 9323, 2635, 9294, 9321, 2587, 2581, 2585, 2596, 9320, 2641, 9291, 9318, 9317, 2645, 9247, 9249, 92, 2599, 2599, 2620, 2609, 2608,14231, 2609, 2621, 2630, 2633, 2615, 2649, 2645, 2640, 2666, 2674, 2624, 2649, 2651, 2671, 2681, 2642, 2675, 2674, 2671, 2689,14231, 2721, 2710, 9239, 2680,14231, 2683, 9238,14231, 2704, 2701, 2688, 2703, 2711, 2712, 2708, 9237, 2699, 2705, 2711, 2722, 2710, 2717, 2502, 2730, 2727, 2719, 9235, 2720, 2728, 2758, 2727, 2741,14231, 2775, 2739, 2737, 2753, 2742, 2736, 2753, 2754, 2756, 2772, 2757,14231, 2775, 2766, 2774, 2765, 2772, 2773, 2775, 2779, 2776, 2776, 2783, 1723, 2816, 2842, 2227, 2822, 2846, 2845, 2851, 2857, 2861, 2875, 947, 2168, 2850, 9262, 2908, 42, 2858, 9188, 916, 9186,14231, 9222,14231, 2874, 2859, 2915, 2940, 2941, 1309, 2961, 2888, 2931, 9214, 2973, 3004, 3003, 3029, 2228, 3038, 3063, 3042, 2259, 3062, 14231, 9212,14231, 989, 2442, 3095, 3096, 2817, 2928, 3077, 2861, 2924, 2994, 2907, 2822, 2838, 2852, 2889, 2913, 2933, 2943, 3073,14231, 2957, 2967,14231, 9201, 2959, 3119, 3135, 3005, 3024, 3041,14231, 3055, 3089, 3098,14231, 3101, 3112, 3113, 3095, 3117, 9125, 3116, 3123, 3119, 3130, 3131, 3140, 3124, 3146, 3122, 3130, 3146, 3139, 3134, 3151, 3131, 3143, 3153, 3144, 3136, 9105, 3158, 3142, 3176, 3161, 3161, 3165, 3163, 3179, 3187,14231, 8875, 3175, 2890, 2892, 3124, 2981, 3091, 3231, 3110, 3237, 3238, 3125, 3251, 8816, 3223, 3252, 3224, 3258, 3259, 3264, 3265, 2967, 3236, 3019, 3265, 3196, 3197, 3223, 3251, 3267, 3263, 3271, 3270, 8756, 8658,14231, 3236, 3235,14231, 3253, 3253, 3247, 3242, 3245, 3266, 3248, 3264, 3268, 3270, 3256, 3263, 3259, 3278, 3262, 3273, 3289, 3309, 3292, 3293, 3294, 3297, 3299, 3305, 3308, 3307, 3322, 3310, 3318, 3316, 3327, 3318, 3319,14231, 3357, 3313, 3325, 3349, 3317, 3325, 3325, 3352, 3362, 3366, 3354, 3353, 3366, 8671, 3371, 3374, 3360, 3362, 3367,14231, 3364, 3368, 3365, 3409, 3382, 3387,14231, 3387, 3377, 3378, 3391, 3415, 3417, 3400, 3400, 3411, 3412, 3424, 3410, 3416,14231, 3420, 3419, 3436, 3424, 3435, 3434, 3434, 3443, 3432, 3435, 3448, 3434, 8556, 8552, 8452, 8479, 8410, 3506, 3484, 1508, 8434, 8353, 3510, 3485, 3488, 3028, 1344, 3531, 3540, 3508, 3593, 3557, 3597, 3522, 3611, 8365, 8335, 3459, 8317, 3498, 8333, 3514, 3511,14231, 3506,14231, 3505, 3516, 3584, 3533, 3528, 8341, 3575, 3650, 3575, 3571, 3584, 3581, 3586,14231,14231, 8298, 3583,14231, 3593, 8308, 0, 3591, 3579, 3599, 3599, 3602, 3589, 3600, 3661, 3630, 3629, 3654, 3648, 3645, 3658, 3662, 3661, 3656, 3664, 3663, 3666,14231, 3667, 3660, 3665, 3660, 3665, 8299, 3670, 3666, 3675, 3677, 8291, 18, 8193, 3414, 3525, 3578, 3529, 3585, 3639, 3640, 3739, 3711, 3740, 3720, 3746, 3658, 8135, 8108, 8079, 3692, 3701, 3705, 8044, 8011, 8024, 7995, 7946, 7946, 3704, 3714, 3719,14231, 3720, 3707, 14231, 3713, 3719, 3708, 3721, 3723, 3718, 3722, 3719, 3722, 3726, 3737, 3718, 3739, 3740, 3731, 3732, 3727, 3738, 3733, 3755, 3764, 3771, 3763, 3758, 3764, 3776, 3763, 3761, 3764, 3780, 3782, 3784, 3774, 3789, 3786,14231, 3777, 3788, 3793, 3780, 3771, 3782,14231, 3813, 3793, 3841, 3782, 3827, 3830, 7950, 3834, 3822, 3823, 3819, 7832, 3815, 3821, 3839, 3824, 7801, 3831, 7781, 3845, 3831, 3833, 3841, 3844, 3847, 3847, 7744, 3838,14231, 3845, 3835, 3839, 3858, 3852, 3874, 3879, 3873, 3874, 3887, 3888, 3879, 3891,14231, 3874, 3892, 3896, 3873, 3885, 3881, 3887, 3899, 3903, 3917, 2883, 1689, 7769, 3918, 3961, 1818, 7762, 3954, 1837, 3979, 1749, 2985, 4005, 3924, 3904, 3945,14231, 3894, 3935, 3943, 3930, 3938, 3946, 3963, 3957, 0, 4023, 3947,14231, 3959, 3983, 3976, 4000, 3982, 4021, 4005, 4010, 7761, 3995, 7736, 7718, 7688, 7683, 7681, 3995, 4062, 3996, 7666, 7569, 4008, 4000, 4014, 4004, 4016, 4020, 4031, 4035, 4020, 4042,14231, 4062, 4045, 4047, 4069,14231, 4066, 4060, 4055, 4069, 4061, 4056, 966, 7535, 2285, 0, 3938, 3987, 4050, 4051, 4056, 3941, 4074, 4065, 7521, 7483, 4075, 4066, 4110, 4071, 4068, 4066, 4072, 4076, 4070, 4087, 4079, 4090, 4081, 4108, 4105, 4107, 4115, 4114, 4104, 4125, 4113, 4114, 4126, 4129, 4130, 4115, 4130, 4123, 4117, 4134, 4128, 4167, 4131, 4145, 4130, 4151, 4157, 4168, 4160, 4176, 4165, 4158, 4171, 4167, 4176, 4171, 4175, 4178, 4178, 4194, 4187, 4185, 4182,14231, 7487, 7482, 7413, 4199, 4184, 4202, 4201, 4188, 4224, 7398, 7374, 4217, 4223, 4230, 4254, 4221, 4212, 4223, 4218, 4228, 4229, 4244, 4247, 4248, 4242, 4250, 4251, 4252, 4235, 4248, 4245, 4258, 4279, 4270, 4273, 4267, 4280, 4283, 4292, 4291, 4286, 4276, 4295,14231, 4280, 4289, 4292, 4282, 4315, 4345, 4359, 4282, 4302, 4306, 4306,14231, 4309, 4317, 4316, 4335, 4325, 4334, 4378, 2871, 7365, 4379, 4351, 7380, 7358, 4332, 4339, 4350, 4363, 4402, 4359, 4371,14231, 4362,14231, 4378,14231,14231,14231,14231, 7373, 4359, 4383, 4428, 7330, 4386, 4396, 4405, 4408, 4411, 4412, 4412, 4412, 4422, 4428, 4420, 4408, 4429, 4432, 4413, 4433, 4430, 4437, 4441, 4442, 4431, 7093, 3511, 7089, 0, 4394, 4442, 4380, 7019, 1989, 4434, 4435, 4506,14231, 4450, 4437, 4442, 4452, 4459, 4449, 4450, 4479, 4472, 4473, 4483, 4471, 4476, 4486, 4484, 4482, 4483, 4484, 4485, 4486, 4493, 4489, 4499, 4500, 4505, 4495, 4505, 4491, 4510, 4507, 4494, 4506, 4511, 4512, 4522, 4533, 4539, 4527, 4526, 4527, 4527, 4534, 4531, 4528, 4547, 4548, 4540, 4537, 4556, 4578, 4554, 4540, 4556,14231, 4549, 4550, 4538, 4551, 4547, 4550, 4577, 4560, 4562, 4573, 7033, 4579, 4580, 4595, 4585, 4586, 4583, 4598, 4641, 4617, 7018, 4601, 4606, 4593,14231, 4608, 4604, 14231, 4614, 4600,14231,14231,14231, 4595, 4605, 4620, 4627, 14231, 4619, 4629, 4620, 4633, 4636, 4648, 4639, 4638, 4640, 4657, 4658, 4659, 4657, 4662, 4653, 4669, 4677, 4657, 4671, 4675, 4674, 4679, 4695, 2584, 7012, 4702, 4688,14231, 4686, 4704, 4705, 4706, 4707, 4699, 6982, 4771, 6970, 4732, 7007, 4699, 0,14231, 6987, 4716, 4711, 4773, 4714, 4722, 4727, 4737, 4732, 6986, 4760,14231, 6985, 4753, 4791, 4770, 4771, 4771, 4776, 4773, 4778, 4779, 4775, 4792,14231, 4796, 4791, 4800, 4813, 4802, 4805, 4804, 4804, 4811, 4798, 4799, 4796, 4826, 4738, 6933, 6805, 6803, 4809, 4815, 0, 4743, 4813, 4818,14231, 4820, 4832, 4832, 4830, 4845, 4830, 4846, 4845, 4855, 4852, 4843, 4859, 4848, 4852, 4848, 4864, 4859, 4860, 4871, 4866, 4857, 4863, 4867, 4875, 4882, 4478, 4868, 4872, 4872, 4883, 4896, 4896, 4887, 4893, 4889, 4904, 4903, 4898, 4914, 4912, 4644, 4917, 4918, 4933, 4915, 4920, 4917,14231, 4914, 4910, 4961,14231, 4936, 4936, 4937, 4932, 4938, 4953, 4961, 4962, 4955, 6674, 4964,14231, 4964, 4971, 4957, 4959, 4973, 4961, 4962, 4980, 4967, 4974, 4979, 4976, 4982, 4970, 4975,14231, 5016, 4990, 4984, 4980,14231, 4985, 4992,14231, 14231,14231,14231, 4998, 6666, 4994, 4994, 5008, 5010,14231, 5023, 5017, 5018, 5027, 5019, 5026,14231,14231, 5030, 5066, 14231, 5035, 5029, 5030, 5037, 5031, 5035, 5044, 5078, 5073, 5037, 5052, 5071, 5057, 5069, 5075, 5085, 5069, 5077, 5149, 6696, 5111, 5112, 6672, 6649, 5113, 5097, 5100,14231, 5102, 5121, 5111, 5116, 5108, 5116,14231, 5118, 5140, 5137, 5195, 6631, 5138, 5130,14231, 5126, 5142, 5142, 5148, 5149, 5145, 5150, 5146, 5175, 5145, 5174, 5174, 5182, 5181, 5195, 5202, 5203, 5190, 5203, 5193, 5209, 5210, 5201, 2413, 6424, 5275, 6252, 5279,14231, 5203, 6300, 5214, 5223, 5235, 5249, 5250, 5257, 5250, 5251, 5247, 5255, 5261, 5246, 5258, 5253, 6207, 5187, 5262, 5269, 5269, 5251, 5252, 5261, 5267,14231, 5269, 5278, 5275, 5265, 5191, 5279, 5269, 5289, 5306, 5303, 5308, 5308, 5300, 5307, 5316, 5316, 5312, 5308, 5309, 5303, 5353, 5305, 5314, 5320, 5322, 5327, 5329, 5316, 5321, 5335, 5360, 14231, 5323, 5329, 5327, 5334, 5355, 5364, 5349, 5347, 5350, 5353, 5360, 5399, 5375, 5364, 5364, 5366, 5367, 5370, 5371, 5376, 5374, 5390, 5394, 5411, 5423, 5411, 5406, 5412, 5419, 5417, 5419, 5433, 5424, 5423, 5426, 5440, 5427, 5444,14231, 6048, 5445, 5449, 5443, 5450, 5984,14231, 5965,14231, 5449, 5448, 5459, 5450, 5442, 5448, 5468, 5471, 5461,14231,14231, 5458, 5471, 1035, 1169, 5467, 5470, 5501, 5502, 5512, 5493, 5494, 5489, 5490, 5501, 5492, 5506, 5501, 5514, 5503, 5238, 14231, 5519, 5529, 5537,14231,14231, 5513, 5502, 5501, 5507, 5515, 5520, 5515, 5525, 5515, 5538, 5597, 5576, 5535, 5536, 5571, 5566, 5563, 5565, 5580, 0, 5592, 5593, 5574, 5594, 5586, 5605, 5608, 5594,14231, 5610, 5611, 5612, 5613, 5615, 5603, 5609, 5620, 5624, 5620, 5615, 5634,14231, 5620, 5646, 5647, 5648, 5645, 5901, 5899, 5683, 1957, 3059, 5697, 5693, 5647,14231, 5653, 5648, 5655, 5666, 5753, 5662, 5659, 5663, 5663, 5670, 5666, 5681, 5674, 5671, 5672, 5408, 5720, 5690, 5693, 5682, 5683, 5695, 5694, 5694, 5702, 5693, 5703, 5770, 0, 5722, 5721, 5719, 5736, 5725, 5722, 5728, 5727, 5734, 5732, 0, 5746, 5747, 5753, 5736, 0, 5814, 5748, 5764, 5752, 5762, 5770, 5587, 5765, 5783, 5777,14231, 5793, 5781, 5392, 5817, 5783, 5790, 5786, 5803, 5808, 5791, 5807, 5797, 5795, 5813, 5808, 5815, 5807, 5819, 5817, 5826, 5823, 5815, 5810, 5824,14231,14231,14231,14231, 5817, 5832, 5839, 5821, 5836, 5845, 5847, 5847, 5853, 5842, 5735, 5860, 5851, 5865, 5852, 5867,14231,14231,14231,14231, 5864, 5852,14231, 5855, 5756,14231,14231, 5871, 5864,14231, 5867, 5862, 5879, 5865, 5877, 5874, 5881,14231, 1446, 1625,14231, 2438,14231, 5874, 5879, 5893, 5702, 5551, 5714, 5547, 5918,14231, 5883, 5896, 5899, 5890, 5906, 5909, 5905, 5903, 5910, 250, 5979, 5538, 5473, 5350, 5935, 5346, 5941, 5915, 5920, 5924, 5917, 5923, 5919, 5925,14231, 5938, 5921, 5927, 5990, 5935, 5945, 5968, 5975, 5960, 5961, 5976, 5984, 5981, 5990, 5989, 5977, 5990, 5977, 5980, 0, 5984, 5985, 5995,14231, 6003,14231,14231, 5983,14231, 5993, 5994, 5997, 5282, 5997, 6000, 6002, 5995, 6006, 6017, 6015,14231,14231, 6011,14231, 6030, 5247, 6073, 5134, 6077, 6009, 6043,14231, 6051, 6037, 6092, 5725, 6044, 6050, 6053, 6050, 6046, 6043, 6051, 5983, 6057, 6054, 6069, 6055, 6058, 6068, 6067, 6080, 0, 6120, 6135, 6081, 6068, 6086, 6086, 6105, 6096, 6115, 6117,14231, 6150, 6108, 5172, 6112, 6121, 6123, 6113, 6124, 6121, 6122, 6127, 6113, 6129, 0, 6121, 6127, 6123, 6138, 5171, 6129, 6126, 6171, 6139, 6129, 6199, 6146, 6146, 6148, 6152, 6162,14231,14231, 6172, 6165, 5084, 6162, 5078, 6196, 6168,14231, 6163, 6173, 6166, 6175, 6187, 6167, 5030, 6171, 6178, 6179, 6179, 6185, 6198, 14231, 6182, 6196, 6188, 5026, 6194, 6190, 6201,14231, 6194, 6196, 6203, 6197, 6203, 6229, 6215, 6216, 6220, 6222, 6237, 14231,14231, 6236, 6242, 6239,14231, 6237, 6241, 6242, 5043, 2570,14231, 6247, 6247, 4964, 4768, 4715, 6271, 4753, 6272, 6273, 6236, 6248, 6242, 6238, 6245, 6248, 6243,14231, 6242, 4649, 6319, 6307, 6293, 6330, 6339, 6350, 4640, 4407, 4316, 6299, 4337, 6301, 6315, 6268, 4323, 6284, 6294, 6302, 6293, 6296, 6309, 6314, 6308,14231, 6325, 6324, 6337, 6335, 6326, 6342, 6330, 6334, 6335, 6334, 6334, 6338, 6344, 6345, 6353, 6349, 6360, 6361, 6360, 6365, 6367, 6372, 6373, 4152, 6373, 4015, 6374, 6366, 6381, 6376, 6382, 6391, 6382, 6385, 3938, 6433,14231, 3887, 6437,14231, 6392, 6395, 6406, 6411, 0, 0, 6446, 6401, 6408, 6407, 6408, 6415, 6414, 6414, 6425, 6461, 6414, 6426,14231, 6436, 6420, 6436, 6441, 6429, 3931, 0, 0, 6424, 6440, 6439, 6450, 6454, 6454,14231, 6465, 6510, 6452,14231, 6458, 6452, 6447, 6472,14231, 6466, 6474, 6486, 6518, 6490, 6491, 6482, 6493, 6483,14231, 6486, 6496, 6531, 6500, 6499, 0, 6546, 1544, 6495, 3777, 6498, 6517, 6523, 6509, 6511, 6520, 6525, 6531,14231, 6523, 6538, 6528, 6537, 6543, 6541, 6543, 6547, 6537, 6532, 6547, 6544, 6545, 6556, 3772, 3771, 6539, 6560, 6551, 6561, 6567, 6551, 6569, 6575, 6582,14231, 6579, 6582, 6573, 6569, 6574, 6578,14231, 6586, 6586, 6581,14231, 6587, 6588, 6598, 6592, 6591, 6602, 6626, 6627,14231, 6596, 6612, 6609, 6613, 6614, 6617,14231, 3699, 6640, 6674, 6680, 3600, 6661, 6662, 6681, 6637, 6699, 6700, 6715, 652, 6731, 6740, 3628, 6642, 6658, 6651, 6648, 6664,14231, 6686, 6688, 6676, 6690, 6687, 6689, 6689, 6700, 6705, 6709, 6719, 6715, 6711, 6725, 6728, 6729, 6722,14231, 6738, 6734, 6739, 6740, 6727, 6746, 6745, 6731, 6733, 6752, 6746, 6758, 6747,14231, 6746, 6761, 6751, 6769, 6767, 6776, 14231, 6783, 6772,14231, 3627, 0, 6773, 6782, 6777, 6771, 6787, 6777, 6791, 6782, 0, 0, 6790, 6793, 6781, 6802, 6802, 6786, 6806,14231, 3594, 6804, 6795, 6806, 6662, 6868, 14231, 6803, 6793, 0, 6874, 6817, 6813, 6846, 6846, 6811, 6840, 6837, 6823, 6890, 6848, 6852, 6837, 6854, 6836, 6859, 6865, 6859, 0, 0, 6862, 6857, 6864, 1551, 3534, 1922, 6869, 6858, 5946, 6859, 3519, 6895, 6885, 6887, 6875, 6879, 6897, 6890, 6900, 3514, 3456, 6893, 6903, 6897, 6901, 6902, 6926, 6909, 6911, 6895, 6911, 6904, 6900, 6909, 6922, 6909, 6916, 6911,14231, 6918, 6911, 6927, 6928, 6945, 6930, 6936, 6934, 6941, 6941, 6958, 6959, 6960, 6950, 6952, 6963, 6953, 6986, 6965, 6953, 6953, 6948, 3401, 6976, 7030, 7004, 749, 7039, 7045, 7051, 7060, 3403, 3305, 7026, 7052, 7057, 7059, 5393, 7092, 942, 7098, 7113, 7117, 7128, 7058, 7129, 7149, 7022, 3288, 3223, 6985,14231, 7015, 7028, 7035, 7045, 7059, 7074, 7095, 7089, 3179, 7105, 7104,14231, 7112,14231, 7112, 14231, 7113, 7108, 7118,14231, 7124, 7117, 7130, 7129, 7130, 7130, 7122, 7138, 7129, 7136, 7139,14231,14231,14231, 7149, 7140, 7150,14231, 7147, 7150, 7163, 7149, 7147, 7170,14231, 7154, 3126, 7160, 7160, 7173, 7159, 7163, 7080, 7166,14231, 7173, 7174, 7175, 7088, 7233,14231,14231, 7175, 7185, 0, 7194, 7195, 7189, 7185, 7200, 7199, 7217, 7201, 7252, 7225, 0, 7264, 7199, 7202, 7204, 7277, 7219, 7208, 7231, 7228, 3121, 7231, 7246, 7239, 3061, 2033, 3073, 7240, 7246,14231, 7272, 7241,14231, 7250, 7251, 7242, 7251, 7258, 7269, 7274, 7264, 7279, 7276, 7272, 7267, 7277, 7273, 7275,14231, 7275, 7271, 7291, 7278, 7279, 7285, 7296, 7292, 7323, 7302, 7329, 7299,14231, 7300, 7306, 7315,14231, 7313, 3006, 7327, 7332, 7322,14231, 7322, 7335, 7339, 7326, 7339, 3008, 7323, 7324, 7346,14231, 7320, 7345, 1445, 7404, 2956, 7368, 7367, 7355, 7416, 7422, 7434, 7435, 2981, 7381, 7401, 2631, 7455, 7402, 7470, 7481,14231, 2977, 7375, 7377, 7391, 2909, 7415, 2893, 7417, 2863, 7418, 7415, 7435, 7425,14231, 7437, 7424, 7440, 7456, 7450, 7445, 7447, 7451,14231, 7453, 7455, 7474, 7457, 14231, 7477, 7459, 7477, 7468, 7464, 7463, 7484, 7479, 7476, 14231, 7485, 7490, 7480, 7489, 7486, 7549, 7499, 7554,14231, 7500, 0, 7555, 0, 7559, 7507, 7513, 2829, 7526, 7534, 7534, 7533, 7536, 7544, 7548, 7543, 7545, 7552, 7595, 7562, 7549, 7568, 2733, 7562, 7565, 7555, 7584, 7560, 7572, 7588, 7590,14231, 7589, 7598, 7599, 2900, 7585, 7580,14231, 7598, 7588, 7603,14231, 7596, 7607,14231, 7595, 7608, 7609, 7611, 7604, 7609, 2615, 7615, 7615, 7615, 7612, 2606, 7617, 7609, 7621, 7611,14231, 7623,14231, 7623,14231,14231, 7635,14231, 2473, 7664, 7642,14231, 7647,14231, 7640, 7654, 7659, 7651, 7647, 7664, 7654,14231, 7651, 7669, 7669, 7655, 7665, 7657, 7732, 7694, 5562, 7733, 7747, 7748, 7729, 7763, 7767, 2828, 7786, 7801, 7653, 7679, 7682, 7725, 7713, 2460, 7729, 7725, 7738,14231, 7731, 7737, 7762, 7766, 7768, 7771,14231,14231, 7779, 7781, 7768, 7768, 7585, 7784, 7787,14231, 7824, 7778, 7788, 7796, 7787, 7783, 7795, 7794, 7792, 7847, 7798, 7873, 7819, 2432, 7808, 7839, 0, 7812, 7821, 7822, 7819, 7838, 7840, 7850, 7843, 7845, 7854, 7899, 7708, 7864, 7865,14231, 7858, 7869, 7871, 0, 7907, 7859, 7866, 7879, 7935, 7877, 7937, 7879, 7894, 7900, 7887, 7427, 7894, 7897, 7897, 7892, 2351, 7898, 7913, 7915, 7908, 7916, 2329,14231, 2298, 7908, 7919, 7922, 7913,14231, 2289, 7909, 7929, 7931, 7941,14231, 7920,14231, 7920, 7933, 7932, 7929, 7935, 7937, 7945, 7955, 2300, 7954, 7967, 7956, 7968, 7972, 7967, 8008, 7993, 8031, 7994, 8037, 8046, 7957, 7995, 7999, 7998, 8008, 2292,14231, 7990,14231, 8024,14231, 8021, 8013, 8015, 8025, 8029,14231, 8022, 8088, 8016, 8035, 8085, 8096, 8021, 8038, 8024, 8025, 8026, 8035, 8099, 8095, 8095, 8123, 8106,14231, 8105, 8167, 8119, 0, 8124, 8107, 8114, 8136, 8121, 8131, 8139, 8136, 8141,14231, 8077, 8084, 8156, 8133, 8128, 8157, 8134, 8146, 8160, 8158, 8195, 8207,14231, 8157,14231, 8175,14231, 8173, 14231, 7997, 2234, 8171, 8179, 8170, 8208, 8177, 8172, 8202, 8169, 8175, 8174, 8203, 8203, 8217, 8215, 8211, 8212, 8221, 8202, 8227, 8222, 8222,14231, 8217, 8223, 8225, 8220, 8227, 8253, 8236, 8236, 8239, 2234, 8236, 8239, 8301, 8258, 8261, 8265, 2216, 8242,14231, 8271,14231,14231,14231, 8274,14231, 8259, 8321, 8347, 8273, 8344, 8260, 8271, 8283, 8277, 8280, 8290, 8288,14231, 8286, 8293,14231, 8367, 8362, 8363, 8348, 8353, 8364, 8399, 8368, 8356, 8356, 8357, 0, 8309, 8310, 8358, 8376, 8377, 8408, 8376, 8366, 8375, 2189, 8414, 8427, 8440, 8362,14231,14231,14231, 8421, 8389, 8393, 8395,14231, 8394, 8413, 8422, 8439, 8422, 8440, 2019, 8428, 1998,14231, 8429,14231, 8443, 8444, 8436, 8435, 8439,14231, 2050, 8447, 8442, 3018, 8450, 8444, 8486, 8445, 8462, 8478, 0, 1830, 8479, 8481, 8496, 8498, 1759, 8498, 8486, 8416, 8524, 8544, 8570,14231, 8502, 8505, 8509, 8487, 8520, 8506, 8534, 8488, 8528, 8525, 8527,14231, 8530, 8533, 8598, 8552, 8537, 8538, 8606, 8533, 1709, 8492, 0, 1652, 8533, 0, 8543, 8544, 3980, 8577, 8577, 8586, 8624, 8650, 8659,14231, 8579, 8593, 8588,14231, 8598, 1579, 8600, 8604, 8588, 8594, 8623, 8625, 8642, 8656, 8641, 8641, 8642, 8655, 8658, 8660,14231, 1374, 8660, 3289,14231, 3975, 8661, 8668, 8658, 8662, 8663, 0, 0, 8681,14231, 8666, 8687,14231,14231, 8728, 8737, 8746, 8696, 8652, 8702, 8773, 8726, 0, 8698, 8747, 8703, 8705, 8738, 8725, 8732, 8764, 8751, 8760,14231, 8801, 8771, 8761, 1313, 1065, 8770, 8795, 8040, 1008, 8804, 8762, 8780, 8780, 8828, 8771, 8779, 8796,14231, 8801, 8800, 8808, 8806, 8807, 8819, 8821, 8815, 8820, 8823, 8625, 8717, 8819,14231, 8822, 14231, 989, 3995,14231, 5244, 8841, 914, 8825, 0, 8820, 14231, 8828, 8875, 8903, 0, 0, 0,14231, 8828, 8887, 8832, 8900, 8909, 0, 0, 8910, 0, 8866, 8864, 8883, 8888, 8893, 8893, 8895, 8923, 8885, 8901,14231,14231, 8903, 8904, 8890, 8909, 879, 8876, 876, 8912, 8902, 8904, 8904, 8905, 8908, 8915, 8926, 8936,14231, 8933, 8940, 8925,14231, 8924, 8928,14231,14231, 8939, 8719,14231, 5561,14231, 8930, 14231, 8939, 8957,14231, 830, 8935, 0, 8985, 0, 8981, 0, 743, 8942, 8954, 8950, 8956, 8966, 8964, 8968, 8974, 9013, 8893, 9015, 8979, 8988, 9003, 8981, 8988,14231, 8993, 8994,14231, 8997, 8994, 8985, 8996, 8997, 8994, 9001, 670, 14231,14231, 9007, 8999, 9014, 9018,14231, 9001, 602, 0, 9025, 447, 9027,14231, 9002, 9007,14231, 9020, 9025, 9021, 9027, 9022, 9067, 9048, 9081, 9094, 9095, 9100, 9041, 9042, 9055, 9049, 9068,14231, 436, 9067, 9064, 9068, 9074, 9067, 9080, 461, 367, 9075, 9114,14231, 330, 9107, 366, 9079, 9076, 9082, 9079,14231, 9073, 9080, 0, 9123, 9085, 9140, 0, 9151, 0, 9152, 9158,14231, 9089,14231, 9095, 9108, 9108,14231, 9117, 9122, 9136, 9119, 9138, 9133, 0, 315, 9172, 9123, 9130, 9176, 9126, 9143, 9181,14231, 9150, 262, 254, 9186, 0, 9195, 0,14231, 9158, 9158, 9154, 9161, 9169, 9159, 9171, 9167, 9162, 9166, 9173, 0, 0, 143, 9216, 0, 9175, 9236, 9220, 9174, 9246, 9195,14231,14231, 138, 109, 9213, 9214, 9208,14231,14231, 9198,14231, 9229, 9230, 9234, 9237, 0, 43,14231, 9263, 9289, 9226, 9298, 9250,14231,14231, 9264, 9266, 9267,14231, 6, 9258, 9270, 14231,14231, 9315, 9341,14231,14231,14231, 9292,14231,14231, 9300, 9328, 9301, 9323, 9320, 9313,14231, 9335, 9335, 9337, 14231,14231, 9399, 9417, 9435, 9453, 9471, 9489, 9507, 9525, 9543, 9561, 9579, 9597, 9615, 9633, 9651, 9669, 9687, 9705, 9723, 9741, 9759, 9777, 9795, 9813, 9831, 9849, 9867, 9885, 9903, 9921, 9939, 9957, 9975, 9993,10011,10029,10047,10065, 10083,10101,10119,10137,10155,10173,10191,10209,10227,10245, 10263,10281,10299,10317,10335,10353,10371,10389,10407,10425, 10443,10460,10478,10496,10514,10532,10550,10567,10585,10603, 10621,10639,10657,10675,10693,10711,10729,10747,10765,10783, 10801,10819,10837,10855,10873,10891,10909,10927,10945,10963, 10981,10998,11016,11034,11052,11070,11088,11106,11124,11141, 11159,11177,11195,11213,11231,11249,11267,11285,11303,11321, 11339,11357,11375,11393,11411,11429,11447,11465,11482,11500, 11518,11536,11554,11572,11590,11607,11625,11643,11661,11679, 11697,11715,11733,11751,11769,11787,11805,11823,11841,11859, 11877,11895,11913,11930,11948,11966,11984,12002,12020,12038, 12056,12074,12092,12110,12121,12135,12153,12161,12177,12194, 12198,12214,12232,12242,12258,12276,12294,12312,12329,12345, 12363,12381,12399,12417,12435,12452,12468,12486,12495,12511, 12529,12547,12565,12582,12590,12605,12621,12638,12656,12674, 12692,12710,12728,12746,12764,12782,12800,12818,12828,12836, 12851,12866,12877,12885,12893,12909,12925,12941,12958,12976, 12994,13012,13030,13048,13066,13084,13102,13120,13138,13156, 13174,13192,13210,13228,13241,13249,13257,13265,13276,13292, 13308,13316,13324,13340,13358,13376,13394,13412,13430,13448, 13466,13484,13502,13520,13538,13554,13570,13588,13606,13616, 13632,13648,13661,13679,13696,13713,13730,13741,13757,13774, 13791,13803,13819,13837,13854,13872,13889,13907,13924,13940, 13957,13967,13983,14000,14018,14035,14053,14071,14088,14105, 14123,14135,14151,14168,14185,14196,14212 } ; static const flex_int16_t yy_def[4228] = { 0, 3943, 3943, 3942, 3, 3944, 3944, 3, 3, 3945, 3945, 3945, 3945, 3946, 3946, 3947, 3947, 3948, 3948, 3949, 3949, 3950, 3950, 3944, 3944, 3944, 3944, 3951, 3951, 3952, 3952, 3952, 3952, 3953, 3953, 3954, 3954, 3942, 37, 37, 37, 3944, 3944, 3944, 3944, 3944, 3944, 3955, 3955, 3956, 3956, 3957, 3957, 3958, 3958, 3959, 3959, 3960, 3960, 3961, 3961, 3944, 3944, 3962, 3962, 3963, 3963, 3961, 3961, 3944, 3944, 3964, 3964, 3965, 3965, 3942, 3942, 3942, 3942, 3942, 3942, 3966, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 131, 3942, 3942, 3942, 3967, 3967, 3967, 3942, 3942, 3967, 3968, 3968, 3968, 3942, 3969, 3968, 3970, 3970, 3970, 3942, 3971, 3942, 3970, 3972, 3972, 3942, 3972, 3942, 3942, 3973, 3942, 3942, 3942, 3973, 3974, 3973, 3975, 3975, 3975, 3942, 3976, 3975, 3942, 3977, 3942, 3975, 3978, 3978, 3978, 3942, 3979, 3978, 3980, 3980, 3980, 3942, 3942, 3980, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3981, 3981, 3942, 3942, 3981, 3982, 3982, 3942, 3983, 3982, 3942, 3984, 3985, 3986, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3987, 3942, 3988, 3987, 3942, 3942, 3942, 3989, 3942, 3990, 3942, 3989, 3942, 3942, 3942, 3991, 3991, 3991, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3992, 3942, 3992, 3992, 3992, 3942, 3942, 3992, 3992, 3992, 3993, 3942, 3994, 3993, 3993, 3993, 3942, 3993, 3993, 3993, 3995, 3942, 3996, 3995, 3995, 3995, 3942, 3995, 3995, 3995, 3997, 3997, 3942, 3997, 3942, 3997, 3998, 3942, 3998, 3942, 3999, 4000, 4001, 4000, 3998, 4002, 3942, 4003, 4002, 4002, 4002, 4002, 3942, 4002, 3942, 4004, 4005, 4006, 4005, 4007, 4005, 3942, 3942, 4002, 4002, 4008, 3942, 4009, 4008, 4008, 4008, 3942, 4008, 4008, 4008, 4010, 3942, 4010, 4010, 3942, 4010, 3942, 3942, 4010, 4010, 4010, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 4011, 3942, 4011, 3942, 3942, 4011, 4012, 3942, 4013, 4012, 3942, 4012, 4014, 4015, 4016, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 4017, 3942, 4018, 4017, 3942, 4017, 3942, 4019, 3942, 4020, 4019, 3942, 4019, 4021, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 4022, 3942, 3942, 4022, 4022, 4023, 4024, 3942, 3942, 4024, 4024, 4025, 4026, 3942, 3942, 4026, 4026, 3942, 3942, 4027, 4028, 4027, 4029, 4030, 4031, 4031, 4031, 4030, 4032, 4033, 3942, 3942, 4034, 4035, 4034, 4036, 4034, 4037, 4038, 4038, 4038, 4039, 4039, 4039, 4040, 4038, 4033, 4033, 4041, 4042, 3942, 3942, 4042, 4042, 3942, 4043, 3942, 3942, 4043, 3942, 4043, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 4044, 3942, 3942, 4045, 4046, 3942, 3942, 3942, 3942, 3942, 3942, 4047, 4048, 3942, 3942, 4049, 4050, 3942, 3942, 4051, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 4052, 3942, 4052, 4053, 3942, 4053, 4054, 3942, 4054, 3942, 4055, 4056, 4056, 4056, 4057, 4055, 4057, 4057, 3942, 4058, 3942, 3942, 4058, 3942, 4033, 3942, 4059, 4059, 4059, 4060, 4061, 4060, 4060, 4062, 4063, 4059, 4064, 4061, 4062, 4061, 4061, 4033, 4065, 4033, 3942, 4065, 3942, 4065, 4065, 4066, 4033, 4067, 3942, 4067, 4068, 3942, 4068, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 4069, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 4070, 3942, 4071, 3942, 3942, 3942, 3942, 3942, 4072, 3942, 4073, 3942, 4074, 4074, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 4075, 3942, 4076, 3942, 4077, 4078, 4079, 4080, 3942, 4059, 4081, 4081, 4081, 4062, 4059, 4061, 4062, 4061, 4082, 4061, 4083, 4084, 4085, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 4086, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 4069, 4087, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 4088, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 4089, 3942, 3942, 3942, 3942, 4090, 3942, 4091, 3942, 4092, 4092, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 4078, 4079, 4078, 4079, 4081, 4061, 4081, 4062, 4081, 4062, 4093, 4062, 4062, 4061, 4083, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 4086, 4094, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 4095, 3942, 3942, 4087, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 4088, 3942, 4088, 4096, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 4092, 4092, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 4081, 4062, 4082, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 4094, 4097, 4086, 4094, 3942, 3942, 3942, 3942, 3942, 3942, 4098, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 4088, 3942, 4096, 3942, 3942, 3942, 4092, 4099, 3942, 3942, 4100, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 4062, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 4086, 4094, 3942, 4097, 4086, 3942, 4101, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 4088, 3942, 4092, 4102, 4103, 3942, 3942, 4104, 4100, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 4105, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 4094, 3942, 4097, 4097, 3942, 4101, 4106, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 4107, 4102, 4102, 4103, 4103, 3942, 3942, 4104, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 4108, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 4109, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 4105, 4110, 4105, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 4111, 3942, 4106, 4112, 4106, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 4113, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 4114, 4115, 4102, 3942, 4102, 4103, 4103, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 4116, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 4108, 4117, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 4118, 3942, 3942, 3942, 3942, 4119, 4109, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 4105, 4110, 3942, 4110, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 4111, 4120, 4121, 3942, 4106, 4112, 3942, 4112, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 4113, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 4114, 4122, 4115, 4123, 3942, 3942, 3942, 3942, 3942, 4124, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 4125, 4116, 4126, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 4117, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 4118, 3942, 3942, 3942, 3942, 4119, 3942, 3942, 3942, 3942, 3942, 4127, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 4110, 3942, 4105, 4110, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 4128, 4120, 4129, 4111, 4130, 4131, 4120, 4132, 3942, 3942, 4133, 3942, 4134, 4133, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 4135, 4136, 3942, 4137, 4138, 3942, 3942, 3942, 3942, 3942, 4139, 4140, 4141, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 4142, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 4143, 4144, 4145, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 4146, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 4147, 3942, 3942, 4148, 4148, 4149, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 4150, 4151, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 4152, 4153, 4154, 4155, 3942, 4156, 4157, 4153, 4158, 4159, 4160, 4161, 4152, 4154, 4161, 4162, 4163, 4164, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 4165, 4166, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 4167, 4168, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 4169, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 4170, 4170, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 4171, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 4172, 4173, 3942, 3942, 3942, 4174, 3942, 4174, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 4175, 3942, 3942, 3942, 3942, 3942, 3942, 4154, 4176, 4152, 4177, 4154, 4154, 4178, 3942, 3942, 4176, 4176, 4179, 4179, 4180, 4181, 4162, 4181, 4181, 4182, 4182, 4152, 4183, 4183, 4184, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 4167, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 4185, 4186, 3942, 3942, 3942, 3942, 4187, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 4188, 4171, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 4172, 3942, 3942, 3942, 3942, 4174, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 4152, 4154, 3942, 4176, 4152, 4180, 4181, 4177, 4183, 4154, 3942, 4179, 4176, 4162, 4181, 4162, 4189, 4181, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 4185, 4185, 4190, 4186, 3942, 3942, 4187, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 4188, 3942, 3942, 3942, 4191, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 4174, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 4154, 4176, 4180, 4177, 4177, 4183, 4179, 4181, 4189, 4162, 4181, 4189, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 4192, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 4190, 3942, 3942, 4193, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 4191, 4191, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 4154, 4176, 4189, 4162, 4181, 4189, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 4193, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 4194, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 4195, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 4189, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 4194, 4194, 4196, 4197, 3942, 3942, 3942, 3942, 3942, 3942, 4195, 4195, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 4198, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 4196, 4196, 4199, 4197, 4197, 4200, 3942, 3942, 4201, 3942, 3942, 3942, 4195, 4195, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 4198, 4202, 3942, 3942, 3942, 3942, 3942, 3942, 4203, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 4204, 3942, 4205, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 4199, 4200, 3942, 3942, 4201, 3942, 4201, 3942, 3942, 3942, 4195, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 4202, 3942, 3942, 3942, 4203, 4203, 4206, 4207, 4208, 3942, 3942, 4209, 3942, 3942, 3942, 4204, 4210, 4205, 4211, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 4201, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 4207, 3942, 4212, 4209, 4213, 4214, 4210, 4211, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 4201, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 4212, 4213, 4214, 3942, 4214, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 4215, 3942, 4216, 4217, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 4214, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 4215, 4215, 3942, 4216, 4218, 4217, 4219, 4220, 4221, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 4222, 3942, 4223, 4214, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 4218, 4219, 4220, 4224, 4221, 4225, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 4222, 4226, 4223, 4223, 4227, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 4224, 4225, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 4226, 4227, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 0, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942 } ; static const flex_int16_t yy_nxt[14319] = { 0, 3942, 77, 78, 79, 77, 118, 80, 81, 118, 118, 283, 284, 118, 3942, 82, 119, 120, 121, 119, 122, 123, 3942, 129, 98, 124, 129, 130, 98, 125, 1390, 83, 135, 84, 85, 3929, 269, 136, 86, 87, 88, 315, 316, 98, 89, 90, 91, 135, 92, 93, 3922, 131, 136, 94, 1108, 138, 139, 95, 138, 83, 873, 84, 85, 140, 269, 141, 86, 87, 88, 256, 270, 126, 89, 90, 91, 1391, 92, 93, 132, 283, 284, 94, 77, 78, 79, 77, 257, 80, 81, 129, 98, 256, 129, 130, 271, 82, 157, 158, 270, 157, 127, 96, 272, 129, 98, 233, 129, 130, 257, 234, 142, 83, 235, 84, 85, 273, 3913, 131, 86, 87, 88, 274, 271, 1008, 89, 90, 91, 275, 92, 93, 272, 133, 280, 94, 526, 318, 527, 95, 318, 83, 1009, 84, 85, 273, 132, 3912, 86, 87, 88, 274, 3942, 159, 89, 90, 91, 275, 92, 93, 132, 236, 280, 94, 96, 97, 98, 96, 97, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 99, 96, 96, 100, 101, 102, 103, 104, 105, 96, 96, 96, 106, 96, 107, 108, 109, 110, 111, 112, 113, 96, 114, 115, 96, 96, 116, 96, 99, 96, 96, 100, 101, 102, 103, 104, 105, 96, 96, 96, 106, 96, 107, 108, 109, 110, 111, 112, 113, 96, 114, 115, 96, 96, 96, 96, 117, 119, 120, 121, 119, 122, 123, 281, 129, 98, 124, 129, 130, 3890, 125, 138, 139, 2290, 138, 144, 145, 3889, 144, 140, 146, 141, 228, 147, 229, 144, 145, 2491, 144, 230, 146, 281, 133, 147, 150, 151, 347, 150, 347, 152, 150, 151, 153, 150, 526, 152, 527, 154, 153, 228, 282, 229, 126, 154, 157, 158, 230, 157, 267, 132, 489, 267, 569, 276, 180, 181, 142, 180, 289, 182, 148, 277, 183, 569, 163, 164, 231, 163, 282, 165, 148, 127, 96, 348, 166, 186, 187, 163, 188, 155, 167, 276, 3879, 189, 278, 155, 289, 163, 164, 277, 163, 163, 165, 231, 290, 268, 347, 166, 347, 159, 163, 279, 645, 167, 490, 170, 171, 295, 170, 184, 172, 3783, 278, 173, 163, 174, 301, 357, 175, 168, 358, 176, 290, 170, 171, 3819, 170, 302, 172, 279, 190, 173, 177, 174, 3849, 295, 175, 186, 187, 176, 188, 646, 168, 348, 301, 189, 474, 475, 163, 163, 177, 497, 498, 170, 171, 302, 170, 303, 172, 224, 178, 173, 224, 174, 225, 224, 175, 359, 224, 176, 225, 163, 163, 252, 170, 171, 253, 170, 178, 172, 177, 252, 173, 285, 174, 303, 285, 175, 180, 181, 176, 180, 190, 182, 313, 252, 183, 214, 215, 216, 217, 177, 191, 314, 214, 215, 216, 217, 178, 191, 191, 296, 351, 297, 226, 441, 487, 191, 441, 487, 226, 488, 313, 254, 438, 439, 440, 438, 3848, 178, 502, 314, 3841, 502, 503, 504, 283, 284, 286, 296, 352, 297, 3819, 184, 191, 192, 193, 194, 192, 191, 195, 191, 191, 191, 191, 191, 191, 191, 196, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 197, 198, 199, 200, 201, 191, 191, 191, 202, 191, 191, 203, 204, 205, 206, 207, 191, 208, 209, 210, 191, 211, 191, 212, 191, 191, 213, 191, 197, 198, 199, 200, 201, 191, 191, 191, 202, 191, 191, 203, 204, 205, 206, 207, 191, 208, 209, 210, 191, 211, 191, 212, 191, 191, 191, 191, 191, 218, 219, 220, 221, 359, 222, 218, 219, 220, 221, 369, 222, 218, 219, 220, 221, 3816, 222, 218, 219, 220, 221, 233, 222, 291, 252, 234, 242, 253, 235, 315, 316, 352, 252, 259, 242, 292, 260, 352, 261, 327, 259, 259, 327, 260, 557, 261, 252, 557, 259, 590, 318, 291, 590, 318, 223, 259, 422, 243, 242, 244, 223, 422, 259, 292, 395, 243, 223, 244, 245, 246, 247, 248, 223, 2290, 254, 236, 245, 246, 247, 248, 242, 263, 264, 262, 263, 243, 619, 244, 414, 243, 262, 244, 400, 243, 265, 244, 245, 246, 247, 248, 245, 246, 247, 248, 245, 246, 247, 248, 423, 287, 489, 243, 288, 244, 293, 2878, 400, 243, 298, 244, 306, 294, 245, 246, 247, 248, 428, 304, 245, 246, 247, 248, 299, 620, 3810, 307, 265, 287, 300, 243, 288, 244, 293, 305, 308, 407, 298, 408, 306, 294, 245, 246, 247, 248, 400, 304, 3784, 310, 584, 309, 299, 311, 312, 307, 490, 357, 300, 446, 358, 584, 2290, 305, 308, 319, 320, 321, 319, 452, 322, 323, 320, 321, 323, 412, 324, 310, 413, 309, 398, 311, 312, 325, 321, 321, 325, 446, 326, 323, 320, 321, 323, 447, 324, 455, 342, 452, 349, 343, 448, 349, 353, 354, 3039, 422, 347, 359, 347, 347, 422, 347, 449, 344, 345, 364, 365, 474, 475, 357, 320, 447, 358, 455, 342, 414, 320, 343, 448, 360, 377, 378, 360, 377, 357, 3777, 412, 358, 321, 413, 449, 344, 345, 459, 320, 328, 329, 330, 331, 332, 333, 465, 334, 350, 472, 335, 355, 423, 662, 336, 367, 337, 338, 368, 339, 340, 341, 285, 367, 363, 285, 459, 873, 328, 329, 330, 331, 332, 333, 465, 334, 3637, 472, 335, 361, 379, 414, 336, 367, 337, 338, 368, 339, 340, 341, 370, 367, 663, 370, 741, 367, 377, 378, 368, 377, 374, 375, 450, 367, 367, 369, 874, 368, 377, 380, 381, 377, 367, 383, 383, 451, 383, 427, 383, 383, 383, 473, 383, 347, 383, 347, 383, 645, 637, 3706, 450, 637, 383, 369, 392, 386, 3731, 393, 470, 394, 383, 471, 392, 451, 441, 371, 383, 441, 742, 473, 2290, 379, 383, 388, 373, 383, 392, 383, 869, 383, 383, 508, 383, 379, 383, 388, 646, 453, 384, 471, 348, 1567, 383, 424, 384, 396, 425, 454, 396, 383, 392, 422, 460, 393, 395, 394, 383, 3727, 392, 509, 461, 392, 3050, 514, 393, 453, 394, 383, 383, 392, 662, 625, 392, 383, 383, 454, 499, 389, 668, 499, 460, 500, 392, 392, 390, 393, 1568, 394, 461, 391, 392, 509, 391, 401, 392, 520, 871, 403, 426, 404, 397, 748, 405, 2266, 392, 2267, 383, 388, 409, 410, 569, 395, 392, 383, 383, 393, 392, 394, 626, 415, 392, 569, 415, 520, 412, 669, 521, 413, 3706, 419, 420, 501, 395, 412, 392, 3699, 413, 659, 429, 430, 422, 497, 498, 442, 406, 422, 432, 433, 434, 432, 456, 522, 443, 466, 521, 749, 444, 467, 462, 435, 523, 445, 399, 468, 506, 463, 744, 745, 457, 506, 458, 442, 469, 391, 416, 464, 503, 504, 456, 522, 443, 466, 506, 418, 444, 467, 462, 506, 523, 445, 506, 468, 431, 463, 512, 506, 457, 513, 458, 512, 469, 436, 513, 464, 476, 477, 478, 476, 480, 477, 478, 481, 482, 483, 484, 482, 507, 485, 482, 483, 484, 491, 524, 485, 492, 493, 494, 492, 512, 495, 525, 513, 529, 531, 507, 530, 538, 2268, 529, 2269, 529, 530, 510, 542, 514, 674, 529, 543, 536, 514, 524, 537, 267, 536, 529, 267, 536, 544, 525, 436, 529, 534, 545, 436, 534, 263, 264, 486, 263, 536, 536, 542, 537, 486, 536, 543, 546, 536, 516, 496, 547, 548, 531, 549, 550, 544, 551, 552, 533, 553, 545, 536, 675, 556, 285, 554, 559, 285, 538, 268, 560, 561, 562, 563, 546, 564, 565, 566, 547, 548, 555, 549, 550, 567, 551, 552, 568, 553, 570, 540, 265, 556, 571, 554, 559, 572, 573, 574, 560, 561, 562, 563, 575, 564, 565, 566, 576, 579, 555, 582, 577, 567, 578, 583, 568, 585, 570, 580, 581, 286, 571, 586, 587, 572, 573, 574, 588, 589, 323, 327, 575, 323, 327, 324, 576, 579, 753, 582, 577, 325, 578, 583, 325, 585, 326, 580, 581, 593, 594, 586, 587, 595, 598, 3698, 588, 589, 319, 320, 321, 319, 888, 322, 323, 320, 321, 323, 604, 324, 325, 321, 321, 325, 599, 326, 596, 593, 594, 597, 606, 595, 598, 605, 607, 754, 265, 610, 600, 601, 602, 1326, 603, 611, 612, 614, 604, 1115, 613, 615, 617, 608, 599, 682, 596, 618, 609, 597, 606, 613, 987, 605, 607, 320, 3661, 610, 600, 601, 602, 320, 603, 611, 612, 614, 616, 321, 613, 615, 617, 608, 890, 682, 349, 618, 609, 349, 631, 613, 600, 601, 347, 367, 347, 353, 354, 621, 623, 355, 624, 623, 619, 347, 616, 347, 347, 347, 347, 347, 357, 363, 360, 358, 627, 360, 988, 357, 600, 601, 358, 364, 365, 357, 629, 757, 358, 629, 625, 357, 630, 683, 358, 367, 357, 632, 368, 358, 2471, 350, 2472, 367, 373, 370, 622, 633, 370, 2290, 367, 620, 355, 368, 441, 348, 348, 441, 367, 374, 375, 683, 359, 628, 367, 635, 631, 368, 635, 361, 367, 367, 367, 368, 758, 363, 636, 626, 367, 684, 367, 359, 584, 368, 412, 369, 359, 413, 367, 377, 378, 3039, 377, 584, 634, 377, 378, 685, 377, 650, 371, 377, 380, 381, 377, 377, 638, 684, 377, 383, 383, 686, 383, 632, 373, 873, 383, 383, 399, 383, 369, 383, 383, 392, 733, 685, 648, 733, 394, 383, 369, 392, 383, 640, 414, 383, 383, 383, 687, 686, 2799, 419, 420, 383, 379, 640, 651, 2975, 668, 688, 379, 735, 383, 388, 735, 383, 379, 383, 487, 383, 379, 487, 422, 488, 390, 388, 687, 422, 643, 383, 388, 384, 383, 649, 382, 383, 383, 688, 383, 383, 383, 392, 388, 1320, 393, 643, 394, 641, 383, 392, 2800, 429, 430, 383, 383, 669, 383, 2976, 674, 431, 383, 383, 383, 392, 676, 392, 399, 389, 393, 399, 394, 399, 689, 392, 423, 396, 642, 640, 396, 2266, 392, 2267, 660, 393, 647, 394, 3646, 392, 392, 418, 390, 395, 670, 399, 409, 410, 383, 388, 392, 805, 689, 648, 392, 394, 392, 675, 392, 393, 3942, 394, 805, 677, 392, 383, 388, 395, 315, 316, 431, 383, 383, 406, 285, 676, 391, 285, 392, 391, 391, 392, 397, 391, 653, 392, 654, 808, 403, 655, 404, 671, 412, 405, 487, 413, 658, 487, 808, 488, 649, 661, 399, 392, 693, 673, 399, 392, 869, 412, 391, 391, 413, 391, 391, 392, 392, 3942, 403, 664, 404, 404, 677, 405, 405, 415, 658, 658, 415, 427, 412, 656, 693, 413, 1100, 406, 666, 392, 391, 666, 422, 392, 418, 667, 393, 422, 394, 392, 672, 392, 393, 672, 394, 412, 424, 392, 413, 425, 743, 414, 657, 743, 422, 392, 391, 406, 665, 678, 1115, 392, 679, 680, 2515, 422, 697, 422, 871, 698, 422, 699, 416, 620, 694, 432, 433, 434, 432, 438, 439, 440, 438, 395, 431, 695, 391, 391, 435, 395, 690, 700, 691, 701, 697, 414, 692, 698, 702, 699, 704, 426, 694, 705, 707, 706, 708, 710, 712, 703, 713, 715, 714, 695, 423, 716, 709, 423, 690, 700, 691, 701, 730, 731, 692, 711, 702, 887, 704, 888, 436, 705, 707, 706, 708, 710, 712, 703, 713, 715, 714, 732, 736, 716, 709, 736, 502, 737, 1115, 502, 730, 731, 3601, 711, 717, 718, 739, 719, 506, 739, 720, 740, 721, 506, 722, 723, 724, 761, 725, 732, 726, 727, 728, 729, 476, 477, 478, 476, 480, 477, 478, 480, 717, 718, 746, 719, 510, 746, 720, 747, 721, 755, 722, 723, 724, 761, 725, 890, 726, 727, 728, 729, 480, 477, 478, 481, 482, 483, 484, 482, 507, 485, 492, 493, 494, 492, 1324, 495, 482, 483, 484, 491, 2975, 485, 762, 492, 493, 494, 492, 436, 495, 499, 502, 436, 499, 502, 500, 750, 756, 506, 750, 763, 751, 512, 506, 516, 513, 512, 759, 764, 513, 767, 762, 2137, 2137, 529, 529, 436, 765, 530, 774, 486, 557, 529, 529, 557, 775, 496, 529, 763, 533, 530, 2800, 486, 776, 777, 529, 764, 529, 536, 496, 771, 537, 540, 536, 1755, 501, 536, 774, 778, 529, 510, 779, 514, 775, 760, 536, 516, 768, 769, 540, 536, 776, 777, 536, 766, 531, 780, 536, 781, 782, 537, 783, 536, 784, 799, 536, 778, 533, 800, 779, 801, 802, 803, 801, 804, 806, 807, 772, 538, 536, 590, 809, 3136, 590, 780, 810, 781, 782, 266, 783, 811, 784, 799, 812, 813, 770, 800, 3589, 3582, 802, 803, 814, 804, 806, 807, 815, 816, 540, 785, 809, 786, 787, 817, 810, 788, 789, 790, 818, 811, 3580, 791, 812, 813, 792, 823, 793, 794, 795, 796, 814, 797, 798, 2800, 815, 816, 824, 785, 825, 786, 787, 817, 819, 788, 789, 790, 818, 821, 822, 791, 826, 827, 792, 823, 793, 794, 795, 796, 828, 797, 798, 820, 829, 830, 824, 831, 825, 835, 834, 833, 819, 834, 836, 837, 838, 821, 822, 839, 826, 827, 833, 840, 841, 832, 842, 843, 828, 844, 845, 820, 829, 830, 846, 831, 847, 835, 848, 849, 850, 851, 836, 837, 838, 852, 853, 839, 854, 855, 856, 840, 841, 832, 842, 843, 351, 844, 845, 347, 357, 347, 846, 358, 847, 1107, 848, 849, 850, 851, 390, 869, 623, 852, 853, 623, 854, 855, 856, 3565, 347, 645, 347, 859, 355, 637, 859, 629, 637, 869, 629, 347, 357, 347, 862, 358, 888, 862, 866, 357, 367, 866, 358, 368, 635, 878, 857, 635, 367, 367, 860, 865, 368, 2515, 865, 879, 367, 367, 645, 368, 383, 640, 1102, 383, 367, 383, 428, 348, 870, 392, 915, 1115, 393, 640, 394, 889, 867, 392, 348, 871, 383, 640, 359, 383, 916, 382, 917, 383, 3519, 359, 863, 392, 412, 640, 431, 413, 867, 871, 915, 369, 383, 388, 662, 875, 890, 383, 369, 383, 590, 626, 1118, 590, 916, 876, 917, 641, 643, 3486, 901, 881, 383, 388, 1567, 383, 918, 383, 880, 383, 902, 2515, 904, 662, 919, 388, 399, 872, 643, 399, 662, 399, 920, 663, 908, 391, 642, 640, 391, 383, 392, 399, 885, 653, 918, 654, 3421, 389, 655, 422, 921, 883, 919, 399, 422, 428, 642, 640, 391, 1391, 920, 391, 392, 392, 3406, 923, 653, 647, 654, 905, 924, 655, 925, 3401, 883, 926, 877, 388, 921, 391, 927, 656, 391, 928, 392, 392, 931, 891, 932, 654, 656, 903, 655, 923, 506, 883, 383, 388, 924, 506, 925, 911, 399, 926, 3400, 399, 391, 399, 927, 886, 887, 928, 391, 656, 931, 391, 932, 392, 660, 657, 893, 733, 894, 933, 733, 895, 3394, 391, 896, 399, 898, 935, 392, 2135, 892, 403, 936, 404, 977, 392, 899, 977, 657, 658, 672, 391, 996, 672, 391, 412, 392, 933, 413, 403, 392, 404, 3358, 406, 405, 935, 2268, 658, 2269, 657, 936, 391, 910, 897, 898, 910, 392, 412, 392, 403, 413, 404, 678, 662, 899, 679, 391, 658, 406, 391, 422, 392, 399, 266, 403, 2515, 404, 735, 392, 405, 735, 913, 658, 937, 914, 414, 659, 978, 938, 422, 978, 666, 939, 392, 666, 940, 392, 900, 941, 393, 907, 394, 1122, 907, 392, 392, 659, 414, 393, 736, 394, 937, 736, 392, 737, 391, 938, 423, 392, 942, 939, 906, 1067, 940, 943, 945, 941, 392, 951, 952, 929, 953, 954, 1067, 3299, 900, 423, 930, 930, 930, 930, 930, 930, 930, 930, 930, 395, 942, 946, 958, 391, 961, 943, 945, 959, 395, 951, 952, 964, 953, 954, 947, 948, 962, 949, 950, 955, 965, 956, 960, 966, 967, 957, 963, 968, 970, 946, 958, 2471, 961, 2472, 976, 959, 969, 981, 743, 964, 981, 743, 947, 948, 962, 949, 950, 955, 965, 956, 960, 966, 967, 957, 963, 968, 970, 971, 1115, 972, 979, 973, 976, 979, 969, 980, 739, 982, 508, 739, 982, 740, 983, 985, 746, 1000, 985, 746, 986, 747, 989, 990, 1001, 989, 990, 971, 991, 972, 750, 973, 1002, 750, 993, 751, 994, 993, 510, 994, 512, 995, 1003, 513, 2290, 1000, 529, 1010, 1011, 530, 536, 1012, 1001, 537, 529, 536, 1013, 1014, 536, 1015, 1002, 1016, 3291, 1017, 1018, 1019, 1034, 887, 529, 1026, 1003, 3286, 536, 1027, 1023, 1010, 1011, 1028, 1035, 1012, 1020, 1024, 1036, 1041, 1013, 1014, 3050, 1015, 1025, 1016, 998, 1017, 1018, 1019, 1034, 1021, 1004, 1026, 1022, 1029, 1006, 1027, 1023, 1032, 1037, 1028, 1035, 1044, 1020, 1024, 1036, 1041, 1045, 1030, 1039, 1031, 1025, 1042, 1046, 1043, 1038, 801, 1033, 1021, 801, 1047, 1022, 1029, 1050, 1040, 1051, 1032, 1037, 1053, 1054, 1044, 1047, 1055, 3260, 1056, 1045, 1030, 1039, 1031, 1057, 1042, 1046, 1043, 1038, 1058, 1033, 1059, 1061, 1062, 1063, 1064, 1050, 1040, 1051, 1065, 1066, 1053, 1054, 1068, 1069, 1055, 1048, 1056, 1070, 1072, 1073, 1076, 1057, 1074, 1077, 834, 1078, 1058, 834, 1059, 1061, 1062, 1063, 1064, 1074, 1079, 1080, 1065, 1066, 1081, 1082, 1068, 1069, 1083, 1084, 1075, 1070, 1072, 1073, 1076, 1085, 1086, 1077, 1087, 1078, 1088, 1089, 1090, 1092, 1093, 1094, 1095, 1096, 1079, 1080, 1091, 1097, 1081, 1082, 1098, 1099, 1083, 1084, 1075, 1101, 1124, 355, 363, 1085, 1086, 1103, 1087, 3245, 1088, 1089, 1090, 1092, 1093, 1094, 1095, 1096, 2290, 859, 1091, 1097, 859, 862, 1098, 1099, 862, 347, 357, 347, 1104, 358, 390, 373, 865, 367, 1105, 865, 866, 367, 390, 866, 368, 869, 1110, 1128, 1126, 367, 622, 669, 2515, 873, 383, 640, 628, 383, 392, 383, 1708, 1109, 3321, 394, 1106, 399, 392, 640, 1129, 977, 867, 978, 977, 1130, 978, 1128, 348, 1112, 873, 632, 359, 383, 2515, 888, 2975, 634, 834, 383, 640, 834, 383, 369, 383, 651, 391, 675, 1129, 391, 2515, 392, 640, 1130, 653, 867, 1111, 1709, 431, 655, 649, 641, 883, 1127, 418, 871, 383, 1125, 1131, 874, 1113, 391, 391, 392, 391, 391, 392, 392, 888, 653, 653, 654, 1111, 1132, 655, 655, 2976, 883, 883, 399, 642, 640, 391, 428, 872, 391, 1131, 392, 392, 392, 893, 656, 894, 890, 399, 895, 1202, 399, 896, 399, 677, 1132, 1190, 1133, 671, 1190, 1134, 1114, 1899, 392, 885, 1138, 3047, 642, 640, 913, 884, 884, 914, 1139, 657, 399, 1115, 422, 399, 391, 1141, 399, 391, 399, 392, 1133, 3045, 653, 1134, 654, 890, 887, 655, 1138, 1117, 883, 3592, 754, 3593, 657, 657, 1139, 1204, 656, 391, 399, 392, 391, 1141, 392, 3184, 1143, 893, 391, 894, 1506, 391, 895, 392, 888, 896, 893, 392, 1119, 423, 393, 895, 394, 1144, 896, 392, 392, 887, 897, 1116, 2137, 2138, 3175, 391, 1143, 392, 391, 392, 392, 392, 393, 1120, 394, 894, 758, 392, 895, 910, 2800, 896, 910, 1144, 412, 1325, 897, 413, 890, 1145, 657, 392, 391, 981, 1146, 897, 981, 391, 907, 395, 391, 907, 392, 392, 1135, 1123, 393, 404, 394, 1136, 405, 392, 1191, 658, 890, 1191, 1940, 1145, 2977, 395, 1121, 1137, 1146, 1147, 391, 392, 979, 1194, 3132, 979, 1194, 980, 1135, 3091, 414, 1148, 1149, 1136, 1142, 1142, 1142, 1142, 1142, 1142, 1142, 1142, 1142, 1150, 1151, 1137, 1152, 1147, 665, 395, 930, 930, 930, 930, 930, 930, 930, 930, 930, 1148, 1149, 1153, 1156, 1157, 1158, 1159, 1160, 1161, 1162, 1165, 1163, 1150, 1151, 1164, 1152, 1166, 1167, 391, 1168, 1169, 1170, 1171, 1172, 1173, 1174, 1175, 1179, 2515, 1182, 1153, 1156, 1157, 1158, 1159, 1160, 1161, 1162, 1165, 1177, 1183, 1184, 1164, 1178, 1166, 1167, 1185, 1168, 1169, 1170, 1171, 1172, 1173, 1174, 1175, 1179, 1180, 1182, 1186, 1181, 1187, 1189, 989, 1198, 1206, 989, 1198, 1177, 1183, 1184, 982, 1178, 3053, 982, 1185, 983, 1192, 985, 510, 1192, 985, 1193, 986, 1203, 1180, 1207, 1186, 1181, 1187, 1189, 1195, 990, 1206, 1195, 990, 1196, 991, 1199, 993, 1208, 1199, 993, 1200, 994, 1201, 1074, 994, 1201, 995, 516, 1210, 529, 1205, 1207, 1209, 536, 1074, 1212, 1211, 529, 536, 1215, 1216, 536, 1217, 1218, 1219, 1208, 1220, 533, 756, 3592, 1221, 3593, 1222, 1223, 540, 1899, 1224, 1225, 1226, 1227, 1228, 1229, 1230, 1231, 1232, 1233, 1235, 1215, 1216, 1234, 1217, 1218, 1219, 1236, 1220, 768, 1237, 760, 1221, 766, 1222, 1223, 772, 770, 1224, 1225, 1226, 1227, 1228, 1229, 1230, 1231, 1232, 1233, 1235, 1238, 1239, 1234, 1240, 1241, 1242, 1236, 1243, 1244, 1237, 1247, 1248, 1245, 1250, 1246, 1249, 1252, 1253, 1254, 1255, 1256, 1257, 3045, 1262, 1263, 1266, 1264, 1267, 1238, 1239, 1251, 1240, 1241, 1242, 1268, 1243, 1244, 1264, 1247, 1248, 1245, 1250, 1246, 1249, 1252, 1253, 1254, 1255, 1256, 1257, 1258, 1262, 1263, 1266, 1259, 1267, 1269, 1270, 1251, 1271, 1272, 1260, 1268, 1261, 1273, 1274, 1276, 1265, 1277, 1278, 1279, 1280, 1281, 1282, 1283, 2870, 1190, 1291, 1258, 1190, 1292, 1293, 1259, 1294, 1269, 1270, 1295, 1271, 1272, 1260, 3032, 1261, 1273, 1274, 1276, 1296, 1277, 1278, 1279, 1280, 1281, 1282, 1283, 1284, 1285, 1291, 1297, 1286, 1292, 1293, 1298, 1294, 1287, 1299, 1295, 1300, 1301, 1302, 1288, 1303, 1304, 1305, 1289, 1296, 1290, 1306, 1307, 1308, 1309, 1310, 1311, 1284, 1285, 1312, 1297, 1286, 1313, 1314, 1298, 1315, 1287, 1299, 1316, 1300, 1301, 1302, 1288, 1303, 1304, 1305, 1289, 351, 1290, 1306, 1307, 1308, 1309, 1310, 1311, 1319, 1323, 1312, 869, 888, 1313, 1314, 888, 1315, 383, 640, 1316, 383, 391, 383, 2992, 391, 428, 392, 1328, 355, 653, 1317, 654, 1751, 867, 1321, 1115, 1191, 883, 1332, 1191, 1393, 1331, 391, 1393, 383, 391, 399, 392, 392, 662, 1327, 391, 654, 431, 391, 655, 392, 1334, 883, 893, 399, 1119, 1335, 1336, 895, 1337, 1332, 896, 399, 391, 1338, 399, 641, 399, 1329, 1341, 656, 1391, 392, 1320, 1324, 2991, 884, 890, 1117, 1334, 2982, 1342, 905, 1192, 1335, 1336, 1192, 1337, 1193, 399, 1194, 892, 1338, 1194, 2977, 1318, 640, 1341, 391, 1322, 887, 391, 391, 392, 2940, 391, 893, 392, 894, 1342, 893, 895, 894, 1345, 896, 895, 399, 897, 896, 399, 657, 399, 1339, 1347, 1348, 392, 1349, 1350, 1351, 392, 1353, 1354, 660, 1356, 1357, 1358, 1359, 2923, 1340, 1360, 1361, 1345, 1362, 399, 1195, 1394, 2290, 1195, 1394, 1196, 1339, 1347, 1348, 897, 1349, 1350, 1351, 1330, 1353, 1354, 2865, 1356, 1357, 1358, 1359, 1346, 1340, 1360, 1361, 1364, 1362, 406, 1142, 1142, 1142, 1142, 1142, 1142, 1142, 1142, 1142, 1365, 1322, 1363, 1363, 1363, 1363, 1363, 1363, 1363, 1363, 1363, 1366, 1367, 1368, 1369, 1370, 1364, 1371, 1372, 399, 1373, 1374, 1375, 1376, 1377, 1378, 1379, 1380, 1365, 1381, 1383, 1384, 1385, 1386, 1387, 1198, 2290, 508, 1198, 1366, 1367, 1368, 1369, 1370, 1397, 1371, 1372, 1397, 1373, 1374, 1375, 1376, 1377, 1378, 1379, 1380, 1398, 1381, 1383, 1384, 1385, 1386, 1387, 1395, 1199, 510, 1395, 1199, 1396, 1200, 1201, 1399, 1400, 1201, 1403, 1404, 1405, 1406, 1407, 1408, 1409, 1410, 1411, 1412, 1398, 1413, 1414, 1415, 1416, 1418, 1419, 1420, 1421, 1422, 1417, 1423, 1424, 1425, 1426, 1399, 1400, 1427, 1403, 1404, 1405, 1406, 1407, 1408, 1409, 1410, 1411, 1412, 1428, 1413, 1414, 1415, 1416, 1418, 1419, 1420, 1421, 1422, 1417, 1423, 1424, 1425, 1426, 1429, 1430, 1427, 1431, 1432, 1433, 1434, 1435, 1436, 1437, 1438, 1439, 1441, 1428, 1442, 1443, 1444, 1445, 1446, 1447, 1448, 1449, 1450, 1455, 2826, 2825, 1440, 1457, 1429, 1430, 2802, 1431, 1432, 1433, 1434, 1435, 1436, 1437, 1438, 1439, 1441, 1451, 1442, 1443, 1444, 1445, 1446, 1447, 1448, 1449, 1450, 1455, 1452, 1456, 1440, 1457, 1458, 1453, 1454, 1459, 1461, 1462, 1463, 1464, 1456, 1466, 1467, 1468, 1469, 1451, 1471, 1473, 1474, 1475, 1478, 1476, 1479, 1480, 1482, 1483, 1452, 1477, 1484, 1485, 1458, 1453, 1454, 1459, 1461, 1462, 1463, 1464, 1486, 1466, 1467, 1468, 1469, 1487, 1471, 1473, 1474, 1475, 1478, 1476, 1479, 1480, 1482, 1483, 1488, 1477, 1484, 1485, 1489, 1490, 1491, 1492, 1493, 1494, 1495, 1496, 1486, 1497, 1498, 1499, 1500, 1487, 1501, 1502, 1503, 1504, 869, 888, 1508, 2764, 1511, 1393, 1488, 662, 1393, 2352, 1489, 1490, 1491, 1492, 1493, 1494, 1495, 1496, 3942, 1497, 1498, 1499, 1500, 1456, 1501, 1502, 1503, 1504, 391, 1505, 1508, 391, 1511, 392, 1456, 1512, 893, 888, 894, 870, 889, 895, 1513, 1514, 896, 3663, 399, 3664, 399, 399, 1515, 399, 3636, 1516, 1394, 392, 1509, 1394, 1510, 1517, 2350, 1518, 885, 1512, 1523, 3663, 1524, 3664, 871, 890, 1513, 1514, 391, 399, 659, 391, 1114, 392, 1515, 1525, 1507, 1516, 894, 897, 1509, 895, 1510, 1517, 896, 1518, 1520, 1526, 1523, 1520, 1524, 1520, 1527, 1528, 1529, 391, 1521, 656, 3637, 1520, 1533, 890, 2732, 1525, 1534, 1536, 1542, 1543, 1546, 1547, 1548, 1549, 1550, 1395, 1571, 1526, 1395, 1571, 1396, 1397, 1527, 1528, 1397, 1121, 1531, 1551, 887, 1552, 1533, 1553, 1532, 1554, 1534, 1536, 1542, 1543, 1546, 1547, 1548, 1549, 1550, 1522, 1363, 1363, 1363, 1363, 1363, 1363, 1363, 1363, 1363, 1555, 1531, 1551, 1556, 1552, 1557, 1553, 1532, 1554, 1558, 1559, 1560, 1561, 1563, 1564, 1565, 1566, 1572, 1562, 1573, 1576, 1577, 1578, 1579, 1580, 1578, 1581, 1582, 1555, 1583, 1584, 1556, 1585, 1557, 1586, 1587, 1588, 1558, 1559, 1560, 1561, 1563, 1564, 1565, 1566, 1572, 1562, 1573, 1576, 1577, 1592, 1579, 1580, 1589, 1581, 1582, 1593, 1583, 1584, 1594, 1585, 1595, 1586, 1587, 1588, 1596, 1590, 1597, 1598, 1599, 1600, 1591, 1605, 1606, 1601, 1607, 1608, 1609, 1592, 1610, 1602, 1589, 1603, 1611, 1593, 1604, 1618, 1594, 2730, 1595, 1619, 1620, 1621, 1596, 1590, 1597, 1598, 1599, 1600, 1591, 1605, 1606, 1601, 1607, 1608, 1609, 1622, 1610, 1602, 1623, 1603, 1611, 1612, 1604, 1618, 1624, 1613, 1625, 1619, 1620, 1621, 1626, 1627, 1614, 1628, 1615, 1616, 1629, 1617, 1630, 1631, 1632, 1633, 1634, 1622, 1635, 1636, 1623, 1637, 1638, 1612, 1642, 1643, 1624, 1613, 1625, 1644, 1645, 1646, 1626, 1627, 1614, 1628, 1615, 1616, 1629, 1617, 1630, 1631, 1632, 1633, 1634, 1653, 1635, 1636, 1647, 1637, 1638, 1654, 1642, 1643, 1655, 1648, 1660, 1644, 1645, 1646, 1661, 1662, 1663, 1649, 1658, 1664, 1665, 1656, 1650, 1657, 1666, 1667, 1668, 1653, 1669, 1658, 1647, 1670, 1671, 1654, 1672, 1673, 1655, 1648, 1660, 1674, 1659, 1675, 1661, 1662, 1663, 1649, 1676, 1664, 1665, 1656, 1650, 1657, 1666, 1667, 1668, 1677, 1669, 1678, 1679, 1670, 1671, 1680, 1672, 1673, 1681, 1682, 1683, 1674, 1659, 1675, 1684, 1685, 1686, 1687, 1676, 1688, 1690, 1692, 1693, 1694, 888, 1691, 2673, 1677, 1696, 1678, 1679, 1697, 1698, 1680, 1699, 1689, 1681, 1682, 1683, 1700, 2504, 1701, 1684, 1685, 1686, 1687, 1695, 1688, 1690, 1692, 1693, 1694, 399, 1691, 1115, 399, 1696, 399, 1702, 1697, 1698, 1703, 1699, 1689, 2502, 399, 1704, 1700, 1117, 1701, 1705, 1520, 1520, 1711, 1520, 1520, 1520, 1520, 1714, 399, 1715, 1706, 1706, 1716, 1520, 1520, 1702, 1571, 1658, 1703, 1571, 884, 890, 1329, 1704, 1721, 1718, 1722, 1705, 1658, 1719, 1711, 1720, 1723, 1724, 1726, 1714, 897, 1715, 1727, 2084, 1716, 1530, 1530, 1530, 1530, 1530, 1530, 1530, 1530, 1530, 1730, 1731, 1721, 1718, 1722, 1707, 1522, 1719, 1732, 1720, 1723, 1724, 1726, 1733, 1734, 1735, 1727, 1728, 1728, 1728, 1728, 1728, 1728, 1728, 1728, 1728, 1736, 1737, 1730, 1731, 1738, 1739, 1740, 1741, 1742, 1743, 1732, 1744, 1745, 1746, 1747, 1733, 1734, 1735, 1748, 1749, 1750, 1752, 1756, 1757, 1974, 1760, 1761, 1974, 1736, 1737, 1762, 1763, 1738, 1739, 1740, 1741, 1742, 1743, 1764, 1744, 1745, 1746, 1747, 1766, 1767, 1765, 1748, 1749, 1750, 1752, 1756, 1757, 1578, 1760, 1761, 1578, 1768, 1758, 1762, 1763, 1769, 1770, 1771, 1772, 1773, 1774, 1764, 1775, 1776, 1777, 1778, 1766, 1767, 1765, 1779, 1780, 1781, 1782, 1783, 1784, 1785, 1786, 1787, 1788, 1768, 1789, 1790, 1791, 1769, 1770, 1771, 1772, 1773, 1774, 1792, 1775, 1776, 1777, 1778, 1793, 1794, 1795, 1779, 1780, 1781, 1782, 1783, 1784, 1785, 1786, 1787, 1788, 1796, 1789, 1790, 1791, 1797, 1798, 1799, 1800, 1801, 1802, 1792, 1803, 1804, 1805, 1806, 1793, 1794, 1795, 1807, 1808, 1809, 1812, 1813, 1814, 1815, 1816, 1817, 1810, 1796, 1818, 1819, 1820, 1797, 1798, 1799, 1800, 1801, 1802, 1810, 1803, 1804, 1805, 1806, 1821, 1822, 1823, 1807, 1808, 1809, 1812, 1813, 1814, 1815, 1816, 1817, 1824, 1826, 1818, 1819, 1820, 1827, 1828, 1829, 1830, 1831, 1832, 1842, 1844, 1811, 1845, 1846, 1821, 1822, 1823, 1847, 1848, 1833, 1842, 1990, 1849, 1850, 1990, 1851, 1824, 1826, 1852, 1853, 2290, 1827, 1828, 1829, 1830, 1831, 1832, 1854, 1844, 2290, 1845, 1846, 1855, 1856, 1857, 1847, 1848, 1833, 1834, 1835, 1849, 1850, 1836, 1851, 1837, 1858, 1852, 1853, 1838, 1839, 1859, 1860, 1840, 1861, 1862, 1854, 1863, 1841, 1864, 1865, 1855, 1856, 1857, 1866, 1867, 1868, 1834, 1835, 1869, 1870, 1836, 1873, 1837, 1858, 1874, 1871, 1838, 1839, 1859, 1860, 1840, 1861, 1862, 1875, 1863, 1841, 1864, 1865, 1872, 1876, 1877, 1866, 1867, 1868, 1878, 1879, 1869, 1870, 1881, 1873, 1882, 1883, 1874, 1871, 1884, 1885, 1886, 1888, 1889, 1892, 3942, 1875, 1894, 3942, 1897, 3942, 1872, 1876, 1877, 1887, 1842, 1898, 1878, 1879, 1900, 1901, 1881, 1902, 1882, 1883, 2481, 1842, 1884, 1885, 1886, 1888, 1889, 2479, 1520, 1903, 1894, 1520, 1897, 1520, 1904, 2069, 1905, 1887, 1890, 1898, 1899, 1520, 1900, 1901, 1893, 1902, 1907, 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1911, 1903, 1908, 1912, 1913, 1914, 1904, 1909, 1905, 1728, 1728, 1728, 1728, 1728, 1728, 1728, 1728, 1728, 1907, 1915, 1916, 1917, 1918, 1919, 1920, 1921, 1922, 1522, 1911, 1923, 1908, 1912, 1913, 1914, 1924, 1909, 1930, 1567, 1931, 1932, 1933, 1934, 1935, 1936, 1925, 1927, 1937, 1915, 1916, 1917, 1918, 1919, 1920, 1921, 1922, 1926, 1928, 1923, 1943, 1944, 1946, 1947, 1924, 1948, 1930, 1929, 1931, 1932, 1933, 1934, 1935, 1936, 1925, 1927, 1937, 1949, 1950, 1951, 1952, 1953, 1954, 1955, 1568, 1926, 1928, 1956, 1943, 1944, 1946, 1947, 1957, 1948, 1958, 1929, 1959, 1961, 1962, 1963, 1964, 1965, 1966, 1967, 1968, 1949, 1950, 1951, 1952, 1953, 1954, 1955, 1960, 1969, 1970, 1956, 1971, 1972, 1973, 1975, 1957, 1976, 1958, 1977, 1959, 1961, 1962, 1963, 1964, 1965, 1966, 1967, 1968, 1978, 1979, 1980, 1981, 1982, 1983, 1984, 1960, 1969, 1970, 1985, 1971, 1972, 1973, 1975, 1986, 1976, 1987, 1977, 1988, 1991, 1992, 1996, 1997, 1998, 1989, 1999, 2000, 1978, 1979, 1980, 1981, 1982, 1983, 1984, 1993, 2003, 1994, 1985, 2004, 2005, 2008, 1995, 1986, 2006, 1987, 2001, 1988, 1991, 1992, 1996, 1997, 1998, 1989, 1999, 2000, 2009, 2001, 2007, 2670, 2010, 2011, 2012, 1993, 2003, 1994, 2014, 2004, 2005, 2008, 1995, 2015, 2006, 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2024, 2025, 2026, 2027, 2009, 2028, 2029, 2002, 2010, 2011, 2012, 2030, 2036, 2023, 2014, 2037, 2038, 2039, 2040, 2015, 2041, 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2024, 2025, 2026, 2027, 2043, 2028, 2029, 2044, 2031, 2032, 2045, 2030, 2036, 2023, 2033, 2037, 2038, 2039, 2040, 2046, 2041, 2047, 2034, 2048, 2049, 2035, 2050, 2051, 2052, 2053, 2667, 2059, 2043, 2060, 2061, 2044, 2031, 2032, 2045, 2062, 2063, 2064, 2033, 2065, 2646, 2068, 2070, 2046, 2636, 2047, 2034, 2048, 2049, 2035, 2050, 2051, 2052, 2053, 2054, 2059, 2055, 2060, 2061, 2071, 2056, 2074, 2072, 2062, 2063, 2064, 2054, 2065, 2055, 2073, 2070, 2057, 2056, 2058, 2075, 2076, 2077, 2078, 2079, 1708, 1708, 2083, 2054, 2057, 2055, 2066, 2069, 2071, 2056, 2074, 2072, 2085, 2626, 2086, 2054, 2087, 2055, 2073, 2624, 2057, 2056, 2058, 2075, 2076, 2077, 2078, 2079, 1520, 2088, 2091, 1520, 2057, 1520, 2066, 2089, 2092, 2090, 1706, 2093, 2085, 1520, 2086, 2094, 2087, 1709, 1893, 2084, 2095, 2096, 2107, 2108, 2109, 2110, 2111, 2608, 2593, 2088, 2091, 2112, 2113, 2114, 2115, 2089, 2092, 2090, 2158, 2093, 2352, 2158, 1974, 2094, 2116, 1974, 2119, 2171, 2095, 2096, 2107, 2108, 2109, 2110, 2111, 1707, 2097, 2120, 2121, 2112, 2113, 2114, 2115, 2098, 2098, 2098, 2098, 2098, 2098, 2098, 2098, 2098, 2116, 2117, 2119, 2099, 2122, 2100, 2101, 2102, 2118, 2123, 2124, 2103, 2125, 2120, 2121, 2127, 2104, 2128, 2129, 2130, 2131, 2132, 2133, 2126, 2141, 2105, 3728, 2289, 3729, 2117, 2290, 2099, 2122, 2100, 2101, 2102, 2118, 2123, 2124, 2103, 2125, 2143, 2144, 2127, 2104, 2128, 2129, 2130, 2131, 2132, 2133, 2126, 2141, 2105, 2136, 2137, 2138, 2136, 2139, 2137, 2140, 2139, 2145, 2146, 2147, 2148, 2149, 2150, 2151, 2143, 2144, 2152, 2153, 2154, 2155, 2156, 2159, 2160, 2161, 2162, 2163, 2350, 2164, 2165, 2166, 2540, 2167, 2168, 2169, 2172, 2145, 2146, 2147, 2148, 2149, 2150, 2151, 2173, 2174, 2152, 2153, 2154, 2155, 2156, 2159, 2160, 2161, 2162, 2163, 1940, 2164, 2165, 2166, 1942, 2167, 2168, 2169, 2172, 2175, 2176, 2177, 2178, 2179, 2180, 2181, 2173, 2174, 2182, 2183, 2184, 2185, 2186, 1990, 2189, 2190, 1990, 2191, 2187, 2192, 2193, 2194, 2195, 2196, 2197, 2199, 2200, 2175, 2176, 2177, 2178, 2179, 2180, 2181, 2201, 2198, 2182, 2183, 2184, 2185, 2186, 2202, 2189, 2190, 2203, 2191, 2198, 2192, 2193, 2194, 2195, 2196, 2197, 2199, 2200, 2204, 2205, 2206, 2207, 2208, 2209, 2502, 2201, 2877, 2221, 2084, 2222, 2418, 2158, 2202, 2223, 2158, 2203, 2376, 2224, 2225, 2226, 2227, 2418, 2228, 2498, 2229, 2230, 2204, 2205, 2206, 2207, 2208, 2209, 2210, 2211, 2212, 2221, 2213, 2222, 2214, 2215, 2231, 2223, 2216, 2217, 2218, 2224, 2225, 2226, 2227, 2219, 2228, 2220, 2229, 2230, 2232, 2233, 2234, 2235, 2236, 2237, 2210, 2211, 2212, 2238, 2213, 2239, 2214, 2215, 2231, 2240, 2216, 2217, 2218, 2241, 2242, 2243, 2244, 2219, 2245, 2220, 2246, 2248, 2232, 2233, 2234, 2235, 2236, 2237, 2249, 2250, 2251, 2238, 2254, 2239, 2255, 2256, 2257, 2240, 2258, 2259, 2260, 2241, 2242, 2243, 2244, 2261, 2245, 2264, 2246, 2248, 2262, 2265, 2263, 2270, 2273, 2276, 2249, 2250, 2251, 2271, 2254, 2272, 2255, 2256, 2257, 2273, 2258, 2259, 2260, 2278, 2279, 2499, 2291, 2261, 2280, 2264, 2281, 2282, 2262, 2265, 2263, 2270, 2294, 2283, 2284, 2285, 2286, 2271, 2287, 2272, 2291, 2296, 2297, 2298, 2299, 2300, 2301, 2278, 2279, 2274, 2277, 2302, 2280, 2303, 2281, 2282, 2304, 3728, 2498, 3729, 2069, 2283, 2284, 2285, 2286, 3195, 2287, 2292, 2315, 2296, 2297, 2298, 2299, 2300, 2301, 2316, 2305, 2295, 2306, 2302, 2412, 2303, 2498, 2412, 2304, 2084, 2098, 2098, 2098, 2098, 2098, 2098, 2098, 2098, 2098, 2479, 2315, 2317, 2320, 2069, 2318, 2321, 2322, 2316, 2305, 2319, 2306, 2307, 2307, 2307, 2307, 2307, 2307, 2307, 2307, 2307, 2324, 2325, 2326, 2308, 2327, 2309, 2310, 2311, 2328, 2317, 2320, 2312, 2318, 2321, 2322, 2329, 2313, 2319, 2330, 2331, 2332, 2333, 2334, 2335, 2336, 2314, 2337, 2338, 2324, 2325, 2326, 2308, 2327, 2309, 2310, 2311, 2328, 2339, 2340, 2312, 2341, 2342, 2343, 2329, 2313, 2344, 2330, 2331, 2332, 2333, 2334, 2335, 2336, 2314, 2337, 2338, 2345, 2346, 2347, 2348, 2136, 2137, 2138, 2136, 2353, 2339, 2340, 2354, 2341, 2342, 2343, 2137, 2140, 2344, 2139, 2137, 2140, 2139, 2355, 2356, 2357, 2366, 2367, 2368, 2345, 2346, 2347, 2348, 2369, 2370, 2371, 2372, 2353, 2373, 2374, 2354, 2375, 2378, 2380, 2381, 2378, 2477, 2562, 2382, 2383, 2562, 2355, 2356, 2357, 2366, 2367, 2368, 2384, 2385, 2386, 1940, 2369, 2370, 2371, 2372, 2387, 2373, 2374, 2388, 2375, 1942, 2380, 2381, 2389, 1942, 2358, 2382, 2383, 2358, 2476, 2391, 2461, 2379, 2392, 2393, 2384, 2385, 2386, 2394, 2395, 2396, 2478, 3942, 2387, 2359, 3942, 2388, 3942, 2397, 2398, 2399, 2389, 2400, 2402, 2403, 2404, 2405, 2360, 2391, 2361, 2379, 2392, 2393, 2452, 2407, 2408, 2394, 2395, 2396, 2362, 2409, 2363, 2364, 2365, 2410, 2411, 2397, 2398, 2399, 2413, 2400, 2402, 2403, 2404, 2405, 2360, 3942, 2361, 2414, 3942, 2415, 3942, 2407, 2408, 2416, 2417, 2420, 2362, 2409, 2363, 2364, 2365, 2410, 2411, 2419, 2421, 2422, 2413, 2423, 2424, 2425, 2427, 2428, 2429, 2430, 2419, 2414, 2431, 2415, 2426, 2432, 2433, 2416, 2417, 2420, 2434, 2435, 2436, 2437, 2439, 2440, 2441, 2442, 2421, 2422, 2443, 2423, 2424, 2425, 2427, 2428, 2429, 2430, 2438, 2444, 2431, 2445, 2446, 2432, 2433, 2447, 2448, 2449, 2434, 2435, 2436, 2437, 2439, 2440, 2441, 2442, 2450, 2451, 2443, 2453, 2454, 2455, 2456, 2457, 2458, 2459, 2438, 2444, 2460, 2445, 2446, 2462, 2463, 2447, 2448, 2449, 2464, 2465, 2466, 2467, 2468, 2469, 2470, 2473, 2450, 2451, 2474, 2453, 2454, 2455, 2456, 2457, 2458, 2459, 2475, 2480, 2460, 2482, 2483, 2462, 2463, 2484, 2485, 2486, 2464, 2465, 2466, 2467, 2468, 2469, 2470, 2473, 2500, 2487, 2474, 2488, 2489, 2490, 2503, 2505, 2506, 2352, 2475, 2350, 2507, 2482, 2483, 2508, 2980, 2484, 2485, 2486, 2509, 2510, 2511, 2253, 2512, 2513, 2514, 2980, 2481, 2487, 2516, 2488, 2489, 2490, 2493, 2505, 2506, 2493, 2571, 2493, 2507, 2571, 2252, 2508, 2494, 2501, 2517, 2495, 2509, 2510, 2511, 2504, 2512, 2513, 2514, 2515, 2518, 2521, 2516, 2522, 2523, 2496, 2307, 2307, 2307, 2307, 2307, 2307, 2307, 2307, 2307, 2519, 2524, 2525, 2517, 2526, 2520, 2527, 2528, 2529, 2530, 2531, 2532, 2533, 2518, 2521, 2534, 2522, 2523, 2497, 2535, 2536, 2537, 2538, 2539, 2541, 2542, 2543, 2544, 2519, 2524, 2525, 2545, 2526, 2520, 2527, 2528, 2529, 2530, 2531, 2532, 2533, 2546, 2547, 2534, 2548, 2549, 2555, 2535, 2536, 2537, 2538, 2539, 2541, 2542, 2543, 2544, 2556, 2551, 2552, 2545, 2551, 2554, 2552, 2559, 2554, 2563, 2566, 2567, 2557, 2546, 2547, 2564, 2548, 2549, 2555, 2558, 2358, 2565, 2568, 2358, 2569, 2560, 2570, 2572, 2556, 2573, 2574, 2575, 2247, 2576, 2577, 2559, 2578, 2563, 2566, 2567, 2557, 2579, 2583, 2564, 2584, 2585, 2586, 2558, 3942, 2565, 2568, 3942, 2569, 3942, 2570, 2572, 2350, 2573, 2574, 2575, 2352, 2576, 2577, 2378, 2578, 2587, 2378, 2588, 2581, 2579, 2583, 2349, 2584, 2585, 2586, 2351, 2589, 2590, 2591, 2592, 2594, 2591, 2595, 2596, 2597, 2598, 2599, 2600, 2601, 2602, 2603, 2604, 2605, 2587, 2606, 2588, 2607, 2609, 2610, 2611, 2612, 2613, 2611, 2617, 2589, 2590, 2618, 2592, 2594, 2619, 2595, 2596, 2597, 2598, 2599, 2600, 2601, 2602, 2603, 2604, 2605, 2620, 2606, 2621, 2607, 2609, 2610, 2615, 2612, 2613, 2615, 2617, 2616, 2622, 2618, 2623, 2625, 2619, 2629, 2627, 2630, 2631, 2632, 2633, 2634, 2635, 2637, 2638, 2639, 2620, 2627, 2621, 2157, 2640, 2641, 2642, 2643, 2644, 2645, 2647, 2648, 2622, 2649, 2623, 2625, 2650, 2629, 2651, 2630, 2631, 2632, 2633, 2634, 2635, 2637, 2638, 2639, 2652, 2653, 2654, 2628, 2640, 2641, 2642, 2643, 2644, 2645, 2647, 2648, 2655, 2649, 2656, 2657, 2650, 2658, 2651, 2659, 2660, 2661, 2662, 2663, 2664, 2665, 2666, 2668, 2652, 2653, 2654, 2669, 2671, 2273, 2477, 2673, 2674, 2675, 2676, 2677, 2655, 2678, 2656, 2657, 2679, 2658, 2680, 2659, 2660, 2661, 2662, 2663, 2664, 2665, 2666, 2668, 2142, 2290, 1942, 2669, 2697, 2699, 2291, 2673, 2674, 2675, 2676, 2677, 2685, 2678, 2493, 2491, 2679, 2493, 2680, 2493, 2500, 2481, 2672, 2481, 2682, 2493, 2700, 2495, 2493, 2686, 2493, 2701, 2702, 2699, 2493, 2689, 1899, 2493, 2703, 2493, 2704, 2683, 2705, 2688, 2693, 2493, 2706, 2495, 2493, 2504, 2493, 2698, 2690, 2707, 2700, 2682, 2708, 2687, 2495, 2701, 2702, 2694, 2709, 2710, 1899, 2504, 2703, 2711, 2704, 2684, 2705, 2712, 2683, 2713, 2706, 2714, 2715, 2716, 2717, 2718, 2691, 2707, 2719, 2720, 2708, 2721, 2722, 2723, 2724, 2695, 2709, 2710, 2725, 2726, 2727, 2711, 2728, 2729, 2731, 2712, 2497, 2713, 2733, 2714, 2715, 2716, 2717, 2718, 2734, 2735, 2719, 2720, 2736, 2721, 2722, 2723, 2724, 2737, 2738, 2739, 2725, 2726, 2727, 2740, 2728, 2729, 2731, 2741, 2551, 2552, 2733, 2551, 2554, 2552, 2742, 2554, 2734, 2735, 2743, 2744, 2736, 2562, 2747, 2748, 2562, 2737, 2738, 2739, 2749, 2750, 2751, 2740, 2752, 2753, 2754, 2741, 2571, 2757, 2758, 2571, 2759, 2755, 2742, 2760, 2761, 2762, 2743, 2744, 2763, 2766, 2747, 2748, 2767, 2768, 1940, 2769, 2749, 2750, 2751, 2770, 2752, 2753, 2754, 2350, 2771, 2757, 2758, 2352, 2759, 2776, 2777, 2760, 2761, 2762, 2778, 2779, 2763, 2766, 2349, 2780, 2767, 2768, 2351, 2769, 2772, 2775, 2773, 2770, 2775, 2781, 2782, 2783, 2771, 2784, 2785, 2787, 2784, 2776, 2777, 2788, 2789, 2790, 2778, 2779, 2791, 2792, 2611, 2780, 2797, 2611, 2801, 2793, 2772, 2786, 2773, 2795, 2796, 2781, 2782, 2783, 2803, 2615, 2785, 2787, 2615, 2804, 2616, 2788, 2789, 2790, 2805, 2806, 2791, 2792, 2807, 2808, 2797, 2809, 2801, 2810, 2811, 2786, 2812, 2795, 2796, 2813, 2814, 2815, 2803, 2816, 2817, 2818, 2819, 2804, 2820, 2821, 2822, 2823, 2805, 2806, 2824, 2827, 2807, 2808, 2828, 2809, 2829, 2810, 2811, 2830, 2812, 2831, 2832, 2813, 2814, 2815, 2833, 2816, 2817, 2818, 2819, 2834, 2820, 2821, 2822, 2823, 2835, 2836, 2824, 2827, 2837, 2838, 2828, 2839, 2829, 2840, 2841, 2830, 2842, 2831, 2832, 2843, 2844, 2845, 2833, 2846, 2847, 2848, 2849, 2834, 2850, 2477, 2851, 2852, 2835, 2836, 2853, 2854, 2837, 2838, 2855, 2839, 2856, 2840, 2841, 2857, 2842, 2500, 2290, 2843, 2844, 2845, 2106, 2846, 2847, 2848, 2849, 2944, 2850, 2498, 2944, 2852, 2491, 2881, 2853, 2854, 2866, 2869, 2855, 2859, 2856, 2081, 2859, 2857, 2859, 2493, 2478, 2069, 2493, 2860, 2493, 2882, 2861, 2867, 2686, 2864, 2497, 2871, 2495, 2290, 2688, 2883, 2501, 2080, 2859, 2493, 2862, 2859, 2493, 2859, 2493, 1893, 2683, 2491, 2873, 2876, 2884, 2861, 2084, 2882, 2493, 2868, 2870, 2493, 2885, 2493, 2886, 2042, 2887, 2883, 2693, 2874, 2690, 2495, 2863, 2013, 2859, 2888, 2889, 2859, 2497, 2859, 2890, 2891, 2884, 2493, 2860, 2694, 2493, 2861, 2493, 2892, 2885, 2893, 2886, 2879, 2887, 2894, 2495, 2875, 2877, 2895, 2896, 2862, 2897, 2888, 2889, 2898, 2899, 2900, 2890, 2891, 2694, 2901, 2902, 2695, 2903, 2904, 2905, 2892, 2906, 2893, 2907, 2908, 2909, 2894, 2910, 2911, 2912, 2895, 2896, 2863, 2897, 2913, 2914, 2898, 2899, 2900, 2915, 2916, 2880, 2901, 2902, 2917, 2903, 2904, 2905, 2918, 2906, 2919, 2907, 2908, 2909, 2920, 2910, 2911, 2912, 2921, 2922, 2924, 2925, 2913, 2914, 2926, 2927, 2928, 2915, 2916, 2929, 2930, 2931, 2917, 2933, 2934, 2935, 2918, 2936, 2919, 2937, 2938, 2939, 2920, 2941, 2942, 2943, 2921, 2922, 2924, 2925, 2946, 2947, 2926, 2927, 2928, 2950, 2948, 2929, 2930, 2931, 2949, 2933, 2934, 2935, 1942, 2936, 1940, 2937, 2938, 2939, 2957, 2941, 2942, 2943, 2945, 2958, 2959, 2945, 2946, 2947, 2775, 2952, 2960, 2775, 2948, 2963, 2951, 2964, 2949, 2953, 2954, 2965, 2955, 2966, 2956, 2967, 2784, 2968, 2957, 2784, 2969, 2961, 2970, 2958, 2959, 2972, 2973, 2974, 2978, 2952, 2960, 2979, 2981, 2963, 2951, 2964, 2983, 2953, 2954, 2965, 2955, 2966, 2956, 2967, 2984, 2968, 2985, 2983, 2969, 2986, 2970, 2987, 2988, 2972, 2973, 2974, 2978, 2989, 2990, 2979, 2981, 2993, 2995, 2996, 2997, 2998, 3000, 2999, 3001, 3002, 3003, 3004, 2984, 3005, 2985, 2994, 3006, 2986, 2999, 2987, 2988, 3007, 3008, 3009, 3010, 2989, 2990, 3011, 3012, 2993, 2995, 2996, 2997, 2998, 3000, 3013, 3001, 3002, 3003, 3004, 3014, 3005, 3015, 3016, 3006, 3017, 3018, 3019, 3020, 3007, 3008, 3009, 3010, 3021, 3022, 3011, 3012, 3023, 3024, 3025, 3026, 3027, 2477, 3013, 3028, 3029, 3030, 3031, 3014, 1938, 3015, 3016, 3033, 3017, 3018, 3019, 3020, 1910, 1906, 1896, 3037, 3021, 3022, 1522, 3054, 3023, 3024, 3025, 3026, 3027, 3034, 1891, 3028, 3029, 3030, 3031, 2859, 2867, 2500, 2859, 3033, 2859, 3037, 1710, 1880, 2859, 3035, 2277, 2859, 2861, 2859, 2859, 3054, 3055, 2859, 3040, 2859, 2859, 3034, 2867, 2859, 3035, 2859, 2862, 2861, 3038, 2493, 3043, 3046, 2493, 2861, 2493, 3041, 2685, 2880, 2685, 2682, 2290, 2862, 2495, 1843, 3055, 3056, 2295, 2862, 2867, 3097, 3038, 3057, 3097, 2686, 3036, 2686, 2683, 3103, 1825, 1753, 3103, 2859, 3058, 3042, 2859, 3059, 2859, 2859, 1391, 3036, 2859, 3048, 2859, 3056, 2861, 3044, 3047, 3048, 3060, 3057, 2861, 2687, 2859, 2870, 2684, 2859, 2493, 2859, 2874, 2493, 3058, 2493, 3051, 3059, 2874, 2861, 2689, 2493, 2493, 3061, 2493, 2493, 2493, 2493, 3062, 3063, 3060, 2689, 2693, 2874, 3064, 2495, 3065, 2690, 3066, 3067, 3049, 1569, 2493, 3068, 3069, 2493, 3049, 2493, 2690, 2694, 3070, 3061, 2693, 3071, 3072, 2495, 3062, 3063, 3073, 3074, 3075, 3052, 3064, 3076, 3065, 2691, 3066, 3067, 3077, 2694, 3078, 3068, 3069, 3079, 3080, 3081, 2877, 2695, 3070, 3082, 3083, 3071, 3072, 3084, 3085, 3086, 3073, 3074, 3075, 3087, 3088, 3076, 3089, 3090, 3092, 3093, 3077, 2880, 3078, 3094, 3095, 3079, 3080, 3081, 3096, 3098, 3099, 3082, 3083, 3100, 3101, 3084, 3085, 3086, 3106, 3107, 3109, 3087, 3088, 3110, 3089, 3090, 3092, 3093, 3111, 3112, 2945, 3094, 3095, 2945, 3113, 3104, 3096, 3098, 3099, 3114, 3118, 3100, 3101, 3115, 3124, 3125, 3106, 3107, 3109, 3119, 3126, 3110, 3119, 3128, 3116, 3117, 3111, 3112, 3129, 3120, 3130, 3942, 3113, 3121, 3942, 3131, 3942, 3114, 3118, 3133, 3122, 3115, 3124, 3125, 3127, 3134, 3135, 3127, 3126, 3137, 3138, 3128, 3116, 3117, 3139, 3140, 3129, 3120, 3130, 3141, 3142, 3121, 3143, 3131, 3144, 3139, 3145, 3133, 3122, 3146, 3147, 3148, 3151, 3134, 3135, 3149, 3150, 3137, 3138, 3152, 3153, 3154, 3155, 3140, 3156, 3157, 3158, 3141, 3142, 3159, 3143, 3160, 3144, 3161, 3145, 3162, 3163, 3146, 3147, 3148, 3151, 3164, 3167, 3149, 3150, 3165, 3170, 3152, 3153, 3154, 3155, 3168, 3156, 3157, 3158, 3171, 3165, 3159, 1729, 3160, 3172, 3161, 3168, 3162, 3163, 3173, 3174, 3176, 3177, 3164, 3167, 3178, 3179, 3180, 3170, 3181, 3182, 3183, 3185, 3186, 3189, 3190, 3187, 3171, 3044, 3192, 3166, 2290, 3172, 2498, 1725, 1713, 3169, 3173, 3174, 3176, 3177, 3188, 2685, 3178, 3179, 3180, 2867, 3181, 3182, 3183, 3185, 3186, 3189, 3190, 3187, 2859, 3203, 1712, 2859, 2686, 2859, 3193, 3037, 3052, 3204, 3191, 2290, 2859, 2861, 3188, 2859, 1710, 2859, 2859, 3047, 3205, 2859, 3048, 2859, 2867, 2861, 1652, 2862, 3194, 3203, 2493, 2859, 3197, 2493, 2859, 2493, 2859, 3204, 3389, 2874, 2693, 3035, 3206, 2495, 2861, 3041, 3207, 3208, 3205, 3389, 1651, 2859, 3047, 3209, 2859, 3044, 2859, 2694, 2862, 3229, 3210, 3198, 3229, 3211, 2861, 1641, 2493, 3049, 3212, 2493, 3206, 2493, 3213, 3195, 3207, 3208, 3200, 2859, 2874, 2495, 2859, 3209, 2859, 3214, 3215, 3196, 3044, 3048, 3210, 3216, 2861, 3211, 3217, 3201, 3218, 3219, 3212, 3220, 3221, 3222, 3213, 3223, 3224, 3225, 2874, 3226, 3052, 3227, 3228, 3230, 3231, 3214, 3215, 3232, 3233, 3234, 3235, 3216, 3236, 3237, 3217, 3202, 3218, 3219, 3239, 3220, 3221, 3222, 3241, 3223, 3224, 3225, 3052, 3226, 1640, 3227, 3228, 3230, 3231, 1639, 1575, 3232, 3233, 3234, 3235, 3097, 3236, 3237, 3097, 3243, 3240, 3103, 3239, 3240, 3103, 3942, 3241, 3244, 3942, 3246, 3942, 3247, 3238, 3238, 3238, 3238, 3238, 3238, 3238, 3238, 3238, 3248, 3249, 3250, 3251, 3252, 3253, 3243, 3254, 3255, 3265, 3342, 1574, 3265, 3342, 3244, 1569, 3246, 1545, 3247, 3257, 3119, 3258, 3259, 3119, 3261, 3262, 3263, 3266, 3248, 3249, 3250, 3251, 3252, 3253, 3267, 3254, 3255, 3256, 3256, 3256, 3256, 3256, 3256, 3256, 3256, 3256, 3268, 3257, 3269, 3258, 3259, 3270, 3261, 3262, 3263, 3266, 3271, 3272, 3273, 3274, 3275, 3276, 3267, 3277, 3278, 3279, 3280, 3281, 3282, 3283, 3284, 3285, 3287, 3288, 3268, 3289, 3269, 3290, 3292, 3270, 3293, 3294, 3295, 3296, 3271, 3272, 3273, 3274, 3275, 3276, 3297, 3277, 3278, 3279, 3280, 3281, 3282, 3283, 3284, 3285, 3287, 3288, 3298, 3289, 3300, 3290, 3292, 3302, 3293, 3294, 3295, 3296, 3303, 3304, 3305, 3300, 3306, 1544, 3297, 3307, 3308, 3309, 3310, 3311, 3312, 3313, 3314, 3315, 3317, 3037, 3298, 3324, 1541, 3373, 1540, 3302, 3373, 3325, 3316, 1539, 3303, 3304, 3305, 3326, 3306, 3301, 2867, 3307, 3308, 3309, 3310, 3311, 3312, 3313, 3314, 3315, 3317, 2859, 2859, 3324, 2859, 2859, 2859, 2859, 3319, 3325, 3316, 3035, 3040, 1538, 2861, 3326, 2859, 2493, 3038, 2859, 2493, 2859, 2493, 3327, 3328, 2686, 3040, 3318, 2862, 3041, 2495, 1537, 2859, 3329, 3330, 2859, 2493, 2859, 3331, 2493, 1535, 2493, 3048, 3041, 2694, 2861, 3200, 1115, 3332, 2495, 3333, 3327, 3328, 2870, 873, 2859, 3036, 3042, 2859, 2874, 2859, 3329, 3330, 3201, 3334, 2873, 3331, 3335, 2861, 1481, 2493, 3195, 2880, 2493, 3336, 2493, 3332, 3337, 3333, 3338, 3322, 3339, 2874, 2495, 3340, 3341, 3343, 3049, 3344, 3347, 3348, 3320, 3334, 3229, 3349, 3335, 3229, 3201, 3345, 3350, 3351, 3352, 3336, 3353, 3354, 3337, 1472, 3338, 3360, 3339, 2875, 3360, 3340, 3341, 3343, 3355, 3344, 3347, 3348, 3357, 3359, 3363, 3349, 3364, 3365, 3323, 1470, 3350, 3351, 3352, 3366, 3353, 3354, 3238, 3238, 3238, 3238, 3238, 3238, 3238, 3238, 3238, 3240, 3355, 3367, 3240, 3368, 3357, 3359, 3363, 3369, 3364, 3365, 3370, 3361, 3371, 3372, 1465, 3366, 3356, 3356, 3356, 3356, 3356, 3356, 3356, 3356, 3356, 3374, 3375, 3376, 3377, 3367, 3378, 3368, 3379, 3265, 3380, 3369, 3265, 3381, 3370, 3361, 3371, 3372, 3256, 3256, 3256, 3256, 3256, 3256, 3256, 3256, 3256, 3383, 3385, 3374, 3375, 3376, 3377, 3386, 3378, 3387, 3379, 3382, 3380, 3384, 3382, 3381, 3384, 3388, 3390, 3391, 3392, 3393, 3395, 3396, 3397, 3398, 3399, 3402, 3403, 3383, 3385, 3404, 3405, 3407, 3408, 3386, 3409, 3387, 3412, 3413, 3414, 3415, 3416, 3417, 3418, 3388, 3390, 3391, 3392, 3393, 3395, 3396, 3397, 3398, 3399, 3402, 3403, 3410, 3419, 3404, 3405, 3407, 3408, 3420, 3409, 3411, 3412, 3413, 3414, 3415, 3416, 3417, 3418, 3422, 3423, 3424, 3425, 3426, 3427, 3037, 3323, 3429, 1460, 2290, 2859, 3410, 3419, 2859, 3485, 2859, 1402, 3420, 3443, 3411, 3035, 3443, 2867, 2861, 1401, 3485, 3430, 3422, 3423, 3424, 3425, 3426, 3427, 2493, 3431, 3429, 2493, 2862, 2493, 2859, 3432, 3433, 2859, 3428, 2859, 3434, 2495, 3704, 2493, 3048, 2868, 2493, 2861, 2493, 3430, 3435, 3436, 3437, 3200, 3438, 3201, 2495, 3431, 3439, 3440, 2863, 2874, 3441, 3432, 3433, 3444, 3446, 3447, 3434, 3448, 3201, 3449, 3450, 3451, 3469, 540, 538, 3469, 3435, 3436, 3437, 3470, 3438, 3323, 3470, 3342, 3439, 3440, 3342, 2875, 3441, 533, 3705, 3444, 3446, 3447, 531, 3448, 3323, 3449, 3450, 3451, 3442, 3442, 3442, 3442, 3442, 3442, 3442, 3442, 3442, 3445, 3445, 3445, 3445, 3445, 3445, 3445, 3445, 3445, 3445, 3445, 3346, 3346, 3346, 3346, 3346, 3346, 3346, 3346, 3346, 3346, 3346, 3452, 3453, 3454, 3445, 3356, 3356, 3356, 3356, 3356, 3356, 3356, 3356, 3356, 3455, 3346, 3456, 3458, 3459, 3460, 3461, 3471, 3474, 3479, 3471, 3474, 3479, 516, 514, 3452, 3453, 3454, 3360, 3462, 3463, 3360, 3464, 3465, 3466, 3467, 3472, 3473, 3455, 3475, 3456, 3458, 3459, 3460, 3461, 3457, 3457, 3457, 3457, 3457, 3457, 3457, 3457, 3457, 3476, 3477, 3480, 3462, 3463, 3480, 3464, 3465, 3466, 3467, 3472, 3473, 3482, 3475, 3384, 3483, 3484, 3384, 3487, 3488, 3489, 3491, 3492, 3496, 3497, 510, 1392, 3498, 3476, 3477, 3490, 3481, 3481, 3481, 3481, 3481, 3481, 3481, 3481, 3481, 3482, 3490, 3499, 3483, 3484, 3493, 3487, 3488, 3489, 3491, 3492, 3496, 3497, 3494, 3495, 3498, 3500, 3501, 3502, 3503, 3504, 3505, 3506, 3507, 3508, 3509, 3510, 3511, 3512, 3513, 3499, 3514, 3515, 3493, 3515, 3516, 3517, 3518, 3520, 3521, 3531, 3494, 3495, 3531, 3500, 3501, 3502, 3503, 3504, 3505, 3506, 3507, 3508, 3509, 3510, 3511, 3512, 3513, 3522, 3514, 3523, 3524, 3525, 3516, 3517, 3518, 3520, 3521, 2493, 3526, 3527, 2493, 3528, 2493, 3533, 3534, 3469, 3554, 3200, 3469, 3554, 2495, 3555, 1388, 1382, 3942, 3522, 3535, 3523, 3524, 3525, 1352, 3536, 3537, 3538, 3201, 3539, 3526, 3527, 3540, 3528, 3541, 3533, 3534, 3515, 3442, 3442, 3442, 3442, 3442, 3442, 3442, 3442, 3442, 3443, 3535, 3532, 3443, 1344, 3529, 3536, 3537, 3538, 3320, 3539, 3557, 1333, 3540, 3557, 3541, 3558, 3530, 3530, 3530, 3530, 3530, 3530, 3530, 3530, 3530, 3445, 3445, 3445, 3445, 3445, 3445, 3445, 3445, 3445, 3445, 3445, 3457, 3457, 3457, 3457, 3457, 3457, 3457, 3457, 3457, 3542, 3543, 3544, 3545, 3546, 3445, 3547, 431, 3549, 3547, 3550, 3551, 3552, 3559, 3560, 3474, 3562, 3563, 3474, 3564, 3561, 3479, 3568, 3608, 3566, 418, 3608, 414, 3542, 3543, 3544, 3545, 3546, 3571, 3480, 3548, 3549, 3480, 3550, 3551, 3552, 3559, 3560, 399, 3562, 3563, 3572, 3564, 3573, 3574, 3568, 3567, 3567, 3567, 3567, 3567, 3567, 3567, 3567, 3567, 3575, 3571, 3576, 3548, 3481, 3481, 3481, 3481, 3481, 3481, 3481, 3481, 3481, 3569, 3572, 3577, 3573, 3574, 3578, 3570, 3579, 3581, 3583, 3584, 3585, 3586, 3587, 3588, 3575, 3590, 3576, 3591, 3594, 3595, 3614, 3618, 395, 3614, 3618, 3554, 373, 3569, 3554, 3577, 3555, 3597, 3578, 3570, 3579, 3581, 3583, 3584, 3585, 3586, 3587, 3588, 3598, 3590, 3599, 3591, 3594, 3595, 3596, 3596, 3596, 3596, 3596, 3596, 3596, 3596, 3596, 3596, 3596, 3597, 3602, 3603, 3604, 3605, 3606, 3607, 3557, 369, 363, 3557, 3598, 3558, 3599, 3596, 3609, 3609, 3609, 3609, 3609, 3609, 3609, 3609, 3609, 3611, 3612, 3613, 3615, 3616, 3602, 3603, 3604, 3605, 3606, 3607, 3530, 3530, 3530, 3530, 3530, 3530, 3530, 3530, 3530, 3531, 3617, 3619, 3531, 3620, 3621, 3622, 3623, 3611, 3612, 3613, 3615, 3616, 3625, 3626, 3627, 3630, 3610, 3610, 3610, 3610, 3610, 3610, 3610, 3610, 3610, 3633, 3634, 3547, 3617, 3619, 3547, 3620, 3621, 3622, 3623, 3628, 359, 3638, 3628, 3639, 3625, 3626, 3627, 3630, 3624, 3624, 3624, 3624, 3624, 3624, 3624, 3624, 3624, 3633, 3634, 3640, 3565, 3642, 3643, 3644, 3645, 3647, 3648, 3649, 3629, 3638, 3650, 3639, 355, 3723, 3641, 3641, 3641, 3641, 3641, 3641, 3641, 3641, 3641, 3479, 3723, 3680, 3566, 3640, 3680, 3642, 3643, 3644, 3645, 3647, 3648, 3649, 3629, 3651, 3650, 3652, 3641, 3641, 3641, 3641, 3641, 3641, 3641, 3641, 3641, 3567, 3567, 3567, 3567, 3567, 3567, 3567, 3567, 3567, 3653, 3654, 3655, 3656, 3657, 3658, 3659, 3651, 3660, 3652, 3662, 3665, 3596, 3596, 3596, 3596, 3596, 3596, 3596, 3596, 3596, 3596, 3596, 3666, 3667, 3668, 3670, 3671, 3653, 3654, 3655, 3656, 3657, 3658, 3659, 3672, 3660, 3596, 3662, 3665, 3679, 3683, 1275, 3674, 3683, 3675, 3674, 3724, 3676, 3772, 1214, 3666, 3667, 3668, 3670, 3671, 3675, 3678, 3724, 3681, 3772, 3685, 3618, 3672, 3688, 3618, 3689, 3687, 3679, 3609, 3609, 3609, 3609, 3609, 3609, 3609, 3609, 3609, 3610, 3610, 3610, 3610, 3610, 3610, 3610, 3610, 3610, 3681, 3614, 3685, 3690, 3614, 3688, 3691, 3689, 3692, 3624, 3624, 3624, 3624, 3624, 3624, 3624, 3624, 3624, 3682, 3682, 3682, 3682, 3682, 3682, 3682, 3682, 3682, 3693, 3694, 3628, 3696, 3690, 3628, 3697, 3691, 3700, 3692, 3704, 3707, 3708, 3677, 3709, 3710, 1213, 3711, 1197, 3695, 3695, 3695, 3695, 3695, 3695, 3695, 3695, 3695, 3693, 3694, 3712, 3696, 3565, 3701, 3697, 3713, 3700, 3702, 3714, 3707, 3708, 3715, 3709, 3710, 3703, 3711, 3641, 3641, 3641, 3641, 3641, 3641, 3641, 3641, 3641, 3716, 3717, 3718, 3712, 3719, 3637, 3701, 3720, 3713, 3721, 3702, 3714, 3722, 3725, 3715, 3726, 3730, 3703, 3732, 3733, 3734, 3675, 3736, 3675, 3675, 3739, 3942, 3756, 3716, 3717, 3718, 1188, 3719, 3680, 3675, 3720, 3680, 3721, 3737, 3795, 3722, 3725, 3795, 3726, 3730, 3743, 3732, 3733, 3734, 3674, 3736, 3675, 3674, 3739, 3676, 3683, 3942, 3744, 3683, 3942, 3740, 3942, 3675, 3682, 3682, 3682, 3682, 3682, 3682, 3682, 3682, 3682, 3745, 3743, 3746, 3747, 3748, 3637, 3749, 3750, 3751, 3752, 3753, 3754, 3755, 3744, 3695, 3695, 3695, 3695, 3695, 3695, 3695, 3695, 3695, 3757, 3758, 3759, 3760, 3761, 3745, 3762, 3746, 3747, 3748, 3677, 3749, 3750, 3751, 3752, 3753, 3754, 3755, 3763, 3764, 3765, 3766, 3767, 3768, 3769, 3770, 3771, 3773, 3757, 3758, 3759, 3760, 3761, 3774, 3762, 3778, 3942, 3782, 3677, 3942, 3785, 3942, 3786, 3787, 3788, 3775, 3763, 3764, 3765, 3766, 3767, 3768, 3769, 3770, 3771, 3773, 3776, 3789, 3790, 3704, 3791, 3774, 3792, 3778, 3793, 3797, 3796, 3793, 3785, 3796, 3786, 3787, 3788, 3775, 3798, 3799, 3800, 3801, 3802, 3803, 3804, 3817, 3805, 3817, 3776, 3789, 3790, 3783, 3791, 3806, 3792, 3807, 3808, 3797, 3809, 3811, 3812, 3813, 3814, 3815, 3820, 3821, 3798, 3799, 3800, 3801, 3802, 3803, 3804, 3705, 3805, 3794, 3822, 3823, 3824, 3825, 3826, 3806, 3828, 3807, 3808, 3828, 3809, 3811, 3812, 3813, 3814, 3815, 3820, 3821, 3829, 3818, 3795, 3783, 3836, 3795, 3837, 3831, 3838, 3794, 3822, 3823, 3824, 3825, 3826, 3796, 3834, 3839, 3796, 3834, 3833, 3835, 3840, 3842, 3835, 3843, 3844, 3845, 3829, 3846, 3847, 3850, 3836, 3852, 3837, 3851, 3838, 3853, 3851, 3854, 3855, 3856, 3857, 3858, 3828, 3839, 3859, 3828, 1176, 3817, 3840, 3842, 3866, 3843, 3844, 3845, 1155, 3846, 3847, 3850, 3867, 3942, 3868, 3869, 3942, 3853, 3942, 3854, 3855, 3856, 3857, 3858, 3942, 3834, 3859, 3942, 3834, 3942, 3863, 3835, 3866, 3870, 3835, 3783, 3865, 3871, 3872, 3873, 3867, 3874, 3868, 3869, 3875, 3881, 3883, 3885, 3881, 3884, 3882, 3818, 3884, 3886, 3887, 3876, 3888, 3887, 3877, 3942, 3893, 3870, 3942, 3894, 3942, 3871, 3872, 3873, 3942, 3874, 3895, 3942, 3875, 3942, 3883, 3885, 3896, 3897, 3898, 3899, 3900, 3886, 3901, 3876, 3888, 3902, 3877, 3903, 3893, 3881, 3906, 3894, 3881, 3908, 3882, 3909, 3908, 3911, 3895, 3924, 1140, 662, 3924, 1115, 3896, 3897, 3898, 3899, 3900, 3884, 3901, 645, 3884, 3902, 385, 3903, 385, 3914, 3906, 3887, 3915, 3916, 3887, 3909, 3917, 3911, 3907, 3907, 3907, 3907, 3907, 3907, 3907, 3907, 3907, 3918, 3910, 3910, 3910, 3910, 3910, 3910, 3910, 3910, 3910, 3914, 3919, 3920, 3915, 3916, 3921, 873, 3917, 3907, 3907, 3907, 3907, 3907, 3907, 3907, 3907, 3907, 3908, 3918, 1071, 3908, 1060, 1052, 1049, 3925, 3926, 3927, 3928, 3930, 3919, 3920, 3931, 1007, 3921, 3923, 3923, 3923, 3923, 3923, 3923, 3923, 3923, 3923, 3910, 3910, 3910, 3910, 3910, 3910, 3910, 3910, 3910, 3925, 3926, 3927, 3928, 3930, 3933, 540, 3931, 3923, 3923, 3923, 3923, 3923, 3923, 3923, 3923, 3923, 3924, 3934, 3935, 3924, 3932, 3932, 3932, 3932, 3932, 3932, 3932, 3932, 3932, 3936, 3937, 3938, 3933, 3932, 3932, 3932, 3932, 3932, 3932, 3932, 3932, 3932, 3939, 3940, 3941, 3934, 3935, 538, 1005, 533, 531, 999, 516, 514, 997, 510, 992, 3936, 3937, 3938, 984, 975, 974, 944, 934, 922, 912, 431, 909, 418, 3939, 3940, 3941, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 258, 258, 258, 258, 258, 258, 258, 258, 258, 258, 258, 258, 258, 258, 258, 258, 258, 258, 266, 266, 414, 266, 266, 266, 266, 266, 266, 266, 266, 266, 266, 266, 266, 266, 266, 266, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 363, 363, 363, 363, 363, 363, 363, 363, 363, 363, 363, 363, 363, 363, 363, 363, 363, 363, 366, 366, 366, 366, 366, 366, 366, 366, 366, 366, 366, 366, 366, 366, 366, 366, 366, 366, 373, 373, 373, 373, 373, 373, 373, 373, 373, 373, 373, 373, 373, 373, 373, 373, 373, 373, 376, 376, 376, 376, 376, 376, 376, 376, 376, 376, 376, 376, 376, 376, 376, 376, 376, 376, 382, 382, 382, 382, 382, 382, 382, 382, 382, 382, 382, 382, 382, 382, 382, 382, 382, 382, 387, 387, 387, 387, 387, 387, 387, 387, 387, 387, 387, 387, 387, 387, 387, 387, 387, 387, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 411, 411, 411, 411, 411, 411, 411, 411, 411, 411, 411, 411, 411, 411, 411, 411, 411, 411, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 517, 517, 662, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 518, 518, 882, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 519, 519, 399, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 533, 533, 533, 533, 533, 533, 533, 533, 533, 533, 533, 533, 533, 533, 533, 533, 533, 533, 535, 535, 535, 535, 535, 535, 535, 535, 535, 535, 535, 535, 535, 535, 535, 535, 535, 535, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 266, 266, 395, 266, 266, 266, 266, 266, 266, 266, 266, 266, 266, 266, 266, 266, 266, 266, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 363, 363, 363, 363, 363, 363, 363, 363, 363, 363, 363, 363, 363, 363, 363, 363, 645, 363, 366, 366, 366, 366, 366, 366, 366, 366, 366, 366, 366, 366, 366, 366, 366, 366, 366, 366, 373, 373, 373, 373, 373, 373, 373, 373, 373, 373, 373, 373, 373, 373, 373, 373, 864, 373, 376, 376, 376, 376, 376, 376, 376, 376, 376, 376, 376, 376, 376, 376, 376, 376, 376, 376, 382, 382, 382, 382, 382, 382, 382, 382, 382, 382, 382, 382, 382, 382, 382, 382, 382, 382, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 387, 387, 387, 387, 387, 387, 387, 387, 387, 387, 387, 387, 387, 387, 387, 387, 387, 387, 644, 373, 644, 644, 369, 861, 644, 644, 644, 644, 644, 363, 644, 644, 644, 644, 644, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 359, 399, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 661, 858, 661, 661, 355, 773, 661, 661, 661, 661, 661, 538, 661, 661, 661, 661, 661, 411, 411, 411, 411, 411, 411, 411, 411, 411, 411, 411, 411, 411, 411, 411, 411, 411, 411, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 539, 418, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 531, 516, 517, 517, 532, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 518, 518, 514, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 519, 519, 515, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 533, 533, 533, 533, 533, 533, 533, 533, 533, 533, 533, 533, 533, 533, 533, 533, 508, 533, 535, 535, 535, 535, 535, 535, 535, 535, 535, 535, 535, 535, 535, 535, 535, 535, 535, 535, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 752, 540, 266, 266, 738, 266, 266, 266, 266, 266, 266, 266, 266, 266, 266, 266, 266, 266, 266, 266, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 363, 363, 363, 363, 363, 363, 363, 363, 363, 363, 363, 363, 363, 363, 363, 363, 363, 363, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 373, 373, 373, 373, 373, 373, 373, 373, 373, 373, 373, 373, 373, 373, 373, 373, 373, 373, 366, 366, 366, 366, 366, 366, 366, 366, 366, 366, 366, 366, 366, 366, 366, 366, 366, 366, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 868, 479, 868, 868, 734, 696, 868, 868, 868, 868, 868, 681, 868, 868, 868, 868, 868, 868, 871, 437, 871, 871, 428, 414, 871, 871, 871, 871, 871, 417, 871, 871, 871, 871, 871, 871, 387, 387, 387, 387, 387, 387, 387, 387, 387, 387, 387, 387, 387, 387, 387, 387, 387, 387, 644, 395, 644, 644, 398, 390, 644, 644, 644, 644, 644, 385, 644, 644, 644, 644, 644, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 884, 884, 884, 884, 884, 884, 884, 884, 884, 884, 884, 884, 884, 884, 884, 884, 884, 884, 886, 369, 886, 886, 372, 359, 886, 886, 886, 886, 886, 362, 886, 886, 886, 886, 886, 886, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 661, 351, 661, 661, 592, 591, 661, 661, 661, 661, 661, 558, 661, 661, 661, 661, 661, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 411, 411, 411, 411, 411, 411, 411, 411, 411, 411, 411, 411, 411, 411, 411, 411, 411, 411, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 533, 533, 533, 533, 533, 533, 533, 533, 533, 533, 533, 533, 533, 533, 533, 533, 533, 533, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 535, 535, 535, 535, 535, 535, 535, 535, 535, 535, 535, 535, 535, 535, 535, 535, 535, 535, 266, 266, 541, 266, 266, 266, 266, 266, 266, 266, 266, 266, 266, 266, 266, 266, 266, 266, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 366, 366, 366, 366, 366, 366, 366, 366, 366, 366, 366, 366, 366, 366, 366, 366, 366, 366, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 868, 539, 868, 868, 539, 532, 868, 868, 868, 868, 868, 515, 868, 868, 868, 868, 868, 868, 871, 508, 871, 871, 479, 437, 871, 871, 871, 871, 871, 417, 871, 871, 871, 871, 871, 871, 644, 398, 644, 644, 398, 385, 644, 644, 644, 644, 644, 385, 644, 644, 644, 644, 644, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 886, 385, 886, 886, 372, 372, 886, 886, 886, 886, 886, 362, 886, 886, 886, 886, 886, 886, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 890, 351, 890, 890, 317, 3942, 890, 890, 890, 890, 890, 250, 890, 890, 890, 890, 890, 890, 884, 884, 884, 884, 884, 884, 884, 884, 884, 884, 884, 884, 884, 884, 884, 884, 884, 884, 887, 887, 887, 887, 887, 887, 887, 887, 887, 887, 887, 887, 887, 887, 887, 887, 887, 887, 661, 250, 661, 661, 98, 98, 661, 661, 661, 661, 661, 98, 661, 661, 661, 661, 661, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 411, 411, 411, 411, 411, 411, 411, 411, 411, 411, 411, 411, 411, 411, 411, 411, 411, 411, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 98, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 535, 535, 535, 535, 535, 535, 535, 535, 535, 535, 535, 535, 535, 535, 535, 535, 535, 535, 266, 266, 98, 266, 266, 266, 266, 266, 266, 266, 266, 266, 266, 266, 266, 266, 266, 266, 363, 363, 363, 363, 363, 363, 363, 363, 363, 363, 363, 363, 363, 363, 363, 363, 363, 363, 373, 373, 373, 373, 373, 373, 373, 373, 373, 373, 373, 373, 373, 373, 373, 373, 373, 373, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 868, 98, 868, 868, 98, 98, 868, 868, 868, 868, 868, 161, 868, 868, 868, 868, 868, 868, 871, 161, 871, 871, 160, 160, 871, 871, 871, 871, 871, 3942, 871, 871, 871, 871, 871, 871, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 886, 3942, 886, 886, 3942, 3942, 886, 886, 886, 886, 886, 3942, 886, 886, 886, 886, 886, 886, 887, 887, 887, 887, 887, 887, 887, 887, 887, 887, 887, 887, 887, 887, 887, 887, 887, 887, 661, 3942, 661, 661, 3942, 3942, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 1343, 3942, 1343, 1343, 3942, 3942, 1343, 1343, 1343, 3942, 1343, 1343, 1343, 1343, 1343, 1343, 1343, 1343, 1355, 1355, 1355, 1355, 1355, 1355, 1355, 3942, 1355, 3942, 1355, 1355, 1355, 1355, 1355, 1355, 1355, 1355, 1389, 1389, 1389, 1389, 1389, 1389, 1389, 1389, 1389, 1389, 1389, 1389, 1389, 1389, 1389, 1389, 1389, 1389, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 533, 533, 533, 533, 533, 533, 533, 533, 533, 533, 533, 533, 533, 533, 533, 533, 533, 533, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 266, 266, 3942, 266, 266, 266, 266, 266, 266, 266, 266, 266, 266, 266, 266, 266, 266, 266, 884, 884, 884, 884, 884, 884, 884, 884, 884, 884, 884, 884, 884, 884, 884, 884, 884, 884, 1519, 1519, 1519, 1519, 1519, 1519, 1519, 1519, 1519, 1519, 1519, 1519, 1519, 1519, 1519, 1519, 1519, 1519, 1530, 3942, 3942, 1530, 3942, 3942, 1530, 1570, 3942, 3942, 3942, 3942, 3942, 1570, 1570, 1570, 3942, 1570, 1570, 1570, 1570, 1570, 1570, 1570, 1570, 1520, 1520, 1520, 1520, 1520, 1520, 1520, 1520, 1520, 1520, 1520, 1520, 1520, 1520, 1520, 1520, 1520, 1520, 1717, 3942, 3942, 1717, 3942, 1717, 1754, 1754, 1754, 1754, 1754, 1754, 1754, 1754, 1754, 1754, 1754, 1754, 1754, 1754, 1754, 1754, 1754, 1754, 1759, 3942, 3942, 1759, 1759, 3942, 3942, 1759, 3942, 1759, 3942, 1759, 1759, 1759, 1759, 1895, 1895, 1895, 1895, 1939, 1939, 3942, 1939, 1939, 1939, 1939, 1939, 1939, 1939, 1939, 1939, 1939, 1939, 1939, 1939, 1939, 1939, 1941, 1941, 3942, 1941, 1941, 1941, 1941, 1941, 1941, 1941, 1941, 1941, 1941, 1941, 1941, 1941, 1941, 1941, 1945, 3942, 1945, 3942, 1945, 1945, 1945, 1945, 2067, 2067, 2067, 2067, 2067, 2067, 2067, 2067, 2067, 2067, 2067, 2067, 2067, 2067, 2067, 2067, 2067, 2067, 2082, 2082, 2082, 2082, 2082, 2082, 2082, 2082, 2082, 2082, 2082, 2082, 2082, 2082, 2082, 2082, 2082, 2082, 2134, 2134, 2134, 2134, 2134, 2134, 2134, 2134, 2134, 2134, 2134, 2134, 2134, 2134, 2134, 2134, 2134, 2134, 2170, 2170, 3942, 3942, 2170, 2170, 2170, 2170, 2170, 3942, 2170, 2170, 2170, 2170, 2170, 2170, 2170, 2170, 2188, 3942, 3942, 2188, 2188, 3942, 3942, 2188, 3942, 2188, 3942, 2188, 2188, 2188, 2188, 2275, 2275, 2275, 2275, 2275, 2275, 2275, 2275, 2275, 2275, 2275, 2275, 2275, 2275, 2275, 2275, 2275, 2275, 2288, 3942, 2288, 2288, 3942, 3942, 2288, 2288, 2288, 2288, 2288, 2288, 2288, 2288, 2288, 2288, 2288, 2288, 2293, 2293, 2293, 2293, 2293, 2293, 2293, 2293, 2293, 2293, 2293, 2293, 2293, 2293, 2293, 2293, 2293, 2293, 2323, 3942, 3942, 3942, 3942, 3942, 2323, 2323, 2323, 3942, 2323, 2323, 2323, 2323, 2323, 2323, 2323, 2323, 2349, 2349, 3942, 2349, 2349, 2349, 2349, 2349, 2349, 2349, 2349, 2349, 2349, 2349, 2349, 2349, 2349, 2349, 2351, 2351, 3942, 2351, 2351, 2351, 2351, 2351, 2351, 2351, 2351, 2351, 2351, 2351, 2351, 2351, 2351, 2351, 2377, 3942, 3942, 2377, 2377, 3942, 3942, 2377, 3942, 2377, 3942, 2377, 2377, 2377, 2377, 2390, 3942, 3942, 3942, 3942, 3942, 2390, 2390, 2390, 3942, 2390, 2390, 2390, 2390, 2390, 2390, 2390, 2390, 2401, 2401, 3942, 2401, 2401, 3942, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2401, 2406, 3942, 2406, 3942, 2406, 2406, 2406, 2406, 2492, 2492, 2492, 2492, 2492, 2492, 2492, 2492, 2492, 2492, 2492, 2492, 2492, 2492, 2492, 2492, 2492, 2492, 2290, 3942, 2290, 2290, 3942, 3942, 2290, 2290, 2290, 2290, 2290, 2290, 2290, 2290, 2290, 2290, 2290, 2290, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2553, 2553, 2553, 2553, 2553, 2553, 2553, 2553, 2553, 2553, 2553, 2553, 2553, 2553, 2553, 2553, 2553, 2553, 2561, 3942, 3942, 2561, 2561, 3942, 3942, 2561, 3942, 2561, 3942, 2561, 2561, 2561, 2561, 2580, 3942, 2580, 3942, 2580, 2580, 2580, 2580, 2582, 3942, 3942, 2582, 2582, 3942, 3942, 2582, 3942, 2582, 3942, 2582, 2582, 2582, 2582, 2614, 2614, 3942, 2614, 2614, 2614, 2614, 2614, 2614, 2614, 2614, 2614, 2614, 2614, 2614, 2614, 2614, 2681, 3942, 2681, 2681, 3942, 3942, 2681, 2681, 2681, 2681, 2681, 2681, 2681, 2681, 2681, 2681, 2681, 2681, 2493, 2493, 2493, 2493, 2493, 2493, 2493, 2493, 2493, 2493, 2493, 2493, 2493, 2493, 2493, 2493, 2493, 2493, 2495, 2495, 2495, 2495, 2495, 2495, 2495, 2495, 2495, 2495, 2495, 2495, 2495, 2495, 2495, 2495, 2495, 2495, 2692, 2692, 2692, 2692, 2692, 2692, 2692, 2692, 2692, 2692, 2692, 2692, 2692, 2692, 2692, 2692, 2692, 2692, 2696, 3942, 2696, 2696, 3942, 3942, 2696, 2696, 2696, 2696, 2696, 2696, 2696, 2696, 2696, 2696, 2696, 2696, 2293, 2293, 2293, 2293, 2293, 2293, 2293, 2293, 2293, 2293, 2293, 2293, 2293, 2293, 2293, 2293, 2293, 2293, 2082, 2082, 2082, 2082, 2082, 2082, 2082, 2082, 2082, 2082, 2082, 2082, 2082, 2082, 2082, 2082, 2082, 2082, 2349, 2349, 3942, 2349, 2349, 2349, 2349, 2349, 2349, 2349, 2349, 2349, 2349, 2349, 2349, 2349, 2349, 2349, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2550, 2351, 2351, 3942, 2351, 2351, 2351, 2351, 2351, 2351, 2351, 2351, 2351, 2351, 2351, 2351, 2351, 2351, 2351, 2553, 2553, 2553, 2553, 2553, 2553, 2553, 2553, 2553, 2553, 2553, 2553, 2553, 2553, 2553, 2553, 2553, 2553, 2745, 3942, 2745, 3942, 2745, 2745, 2745, 2745, 2561, 3942, 2561, 3942, 2561, 2561, 2561, 2561, 2746, 3942, 3942, 2746, 3942, 3942, 3942, 2746, 3942, 2746, 3942, 2746, 2746, 2746, 2746, 2756, 3942, 3942, 2756, 2756, 3942, 3942, 2756, 3942, 2756, 3942, 2756, 2756, 2756, 2756, 2580, 3942, 3942, 2580, 3942, 2580, 3942, 2580, 2580, 2580, 2580, 2765, 3942, 2765, 3942, 2765, 2765, 2765, 2765, 2582, 3942, 2582, 3942, 2582, 2582, 2582, 2582, 2774, 2774, 3942, 2774, 2774, 3942, 2774, 2774, 2774, 2774, 2774, 2774, 2774, 2774, 2774, 2774, 2774, 2794, 3942, 3942, 2794, 2794, 3942, 3942, 2794, 3942, 2794, 3942, 2794, 2794, 2794, 2794, 2614, 2614, 3942, 2614, 2614, 3942, 2614, 2614, 2614, 2614, 2614, 2614, 2614, 2614, 2614, 2614, 2614, 2798, 2798, 2798, 2798, 2798, 2798, 2798, 2798, 2798, 2798, 2798, 2798, 2798, 2798, 2798, 2798, 2798, 2798, 2275, 2275, 2275, 2275, 2275, 2275, 2275, 2275, 2275, 2275, 2275, 2275, 2275, 2275, 2275, 2275, 2275, 2275, 2067, 2067, 2067, 2067, 2067, 2067, 2067, 2067, 2067, 2067, 2067, 2067, 2067, 2067, 2067, 2067, 2067, 2067, 2681, 3942, 2681, 2681, 3942, 3942, 2681, 2681, 2681, 2681, 2681, 2681, 2681, 2681, 2681, 2681, 2681, 2681, 2288, 3942, 2288, 2288, 3942, 3942, 2288, 2288, 2288, 2288, 2288, 2288, 2288, 2288, 2288, 2288, 2288, 2288, 2858, 2858, 2858, 2858, 2858, 2858, 2858, 2858, 2858, 2858, 2858, 2858, 2858, 2858, 2858, 2858, 2858, 2858, 2492, 2492, 2492, 2492, 2492, 2492, 2492, 2492, 2492, 2492, 2492, 2492, 2492, 2492, 2492, 2492, 2492, 2492, 2859, 2859, 2859, 2859, 2859, 2859, 2859, 2859, 2859, 2859, 2859, 2859, 2859, 2859, 2859, 2859, 2859, 2859, 2493, 2493, 2493, 2493, 2493, 2493, 2493, 2493, 2493, 2493, 2493, 2493, 2493, 2493, 2493, 2493, 2493, 2493, 2290, 3942, 2290, 2290, 3942, 3942, 2290, 2290, 2290, 2290, 2290, 2290, 2290, 2290, 2290, 2290, 2290, 2290, 2872, 2872, 2872, 2872, 2872, 2872, 2872, 2872, 2872, 2872, 2872, 2872, 2872, 2872, 2872, 2872, 2872, 2872, 2495, 2495, 2495, 2495, 2495, 2495, 2495, 2495, 2495, 2495, 2495, 2495, 2495, 2495, 2495, 2495, 2495, 2495, 2692, 2692, 2692, 2692, 2692, 2692, 2692, 2692, 2692, 2692, 2692, 2692, 2692, 2692, 2692, 2692, 2692, 2692, 2696, 3942, 2696, 2696, 3942, 3942, 2696, 2696, 2696, 2696, 2696, 2696, 2696, 2696, 2696, 2696, 2696, 2696, 2293, 2293, 2293, 2293, 2293, 2293, 2293, 2293, 2293, 2293, 2293, 2293, 2293, 2293, 2293, 2293, 2293, 2293, 2082, 2082, 2082, 2082, 2082, 2082, 2082, 2082, 2082, 2082, 2082, 2082, 2082, 2082, 2082, 2082, 2082, 2082, 2745, 3942, 3942, 2745, 3942, 2745, 3942, 2745, 2745, 2745, 2745, 2746, 3942, 2746, 3942, 2746, 2746, 2746, 2746, 2932, 3942, 2932, 3942, 2932, 2932, 2932, 2932, 2756, 3942, 2756, 3942, 2756, 2756, 2756, 2756, 2765, 3942, 3942, 2765, 3942, 2765, 3942, 2765, 2765, 2765, 2765, 2774, 2774, 3942, 2774, 2774, 3942, 2774, 2774, 2774, 2774, 2774, 2774, 2774, 2774, 2774, 2774, 2774, 2962, 3942, 3942, 2962, 2962, 3942, 3942, 2962, 3942, 2962, 3942, 2962, 2962, 2962, 2962, 2971, 3942, 2971, 3942, 2971, 2971, 2971, 2971, 2794, 3942, 2794, 3942, 2794, 2794, 2794, 2794, 2798, 2798, 2798, 2798, 2798, 2798, 2798, 2798, 2798, 2798, 2798, 2798, 2798, 2798, 2798, 2798, 2798, 2798, 2275, 2275, 2275, 2275, 2275, 2275, 2275, 2275, 2275, 2275, 2275, 2275, 2275, 2275, 2275, 2275, 2275, 2275, 2859, 2859, 2859, 2859, 2859, 2859, 2859, 2859, 2859, 2859, 2859, 2859, 2859, 2859, 2859, 2859, 2859, 2859, 2861, 2861, 2861, 2861, 2861, 2861, 2861, 2861, 2861, 2861, 2861, 2861, 2861, 2861, 2861, 2861, 2861, 2861, 2492, 2492, 2492, 2492, 2492, 2492, 2492, 2492, 2492, 2492, 2492, 2492, 2492, 2492, 2492, 2492, 2492, 2492, 2493, 2493, 2493, 2493, 2493, 2493, 2493, 2493, 2493, 2493, 2493, 2493, 2493, 2493, 2493, 2493, 2493, 2493, 2290, 3942, 2290, 2290, 3942, 3942, 2290, 2290, 2290, 2290, 2290, 2290, 2290, 2290, 2290, 2290, 2290, 2290, 2872, 2872, 2872, 2872, 2872, 2872, 2872, 2872, 2872, 2872, 2872, 2872, 2872, 2872, 2872, 2872, 2872, 2872, 2495, 2495, 2495, 2495, 2495, 2495, 2495, 2495, 2495, 2495, 2495, 2495, 2495, 2495, 2495, 2495, 2495, 2495, 2692, 2692, 2692, 2692, 2692, 2692, 2692, 2692, 2692, 2692, 2692, 2692, 2692, 2692, 2692, 2692, 2692, 2692, 2293, 2293, 2293, 2293, 2293, 2293, 2293, 2293, 2293, 2293, 2293, 2293, 2293, 2293, 2293, 2293, 2293, 2293, 3102, 3102, 3942, 3102, 3102, 3942, 3102, 3102, 3102, 3102, 3102, 3102, 3102, 3102, 3102, 3102, 3102, 3105, 3942, 3942, 3105, 3105, 3942, 3942, 3105, 3942, 3105, 3942, 3105, 3105, 3105, 3105, 3108, 3108, 3108, 3108, 3942, 3108, 3108, 3108, 3108, 3108, 3108, 3108, 3108, 3108, 3108, 3108, 3108, 3108, 3123, 3942, 3942, 3942, 3942, 3942, 3123, 3123, 3123, 3942, 3123, 3123, 3123, 3123, 3123, 3123, 3123, 3123, 3199, 3199, 3199, 3199, 3199, 3199, 3199, 3199, 3199, 3199, 3199, 3199, 3199, 3199, 3199, 3199, 3199, 3199, 3242, 3942, 3242, 3942, 3242, 3242, 3242, 3242, 3264, 3264, 3942, 3264, 3264, 3942, 3264, 3264, 3264, 3264, 3264, 3264, 3264, 3264, 3264, 3264, 3264, 3346, 3942, 3942, 3346, 3346, 3942, 3942, 3942, 3942, 3942, 3942, 3346, 3362, 3362, 3942, 3942, 3942, 3362, 3362, 3362, 3362, 3362, 3362, 3362, 3362, 3362, 3362, 3362, 3362, 3362, 3468, 3468, 3942, 3468, 3468, 3942, 3468, 3468, 3468, 3468, 3468, 3468, 3468, 3468, 3468, 3468, 3468, 3478, 3478, 3942, 3478, 3478, 3942, 3478, 3478, 3478, 3478, 3478, 3478, 3478, 3478, 3478, 3478, 3478, 3553, 3553, 3942, 3553, 3553, 3553, 3553, 3553, 3553, 3553, 3553, 3553, 3553, 3553, 3553, 3553, 3553, 3556, 3556, 3942, 3556, 3556, 3556, 3556, 3556, 3556, 3556, 3556, 3556, 3556, 3556, 3556, 3556, 3556, 3600, 3942, 3600, 3942, 3600, 3942, 3600, 3600, 3600, 3600, 3631, 3631, 3942, 3631, 3631, 3942, 3631, 3631, 3631, 3631, 3631, 3631, 3631, 3631, 3631, 3631, 3631, 3632, 3632, 3942, 3632, 3632, 3942, 3632, 3632, 3632, 3632, 3632, 3632, 3632, 3632, 3632, 3632, 3632, 3635, 3635, 3635, 3635, 3635, 3635, 3635, 3635, 3635, 3635, 3635, 3635, 3635, 3635, 3635, 3635, 3635, 3635, 3669, 3942, 3669, 3942, 3669, 3942, 3669, 3669, 3669, 3669, 3673, 3673, 3942, 3673, 3673, 3673, 3673, 3673, 3673, 3673, 3673, 3673, 3673, 3673, 3673, 3673, 3673, 3673, 3684, 3684, 3942, 3684, 3684, 3942, 3684, 3684, 3684, 3684, 3684, 3684, 3684, 3684, 3684, 3684, 3684, 3686, 3686, 3942, 3942, 3686, 3686, 3686, 3686, 3686, 3942, 3686, 3686, 3686, 3686, 3686, 3686, 3686, 3686, 3675, 3675, 3942, 3675, 3675, 3942, 3675, 3675, 3675, 3675, 3675, 3675, 3675, 3675, 3675, 3675, 3675, 3735, 3942, 3942, 3942, 3942, 3942, 3735, 3735, 3735, 3942, 3735, 3735, 3735, 3735, 3735, 3735, 3735, 3735, 3677, 3942, 3942, 3942, 3942, 3942, 3677, 3677, 3677, 3942, 3677, 3677, 3677, 3677, 3677, 3677, 3677, 3677, 3738, 3942, 3942, 3738, 3738, 3942, 3942, 3738, 3942, 3738, 3942, 3738, 3738, 3738, 3738, 3741, 3741, 3942, 3741, 3741, 3942, 3741, 3741, 3741, 3741, 3741, 3741, 3741, 3741, 3741, 3741, 3741, 3742, 3942, 3942, 3942, 3942, 3942, 3742, 3742, 3742, 3942, 3742, 3742, 3742, 3742, 3742, 3742, 3742, 3742, 3779, 3942, 3779, 3942, 3779, 3779, 3779, 3779, 3780, 3780, 3942, 3780, 3780, 3942, 3780, 3780, 3780, 3780, 3780, 3780, 3780, 3780, 3780, 3780, 3780, 3781, 3781, 3781, 3781, 3781, 3781, 3781, 3781, 3781, 3781, 3781, 3781, 3781, 3781, 3781, 3781, 3781, 3781, 3827, 3827, 3942, 3827, 3827, 3942, 3827, 3827, 3827, 3827, 3827, 3827, 3827, 3827, 3827, 3827, 3827, 3830, 3830, 3942, 3942, 3830, 3830, 3830, 3830, 3830, 3942, 3830, 3830, 3830, 3830, 3830, 3830, 3830, 3830, 3832, 3832, 3942, 3942, 3832, 3832, 3832, 3832, 3832, 3942, 3832, 3832, 3832, 3832, 3832, 3832, 3832, 3832, 3860, 3860, 3942, 3860, 3860, 3942, 3860, 3860, 3860, 3860, 3860, 3860, 3860, 3860, 3860, 3860, 3860, 3861, 3861, 3942, 3861, 3861, 3942, 3861, 3861, 3861, 3861, 3861, 3861, 3861, 3861, 3861, 3861, 3861, 3862, 3862, 3942, 3942, 3862, 3862, 3862, 3862, 3862, 3942, 3862, 3862, 3862, 3862, 3862, 3862, 3862, 3862, 3864, 3864, 3942, 3942, 3864, 3864, 3864, 3864, 3864, 3942, 3864, 3864, 3864, 3864, 3864, 3864, 3864, 3864, 3878, 3942, 3878, 3942, 3878, 3942, 3878, 3878, 3878, 3878, 3880, 3880, 3942, 3880, 3880, 3880, 3880, 3880, 3880, 3880, 3880, 3880, 3880, 3880, 3880, 3880, 3880, 3891, 3891, 3942, 3891, 3891, 3942, 3891, 3891, 3891, 3891, 3891, 3891, 3891, 3891, 3891, 3891, 3891, 3892, 3892, 3942, 3892, 3892, 3942, 3892, 3892, 3892, 3892, 3892, 3892, 3892, 3892, 3892, 3892, 3892, 3904, 3942, 3904, 3942, 3904, 3942, 3904, 3904, 3904, 3904, 3905, 3942, 3942, 3942, 3942, 3942, 3905, 3905, 3905, 3942, 3905, 3905, 3905, 3905, 3905, 3905, 3905, 3905, 75, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942 } ; static const flex_int16_t yy_chk[14319] = { 0, 0, 1, 1, 1, 1, 5, 1, 1, 5, 6, 95, 95, 6, 0, 1, 7, 7, 7, 7, 7, 7, 0, 9, 9, 7, 9, 9, 13, 7, 1188, 1, 13, 1, 1, 3918, 83, 13, 1, 1, 1, 116, 116, 14, 1, 1, 1, 14, 1, 1, 3905, 9, 14, 1, 873, 15, 15, 1, 15, 1, 873, 1, 1, 15, 83, 15, 1, 1, 1, 71, 84, 7, 1, 1, 1, 1188, 1, 1, 9, 132, 132, 1, 2, 2, 2, 2, 71, 2, 2, 10, 10, 72, 10, 10, 85, 2, 21, 21, 84, 21, 7, 7, 86, 11, 11, 49, 11, 11, 72, 49, 15, 2, 49, 2, 2, 87, 3892, 10, 2, 2, 2, 88, 85, 773, 2, 2, 2, 89, 2, 2, 86, 11, 92, 2, 250, 118, 250, 2, 118, 2, 773, 2, 2, 87, 10, 3891, 2, 2, 2, 88, 3880, 21, 2, 2, 2, 89, 2, 2, 11, 49, 92, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 8, 8, 8, 8, 8, 8, 93, 12, 12, 8, 12, 12, 3861, 8, 16, 16, 2288, 16, 17, 17, 3860, 17, 16, 17, 16, 47, 17, 47, 18, 18, 2288, 18, 47, 18, 93, 12, 18, 19, 19, 137, 19, 137, 19, 20, 20, 19, 20, 257, 20, 257, 19, 20, 48, 94, 48, 8, 20, 22, 22, 48, 22, 81, 12, 220, 81, 297, 90, 33, 33, 16, 33, 100, 33, 17, 90, 33, 297, 27, 27, 47, 27, 94, 27, 18, 8, 8, 137, 27, 35, 35, 27, 35, 19, 27, 90, 3850, 35, 91, 20, 100, 28, 28, 90, 28, 27, 28, 48, 101, 81, 139, 28, 139, 22, 28, 91, 388, 28, 220, 29, 29, 104, 29, 33, 29, 3819, 91, 29, 28, 29, 107, 143, 29, 27, 143, 29, 101, 30, 30, 3817, 30, 108, 30, 91, 35, 30, 29, 30, 3813, 104, 30, 36, 36, 30, 36, 388, 28, 139, 107, 36, 213, 213, 27, 27, 30, 223, 223, 31, 31, 108, 31, 109, 31, 45, 29, 31, 45, 31, 45, 46, 31, 143, 46, 31, 46, 28, 28, 65, 32, 32, 65, 32, 30, 32, 31, 65, 32, 97, 32, 109, 97, 32, 34, 34, 32, 34, 36, 34, 114, 65, 34, 39, 39, 39, 39, 32, 39, 115, 40, 40, 40, 40, 31, 40, 39, 105, 140, 105, 45, 196, 219, 40, 196, 219, 46, 219, 114, 65, 195, 195, 195, 195, 3812, 32, 225, 115, 3805, 225, 226, 226, 265, 265, 97, 105, 140, 105, 3782, 34, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 41, 41, 41, 41, 147, 41, 42, 42, 42, 42, 153, 42, 43, 43, 43, 43, 3779, 43, 44, 44, 44, 44, 50, 44, 102, 66, 50, 59, 66, 50, 286, 286, 147, 66, 73, 60, 102, 73, 153, 73, 129, 74, 73, 129, 74, 283, 74, 66, 283, 74, 315, 318, 102, 315, 318, 41, 73, 185, 59, 67, 59, 42, 185, 74, 102, 173, 60, 43, 60, 59, 59, 59, 59, 44, 2693, 66, 50, 60, 60, 60, 60, 68, 77, 77, 73, 77, 59, 348, 59, 183, 67, 74, 67, 173, 60, 129, 60, 59, 59, 59, 59, 67, 67, 67, 67, 60, 60, 60, 60, 185, 99, 484, 68, 99, 68, 103, 2693, 183, 67, 106, 67, 111, 103, 68, 68, 68, 68, 189, 110, 67, 67, 67, 67, 106, 348, 3770, 111, 77, 99, 106, 68, 99, 68, 103, 110, 112, 177, 106, 177, 111, 103, 68, 68, 68, 68, 189, 110, 3742, 113, 309, 112, 106, 113, 113, 111, 484, 145, 106, 198, 145, 309, 2860, 110, 112, 119, 119, 119, 119, 201, 119, 120, 120, 120, 120, 179, 120, 113, 179, 112, 177, 113, 113, 121, 121, 121, 121, 198, 121, 126, 126, 126, 126, 199, 126, 203, 133, 201, 138, 133, 199, 138, 142, 142, 2860, 187, 138, 145, 138, 142, 187, 142, 199, 133, 133, 148, 148, 436, 436, 148, 119, 199, 148, 203, 133, 179, 120, 133, 199, 144, 156, 156, 144, 156, 144, 3735, 181, 144, 121, 181, 199, 133, 133, 205, 126, 131, 131, 131, 131, 131, 131, 208, 131, 138, 211, 131, 142, 187, 405, 131, 149, 131, 131, 149, 131, 131, 131, 188, 149, 148, 188, 205, 642, 131, 131, 131, 131, 131, 131, 208, 131, 3706, 211, 131, 144, 156, 181, 131, 151, 131, 131, 151, 131, 131, 131, 150, 151, 405, 150, 494, 150, 157, 157, 150, 157, 155, 155, 200, 150, 155, 149, 642, 155, 159, 159, 159, 159, 155, 162, 162, 200, 162, 188, 162, 166, 166, 212, 166, 346, 166, 346, 162, 876, 380, 3704, 200, 380, 166, 151, 169, 166, 3667, 169, 210, 169, 162, 210, 169, 200, 435, 150, 166, 435, 494, 212, 2873, 157, 167, 167, 155, 167, 169, 167, 868, 168, 168, 230, 168, 159, 168, 167, 876, 202, 162, 210, 346, 1389, 168, 186, 166, 170, 186, 202, 170, 167, 170, 186, 206, 170, 169, 170, 168, 3662, 170, 230, 206, 171, 2873, 235, 171, 202, 171, 162, 162, 171, 904, 359, 170, 166, 166, 202, 224, 167, 414, 224, 206, 224, 174, 171, 168, 174, 1389, 174, 206, 176, 174, 235, 176, 174, 176, 243, 868, 176, 186, 176, 170, 498, 176, 2063, 174, 2063, 167, 167, 178, 178, 521, 171, 178, 168, 168, 178, 176, 178, 359, 180, 178, 521, 180, 243, 180, 414, 244, 180, 3636, 184, 184, 224, 174, 184, 178, 3632, 184, 904, 190, 190, 190, 486, 486, 197, 176, 190, 192, 192, 192, 192, 204, 245, 197, 209, 244, 498, 197, 209, 207, 192, 246, 197, 178, 209, 227, 207, 496, 496, 204, 227, 204, 197, 209, 176, 180, 207, 501, 501, 204, 245, 197, 209, 228, 184, 197, 209, 207, 228, 246, 197, 231, 209, 190, 207, 232, 231, 204, 232, 204, 233, 209, 192, 233, 207, 214, 214, 214, 214, 217, 217, 217, 217, 218, 218, 218, 218, 227, 218, 221, 221, 221, 221, 247, 221, 222, 222, 222, 222, 236, 222, 248, 236, 251, 253, 228, 251, 260, 2064, 254, 2064, 251, 254, 231, 269, 232, 423, 254, 270, 258, 233, 247, 258, 267, 258, 251, 267, 258, 271, 248, 214, 254, 253, 272, 217, 260, 263, 263, 218, 263, 262, 258, 269, 262, 221, 262, 270, 273, 262, 236, 222, 274, 275, 251, 276, 278, 271, 279, 280, 254, 280, 272, 262, 423, 282, 285, 281, 287, 285, 258, 267, 288, 289, 290, 291, 273, 292, 293, 294, 274, 275, 281, 276, 278, 295, 279, 280, 296, 280, 298, 262, 263, 282, 299, 281, 287, 300, 301, 302, 288, 289, 290, 291, 303, 292, 293, 294, 304, 305, 281, 307, 304, 295, 304, 308, 296, 310, 298, 306, 306, 285, 299, 311, 312, 300, 301, 302, 313, 314, 323, 327, 303, 323, 327, 323, 304, 305, 507, 307, 304, 325, 304, 308, 325, 310, 325, 306, 306, 328, 329, 311, 312, 330, 332, 3631, 313, 314, 319, 319, 319, 319, 886, 319, 320, 320, 320, 320, 335, 320, 321, 321, 321, 321, 333, 321, 331, 328, 329, 331, 336, 330, 332, 335, 337, 507, 327, 338, 333, 333, 334, 1115, 334, 339, 340, 341, 335, 1115, 340, 342, 344, 337, 333, 442, 331, 345, 337, 331, 336, 345, 745, 335, 337, 319, 3590, 338, 333, 333, 334, 320, 334, 339, 340, 341, 343, 321, 340, 342, 344, 337, 886, 442, 349, 345, 337, 349, 369, 345, 343, 343, 349, 369, 349, 350, 350, 351, 353, 351, 354, 353, 350, 355, 343, 355, 353, 354, 353, 354, 356, 362, 360, 356, 362, 360, 745, 360, 343, 343, 360, 361, 361, 363, 364, 514, 363, 364, 361, 364, 365, 443, 364, 366, 365, 369, 366, 365, 2265, 349, 2265, 366, 372, 370, 351, 372, 370, 3035, 370, 350, 355, 370, 441, 353, 354, 441, 370, 371, 371, 443, 356, 362, 373, 374, 371, 373, 374, 360, 374, 371, 373, 374, 514, 363, 375, 361, 374, 444, 375, 364, 524, 375, 411, 366, 365, 411, 375, 376, 376, 3035, 376, 524, 372, 377, 377, 445, 377, 398, 370, 379, 379, 379, 379, 381, 381, 444, 381, 384, 384, 446, 384, 371, 373, 1108, 382, 382, 398, 382, 374, 382, 384, 395, 474, 445, 395, 474, 395, 382, 375, 395, 386, 386, 411, 386, 384, 386, 447, 446, 2616, 416, 416, 382, 376, 386, 398, 2798, 416, 448, 377, 488, 387, 387, 488, 387, 379, 387, 483, 386, 381, 483, 421, 483, 384, 387, 447, 421, 387, 389, 389, 382, 389, 395, 389, 390, 390, 448, 390, 387, 390, 391, 389, 1108, 391, 389, 391, 386, 390, 391, 2616, 426, 426, 384, 384, 416, 389, 2798, 426, 428, 382, 382, 390, 391, 428, 394, 403, 387, 394, 403, 394, 403, 449, 394, 421, 396, 386, 386, 396, 2266, 396, 2266, 403, 396, 389, 396, 3574, 394, 396, 417, 390, 391, 417, 403, 397, 397, 387, 387, 397, 562, 449, 397, 396, 397, 399, 426, 397, 399, 3556, 399, 562, 428, 399, 389, 389, 394, 427, 427, 427, 390, 390, 403, 425, 427, 401, 425, 399, 401, 402, 401, 396, 402, 401, 402, 401, 565, 402, 401, 402, 417, 418, 402, 487, 418, 402, 487, 565, 487, 397, 403, 403, 401, 451, 420, 399, 402, 1319, 420, 404, 406, 420, 404, 406, 404, 406, 3553, 404, 406, 404, 406, 427, 404, 406, 415, 404, 406, 415, 425, 415, 401, 451, 415, 857, 402, 409, 404, 406, 409, 431, 409, 418, 410, 409, 431, 409, 410, 419, 409, 410, 419, 410, 419, 424, 410, 419, 424, 495, 420, 401, 495, 424, 409, 402, 404, 406, 429, 1328, 410, 429, 430, 3525, 430, 454, 429, 1319, 455, 430, 456, 415, 857, 452, 432, 432, 432, 432, 438, 438, 438, 438, 409, 431, 452, 404, 406, 432, 410, 450, 457, 450, 458, 454, 419, 450, 455, 459, 456, 460, 424, 452, 462, 463, 462, 464, 465, 466, 459, 467, 468, 467, 452, 429, 469, 464, 430, 450, 457, 450, 458, 471, 472, 450, 465, 459, 1328, 460, 1323, 432, 462, 463, 462, 464, 465, 466, 459, 467, 468, 467, 473, 489, 469, 464, 489, 500, 489, 1326, 500, 471, 472, 3520, 465, 470, 470, 493, 470, 505, 493, 470, 493, 470, 505, 470, 470, 470, 520, 470, 473, 470, 470, 470, 470, 476, 476, 476, 476, 480, 480, 480, 480, 470, 470, 497, 470, 508, 497, 470, 497, 470, 508, 470, 470, 470, 520, 470, 1323, 470, 470, 470, 470, 481, 481, 481, 481, 482, 482, 482, 482, 505, 482, 485, 485, 485, 485, 1326, 485, 491, 491, 491, 491, 2800, 491, 522, 492, 492, 492, 492, 476, 492, 499, 502, 480, 499, 502, 499, 503, 508, 510, 503, 523, 503, 511, 510, 515, 511, 516, 515, 525, 516, 532, 522, 2137, 2137, 531, 528, 481, 531, 528, 542, 482, 557, 531, 528, 557, 543, 485, 533, 523, 532, 533, 2800, 491, 544, 545, 533, 525, 528, 535, 492, 539, 535, 539, 535, 1575, 499, 535, 542, 546, 533, 510, 547, 511, 543, 515, 538, 516, 532, 538, 539, 535, 544, 545, 538, 531, 528, 548, 540, 550, 551, 540, 552, 540, 553, 555, 540, 546, 533, 556, 547, 558, 559, 560, 558, 561, 563, 564, 539, 535, 540, 590, 566, 2976, 590, 548, 567, 550, 551, 1575, 552, 568, 553, 555, 570, 571, 538, 556, 3509, 3499, 559, 560, 572, 561, 563, 564, 573, 574, 540, 554, 566, 554, 554, 575, 567, 554, 554, 554, 576, 568, 3497, 554, 570, 571, 554, 579, 554, 554, 554, 554, 572, 554, 554, 2976, 573, 574, 580, 554, 581, 554, 554, 575, 577, 554, 554, 554, 576, 578, 578, 554, 582, 583, 554, 579, 554, 554, 554, 554, 585, 554, 554, 577, 586, 587, 580, 588, 581, 593, 591, 589, 577, 591, 594, 595, 596, 578, 578, 598, 582, 583, 589, 599, 600, 588, 602, 603, 585, 606, 607, 577, 586, 587, 608, 588, 609, 593, 610, 611, 612, 613, 594, 595, 596, 614, 615, 598, 616, 617, 618, 599, 600, 588, 602, 603, 619, 606, 607, 620, 626, 620, 608, 626, 609, 869, 610, 611, 612, 613, 646, 869, 623, 614, 615, 623, 616, 617, 618, 3478, 623, 646, 623, 624, 619, 637, 624, 629, 637, 640, 629, 624, 629, 624, 630, 629, 655, 630, 638, 630, 632, 638, 630, 632, 635, 645, 620, 635, 632, 635, 626, 636, 635, 3432, 636, 645, 636, 635, 645, 636, 639, 639, 860, 639, 636, 639, 674, 623, 640, 649, 682, 895, 649, 639, 649, 655, 639, 649, 624, 869, 641, 641, 629, 641, 683, 641, 684, 639, 3425, 630, 632, 649, 669, 641, 674, 669, 641, 640, 682, 635, 643, 643, 899, 643, 655, 643, 636, 641, 679, 860, 895, 679, 683, 643, 684, 639, 643, 3393, 662, 649, 647, 647, 1391, 647, 685, 647, 645, 643, 662, 3329, 663, 662, 686, 647, 653, 641, 647, 653, 663, 653, 687, 899, 669, 652, 639, 639, 652, 647, 652, 663, 653, 652, 685, 652, 3311, 643, 652, 675, 688, 652, 686, 653, 675, 679, 641, 641, 654, 1391, 687, 654, 652, 654, 3295, 690, 654, 647, 654, 663, 691, 654, 692, 3289, 654, 693, 643, 643, 688, 656, 694, 653, 656, 695, 656, 654, 697, 656, 698, 656, 652, 662, 656, 690, 754, 656, 647, 647, 691, 754, 692, 675, 664, 693, 3287, 664, 656, 664, 694, 653, 653, 695, 657, 654, 697, 657, 698, 657, 664, 652, 657, 733, 657, 699, 733, 657, 3281, 658, 657, 664, 658, 701, 658, 1938, 656, 658, 702, 658, 734, 657, 658, 734, 654, 658, 672, 659, 754, 672, 659, 672, 659, 699, 672, 659, 658, 659, 3242, 664, 659, 701, 2268, 659, 2268, 656, 702, 660, 673, 657, 660, 673, 660, 673, 659, 660, 673, 660, 678, 905, 660, 678, 665, 660, 658, 665, 678, 665, 664, 1938, 665, 3208, 665, 735, 660, 665, 735, 680, 665, 703, 680, 672, 659, 737, 705, 680, 737, 666, 706, 665, 666, 707, 666, 658, 708, 666, 667, 666, 905, 667, 666, 667, 660, 673, 667, 736, 667, 703, 736, 667, 736, 659, 705, 678, 666, 709, 706, 665, 823, 707, 710, 712, 708, 667, 714, 715, 696, 716, 717, 823, 3171, 660, 680, 696, 696, 696, 696, 696, 696, 696, 696, 696, 666, 709, 713, 719, 665, 721, 710, 712, 720, 667, 714, 715, 723, 716, 717, 713, 713, 722, 713, 713, 718, 724, 718, 720, 725, 726, 718, 722, 727, 728, 713, 719, 2471, 721, 2471, 732, 720, 727, 740, 743, 723, 740, 743, 713, 713, 722, 713, 713, 718, 724, 718, 720, 725, 726, 718, 722, 727, 728, 729, 1695, 729, 738, 729, 732, 738, 727, 738, 739, 741, 753, 739, 741, 739, 741, 744, 746, 761, 744, 746, 744, 746, 747, 748, 762, 747, 748, 729, 748, 729, 750, 729, 763, 750, 751, 750, 752, 751, 753, 752, 758, 752, 764, 758, 3048, 761, 766, 774, 775, 766, 770, 776, 762, 770, 766, 770, 777, 778, 770, 780, 763, 781, 3158, 782, 783, 784, 790, 1695, 766, 787, 764, 3153, 770, 787, 786, 774, 775, 787, 791, 776, 785, 786, 792, 795, 777, 778, 3048, 780, 786, 781, 758, 782, 783, 784, 790, 785, 766, 787, 785, 788, 770, 787, 786, 789, 793, 787, 791, 797, 785, 786, 792, 795, 798, 788, 794, 788, 786, 796, 799, 796, 793, 801, 789, 785, 801, 802, 785, 788, 804, 794, 806, 789, 793, 809, 810, 797, 802, 811, 3123, 812, 798, 788, 794, 788, 813, 796, 799, 796, 793, 814, 789, 815, 817, 818, 819, 820, 804, 794, 806, 821, 822, 809, 810, 824, 825, 811, 802, 812, 826, 828, 829, 831, 813, 830, 832, 834, 835, 814, 834, 815, 817, 818, 819, 820, 830, 836, 837, 821, 822, 838, 839, 824, 825, 840, 841, 830, 826, 828, 829, 831, 842, 843, 832, 844, 835, 846, 847, 848, 849, 850, 851, 852, 853, 836, 837, 848, 854, 838, 839, 855, 856, 840, 841, 830, 858, 908, 858, 861, 842, 843, 861, 844, 3108, 846, 847, 848, 849, 850, 851, 852, 853, 3200, 859, 848, 854, 859, 862, 855, 856, 862, 859, 862, 859, 863, 862, 870, 864, 865, 863, 864, 865, 866, 865, 874, 866, 865, 870, 882, 915, 911, 865, 858, 908, 3062, 874, 867, 867, 861, 867, 881, 867, 1520, 881, 3200, 881, 867, 882, 881, 867, 916, 977, 867, 978, 977, 917, 978, 915, 859, 888, 1318, 863, 862, 867, 3060, 888, 3136, 864, 914, 872, 872, 914, 872, 865, 872, 882, 883, 911, 916, 883, 3058, 883, 872, 917, 883, 872, 883, 1520, 912, 883, 881, 867, 883, 912, 909, 870, 872, 909, 918, 1318, 889, 884, 885, 883, 884, 885, 884, 885, 889, 884, 885, 884, 885, 919, 884, 885, 3136, 884, 885, 889, 867, 867, 887, 914, 872, 887, 918, 887, 884, 885, 887, 883, 887, 888, 891, 887, 996, 891, 887, 891, 912, 919, 980, 920, 909, 980, 921, 889, 3054, 887, 891, 924, 3045, 872, 872, 913, 884, 885, 913, 925, 883, 891, 1329, 913, 893, 892, 928, 893, 892, 893, 892, 920, 3037, 892, 921, 892, 889, 887, 892, 924, 893, 892, 3512, 996, 3512, 884, 885, 925, 998, 891, 894, 893, 892, 894, 928, 894, 3028, 931, 894, 896, 894, 1329, 896, 894, 896, 1114, 894, 896, 898, 896, 913, 898, 896, 898, 932, 896, 898, 894, 891, 893, 892, 2138, 2138, 3018, 897, 931, 896, 897, 900, 897, 898, 900, 897, 900, 897, 998, 900, 897, 910, 2977, 897, 910, 932, 910, 1114, 894, 910, 893, 933, 892, 900, 897, 981, 935, 896, 981, 906, 907, 898, 906, 907, 906, 907, 922, 906, 907, 906, 907, 922, 906, 907, 983, 906, 1114, 983, 2138, 933, 2975, 900, 897, 922, 935, 936, 906, 907, 979, 986, 2971, 979, 986, 979, 922, 2932, 910, 937, 939, 922, 929, 929, 929, 929, 929, 929, 929, 929, 929, 940, 941, 922, 942, 936, 906, 907, 930, 930, 930, 930, 930, 930, 930, 930, 930, 937, 939, 943, 945, 946, 947, 948, 949, 950, 951, 953, 952, 940, 941, 952, 942, 954, 955, 906, 956, 957, 958, 959, 960, 961, 962, 963, 966, 2894, 968, 943, 945, 946, 947, 948, 949, 950, 951, 953, 965, 969, 970, 952, 965, 954, 955, 971, 956, 957, 958, 959, 960, 961, 962, 963, 966, 967, 968, 972, 967, 973, 976, 989, 991, 1000, 989, 991, 965, 969, 970, 982, 965, 2883, 982, 971, 982, 984, 985, 997, 984, 985, 984, 985, 997, 967, 1001, 972, 967, 973, 976, 987, 990, 1000, 987, 990, 987, 990, 992, 993, 1002, 992, 993, 992, 994, 995, 1003, 994, 995, 994, 999, 1005, 1004, 999, 1001, 1004, 1006, 1003, 1007, 1006, 1004, 1006, 1011, 1012, 1006, 1014, 1015, 1016, 1002, 1017, 1005, 997, 3592, 1018, 3592, 1019, 1020, 1007, 2882, 1021, 1022, 1023, 1024, 1025, 1025, 1025, 1025, 1026, 1027, 1028, 1011, 1012, 1027, 1014, 1015, 1016, 1029, 1017, 1005, 1030, 999, 1018, 1004, 1019, 1020, 1007, 1006, 1021, 1022, 1023, 1024, 1025, 1025, 1025, 1025, 1026, 1027, 1028, 1031, 1032, 1027, 1033, 1034, 1035, 1029, 1036, 1037, 1030, 1038, 1039, 1037, 1040, 1037, 1039, 1041, 1042, 1043, 1044, 1045, 1046, 2866, 1049, 1050, 1052, 1051, 1053, 1031, 1032, 1040, 1033, 1034, 1035, 1054, 1036, 1037, 1051, 1038, 1039, 1037, 1040, 1037, 1039, 1041, 1042, 1043, 1044, 1045, 1046, 1048, 1049, 1050, 1052, 1048, 1053, 1055, 1056, 1040, 1057, 1058, 1048, 1054, 1048, 1059, 1060, 1062, 1051, 1063, 1064, 1065, 1066, 1068, 1069, 1070, 2865, 1190, 1072, 1048, 1190, 1073, 1075, 1048, 1076, 1055, 1056, 1077, 1057, 1058, 1048, 2856, 1048, 1059, 1060, 1062, 1078, 1063, 1064, 1065, 1066, 1068, 1069, 1070, 1071, 1071, 1072, 1079, 1071, 1073, 1075, 1080, 1076, 1071, 1081, 1077, 1082, 1083, 1084, 1071, 1085, 1086, 1087, 1071, 1078, 1071, 1089, 1090, 1091, 1092, 1093, 1094, 1071, 1071, 1095, 1079, 1071, 1096, 1097, 1080, 1098, 1071, 1081, 1099, 1082, 1083, 1084, 1071, 1085, 1086, 1087, 1071, 1100, 1071, 1089, 1090, 1091, 1092, 1093, 1094, 1107, 1112, 1095, 1107, 1112, 1096, 1097, 1113, 1098, 1106, 1106, 1099, 1106, 1111, 1106, 2815, 1111, 1126, 1111, 1118, 1100, 1111, 1106, 1111, 1568, 1106, 1111, 1118, 1191, 1111, 1128, 1191, 1193, 1122, 1116, 1193, 1106, 1116, 1118, 1116, 1111, 1122, 1116, 1117, 1116, 1126, 1117, 1116, 1117, 1130, 1116, 1117, 1122, 1117, 1131, 1133, 1117, 1135, 1128, 1117, 1120, 1116, 1136, 1120, 1106, 1120, 1118, 1138, 1111, 1568, 1117, 1107, 1112, 2814, 1113, 1113, 1120, 1130, 2805, 1139, 1122, 1192, 1131, 1133, 1192, 1135, 1192, 1120, 1194, 1116, 1136, 1194, 2799, 1106, 1106, 1138, 1119, 1111, 1117, 1119, 1121, 1119, 2765, 1121, 1119, 1121, 1119, 1139, 1121, 1119, 1121, 1141, 1119, 1121, 1123, 1120, 1121, 1123, 1116, 1123, 1137, 1143, 1144, 1119, 1145, 1146, 1147, 1121, 1151, 1153, 1123, 1156, 1157, 1158, 1159, 2745, 1137, 1160, 1161, 1141, 1162, 1123, 1195, 1196, 2696, 1195, 1196, 1195, 1137, 1143, 1144, 1119, 1145, 1146, 1147, 1121, 1151, 1153, 2685, 1156, 1157, 1158, 1159, 1142, 1137, 1160, 1161, 1164, 1162, 1123, 1142, 1142, 1142, 1142, 1142, 1142, 1142, 1142, 1142, 1165, 1119, 1163, 1163, 1163, 1163, 1163, 1163, 1163, 1163, 1163, 1166, 1167, 1168, 1169, 1170, 1164, 1171, 1171, 1123, 1172, 1173, 1174, 1175, 1177, 1178, 1179, 1180, 1165, 1181, 1183, 1184, 1185, 1186, 1186, 1198, 2681, 1202, 1198, 1166, 1167, 1168, 1169, 1170, 1200, 1171, 1171, 1200, 1172, 1173, 1174, 1175, 1177, 1178, 1179, 1180, 1206, 1181, 1183, 1184, 1185, 1186, 1186, 1197, 1199, 1202, 1197, 1199, 1197, 1199, 1201, 1207, 1208, 1201, 1215, 1216, 1217, 1219, 1220, 1222, 1223, 1224, 1225, 1226, 1206, 1227, 1228, 1229, 1230, 1231, 1232, 1233, 1234, 1235, 1230, 1236, 1237, 1238, 1239, 1207, 1208, 1240, 1215, 1216, 1217, 1219, 1220, 1222, 1223, 1224, 1225, 1226, 1241, 1227, 1228, 1229, 1230, 1231, 1232, 1233, 1234, 1235, 1230, 1236, 1237, 1238, 1239, 1242, 1243, 1240, 1244, 1245, 1246, 1247, 1248, 1249, 1250, 1251, 1252, 1253, 1241, 1254, 1255, 1256, 1258, 1259, 1260, 1261, 1262, 1263, 1266, 2643, 2642, 1252, 1268, 1242, 1243, 2618, 1244, 1245, 1246, 1247, 1248, 1249, 1250, 1251, 1252, 1253, 1265, 1254, 1255, 1256, 1258, 1259, 1260, 1261, 1262, 1263, 1266, 1265, 1267, 1252, 1268, 1269, 1265, 1265, 1270, 1272, 1273, 1274, 1275, 1267, 1277, 1278, 1279, 1280, 1265, 1282, 1284, 1285, 1286, 1288, 1287, 1289, 1290, 1292, 1294, 1265, 1287, 1295, 1296, 1269, 1265, 1265, 1270, 1272, 1273, 1274, 1275, 1297, 1277, 1278, 1279, 1280, 1298, 1282, 1284, 1285, 1286, 1288, 1287, 1289, 1290, 1292, 1294, 1299, 1287, 1295, 1296, 1300, 1301, 1302, 1303, 1304, 1305, 1306, 1308, 1297, 1309, 1310, 1311, 1312, 1298, 1313, 1314, 1315, 1316, 1317, 1321, 1332, 2580, 1335, 1393, 1299, 1331, 1393, 2553, 1300, 1301, 1302, 1303, 1304, 1305, 1306, 1308, 1331, 1309, 1310, 1311, 1312, 1398, 1313, 1314, 1315, 1316, 1322, 1325, 1332, 1322, 1335, 1322, 1398, 1336, 1322, 1325, 1322, 1317, 1321, 1322, 1337, 1338, 1322, 3594, 1327, 3594, 1325, 1327, 1339, 1327, 3561, 1340, 1394, 1322, 1333, 1394, 1333, 1341, 2550, 1342, 1327, 1336, 1345, 3663, 1347, 3663, 1317, 1321, 1337, 1338, 1330, 1327, 1331, 1330, 1325, 1330, 1339, 1348, 1330, 1340, 1330, 1322, 1333, 1330, 1333, 1341, 1330, 1342, 1344, 1349, 1345, 1344, 1347, 1344, 1350, 1351, 1352, 1330, 1344, 1327, 3561, 1344, 1353, 1325, 2541, 1348, 1354, 1356, 1362, 1364, 1367, 1368, 1369, 1370, 1371, 1395, 1396, 1349, 1395, 1396, 1395, 1397, 1350, 1351, 1397, 1330, 1352, 1372, 1327, 1373, 1353, 1374, 1352, 1375, 1354, 1356, 1362, 1364, 1367, 1368, 1369, 1370, 1371, 1344, 1363, 1363, 1363, 1363, 1363, 1363, 1363, 1363, 1363, 1376, 1352, 1372, 1378, 1373, 1379, 1374, 1352, 1375, 1380, 1381, 1383, 1384, 1385, 1386, 1387, 1388, 1399, 1384, 1400, 1403, 1404, 1405, 1406, 1407, 1405, 1408, 1409, 1376, 1410, 1411, 1378, 1412, 1379, 1413, 1414, 1415, 1380, 1381, 1383, 1384, 1385, 1386, 1387, 1388, 1399, 1384, 1400, 1403, 1404, 1417, 1406, 1407, 1416, 1408, 1409, 1418, 1410, 1411, 1419, 1412, 1420, 1413, 1414, 1415, 1421, 1416, 1422, 1423, 1424, 1425, 1416, 1427, 1428, 1426, 1429, 1430, 1431, 1417, 1432, 1426, 1416, 1426, 1433, 1418, 1426, 1435, 1419, 2539, 1420, 1436, 1437, 1438, 1421, 1416, 1422, 1423, 1424, 1425, 1416, 1427, 1428, 1426, 1429, 1430, 1431, 1439, 1432, 1426, 1440, 1426, 1433, 1434, 1426, 1435, 1441, 1434, 1442, 1436, 1437, 1438, 1443, 1444, 1434, 1445, 1434, 1434, 1446, 1434, 1447, 1448, 1449, 1450, 1451, 1439, 1452, 1453, 1440, 1454, 1455, 1434, 1460, 1461, 1441, 1434, 1442, 1462, 1463, 1464, 1443, 1444, 1434, 1445, 1434, 1434, 1446, 1434, 1447, 1448, 1449, 1450, 1451, 1468, 1452, 1453, 1465, 1454, 1455, 1469, 1460, 1461, 1470, 1465, 1472, 1462, 1463, 1464, 1473, 1474, 1475, 1465, 1471, 1476, 1477, 1470, 1465, 1470, 1478, 1479, 1480, 1468, 1481, 1471, 1465, 1482, 1483, 1469, 1484, 1485, 1470, 1465, 1472, 1486, 1471, 1487, 1473, 1474, 1475, 1465, 1487, 1476, 1477, 1470, 1465, 1470, 1478, 1479, 1480, 1488, 1481, 1489, 1490, 1482, 1483, 1491, 1484, 1485, 1492, 1493, 1494, 1486, 1471, 1487, 1495, 1496, 1497, 1498, 1487, 1499, 1501, 1502, 1503, 1504, 1505, 1501, 2506, 1488, 1508, 1489, 1490, 1509, 1510, 1491, 1511, 1499, 1492, 1493, 1494, 1513, 2502, 1514, 1495, 1496, 1497, 1498, 1506, 1499, 1501, 1502, 1503, 1504, 1507, 1501, 1506, 1507, 1508, 1507, 1515, 1509, 1510, 1516, 1511, 1499, 2500, 1506, 1517, 1513, 1507, 1514, 1518, 1519, 1522, 1523, 1519, 1522, 1519, 1522, 1526, 1507, 1527, 1519, 1522, 1528, 1519, 1522, 1515, 1571, 1573, 1516, 1571, 1505, 1505, 1506, 1517, 1531, 1529, 1532, 1518, 1573, 1529, 1523, 1529, 1534, 1536, 1542, 1526, 1507, 1527, 1543, 2499, 1528, 1530, 1530, 1530, 1530, 1530, 1530, 1530, 1530, 1530, 1546, 1547, 1531, 1529, 1532, 1519, 1522, 1529, 1548, 1529, 1534, 1536, 1542, 1549, 1550, 1551, 1543, 1544, 1544, 1544, 1544, 1544, 1544, 1544, 1544, 1544, 1552, 1553, 1546, 1547, 1554, 1555, 1556, 1557, 1558, 1559, 1548, 1560, 1561, 1562, 1563, 1549, 1550, 1551, 1564, 1565, 1566, 1572, 1576, 1577, 1788, 1580, 1581, 1788, 1552, 1553, 1582, 1583, 1554, 1555, 1556, 1557, 1558, 1559, 1584, 1560, 1561, 1562, 1563, 1585, 1586, 1584, 1564, 1565, 1566, 1572, 1576, 1577, 1578, 1580, 1581, 1578, 1587, 1578, 1582, 1583, 1588, 1589, 1590, 1591, 1592, 1593, 1584, 1594, 1595, 1596, 1597, 1585, 1586, 1584, 1598, 1599, 1600, 1601, 1602, 1603, 1604, 1605, 1606, 1607, 1587, 1608, 1609, 1610, 1588, 1589, 1590, 1591, 1592, 1593, 1611, 1594, 1595, 1596, 1597, 1612, 1613, 1614, 1598, 1599, 1600, 1601, 1602, 1603, 1604, 1605, 1606, 1607, 1615, 1608, 1609, 1610, 1616, 1617, 1618, 1619, 1620, 1621, 1611, 1622, 1623, 1624, 1625, 1612, 1613, 1614, 1626, 1627, 1628, 1630, 1631, 1632, 1634, 1635, 1636, 1629, 1615, 1637, 1638, 1639, 1616, 1617, 1618, 1619, 1620, 1621, 1629, 1622, 1623, 1624, 1625, 1640, 1641, 1642, 1626, 1627, 1628, 1630, 1631, 1632, 1634, 1635, 1636, 1643, 1645, 1637, 1638, 1639, 1646, 1647, 1648, 1649, 1650, 1651, 1653, 1655, 1629, 1656, 1657, 1640, 1641, 1642, 1659, 1660, 1651, 1653, 1803, 1662, 1663, 1803, 1667, 1643, 1645, 1668, 1669, 2498, 1646, 1647, 1648, 1649, 1650, 1651, 1670, 1655, 2491, 1656, 1657, 1672, 1673, 1674, 1659, 1660, 1651, 1652, 1652, 1662, 1663, 1652, 1667, 1652, 1675, 1668, 1669, 1652, 1652, 1676, 1677, 1652, 1678, 1679, 1670, 1680, 1652, 1681, 1682, 1672, 1673, 1674, 1683, 1684, 1685, 1652, 1652, 1686, 1687, 1652, 1689, 1652, 1675, 1689, 1688, 1652, 1652, 1676, 1677, 1652, 1678, 1679, 1690, 1680, 1652, 1681, 1682, 1688, 1691, 1692, 1683, 1684, 1685, 1693, 1694, 1686, 1687, 1697, 1689, 1698, 1700, 1689, 1688, 1701, 1702, 1703, 1704, 1705, 1709, 1759, 1690, 1711, 1759, 1715, 1759, 1688, 1691, 1692, 1703, 1752, 1716, 1693, 1694, 1718, 1719, 1697, 1720, 1698, 1700, 2479, 1752, 1701, 1702, 1703, 1704, 1705, 2477, 1707, 1721, 1711, 1707, 1715, 1707, 1722, 2476, 1722, 1703, 1707, 1716, 1717, 1707, 1718, 1719, 1709, 1720, 1724, 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1717, 1727, 1721, 1724, 1729, 1729, 1730, 1722, 1724, 1722, 1728, 1728, 1728, 1728, 1728, 1728, 1728, 1728, 1728, 1724, 1731, 1732, 1733, 1734, 1735, 1736, 1737, 1739, 1707, 1727, 1740, 1724, 1729, 1729, 1730, 1741, 1724, 1743, 1751, 1744, 1745, 1746, 1747, 1748, 1749, 1741, 1742, 1750, 1731, 1732, 1733, 1734, 1735, 1736, 1737, 1739, 1741, 1742, 1740, 1756, 1757, 1760, 1761, 1741, 1763, 1743, 1742, 1744, 1745, 1746, 1747, 1748, 1749, 1741, 1742, 1750, 1764, 1765, 1766, 1767, 1768, 1769, 1770, 1751, 1741, 1742, 1771, 1756, 1757, 1760, 1761, 1772, 1763, 1773, 1742, 1774, 1775, 1776, 1777, 1778, 1779, 1780, 1781, 1782, 1764, 1765, 1766, 1767, 1768, 1769, 1770, 1774, 1783, 1784, 1771, 1785, 1786, 1787, 1789, 1772, 1790, 1773, 1791, 1774, 1775, 1776, 1777, 1778, 1779, 1780, 1781, 1782, 1792, 1793, 1794, 1795, 1796, 1797, 1798, 1774, 1783, 1784, 1799, 1785, 1786, 1787, 1789, 1800, 1790, 1801, 1791, 1802, 1804, 1805, 1807, 1808, 1809, 1802, 1811, 1812, 1792, 1793, 1794, 1795, 1796, 1797, 1798, 1806, 1815, 1806, 1799, 1816, 1817, 1819, 1806, 1800, 1818, 1801, 1813, 1802, 1804, 1805, 1807, 1808, 1809, 1802, 1811, 1812, 1820, 1813, 1818, 2475, 1821, 1822, 1823, 1806, 1815, 1806, 1825, 1816, 1817, 1819, 1806, 1827, 1818, 1828, 1829, 1830, 1831, 1832, 1833, 1834, 1835, 1836, 1837, 1838, 1820, 1839, 1840, 1813, 1821, 1822, 1823, 1841, 1844, 1834, 1825, 1845, 1846, 1848, 1849, 1827, 1854, 1828, 1829, 1830, 1831, 1832, 1833, 1834, 1835, 1836, 1837, 1838, 1856, 1839, 1840, 1857, 1843, 1843, 1858, 1841, 1844, 1834, 1843, 1845, 1846, 1848, 1849, 1859, 1854, 1861, 1843, 1862, 1863, 1843, 1864, 1865, 1866, 1869, 2470, 1872, 1856, 1873, 1874, 1857, 1843, 1843, 1858, 1875, 1876, 1877, 1843, 1878, 2445, 1880, 1881, 1859, 2434, 1861, 1843, 1862, 1863, 1843, 1864, 1865, 1866, 1869, 1870, 1872, 1870, 1873, 1874, 1882, 1870, 1884, 1883, 1875, 1876, 1877, 1879, 1878, 1879, 1883, 1881, 1870, 1879, 1870, 1885, 1886, 1887, 1888, 1889, 1892, 1893, 1896, 1870, 1879, 1870, 1879, 1880, 1882, 1870, 1884, 1883, 1897, 2424, 1898, 1879, 1900, 1879, 1883, 2422, 1870, 1879, 1870, 1885, 1886, 1887, 1888, 1889, 1890, 1901, 1903, 1890, 1879, 1890, 1879, 1902, 1904, 1902, 1890, 1905, 1897, 1890, 1898, 1907, 1900, 1892, 1893, 1896, 1908, 1909, 1912, 1913, 1915, 1916, 1917, 2406, 2390, 1901, 1903, 1918, 1919, 1920, 1921, 1902, 1904, 1902, 1961, 1905, 2351, 1961, 1974, 1907, 1922, 1974, 1924, 1974, 1908, 1909, 1912, 1913, 1915, 1916, 1917, 1890, 1910, 1925, 1926, 1918, 1919, 1920, 1921, 1910, 1910, 1910, 1910, 1910, 1910, 1910, 1910, 1910, 1922, 1923, 1924, 1910, 1927, 1910, 1910, 1910, 1923, 1928, 1929, 1910, 1930, 1925, 1926, 1931, 1910, 1932, 1933, 1934, 1935, 1936, 1937, 1930, 1944, 1910, 3665, 2080, 3665, 1923, 2080, 1910, 1927, 1910, 1910, 1910, 1923, 1928, 1929, 1910, 1930, 1946, 1947, 1931, 1910, 1932, 1933, 1934, 1935, 1936, 1937, 1930, 1944, 1910, 1940, 1940, 1940, 1940, 1942, 1942, 1942, 1942, 1948, 1949, 1950, 1951, 1952, 1953, 1954, 1946, 1947, 1955, 1956, 1957, 1958, 1959, 1962, 1963, 1964, 1965, 1966, 2349, 1967, 1968, 1970, 2336, 1971, 1972, 1973, 1975, 1948, 1949, 1950, 1951, 1952, 1953, 1954, 1976, 1977, 1955, 1956, 1957, 1958, 1959, 1962, 1963, 1964, 1965, 1966, 1940, 1967, 1968, 1970, 1942, 1971, 1972, 1973, 1975, 1978, 1979, 1980, 1981, 1982, 1983, 1984, 1976, 1977, 1985, 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1990, 1993, 1990, 1994, 1995, 1996, 1997, 1998, 1999, 2002, 2003, 1978, 1979, 1980, 1981, 1982, 1983, 1984, 2004, 2000, 1985, 1986, 1987, 1988, 1989, 2005, 1991, 1992, 2006, 1993, 2000, 1994, 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2007, 2008, 2009, 2010, 2011, 2012, 2294, 2004, 2871, 2014, 2292, 2015, 2201, 2158, 2005, 2016, 2158, 2006, 2158, 2017, 2018, 2019, 2020, 2201, 2021, 2871, 2022, 2023, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2013, 2013, 2014, 2013, 2015, 2013, 2013, 2024, 2016, 2013, 2013, 2013, 2017, 2018, 2019, 2020, 2013, 2021, 2013, 2022, 2023, 2025, 2026, 2027, 2028, 2029, 2030, 2013, 2013, 2013, 2031, 2013, 2032, 2013, 2013, 2024, 2033, 2013, 2013, 2013, 2034, 2035, 2036, 2037, 2013, 2038, 2013, 2039, 2042, 2025, 2026, 2027, 2028, 2029, 2030, 2043, 2044, 2045, 2031, 2050, 2032, 2051, 2052, 2053, 2033, 2054, 2055, 2056, 2034, 2035, 2036, 2037, 2057, 2038, 2061, 2039, 2042, 2058, 2062, 2058, 2065, 2067, 2068, 2043, 2044, 2045, 2066, 2050, 2066, 2051, 2052, 2053, 2069, 2054, 2055, 2056, 2070, 2071, 2291, 2082, 2057, 2072, 2061, 2073, 2074, 2058, 2062, 2058, 2065, 2083, 2075, 2076, 2077, 2078, 2066, 2079, 2066, 2084, 2087, 2088, 2089, 2090, 2091, 2092, 2070, 2071, 2067, 2068, 2093, 2072, 2094, 2073, 2074, 2095, 3728, 2290, 3728, 2069, 2075, 2076, 2077, 2078, 3193, 2079, 2082, 2099, 2087, 2088, 2089, 2090, 2091, 2092, 2100, 2096, 2083, 2096, 2093, 2194, 2094, 3193, 2194, 2095, 2084, 2098, 2098, 2098, 2098, 2098, 2098, 2098, 2098, 2098, 2276, 2099, 2101, 2103, 2274, 2102, 2104, 2105, 2100, 2096, 2102, 2096, 2097, 2097, 2097, 2097, 2097, 2097, 2097, 2097, 2097, 2107, 2108, 2109, 2097, 2110, 2097, 2097, 2097, 2111, 2101, 2103, 2097, 2102, 2104, 2105, 2112, 2097, 2102, 2113, 2114, 2116, 2117, 2118, 2119, 2120, 2097, 2121, 2122, 2107, 2108, 2109, 2097, 2110, 2097, 2097, 2097, 2111, 2123, 2124, 2097, 2125, 2126, 2127, 2112, 2097, 2129, 2113, 2114, 2116, 2117, 2118, 2119, 2120, 2097, 2121, 2122, 2130, 2131, 2132, 2133, 2136, 2136, 2136, 2136, 2141, 2123, 2124, 2143, 2125, 2126, 2127, 2140, 2140, 2129, 2139, 2139, 2139, 2139, 2144, 2145, 2146, 2148, 2149, 2150, 2130, 2131, 2132, 2133, 2151, 2152, 2153, 2154, 2141, 2155, 2156, 2143, 2157, 2159, 2160, 2161, 2159, 2275, 2359, 2162, 2163, 2359, 2144, 2145, 2146, 2148, 2149, 2150, 2164, 2165, 2166, 2136, 2151, 2152, 2153, 2154, 2167, 2155, 2156, 2168, 2157, 2140, 2160, 2161, 2169, 2139, 2147, 2162, 2163, 2147, 2273, 2172, 2251, 2159, 2173, 2174, 2164, 2165, 2166, 2175, 2176, 2177, 2275, 2170, 2167, 2147, 2170, 2168, 2170, 2178, 2179, 2180, 2169, 2181, 2183, 2184, 2185, 2186, 2147, 2172, 2147, 2159, 2173, 2174, 2237, 2189, 2190, 2175, 2176, 2177, 2147, 2191, 2147, 2147, 2147, 2192, 2193, 2178, 2179, 2180, 2195, 2181, 2183, 2184, 2185, 2186, 2147, 2188, 2147, 2196, 2188, 2197, 2188, 2189, 2190, 2199, 2200, 2203, 2147, 2191, 2147, 2147, 2147, 2192, 2193, 2202, 2204, 2205, 2195, 2206, 2207, 2208, 2209, 2210, 2211, 2212, 2202, 2196, 2213, 2197, 2208, 2214, 2215, 2199, 2200, 2203, 2216, 2217, 2218, 2219, 2220, 2221, 2222, 2227, 2204, 2205, 2228, 2206, 2207, 2208, 2209, 2210, 2211, 2212, 2219, 2229, 2213, 2230, 2231, 2214, 2215, 2232, 2233, 2234, 2216, 2217, 2218, 2219, 2220, 2221, 2222, 2227, 2235, 2236, 2228, 2238, 2239, 2240, 2241, 2242, 2247, 2248, 2219, 2229, 2250, 2230, 2231, 2254, 2255, 2232, 2233, 2234, 2257, 2258, 2259, 2260, 2261, 2262, 2263, 2270, 2235, 2236, 2271, 2238, 2239, 2240, 2241, 2242, 2247, 2248, 2272, 2277, 2250, 2279, 2280, 2254, 2255, 2281, 2282, 2283, 2257, 2258, 2259, 2260, 2261, 2262, 2263, 2270, 2293, 2284, 2271, 2285, 2286, 2287, 2295, 2296, 2297, 2135, 2272, 2134, 2298, 2279, 2280, 2299, 2803, 2281, 2282, 2283, 2300, 2301, 2302, 2048, 2304, 2305, 2306, 2803, 2277, 2284, 2308, 2285, 2286, 2287, 2289, 2296, 2297, 2289, 2367, 2289, 2298, 2367, 2046, 2299, 2289, 2293, 2309, 2289, 2300, 2301, 2302, 2295, 2304, 2305, 2306, 2307, 2310, 2312, 2308, 2313, 2314, 2289, 2307, 2307, 2307, 2307, 2307, 2307, 2307, 2307, 2307, 2311, 2315, 2316, 2309, 2317, 2311, 2318, 2319, 2320, 2321, 2322, 2324, 2325, 2310, 2312, 2326, 2313, 2314, 2289, 2328, 2331, 2333, 2334, 2335, 2337, 2338, 2339, 2340, 2311, 2315, 2316, 2341, 2317, 2311, 2318, 2319, 2320, 2321, 2322, 2324, 2325, 2342, 2343, 2326, 2346, 2348, 2353, 2328, 2331, 2333, 2334, 2335, 2337, 2338, 2339, 2340, 2354, 2350, 2350, 2341, 2350, 2352, 2352, 2357, 2352, 2360, 2362, 2363, 2356, 2342, 2343, 2361, 2346, 2348, 2353, 2356, 2358, 2361, 2364, 2358, 2365, 2358, 2366, 2368, 2354, 2369, 2370, 2371, 2041, 2372, 2373, 2357, 2374, 2360, 2362, 2363, 2356, 2375, 2379, 2361, 2380, 2381, 2382, 2356, 2377, 2361, 2364, 2377, 2365, 2377, 2366, 2368, 2350, 2369, 2370, 2371, 2352, 2372, 2373, 2378, 2374, 2383, 2378, 2384, 2378, 2375, 2379, 2350, 2380, 2381, 2382, 2352, 2385, 2386, 2388, 2389, 2391, 2388, 2392, 2393, 2394, 2395, 2396, 2397, 2398, 2399, 2400, 2402, 2403, 2383, 2404, 2384, 2405, 2407, 2408, 2409, 2410, 2411, 2409, 2413, 2385, 2386, 2414, 2389, 2391, 2415, 2392, 2393, 2394, 2395, 2396, 2397, 2398, 2399, 2400, 2402, 2403, 2416, 2404, 2417, 2405, 2407, 2408, 2412, 2410, 2411, 2412, 2413, 2412, 2420, 2414, 2421, 2423, 2415, 2426, 2425, 2428, 2429, 2430, 2431, 2432, 2433, 2435, 2436, 2437, 2416, 2425, 2417, 1960, 2438, 2439, 2440, 2442, 2443, 2444, 2446, 2447, 2420, 2448, 2421, 2423, 2450, 2426, 2451, 2428, 2429, 2430, 2431, 2432, 2433, 2435, 2436, 2437, 2452, 2453, 2454, 2425, 2438, 2439, 2440, 2442, 2443, 2444, 2446, 2447, 2455, 2448, 2456, 2457, 2450, 2458, 2451, 2459, 2460, 2463, 2464, 2465, 2467, 2468, 2469, 2473, 2452, 2453, 2454, 2474, 2478, 2480, 2481, 2482, 2483, 2484, 2485, 2486, 2455, 2487, 2456, 2457, 2488, 2458, 2490, 2459, 2460, 2463, 2464, 2465, 2467, 2468, 2469, 2473, 1945, 2494, 1941, 2474, 2501, 2505, 2503, 2482, 2483, 2484, 2485, 2486, 2493, 2487, 2492, 2494, 2488, 2492, 2490, 2492, 2504, 2478, 2480, 2481, 2492, 2495, 2507, 2492, 2495, 2493, 2495, 2508, 2509, 2505, 2496, 2495, 2510, 2496, 2511, 2496, 2512, 2492, 2513, 2494, 2496, 2497, 2514, 2496, 2497, 2501, 2497, 2503, 2495, 2516, 2507, 2497, 2517, 2493, 2497, 2508, 2509, 2496, 2518, 2519, 2510, 2504, 2511, 2520, 2512, 2492, 2513, 2521, 2497, 2522, 2514, 2523, 2524, 2525, 2526, 2527, 2495, 2516, 2528, 2529, 2517, 2530, 2531, 2532, 2533, 2496, 2518, 2519, 2534, 2535, 2536, 2520, 2537, 2538, 2540, 2521, 2497, 2522, 2542, 2523, 2524, 2525, 2526, 2527, 2543, 2544, 2528, 2529, 2545, 2530, 2531, 2532, 2533, 2546, 2547, 2548, 2534, 2535, 2536, 2549, 2537, 2538, 2540, 2556, 2551, 2551, 2542, 2551, 2554, 2554, 2557, 2554, 2543, 2544, 2558, 2559, 2545, 2562, 2563, 2564, 2562, 2546, 2547, 2548, 2565, 2566, 2567, 2549, 2568, 2569, 2570, 2556, 2571, 2572, 2573, 2571, 2575, 2571, 2557, 2576, 2577, 2578, 2558, 2559, 2579, 2583, 2563, 2564, 2584, 2585, 1939, 2586, 2565, 2566, 2567, 2587, 2568, 2569, 2570, 2551, 2588, 2572, 2573, 2554, 2575, 2592, 2594, 2576, 2577, 2578, 2595, 2596, 2579, 2583, 2551, 2597, 2584, 2585, 2554, 2586, 2590, 2591, 2590, 2587, 2591, 2599, 2600, 2601, 2588, 2602, 2603, 2604, 2602, 2592, 2594, 2605, 2606, 2607, 2595, 2596, 2609, 2610, 2611, 2597, 2613, 2611, 2617, 2611, 2590, 2603, 2590, 2612, 2612, 2599, 2600, 2601, 2619, 2615, 2603, 2604, 2615, 2620, 2615, 2605, 2606, 2607, 2621, 2622, 2609, 2610, 2623, 2624, 2613, 2625, 2617, 2626, 2628, 2603, 2629, 2612, 2612, 2630, 2631, 2632, 2619, 2633, 2634, 2635, 2636, 2620, 2637, 2638, 2639, 2640, 2621, 2622, 2641, 2644, 2623, 2624, 2645, 2625, 2646, 2626, 2628, 2647, 2629, 2648, 2649, 2630, 2631, 2632, 2650, 2633, 2634, 2635, 2636, 2651, 2637, 2638, 2639, 2640, 2652, 2654, 2641, 2644, 2655, 2656, 2645, 2657, 2646, 2658, 2659, 2647, 2661, 2648, 2649, 2662, 2663, 2665, 2650, 2666, 2667, 2668, 2669, 2651, 2670, 2671, 2672, 2674, 2652, 2654, 2675, 2676, 2655, 2656, 2677, 2657, 2678, 2658, 2659, 2679, 2661, 2697, 2682, 2662, 2663, 2665, 1911, 2666, 2667, 2668, 2669, 2769, 2670, 2689, 2769, 2674, 2682, 2698, 2675, 2676, 2686, 2687, 2677, 2683, 2678, 1895, 2683, 2679, 2683, 2684, 2671, 2672, 2684, 2683, 2684, 2699, 2683, 2686, 2687, 2684, 2688, 2689, 2684, 2688, 2682, 2700, 2697, 1894, 2690, 2691, 2683, 2690, 2691, 2690, 2691, 1891, 2684, 2688, 2690, 2691, 2701, 2690, 2698, 2699, 2692, 2686, 2687, 2692, 2703, 2692, 2704, 1855, 2705, 2700, 2692, 2690, 2691, 2692, 2683, 1824, 2694, 2706, 2707, 2694, 2684, 2694, 2708, 2709, 2701, 2695, 2694, 2692, 2695, 2694, 2695, 2710, 2703, 2711, 2704, 2695, 2705, 2712, 2695, 2690, 2691, 2713, 2714, 2694, 2715, 2706, 2707, 2716, 2717, 2718, 2708, 2709, 2695, 2719, 2721, 2692, 2722, 2723, 2724, 2710, 2725, 2711, 2726, 2727, 2728, 2712, 2729, 2730, 2731, 2713, 2714, 2694, 2715, 2732, 2733, 2716, 2717, 2718, 2735, 2736, 2695, 2719, 2721, 2737, 2722, 2723, 2724, 2738, 2725, 2739, 2726, 2727, 2728, 2740, 2729, 2730, 2731, 2742, 2743, 2747, 2748, 2732, 2733, 2749, 2750, 2751, 2735, 2736, 2752, 2753, 2754, 2737, 2757, 2758, 2759, 2738, 2760, 2739, 2761, 2762, 2763, 2740, 2766, 2767, 2768, 2742, 2743, 2747, 2748, 2772, 2773, 2749, 2750, 2751, 2778, 2776, 2752, 2753, 2754, 2777, 2757, 2758, 2759, 1755, 2760, 1754, 2761, 2762, 2763, 2780, 2766, 2767, 2768, 2770, 2781, 2782, 2770, 2772, 2773, 2775, 2779, 2783, 2775, 2776, 2785, 2778, 2786, 2777, 2779, 2779, 2787, 2779, 2788, 2779, 2789, 2784, 2790, 2780, 2784, 2791, 2784, 2792, 2781, 2782, 2795, 2796, 2797, 2801, 2779, 2783, 2802, 2804, 2785, 2778, 2786, 2806, 2779, 2779, 2787, 2779, 2788, 2779, 2789, 2807, 2790, 2808, 2806, 2791, 2809, 2792, 2810, 2811, 2795, 2796, 2797, 2801, 2812, 2813, 2802, 2804, 2816, 2817, 2818, 2819, 2820, 2822, 2821, 2823, 2824, 2825, 2826, 2807, 2827, 2808, 2816, 2828, 2809, 2821, 2810, 2811, 2829, 2830, 2831, 2832, 2812, 2813, 2834, 2835, 2816, 2817, 2818, 2819, 2820, 2822, 2836, 2823, 2824, 2825, 2826, 2837, 2827, 2838, 2839, 2828, 2840, 2841, 2842, 2843, 2829, 2830, 2831, 2832, 2844, 2845, 2834, 2835, 2846, 2847, 2848, 2849, 2850, 2851, 2836, 2852, 2853, 2854, 2855, 2837, 1753, 2838, 2839, 2857, 2840, 2841, 2842, 2843, 1726, 1723, 1714, 2859, 2844, 2845, 1710, 2884, 2846, 2847, 2848, 2849, 2850, 2857, 1708, 2852, 2853, 2854, 2855, 2858, 2859, 2881, 2858, 2857, 2858, 2867, 1706, 1696, 2861, 2858, 2851, 2861, 2858, 2861, 2862, 2884, 2886, 2862, 2861, 2862, 2863, 2857, 2867, 2863, 2862, 2863, 2858, 2862, 2859, 2864, 2863, 2868, 2864, 2863, 2864, 2861, 2869, 2878, 2870, 2864, 2878, 2862, 2864, 1654, 2886, 2887, 2881, 2863, 2868, 2938, 2867, 2888, 2938, 2869, 2858, 2870, 2864, 2944, 1644, 1574, 2944, 2872, 2889, 2861, 2872, 2890, 2872, 2874, 1569, 2862, 2874, 2872, 2874, 2887, 2872, 2863, 2868, 2874, 2891, 2888, 2874, 2869, 2875, 2870, 2864, 2875, 2876, 2875, 2872, 2876, 2889, 2876, 2875, 2890, 2874, 2875, 2876, 2877, 2879, 2892, 2877, 2879, 2877, 2879, 2893, 2895, 2891, 2877, 2879, 2875, 2896, 2879, 2898, 2876, 2900, 2902, 2872, 1567, 2880, 2903, 2904, 2880, 2874, 2880, 2877, 2879, 2906, 2892, 2880, 2907, 2908, 2880, 2893, 2895, 2909, 2910, 2911, 2875, 2896, 2912, 2898, 2876, 2900, 2902, 2913, 2880, 2914, 2903, 2904, 2915, 2916, 2920, 2877, 2879, 2906, 2921, 2922, 2907, 2908, 2924, 2925, 2926, 2909, 2910, 2911, 2927, 2928, 2912, 2929, 2931, 2933, 2934, 2913, 2880, 2914, 2935, 2936, 2915, 2916, 2920, 2937, 2939, 2941, 2921, 2922, 2942, 2943, 2924, 2925, 2926, 2948, 2949, 2951, 2927, 2928, 2952, 2929, 2931, 2933, 2934, 2953, 2954, 2945, 2935, 2936, 2945, 2955, 2945, 2937, 2939, 2941, 2956, 2958, 2942, 2943, 2957, 2963, 2964, 2948, 2949, 2951, 2959, 2965, 2952, 2959, 2967, 2957, 2957, 2953, 2954, 2968, 2960, 2969, 2962, 2955, 2960, 2962, 2970, 2962, 2956, 2958, 2972, 2960, 2957, 2963, 2964, 2966, 2973, 2974, 2966, 2965, 2978, 2979, 2967, 2957, 2957, 2981, 2982, 2968, 2960, 2969, 2984, 2985, 2960, 2986, 2970, 2987, 2981, 2988, 2972, 2960, 2989, 2990, 2991, 2993, 2973, 2974, 2992, 2992, 2978, 2979, 2994, 2995, 2996, 2997, 2982, 2998, 3000, 3001, 2984, 2985, 3002, 2986, 3003, 2987, 3004, 2988, 3005, 3006, 2989, 2990, 2991, 2993, 3007, 3009, 2992, 2992, 3008, 3011, 2994, 2995, 2996, 2997, 3010, 2998, 3000, 3001, 3013, 3008, 3002, 1545, 3003, 3014, 3004, 3010, 3005, 3006, 3015, 3017, 3019, 3020, 3007, 3009, 3021, 3023, 3024, 3011, 3025, 3026, 3027, 3029, 3030, 3033, 3034, 3031, 3013, 3039, 3038, 3008, 3039, 3014, 3040, 1541, 1525, 3010, 3015, 3017, 3019, 3020, 3031, 3046, 3021, 3023, 3024, 3038, 3025, 3026, 3027, 3029, 3030, 3033, 3034, 3031, 3036, 3055, 1524, 3036, 3046, 3036, 3040, 3047, 3050, 3056, 3036, 3050, 3041, 3036, 3031, 3041, 1521, 3041, 3042, 3038, 3057, 3042, 3041, 3042, 3047, 3041, 1467, 3036, 3042, 3055, 3043, 3044, 3046, 3043, 3044, 3043, 3044, 3056, 3276, 3041, 3043, 3044, 3059, 3043, 3044, 3042, 3061, 3063, 3057, 3276, 1466, 3049, 3047, 3064, 3049, 3036, 3049, 3043, 3044, 3087, 3065, 3049, 3087, 3066, 3049, 1459, 3051, 3041, 3068, 3051, 3059, 3051, 3069, 3042, 3061, 3063, 3051, 3052, 3049, 3051, 3052, 3064, 3052, 3070, 3071, 3043, 3044, 3052, 3065, 3072, 3052, 3066, 3073, 3051, 3074, 3075, 3068, 3077, 3078, 3079, 3069, 3080, 3082, 3083, 3052, 3084, 3049, 3085, 3086, 3088, 3089, 3070, 3071, 3090, 3092, 3093, 3094, 3072, 3095, 3096, 3073, 3051, 3074, 3075, 3098, 3077, 3078, 3079, 3101, 3080, 3082, 3083, 3052, 3084, 1458, 3085, 3086, 3088, 3089, 1457, 1402, 3090, 3092, 3093, 3094, 3097, 3095, 3096, 3097, 3106, 3099, 3103, 3098, 3099, 3103, 3105, 3101, 3107, 3105, 3109, 3105, 3110, 3097, 3097, 3097, 3097, 3097, 3097, 3097, 3097, 3097, 3111, 3112, 3113, 3114, 3115, 3116, 3106, 3117, 3118, 3127, 3225, 1401, 3127, 3225, 3107, 1390, 3109, 1366, 3110, 3120, 3119, 3121, 3122, 3119, 3124, 3125, 3126, 3128, 3111, 3112, 3113, 3114, 3115, 3116, 3129, 3117, 3118, 3119, 3119, 3119, 3119, 3119, 3119, 3119, 3119, 3119, 3130, 3120, 3131, 3121, 3122, 3133, 3124, 3125, 3126, 3128, 3134, 3135, 3137, 3138, 3140, 3141, 3129, 3142, 3144, 3145, 3147, 3148, 3149, 3150, 3151, 3152, 3154, 3155, 3130, 3156, 3131, 3157, 3159, 3133, 3160, 3161, 3162, 3164, 3134, 3135, 3137, 3138, 3140, 3141, 3166, 3142, 3144, 3145, 3147, 3148, 3149, 3150, 3151, 3152, 3154, 3155, 3169, 3156, 3172, 3157, 3159, 3173, 3160, 3161, 3162, 3164, 3175, 3177, 3178, 3172, 3179, 1365, 3166, 3180, 3181, 3182, 3183, 3185, 3186, 3187, 3188, 3189, 3190, 3192, 3169, 3203, 1361, 3257, 1360, 3173, 3257, 3204, 3189, 1359, 3175, 3177, 3178, 3205, 3179, 3172, 3192, 3180, 3181, 3182, 3183, 3185, 3186, 3187, 3188, 3189, 3190, 3191, 3194, 3203, 3191, 3194, 3191, 3194, 3197, 3204, 3189, 3191, 3194, 1358, 3191, 3205, 3195, 3196, 3192, 3195, 3196, 3195, 3196, 3206, 3207, 3197, 3195, 3196, 3191, 3194, 3196, 1357, 3198, 3209, 3210, 3198, 3199, 3198, 3211, 3199, 1355, 3199, 3198, 3195, 3196, 3198, 3199, 1324, 3213, 3199, 3214, 3206, 3207, 3197, 1320, 3201, 3191, 3194, 3201, 3198, 3201, 3209, 3210, 3199, 3215, 3201, 3211, 3216, 3201, 1291, 3202, 3195, 3196, 3202, 3217, 3202, 3213, 3218, 3214, 3221, 3202, 3222, 3201, 3202, 3223, 3224, 3226, 3198, 3227, 3230, 3231, 3199, 3215, 3229, 3232, 3216, 3229, 3202, 3229, 3233, 3234, 3235, 3217, 3236, 3237, 3218, 1283, 3221, 3244, 3222, 3201, 3244, 3223, 3224, 3226, 3239, 3227, 3230, 3231, 3241, 3243, 3246, 3232, 3247, 3248, 3202, 1281, 3233, 3234, 3235, 3249, 3236, 3237, 3238, 3238, 3238, 3238, 3238, 3238, 3238, 3238, 3238, 3240, 3239, 3250, 3240, 3251, 3241, 3243, 3246, 3252, 3247, 3248, 3253, 3244, 3254, 3255, 1276, 3249, 3240, 3240, 3240, 3240, 3240, 3240, 3240, 3240, 3240, 3258, 3259, 3261, 3262, 3250, 3263, 3251, 3266, 3265, 3267, 3252, 3265, 3268, 3253, 3244, 3254, 3255, 3256, 3256, 3256, 3256, 3256, 3256, 3256, 3256, 3256, 3270, 3272, 3258, 3259, 3261, 3262, 3273, 3263, 3274, 3266, 3269, 3267, 3271, 3269, 3268, 3271, 3275, 3277, 3278, 3279, 3280, 3282, 3283, 3284, 3285, 3286, 3290, 3291, 3270, 3272, 3292, 3293, 3296, 3297, 3273, 3298, 3274, 3301, 3303, 3304, 3305, 3306, 3307, 3308, 3275, 3277, 3278, 3279, 3280, 3282, 3283, 3284, 3285, 3286, 3290, 3291, 3299, 3309, 3292, 3293, 3296, 3297, 3310, 3298, 3299, 3301, 3303, 3304, 3305, 3306, 3307, 3308, 3312, 3313, 3314, 3315, 3316, 3317, 3319, 3321, 3324, 1271, 3321, 3318, 3299, 3309, 3318, 3392, 3318, 1214, 3310, 3343, 3299, 3318, 3343, 3319, 3318, 1213, 3392, 3325, 3312, 3313, 3314, 3315, 3316, 3317, 3320, 3326, 3324, 3320, 3318, 3320, 3322, 3327, 3328, 3322, 3320, 3322, 3331, 3320, 3635, 3323, 3322, 3319, 3323, 3322, 3323, 3325, 3333, 3335, 3336, 3323, 3337, 3320, 3323, 3326, 3338, 3339, 3318, 3322, 3341, 3327, 3328, 3344, 3347, 3348, 3331, 3349, 3323, 3350, 3351, 3352, 3373, 1212, 1211, 3373, 3333, 3335, 3336, 3374, 3337, 3320, 3374, 3342, 3338, 3339, 3342, 3322, 3341, 1210, 3635, 3344, 3347, 3348, 1209, 3349, 3323, 3350, 3351, 3352, 3342, 3342, 3342, 3342, 3342, 3342, 3342, 3342, 3342, 3345, 3345, 3345, 3345, 3345, 3345, 3345, 3345, 3345, 3345, 3345, 3346, 3346, 3346, 3346, 3346, 3346, 3346, 3346, 3346, 3346, 3346, 3353, 3354, 3355, 3345, 3356, 3356, 3356, 3356, 3356, 3356, 3356, 3356, 3356, 3357, 3346, 3359, 3361, 3363, 3364, 3365, 3375, 3378, 3382, 3375, 3378, 3382, 1205, 1204, 3353, 3354, 3355, 3360, 3366, 3367, 3360, 3368, 3369, 3370, 3371, 3376, 3377, 3357, 3379, 3359, 3361, 3363, 3364, 3365, 3360, 3360, 3360, 3360, 3360, 3360, 3360, 3360, 3360, 3380, 3381, 3383, 3366, 3367, 3383, 3368, 3369, 3370, 3371, 3376, 3377, 3386, 3379, 3384, 3388, 3390, 3384, 3394, 3395, 3396, 3398, 3399, 3401, 3402, 1203, 1189, 3403, 3380, 3381, 3397, 3384, 3384, 3384, 3384, 3384, 3384, 3384, 3384, 3384, 3386, 3397, 3404, 3388, 3390, 3400, 3394, 3395, 3396, 3398, 3399, 3401, 3402, 3400, 3400, 3403, 3405, 3406, 3407, 3408, 3409, 3410, 3411, 3412, 3413, 3414, 3416, 3417, 3418, 3419, 3404, 3420, 3421, 3400, 3421, 3422, 3423, 3424, 3426, 3427, 3444, 3400, 3400, 3444, 3405, 3406, 3407, 3408, 3409, 3410, 3411, 3412, 3413, 3414, 3416, 3417, 3418, 3419, 3429, 3420, 3430, 3431, 3433, 3422, 3423, 3424, 3426, 3427, 3428, 3435, 3439, 3428, 3441, 3428, 3446, 3447, 3469, 3470, 3428, 3469, 3470, 3428, 3470, 1187, 1182, 1154, 3429, 3448, 3430, 3431, 3433, 1150, 3449, 3450, 3451, 3428, 3452, 3435, 3439, 3454, 3441, 3455, 3446, 3447, 3421, 3442, 3442, 3442, 3442, 3442, 3442, 3442, 3442, 3442, 3443, 3448, 3445, 3443, 1140, 3443, 3449, 3450, 3451, 3428, 3452, 3471, 1129, 3454, 3471, 3455, 3471, 3443, 3443, 3443, 3443, 3443, 3443, 3443, 3443, 3443, 3445, 3445, 3445, 3445, 3445, 3445, 3445, 3445, 3445, 3445, 3445, 3457, 3457, 3457, 3457, 3457, 3457, 3457, 3457, 3457, 3458, 3459, 3460, 3461, 3462, 3445, 3463, 1127, 3464, 3463, 3465, 3466, 3467, 3472, 3473, 3474, 3475, 3476, 3474, 3477, 3474, 3479, 3482, 3528, 3479, 1125, 3528, 1124, 3458, 3459, 3460, 3461, 3462, 3487, 3480, 3463, 3464, 3480, 3465, 3466, 3467, 3472, 3473, 1110, 3475, 3476, 3488, 3477, 3489, 3491, 3482, 3480, 3480, 3480, 3480, 3480, 3480, 3480, 3480, 3480, 3492, 3487, 3493, 3463, 3481, 3481, 3481, 3481, 3481, 3481, 3481, 3481, 3481, 3486, 3488, 3494, 3489, 3491, 3495, 3486, 3496, 3498, 3501, 3503, 3504, 3505, 3506, 3507, 3492, 3510, 3493, 3511, 3513, 3514, 3536, 3540, 1109, 3536, 3540, 3554, 1105, 3486, 3554, 3494, 3554, 3516, 3495, 3486, 3496, 3498, 3501, 3503, 3504, 3505, 3506, 3507, 3517, 3510, 3518, 3511, 3513, 3514, 3515, 3515, 3515, 3515, 3515, 3515, 3515, 3515, 3515, 3515, 3515, 3516, 3521, 3522, 3523, 3524, 3526, 3527, 3557, 1104, 1103, 3557, 3517, 3557, 3518, 3515, 3529, 3529, 3529, 3529, 3529, 3529, 3529, 3529, 3529, 3533, 3534, 3535, 3537, 3538, 3521, 3522, 3523, 3524, 3526, 3527, 3530, 3530, 3530, 3530, 3530, 3530, 3530, 3530, 3530, 3531, 3539, 3541, 3531, 3542, 3543, 3545, 3546, 3533, 3534, 3535, 3537, 3538, 3548, 3549, 3550, 3552, 3531, 3531, 3531, 3531, 3531, 3531, 3531, 3531, 3531, 3559, 3560, 3547, 3539, 3541, 3547, 3542, 3543, 3545, 3546, 3551, 1102, 3562, 3551, 3563, 3548, 3549, 3550, 3552, 3547, 3547, 3547, 3547, 3547, 3547, 3547, 3547, 3547, 3559, 3560, 3564, 3565, 3569, 3570, 3571, 3573, 3575, 3576, 3577, 3551, 3562, 3578, 3563, 1101, 3656, 3565, 3565, 3565, 3565, 3565, 3565, 3565, 3565, 3565, 3566, 3656, 3612, 3566, 3564, 3612, 3569, 3570, 3571, 3573, 3575, 3576, 3577, 3551, 3579, 3578, 3580, 3566, 3566, 3566, 3566, 3566, 3566, 3566, 3566, 3566, 3567, 3567, 3567, 3567, 3567, 3567, 3567, 3567, 3567, 3581, 3582, 3583, 3584, 3585, 3586, 3587, 3579, 3588, 3580, 3591, 3595, 3596, 3596, 3596, 3596, 3596, 3596, 3596, 3596, 3596, 3596, 3596, 3597, 3598, 3599, 3602, 3604, 3581, 3582, 3583, 3584, 3585, 3586, 3587, 3605, 3588, 3596, 3591, 3595, 3611, 3615, 1061, 3608, 3615, 3608, 3608, 3657, 3608, 3726, 1009, 3597, 3598, 3599, 3602, 3604, 3608, 3609, 3657, 3613, 3726, 3617, 3618, 3605, 3619, 3618, 3620, 3618, 3611, 3609, 3609, 3609, 3609, 3609, 3609, 3609, 3609, 3609, 3610, 3610, 3610, 3610, 3610, 3610, 3610, 3610, 3610, 3613, 3614, 3617, 3621, 3614, 3619, 3622, 3620, 3623, 3624, 3624, 3624, 3624, 3624, 3624, 3624, 3624, 3624, 3614, 3614, 3614, 3614, 3614, 3614, 3614, 3614, 3614, 3625, 3626, 3628, 3629, 3621, 3628, 3630, 3622, 3633, 3623, 3637, 3638, 3639, 3608, 3640, 3642, 1008, 3643, 988, 3628, 3628, 3628, 3628, 3628, 3628, 3628, 3628, 3628, 3625, 3626, 3644, 3629, 3641, 3634, 3630, 3646, 3633, 3634, 3647, 3638, 3639, 3648, 3640, 3642, 3634, 3643, 3641, 3641, 3641, 3641, 3641, 3641, 3641, 3641, 3641, 3649, 3650, 3651, 3644, 3652, 3637, 3634, 3653, 3646, 3654, 3634, 3647, 3655, 3658, 3648, 3660, 3666, 3634, 3668, 3670, 3672, 3673, 3679, 3673, 3673, 3681, 3673, 3705, 3649, 3650, 3651, 975, 3652, 3680, 3673, 3653, 3680, 3654, 3680, 3752, 3655, 3658, 3752, 3660, 3666, 3688, 3668, 3670, 3672, 3674, 3679, 3674, 3674, 3681, 3674, 3683, 3686, 3689, 3683, 3686, 3683, 3686, 3674, 3682, 3682, 3682, 3682, 3682, 3682, 3682, 3682, 3682, 3690, 3688, 3691, 3692, 3693, 3705, 3694, 3696, 3697, 3700, 3701, 3702, 3703, 3689, 3695, 3695, 3695, 3695, 3695, 3695, 3695, 3695, 3695, 3707, 3708, 3709, 3710, 3711, 3690, 3712, 3691, 3692, 3693, 3673, 3694, 3696, 3697, 3700, 3701, 3702, 3703, 3713, 3714, 3715, 3717, 3718, 3719, 3721, 3722, 3725, 3730, 3707, 3708, 3709, 3710, 3711, 3732, 3712, 3736, 3738, 3740, 3674, 3738, 3743, 3738, 3744, 3745, 3746, 3733, 3713, 3714, 3715, 3717, 3718, 3719, 3721, 3722, 3725, 3730, 3733, 3747, 3748, 3756, 3749, 3732, 3750, 3736, 3751, 3754, 3753, 3751, 3743, 3753, 3744, 3745, 3746, 3733, 3755, 3757, 3758, 3760, 3761, 3763, 3764, 3781, 3765, 3783, 3733, 3747, 3748, 3740, 3749, 3766, 3750, 3767, 3768, 3754, 3769, 3773, 3774, 3775, 3776, 3778, 3785, 3786, 3755, 3757, 3758, 3760, 3761, 3763, 3764, 3756, 3765, 3751, 3788, 3789, 3790, 3791, 3792, 3766, 3793, 3767, 3768, 3793, 3769, 3773, 3774, 3775, 3776, 3778, 3785, 3786, 3794, 3781, 3795, 3783, 3799, 3795, 3800, 3795, 3801, 3751, 3788, 3789, 3790, 3791, 3792, 3796, 3797, 3802, 3796, 3797, 3796, 3798, 3803, 3806, 3798, 3807, 3808, 3809, 3794, 3810, 3811, 3814, 3799, 3818, 3800, 3815, 3801, 3820, 3815, 3821, 3822, 3823, 3825, 3826, 3828, 3802, 3829, 3828, 964, 3852, 3803, 3806, 3837, 3807, 3808, 3809, 944, 3810, 3811, 3814, 3839, 3830, 3840, 3841, 3830, 3820, 3830, 3821, 3822, 3823, 3825, 3826, 3832, 3834, 3829, 3832, 3834, 3832, 3834, 3835, 3837, 3843, 3835, 3818, 3835, 3844, 3845, 3846, 3839, 3847, 3840, 3841, 3848, 3851, 3853, 3855, 3851, 3854, 3851, 3852, 3854, 3856, 3857, 3848, 3859, 3857, 3848, 3862, 3867, 3843, 3862, 3868, 3862, 3844, 3845, 3846, 3864, 3847, 3869, 3864, 3848, 3864, 3853, 3855, 3870, 3871, 3872, 3873, 3874, 3856, 3875, 3848, 3859, 3876, 3848, 3877, 3867, 3881, 3883, 3868, 3881, 3885, 3881, 3886, 3885, 3888, 3869, 3909, 927, 902, 3909, 890, 3870, 3871, 3872, 3873, 3874, 3884, 3875, 879, 3884, 3876, 877, 3877, 875, 3893, 3883, 3887, 3894, 3895, 3887, 3886, 3898, 3888, 3884, 3884, 3884, 3884, 3884, 3884, 3884, 3884, 3884, 3900, 3887, 3887, 3887, 3887, 3887, 3887, 3887, 3887, 3887, 3893, 3901, 3902, 3894, 3895, 3903, 871, 3898, 3907, 3907, 3907, 3907, 3907, 3907, 3907, 3907, 3907, 3908, 3900, 827, 3908, 816, 807, 803, 3911, 3914, 3915, 3916, 3919, 3901, 3902, 3920, 772, 3903, 3908, 3908, 3908, 3908, 3908, 3908, 3908, 3908, 3908, 3910, 3910, 3910, 3910, 3910, 3910, 3910, 3910, 3910, 3911, 3914, 3915, 3916, 3919, 3928, 771, 3920, 3923, 3923, 3923, 3923, 3923, 3923, 3923, 3923, 3923, 3924, 3931, 3933, 3924, 3932, 3932, 3932, 3932, 3932, 3932, 3932, 3932, 3932, 3934, 3935, 3936, 3928, 3924, 3924, 3924, 3924, 3924, 3924, 3924, 3924, 3924, 3938, 3939, 3940, 3931, 3933, 769, 768, 767, 765, 760, 759, 757, 756, 755, 749, 3934, 3935, 3936, 742, 731, 730, 711, 700, 689, 677, 676, 671, 670, 3938, 3939, 3940, 3943, 3943, 3943, 3943, 3943, 3943, 3943, 3943, 3943, 3943, 3943, 3943, 3943, 3943, 3943, 3943, 3943, 3943, 3944, 3944, 3944, 3944, 3944, 3944, 3944, 3944, 3944, 3944, 3944, 3944, 3944, 3944, 3944, 3944, 3944, 3944, 3945, 3945, 3945, 3945, 3945, 3945, 3945, 3945, 3945, 3945, 3945, 3945, 3945, 3945, 3945, 3945, 3945, 3945, 3946, 3946, 3946, 3946, 3946, 3946, 3946, 3946, 3946, 3946, 3946, 3946, 3946, 3946, 3946, 3946, 3946, 3946, 3947, 3947, 3947, 3947, 3947, 3947, 3947, 3947, 3947, 3947, 3947, 3947, 3947, 3947, 3947, 3947, 3947, 3947, 3948, 3948, 3948, 3948, 3948, 3948, 3948, 3948, 3948, 3948, 3948, 3948, 3948, 3948, 3948, 3948, 3948, 3948, 3949, 3949, 3949, 3949, 3949, 3949, 3949, 3949, 3949, 3949, 3949, 3949, 3949, 3949, 3949, 3949, 3949, 3949, 3950, 3950, 3950, 3950, 3950, 3950, 3950, 3950, 3950, 3950, 3950, 3950, 3950, 3950, 3950, 3950, 3950, 3950, 3951, 3951, 3951, 3951, 3951, 3951, 3951, 3951, 3951, 3951, 3951, 3951, 3951, 3951, 3951, 3951, 3951, 3951, 3952, 3952, 3952, 3952, 3952, 3952, 3952, 3952, 3952, 3952, 3952, 3952, 3952, 3952, 3952, 3952, 3952, 3952, 3953, 3953, 3953, 3953, 3953, 3953, 3953, 3953, 3953, 3953, 3953, 3953, 3953, 3953, 3953, 3953, 3953, 3953, 3954, 3954, 3954, 3954, 3954, 3954, 3954, 3954, 3954, 3954, 3954, 3954, 3954, 3954, 3954, 3954, 3954, 3954, 3955, 3955, 3955, 3955, 3955, 3955, 3955, 3955, 3955, 3955, 3955, 3955, 3955, 3955, 3955, 3955, 3955, 3955, 3956, 3956, 3956, 3956, 3956, 3956, 3956, 3956, 3956, 3956, 3956, 3956, 3956, 3956, 3956, 3956, 3956, 3956, 3957, 3957, 3957, 3957, 3957, 3957, 3957, 3957, 3957, 3957, 3957, 3957, 3957, 3957, 3957, 3957, 3957, 3957, 3958, 3958, 3958, 3958, 3958, 3958, 3958, 3958, 3958, 3958, 3958, 3958, 3958, 3958, 3958, 3958, 3958, 3958, 3959, 3959, 3959, 3959, 3959, 3959, 3959, 3959, 3959, 3959, 3959, 3959, 3959, 3959, 3959, 3959, 3959, 3959, 3960, 3960, 3960, 3960, 3960, 3960, 3960, 3960, 3960, 3960, 3960, 3960, 3960, 3960, 3960, 3960, 3960, 3960, 3961, 3961, 3961, 3961, 3961, 3961, 3961, 3961, 3961, 3961, 3961, 3961, 3961, 3961, 3961, 3961, 3961, 3961, 3962, 3962, 3962, 3962, 3962, 3962, 3962, 3962, 3962, 3962, 3962, 3962, 3962, 3962, 3962, 3962, 3962, 3962, 3963, 3963, 3963, 3963, 3963, 3963, 3963, 3963, 3963, 3963, 3963, 3963, 3963, 3963, 3963, 3963, 3963, 3963, 3964, 3964, 3964, 3964, 3964, 3964, 3964, 3964, 3964, 3964, 3964, 3964, 3964, 3964, 3964, 3964, 3964, 3964, 3965, 3965, 3965, 3965, 3965, 3965, 3965, 3965, 3965, 3965, 3965, 3965, 3965, 3965, 3965, 3965, 3965, 3965, 3966, 3966, 668, 3966, 3966, 3966, 3966, 3966, 3966, 3966, 3966, 3966, 3966, 3966, 3966, 3966, 3966, 3966, 3967, 3967, 3967, 3967, 3967, 3967, 3967, 3967, 3967, 3967, 3967, 3967, 3967, 3967, 3967, 3967, 3967, 3967, 3968, 3968, 3968, 3968, 3968, 3968, 3968, 3968, 3968, 3968, 3968, 3968, 3968, 3968, 3968, 3968, 3968, 3968, 3969, 3969, 3969, 3969, 3969, 3969, 3969, 3969, 3969, 3969, 3969, 3969, 3969, 3969, 3969, 3969, 3969, 3969, 3970, 3970, 3970, 3970, 3970, 3970, 3970, 3970, 3970, 3970, 3970, 3970, 3970, 3970, 3970, 3970, 3970, 3970, 3971, 3971, 3971, 3971, 3971, 3971, 3971, 3971, 3971, 3971, 3971, 3971, 3971, 3971, 3971, 3971, 3971, 3971, 3972, 3972, 3972, 3972, 3972, 3972, 3972, 3972, 3972, 3972, 3972, 3972, 3972, 3972, 3972, 3972, 3972, 3972, 3973, 3973, 3973, 3973, 3973, 3973, 3973, 3973, 3973, 3973, 3973, 3973, 3973, 3973, 3973, 3973, 3973, 3973, 3974, 3974, 3974, 3974, 3974, 3974, 3974, 3974, 3974, 3974, 3974, 3974, 3974, 3974, 3974, 3974, 3974, 3974, 3975, 3975, 3975, 3975, 3975, 3975, 3975, 3975, 3975, 3975, 3975, 3975, 3975, 3975, 3975, 3975, 3975, 3975, 3976, 3976, 3976, 3976, 3976, 3976, 3976, 3976, 3976, 3976, 3976, 3976, 3976, 3976, 3976, 3976, 3976, 3976, 3977, 3977, 3977, 3977, 3977, 3977, 3977, 3977, 3977, 3977, 3977, 3977, 3977, 3977, 3977, 3977, 3977, 3977, 3978, 3978, 3978, 3978, 3978, 3978, 3978, 3978, 3978, 3978, 3978, 3978, 3978, 3978, 3978, 3978, 3978, 3978, 3979, 3979, 3979, 3979, 3979, 3979, 3979, 3979, 3979, 3979, 3979, 3979, 3979, 3979, 3979, 3979, 3979, 3979, 3980, 3980, 3980, 3980, 3980, 3980, 3980, 3980, 3980, 3980, 3980, 3980, 3980, 3980, 3980, 3980, 3980, 3980, 3981, 3981, 3981, 3981, 3981, 3981, 3981, 3981, 3981, 3981, 3981, 3981, 3981, 3981, 3981, 3981, 3981, 3981, 3982, 3982, 3982, 3982, 3982, 3982, 3982, 3982, 3982, 3982, 3982, 3982, 3982, 3982, 3982, 3982, 3982, 3982, 3983, 3983, 3983, 3983, 3983, 3983, 3983, 3983, 3983, 3983, 3983, 3983, 3983, 3983, 3983, 3983, 3983, 3983, 3984, 3984, 661, 3984, 3984, 3984, 3984, 3984, 3984, 3984, 3984, 3984, 3984, 3984, 3984, 3984, 3984, 3984, 3985, 3985, 651, 3985, 3985, 3985, 3985, 3985, 3985, 3985, 3985, 3985, 3985, 3985, 3985, 3985, 3985, 3985, 3986, 3986, 650, 3986, 3986, 3986, 3986, 3986, 3986, 3986, 3986, 3986, 3986, 3986, 3986, 3986, 3986, 3986, 3987, 3987, 3987, 3987, 3987, 3987, 3987, 3987, 3987, 3987, 3987, 3987, 3987, 3987, 3987, 3987, 3987, 3987, 3988, 3988, 3988, 3988, 3988, 3988, 3988, 3988, 3988, 3988, 3988, 3988, 3988, 3988, 3988, 3988, 3988, 3988, 3989, 3989, 3989, 3989, 3989, 3989, 3989, 3989, 3989, 3989, 3989, 3989, 3989, 3989, 3989, 3989, 3989, 3989, 3990, 3990, 3990, 3990, 3990, 3990, 3990, 3990, 3990, 3990, 3990, 3990, 3990, 3990, 3990, 3990, 3990, 3990, 3991, 3991, 648, 3991, 3991, 3991, 3991, 3991, 3991, 3991, 3991, 3991, 3991, 3991, 3991, 3991, 3991, 3991, 3992, 3992, 3992, 3992, 3992, 3992, 3992, 3992, 3992, 3992, 3992, 3992, 3992, 3992, 3992, 3992, 3992, 3992, 3993, 3993, 3993, 3993, 3993, 3993, 3993, 3993, 3993, 3993, 3993, 3993, 3993, 3993, 3993, 3993, 3993, 3993, 3994, 3994, 3994, 3994, 3994, 3994, 3994, 3994, 3994, 3994, 3994, 3994, 3994, 3994, 3994, 3994, 644, 3994, 3995, 3995, 3995, 3995, 3995, 3995, 3995, 3995, 3995, 3995, 3995, 3995, 3995, 3995, 3995, 3995, 3995, 3995, 3996, 3996, 3996, 3996, 3996, 3996, 3996, 3996, 3996, 3996, 3996, 3996, 3996, 3996, 3996, 3996, 634, 3996, 3997, 3997, 3997, 3997, 3997, 3997, 3997, 3997, 3997, 3997, 3997, 3997, 3997, 3997, 3997, 3997, 3997, 3997, 3998, 3998, 3998, 3998, 3998, 3998, 3998, 3998, 3998, 3998, 3998, 3998, 3998, 3998, 3998, 3998, 3998, 3998, 3999, 3999, 3999, 3999, 3999, 3999, 3999, 3999, 3999, 3999, 3999, 3999, 3999, 3999, 3999, 3999, 3999, 3999, 4000, 4000, 4000, 4000, 4000, 4000, 4000, 4000, 4000, 4000, 4000, 4000, 4000, 4000, 4000, 4000, 4000, 4000, 4001, 633, 4001, 4001, 631, 628, 4001, 4001, 4001, 4001, 4001, 627, 4001, 4001, 4001, 4001, 4001, 4002, 4002, 4002, 4002, 4002, 4002, 4002, 4002, 4002, 4002, 4002, 4002, 4002, 4002, 4002, 4002, 4002, 4002, 4003, 4003, 4003, 4003, 4003, 4003, 4003, 4003, 4003, 4003, 4003, 4003, 4003, 4003, 4003, 4003, 625, 4003, 4004, 4004, 4004, 4004, 4004, 4004, 4004, 4004, 4004, 4004, 4004, 4004, 4004, 4004, 4004, 4004, 4004, 4004, 4005, 4005, 4005, 4005, 4005, 4005, 4005, 4005, 4005, 4005, 4005, 4005, 4005, 4005, 4005, 4005, 4005, 4005, 4006, 4006, 4006, 4006, 4006, 4006, 4006, 4006, 4006, 4006, 4006, 4006, 4006, 4006, 4006, 4006, 4006, 4006, 4007, 622, 4007, 4007, 621, 541, 4007, 4007, 4007, 4007, 4007, 537, 4007, 4007, 4007, 4007, 4007, 4008, 4008, 4008, 4008, 4008, 4008, 4008, 4008, 4008, 4008, 4008, 4008, 4008, 4008, 4008, 4008, 4008, 4008, 4009, 4009, 4009, 4009, 4009, 4009, 4009, 4009, 4009, 4009, 4009, 4009, 4009, 4009, 4009, 4009, 536, 4009, 4010, 4010, 4010, 4010, 4010, 4010, 4010, 4010, 4010, 4010, 4010, 4010, 4010, 4010, 4010, 4010, 4010, 4010, 4011, 4011, 4011, 4011, 4011, 4011, 4011, 4011, 4011, 4011, 4011, 4011, 4011, 4011, 4011, 4011, 4011, 4011, 4012, 4012, 4012, 4012, 4012, 4012, 4012, 4012, 4012, 4012, 4012, 4012, 4012, 4012, 4012, 4012, 4012, 4012, 4013, 4013, 4013, 4013, 4013, 4013, 4013, 4013, 4013, 4013, 4013, 4013, 4013, 4013, 4013, 4013, 530, 4013, 4014, 4014, 529, 4014, 4014, 4014, 4014, 4014, 4014, 4014, 4014, 4014, 4014, 4014, 4014, 4014, 4014, 4014, 4015, 4015, 513, 4015, 4015, 4015, 4015, 4015, 4015, 4015, 4015, 4015, 4015, 4015, 4015, 4015, 4015, 4015, 4016, 4016, 512, 4016, 4016, 4016, 4016, 4016, 4016, 4016, 4016, 4016, 4016, 4016, 4016, 4016, 4016, 4016, 4017, 4017, 4017, 4017, 4017, 4017, 4017, 4017, 4017, 4017, 4017, 4017, 4017, 4017, 4017, 4017, 4017, 4017, 4018, 4018, 4018, 4018, 4018, 4018, 4018, 4018, 4018, 4018, 4018, 4018, 4018, 4018, 4018, 4018, 506, 4018, 4019, 4019, 4019, 4019, 4019, 4019, 4019, 4019, 4019, 4019, 4019, 4019, 4019, 4019, 4019, 4019, 4019, 4019, 4020, 4020, 4020, 4020, 4020, 4020, 4020, 4020, 4020, 4020, 4020, 4020, 4020, 4020, 4020, 4020, 504, 4020, 4021, 4021, 490, 4021, 4021, 4021, 4021, 4021, 4021, 4021, 4021, 4021, 4021, 4021, 4021, 4021, 4021, 4021, 4022, 4022, 4022, 4022, 4022, 4022, 4022, 4022, 4022, 4022, 4022, 4022, 4022, 4022, 4022, 4022, 4022, 4022, 4023, 4023, 4023, 4023, 4023, 4023, 4023, 4023, 4023, 4023, 4023, 4023, 4023, 4023, 4023, 4023, 4023, 4023, 4024, 4024, 4024, 4024, 4024, 4024, 4024, 4024, 4024, 4024, 4024, 4024, 4024, 4024, 4024, 4024, 4024, 4024, 4025, 4025, 4025, 4025, 4025, 4025, 4025, 4025, 4025, 4025, 4025, 4025, 4025, 4025, 4025, 4025, 4025, 4025, 4026, 4026, 4026, 4026, 4026, 4026, 4026, 4026, 4026, 4026, 4026, 4026, 4026, 4026, 4026, 4026, 4026, 4026, 4027, 4027, 4027, 4027, 4027, 4027, 4027, 4027, 4027, 4027, 4027, 4027, 4027, 4027, 4027, 4027, 4027, 4027, 4028, 478, 4028, 4028, 475, 453, 4028, 4028, 4028, 4028, 4028, 440, 4028, 4028, 4028, 4028, 4028, 4028, 4029, 434, 4029, 4029, 422, 413, 4029, 4029, 4029, 4029, 4029, 412, 4029, 4029, 4029, 4029, 4029, 4029, 4030, 4030, 4030, 4030, 4030, 4030, 4030, 4030, 4030, 4030, 4030, 4030, 4030, 4030, 4030, 4030, 4030, 4030, 4031, 393, 4031, 4031, 392, 385, 4031, 4031, 4031, 4031, 4031, 383, 4031, 4031, 4031, 4031, 4031, 4032, 4032, 4032, 4032, 4032, 4032, 4032, 4032, 4032, 4032, 4032, 4032, 4032, 4032, 4032, 4032, 4032, 4032, 4033, 4033, 4033, 4033, 4033, 4033, 4033, 4033, 4033, 4033, 4033, 4033, 4033, 4033, 4033, 4033, 4033, 4033, 4034, 4034, 4034, 4034, 4034, 4034, 4034, 4034, 4034, 4034, 4034, 4034, 4034, 4034, 4034, 4034, 4034, 4034, 4035, 4035, 4035, 4035, 4035, 4035, 4035, 4035, 4035, 4035, 4035, 4035, 4035, 4035, 4035, 4035, 4035, 4035, 4036, 368, 4036, 4036, 367, 358, 4036, 4036, 4036, 4036, 4036, 357, 4036, 4036, 4036, 4036, 4036, 4036, 4037, 4037, 4037, 4037, 4037, 4037, 4037, 4037, 4037, 4037, 4037, 4037, 4037, 4037, 4037, 4037, 4037, 4037, 4038, 4038, 4038, 4038, 4038, 4038, 4038, 4038, 4038, 4038, 4038, 4038, 4038, 4038, 4038, 4038, 4038, 4038, 4039, 347, 4039, 4039, 317, 316, 4039, 4039, 4039, 4039, 4039, 284, 4039, 4039, 4039, 4039, 4039, 4040, 4040, 4040, 4040, 4040, 4040, 4040, 4040, 4040, 4040, 4040, 4040, 4040, 4040, 4040, 4040, 4040, 4040, 4041, 4041, 4041, 4041, 4041, 4041, 4041, 4041, 4041, 4041, 4041, 4041, 4041, 4041, 4041, 4041, 4041, 4041, 4042, 4042, 4042, 4042, 4042, 4042, 4042, 4042, 4042, 4042, 4042, 4042, 4042, 4042, 4042, 4042, 4042, 4042, 4043, 4043, 4043, 4043, 4043, 4043, 4043, 4043, 4043, 4043, 4043, 4043, 4043, 4043, 4043, 4043, 4043, 4043, 4044, 4044, 4044, 4044, 4044, 4044, 4044, 4044, 4044, 4044, 4044, 4044, 4044, 4044, 4044, 4044, 4044, 4044, 4045, 4045, 4045, 4045, 4045, 4045, 4045, 4045, 4045, 4045, 4045, 4045, 4045, 4045, 4045, 4045, 4045, 4045, 4046, 4046, 4046, 4046, 4046, 4046, 4046, 4046, 4046, 4046, 4046, 4046, 4046, 4046, 4046, 4046, 4046, 4046, 4047, 4047, 4047, 4047, 4047, 4047, 4047, 4047, 4047, 4047, 4047, 4047, 4047, 4047, 4047, 4047, 4047, 4047, 4048, 4048, 4048, 4048, 4048, 4048, 4048, 4048, 4048, 4048, 4048, 4048, 4048, 4048, 4048, 4048, 4048, 4048, 4049, 4049, 4049, 4049, 4049, 4049, 4049, 4049, 4049, 4049, 4049, 4049, 4049, 4049, 4049, 4049, 4049, 4049, 4050, 4050, 4050, 4050, 4050, 4050, 4050, 4050, 4050, 4050, 4050, 4050, 4050, 4050, 4050, 4050, 4050, 4050, 4051, 4051, 268, 4051, 4051, 4051, 4051, 4051, 4051, 4051, 4051, 4051, 4051, 4051, 4051, 4051, 4051, 4051, 4052, 4052, 4052, 4052, 4052, 4052, 4052, 4052, 4052, 4052, 4052, 4052, 4052, 4052, 4052, 4052, 4052, 4052, 4053, 4053, 4053, 4053, 4053, 4053, 4053, 4053, 4053, 4053, 4053, 4053, 4053, 4053, 4053, 4053, 4053, 4053, 4054, 4054, 4054, 4054, 4054, 4054, 4054, 4054, 4054, 4054, 4054, 4054, 4054, 4054, 4054, 4054, 4054, 4054, 4055, 4055, 4055, 4055, 4055, 4055, 4055, 4055, 4055, 4055, 4055, 4055, 4055, 4055, 4055, 4055, 4055, 4055, 4056, 261, 4056, 4056, 259, 252, 4056, 4056, 4056, 4056, 4056, 234, 4056, 4056, 4056, 4056, 4056, 4056, 4057, 229, 4057, 4057, 216, 194, 4057, 4057, 4057, 4057, 4057, 182, 4057, 4057, 4057, 4057, 4057, 4057, 4058, 175, 4058, 4058, 172, 165, 4058, 4058, 4058, 4058, 4058, 164, 4058, 4058, 4058, 4058, 4058, 4059, 4059, 4059, 4059, 4059, 4059, 4059, 4059, 4059, 4059, 4059, 4059, 4059, 4059, 4059, 4059, 4059, 4059, 4060, 163, 4060, 4060, 154, 152, 4060, 4060, 4060, 4060, 4060, 146, 4060, 4060, 4060, 4060, 4060, 4060, 4061, 4061, 4061, 4061, 4061, 4061, 4061, 4061, 4061, 4061, 4061, 4061, 4061, 4061, 4061, 4061, 4061, 4061, 4062, 141, 4062, 4062, 117, 75, 4062, 4062, 4062, 4062, 4062, 64, 4062, 4062, 4062, 4062, 4062, 4062, 4063, 4063, 4063, 4063, 4063, 4063, 4063, 4063, 4063, 4063, 4063, 4063, 4063, 4063, 4063, 4063, 4063, 4063, 4064, 4064, 4064, 4064, 4064, 4064, 4064, 4064, 4064, 4064, 4064, 4064, 4064, 4064, 4064, 4064, 4064, 4064, 4065, 63, 4065, 4065, 58, 57, 4065, 4065, 4065, 4065, 4065, 56, 4065, 4065, 4065, 4065, 4065, 4066, 4066, 4066, 4066, 4066, 4066, 4066, 4066, 4066, 4066, 4066, 4066, 4066, 4066, 4066, 4066, 4066, 4066, 4067, 4067, 4067, 4067, 4067, 4067, 4067, 4067, 4067, 4067, 4067, 4067, 4067, 4067, 4067, 4067, 4067, 4067, 4068, 4068, 4068, 4068, 4068, 4068, 4068, 4068, 4068, 4068, 4068, 4068, 4068, 4068, 4068, 4068, 4068, 4068, 4069, 4069, 4069, 4069, 4069, 4069, 4069, 4069, 4069, 55, 4069, 4069, 4069, 4069, 4069, 4069, 4069, 4069, 4070, 4070, 4070, 4070, 4070, 4070, 4070, 4070, 4070, 4070, 4070, 4070, 4070, 4070, 4070, 4070, 4070, 4070, 4071, 4071, 4071, 4071, 4071, 4071, 4071, 4071, 4071, 4071, 4071, 4071, 4071, 4071, 4071, 4071, 4071, 4071, 4072, 4072, 4072, 4072, 4072, 4072, 4072, 4072, 4072, 4072, 4072, 4072, 4072, 4072, 4072, 4072, 4072, 4072, 4073, 4073, 4073, 4073, 4073, 4073, 4073, 4073, 4073, 4073, 4073, 4073, 4073, 4073, 4073, 4073, 4073, 4073, 4074, 4074, 54, 4074, 4074, 4074, 4074, 4074, 4074, 4074, 4074, 4074, 4074, 4074, 4074, 4074, 4074, 4074, 4075, 4075, 4075, 4075, 4075, 4075, 4075, 4075, 4075, 4075, 4075, 4075, 4075, 4075, 4075, 4075, 4075, 4075, 4076, 4076, 4076, 4076, 4076, 4076, 4076, 4076, 4076, 4076, 4076, 4076, 4076, 4076, 4076, 4076, 4076, 4076, 4077, 4077, 4077, 4077, 4077, 4077, 4077, 4077, 4077, 4077, 4077, 4077, 4077, 4077, 4077, 4077, 4077, 4077, 4078, 53, 4078, 4078, 52, 51, 4078, 4078, 4078, 4078, 4078, 26, 4078, 4078, 4078, 4078, 4078, 4078, 4079, 25, 4079, 4079, 24, 23, 4079, 4079, 4079, 4079, 4079, 0, 4079, 4079, 4079, 4079, 4079, 4079, 4080, 4080, 4080, 4080, 4080, 4080, 4080, 4080, 4080, 4080, 4080, 4080, 4080, 4080, 4080, 4080, 4080, 4080, 4081, 0, 4081, 4081, 0, 0, 4081, 4081, 4081, 4081, 4081, 0, 4081, 4081, 4081, 4081, 4081, 4081, 4082, 4082, 4082, 4082, 4082, 4082, 4082, 4082, 4082, 4082, 4082, 4082, 4082, 4082, 4082, 4082, 4082, 4082, 4083, 0, 4083, 4083, 0, 0, 4083, 4083, 4083, 4083, 4083, 4083, 4083, 4083, 4083, 4083, 4083, 4084, 4084, 4084, 4084, 4084, 4084, 4084, 4084, 4084, 4084, 4084, 4084, 4084, 4084, 4084, 4084, 4084, 4084, 4085, 4085, 4085, 4085, 4085, 4085, 4085, 4085, 4085, 4085, 4085, 4085, 4085, 4085, 4085, 4085, 4085, 4085, 4086, 0, 4086, 4086, 0, 0, 4086, 4086, 4086, 0, 4086, 4086, 4086, 4086, 4086, 4086, 4086, 4086, 4087, 4087, 4087, 4087, 4087, 4087, 4087, 0, 4087, 0, 4087, 4087, 4087, 4087, 4087, 4087, 4087, 4087, 4088, 4088, 4088, 4088, 4088, 4088, 4088, 4088, 4088, 4088, 4088, 4088, 4088, 4088, 4088, 4088, 4088, 4088, 4089, 4089, 4089, 4089, 4089, 4089, 4089, 4089, 4089, 4089, 4089, 4089, 4089, 4089, 4089, 4089, 4089, 4089, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4090, 4091, 4091, 4091, 4091, 4091, 4091, 4091, 4091, 4091, 4091, 4091, 4091, 4091, 4091, 4091, 4091, 4091, 4091, 4092, 4092, 0, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4092, 4093, 4093, 4093, 4093, 4093, 4093, 4093, 4093, 4093, 4093, 4093, 4093, 4093, 4093, 4093, 4093, 4093, 4093, 4094, 4094, 4094, 4094, 4094, 4094, 4094, 4094, 4094, 4094, 4094, 4094, 4094, 4094, 4094, 4094, 4094, 4094, 4095, 0, 0, 4095, 0, 0, 4095, 4096, 0, 0, 0, 0, 0, 4096, 4096, 4096, 0, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4097, 4097, 4097, 4097, 4097, 4097, 4097, 4097, 4097, 4097, 4097, 4097, 4097, 4097, 4097, 4097, 4097, 4097, 4098, 0, 0, 4098, 0, 4098, 4099, 4099, 4099, 4099, 4099, 4099, 4099, 4099, 4099, 4099, 4099, 4099, 4099, 4099, 4099, 4099, 4099, 4099, 4100, 0, 0, 4100, 4100, 0, 0, 4100, 0, 4100, 0, 4100, 4100, 4100, 4100, 4101, 4101, 4101, 4101, 4102, 4102, 0, 4102, 4102, 4102, 4102, 4102, 4102, 4102, 4102, 4102, 4102, 4102, 4102, 4102, 4102, 4102, 4103, 4103, 0, 4103, 4103, 4103, 4103, 4103, 4103, 4103, 4103, 4103, 4103, 4103, 4103, 4103, 4103, 4103, 4104, 0, 4104, 0, 4104, 4104, 4104, 4104, 4105, 4105, 4105, 4105, 4105, 4105, 4105, 4105, 4105, 4105, 4105, 4105, 4105, 4105, 4105, 4105, 4105, 4105, 4106, 4106, 4106, 4106, 4106, 4106, 4106, 4106, 4106, 4106, 4106, 4106, 4106, 4106, 4106, 4106, 4106, 4106, 4107, 4107, 4107, 4107, 4107, 4107, 4107, 4107, 4107, 4107, 4107, 4107, 4107, 4107, 4107, 4107, 4107, 4107, 4108, 4108, 0, 0, 4108, 4108, 4108, 4108, 4108, 0, 4108, 4108, 4108, 4108, 4108, 4108, 4108, 4108, 4109, 0, 0, 4109, 4109, 0, 0, 4109, 0, 4109, 0, 4109, 4109, 4109, 4109, 4110, 4110, 4110, 4110, 4110, 4110, 4110, 4110, 4110, 4110, 4110, 4110, 4110, 4110, 4110, 4110, 4110, 4110, 4111, 0, 4111, 4111, 0, 0, 4111, 4111, 4111, 4111, 4111, 4111, 4111, 4111, 4111, 4111, 4111, 4111, 4112, 4112, 4112, 4112, 4112, 4112, 4112, 4112, 4112, 4112, 4112, 4112, 4112, 4112, 4112, 4112, 4112, 4112, 4113, 0, 0, 0, 0, 0, 4113, 4113, 4113, 0, 4113, 4113, 4113, 4113, 4113, 4113, 4113, 4113, 4114, 4114, 0, 4114, 4114, 4114, 4114, 4114, 4114, 4114, 4114, 4114, 4114, 4114, 4114, 4114, 4114, 4114, 4115, 4115, 0, 4115, 4115, 4115, 4115, 4115, 4115, 4115, 4115, 4115, 4115, 4115, 4115, 4115, 4115, 4115, 4116, 0, 0, 4116, 4116, 0, 0, 4116, 0, 4116, 0, 4116, 4116, 4116, 4116, 4117, 0, 0, 0, 0, 0, 4117, 4117, 4117, 0, 4117, 4117, 4117, 4117, 4117, 4117, 4117, 4117, 4118, 4118, 0, 4118, 4118, 0, 4118, 4118, 4118, 4118, 4118, 4118, 4118, 4118, 4118, 4118, 4118, 4119, 0, 4119, 0, 4119, 4119, 4119, 4119, 4120, 4120, 4120, 4120, 4120, 4120, 4120, 4120, 4120, 4120, 4120, 4120, 4120, 4120, 4120, 4120, 4120, 4120, 4121, 0, 4121, 4121, 0, 0, 4121, 4121, 4121, 4121, 4121, 4121, 4121, 4121, 4121, 4121, 4121, 4121, 4122, 4122, 4122, 4122, 4122, 4122, 4122, 4122, 4122, 4122, 4122, 4122, 4122, 4122, 4122, 4122, 4122, 4122, 4123, 4123, 4123, 4123, 4123, 4123, 4123, 4123, 4123, 4123, 4123, 4123, 4123, 4123, 4123, 4123, 4123, 4123, 4124, 0, 0, 4124, 4124, 0, 0, 4124, 0, 4124, 0, 4124, 4124, 4124, 4124, 4125, 0, 4125, 0, 4125, 4125, 4125, 4125, 4126, 0, 0, 4126, 4126, 0, 0, 4126, 0, 4126, 0, 4126, 4126, 4126, 4126, 4127, 4127, 0, 4127, 4127, 4127, 4127, 4127, 4127, 4127, 4127, 4127, 4127, 4127, 4127, 4127, 4127, 4128, 0, 4128, 4128, 0, 0, 4128, 4128, 4128, 4128, 4128, 4128, 4128, 4128, 4128, 4128, 4128, 4128, 4129, 4129, 4129, 4129, 4129, 4129, 4129, 4129, 4129, 4129, 4129, 4129, 4129, 4129, 4129, 4129, 4129, 4129, 4130, 4130, 4130, 4130, 4130, 4130, 4130, 4130, 4130, 4130, 4130, 4130, 4130, 4130, 4130, 4130, 4130, 4130, 4131, 4131, 4131, 4131, 4131, 4131, 4131, 4131, 4131, 4131, 4131, 4131, 4131, 4131, 4131, 4131, 4131, 4131, 4132, 0, 4132, 4132, 0, 0, 4132, 4132, 4132, 4132, 4132, 4132, 4132, 4132, 4132, 4132, 4132, 4132, 4133, 4133, 4133, 4133, 4133, 4133, 4133, 4133, 4133, 4133, 4133, 4133, 4133, 4133, 4133, 4133, 4133, 4133, 4134, 4134, 4134, 4134, 4134, 4134, 4134, 4134, 4134, 4134, 4134, 4134, 4134, 4134, 4134, 4134, 4134, 4134, 4135, 4135, 0, 4135, 4135, 4135, 4135, 4135, 4135, 4135, 4135, 4135, 4135, 4135, 4135, 4135, 4135, 4135, 4136, 4136, 4136, 4136, 4136, 4136, 4136, 4136, 4136, 4136, 4136, 4136, 4136, 4136, 4136, 4136, 4136, 4136, 4137, 4137, 0, 4137, 4137, 4137, 4137, 4137, 4137, 4137, 4137, 4137, 4137, 4137, 4137, 4137, 4137, 4137, 4138, 4138, 4138, 4138, 4138, 4138, 4138, 4138, 4138, 4138, 4138, 4138, 4138, 4138, 4138, 4138, 4138, 4138, 4139, 0, 4139, 0, 4139, 4139, 4139, 4139, 4140, 0, 4140, 0, 4140, 4140, 4140, 4140, 4141, 0, 0, 4141, 0, 0, 0, 4141, 0, 4141, 0, 4141, 4141, 4141, 4141, 4142, 0, 0, 4142, 4142, 0, 0, 4142, 0, 4142, 0, 4142, 4142, 4142, 4142, 4143, 0, 0, 4143, 0, 4143, 0, 4143, 4143, 4143, 4143, 4144, 0, 4144, 0, 4144, 4144, 4144, 4144, 4145, 0, 4145, 0, 4145, 4145, 4145, 4145, 4146, 4146, 0, 4146, 4146, 0, 4146, 4146, 4146, 4146, 4146, 4146, 4146, 4146, 4146, 4146, 4146, 4147, 0, 0, 4147, 4147, 0, 0, 4147, 0, 4147, 0, 4147, 4147, 4147, 4147, 4148, 4148, 0, 4148, 4148, 0, 4148, 4148, 4148, 4148, 4148, 4148, 4148, 4148, 4148, 4148, 4148, 4149, 4149, 4149, 4149, 4149, 4149, 4149, 4149, 4149, 4149, 4149, 4149, 4149, 4149, 4149, 4149, 4149, 4149, 4150, 4150, 4150, 4150, 4150, 4150, 4150, 4150, 4150, 4150, 4150, 4150, 4150, 4150, 4150, 4150, 4150, 4150, 4151, 4151, 4151, 4151, 4151, 4151, 4151, 4151, 4151, 4151, 4151, 4151, 4151, 4151, 4151, 4151, 4151, 4151, 4152, 0, 4152, 4152, 0, 0, 4152, 4152, 4152, 4152, 4152, 4152, 4152, 4152, 4152, 4152, 4152, 4152, 4153, 0, 4153, 4153, 0, 0, 4153, 4153, 4153, 4153, 4153, 4153, 4153, 4153, 4153, 4153, 4153, 4153, 4154, 4154, 4154, 4154, 4154, 4154, 4154, 4154, 4154, 4154, 4154, 4154, 4154, 4154, 4154, 4154, 4154, 4154, 4155, 4155, 4155, 4155, 4155, 4155, 4155, 4155, 4155, 4155, 4155, 4155, 4155, 4155, 4155, 4155, 4155, 4155, 4156, 4156, 4156, 4156, 4156, 4156, 4156, 4156, 4156, 4156, 4156, 4156, 4156, 4156, 4156, 4156, 4156, 4156, 4157, 4157, 4157, 4157, 4157, 4157, 4157, 4157, 4157, 4157, 4157, 4157, 4157, 4157, 4157, 4157, 4157, 4157, 4158, 0, 4158, 4158, 0, 0, 4158, 4158, 4158, 4158, 4158, 4158, 4158, 4158, 4158, 4158, 4158, 4158, 4159, 4159, 4159, 4159, 4159, 4159, 4159, 4159, 4159, 4159, 4159, 4159, 4159, 4159, 4159, 4159, 4159, 4159, 4160, 4160, 4160, 4160, 4160, 4160, 4160, 4160, 4160, 4160, 4160, 4160, 4160, 4160, 4160, 4160, 4160, 4160, 4161, 4161, 4161, 4161, 4161, 4161, 4161, 4161, 4161, 4161, 4161, 4161, 4161, 4161, 4161, 4161, 4161, 4161, 4162, 0, 4162, 4162, 0, 0, 4162, 4162, 4162, 4162, 4162, 4162, 4162, 4162, 4162, 4162, 4162, 4162, 4163, 4163, 4163, 4163, 4163, 4163, 4163, 4163, 4163, 4163, 4163, 4163, 4163, 4163, 4163, 4163, 4163, 4163, 4164, 4164, 4164, 4164, 4164, 4164, 4164, 4164, 4164, 4164, 4164, 4164, 4164, 4164, 4164, 4164, 4164, 4164, 4165, 0, 0, 4165, 0, 4165, 0, 4165, 4165, 4165, 4165, 4166, 0, 4166, 0, 4166, 4166, 4166, 4166, 4167, 0, 4167, 0, 4167, 4167, 4167, 4167, 4168, 0, 4168, 0, 4168, 4168, 4168, 4168, 4169, 0, 0, 4169, 0, 4169, 0, 4169, 4169, 4169, 4169, 4170, 4170, 0, 4170, 4170, 0, 4170, 4170, 4170, 4170, 4170, 4170, 4170, 4170, 4170, 4170, 4170, 4171, 0, 0, 4171, 4171, 0, 0, 4171, 0, 4171, 0, 4171, 4171, 4171, 4171, 4172, 0, 4172, 0, 4172, 4172, 4172, 4172, 4173, 0, 4173, 0, 4173, 4173, 4173, 4173, 4174, 4174, 4174, 4174, 4174, 4174, 4174, 4174, 4174, 4174, 4174, 4174, 4174, 4174, 4174, 4174, 4174, 4174, 4175, 4175, 4175, 4175, 4175, 4175, 4175, 4175, 4175, 4175, 4175, 4175, 4175, 4175, 4175, 4175, 4175, 4175, 4176, 4176, 4176, 4176, 4176, 4176, 4176, 4176, 4176, 4176, 4176, 4176, 4176, 4176, 4176, 4176, 4176, 4176, 4177, 4177, 4177, 4177, 4177, 4177, 4177, 4177, 4177, 4177, 4177, 4177, 4177, 4177, 4177, 4177, 4177, 4177, 4178, 4178, 4178, 4178, 4178, 4178, 4178, 4178, 4178, 4178, 4178, 4178, 4178, 4178, 4178, 4178, 4178, 4178, 4179, 4179, 4179, 4179, 4179, 4179, 4179, 4179, 4179, 4179, 4179, 4179, 4179, 4179, 4179, 4179, 4179, 4179, 4180, 0, 4180, 4180, 0, 0, 4180, 4180, 4180, 4180, 4180, 4180, 4180, 4180, 4180, 4180, 4180, 4180, 4181, 4181, 4181, 4181, 4181, 4181, 4181, 4181, 4181, 4181, 4181, 4181, 4181, 4181, 4181, 4181, 4181, 4181, 4182, 4182, 4182, 4182, 4182, 4182, 4182, 4182, 4182, 4182, 4182, 4182, 4182, 4182, 4182, 4182, 4182, 4182, 4183, 4183, 4183, 4183, 4183, 4183, 4183, 4183, 4183, 4183, 4183, 4183, 4183, 4183, 4183, 4183, 4183, 4183, 4184, 4184, 4184, 4184, 4184, 4184, 4184, 4184, 4184, 4184, 4184, 4184, 4184, 4184, 4184, 4184, 4184, 4184, 4185, 4185, 0, 4185, 4185, 0, 4185, 4185, 4185, 4185, 4185, 4185, 4185, 4185, 4185, 4185, 4185, 4186, 0, 0, 4186, 4186, 0, 0, 4186, 0, 4186, 0, 4186, 4186, 4186, 4186, 4187, 4187, 4187, 4187, 0, 4187, 4187, 4187, 4187, 4187, 4187, 4187, 4187, 4187, 4187, 4187, 4187, 4187, 4188, 0, 0, 0, 0, 0, 4188, 4188, 4188, 0, 4188, 4188, 4188, 4188, 4188, 4188, 4188, 4188, 4189, 4189, 4189, 4189, 4189, 4189, 4189, 4189, 4189, 4189, 4189, 4189, 4189, 4189, 4189, 4189, 4189, 4189, 4190, 0, 4190, 0, 4190, 4190, 4190, 4190, 4191, 4191, 0, 4191, 4191, 0, 4191, 4191, 4191, 4191, 4191, 4191, 4191, 4191, 4191, 4191, 4191, 4192, 0, 0, 4192, 4192, 0, 0, 0, 0, 0, 0, 4192, 4193, 4193, 0, 0, 0, 4193, 4193, 4193, 4193, 4193, 4193, 4193, 4193, 4193, 4193, 4193, 4193, 4193, 4194, 4194, 0, 4194, 4194, 0, 4194, 4194, 4194, 4194, 4194, 4194, 4194, 4194, 4194, 4194, 4194, 4195, 4195, 0, 4195, 4195, 0, 4195, 4195, 4195, 4195, 4195, 4195, 4195, 4195, 4195, 4195, 4195, 4196, 4196, 0, 4196, 4196, 4196, 4196, 4196, 4196, 4196, 4196, 4196, 4196, 4196, 4196, 4196, 4196, 4197, 4197, 0, 4197, 4197, 4197, 4197, 4197, 4197, 4197, 4197, 4197, 4197, 4197, 4197, 4197, 4197, 4198, 0, 4198, 0, 4198, 0, 4198, 4198, 4198, 4198, 4199, 4199, 0, 4199, 4199, 0, 4199, 4199, 4199, 4199, 4199, 4199, 4199, 4199, 4199, 4199, 4199, 4200, 4200, 0, 4200, 4200, 0, 4200, 4200, 4200, 4200, 4200, 4200, 4200, 4200, 4200, 4200, 4200, 4201, 4201, 4201, 4201, 4201, 4201, 4201, 4201, 4201, 4201, 4201, 4201, 4201, 4201, 4201, 4201, 4201, 4201, 4202, 0, 4202, 0, 4202, 0, 4202, 4202, 4202, 4202, 4203, 4203, 0, 4203, 4203, 4203, 4203, 4203, 4203, 4203, 4203, 4203, 4203, 4203, 4203, 4203, 4203, 4203, 4204, 4204, 0, 4204, 4204, 0, 4204, 4204, 4204, 4204, 4204, 4204, 4204, 4204, 4204, 4204, 4204, 4205, 4205, 0, 0, 4205, 4205, 4205, 4205, 4205, 0, 4205, 4205, 4205, 4205, 4205, 4205, 4205, 4205, 4206, 4206, 0, 4206, 4206, 0, 4206, 4206, 4206, 4206, 4206, 4206, 4206, 4206, 4206, 4206, 4206, 4207, 0, 0, 0, 0, 0, 4207, 4207, 4207, 0, 4207, 4207, 4207, 4207, 4207, 4207, 4207, 4207, 4208, 0, 0, 0, 0, 0, 4208, 4208, 4208, 0, 4208, 4208, 4208, 4208, 4208, 4208, 4208, 4208, 4209, 0, 0, 4209, 4209, 0, 0, 4209, 0, 4209, 0, 4209, 4209, 4209, 4209, 4210, 4210, 0, 4210, 4210, 0, 4210, 4210, 4210, 4210, 4210, 4210, 4210, 4210, 4210, 4210, 4210, 4211, 0, 0, 0, 0, 0, 4211, 4211, 4211, 0, 4211, 4211, 4211, 4211, 4211, 4211, 4211, 4211, 4212, 0, 4212, 0, 4212, 4212, 4212, 4212, 4213, 4213, 0, 4213, 4213, 0, 4213, 4213, 4213, 4213, 4213, 4213, 4213, 4213, 4213, 4213, 4213, 4214, 4214, 4214, 4214, 4214, 4214, 4214, 4214, 4214, 4214, 4214, 4214, 4214, 4214, 4214, 4214, 4214, 4214, 4215, 4215, 0, 4215, 4215, 0, 4215, 4215, 4215, 4215, 4215, 4215, 4215, 4215, 4215, 4215, 4215, 4216, 4216, 0, 0, 4216, 4216, 4216, 4216, 4216, 0, 4216, 4216, 4216, 4216, 4216, 4216, 4216, 4216, 4217, 4217, 0, 0, 4217, 4217, 4217, 4217, 4217, 0, 4217, 4217, 4217, 4217, 4217, 4217, 4217, 4217, 4218, 4218, 0, 4218, 4218, 0, 4218, 4218, 4218, 4218, 4218, 4218, 4218, 4218, 4218, 4218, 4218, 4219, 4219, 0, 4219, 4219, 0, 4219, 4219, 4219, 4219, 4219, 4219, 4219, 4219, 4219, 4219, 4219, 4220, 4220, 0, 0, 4220, 4220, 4220, 4220, 4220, 0, 4220, 4220, 4220, 4220, 4220, 4220, 4220, 4220, 4221, 4221, 0, 0, 4221, 4221, 4221, 4221, 4221, 0, 4221, 4221, 4221, 4221, 4221, 4221, 4221, 4221, 4222, 0, 4222, 0, 4222, 0, 4222, 4222, 4222, 4222, 4223, 4223, 0, 4223, 4223, 4223, 4223, 4223, 4223, 4223, 4223, 4223, 4223, 4223, 4223, 4223, 4223, 4224, 4224, 0, 4224, 4224, 0, 4224, 4224, 4224, 4224, 4224, 4224, 4224, 4224, 4224, 4224, 4224, 4225, 4225, 0, 4225, 4225, 0, 4225, 4225, 4225, 4225, 4225, 4225, 4225, 4225, 4225, 4225, 4225, 4226, 0, 4226, 0, 4226, 0, 4226, 4226, 4226, 4226, 4227, 0, 0, 0, 0, 0, 4227, 4227, 4227, 0, 4227, 4227, 4227, 4227, 4227, 4227, 4227, 4227, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942, 3942 } ; static yy_state_type yy_last_accepting_state; static char *yy_last_accepting_cpos; extern int yy_flex_debug; int yy_flex_debug = 1; static const flex_int16_t yy_rule_linenum[541] = { 0, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 564, 565, 568, 569, 570, 571, 572, 573, 574, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 614, 615, 616, 617, 618, 622, 627, 628, 633, 634, 635, 640, 641, 642, 647, 652, 653, 654, 659, 660, 664, 665, 666, 670, 671, 675, 676, 680, 681, 682, 686, 687, 691, 692, 697, 698, 699, 703, 707, 708, 716, 721, 722, 727, 728, 729, 738, 741, 742, 743, 744, 745, 746, 747, 748, 749, 750, 751, 752, 753, 754, 755, 756, 757, 758, 759, 760, 761, 762, 763, 764, 767, 768, 769, 770, 771, 772, 773, 774, 775, 777, 778, 779, 780, 781, 782, 783, 784, 785, 786, 787, 788, 789, 790, 791, 792, 793, 794, 795, 796, 797, 798, 799, 800, 801, 802, 803, 804, 805, 806, 807, 808, 809, 810, 811, 812, 813, 814, 815, 816, 817, 818, 819, 820, 821, 822, 823, 824, 825, 826, 827, 828, 829, 830, 831, 832, 833, 834, 835, 836, 837, 838, 839, 840, 841, 842, 843, 844, 845, 846, 847, 848, 849, 850, 851, 852, 854, 855, 856, 858, 859, 860, 861, 862, 863, 864, 865, 866, 867, 870, 874, 875, 876, 877, 878, 882, 883, 884, 885, 886, 887, 891, 892, 893, 894, 899, 900, 901, 902, 903, 904, 905, 906, 907, 908, 909, 910, 911, 912, 913, 914, 915, 916, 917, 918, 919, 920, 921, 922, 923, 924, 925, 926, 927, 928, 929, 930, 931, 932, 933, 934, 935, 936, 937, 938, 939, 940, 941, 942, 943, 944, 945, 946, 947, 948, 949, 950, 951, 952, 953, 954, 955, 956, 957, 958, 959, 960, 961, 962, 963, 964, 965, 966, 967, 968, 969, 970, 971, 972, 973, 974, 975, 976, 977, 978, 979, 980, 981, 982, 983, 984, 985, 986, 987, 988, 989, 990, 991, 992, 993, 994, 995, 996, 997, 998, 999, 1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009, 1010, 1011, 1012, 1013, 1014, 1015, 1016, 1017, 1018, 1019, 1022, 1023, 1024, 1025, 1026, 1027, 1028, 1029, 1030, 1034, 1035, 1036, 1037, 1038, 1039, 1044, 1045, 1046, 1047, 1048, 1049, 1050, 1051, 1052, 1054, 1055, 1056, 1057, 1058, 1063, 1064, 1065, 1066, 1067, 1068, 1070, 1071, 1073, 1074, 1080, 1081, 1082, 1083, 1084, 1085, 1088, 1089, 1090, 1091, 1092, 1093, 1097, 1098, 1099, 1100, 1101, 1102, 1103, 1104, 1105, 1106, 1107, 1108, 1109, 1110, 1111, 1112, 1113, 1114, 1115, 1116, 1117, 1118, 1119, 1120, 1121, 1122, 1123, 1124, 1125, 1126, 1127, 1129, 1130, 1135, 1139, 1143, 1144, 1148, 1149, 1152, 1153, 1157, 1158, 1162, 1163, 1167, 1168, 1173, 1175, 1176, 1177, 1178, 1180, 1181, 1182, 1183, 1185, 1186, 1187, 1188, 1190, 1192, 1193, 1195, 1196, 1197, 1198, 1200, 1205, 1206, 1207, 1211, 1212, 1213, 1218, 1220, 1221, 1222, 1241, 1268, 1298 } ; /* The intent behind this definition is that it'll catch * any uses of REJECT which flex missed. */ #define REJECT reject_used_but_not_detected #define yymore() yymore_used_but_not_detected #define YY_MORE_ADJ 0 #define YY_RESTORE_YY_MORE_OFFSET char *yytext; #line 1 "seclang-scanner.ll" #line 2 "seclang-scanner.ll" #include #include #include #include #include "src/parser/driver.h" #include "src/parser/seclang-parser.hh" #include "src/utils/https_client.h" #include "src/utils/string.h" using modsecurity::Parser::Driver; using modsecurity::Utils::HttpsClient; using modsecurity::utils::string::parserSanitizer; typedef yy::seclang_parser p; static int state_variable_from = 0; static std::stack YY_PREVIOUS_STATE; // Work around an incompatibility in flex (at least versions // 2.5.31 through 2.5.33): it generates code that does // not conform to C89. See Debian bug 333231 // . # undef yywrap # define yywrap() 1 #define BEGINX(z) { \ YY_PREVIOUS_STATE.push(YY_START); \ BEGIN(z); \ } #define BEGINX_() { \ YY_PREVIOUS_STATE.push(YY_START); \ if (YY_START == SETVAR_ACTION_NONQUOTED) { \ BEGIN(EXPECTING_VAR_PARAMETER_OR_MACRO_NONQUOTED); \ } else if (YY_START == SETVAR_ACTION_QUOTED) { \ BEGIN(EXPECTING_VAR_PARAMETER_OR_MACRO_QUOTED); \ } else { \ BEGIN(EXPECTING_VAR_PARAMETER); \ } \ } #define BEGIN_PARAMETER() { if (YY_START == EXPECTING_OPERATOR_ENDS_WITH_SPACE) { BEGIN(TRANSITION_FROM_OP_TO_EXPECTING_PARAMETER_ENDS_WITH_SPACE); } else { BEGIN(TRANSITION_FROM_OP_TO_EXPECTING_PARAMETER_ENDS_WITH_QUOTE); } } #define BEGIN_NO_OP_INFORMED() { if (YY_START == EXPECTING_OPERATOR_ENDS_WITH_SPACE) { BEGIN(NO_OP_INFORMED_ENDS_WITH_SPACE); } else { BEGIN(NO_OP_INFORMED_ENDS_WITH_QUOTE); } } #define BEGIN_ACTION_OPERATION() { \ if (YY_START == SETVAR_ACTION_NONQUOTED) { \ BEGIN(SETVAR_ACTION_NONQUOTED_WAITING_OPERATION); \ } else if (YY_START == SETVAR_ACTION_QUOTED) { \ BEGIN(SETVAR_ACTION_QUOTED_WAITING_OPERATION); \ } else if (YY_START == SETVAR_ACTION_NONQUOTED_WAITING_COLLECTION_ELEM) { \ BEGIN(SETVAR_ACTION_NONQUOTED_WAITING_OPERATION); \ } else if (YY_START == SETVAR_ACTION_QUOTED_WAITING_COLLECTION_ELEM) { \ BEGIN(SETVAR_ACTION_QUOTED_WAITING_OPERATION); \ }\ } #define BEGIN_ACTION_WAITING_CONTENT() { \ if (YY_START == SETVAR_ACTION_NONQUOTED_WAITING_OPERATION) { \ BEGIN(SETVAR_ACTION_NONQUOTED_WAITING_CONTENT); \ } else if (YY_START == SETVAR_ACTION_QUOTED_WAITING_OPERATION) { \ BEGIN(SETVAR_ACTION_QUOTED_WAITING_CONTENT); \ } else if (YY_START == EXPECTING_VAR_PARAMETER_OR_MACRO_QUOTED) { \ BEGIN(SETVAR_ACTION_QUOTED_WAITING_CONTENT); \ } else if (YY_START == EXPECTING_VAR_PARAMETER_OR_MACRO_NONQUOTED) { \ BEGIN(SETVAR_ACTION_NONQUOTED_WAITING_CONTENT); \ } \ } #define BEGIN_PREVIOUS() { BEGIN(YY_PREVIOUS_STATE.top()); YY_PREVIOUS_STATE.pop(); } // The location of the current token. #line 5177 "seclang-scanner.cc" #define YY_NO_INPUT 1 #line 493 "seclang-scanner.ll" // Code run each time a pattern is matched. # define YY_USER_ACTION driver.loc.back()->columns (yyleng); #line 5184 "seclang-scanner.cc" #line 5185 "seclang-scanner.cc" #define INITIAL 0 #define EXPECTING_ACTION_PREDICATE_VARIABLE 1 #define TRANSACTION_TO_VARIABLE 2 #define EXPECTING_VARIABLE 3 #define EXPECTING_OPERATOR_ENDS_WITH_SPACE 4 #define EXPECTING_OPERATOR_ENDS_WITH_QUOTE 5 #define EXPECTING_ACTION_PREDICATE 6 #define ACTION_PREDICATE_ENDS_WITH_QUOTE 7 #define ACTION_PREDICATE_ENDS_WITH_DOUBLE_QUOTE 8 #define ACTION_PREDICATE_ENDS_WITH_COMMA_OR_DOUBLE_QUOTE 9 #define COMMENT 10 #define TRANSITION_FROM_OP_TO_EXPECTING_PARAMETER_ENDS_WITH_QUOTE 11 #define TRANSITION_FROM_OP_TO_EXPECTING_PARAMETER_ENDS_WITH_SPACE 12 #define EXPECTING_VAR_PARAMETER 13 #define EXPECTING_VAR_PARAMETER_OR_MACRO_NONQUOTED 14 #define EXPECTING_VAR_PARAMETER_OR_MACRO_QUOTED 15 #define EXPECTING_PARAMETER_ENDS_WITH_QUOTE 16 #define EXPECTING_PARAMETER_ENDS_WITH_SPACE 17 #define EXPECTING_ACTIONS_ENDS_WITH_DOUBLE_QUOTE 18 #define EXPECTING_ACTIONS_ONLY_ONE 19 #define TRANSACTION_FROM_OPERATOR_TO_ACTIONS 20 #define TRANSACTION_FROM_OPERATOR_PARAMETERS_TO_ACTIONS 21 #define TRANSACTION_FROM_DIRECTIVE_TO_ACTIONS 22 #define NO_OP_INFORMED_ENDS_WITH_SPACE 23 #define NO_OP_INFORMED_ENDS_WITH_QUOTE 24 #define FINISH_ACTIONS 25 #define LEXING_ERROR 26 #define LEXING_ERROR_ACTION 27 #define LEXING_ERROR_VARIABLE 28 #define SETVAR_ACTION_NONQUOTED 29 #define SETVAR_ACTION_NONQUOTED_WAITING_COLLECTION_ELEM 30 #define SETVAR_ACTION_NONQUOTED_WAITING_OPERATION 31 #define SETVAR_ACTION_NONQUOTED_WAITING_CONTENT 32 #define SETVAR_ACTION_QUOTED 33 #define SETVAR_ACTION_QUOTED_WAITING_COLLECTION_ELEM 34 #define SETVAR_ACTION_QUOTED_WAITING_OPERATION 35 #define SETVAR_ACTION_QUOTED_WAITING_CONTENT 36 #ifndef YY_NO_UNISTD_H /* Special case for "unistd.h", since it is non-ANSI. We include it way * down here because we want the user's section 1 to have been scanned first. * The user has a chance to override it with an option. */ /* %if-c-only */ #include /* %endif */ /* %if-c++-only */ /* %endif */ #endif #ifndef YY_EXTRA_TYPE #define YY_EXTRA_TYPE void * #endif /* %if-c-only Reentrant structure and macros (non-C++). */ /* %if-reentrant */ /* %if-c-only */ static int yy_init_globals ( void ); /* %endif */ /* %if-reentrant */ /* %endif */ /* %endif End reentrant structures and macros. */ /* Accessor methods to globals. These are made visible to non-reentrant scanners for convenience. */ int yylex_destroy ( void ); int yyget_debug ( void ); void yyset_debug ( int debug_flag ); YY_EXTRA_TYPE yyget_extra ( void ); void yyset_extra ( YY_EXTRA_TYPE user_defined ); FILE *yyget_in ( void ); void yyset_in ( FILE * _in_str ); FILE *yyget_out ( void ); void yyset_out ( FILE * _out_str ); int yyget_leng ( void ); char *yyget_text ( void ); int yyget_lineno ( void ); void yyset_lineno ( int _line_number ); /* %if-bison-bridge */ /* %endif */ /* Macros after this point can all be overridden by user definitions in * section 1. */ #ifndef YY_SKIP_YYWRAP #ifdef __cplusplus extern "C" int yywrap ( void ); #else extern int yywrap ( void ); #endif #endif /* %not-for-header */ #ifndef YY_NO_UNPUT #endif /* %ok-for-header */ /* %endif */ #ifndef yytext_ptr static void yy_flex_strncpy ( char *, const char *, int ); #endif #ifdef YY_NEED_STRLEN static int yy_flex_strlen ( const char * ); #endif #ifndef YY_NO_INPUT /* %if-c-only Standard (non-C++) definition */ /* %not-for-header */ #ifdef __cplusplus static int yyinput ( void ); #else static int input ( void ); #endif /* %ok-for-header */ /* %endif */ #endif /* %if-c-only */ /* %endif */ /* Amount of stuff to slurp up with each read. */ #ifndef YY_READ_BUF_SIZE #ifdef __ia64__ /* On IA-64, the buffer size is 16k, not 8k */ #define YY_READ_BUF_SIZE 16384 #else #define YY_READ_BUF_SIZE 8192 #endif /* __ia64__ */ #endif /* Copy whatever the last rule matched to the standard output. */ #ifndef ECHO /* %if-c-only Standard (non-C++) definition */ /* This used to be an fputs(), but since the string might contain NUL's, * we now use fwrite(). */ #define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0) /* %endif */ /* %if-c++-only C++ definition */ /* %endif */ #endif /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, * is returned in "result". */ #ifndef YY_INPUT #define YY_INPUT(buf,result,max_size) \ /* %% [5.0] fread()/read() definition of YY_INPUT goes here unless we're doing C++ \ */\ if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ { \ int c = '*'; \ int n; \ for ( n = 0; n < max_size && \ (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ buf[n] = (char) c; \ if ( c == '\n' ) \ buf[n++] = (char) c; \ if ( c == EOF && ferror( yyin ) ) \ YY_FATAL_ERROR( "input in flex scanner failed" ); \ result = n; \ } \ else \ { \ errno=0; \ while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \ { \ if( errno != EINTR) \ { \ YY_FATAL_ERROR( "input in flex scanner failed" ); \ break; \ } \ errno=0; \ clearerr(yyin); \ } \ }\ \ /* %if-c++-only C++ definition \ */\ /* %endif */ #endif /* No semi-colon after return; correct usage is to write "yyterminate();" - * we don't want an extra ';' after the "return" because that will cause * some compilers to complain about unreachable statements. */ #ifndef yyterminate #define yyterminate() return YY_NULL #endif /* Number of entries by which start-condition stack grows. */ #ifndef YY_START_STACK_INCR #define YY_START_STACK_INCR 25 #endif /* Report a fatal error. */ #ifndef YY_FATAL_ERROR /* %if-c-only */ #define YY_FATAL_ERROR(msg) yy_fatal_error( msg ) /* %endif */ /* %if-c++-only */ /* %endif */ #endif /* %if-tables-serialization structures and prototypes */ /* %not-for-header */ /* %ok-for-header */ /* %not-for-header */ /* %tables-yydmap generated elements */ /* %endif */ /* end tables serialization structures and prototypes */ /* %ok-for-header */ /* Default declaration of generated scanner - a define so the user can * easily add parameters. */ #ifndef YY_DECL #define YY_DECL_IS_OURS 1 /* %if-c-only Standard (non-C++) definition */ extern int yylex (void); #define YY_DECL int yylex (void) /* %endif */ /* %if-c++-only C++ definition */ /* %endif */ #endif /* !YY_DECL */ /* Code executed at the beginning of each rule, after yytext and yyleng * have been set up. */ #ifndef YY_USER_ACTION #define YY_USER_ACTION #endif /* Code executed at the end of each rule. */ #ifndef YY_BREAK #define YY_BREAK /*LINTED*/break; #endif /* %% [6.0] YY_RULE_SETUP definition goes here */ #define YY_RULE_SETUP \ YY_USER_ACTION /* %not-for-header */ /** The main scanner function which does all the work. */ YY_DECL { yy_state_type yy_current_state; char *yy_cp, *yy_bp; int yy_act; if ( !(yy_init) ) { (yy_init) = 1; #ifdef YY_USER_INIT YY_USER_INIT; #endif if ( ! (yy_start) ) (yy_start) = 1; /* first start state */ if ( ! yyin ) /* %if-c-only */ yyin = stdin; /* %endif */ /* %if-c++-only */ /* %endif */ if ( ! yyout ) /* %if-c-only */ yyout = stdout; /* %endif */ /* %if-c++-only */ /* %endif */ if ( ! YY_CURRENT_BUFFER ) { yyensure_buffer_stack (); YY_CURRENT_BUFFER_LVALUE = yy_create_buffer( yyin, YY_BUF_SIZE ); } yy_load_buffer_state( ); } { /* %% [7.0] user's declarations go here */ #line 498 "seclang-scanner.ll" #line 502 "seclang-scanner.ll" // Code run each time yylex is called. driver.loc.back()->step(); #line 5507 "seclang-scanner.cc" while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */ { /* %% [8.0] yymore()-related code goes here */ yy_cp = (yy_c_buf_p); /* Support of yytext. */ *yy_cp = (yy_hold_char); /* yy_bp points to the position in yy_ch_buf of the start of * the current run. */ yy_bp = yy_cp; /* %% [9.0] code to set up and find next match goes here */ yy_current_state = (yy_start); yy_match: do { YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ; if ( yy_accept[yy_current_state] ) { (yy_last_accepting_state) = yy_current_state; (yy_last_accepting_cpos) = yy_cp; } while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; if ( yy_current_state >= 3943 ) yy_c = yy_meta[yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; ++yy_cp; } while ( yy_current_state != 3942 ); yy_cp = (yy_last_accepting_cpos); yy_current_state = (yy_last_accepting_state); yy_find_action: /* %% [10.0] code to find the action number goes here */ yy_act = yy_accept[yy_current_state]; YY_DO_BEFORE_ACTION; /* %% [11.0] code for yylineno update goes here */ do_action: /* This label is used only to access EOF actions. */ /* %% [12.0] debug code goes here */ if ( yy_flex_debug ) { if ( yy_act == 0 ) fprintf( stderr, "--scanner backing up\n" ); else if ( yy_act < 541 ) fprintf( stderr, "--accepting rule at line %ld (\"%s\")\n", (long)yy_rule_linenum[yy_act], yytext ); else if ( yy_act == 541 ) fprintf( stderr, "--accepting default rule (\"%s\")\n", yytext ); else if ( yy_act == 542 ) fprintf( stderr, "--(end of buffer or a NUL)\n" ); else fprintf( stderr, "--EOF (start condition %d)\n", YY_START ); } switch ( yy_act ) { /* beginning of action switch */ /* %% [13.0] actions go here */ case 0: /* must back up */ /* undo the effects of YY_DO_BEFORE_ACTION */ *yy_cp = (yy_hold_char); yy_cp = (yy_last_accepting_cpos); yy_current_state = (yy_last_accepting_state); goto yy_find_action; case 1: YY_RULE_SETUP #line 506 "seclang-scanner.ll" { return p::make_ACTION_APPEND(yytext, *driver.loc.back()); } YY_BREAK case 2: YY_RULE_SETUP #line 507 "seclang-scanner.ll" { return p::make_ACTION_BLOCK(yytext, *driver.loc.back()); } YY_BREAK case 3: YY_RULE_SETUP #line 508 "seclang-scanner.ll" { return p::make_ACTION_CAPTURE(yytext, *driver.loc.back()); } YY_BREAK case 4: YY_RULE_SETUP #line 509 "seclang-scanner.ll" { return p::make_ACTION_CHAIN(yytext, *driver.loc.back()); } YY_BREAK case 5: YY_RULE_SETUP #line 510 "seclang-scanner.ll" { return p::make_ACTION_DENY(yytext, *driver.loc.back()); } YY_BREAK case 6: YY_RULE_SETUP #line 511 "seclang-scanner.ll" { return p::make_ACTION_DEPRECATE_VAR(yytext, *driver.loc.back()); } YY_BREAK case 7: YY_RULE_SETUP #line 512 "seclang-scanner.ll" { return p::make_ACTION_DROP(yytext, *driver.loc.back()); } YY_BREAK case 8: YY_RULE_SETUP #line 513 "seclang-scanner.ll" { return p::make_ACTION_ID(yytext, *driver.loc.back()); } YY_BREAK case 9: YY_RULE_SETUP #line 514 "seclang-scanner.ll" { return p::make_ACTION_LOG(yytext, *driver.loc.back()); } YY_BREAK case 10: YY_RULE_SETUP #line 515 "seclang-scanner.ll" { return p::make_ACTION_MULTI_MATCH(yytext, *driver.loc.back()); } YY_BREAK case 11: YY_RULE_SETUP #line 516 "seclang-scanner.ll" { return p::make_ACTION_NO_AUDIT_LOG(yytext, *driver.loc.back()); } YY_BREAK case 12: YY_RULE_SETUP #line 517 "seclang-scanner.ll" { return p::make_ACTION_NO_LOG(yytext, *driver.loc.back()); } YY_BREAK case 13: YY_RULE_SETUP #line 518 "seclang-scanner.ll" { return p::make_ACTION_PASS(yytext, *driver.loc.back()); } YY_BREAK case 14: YY_RULE_SETUP #line 519 "seclang-scanner.ll" { return p::make_ACTION_PAUSE(yytext, *driver.loc.back()); } YY_BREAK case 15: YY_RULE_SETUP #line 520 "seclang-scanner.ll" { return p::make_ACTION_PREPEND(yytext, *driver.loc.back()); } YY_BREAK case 16: YY_RULE_SETUP #line 521 "seclang-scanner.ll" { return p::make_ACTION_PROXY(yytext, *driver.loc.back()); } YY_BREAK case 17: YY_RULE_SETUP #line 522 "seclang-scanner.ll" { return p::make_ACTION_SANITISE_ARG(yytext, *driver.loc.back()); } YY_BREAK case 18: YY_RULE_SETUP #line 523 "seclang-scanner.ll" { return p::make_ACTION_SANITISE_MATCHED(yytext, *driver.loc.back()); } YY_BREAK case 19: YY_RULE_SETUP #line 524 "seclang-scanner.ll" { return p::make_ACTION_SANITISE_MATCHED_BYTES(yytext, *driver.loc.back()); } YY_BREAK case 20: YY_RULE_SETUP #line 525 "seclang-scanner.ll" { return p::make_ACTION_SANITISE_REQUEST_HEADER(yytext, *driver.loc.back()); } YY_BREAK case 21: YY_RULE_SETUP #line 526 "seclang-scanner.ll" { return p::make_ACTION_SANITISE_RESPONSE_HEADER(yytext, *driver.loc.back()); } YY_BREAK case 22: YY_RULE_SETUP #line 527 "seclang-scanner.ll" { BEGIN(EXPECTING_ACTION_PREDICATE); return p::make_ACTION_SETRSC(yytext, *driver.loc.back()); } YY_BREAK case 23: YY_RULE_SETUP #line 529 "seclang-scanner.ll" { return p::make_ACTION_STATUS(yytext, *driver.loc.back()); } YY_BREAK case 24: /* rule 24 can match eol */ YY_RULE_SETUP #line 530 "seclang-scanner.ll" { return p::make_ACTION_ACCURACY(yytext, *driver.loc.back()); } YY_BREAK case 25: /* rule 25 can match eol */ YY_RULE_SETUP #line 531 "seclang-scanner.ll" { return p::make_ACTION_ACCURACY(yytext, *driver.loc.back()); } YY_BREAK case 26: YY_RULE_SETUP #line 532 "seclang-scanner.ll" { return p::make_ACTION_ALLOW(yytext, *driver.loc.back()); } YY_BREAK case 27: YY_RULE_SETUP #line 533 "seclang-scanner.ll" { return p::make_ACTION_AUDIT_LOG(yytext, *driver.loc.back()); } YY_BREAK case 28: YY_RULE_SETUP #line 534 "seclang-scanner.ll" { return p::make_ACTION_CTL_AUDIT_ENGINE(yytext, *driver.loc.back()); } YY_BREAK case 29: YY_RULE_SETUP #line 535 "seclang-scanner.ll" { return p::make_ACTION_CTL_AUDIT_LOG_PARTS(yytext, *driver.loc.back()); } YY_BREAK case 30: YY_RULE_SETUP #line 536 "seclang-scanner.ll" { return p::make_ACTION_CTL_BDY_JSON(yytext, *driver.loc.back()); } YY_BREAK case 31: YY_RULE_SETUP #line 537 "seclang-scanner.ll" { return p::make_ACTION_CTL_BDY_XML(yytext, *driver.loc.back()); } YY_BREAK case 32: YY_RULE_SETUP #line 538 "seclang-scanner.ll" { return p::make_ACTION_CTL_BDY_URLENCODED(yytext, *driver.loc.back()); } YY_BREAK case 33: YY_RULE_SETUP #line 539 "seclang-scanner.ll" { return p::make_ACTION_CTL_FORCE_REQ_BODY_VAR(yytext, *driver.loc.back()); } YY_BREAK case 34: YY_RULE_SETUP #line 540 "seclang-scanner.ll" { return p::make_ACTION_CTL_REQUEST_BODY_ACCESS(yytext, *driver.loc.back()); } YY_BREAK case 35: YY_RULE_SETUP #line 541 "seclang-scanner.ll" { return p::make_ACTION_CTL_RULE_ENGINE(*driver.loc.back()); } YY_BREAK case 36: YY_RULE_SETUP #line 542 "seclang-scanner.ll" { return p::make_ACTION_CTL_RULE_REMOVE_BY_ID(yytext, *driver.loc.back()); } YY_BREAK case 37: YY_RULE_SETUP #line 543 "seclang-scanner.ll" { return p::make_ACTION_CTL_RULE_REMOVE_BY_TAG(yytext, *driver.loc.back()); } YY_BREAK case 38: YY_RULE_SETUP #line 544 "seclang-scanner.ll" { return p::make_ACTION_CTL_RULE_REMOVE_TARGET_BY_ID(yytext, *driver.loc.back()); } YY_BREAK case 39: YY_RULE_SETUP #line 545 "seclang-scanner.ll" { return p::make_ACTION_CTL_RULE_REMOVE_TARGET_BY_TAG(yytext, *driver.loc.back()); } YY_BREAK case 40: /* rule 40 can match eol */ YY_RULE_SETUP #line 546 "seclang-scanner.ll" { return p::make_ACTION_EXEC(yytext, *driver.loc.back()); } YY_BREAK case 41: /* rule 41 can match eol */ YY_RULE_SETUP #line 547 "seclang-scanner.ll" { return p::make_ACTION_EXEC(yytext, *driver.loc.back()); } YY_BREAK case 42: /* rule 42 can match eol */ YY_RULE_SETUP #line 548 "seclang-scanner.ll" { return p::make_ACTION_EXPIRE_VAR(yytext, *driver.loc.back()); } YY_BREAK case 43: /* rule 43 can match eol */ YY_RULE_SETUP #line 549 "seclang-scanner.ll" { return p::make_ACTION_EXPIRE_VAR(yytext, *driver.loc.back()); } YY_BREAK case 44: /* rule 44 can match eol */ YY_RULE_SETUP #line 550 "seclang-scanner.ll" { return p::make_ACTION_EXPIRE_VAR(yytext, *driver.loc.back()); } YY_BREAK case 45: /* rule 45 can match eol */ YY_RULE_SETUP #line 551 "seclang-scanner.ll" { return p::make_ACTION_EXPIRE_VAR(yytext, *driver.loc.back()); } YY_BREAK case 46: YY_RULE_SETUP #line 552 "seclang-scanner.ll" { BEGIN(EXPECTING_ACTION_PREDICATE); return p::make_ACTION_INITCOL(yytext, *driver.loc.back()); } YY_BREAK case 47: /* rule 47 can match eol */ YY_RULE_SETUP #line 553 "seclang-scanner.ll" { return p::make_ACTION_MATURITY(yytext, *driver.loc.back()); } YY_BREAK case 48: /* rule 48 can match eol */ YY_RULE_SETUP #line 554 "seclang-scanner.ll" { return p::make_ACTION_MATURITY(yytext, *driver.loc.back()); } YY_BREAK case 49: YY_RULE_SETUP #line 555 "seclang-scanner.ll" { BEGIN(EXPECTING_ACTION_PREDICATE); return p::make_ACTION_MSG(yytext, *driver.loc.back()); } YY_BREAK case 50: YY_RULE_SETUP #line 556 "seclang-scanner.ll" { return p::make_ACTION_PHASE(yytext, *driver.loc.back()); } YY_BREAK case 51: YY_RULE_SETUP #line 557 "seclang-scanner.ll" { BEGIN(EXPECTING_ACTION_PREDICATE); return p::make_ACTION_REDIRECT(yytext, *driver.loc.back()); } YY_BREAK case 52: /* rule 52 can match eol */ YY_RULE_SETUP #line 558 "seclang-scanner.ll" { return p::make_ACTION_REV(yytext, *driver.loc.back()); } YY_BREAK case 53: /* rule 53 can match eol */ YY_RULE_SETUP #line 559 "seclang-scanner.ll" { return p::make_ACTION_REV(yytext, *driver.loc.back()); } YY_BREAK case 54: YY_RULE_SETUP #line 560 "seclang-scanner.ll" { BEGIN(EXPECTING_ACTION_PREDICATE); return p::make_ACTION_SETENV(yytext, *driver.loc.back()); } YY_BREAK case 55: YY_RULE_SETUP #line 561 "seclang-scanner.ll" { BEGIN(EXPECTING_ACTION_PREDICATE); return p::make_ACTION_SETSID(yytext, *driver.loc.back()); } YY_BREAK case 56: YY_RULE_SETUP #line 562 "seclang-scanner.ll" { BEGIN(EXPECTING_ACTION_PREDICATE); return p::make_ACTION_SETUID(yytext, *driver.loc.back()); } YY_BREAK case 57: YY_RULE_SETUP #line 564 "seclang-scanner.ll" { BEGIN(SETVAR_ACTION_QUOTED); return p::make_ACTION_SETVAR(*driver.loc.back()); } YY_BREAK case 58: YY_RULE_SETUP #line 565 "seclang-scanner.ll" { BEGIN(SETVAR_ACTION_NONQUOTED); return p::make_ACTION_SETVAR(*driver.loc.back()); } YY_BREAK case 59: YY_RULE_SETUP #line 568 "seclang-scanner.ll" { return p::make_ACTION_SEVERITY(yytext, *driver.loc.back()); } YY_BREAK case 60: YY_RULE_SETUP #line 569 "seclang-scanner.ll" { return p::make_ACTION_SEVERITY(yytext, *driver.loc.back()); } YY_BREAK case 61: YY_RULE_SETUP #line 570 "seclang-scanner.ll" { return p::make_ACTION_SKIP_AFTER(yytext, *driver.loc.back()); } YY_BREAK case 62: YY_RULE_SETUP #line 571 "seclang-scanner.ll" { return p::make_ACTION_SKIP(yytext, *driver.loc.back()); } YY_BREAK case 63: YY_RULE_SETUP #line 572 "seclang-scanner.ll" { BEGIN(EXPECTING_ACTION_PREDICATE); return p::make_ACTION_TAG(yytext, *driver.loc.back()); } YY_BREAK case 64: /* rule 64 can match eol */ YY_RULE_SETUP #line 573 "seclang-scanner.ll" { return p::make_ACTION_VER(yytext, *driver.loc.back()); } YY_BREAK case 65: YY_RULE_SETUP #line 574 "seclang-scanner.ll" { return p::make_ACTION_XMLNS(yytext, *driver.loc.back()); } YY_BREAK case 66: YY_RULE_SETUP #line 576 "seclang-scanner.ll" { return p::make_ACTION_TRANSFORMATION_PARITY_ZERO_7_BIT(yytext, *driver.loc.back()); } YY_BREAK case 67: YY_RULE_SETUP #line 577 "seclang-scanner.ll" { return p::make_ACTION_TRANSFORMATION_PARITY_ODD_7_BIT(yytext, *driver.loc.back()); } YY_BREAK case 68: YY_RULE_SETUP #line 578 "seclang-scanner.ll" { return p::make_ACTION_TRANSFORMATION_PARITY_EVEN_7_BIT(yytext, *driver.loc.back()); } YY_BREAK case 69: YY_RULE_SETUP #line 579 "seclang-scanner.ll" { return p::make_ACTION_TRANSFORMATION_SQL_HEX_DECODE(yytext, *driver.loc.back()); } YY_BREAK case 70: YY_RULE_SETUP #line 580 "seclang-scanner.ll" { return p::make_ACTION_TRANSFORMATION_BASE_64_ENCODE(yytext, *driver.loc.back()); } YY_BREAK case 71: YY_RULE_SETUP #line 581 "seclang-scanner.ll" { return p::make_ACTION_TRANSFORMATION_BASE_64_DECODE(yytext, *driver.loc.back()); } YY_BREAK case 72: YY_RULE_SETUP #line 582 "seclang-scanner.ll" { return p::make_ACTION_TRANSFORMATION_BASE_64_DECODE_EXT(yytext, *driver.loc.back()); } YY_BREAK case 73: YY_RULE_SETUP #line 583 "seclang-scanner.ll" { return p::make_ACTION_TRANSFORMATION_CMD_LINE(yytext, *driver.loc.back()); } YY_BREAK case 74: YY_RULE_SETUP #line 584 "seclang-scanner.ll" { return p::make_ACTION_TRANSFORMATION_SHA1(yytext, *driver.loc.back()); } YY_BREAK case 75: YY_RULE_SETUP #line 585 "seclang-scanner.ll" { return p::make_ACTION_TRANSFORMATION_MD5(yytext, *driver.loc.back()); } YY_BREAK case 76: YY_RULE_SETUP #line 586 "seclang-scanner.ll" { return p::make_ACTION_TRANSFORMATION_ESCAPE_SEQ_DECODE(yytext, *driver.loc.back()); } YY_BREAK case 77: YY_RULE_SETUP #line 587 "seclang-scanner.ll" { return p::make_ACTION_TRANSFORMATION_HEX_ENCODE(yytext, *driver.loc.back()); } YY_BREAK case 78: YY_RULE_SETUP #line 588 "seclang-scanner.ll" { return p::make_ACTION_TRANSFORMATION_HEX_DECODE(yytext, *driver.loc.back()); } YY_BREAK case 79: YY_RULE_SETUP #line 589 "seclang-scanner.ll" { return p::make_ACTION_TRANSFORMATION_LOWERCASE(yytext, *driver.loc.back()); } YY_BREAK case 80: YY_RULE_SETUP #line 590 "seclang-scanner.ll" { return p::make_ACTION_TRANSFORMATION_UPPERCASE(yytext, *driver.loc.back()); } YY_BREAK case 81: YY_RULE_SETUP #line 591 "seclang-scanner.ll" { return p::make_ACTION_TRANSFORMATION_URL_ENCODE(yytext, *driver.loc.back()); } YY_BREAK case 82: YY_RULE_SETUP #line 592 "seclang-scanner.ll" { return p::make_ACTION_TRANSFORMATION_URL_DECODE_UNI(yytext, *driver.loc.back()); } YY_BREAK case 83: YY_RULE_SETUP #line 593 "seclang-scanner.ll" { return p::make_ACTION_TRANSFORMATION_URL_DECODE(yytext, *driver.loc.back()); } YY_BREAK case 84: YY_RULE_SETUP #line 594 "seclang-scanner.ll" { return p::make_ACTION_TRANSFORMATION_NONE(yytext, *driver.loc.back()); } YY_BREAK case 85: YY_RULE_SETUP #line 595 "seclang-scanner.ll" { return p::make_ACTION_TRANSFORMATION_COMPRESS_WHITESPACE(yytext, *driver.loc.back()); } YY_BREAK case 86: YY_RULE_SETUP #line 596 "seclang-scanner.ll" { return p::make_ACTION_TRANSFORMATION_REMOVE_WHITESPACE(yytext, *driver.loc.back()); } YY_BREAK case 87: YY_RULE_SETUP #line 597 "seclang-scanner.ll" { return p::make_ACTION_TRANSFORMATION_REPLACE_NULLS(yytext, *driver.loc.back()); } YY_BREAK case 88: YY_RULE_SETUP #line 598 "seclang-scanner.ll" { return p::make_ACTION_TRANSFORMATION_REMOVE_NULLS(yytext, *driver.loc.back()); } YY_BREAK case 89: YY_RULE_SETUP #line 599 "seclang-scanner.ll" { return p::make_ACTION_TRANSFORMATION_HTML_ENTITY_DECODE(yytext, *driver.loc.back()); } YY_BREAK case 90: YY_RULE_SETUP #line 600 "seclang-scanner.ll" { return p::make_ACTION_TRANSFORMATION_JS_DECODE(yytext, *driver.loc.back()); } YY_BREAK case 91: YY_RULE_SETUP #line 601 "seclang-scanner.ll" { return p::make_ACTION_TRANSFORMATION_CSS_DECODE(yytext, *driver.loc.back()); } YY_BREAK case 92: YY_RULE_SETUP #line 602 "seclang-scanner.ll" { return p::make_ACTION_TRANSFORMATION_TRIM(yytext, *driver.loc.back()); } YY_BREAK case 93: YY_RULE_SETUP #line 603 "seclang-scanner.ll" { return p::make_ACTION_TRANSFORMATION_TRIM_LEFT(yytext, *driver.loc.back()); } YY_BREAK case 94: YY_RULE_SETUP #line 604 "seclang-scanner.ll" { return p::make_ACTION_TRANSFORMATION_TRIM_RIGHT(yytext, *driver.loc.back()); } YY_BREAK case 95: YY_RULE_SETUP #line 605 "seclang-scanner.ll" { return p::make_ACTION_TRANSFORMATION_NORMALISE_PATH_WIN(yytext, *driver.loc.back()); } YY_BREAK case 96: YY_RULE_SETUP #line 606 "seclang-scanner.ll" { return p::make_ACTION_TRANSFORMATION_NORMALISE_PATH(yytext, *driver.loc.back()); } YY_BREAK case 97: YY_RULE_SETUP #line 607 "seclang-scanner.ll" { return p::make_ACTION_TRANSFORMATION_LENGTH(yytext, *driver.loc.back()); } YY_BREAK case 98: YY_RULE_SETUP #line 608 "seclang-scanner.ll" { return p::make_ACTION_TRANSFORMATION_UTF8_TO_UNICODE(yytext, *driver.loc.back()); } YY_BREAK case 99: YY_RULE_SETUP #line 609 "seclang-scanner.ll" { return p::make_ACTION_TRANSFORMATION_REMOVE_COMMENTS_CHAR(yytext, *driver.loc.back()); } YY_BREAK case 100: YY_RULE_SETUP #line 610 "seclang-scanner.ll" { return p::make_ACTION_TRANSFORMATION_REMOVE_COMMENTS(yytext, *driver.loc.back()); } YY_BREAK case 101: YY_RULE_SETUP #line 611 "seclang-scanner.ll" { return p::make_ACTION_TRANSFORMATION_REPLACE_COMMENTS(yytext, *driver.loc.back()); } YY_BREAK case 102: YY_RULE_SETUP #line 612 "seclang-scanner.ll" { BEGIN(EXPECTING_ACTION_PREDICATE); return p::make_ACTION_LOG_DATA(yytext, *driver.loc.back()); } YY_BREAK case 103: YY_RULE_SETUP #line 614 "seclang-scanner.ll" { return p::make_CONFIG_VALUE_DETC(yytext, *driver.loc.back()); } YY_BREAK case 104: YY_RULE_SETUP #line 615 "seclang-scanner.ll" { return p::make_CONFIG_VALUE_OFF(yytext, *driver.loc.back()); } YY_BREAK case 105: YY_RULE_SETUP #line 616 "seclang-scanner.ll" { return p::make_CONFIG_VALUE_ON(yytext, *driver.loc.back()); } YY_BREAK case 106: /* rule 106 can match eol */ YY_RULE_SETUP #line 617 "seclang-scanner.ll" { driver.loc.back()->lines(1); driver.loc.back()->step(); } YY_BREAK case 107: /* rule 107 can match eol */ YY_RULE_SETUP #line 618 "seclang-scanner.ll" { driver.loc.back()->lines(1); driver.loc.back()->step(); } YY_BREAK case 108: YY_RULE_SETUP #line 622 "seclang-scanner.ll" { return p::make_COMMA(*driver.loc.back()); } YY_BREAK case 109: /* rule 109 can match eol */ YY_RULE_SETUP #line 627 "seclang-scanner.ll" { BEGIN(INITIAL); yyless(yyleng); driver.loc.back()->lines(1); driver.loc.back()->step(); } YY_BREAK case 110: /* rule 110 can match eol */ YY_RULE_SETUP #line 628 "seclang-scanner.ll" { BEGIN(INITIAL); yyless(yyleng); driver.loc.back()->lines(1); driver.loc.back()->step(); } YY_BREAK case 111: YY_RULE_SETUP #line 633 "seclang-scanner.ll" { BEGIN(INITIAL); yyless(yyleng); } YY_BREAK case 112: /* rule 112 can match eol */ YY_RULE_SETUP #line 634 "seclang-scanner.ll" { BEGIN(INITIAL); yyless(1); } YY_BREAK case 113: /* rule 113 can match eol */ YY_RULE_SETUP #line 635 "seclang-scanner.ll" { BEGIN(INITIAL); driver.loc.back()->lines(1); driver.loc.back()->step(); } YY_BREAK case 114: YY_RULE_SETUP #line 640 "seclang-scanner.ll" { BEGIN(INITIAL); yyless(yyleng); p::make_NEW_LINE(*driver.loc.back()); } YY_BREAK case 115: /* rule 115 can match eol */ YY_RULE_SETUP #line 641 "seclang-scanner.ll" { BEGIN(INITIAL); yyless(1); } YY_BREAK case 116: /* rule 116 can match eol */ YY_RULE_SETUP #line 642 "seclang-scanner.ll" { BEGIN(INITIAL); driver.loc.back()->lines(1); driver.loc.back()->step(); } YY_BREAK case 117: YY_RULE_SETUP #line 647 "seclang-scanner.ll" { BEGIN(LEXING_ERROR_ACTION); yyless(0); } YY_BREAK case 118: YY_RULE_SETUP #line 652 "seclang-scanner.ll" { BEGIN(ACTION_PREDICATE_ENDS_WITH_QUOTE); } YY_BREAK case 119: YY_RULE_SETUP #line 653 "seclang-scanner.ll" { BEGIN(ACTION_PREDICATE_ENDS_WITH_DOUBLE_QUOTE); } YY_BREAK case 120: YY_RULE_SETUP #line 654 "seclang-scanner.ll" { BEGIN(ACTION_PREDICATE_ENDS_WITH_COMMA_OR_DOUBLE_QUOTE); yyless(0); } YY_BREAK case 121: /* rule 121 can match eol */ YY_RULE_SETUP #line 659 "seclang-scanner.ll" { driver.loc.back()->lines(1); driver.loc.back()->step(); } YY_BREAK case 122: /* rule 122 can match eol */ YY_RULE_SETUP #line 660 "seclang-scanner.ll" { driver.loc.back()->lines(1); driver.loc.back()->step(); } YY_BREAK case 123: YY_RULE_SETUP #line 664 "seclang-scanner.ll" { yyless(1); BEGIN_PREVIOUS(); } YY_BREAK case 124: YY_RULE_SETUP #line 665 "seclang-scanner.ll" { BEGIN_PREVIOUS(); } YY_BREAK case 125: YY_RULE_SETUP #line 666 "seclang-scanner.ll" { BEGIN_PREVIOUS(); } YY_BREAK case 126: YY_RULE_SETUP #line 670 "seclang-scanner.ll" { BEGIN(EXPECTING_ACTIONS_ENDS_WITH_DOUBLE_QUOTE); yyless(yyleng); } YY_BREAK case 127: /* rule 127 can match eol */ YY_RULE_SETUP #line 671 "seclang-scanner.ll" { return p::make_FREE_TEXT_QUOTE_MACRO_EXPANSION(yytext, *driver.loc.back()); } YY_BREAK case 128: YY_RULE_SETUP #line 675 "seclang-scanner.ll" { BEGIN(EXPECTING_ACTIONS_ENDS_WITH_DOUBLE_QUOTE); yyless(yyleng); } YY_BREAK case 129: /* rule 129 can match eol */ YY_RULE_SETUP #line 676 "seclang-scanner.ll" { return p::make_FREE_TEXT_QUOTE_MACRO_EXPANSION(yytext, *driver.loc.back()); } YY_BREAK case 130: YY_RULE_SETUP #line 680 "seclang-scanner.ll" { yyless(0); BEGIN(EXPECTING_ACTIONS_ENDS_WITH_DOUBLE_QUOTE); } YY_BREAK case 131: YY_RULE_SETUP #line 681 "seclang-scanner.ll" { yyless(0); BEGIN(EXPECTING_ACTIONS_ENDS_WITH_DOUBLE_QUOTE);} YY_BREAK case 132: /* rule 132 can match eol */ YY_RULE_SETUP #line 682 "seclang-scanner.ll" { return p::make_FREE_TEXT_QUOTE_MACRO_EXPANSION(yytext, *driver.loc.back()); } YY_BREAK case 133: YY_RULE_SETUP #line 686 "seclang-scanner.ll" { BEGINX(EXPECTING_ACTION_PREDICATE_VARIABLE); } YY_BREAK case 134: YY_RULE_SETUP #line 687 "seclang-scanner.ll" { BEGIN(LEXING_ERROR_VARIABLE); yyless(0); } YY_BREAK case 135: YY_RULE_SETUP #line 691 "seclang-scanner.ll" { return p::make_NOT(*driver.loc.back()); } YY_BREAK case 136: /* rule 136 can match eol */ YY_RULE_SETUP #line 692 "seclang-scanner.ll" { BEGIN_ACTION_OPERATION(); yyless(0); } YY_BREAK case 137: YY_RULE_SETUP #line 697 "seclang-scanner.ll" { BEGIN_ACTION_WAITING_CONTENT(); return p::make_SETVAR_OPERATION_EQUALS_PLUS(*driver.loc.back()); } YY_BREAK case 138: YY_RULE_SETUP #line 698 "seclang-scanner.ll" { BEGIN_ACTION_WAITING_CONTENT(); return p::make_SETVAR_OPERATION_EQUALS_MINUS(*driver.loc.back()); } YY_BREAK case 139: YY_RULE_SETUP #line 699 "seclang-scanner.ll" { BEGIN_ACTION_WAITING_CONTENT(); return p::make_SETVAR_OPERATION_EQUALS(*driver.loc.back()); } YY_BREAK case 140: /* rule 140 can match eol */ YY_RULE_SETUP #line 703 "seclang-scanner.ll" { BEGIN(EXPECTING_ACTIONS_ENDS_WITH_DOUBLE_QUOTE); yyless(0);} YY_BREAK case 141: YY_RULE_SETUP #line 707 "seclang-scanner.ll" { BEGIN(EXPECTING_ACTIONS_ENDS_WITH_DOUBLE_QUOTE); } YY_BREAK case 142: /* rule 142 can match eol */ YY_RULE_SETUP #line 708 "seclang-scanner.ll" { BEGIN(LEXING_ERROR_ACTION); yyless(0); } YY_BREAK case 143: YY_RULE_SETUP #line 716 "seclang-scanner.ll" { BEGINX(EXPECTING_ACTION_PREDICATE_VARIABLE); } YY_BREAK case 144: /* rule 144 can match eol */ YY_RULE_SETUP #line 721 "seclang-scanner.ll" { return p::make_FREE_TEXT_QUOTE_MACRO_EXPANSION(yytext, *driver.loc.back()); } YY_BREAK case 145: /* rule 145 can match eol */ YY_RULE_SETUP #line 722 "seclang-scanner.ll" { BEGIN(EXPECTING_ACTIONS_ENDS_WITH_DOUBLE_QUOTE); yyless(0); } YY_BREAK case 146: YY_RULE_SETUP #line 727 "seclang-scanner.ll" { BEGIN(EXPECTING_ACTIONS_ENDS_WITH_DOUBLE_QUOTE); } YY_BREAK case 147: /* rule 147 can match eol */ YY_RULE_SETUP #line 728 "seclang-scanner.ll" { return p::make_FREE_TEXT_QUOTE_MACRO_EXPANSION(yytext, *driver.loc.back()); } YY_BREAK case 148: /* rule 148 can match eol */ YY_RULE_SETUP #line 729 "seclang-scanner.ll" { BEGIN(EXPECTING_ACTIONS_ENDS_WITH_DOUBLE_QUOTE); yyless(0); } YY_BREAK case YY_STATE_EOF(FINISH_ACTIONS): #line 737 "seclang-scanner.ll" { BEGIN(INITIAL); yyless(0); p::make_NEW_LINE(*driver.loc.back()); } YY_BREAK case 149: YY_RULE_SETUP #line 738 "seclang-scanner.ll" { BEGIN(INITIAL); } YY_BREAK case 150: /* rule 150 can match eol */ YY_RULE_SETUP #line 741 "seclang-scanner.ll" { return p::make_CONFIG_COMPONENT_SIG(strchr(yytext, ' ') + 2, *driver.loc.back()); } YY_BREAK case 151: /* rule 151 can match eol */ YY_RULE_SETUP #line 742 "seclang-scanner.ll" { return p::make_CONFIG_SEC_SERVER_SIG(strchr(yytext, ' ') + 2, *driver.loc.back()); } YY_BREAK case 152: /* rule 152 can match eol */ YY_RULE_SETUP #line 743 "seclang-scanner.ll" { return p::make_CONFIG_SEC_WEB_APP_ID(parserSanitizer(strchr(yytext, ' ') + 2), *driver.loc.back()); } YY_BREAK case 153: YY_RULE_SETUP #line 744 "seclang-scanner.ll" { return p::make_CONFIG_SEC_WEB_APP_ID(parserSanitizer(strchr(yytext, ' ') + 1), *driver.loc.back()); } YY_BREAK case 154: YY_RULE_SETUP #line 745 "seclang-scanner.ll" { return p::make_CONFIG_CONTENT_INJECTION(*driver.loc.back()); } YY_BREAK case 155: YY_RULE_SETUP #line 746 "seclang-scanner.ll" { return p::make_CONFIG_DIR_AUDIT_DIR_MOD(parserSanitizer(strchr(yytext, ' ') + 1), *driver.loc.back()); } YY_BREAK case 156: YY_RULE_SETUP #line 747 "seclang-scanner.ll" { return p::make_CONFIG_DIR_AUDIT_DIR_MOD(parserSanitizer(strchr(yytext, ' ') + 1), *driver.loc.back()); } YY_BREAK case 157: YY_RULE_SETUP #line 748 "seclang-scanner.ll" { return p::make_CONFIG_DIR_AUDIT_DIR(parserSanitizer(strchr(yytext, ' ') + 1), *driver.loc.back()); } YY_BREAK case 158: YY_RULE_SETUP #line 749 "seclang-scanner.ll" { return p::make_CONFIG_DIR_AUDIT_DIR(parserSanitizer(strchr(yytext, ' ') + 1), *driver.loc.back()); } YY_BREAK case 159: YY_RULE_SETUP #line 750 "seclang-scanner.ll" { return p::make_CONFIG_SEC_ARGUMENT_SEPARATOR(parserSanitizer(strchr(yytext, ' ') + 1), *driver.loc.back()); } YY_BREAK case 160: YY_RULE_SETUP #line 751 "seclang-scanner.ll" { return p::make_CONFIG_SEC_ARGUMENT_SEPARATOR(parserSanitizer(strchr(yytext, ' ') + 1), *driver.loc.back()); } YY_BREAK case 161: YY_RULE_SETUP #line 752 "seclang-scanner.ll" { return p::make_CONFIG_DIR_AUDIT_ENG(yytext, *driver.loc.back()); } YY_BREAK case 162: YY_RULE_SETUP #line 753 "seclang-scanner.ll" { return p::make_CONFIG_DIR_AUDIT_FLE_MOD(strchr(yytext, ' ') + 1, *driver.loc.back()); } YY_BREAK case 163: YY_RULE_SETUP #line 754 "seclang-scanner.ll" { return p::make_CONFIG_DIR_AUDIT_LOG2(strchr(yytext, ' ') + 1, *driver.loc.back()); } YY_BREAK case 164: YY_RULE_SETUP #line 755 "seclang-scanner.ll" { return p::make_CONFIG_DIR_AUDIT_LOG_P(parserSanitizer(strchr(yytext, ' ') + 1), *driver.loc.back()); } YY_BREAK case 165: YY_RULE_SETUP #line 756 "seclang-scanner.ll" { return p::make_CONFIG_DIR_AUDIT_LOG_P(parserSanitizer(strchr(yytext, ' ') + 1), *driver.loc.back()); } YY_BREAK case 166: YY_RULE_SETUP #line 757 "seclang-scanner.ll" { return p::make_CONFIG_DIR_AUDIT_LOG(strchr(yytext, ' ') + 1, *driver.loc.back()); } YY_BREAK case 167: YY_RULE_SETUP #line 758 "seclang-scanner.ll" { return p::make_CONFIG_DIR_AUDIT_LOG_FMT(*driver.loc.back()); } YY_BREAK case 168: YY_RULE_SETUP #line 759 "seclang-scanner.ll" { return p::make_JSON(*driver.loc.back()); } YY_BREAK case 169: YY_RULE_SETUP #line 760 "seclang-scanner.ll" { return p::make_NATIVE(*driver.loc.back()); } YY_BREAK case 170: YY_RULE_SETUP #line 761 "seclang-scanner.ll" { return p::make_CONFIG_DIR_AUDIT_LOG(parserSanitizer(strchr(yytext, ' ') + 1), *driver.loc.back()); } YY_BREAK case 171: YY_RULE_SETUP #line 762 "seclang-scanner.ll" { return p::make_CONFIG_DIR_AUDIT_STS(parserSanitizer(strchr(yytext, ' ') + 1), *driver.loc.back()); } YY_BREAK case 172: YY_RULE_SETUP #line 763 "seclang-scanner.ll" { return p::make_CONFIG_DIR_AUDIT_STS(parserSanitizer(strchr(yytext, ' ') + 1), *driver.loc.back()); } YY_BREAK case 173: YY_RULE_SETUP #line 764 "seclang-scanner.ll" { return p::make_CONFIG_DIR_AUDIT_TPE(yytext, *driver.loc.back()); } YY_BREAK case 174: YY_RULE_SETUP #line 767 "seclang-scanner.ll" { return p::make_CONFIG_DIR_DEBUG_LOG(strchr(yytext, ' ') + 1, *driver.loc.back()); } YY_BREAK case 175: YY_RULE_SETUP #line 768 "seclang-scanner.ll" { return p::make_CONFIG_DIR_DEBUG_LOG(parserSanitizer(strchr(yytext, ' ') + 1), *driver.loc.back()); } YY_BREAK case 176: YY_RULE_SETUP #line 769 "seclang-scanner.ll" { return p::make_CONFIG_DIR_DEBUG_LVL(strchr(yytext, ' ') + 1, *driver.loc.back()); } YY_BREAK case 177: YY_RULE_SETUP #line 770 "seclang-scanner.ll" { return p::make_CONFIG_DIR_GEO_DB(strchr(yytext, ' ') + 1, *driver.loc.back()); } YY_BREAK case 178: YY_RULE_SETUP #line 771 "seclang-scanner.ll" { return p::make_CONFIG_DIR_PCRE_MATCH_LIMIT_RECURSION(strchr(yytext, ' ') + 1, *driver.loc.back()); } YY_BREAK case 179: YY_RULE_SETUP #line 772 "seclang-scanner.ll" { return p::make_CONFIG_DIR_PCRE_MATCH_LIMIT(strchr(yytext, ' ') + 1, *driver.loc.back()); } YY_BREAK case 180: YY_RULE_SETUP #line 773 "seclang-scanner.ll" { return p::make_CONFIG_DIR_ARGS_LIMIT(strchr(yytext, ' ') + 1, *driver.loc.back()); } YY_BREAK case 181: YY_RULE_SETUP #line 774 "seclang-scanner.ll" { return p::make_CONFIG_DIR_REQ_BODY_JSON_DEPTH_LIMIT(strchr(yytext, ' ') + 1, *driver.loc.back()); } YY_BREAK case 182: YY_RULE_SETUP #line 775 "seclang-scanner.ll" { return p::make_CONFIG_DIR_REQ_BODY_IN_MEMORY_LIMIT(strchr(yytext, ' ') + 1, *driver.loc.back()); } YY_BREAK case 183: YY_RULE_SETUP #line 777 "seclang-scanner.ll" { return p::make_CONFIG_DIR_REQ_BODY_LIMIT_ACTION(yytext, *driver.loc.back()); } YY_BREAK case 184: YY_RULE_SETUP #line 778 "seclang-scanner.ll" { return p::make_CONFIG_DIR_REQ_BODY_LIMIT(strchr(yytext, ' ') + 1, *driver.loc.back()); } YY_BREAK case 185: YY_RULE_SETUP #line 779 "seclang-scanner.ll" { return p::make_CONFIG_DIR_REQ_BODY_NO_FILES_LIMIT(strchr(yytext, ' ') + 1, *driver.loc.back()); } YY_BREAK case 186: YY_RULE_SETUP #line 780 "seclang-scanner.ll" { return p::make_CONFIG_DIR_REQ_BODY(yytext, *driver.loc.back()); } YY_BREAK case 187: YY_RULE_SETUP #line 781 "seclang-scanner.ll" { return p::make_CONFIG_DIR_RES_BODY_LIMIT_ACTION(yytext, *driver.loc.back()); } YY_BREAK case 188: YY_RULE_SETUP #line 782 "seclang-scanner.ll" { return p::make_CONFIG_DIR_RES_BODY_LIMIT(strchr(yytext, ' ') + 1, *driver.loc.back()); } YY_BREAK case 189: YY_RULE_SETUP #line 783 "seclang-scanner.ll" { return p::make_CONFIG_DIR_RES_BODY(yytext, *driver.loc.back()); } YY_BREAK case 190: YY_RULE_SETUP #line 784 "seclang-scanner.ll" { return p::make_CONFIG_DIR_RULE_ENG(yytext, *driver.loc.back()); } YY_BREAK case 191: YY_RULE_SETUP #line 785 "seclang-scanner.ll" { return p::make_CONFIG_DIR_SEC_MARKER(strchr(yytext, ' ') + 1, *driver.loc.back()); } YY_BREAK case 192: YY_RULE_SETUP #line 786 "seclang-scanner.ll" { return p::make_CONFIG_DIR_SEC_MARKER(strchr(yytext, ' ') + 1, *driver.loc.back()); } YY_BREAK case 193: YY_RULE_SETUP #line 787 "seclang-scanner.ll" { return p::make_CONFIG_DIR_UNICODE_MAP_FILE(strchr(yytext, ' ') + 1, *driver.loc.back()); } YY_BREAK case 194: YY_RULE_SETUP #line 788 "seclang-scanner.ll" { return p::make_CONFIG_SEC_RULE_REMOVE_BY_ID(parserSanitizer(strchr(yytext, ' ') + 1), *driver.loc.back()); } YY_BREAK case 195: YY_RULE_SETUP #line 789 "seclang-scanner.ll" { return p::make_CONFIG_SEC_RULE_REMOVE_BY_MSG(parserSanitizer(strchr(yytext, ' ') + 1), *driver.loc.back()); } YY_BREAK case 196: YY_RULE_SETUP #line 790 "seclang-scanner.ll" { return p::make_CONFIG_SEC_RULE_REMOVE_BY_MSG(parserSanitizer(strchr(yytext, ' ') + 1), *driver.loc.back()); } YY_BREAK case 197: YY_RULE_SETUP #line 791 "seclang-scanner.ll" { return p::make_CONFIG_SEC_RULE_REMOVE_BY_TAG(parserSanitizer(strchr(yytext, ' ') + 1), *driver.loc.back()); } YY_BREAK case 198: YY_RULE_SETUP #line 792 "seclang-scanner.ll" { return p::make_CONFIG_SEC_RULE_REMOVE_BY_TAG(parserSanitizer(strchr(yytext, ' ') + 1), *driver.loc.back()); } YY_BREAK case 199: YY_RULE_SETUP #line 793 "seclang-scanner.ll" { state_variable_from = 1; BEGIN(TRANSACTION_TO_VARIABLE); return p::make_CONFIG_SEC_RULE_UPDATE_TARGET_BY_TAG(parserSanitizer(strchr(yytext, ' ') + 1), *driver.loc.back()); } YY_BREAK case 200: YY_RULE_SETUP #line 794 "seclang-scanner.ll" { state_variable_from = 1; BEGIN(TRANSACTION_TO_VARIABLE); return p::make_CONFIG_SEC_RULE_UPDATE_TARGET_BY_TAG(parserSanitizer(strchr(yytext, ' ') + 1), *driver.loc.back()); } YY_BREAK case 201: YY_RULE_SETUP #line 795 "seclang-scanner.ll" { state_variable_from = 1; BEGIN(TRANSACTION_TO_VARIABLE); return p::make_CONFIG_SEC_RULE_UPDATE_TARGET_BY_MSG(parserSanitizer(strchr(yytext, ' ') + 1), *driver.loc.back()); } YY_BREAK case 202: YY_RULE_SETUP #line 796 "seclang-scanner.ll" { state_variable_from = 1; BEGIN(TRANSACTION_TO_VARIABLE); return p::make_CONFIG_SEC_RULE_UPDATE_TARGET_BY_MSG(parserSanitizer(strchr(yytext, ' ') + 1), *driver.loc.back()); } YY_BREAK case 203: YY_RULE_SETUP #line 797 "seclang-scanner.ll" { state_variable_from = 1; BEGIN(TRANSACTION_TO_VARIABLE); return p::make_CONFIG_SEC_RULE_UPDATE_TARGET_BY_ID(parserSanitizer(strchr(yytext, ' ') + 1), *driver.loc.back()); } YY_BREAK case 204: YY_RULE_SETUP #line 798 "seclang-scanner.ll" { state_variable_from = 1; BEGIN(TRANSACTION_TO_VARIABLE); return p::make_CONFIG_SEC_RULE_UPDATE_TARGET_BY_ID(parserSanitizer(strchr(yytext, ' ') + 1), *driver.loc.back()); } YY_BREAK case 205: YY_RULE_SETUP #line 799 "seclang-scanner.ll" { BEGIN(TRANSACTION_FROM_OPERATOR_TO_ACTIONS); return p::make_CONFIG_SEC_RULE_UPDATE_ACTION_BY_ID(parserSanitizer(strchr(yytext, ' ') + 1), *driver.loc.back()); } YY_BREAK case 206: YY_RULE_SETUP #line 800 "seclang-scanner.ll" { BEGIN(TRANSACTION_FROM_OPERATOR_TO_ACTIONS); return p::make_CONFIG_SEC_RULE_UPDATE_ACTION_BY_ID(parserSanitizer(strchr(yytext, ' ') + 1), *driver.loc.back()); } YY_BREAK case 207: YY_RULE_SETUP #line 801 "seclang-scanner.ll" { return p::make_CONFIG_UPDLOAD_KEEP_FILES(yytext, *driver.loc.back()); } YY_BREAK case 208: YY_RULE_SETUP #line 802 "seclang-scanner.ll" { return p::make_CONFIG_UPDLOAD_SAVE_TMP_FILES(yytext, *driver.loc.back()); } YY_BREAK case 209: YY_RULE_SETUP #line 803 "seclang-scanner.ll" { return p::make_CONFIG_UPLOAD_DIR(parserSanitizer(strchr(yytext, ' ') + 1), *driver.loc.back()); } YY_BREAK case 210: YY_RULE_SETUP #line 804 "seclang-scanner.ll" { return p::make_CONFIG_UPLOAD_DIR(parserSanitizer(strchr(yytext, ' ') + 1), *driver.loc.back()); } YY_BREAK case 211: YY_RULE_SETUP #line 805 "seclang-scanner.ll" { return p::make_CONFIG_UPLOAD_FILE_LIMIT(strchr(yytext, ' ') + 1, *driver.loc.back()); } YY_BREAK case 212: YY_RULE_SETUP #line 806 "seclang-scanner.ll" { return p::make_CONFIG_UPLOAD_FILE_MODE(strchr(yytext, ' ') + 1, *driver.loc.back()); } YY_BREAK case 213: YY_RULE_SETUP #line 807 "seclang-scanner.ll" { return p::make_CONFIG_VALUE_ABORT(yytext, *driver.loc.back()); } YY_BREAK case 214: YY_RULE_SETUP #line 808 "seclang-scanner.ll" { return p::make_CONFIG_VALUE_DETC(yytext, *driver.loc.back()); } YY_BREAK case 215: YY_RULE_SETUP #line 809 "seclang-scanner.ll" { return p::make_CONFIG_VALUE_HTTPS(yytext, *driver.loc.back()); } YY_BREAK case 216: YY_RULE_SETUP #line 810 "seclang-scanner.ll" { return p::make_CONFIG_VALUE_OFF(yytext, *driver.loc.back()); } YY_BREAK case 217: YY_RULE_SETUP #line 811 "seclang-scanner.ll" { return p::make_CONFIG_VALUE_ON(yytext, *driver.loc.back()); } YY_BREAK case 218: YY_RULE_SETUP #line 812 "seclang-scanner.ll" { return p::make_CONFIG_VALUE_PARALLEL(yytext, *driver.loc.back()); } YY_BREAK case 219: YY_RULE_SETUP #line 813 "seclang-scanner.ll" { return p::make_CONFIG_VALUE_PROCESS_PARTIAL(yytext, *driver.loc.back()); } YY_BREAK case 220: YY_RULE_SETUP #line 814 "seclang-scanner.ll" { return p::make_CONFIG_VALUE_REJECT(yytext, *driver.loc.back()); } YY_BREAK case 221: YY_RULE_SETUP #line 815 "seclang-scanner.ll" { return p::make_CONFIG_VALUE_RELEVANT_ONLY(yytext, *driver.loc.back()); } YY_BREAK case 222: YY_RULE_SETUP #line 816 "seclang-scanner.ll" { return p::make_CONFIG_VALUE_SERIAL(yytext, *driver.loc.back()); } YY_BREAK case 223: YY_RULE_SETUP #line 817 "seclang-scanner.ll" { return p::make_CONFIG_VALUE_WARN(yytext, *driver.loc.back()); } YY_BREAK case 224: YY_RULE_SETUP #line 818 "seclang-scanner.ll" { return p::make_CONFIG_XML_EXTERNAL_ENTITY(yytext, *driver.loc.back()); } YY_BREAK case 225: YY_RULE_SETUP #line 819 "seclang-scanner.ll" { return p::make_CONGIG_DIR_RESPONSE_BODY_MP(strchr(yytext, ' ') + 1, *driver.loc.back()); } YY_BREAK case 226: YY_RULE_SETUP #line 820 "seclang-scanner.ll" { return p::make_CONGIG_DIR_RESPONSE_BODY_MP_CLEAR(*driver.loc.back()); } YY_BREAK case 227: YY_RULE_SETUP #line 821 "seclang-scanner.ll" { return p::make_CONGIG_DIR_SEC_ARG_SEP(yytext, *driver.loc.back()); } YY_BREAK case 228: YY_RULE_SETUP #line 822 "seclang-scanner.ll" { return p::make_CONGIG_DIR_SEC_COOKIE_FORMAT(strchr(yytext, ' ') + 1, *driver.loc.back()); } YY_BREAK case 229: YY_RULE_SETUP #line 823 "seclang-scanner.ll" { return p::make_CONFIG_SEC_COOKIEV0_SEPARATOR(parserSanitizer(strchr(yytext, ' ') + 1), *driver.loc.back()); } YY_BREAK case 230: YY_RULE_SETUP #line 824 "seclang-scanner.ll" { return p::make_CONFIG_SEC_COOKIEV0_SEPARATOR(parserSanitizer(strchr(yytext, ' ') + 1), *driver.loc.back()); } YY_BREAK case 231: YY_RULE_SETUP #line 825 "seclang-scanner.ll" { return p::make_CONGIG_DIR_SEC_DATA_DIR(parserSanitizer(strchr(yytext, ' ') + 1), *driver.loc.back()); } YY_BREAK case 232: YY_RULE_SETUP #line 826 "seclang-scanner.ll" { return p::make_CONGIG_DIR_SEC_DATA_DIR(parserSanitizer(strchr(yytext, ' ') + 1), *driver.loc.back()); } YY_BREAK case 233: YY_RULE_SETUP #line 827 "seclang-scanner.ll" { return p::make_CONGIG_DIR_SEC_STATUS_ENGINE(yytext, *driver.loc.back()); } YY_BREAK case 234: YY_RULE_SETUP #line 828 "seclang-scanner.ll" { return p::make_CONGIG_DIR_SEC_TMP_DIR(parserSanitizer(strchr(yytext, ' ') + 1), *driver.loc.back()); } YY_BREAK case 235: YY_RULE_SETUP #line 829 "seclang-scanner.ll" { return p::make_CONGIG_DIR_SEC_TMP_DIR(parserSanitizer(strchr(yytext, ' ') + 1), *driver.loc.back()); } YY_BREAK case 236: YY_RULE_SETUP #line 830 "seclang-scanner.ll" { BEGIN(TRANSACTION_FROM_DIRECTIVE_TO_ACTIONS); return p::make_DIRECTIVE_SECRULESCRIPT(parserSanitizer(strchr(yytext, ' ') + 1), *driver.loc.back()); } YY_BREAK case 237: YY_RULE_SETUP #line 831 "seclang-scanner.ll" { BEGIN(TRANSACTION_FROM_DIRECTIVE_TO_ACTIONS); return p::make_DIRECTIVE_SECRULESCRIPT(parserSanitizer(strchr(yytext, ' ') + 1), *driver.loc.back()); } YY_BREAK case 238: YY_RULE_SETUP #line 832 "seclang-scanner.ll" { return p::make_CONFIG_SEC_CACHE_TRANSFORMATIONS(yytext, *driver.loc.back()); } YY_BREAK case 239: YY_RULE_SETUP #line 833 "seclang-scanner.ll" { return p::make_CONFIG_SEC_CHROOT_DIR(parserSanitizer(strchr(yytext, ' ') + 1), *driver.loc.back()); } YY_BREAK case 240: YY_RULE_SETUP #line 834 "seclang-scanner.ll" { return p::make_CONFIG_SEC_CHROOT_DIR(parserSanitizer(strchr(yytext, ' ') + 1), *driver.loc.back()); } YY_BREAK case 241: YY_RULE_SETUP #line 835 "seclang-scanner.ll" { return p::make_CONFIG_CONN_ENGINE(yytext, *driver.loc.back()); } YY_BREAK case 242: YY_RULE_SETUP #line 836 "seclang-scanner.ll" { return p::make_CONFIG_SEC_HASH_ENGINE(yytext, *driver.loc.back()); } YY_BREAK case 243: YY_RULE_SETUP #line 837 "seclang-scanner.ll" { return p::make_CONFIG_SEC_HASH_KEY(yytext, *driver.loc.back()); } YY_BREAK case 244: YY_RULE_SETUP #line 838 "seclang-scanner.ll" { return p::make_CONFIG_SEC_HASH_PARAM(yytext, *driver.loc.back()); } YY_BREAK case 245: YY_RULE_SETUP #line 839 "seclang-scanner.ll" { return p::make_CONFIG_SEC_HASH_METHOD_RX(yytext, *driver.loc.back()); } YY_BREAK case 246: YY_RULE_SETUP #line 840 "seclang-scanner.ll" { return p::make_CONFIG_SEC_HASH_METHOD_PM(yytext, *driver.loc.back()); } YY_BREAK case 247: YY_RULE_SETUP #line 841 "seclang-scanner.ll" { return p::make_CONFIG_DIR_GSB_DB(parserSanitizer(strchr(yytext, ' ') + 1), *driver.loc.back()); } YY_BREAK case 248: YY_RULE_SETUP #line 842 "seclang-scanner.ll" { return p::make_CONFIG_DIR_GSB_DB(parserSanitizer(strchr(yytext, ' ') + 1), *driver.loc.back()); } YY_BREAK case 249: YY_RULE_SETUP #line 843 "seclang-scanner.ll" { return p::make_CONFIG_SEC_GUARDIAN_LOG(yytext, *driver.loc.back()); } YY_BREAK case 250: YY_RULE_SETUP #line 844 "seclang-scanner.ll" { return p::make_CONFIG_SEC_INTERCEPT_ON_ERROR(yytext, *driver.loc.back()); } YY_BREAK case 251: YY_RULE_SETUP #line 845 "seclang-scanner.ll" { return p::make_CONFIG_SEC_CONN_R_STATE_LIMIT(yytext, *driver.loc.back()); } YY_BREAK case 252: YY_RULE_SETUP #line 846 "seclang-scanner.ll" { return p::make_CONFIG_SEC_CONN_W_STATE_LIMIT(yytext, *driver.loc.back()); } YY_BREAK case 253: YY_RULE_SETUP #line 847 "seclang-scanner.ll" { return p::make_CONFIG_SEC_SENSOR_ID(yytext, *driver.loc.back()); } YY_BREAK case 254: YY_RULE_SETUP #line 848 "seclang-scanner.ll" { return p::make_CONFIG_SEC_RULE_INHERITANCE(yytext, *driver.loc.back()); } YY_BREAK case 255: YY_RULE_SETUP #line 849 "seclang-scanner.ll" { return p::make_CONFIG_SEC_RULE_PERF_TIME(strchr(yytext, ' ') + 1, *driver.loc.back()); } YY_BREAK case 256: YY_RULE_SETUP #line 850 "seclang-scanner.ll" { return p::make_CONFIG_SEC_STREAM_IN_BODY_INSPECTION(yytext, *driver.loc.back()); } YY_BREAK case 257: YY_RULE_SETUP #line 851 "seclang-scanner.ll" { return p::make_CONFIG_SEC_STREAM_OUT_BODY_INSPECTION(yytext, *driver.loc.back()); } YY_BREAK case 258: YY_RULE_SETUP #line 852 "seclang-scanner.ll" { return p::make_CONFIG_SEC_DISABLE_BACKEND_COMPRESS(yytext, *driver.loc.back()); } YY_BREAK case 259: YY_RULE_SETUP #line 854 "seclang-scanner.ll" { BEGIN(TRANSACTION_TO_VARIABLE); return p::make_DIRECTIVE(yytext, *driver.loc.back()); } YY_BREAK case 260: YY_RULE_SETUP #line 855 "seclang-scanner.ll" { BEGIN(TRANSACTION_FROM_DIRECTIVE_TO_ACTIONS); return p::make_CONFIG_DIR_SEC_DEFAULT_ACTION(yytext, *driver.loc.back()); } YY_BREAK case 261: YY_RULE_SETUP #line 856 "seclang-scanner.ll" { BEGIN(TRANSACTION_FROM_DIRECTIVE_TO_ACTIONS); return p::make_CONFIG_DIR_SEC_ACTION(yytext, *driver.loc.back()); } YY_BREAK case 262: YY_RULE_SETUP #line 858 "seclang-scanner.ll" { return p::make_CONFIG_SEC_REMOTE_RULES_FAIL_ACTION(yytext, *driver.loc.back()); } YY_BREAK case 263: YY_RULE_SETUP #line 859 "seclang-scanner.ll" { return p::make_CONFIG_SEC_COLLECTION_TIMEOUT(strchr(yytext, ' ') + 1, *driver.loc.back()); } YY_BREAK case 264: YY_RULE_SETUP #line 860 "seclang-scanner.ll" { return p::make_CONFIG_SEC_HTTP_BLKEY(strchr(yytext, ' ') + 1, *driver.loc.back()); } YY_BREAK case 265: /* rule 265 can match eol */ YY_RULE_SETUP #line 861 "seclang-scanner.ll" { driver.loc.back()->lines(1); driver.loc.back()->step(); } YY_BREAK case 266: /* rule 266 can match eol */ YY_RULE_SETUP #line 862 "seclang-scanner.ll" { driver.loc.back()->lines(1); driver.loc.back()->step(); BEGIN(COMMENT); } YY_BREAK case 267: /* rule 267 can match eol */ YY_RULE_SETUP #line 863 "seclang-scanner.ll" { driver.loc.back()->lines(1); driver.loc.back()->step(); BEGIN(COMMENT); } YY_BREAK case 268: YY_RULE_SETUP #line 864 "seclang-scanner.ll" { driver.loc.back()->step(); /* comment, just ignore. */ } YY_BREAK case 269: YY_RULE_SETUP #line 865 "seclang-scanner.ll" { driver.loc.back()->step(); /* carriage return, just ignore. */} YY_BREAK case 270: YY_RULE_SETUP #line 866 "seclang-scanner.ll" { return p::make_QUOTATION_MARK(yytext, *driver.loc.back()); } YY_BREAK case 271: YY_RULE_SETUP #line 867 "seclang-scanner.ll" { return p::make_COMMA(*driver.loc.back()); } YY_BREAK case 272: YY_RULE_SETUP #line 870 "seclang-scanner.ll" { BEGIN(EXPECTING_VARIABLE); } YY_BREAK case 273: YY_RULE_SETUP #line 874 "seclang-scanner.ll" { return p::make_PIPE(*driver.loc.back()); } YY_BREAK case 274: YY_RULE_SETUP #line 875 "seclang-scanner.ll" { return p::make_PIPE(*driver.loc.back()); } YY_BREAK case 275: YY_RULE_SETUP #line 876 "seclang-scanner.ll" { return p::make_QUOTATION_MARK(yytext, *driver.loc.back()); } YY_BREAK case 276: YY_RULE_SETUP #line 877 "seclang-scanner.ll" { return p::make_VAR_EXCLUSION(*driver.loc.back()); } YY_BREAK case 277: YY_RULE_SETUP #line 878 "seclang-scanner.ll" { return p::make_VAR_COUNT(*driver.loc.back()); } YY_BREAK case 278: YY_RULE_SETUP #line 882 "seclang-scanner.ll" { if (state_variable_from == 0) { BEGIN(EXPECTING_OPERATOR_ENDS_WITH_SPACE); } else { state_variable_from = 0; BEGIN(INITIAL);} } YY_BREAK case 279: YY_RULE_SETUP #line 883 "seclang-scanner.ll" { if (state_variable_from == 0) { BEGIN(EXPECTING_OPERATOR_ENDS_WITH_QUOTE); } else { state_variable_from = 0; BEGIN(INITIAL);} } YY_BREAK case 280: /* rule 280 can match eol */ YY_RULE_SETUP #line 884 "seclang-scanner.ll" { if (state_variable_from == 0) { BEGIN(EXPECTING_OPERATOR_ENDS_WITH_SPACE); } else { state_variable_from = 0; BEGIN(INITIAL);} } YY_BREAK case 281: /* rule 281 can match eol */ YY_RULE_SETUP #line 885 "seclang-scanner.ll" { if (state_variable_from == 0) { BEGIN(EXPECTING_OPERATOR_ENDS_WITH_QUOTE); } else { state_variable_from = 0; BEGIN(INITIAL);} } YY_BREAK case 282: /* rule 282 can match eol */ YY_RULE_SETUP #line 886 "seclang-scanner.ll" { if (state_variable_from == 0) { BEGIN(EXPECTING_OPERATOR_ENDS_WITH_SPACE); } else { state_variable_from = 0; BEGIN(INITIAL);} } YY_BREAK case 283: /* rule 283 can match eol */ YY_RULE_SETUP #line 887 "seclang-scanner.ll" { if (state_variable_from == 0) { BEGIN(EXPECTING_OPERATOR_ENDS_WITH_QUOTE); } else { state_variable_from = 0; BEGIN(INITIAL);} } YY_BREAK case 284: YY_RULE_SETUP #line 891 "seclang-scanner.ll" { } YY_BREAK case 285: YY_RULE_SETUP #line 892 "seclang-scanner.ll" { BEGIN(EXPECTING_ACTIONS_ENDS_WITH_DOUBLE_QUOTE); } YY_BREAK case 286: /* rule 286 can match eol */ YY_RULE_SETUP #line 893 "seclang-scanner.ll" { BEGIN(EXPECTING_ACTIONS_ENDS_WITH_DOUBLE_QUOTE); } YY_BREAK case 287: /* rule 287 can match eol */ YY_RULE_SETUP #line 894 "seclang-scanner.ll" { BEGIN(EXPECTING_ACTIONS_ENDS_WITH_DOUBLE_QUOTE); } YY_BREAK case 288: YY_RULE_SETUP #line 899 "seclang-scanner.ll" { BEGIN(LEXING_ERROR_VARIABLE); yyless(0); } YY_BREAK case 289: YY_RULE_SETUP #line 900 "seclang-scanner.ll" { return p::make_VARIABLE_ARGS_COMBINED_SIZE(*driver.loc.back()); } YY_BREAK case 290: YY_RULE_SETUP #line 901 "seclang-scanner.ll" { return p::make_VARIABLE_ARGS_GET_NAMES(*driver.loc.back()); } YY_BREAK case 291: YY_RULE_SETUP #line 902 "seclang-scanner.ll" { BEGINX(EXPECTING_VAR_PARAMETER); return p::make_VARIABLE_ARGS_GET_NAMES(*driver.loc.back()); } YY_BREAK case 292: YY_RULE_SETUP #line 903 "seclang-scanner.ll" { return p::make_VARIABLE_ARGS_NAMES(*driver.loc.back()); } YY_BREAK case 293: YY_RULE_SETUP #line 904 "seclang-scanner.ll" { BEGINX(EXPECTING_VAR_PARAMETER); return p::make_VARIABLE_ARGS_NAMES(*driver.loc.back()); } YY_BREAK case 294: YY_RULE_SETUP #line 905 "seclang-scanner.ll" { return p::make_VARIABLE_ARGS_POST_NAMES(*driver.loc.back()); } YY_BREAK case 295: YY_RULE_SETUP #line 906 "seclang-scanner.ll" { BEGINX(EXPECTING_VAR_PARAMETER); return p::make_VARIABLE_ARGS_POST_NAMES(*driver.loc.back()); } YY_BREAK case 296: YY_RULE_SETUP #line 907 "seclang-scanner.ll" { return p::make_VARIABLE_AUTH_TYPE(*driver.loc.back()); } YY_BREAK case 297: YY_RULE_SETUP #line 908 "seclang-scanner.ll" { return p::make_VARIABLE_FILES_COMBINED_SIZE(*driver.loc.back()); } YY_BREAK case 298: YY_RULE_SETUP #line 909 "seclang-scanner.ll" { return p::make_VARIABLE_FULL_REQUEST_LENGTH(*driver.loc.back()); } YY_BREAK case 299: YY_RULE_SETUP #line 910 "seclang-scanner.ll" { return p::make_VARIABLE_FULL_REQUEST(*driver.loc.back()); } YY_BREAK case 300: YY_RULE_SETUP #line 911 "seclang-scanner.ll" { return p::make_VARIABLE_INBOUND_DATA_ERROR(*driver.loc.back()); } YY_BREAK case 301: YY_RULE_SETUP #line 912 "seclang-scanner.ll" { return p::make_VARIABLE_MATCHED_VAR_NAME(*driver.loc.back()); } YY_BREAK case 302: YY_RULE_SETUP #line 913 "seclang-scanner.ll" { return p::make_VARIABLE_MATCHED_VAR(*driver.loc.back()); } YY_BREAK case 303: YY_RULE_SETUP #line 914 "seclang-scanner.ll" { return p::make_VARIABLE_MULTIPART_BOUNDARY_QUOTED(*driver.loc.back()); } YY_BREAK case 304: YY_RULE_SETUP #line 915 "seclang-scanner.ll" { return p::make_VARIABLE_MULTIPART_BOUNDARY_WHITESPACE(*driver.loc.back()); } YY_BREAK case 305: YY_RULE_SETUP #line 916 "seclang-scanner.ll" { return p::make_VARIABLE_MULTIPART_CRLF_LF_LINES(*driver.loc.back()); } YY_BREAK case 306: YY_RULE_SETUP #line 917 "seclang-scanner.ll" { return p::make_VARIABLE_MULTIPART_DATA_AFTER(*driver.loc.back()); } YY_BREAK case 307: YY_RULE_SETUP #line 918 "seclang-scanner.ll" { return p::make_VARIABLE_MULTIPART_DATA_BEFORE(*driver.loc.back()); } YY_BREAK case 308: YY_RULE_SETUP #line 919 "seclang-scanner.ll" { return p::make_VARIABLE_MULTIPART_FILE_LIMIT_EXCEEDED(*driver.loc.back()); } YY_BREAK case 309: YY_RULE_SETUP #line 920 "seclang-scanner.ll" { BEGINX(EXPECTING_VAR_PARAMETER); return p::make_VARIABLE_MULTIPART_FILENAME(*driver.loc.back()); } YY_BREAK case 310: YY_RULE_SETUP #line 921 "seclang-scanner.ll" { return p::make_VARIABLE_MULTIPART_FILENAME(*driver.loc.back()); } YY_BREAK case 311: YY_RULE_SETUP #line 922 "seclang-scanner.ll" { return p::make_VARIABLE_MULTIPART_HEADER_FOLDING(*driver.loc.back()); } YY_BREAK case 312: YY_RULE_SETUP #line 923 "seclang-scanner.ll" { return p::make_VARIABLE_MULTIPART_HEADER_FOLDING(*driver.loc.back()); } YY_BREAK case 313: YY_RULE_SETUP #line 924 "seclang-scanner.ll" { return p::make_VARIABLE_MULTIPART_INVALID_HEADER_FOLDING(*driver.loc.back()); } YY_BREAK case 314: YY_RULE_SETUP #line 925 "seclang-scanner.ll" { return p::make_VARIABLE_MULTIPART_INVALID_PART(*driver.loc.back()); } YY_BREAK case 315: YY_RULE_SETUP #line 926 "seclang-scanner.ll" { return p::make_VARIABLE_MULTIPART_INVALID_QUOTING(*driver.loc.back()); } YY_BREAK case 316: YY_RULE_SETUP #line 927 "seclang-scanner.ll" { return p::make_VARIABLE_MULTIPART_LF_LINE(*driver.loc.back()); } YY_BREAK case 317: YY_RULE_SETUP #line 928 "seclang-scanner.ll" { return p::make_VARIABLE_MULTIPART_MISSING_SEMICOLON(*driver.loc.back()); } YY_BREAK case 318: YY_RULE_SETUP #line 929 "seclang-scanner.ll" { return p::make_VARIABLE_MULTIPART_SEMICOLON_MISSING(*driver.loc.back()); } YY_BREAK case 319: YY_RULE_SETUP #line 930 "seclang-scanner.ll" { BEGINX(EXPECTING_VAR_PARAMETER); return p::make_VARIABLE_MULTIPART_NAME(*driver.loc.back()); } YY_BREAK case 320: YY_RULE_SETUP #line 931 "seclang-scanner.ll" { return p::make_VARIABLE_MULTIPART_NAME(*driver.loc.back()); } YY_BREAK case 321: YY_RULE_SETUP #line 932 "seclang-scanner.ll" { return p::make_VARIABLE_MULTIPART_STRICT_ERROR(*driver.loc.back()); } YY_BREAK case 322: YY_RULE_SETUP #line 933 "seclang-scanner.ll" { return p::make_VARIABLE_MULTIPART_UNMATCHED_BOUNDARY(*driver.loc.back()); } YY_BREAK case 323: YY_RULE_SETUP #line 934 "seclang-scanner.ll" { return p::make_VARIABLE_OUTBOUND_DATA_ERROR(*driver.loc.back()); } YY_BREAK case 324: YY_RULE_SETUP #line 935 "seclang-scanner.ll" { return p::make_VARIABLE_PATH_INFO(*driver.loc.back()); } YY_BREAK case 325: YY_RULE_SETUP #line 936 "seclang-scanner.ll" { return p::make_VARIABLE_QUERY_STRING(*driver.loc.back()); } YY_BREAK case 326: YY_RULE_SETUP #line 937 "seclang-scanner.ll" { return p::make_VARIABLE_REMOTE_ADDR(*driver.loc.back()); } YY_BREAK case 327: YY_RULE_SETUP #line 938 "seclang-scanner.ll" { return p::make_VARIABLE_REMOTE_HOST(*driver.loc.back()); } YY_BREAK case 328: YY_RULE_SETUP #line 939 "seclang-scanner.ll" { return p::make_VARIABLE_REMOTE_PORT(*driver.loc.back()); } YY_BREAK case 329: YY_RULE_SETUP #line 940 "seclang-scanner.ll" { return p::make_VARIABLE_REQBODY_ERROR_MSG(*driver.loc.back()); } YY_BREAK case 330: YY_RULE_SETUP #line 941 "seclang-scanner.ll" { return p::make_VARIABLE_REQBODY_ERROR(*driver.loc.back()); } YY_BREAK case 331: YY_RULE_SETUP #line 942 "seclang-scanner.ll" { return p::make_VARIABLE_REQBODY_PROCESSOR_ERROR_MSG(*driver.loc.back()); } YY_BREAK case 332: YY_RULE_SETUP #line 943 "seclang-scanner.ll" { return p::make_VARIABLE_REQBODY_PROCESSOR_ERROR(*driver.loc.back()); } YY_BREAK case 333: YY_RULE_SETUP #line 944 "seclang-scanner.ll" { return p::make_VARIABLE_REQBODY_PROCESSOR(*driver.loc.back()); } YY_BREAK case 334: YY_RULE_SETUP #line 945 "seclang-scanner.ll" { return p::make_VARIABLE_REQUEST_BASENAME(*driver.loc.back()); } YY_BREAK case 335: YY_RULE_SETUP #line 946 "seclang-scanner.ll" { return p::make_VARIABLE_REQUEST_BODY_LENGTH(*driver.loc.back()); } YY_BREAK case 336: YY_RULE_SETUP #line 947 "seclang-scanner.ll" { return p::make_VARIABLE_REQUEST_BODY(*driver.loc.back()); } YY_BREAK case 337: YY_RULE_SETUP #line 948 "seclang-scanner.ll" { return p::make_VARIABLE_REQUEST_FILE_NAME(*driver.loc.back()); } YY_BREAK case 338: YY_RULE_SETUP #line 949 "seclang-scanner.ll" { return p::make_VARIABLE_REQUEST_HEADERS_NAMES(*driver.loc.back()); } YY_BREAK case 339: YY_RULE_SETUP #line 950 "seclang-scanner.ll" { BEGINX(EXPECTING_VAR_PARAMETER); return p::make_VARIABLE_REQUEST_HEADERS_NAMES(*driver.loc.back()); } YY_BREAK case 340: YY_RULE_SETUP #line 951 "seclang-scanner.ll" { return p::make_VARIABLE_REQUEST_LINE(*driver.loc.back()); } YY_BREAK case 341: YY_RULE_SETUP #line 952 "seclang-scanner.ll" { return p::make_VARIABLE_REQUEST_METHOD(*driver.loc.back()); } YY_BREAK case 342: YY_RULE_SETUP #line 953 "seclang-scanner.ll" { return p::make_VARIABLE_REQUEST_PROTOCOL(*driver.loc.back()); } YY_BREAK case 343: YY_RULE_SETUP #line 954 "seclang-scanner.ll" { return p::make_VARIABLE_REQUEST_URI_RAW(*driver.loc.back()); } YY_BREAK case 344: YY_RULE_SETUP #line 955 "seclang-scanner.ll" { return p::make_VARIABLE_REQUEST_URI(*driver.loc.back()); } YY_BREAK case 345: YY_RULE_SETUP #line 956 "seclang-scanner.ll" { return p::make_VARIABLE_RESPONSE_BODY(*driver.loc.back()); } YY_BREAK case 346: YY_RULE_SETUP #line 957 "seclang-scanner.ll" { return p::make_VARIABLE_RESPONSE_CONTENT_LENGTH(*driver.loc.back()); } YY_BREAK case 347: YY_RULE_SETUP #line 958 "seclang-scanner.ll" { return p::make_VARIABLE_RESPONSE_CONTENT_TYPE(*driver.loc.back()); } YY_BREAK case 348: YY_RULE_SETUP #line 959 "seclang-scanner.ll" { return p::make_VARIABLE_RESPONSE_HEADERS_NAMES(*driver.loc.back()); } YY_BREAK case 349: YY_RULE_SETUP #line 960 "seclang-scanner.ll" { BEGINX(EXPECTING_VAR_PARAMETER); return p::make_VARIABLE_RESPONSE_HEADERS_NAMES(*driver.loc.back()); } YY_BREAK case 350: YY_RULE_SETUP #line 961 "seclang-scanner.ll" { return p::make_VARIABLE_RESPONSE_PROTOCOL(*driver.loc.back()); } YY_BREAK case 351: YY_RULE_SETUP #line 962 "seclang-scanner.ll" { return p::make_VARIABLE_RESPONSE_STATUS(*driver.loc.back()); } YY_BREAK case 352: YY_RULE_SETUP #line 963 "seclang-scanner.ll" { return p::make_VARIABLE_SERVER_ADDR(*driver.loc.back()); } YY_BREAK case 353: YY_RULE_SETUP #line 964 "seclang-scanner.ll" { return p::make_VARIABLE_SERVER_NAME(*driver.loc.back()); } YY_BREAK case 354: YY_RULE_SETUP #line 965 "seclang-scanner.ll" { return p::make_VARIABLE_SERVER_PORT(*driver.loc.back()); } YY_BREAK case 355: YY_RULE_SETUP #line 966 "seclang-scanner.ll" { return p::make_VARIABLE_SESSION_ID(*driver.loc.back()); } YY_BREAK case 356: YY_RULE_SETUP #line 967 "seclang-scanner.ll" { return p::make_VARIABLE_UNIQUE_ID(*driver.loc.back()); } YY_BREAK case 357: YY_RULE_SETUP #line 968 "seclang-scanner.ll" { return p::make_VARIABLE_URL_ENCODED_ERROR(*driver.loc.back()); } YY_BREAK case 358: YY_RULE_SETUP #line 969 "seclang-scanner.ll" { return p::make_VARIABLE_USER_ID(*driver.loc.back()); } YY_BREAK case 359: YY_RULE_SETUP #line 970 "seclang-scanner.ll" { return p::make_VARIABLE_WEB_APP_ID(*driver.loc.back()); } YY_BREAK case 360: YY_RULE_SETUP #line 971 "seclang-scanner.ll" { return p::make_VARIABLE_ARGS(*driver.loc.back()); } YY_BREAK case 361: YY_RULE_SETUP #line 972 "seclang-scanner.ll" { BEGINX(EXPECTING_VAR_PARAMETER); return p::make_VARIABLE_ARGS(*driver.loc.back()); } YY_BREAK case 362: YY_RULE_SETUP #line 973 "seclang-scanner.ll" { return p::make_VARIABLE_ARGS_GET(*driver.loc.back()); } YY_BREAK case 363: YY_RULE_SETUP #line 974 "seclang-scanner.ll" { BEGINX(EXPECTING_VAR_PARAMETER); return p::make_VARIABLE_ARGS_GET(*driver.loc.back()); } YY_BREAK case 364: YY_RULE_SETUP #line 975 "seclang-scanner.ll" { return p::make_VARIABLE_ARGS_POST(*driver.loc.back()); } YY_BREAK case 365: YY_RULE_SETUP #line 976 "seclang-scanner.ll" { BEGINX(EXPECTING_VAR_PARAMETER); return p::make_VARIABLE_ARGS_POST(*driver.loc.back()); } YY_BREAK case 366: YY_RULE_SETUP #line 977 "seclang-scanner.ll" { return p::make_VARIABLE_FILES_SIZES(*driver.loc.back()); } YY_BREAK case 367: YY_RULE_SETUP #line 978 "seclang-scanner.ll" { BEGINX(EXPECTING_VAR_PARAMETER); return p::make_VARIABLE_FILES_SIZES(*driver.loc.back()); } YY_BREAK case 368: YY_RULE_SETUP #line 979 "seclang-scanner.ll" { return p::make_VARIABLE_FILES_NAMES(*driver.loc.back()); } YY_BREAK case 369: YY_RULE_SETUP #line 980 "seclang-scanner.ll" { BEGINX(EXPECTING_VAR_PARAMETER); return p::make_VARIABLE_FILES_NAMES(*driver.loc.back()); } YY_BREAK case 370: YY_RULE_SETUP #line 981 "seclang-scanner.ll" { return p::make_VARIABLE_FILES_TMP_CONTENT(*driver.loc.back()); } YY_BREAK case 371: YY_RULE_SETUP #line 982 "seclang-scanner.ll" { BEGINX(EXPECTING_VAR_PARAMETER); return p::make_VARIABLE_FILES_TMP_CONTENT(*driver.loc.back()); } YY_BREAK case 372: YY_RULE_SETUP #line 983 "seclang-scanner.ll" { return p::make_VARIABLE_MATCHED_VARS_NAMES(*driver.loc.back()); } YY_BREAK case 373: YY_RULE_SETUP #line 984 "seclang-scanner.ll" { BEGINX(EXPECTING_VAR_PARAMETER); return p::make_VARIABLE_MATCHED_VARS_NAMES(*driver.loc.back()); } YY_BREAK case 374: YY_RULE_SETUP #line 985 "seclang-scanner.ll" { return p::make_VARIABLE_MATCHED_VARS(*driver.loc.back()); } YY_BREAK case 375: YY_RULE_SETUP #line 986 "seclang-scanner.ll" { BEGINX(EXPECTING_VAR_PARAMETER); return p::make_VARIABLE_MATCHED_VARS(*driver.loc.back()); } YY_BREAK case 376: YY_RULE_SETUP #line 987 "seclang-scanner.ll" { return p::make_VARIABLE_FILES(*driver.loc.back()); } YY_BREAK case 377: YY_RULE_SETUP #line 988 "seclang-scanner.ll" { BEGINX(EXPECTING_VAR_PARAMETER); return p::make_VARIABLE_FILES(*driver.loc.back()); } YY_BREAK case 378: YY_RULE_SETUP #line 989 "seclang-scanner.ll" { return p::make_VARIABLE_REQUEST_COOKIES(*driver.loc.back()); } YY_BREAK case 379: YY_RULE_SETUP #line 990 "seclang-scanner.ll" { BEGINX(EXPECTING_VAR_PARAMETER); return p::make_VARIABLE_REQUEST_COOKIES(*driver.loc.back()); } YY_BREAK case 380: YY_RULE_SETUP #line 991 "seclang-scanner.ll" { return p::make_VARIABLE_REQUEST_HEADERS(*driver.loc.back()); } YY_BREAK case 381: YY_RULE_SETUP #line 992 "seclang-scanner.ll" { BEGINX(EXPECTING_VAR_PARAMETER); return p::make_VARIABLE_REQUEST_HEADERS(*driver.loc.back()); } YY_BREAK case 382: YY_RULE_SETUP #line 993 "seclang-scanner.ll" { return p::make_VARIABLE_RESPONSE_HEADERS(*driver.loc.back()); } YY_BREAK case 383: YY_RULE_SETUP #line 994 "seclang-scanner.ll" { BEGINX(EXPECTING_VAR_PARAMETER); return p::make_VARIABLE_RESPONSE_HEADERS(*driver.loc.back()); } YY_BREAK case 384: YY_RULE_SETUP #line 995 "seclang-scanner.ll" { return p::make_VARIABLE_GEO(*driver.loc.back()); } YY_BREAK case 385: YY_RULE_SETUP #line 996 "seclang-scanner.ll" { BEGINX(EXPECTING_VAR_PARAMETER); return p::make_VARIABLE_GEO(*driver.loc.back()); } YY_BREAK case 386: YY_RULE_SETUP #line 997 "seclang-scanner.ll" { return p::make_VARIABLE_REQUEST_COOKIES_NAMES(*driver.loc.back()); } YY_BREAK case 387: YY_RULE_SETUP #line 998 "seclang-scanner.ll" { BEGINX(EXPECTING_VAR_PARAMETER); return p::make_VARIABLE_REQUEST_COOKIES_NAMES(*driver.loc.back()); } YY_BREAK case 388: YY_RULE_SETUP #line 999 "seclang-scanner.ll" { return p::make_VARIABLE_RULE(*driver.loc.back()); } YY_BREAK case 389: YY_RULE_SETUP #line 1000 "seclang-scanner.ll" { BEGINX(EXPECTING_VAR_PARAMETER); return p::make_VARIABLE_RULE(*driver.loc.back()); } YY_BREAK case 390: YY_RULE_SETUP #line 1001 "seclang-scanner.ll" { return p::make_VARIABLE_FILES_TMP_NAMES(*driver.loc.back()); } YY_BREAK case 391: YY_RULE_SETUP #line 1002 "seclang-scanner.ll" { BEGINX(EXPECTING_VAR_PARAMETER); return p::make_VARIABLE_FILES_TMP_NAMES(*driver.loc.back()); } YY_BREAK case 392: YY_RULE_SETUP #line 1003 "seclang-scanner.ll" { return p::make_RUN_TIME_VAR_XML(*driver.loc.back()); } YY_BREAK case 393: YY_RULE_SETUP #line 1004 "seclang-scanner.ll" { BEGINX(EXPECTING_VAR_PARAMETER); return p::make_RUN_TIME_VAR_XML(*driver.loc.back()); } YY_BREAK case 394: YY_RULE_SETUP #line 1005 "seclang-scanner.ll" { return p::make_RUN_TIME_VAR_ENV(*driver.loc.back()); } YY_BREAK case 395: YY_RULE_SETUP #line 1006 "seclang-scanner.ll" { BEGINX(EXPECTING_VAR_PARAMETER); return p::make_RUN_TIME_VAR_ENV(*driver.loc.back()); } YY_BREAK case 396: YY_RULE_SETUP #line 1007 "seclang-scanner.ll" { return p::make_RUN_TIME_VAR_BLD(yytext, *driver.loc.back()); } YY_BREAK case 397: YY_RULE_SETUP #line 1008 "seclang-scanner.ll" { return p::make_RUN_TIME_VAR_DUR(yytext, *driver.loc.back()); } YY_BREAK case 398: YY_RULE_SETUP #line 1009 "seclang-scanner.ll" { return p::make_RUN_TIME_VAR_HSV(yytext, *driver.loc.back()); } YY_BREAK case 399: YY_RULE_SETUP #line 1010 "seclang-scanner.ll" { return p::make_RUN_TIME_VAR_REMOTE_USER(yytext, *driver.loc.back()); } YY_BREAK case 400: YY_RULE_SETUP #line 1011 "seclang-scanner.ll" { return p::make_RUN_TIME_VAR_TIME_DAY(yytext, *driver.loc.back()); } YY_BREAK case 401: YY_RULE_SETUP #line 1012 "seclang-scanner.ll" { return p::make_RUN_TIME_VAR_TIME_EPOCH(yytext, *driver.loc.back()); } YY_BREAK case 402: YY_RULE_SETUP #line 1013 "seclang-scanner.ll" { return p::make_RUN_TIME_VAR_TIME_HOUR(yytext, *driver.loc.back()); } YY_BREAK case 403: YY_RULE_SETUP #line 1014 "seclang-scanner.ll" { return p::make_RUN_TIME_VAR_TIME_MIN(yytext, *driver.loc.back()); } YY_BREAK case 404: YY_RULE_SETUP #line 1015 "seclang-scanner.ll" { return p::make_RUN_TIME_VAR_TIME_MON(yytext, *driver.loc.back()); } YY_BREAK case 405: YY_RULE_SETUP #line 1016 "seclang-scanner.ll" { return p::make_RUN_TIME_VAR_TIME_SEC(yytext, *driver.loc.back()); } YY_BREAK case 406: YY_RULE_SETUP #line 1017 "seclang-scanner.ll" { return p::make_RUN_TIME_VAR_TIME_YEAR(yytext, *driver.loc.back()); } YY_BREAK case 407: YY_RULE_SETUP #line 1018 "seclang-scanner.ll" { return p::make_RUN_TIME_VAR_TIME(yytext, *driver.loc.back()); } YY_BREAK case 408: YY_RULE_SETUP #line 1019 "seclang-scanner.ll" { return p::make_RUN_TIME_VAR_TIME_WDAY(yytext, *driver.loc.back()); } YY_BREAK case 409: YY_RULE_SETUP #line 1022 "seclang-scanner.ll" { driver.error (*driver.loc.back(), "Variable VARIABLE_WEBSERVER_ERROR_LOG is not supported by libModSecurity", ""); throw p::syntax_error(*driver.loc.back(), "");} YY_BREAK case 410: YY_RULE_SETUP #line 1023 "seclang-scanner.ll" { return p::make_VARIABLE_GLOBAL(*driver.loc.back()); } YY_BREAK case 411: YY_RULE_SETUP #line 1024 "seclang-scanner.ll" { return p::make_VARIABLE_IP(*driver.loc.back()); } YY_BREAK case 412: YY_RULE_SETUP #line 1025 "seclang-scanner.ll" { return p::make_VARIABLE_RESOURCE(*driver.loc.back()); } YY_BREAK case 413: YY_RULE_SETUP #line 1026 "seclang-scanner.ll" { return p::make_VARIABLE_SESSION(*driver.loc.back()); } YY_BREAK case 414: YY_RULE_SETUP #line 1027 "seclang-scanner.ll" { return p::make_VARIABLE_STATUS(*driver.loc.back()); } YY_BREAK case 415: YY_RULE_SETUP #line 1028 "seclang-scanner.ll" { return p::make_VARIABLE_STATUS_LINE(*driver.loc.back()); } YY_BREAK case 416: YY_RULE_SETUP #line 1029 "seclang-scanner.ll" { return p::make_VARIABLE_TX(*driver.loc.back()); } YY_BREAK case 417: YY_RULE_SETUP #line 1030 "seclang-scanner.ll" { return p::make_VARIABLE_USER(*driver.loc.back()); } YY_BREAK case 418: YY_RULE_SETUP #line 1034 "seclang-scanner.ll" { BEGINX_(); return p::make_VARIABLE_GLOBAL(*driver.loc.back()); } YY_BREAK case 419: YY_RULE_SETUP #line 1035 "seclang-scanner.ll" { BEGINX_(); return p::make_VARIABLE_IP(*driver.loc.back()); } YY_BREAK case 420: YY_RULE_SETUP #line 1036 "seclang-scanner.ll" { BEGINX_(); return p::make_VARIABLE_RESOURCE(*driver.loc.back()); } YY_BREAK case 421: YY_RULE_SETUP #line 1037 "seclang-scanner.ll" { BEGINX_(); return p::make_VARIABLE_SESSION(*driver.loc.back()); } YY_BREAK case 422: YY_RULE_SETUP #line 1038 "seclang-scanner.ll" { BEGINX_(); return p::make_VARIABLE_TX(*driver.loc.back()); } YY_BREAK case 423: YY_RULE_SETUP #line 1039 "seclang-scanner.ll" { BEGINX_(); return p::make_VARIABLE_USER(*driver.loc.back()); } YY_BREAK case 424: YY_RULE_SETUP #line 1044 "seclang-scanner.ll" { BEGIN_ACTION_WAITING_CONTENT(); return p::make_SETVAR_OPERATION_EQUALS_PLUS(*driver.loc.back()); } YY_BREAK case 425: YY_RULE_SETUP #line 1045 "seclang-scanner.ll" { BEGIN_ACTION_WAITING_CONTENT(); return p::make_SETVAR_OPERATION_EQUALS_MINUS(*driver.loc.back()); } YY_BREAK case 426: YY_RULE_SETUP #line 1046 "seclang-scanner.ll" { BEGIN_ACTION_WAITING_CONTENT(); return p::make_SETVAR_OPERATION_EQUALS(*driver.loc.back()); } YY_BREAK case 427: /* rule 427 can match eol */ YY_RULE_SETUP #line 1047 "seclang-scanner.ll" { BEGIN_PREVIOUS(); yyless(yyleng - 1); return p::make_DICT_ELEMENT_REGEXP(std::string(yytext, 1, yyleng-2), *driver.loc.back()); } YY_BREAK case 428: /* rule 428 can match eol */ YY_RULE_SETUP #line 1048 "seclang-scanner.ll" { BEGIN_PREVIOUS(); yyless(yyleng - 1); return p::make_DICT_ELEMENT_REGEXP(std::string(yytext, 1, yyleng-2), *driver.loc.back()); } YY_BREAK case 429: /* rule 429 can match eol */ YY_RULE_SETUP #line 1049 "seclang-scanner.ll" { BEGIN_PREVIOUS(); yyless(yyleng - 0); return p::make_DICT_ELEMENT_REGEXP(std::string(yytext, 2, yyleng-4), *driver.loc.back()); } YY_BREAK case 430: /* rule 430 can match eol */ YY_RULE_SETUP #line 1050 "seclang-scanner.ll" { BEGIN_PREVIOUS(); yyless(yyleng - 1); return p::make_DICT_ELEMENT_REGEXP(std::string(yytext, 2, yyleng-4), *driver.loc.back()); } YY_BREAK case 431: /* rule 431 can match eol */ YY_RULE_SETUP #line 1051 "seclang-scanner.ll" { yyless(yyleng - 1); BEGIN_PREVIOUS(); return p::make_FREE_TEXT_QUOTE_MACRO_EXPANSION(yytext, *driver.loc.back()); } YY_BREAK case 432: /* rule 432 can match eol */ YY_RULE_SETUP #line 1052 "seclang-scanner.ll" { return p::make_FREE_TEXT_QUOTE_MACRO_EXPANSION(yytext, *driver.loc.back()); } YY_BREAK case 433: /* rule 433 can match eol */ YY_RULE_SETUP #line 1054 "seclang-scanner.ll" { BEGIN_PREVIOUS(); yyless(yyleng - 1); return p::make_DICT_ELEMENT_REGEXP(std::string(yytext, 1, yyleng-2), *driver.loc.back()); } YY_BREAK case 434: /* rule 434 can match eol */ YY_RULE_SETUP #line 1055 "seclang-scanner.ll" { BEGIN_PREVIOUS(); yyless(yyleng - 1); return p::make_DICT_ELEMENT_REGEXP(std::string(yytext, 2, yyleng-4), *driver.loc.back()); } YY_BREAK case 435: YY_RULE_SETUP #line 1056 "seclang-scanner.ll" { BEGIN_PREVIOUS(); yyless(0); } YY_BREAK case 436: YY_RULE_SETUP #line 1057 "seclang-scanner.ll" { BEGIN_PREVIOUS(); yyless(0); } YY_BREAK case 437: YY_RULE_SETUP #line 1058 "seclang-scanner.ll" { BEGINX(LEXING_ERROR_ACTION); yyless(0); } YY_BREAK case 438: /* rule 438 can match eol */ YY_RULE_SETUP #line 1063 "seclang-scanner.ll" { BEGIN_PREVIOUS(); yyless(yyleng); return p::make_DICT_ELEMENT_REGEXP(std::string(yytext, 1, yyleng-2), *driver.loc.back()); } YY_BREAK case 439: /* rule 439 can match eol */ YY_RULE_SETUP #line 1064 "seclang-scanner.ll" { BEGIN_PREVIOUS(); yyless(yyleng - 1); return p::make_DICT_ELEMENT_REGEXP(std::string(yytext, 1, yyleng-2), *driver.loc.back()); } YY_BREAK case 440: /* rule 440 can match eol */ YY_RULE_SETUP #line 1065 "seclang-scanner.ll" { BEGIN_PREVIOUS(); yyless(yyleng - 1); return p::make_DICT_ELEMENT_REGEXP(std::string(yytext, 1, yyleng-2), *driver.loc.back()); } YY_BREAK case 441: /* rule 441 can match eol */ YY_RULE_SETUP #line 1066 "seclang-scanner.ll" { BEGIN_PREVIOUS(); yyless(yyleng - 0); return p::make_DICT_ELEMENT_REGEXP(std::string(yytext, 2, yyleng-4), *driver.loc.back()); } YY_BREAK case 442: /* rule 442 can match eol */ YY_RULE_SETUP #line 1067 "seclang-scanner.ll" { BEGIN_PREVIOUS(); yyless(yyleng - 1); return p::make_DICT_ELEMENT_REGEXP(std::string(yytext, 2, yyleng-4), *driver.loc.back()); } YY_BREAK case 443: /* rule 443 can match eol */ YY_RULE_SETUP #line 1068 "seclang-scanner.ll" { BEGIN_PREVIOUS(); return p::make_DICT_ELEMENT(yytext, *driver.loc.back()); } YY_BREAK case 444: /* rule 444 can match eol */ YY_RULE_SETUP #line 1070 "seclang-scanner.ll" { BEGIN_PREVIOUS(); yyless(yyleng - 1); return p::make_DICT_ELEMENT_REGEXP(std::string(yytext, 1, yyleng-2), *driver.loc.back()); } YY_BREAK case 445: /* rule 445 can match eol */ YY_RULE_SETUP #line 1071 "seclang-scanner.ll" { BEGIN_PREVIOUS(); yyless(yyleng - 1); return p::make_DICT_ELEMENT_REGEXP(std::string(yytext, 2, yyleng-4), *driver.loc.back()); } YY_BREAK case 446: YY_RULE_SETUP #line 1073 "seclang-scanner.ll" { BEGINX(LEXING_ERROR_ACTION); yyless(0); } YY_BREAK case 447: YY_RULE_SETUP #line 1074 "seclang-scanner.ll" { return p::make_QUOTATION_MARK(yytext, *driver.loc.back()); } YY_BREAK case 448: YY_RULE_SETUP #line 1080 "seclang-scanner.ll" { BEGIN(TRANSACTION_FROM_OPERATOR_TO_ACTIONS); return p::make_OPERATOR_GEOLOOKUP(*driver.loc.back()); } YY_BREAK case 449: YY_RULE_SETUP #line 1081 "seclang-scanner.ll" { BEGIN(TRANSACTION_FROM_OPERATOR_TO_ACTIONS); return p::make_OPERATOR_UNCONDITIONAL_MATCH(*driver.loc.back()); } YY_BREAK case 450: YY_RULE_SETUP #line 1082 "seclang-scanner.ll" { BEGIN(TRANSACTION_FROM_OPERATOR_TO_ACTIONS); return p::make_OPERATOR_DETECT_SQLI(*driver.loc.back()); } YY_BREAK case 451: YY_RULE_SETUP #line 1083 "seclang-scanner.ll" { BEGIN(TRANSACTION_FROM_OPERATOR_TO_ACTIONS); return p::make_OPERATOR_DETECT_XSS(*driver.loc.back()); } YY_BREAK case 452: YY_RULE_SETUP #line 1084 "seclang-scanner.ll" { BEGIN(TRANSACTION_FROM_OPERATOR_TO_ACTIONS); return p::make_OPERATOR_VALIDATE_URL_ENCODING(*driver.loc.back()); } YY_BREAK case 453: YY_RULE_SETUP #line 1085 "seclang-scanner.ll" { BEGIN(TRANSACTION_FROM_OPERATOR_TO_ACTIONS); return p::make_OPERATOR_VALIDATE_UTF8_ENCODING(*driver.loc.back()); } YY_BREAK case 454: YY_RULE_SETUP #line 1088 "seclang-scanner.ll" { BEGIN(TRANSACTION_FROM_OPERATOR_TO_ACTIONS); return p::make_OPERATOR_GEOLOOKUP(*driver.loc.back()); } YY_BREAK case 455: YY_RULE_SETUP #line 1089 "seclang-scanner.ll" { BEGIN(TRANSACTION_FROM_OPERATOR_TO_ACTIONS); return p::make_OPERATOR_UNCONDITIONAL_MATCH(*driver.loc.back()); } YY_BREAK case 456: YY_RULE_SETUP #line 1090 "seclang-scanner.ll" { BEGIN(TRANSACTION_FROM_OPERATOR_TO_ACTIONS); return p::make_OPERATOR_DETECT_SQLI(*driver.loc.back()); } YY_BREAK case 457: YY_RULE_SETUP #line 1091 "seclang-scanner.ll" { BEGIN(TRANSACTION_FROM_OPERATOR_TO_ACTIONS); return p::make_OPERATOR_DETECT_XSS(*driver.loc.back()); } YY_BREAK case 458: YY_RULE_SETUP #line 1092 "seclang-scanner.ll" { BEGIN(TRANSACTION_FROM_OPERATOR_TO_ACTIONS); return p::make_OPERATOR_VALIDATE_URL_ENCODING(*driver.loc.back()); } YY_BREAK case 459: YY_RULE_SETUP #line 1093 "seclang-scanner.ll" { BEGIN(TRANSACTION_FROM_OPERATOR_TO_ACTIONS); return p::make_OPERATOR_VALIDATE_UTF8_ENCODING(*driver.loc.back()); } YY_BREAK case 460: YY_RULE_SETUP #line 1097 "seclang-scanner.ll" { BEGIN_PARAMETER(); return p::make_OPERATOR_WITHIN(*driver.loc.back()); } YY_BREAK case 461: YY_RULE_SETUP #line 1098 "seclang-scanner.ll" { BEGIN_PARAMETER(); return p::make_OPERATOR_CONTAINS_WORD(*driver.loc.back()); } YY_BREAK case 462: YY_RULE_SETUP #line 1099 "seclang-scanner.ll" { BEGIN_PARAMETER(); return p::make_OPERATOR_CONTAINS(*driver.loc.back()); } YY_BREAK case 463: YY_RULE_SETUP #line 1100 "seclang-scanner.ll" { BEGIN_PARAMETER(); return p::make_OPERATOR_ENDS_WITH(*driver.loc.back()); } YY_BREAK case 464: YY_RULE_SETUP #line 1101 "seclang-scanner.ll" { BEGIN_PARAMETER(); return p::make_OPERATOR_EQ(*driver.loc.back()); } YY_BREAK case 465: YY_RULE_SETUP #line 1102 "seclang-scanner.ll" { BEGIN_PARAMETER(); return p::make_OPERATOR_GE(*driver.loc.back()); } YY_BREAK case 466: YY_RULE_SETUP #line 1103 "seclang-scanner.ll" { BEGIN_PARAMETER(); return p::make_OPERATOR_GT(*driver.loc.back()); } YY_BREAK case 467: YY_RULE_SETUP #line 1104 "seclang-scanner.ll" { BEGIN_PARAMETER(); return p::make_OPERATOR_IP_MATCH_FROM_FILE(*driver.loc.back()); } YY_BREAK case 468: YY_RULE_SETUP #line 1105 "seclang-scanner.ll" { BEGIN_PARAMETER(); return p::make_OPERATOR_IP_MATCH(*driver.loc.back()); } YY_BREAK case 469: YY_RULE_SETUP #line 1106 "seclang-scanner.ll" { BEGIN_PARAMETER(); return p::make_OPERATOR_LE(*driver.loc.back()); } YY_BREAK case 470: YY_RULE_SETUP #line 1107 "seclang-scanner.ll" { BEGIN_PARAMETER(); return p::make_OPERATOR_LT(*driver.loc.back()); } YY_BREAK case 471: YY_RULE_SETUP #line 1108 "seclang-scanner.ll" { BEGIN_PARAMETER(); return p::make_OPERATOR_PM_FROM_FILE(*driver.loc.back()); } YY_BREAK case 472: YY_RULE_SETUP #line 1109 "seclang-scanner.ll" { BEGIN_PARAMETER(); return p::make_OPERATOR_PM(*driver.loc.back()); } YY_BREAK case 473: YY_RULE_SETUP #line 1110 "seclang-scanner.ll" { BEGIN_PARAMETER(); return p::make_OPERATOR_RBL( *driver.loc.back()); } YY_BREAK case 474: YY_RULE_SETUP #line 1111 "seclang-scanner.ll" { BEGIN_PARAMETER(); return p::make_OPERATOR_RX(*driver.loc.back()); } YY_BREAK case 475: YY_RULE_SETUP #line 1112 "seclang-scanner.ll" { BEGIN_PARAMETER(); return p::make_OPERATOR_RX_GLOBAL(*driver.loc.back()); } YY_BREAK case 476: YY_RULE_SETUP #line 1113 "seclang-scanner.ll" { BEGIN_PARAMETER(); return p::make_OPERATOR_STR_EQ(*driver.loc.back()); } YY_BREAK case 477: YY_RULE_SETUP #line 1114 "seclang-scanner.ll" { BEGIN_PARAMETER(); return p::make_OPERATOR_STR_MATCH(*driver.loc.back()); } YY_BREAK case 478: YY_RULE_SETUP #line 1115 "seclang-scanner.ll" { BEGIN_PARAMETER(); return p::make_OPERATOR_BEGINS_WITH(*driver.loc.back()); } YY_BREAK case 479: YY_RULE_SETUP #line 1116 "seclang-scanner.ll" { BEGIN_PARAMETER(); return p::make_OPERATOR_INSPECT_FILE(*driver.loc.back()); } YY_BREAK case 480: YY_RULE_SETUP #line 1117 "seclang-scanner.ll" { BEGIN_PARAMETER(); return p::make_OPERATOR_FUZZY_HASH(*driver.loc.back()); } YY_BREAK case 481: YY_RULE_SETUP #line 1118 "seclang-scanner.ll" { BEGIN_PARAMETER(); return p::make_OPERATOR_VALIDATE_BYTE_RANGE(*driver.loc.back()); } YY_BREAK case 482: YY_RULE_SETUP #line 1119 "seclang-scanner.ll" { BEGIN_PARAMETER(); return p::make_OPERATOR_VALIDATE_DTD(*driver.loc.back()); } YY_BREAK case 483: YY_RULE_SETUP #line 1120 "seclang-scanner.ll" { BEGIN_PARAMETER(); return p::make_OPERATOR_VALIDATE_HASH(*driver.loc.back()); } YY_BREAK case 484: YY_RULE_SETUP #line 1121 "seclang-scanner.ll" { BEGIN_PARAMETER(); return p::make_OPERATOR_VALIDATE_SCHEMA(*driver.loc.back()); } YY_BREAK case 485: YY_RULE_SETUP #line 1122 "seclang-scanner.ll" { BEGIN_PARAMETER(); return p::make_OPERATOR_VERIFY_CC(*driver.loc.back()); } YY_BREAK case 486: YY_RULE_SETUP #line 1123 "seclang-scanner.ll" { BEGIN_PARAMETER(); return p::make_OPERATOR_VERIFY_CPF(*driver.loc.back()); } YY_BREAK case 487: YY_RULE_SETUP #line 1124 "seclang-scanner.ll" { BEGIN_PARAMETER(); return p::make_OPERATOR_VERIFY_SSN(*driver.loc.back()); } YY_BREAK case 488: YY_RULE_SETUP #line 1125 "seclang-scanner.ll" { BEGIN_PARAMETER(); return p::make_OPERATOR_VERIFY_SVNR(*driver.loc.back()); } YY_BREAK case 489: YY_RULE_SETUP #line 1126 "seclang-scanner.ll" { BEGIN_PARAMETER(); return p::make_OPERATOR_GSB_LOOKUP(*driver.loc.back()); } YY_BREAK case 490: YY_RULE_SETUP #line 1127 "seclang-scanner.ll" { BEGIN_PARAMETER(); return p::make_OPERATOR_RSUB(*driver.loc.back()); } YY_BREAK case 491: YY_RULE_SETUP #line 1129 "seclang-scanner.ll" { return p::make_NOT(*driver.loc.back()); } YY_BREAK case 492: YY_RULE_SETUP #line 1130 "seclang-scanner.ll" { BEGIN_NO_OP_INFORMED(); yyless(0); } YY_BREAK case 493: YY_RULE_SETUP #line 1135 "seclang-scanner.ll" { BEGIN(EXPECTING_PARAMETER_ENDS_WITH_SPACE); } YY_BREAK case 494: YY_RULE_SETUP #line 1139 "seclang-scanner.ll" { BEGIN(EXPECTING_PARAMETER_ENDS_WITH_QUOTE); } YY_BREAK case 495: YY_RULE_SETUP #line 1143 "seclang-scanner.ll" { BEGIN(TRANSACTION_FROM_OPERATOR_PARAMETERS_TO_ACTIONS); } YY_BREAK case 496: /* rule 496 can match eol */ YY_RULE_SETUP #line 1144 "seclang-scanner.ll" { return p::make_FREE_TEXT_QUOTE_MACRO_EXPANSION(yytext, *driver.loc.back()); } YY_BREAK case 497: YY_RULE_SETUP #line 1148 "seclang-scanner.ll" { BEGIN(TRANSACTION_FROM_OPERATOR_PARAMETERS_TO_ACTIONS); } YY_BREAK case 498: /* rule 498 can match eol */ YY_RULE_SETUP #line 1149 "seclang-scanner.ll" { return p::make_FREE_TEXT_QUOTE_MACRO_EXPANSION(yytext, *driver.loc.back()); } YY_BREAK case 499: YY_RULE_SETUP #line 1152 "seclang-scanner.ll" { BEGINX(EXPECTING_ACTION_PREDICATE_VARIABLE); } YY_BREAK case 500: YY_RULE_SETUP #line 1153 "seclang-scanner.ll" { BEGIN(LEXING_ERROR); yyless(0); } YY_BREAK case 501: YY_RULE_SETUP #line 1157 "seclang-scanner.ll" { BEGIN(TRANSACTION_FROM_OPERATOR_PARAMETERS_TO_ACTIONS); } YY_BREAK case 502: /* rule 502 can match eol */ YY_RULE_SETUP #line 1158 "seclang-scanner.ll" { return p::make_FREE_TEXT_QUOTE_MACRO_EXPANSION(yytext, *driver.loc.back()); } YY_BREAK case 503: YY_RULE_SETUP #line 1162 "seclang-scanner.ll" { BEGIN(TRANSACTION_FROM_OPERATOR_PARAMETERS_TO_ACTIONS); } YY_BREAK case 504: /* rule 504 can match eol */ YY_RULE_SETUP #line 1163 "seclang-scanner.ll" { return p::make_FREE_TEXT_QUOTE_MACRO_EXPANSION(yytext, *driver.loc.back()); } YY_BREAK case 505: YY_RULE_SETUP #line 1167 "seclang-scanner.ll" { BEGINX(EXPECTING_ACTION_PREDICATE_VARIABLE); } YY_BREAK case 506: YY_RULE_SETUP #line 1168 "seclang-scanner.ll" { BEGIN(LEXING_ERROR_VARIABLE); yyless(0); } YY_BREAK case 507: YY_RULE_SETUP #line 1173 "seclang-scanner.ll" { BEGIN(EXPECTING_ACTIONS_ONLY_ONE); } YY_BREAK case 508: /* rule 508 can match eol */ YY_RULE_SETUP #line 1175 "seclang-scanner.ll" { driver.loc.back()->lines(1); driver.loc.back()->step(); BEGIN(EXPECTING_ACTIONS_ENDS_WITH_DOUBLE_QUOTE); } YY_BREAK case 509: /* rule 509 can match eol */ YY_RULE_SETUP #line 1176 "seclang-scanner.ll" { driver.loc.back()->lines(1); driver.loc.back()->step(); BEGIN(EXPECTING_ACTIONS_ENDS_WITH_DOUBLE_QUOTE); } YY_BREAK case 510: /* rule 510 can match eol */ YY_RULE_SETUP #line 1177 "seclang-scanner.ll" { driver.loc.back()->lines(1); driver.loc.back()->step(); BEGIN(EXPECTING_ACTIONS_ONLY_ONE); } YY_BREAK case 511: /* rule 511 can match eol */ YY_RULE_SETUP #line 1178 "seclang-scanner.ll" { driver.loc.back()->lines(1); driver.loc.back()->step(); BEGIN(EXPECTING_ACTIONS_ONLY_ONE); } YY_BREAK case 512: /* rule 512 can match eol */ YY_RULE_SETUP #line 1180 "seclang-scanner.ll" { driver.loc.back()->lines(1); driver.loc.back()->step(); BEGIN(EXPECTING_ACTIONS_ENDS_WITH_DOUBLE_QUOTE); } YY_BREAK case 513: /* rule 513 can match eol */ YY_RULE_SETUP #line 1181 "seclang-scanner.ll" { driver.loc.back()->lines(1); driver.loc.back()->step(); BEGIN(EXPECTING_ACTIONS_ENDS_WITH_DOUBLE_QUOTE); } YY_BREAK case 514: /* rule 514 can match eol */ YY_RULE_SETUP #line 1182 "seclang-scanner.ll" { driver.loc.back()->lines(1); driver.loc.back()->step(); BEGIN(EXPECTING_ACTIONS_ENDS_WITH_DOUBLE_QUOTE); } YY_BREAK case 515: /* rule 515 can match eol */ YY_RULE_SETUP #line 1183 "seclang-scanner.ll" { driver.loc.back()->lines(1); driver.loc.back()->step(); BEGIN(EXPECTING_ACTIONS_ENDS_WITH_DOUBLE_QUOTE); } YY_BREAK case 516: /* rule 516 can match eol */ YY_RULE_SETUP #line 1185 "seclang-scanner.ll" { driver.loc.back()->lines(1); driver.loc.back()->step(); BEGIN(EXPECTING_ACTIONS_ONLY_ONE); } YY_BREAK case 517: /* rule 517 can match eol */ YY_RULE_SETUP #line 1186 "seclang-scanner.ll" { driver.loc.back()->lines(1); driver.loc.back()->step(); BEGIN(EXPECTING_ACTIONS_ONLY_ONE); } YY_BREAK case 518: /* rule 518 can match eol */ YY_RULE_SETUP #line 1187 "seclang-scanner.ll" { driver.loc.back()->lines(1); driver.loc.back()->step(); BEGIN(EXPECTING_ACTIONS_ONLY_ONE); } YY_BREAK case 519: /* rule 519 can match eol */ YY_RULE_SETUP #line 1188 "seclang-scanner.ll" { driver.loc.back()->lines(1); driver.loc.back()->step(); BEGIN(EXPECTING_ACTIONS_ONLY_ONE); } YY_BREAK case 520: YY_RULE_SETUP #line 1190 "seclang-scanner.ll" { BEGIN(EXPECTING_ACTIONS_ENDS_WITH_DOUBLE_QUOTE); } YY_BREAK case 521: /* rule 521 can match eol */ YY_RULE_SETUP #line 1192 "seclang-scanner.ll" { driver.loc.back()->lines(1); driver.loc.back()->step(); BEGIN(EXPECTING_ACTIONS_ENDS_WITH_DOUBLE_QUOTE); } YY_BREAK case 522: /* rule 522 can match eol */ YY_RULE_SETUP #line 1193 "seclang-scanner.ll" { driver.loc.back()->lines(1); driver.loc.back()->step(); BEGIN(EXPECTING_ACTIONS_ENDS_WITH_DOUBLE_QUOTE); } YY_BREAK case 523: /* rule 523 can match eol */ YY_RULE_SETUP #line 1195 "seclang-scanner.ll" { driver.loc.back()->lines(1); driver.loc.back()->step(); BEGIN(EXPECTING_ACTIONS_ENDS_WITH_DOUBLE_QUOTE); } YY_BREAK case 524: /* rule 524 can match eol */ YY_RULE_SETUP #line 1196 "seclang-scanner.ll" { driver.loc.back()->lines(1); driver.loc.back()->step(); BEGIN(EXPECTING_ACTIONS_ENDS_WITH_DOUBLE_QUOTE); } YY_BREAK case 525: /* rule 525 can match eol */ YY_RULE_SETUP #line 1197 "seclang-scanner.ll" { driver.loc.back()->lines(1); driver.loc.back()->step(); BEGIN(EXPECTING_ACTIONS_ENDS_WITH_DOUBLE_QUOTE); } YY_BREAK case 526: /* rule 526 can match eol */ YY_RULE_SETUP #line 1198 "seclang-scanner.ll" { driver.loc.back()->lines(1); driver.loc.back()->step(); BEGIN(EXPECTING_ACTIONS_ENDS_WITH_DOUBLE_QUOTE); } YY_BREAK case 527: YY_RULE_SETUP #line 1200 "seclang-scanner.ll" { BEGIN(EXPECTING_ACTIONS_ENDS_WITH_DOUBLE_QUOTE); } YY_BREAK case 528: YY_RULE_SETUP #line 1205 "seclang-scanner.ll" { } YY_BREAK case 529: /* rule 529 can match eol */ YY_RULE_SETUP #line 1206 "seclang-scanner.ll" { driver.loc.back()->lines(1); driver.loc.back()->step(); } YY_BREAK case 530: /* rule 530 can match eol */ YY_RULE_SETUP #line 1207 "seclang-scanner.ll" { driver.loc.back()->lines(1); driver.loc.back()->step(); } YY_BREAK case 531: /* rule 531 can match eol */ YY_RULE_SETUP #line 1211 "seclang-scanner.ll" { driver.loc.back()->lines(1); driver.loc.back()->step(); } YY_BREAK case 532: /* rule 532 can match eol */ YY_RULE_SETUP #line 1212 "seclang-scanner.ll" { driver.loc.back()->lines(1); driver.loc.back()->step(); } YY_BREAK case 533: /* rule 533 can match eol */ YY_RULE_SETUP #line 1213 "seclang-scanner.ll" { BEGIN(INITIAL); driver.loc.back()->lines(1); driver.loc.back()->step(); } YY_BREAK case 534: YY_RULE_SETUP #line 1218 "seclang-scanner.ll" { BEGIN(LEXING_ERROR); yyless(0); } YY_BREAK case 535: YY_RULE_SETUP #line 1220 "seclang-scanner.ll" { driver.error (*driver.loc.back(), "Invalid input: ", yytext); throw p::syntax_error(*driver.loc.back(), ""); } YY_BREAK case 536: YY_RULE_SETUP #line 1221 "seclang-scanner.ll" { driver.error (*driver.loc.back(), "Expecting an action, got: ", yytext); throw p::syntax_error(*driver.loc.back(), ""); } YY_BREAK case 537: YY_RULE_SETUP #line 1222 "seclang-scanner.ll" { driver.error (*driver.loc.back(), "Expecting a variable, got: : ", yytext); throw p::syntax_error(*driver.loc.back(), ""); } YY_BREAK case YY_STATE_EOF(INITIAL): case YY_STATE_EOF(EXPECTING_ACTION_PREDICATE_VARIABLE): case YY_STATE_EOF(TRANSACTION_TO_VARIABLE): case YY_STATE_EOF(EXPECTING_VARIABLE): case YY_STATE_EOF(EXPECTING_OPERATOR_ENDS_WITH_SPACE): case YY_STATE_EOF(EXPECTING_OPERATOR_ENDS_WITH_QUOTE): case YY_STATE_EOF(EXPECTING_ACTION_PREDICATE): case YY_STATE_EOF(ACTION_PREDICATE_ENDS_WITH_QUOTE): case YY_STATE_EOF(ACTION_PREDICATE_ENDS_WITH_DOUBLE_QUOTE): case YY_STATE_EOF(ACTION_PREDICATE_ENDS_WITH_COMMA_OR_DOUBLE_QUOTE): case YY_STATE_EOF(COMMENT): case YY_STATE_EOF(TRANSITION_FROM_OP_TO_EXPECTING_PARAMETER_ENDS_WITH_QUOTE): case YY_STATE_EOF(TRANSITION_FROM_OP_TO_EXPECTING_PARAMETER_ENDS_WITH_SPACE): case YY_STATE_EOF(EXPECTING_VAR_PARAMETER): case YY_STATE_EOF(EXPECTING_VAR_PARAMETER_OR_MACRO_NONQUOTED): case YY_STATE_EOF(EXPECTING_VAR_PARAMETER_OR_MACRO_QUOTED): case YY_STATE_EOF(EXPECTING_PARAMETER_ENDS_WITH_QUOTE): case YY_STATE_EOF(EXPECTING_PARAMETER_ENDS_WITH_SPACE): case YY_STATE_EOF(EXPECTING_ACTIONS_ENDS_WITH_DOUBLE_QUOTE): case YY_STATE_EOF(EXPECTING_ACTIONS_ONLY_ONE): case YY_STATE_EOF(TRANSACTION_FROM_OPERATOR_TO_ACTIONS): case YY_STATE_EOF(TRANSACTION_FROM_OPERATOR_PARAMETERS_TO_ACTIONS): case YY_STATE_EOF(TRANSACTION_FROM_DIRECTIVE_TO_ACTIONS): case YY_STATE_EOF(NO_OP_INFORMED_ENDS_WITH_SPACE): case YY_STATE_EOF(NO_OP_INFORMED_ENDS_WITH_QUOTE): case YY_STATE_EOF(LEXING_ERROR): case YY_STATE_EOF(LEXING_ERROR_ACTION): case YY_STATE_EOF(LEXING_ERROR_VARIABLE): case YY_STATE_EOF(SETVAR_ACTION_NONQUOTED): case YY_STATE_EOF(SETVAR_ACTION_NONQUOTED_WAITING_COLLECTION_ELEM): case YY_STATE_EOF(SETVAR_ACTION_NONQUOTED_WAITING_OPERATION): case YY_STATE_EOF(SETVAR_ACTION_NONQUOTED_WAITING_CONTENT): case YY_STATE_EOF(SETVAR_ACTION_QUOTED): case YY_STATE_EOF(SETVAR_ACTION_QUOTED_WAITING_COLLECTION_ELEM): case YY_STATE_EOF(SETVAR_ACTION_QUOTED_WAITING_OPERATION): case YY_STATE_EOF(SETVAR_ACTION_QUOTED_WAITING_CONTENT): #line 1225 "seclang-scanner.ll" { if (yyin) { fclose(yyin); } yypop_buffer_state(); if (!YY_CURRENT_BUFFER) { return p::make_END(*driver.loc.back()); } yy::location *l = driver.loc.back(); driver.loc.pop_back(); delete l; } YY_BREAK case 538: YY_RULE_SETUP #line 1241 "seclang-scanner.ll" { std::string err; const char *file = strchr(yytext, ' ') + 1; std::string fi = modsecurity::utils::find_resource(file, *driver.loc.back()->end.filename, &err); if (fi.empty() == true) { BEGIN(INITIAL); driver.error (*driver.loc.back(), "", file + std::string(": Not able to open file. ") + err); throw p::syntax_error(*driver.loc.back(), ""); } std::list files = modsecurity::utils::expandEnv(fi, 0); files.reverse(); for (auto& s: files) { std::string err; std::string f = modsecurity::utils::find_resource(s, *driver.loc.back()->end.filename, &err); driver.loc.push_back(new yy::location()); driver.loc.back()->begin.filename = driver.loc.back()->end.filename = new std::string(f); yyin = fopen(f.c_str(), "r" ); if (!yyin) { BEGIN(INITIAL); driver.loc.pop_back(); driver.error (*driver.loc.back(), "", s + std::string(": Not able to open file. ") + err); throw p::syntax_error(*driver.loc.back(), ""); } yypush_buffer_state(yy_create_buffer( yyin, YY_BUF_SIZE )); } } YY_BREAK case 539: YY_RULE_SETUP #line 1268 "seclang-scanner.ll" { std::string err; const char *file = strchr(yytext, ' ') + 1; char *f = strdup(file + 1); f[strlen(f)-1] = '\0'; std::string fi = modsecurity::utils::find_resource(f, *driver.loc.back()->end.filename, &err); if (fi.empty() == true) { BEGIN(INITIAL); driver.error (*driver.loc.back(), "", file + std::string(": Not able to open file. ") + err); throw p::syntax_error(*driver.loc.back(), ""); } std::list files = modsecurity::utils::expandEnv(fi, 0); files.reverse(); for (auto& s: files) { std::string f = modsecurity::utils::find_resource(s, *driver.loc.back()->end.filename, &err); driver.loc.push_back(new yy::location()); driver.loc.back()->begin.filename = driver.loc.back()->end.filename = new std::string(f); yyin = fopen(f.c_str(), "r" ); if (!yyin) { BEGIN(INITIAL); driver.loc.pop_back(); driver.error (*driver.loc.back(), "", s + std::string(": Not able to open file. ") + err); throw p::syntax_error(*driver.loc.back(), ""); } yypush_buffer_state(yy_create_buffer( yyin, YY_BUF_SIZE )); } free(f); } YY_BREAK case 540: /* rule 540 can match eol */ YY_RULE_SETUP #line 1298 "seclang-scanner.ll" { HttpsClient c; std::string key; std::string url; std::vector conf = modsecurity::utils::string::split(yytext, ' '); if (conf.size() < 2) { driver.error (*driver.loc.back(), "", "SecRemoteRules demands a key and a URI"); throw p::syntax_error(*driver.loc.back(), ""); } key = conf[1]; url = conf[2]; c.setKey(key); driver.loc.push_back(new yy::location()); driver.loc.back()->begin.filename = driver.loc.back()->end.filename = new std::string(url); YY_BUFFER_STATE temp = YY_CURRENT_BUFFER; yypush_buffer_state(temp); bool ret = c.download(url); if (ret == false) { BEGIN(INITIAL); if (driver.m_remoteRulesActionOnFailed == RulesSet::OnFailedRemoteRulesAction::WarnOnFailedRemoteRulesAction) { /** TODO: Implement the server logging mechanism. */ } if (driver.m_remoteRulesActionOnFailed == RulesSet::OnFailedRemoteRulesAction::AbortOnFailedRemoteRulesAction) { driver.error (*driver.loc.back(), "", yytext + std::string(" - Failed to download: ") + c.error); throw p::syntax_error(*driver.loc.back(), ""); } } yy_scan_string(c.content.c_str()); } YY_BREAK case 541: YY_RULE_SETUP #line 1334 "seclang-scanner.ll" ECHO; YY_BREAK #line 8604 "seclang-scanner.cc" case YY_END_OF_BUFFER: { /* Amount of text matched not including the EOB char. */ int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1; /* Undo the effects of YY_DO_BEFORE_ACTION. */ *yy_cp = (yy_hold_char); YY_RESTORE_YY_MORE_OFFSET if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) { /* We're scanning a new file or input source. It's * possible that this happened because the user * just pointed yyin at a new source and called * yylex(). If so, then we have to assure * consistency between YY_CURRENT_BUFFER and our * globals. Here is the right place to do so, because * this is the first action (other than possibly a * back-up) that will match for the new input source. */ (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; /* %if-c-only */ YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin; /* %endif */ /* %if-c++-only */ /* %endif */ YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; } /* Note that here we test for yy_c_buf_p "<=" to the position * of the first EOB in the buffer, since yy_c_buf_p will * already have been incremented past the NUL character * (since all states make transitions on EOB to the * end-of-buffer state). Contrast this with the test * in input(). */ if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) { /* This was really a NUL. */ yy_state_type yy_next_state; (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text; yy_current_state = yy_get_previous_state( ); /* Okay, we're now positioned to make the NUL * transition. We couldn't have * yy_get_previous_state() go ahead and do it * for us because it doesn't know how to deal * with the possibility of jamming (and we don't * want to build jamming into it because then it * will run more slowly). */ yy_next_state = yy_try_NUL_trans( yy_current_state ); yy_bp = (yytext_ptr) + YY_MORE_ADJ; if ( yy_next_state ) { /* Consume the NUL. */ yy_cp = ++(yy_c_buf_p); yy_current_state = yy_next_state; goto yy_match; } else { /* %% [14.0] code to do back-up for compressed tables and set up yy_cp goes here */ yy_cp = (yy_last_accepting_cpos); yy_current_state = (yy_last_accepting_state); goto yy_find_action; } } else switch ( yy_get_next_buffer( ) ) { case EOB_ACT_END_OF_FILE: { (yy_did_buffer_switch_on_eof) = 0; if ( yywrap( ) ) { /* Note: because we've taken care in * yy_get_next_buffer() to have set up * yytext, we can now set up * yy_c_buf_p so that if some total * hoser (like flex itself) wants to * call the scanner after we return the * YY_NULL, it'll still work - another * YY_NULL will get returned. */ (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ; yy_act = YY_STATE_EOF(YY_START); goto do_action; } else { if ( ! (yy_did_buffer_switch_on_eof) ) YY_NEW_FILE; } break; } case EOB_ACT_CONTINUE_SCAN: (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text; yy_current_state = yy_get_previous_state( ); yy_cp = (yy_c_buf_p); yy_bp = (yytext_ptr) + YY_MORE_ADJ; goto yy_match; case EOB_ACT_LAST_MATCH: (yy_c_buf_p) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)]; yy_current_state = yy_get_previous_state( ); yy_cp = (yy_c_buf_p); yy_bp = (yytext_ptr) + YY_MORE_ADJ; goto yy_find_action; } break; } default: YY_FATAL_ERROR( "fatal flex scanner internal error--no action found" ); } /* end of action switch */ } /* end of scanning one token */ } /* end of user's declarations */ } /* end of yylex */ /* %ok-for-header */ /* %if-c++-only */ /* %not-for-header */ /* %ok-for-header */ /* %endif */ /* yy_get_next_buffer - try to read in a new buffer * * Returns a code representing an action: * EOB_ACT_LAST_MATCH - * EOB_ACT_CONTINUE_SCAN - continue scanning from current position * EOB_ACT_END_OF_FILE - end of file */ /* %if-c-only */ static int yy_get_next_buffer (void) /* %endif */ /* %if-c++-only */ /* %endif */ { char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; char *source = (yytext_ptr); int number_to_move, i; int ret_val; if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] ) YY_FATAL_ERROR( "fatal flex scanner internal error--end of buffer missed" ); if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) { /* Don't try to fill the buffer, so this is an EOF. */ if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 ) { /* We matched a single character, the EOB, so * treat this as a final EOF. */ return EOB_ACT_END_OF_FILE; } else { /* We matched some text prior to the EOB, first * process it. */ return EOB_ACT_LAST_MATCH; } } /* Try to read more data. */ /* First move last chars to start of buffer. */ number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr) - 1); for ( i = 0; i < number_to_move; ++i ) *(dest++) = *(source++); if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) /* don't do the read, it's not guaranteed to return an EOF, * just force an EOF */ YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0; else { int num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; while ( num_to_read <= 0 ) { /* Not enough room in the buffer - grow it. */ /* just a shorter name for the current buffer */ YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE; int yy_c_buf_p_offset = (int) ((yy_c_buf_p) - b->yy_ch_buf); if ( b->yy_is_our_buffer ) { int new_size = b->yy_buf_size * 2; if ( new_size <= 0 ) b->yy_buf_size += b->yy_buf_size / 8; else b->yy_buf_size *= 2; b->yy_ch_buf = (char *) /* Include room in for 2 EOB chars. */ yyrealloc( (void *) b->yy_ch_buf, (yy_size_t) (b->yy_buf_size + 2) ); } else /* Can't grow it, we don't own it. */ b->yy_ch_buf = NULL; if ( ! b->yy_ch_buf ) YY_FATAL_ERROR( "fatal error - scanner input buffer overflow" ); (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset]; num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; } if ( num_to_read > YY_READ_BUF_SIZE ) num_to_read = YY_READ_BUF_SIZE; /* Read in more data. */ YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), (yy_n_chars), num_to_read ); YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); } if ( (yy_n_chars) == 0 ) { if ( number_to_move == YY_MORE_ADJ ) { ret_val = EOB_ACT_END_OF_FILE; yyrestart( yyin ); } else { ret_val = EOB_ACT_LAST_MATCH; YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_EOF_PENDING; } } else ret_val = EOB_ACT_CONTINUE_SCAN; if (((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { /* Extend the array by 50%, plus the number we really need. */ int new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1); YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc( (void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size ); if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); /* "- 2" to take care of EOB's */ YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2); } (yy_n_chars) += number_to_move; YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR; YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR; (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; return ret_val; } /* yy_get_previous_state - get the state just before the EOB char was reached */ /* %if-c-only */ /* %not-for-header */ static yy_state_type yy_get_previous_state (void) /* %endif */ /* %if-c++-only */ /* %endif */ { yy_state_type yy_current_state; char *yy_cp; /* %% [15.0] code to get the start state into yy_current_state goes here */ yy_current_state = (yy_start); for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp ) { /* %% [16.0] code to find the next state goes here */ YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); if ( yy_accept[yy_current_state] ) { (yy_last_accepting_state) = yy_current_state; (yy_last_accepting_cpos) = yy_cp; } while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; if ( yy_current_state >= 3943 ) yy_c = yy_meta[yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; } return yy_current_state; } /* yy_try_NUL_trans - try to make a transition on the NUL character * * synopsis * next_state = yy_try_NUL_trans( current_state ); */ /* %if-c-only */ static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state ) /* %endif */ /* %if-c++-only */ /* %endif */ { int yy_is_jam; /* %% [17.0] code to find the next state, and perhaps do backing up, goes here */ char *yy_cp = (yy_c_buf_p); YY_CHAR yy_c = 1; if ( yy_accept[yy_current_state] ) { (yy_last_accepting_state) = yy_current_state; (yy_last_accepting_cpos) = yy_cp; } while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; if ( yy_current_state >= 3943 ) yy_c = yy_meta[yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; yy_is_jam = (yy_current_state == 3942); return yy_is_jam ? 0 : yy_current_state; } #ifndef YY_NO_UNPUT /* %if-c-only */ /* %endif */ #endif /* %if-c-only */ #ifndef YY_NO_INPUT #ifdef __cplusplus static int yyinput (void) #else static int input (void) #endif /* %endif */ /* %if-c++-only */ /* %endif */ { int c; *(yy_c_buf_p) = (yy_hold_char); if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR ) { /* yy_c_buf_p now points to the character we want to return. * If this occurs *before* the EOB characters, then it's a * valid NUL; if not, then we've hit the end of the buffer. */ if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) /* This was really a NUL. */ *(yy_c_buf_p) = '\0'; else { /* need more input */ int offset = (int) ((yy_c_buf_p) - (yytext_ptr)); ++(yy_c_buf_p); switch ( yy_get_next_buffer( ) ) { case EOB_ACT_LAST_MATCH: /* This happens because yy_g_n_b() * sees that we've accumulated a * token and flags that we need to * try matching the token before * proceeding. But for input(), * there's no matching to consider. * So convert the EOB_ACT_LAST_MATCH * to EOB_ACT_END_OF_FILE. */ /* Reset buffer status. */ yyrestart( yyin ); /*FALLTHROUGH*/ case EOB_ACT_END_OF_FILE: { if ( yywrap( ) ) return 0; if ( ! (yy_did_buffer_switch_on_eof) ) YY_NEW_FILE; #ifdef __cplusplus return yyinput(); #else return input(); #endif } case EOB_ACT_CONTINUE_SCAN: (yy_c_buf_p) = (yytext_ptr) + offset; break; } } } c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */ *(yy_c_buf_p) = '\0'; /* preserve yytext */ (yy_hold_char) = *++(yy_c_buf_p); /* %% [19.0] update BOL and yylineno */ return c; } /* %if-c-only */ #endif /* ifndef YY_NO_INPUT */ /* %endif */ /** Immediately switch to a different input stream. * @param input_file A readable stream. * * @note This function does not reset the start condition to @c INITIAL . */ /* %if-c-only */ void yyrestart (FILE * input_file ) /* %endif */ /* %if-c++-only */ /* %endif */ { if ( ! YY_CURRENT_BUFFER ){ yyensure_buffer_stack (); YY_CURRENT_BUFFER_LVALUE = yy_create_buffer( yyin, YY_BUF_SIZE ); } yy_init_buffer( YY_CURRENT_BUFFER, input_file ); yy_load_buffer_state( ); } /* %if-c++-only */ /* %endif */ /** Switch to a different input buffer. * @param new_buffer The new input buffer. * */ /* %if-c-only */ void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ) /* %endif */ /* %if-c++-only */ /* %endif */ { /* TODO. We should be able to replace this entire function body * with * yypop_buffer_state(); * yypush_buffer_state(new_buffer); */ yyensure_buffer_stack (); if ( YY_CURRENT_BUFFER == new_buffer ) return; if ( YY_CURRENT_BUFFER ) { /* Flush out information for old buffer. */ *(yy_c_buf_p) = (yy_hold_char); YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); } YY_CURRENT_BUFFER_LVALUE = new_buffer; yy_load_buffer_state( ); /* We don't actually know whether we did this switch during * EOF (yywrap()) processing, but the only time this flag * is looked at is after yywrap() is called, so it's safe * to go ahead and always set it. */ (yy_did_buffer_switch_on_eof) = 1; } /* %if-c-only */ static void yy_load_buffer_state (void) /* %endif */ /* %if-c++-only */ /* %endif */ { (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; /* %if-c-only */ yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; /* %endif */ /* %if-c++-only */ /* %endif */ (yy_hold_char) = *(yy_c_buf_p); } /** Allocate and initialize an input buffer state. * @param file A readable stream. * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. * * @return the allocated buffer state. */ /* %if-c-only */ YY_BUFFER_STATE yy_create_buffer (FILE * file, int size ) /* %endif */ /* %if-c++-only */ /* %endif */ { YY_BUFFER_STATE b; b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) ); if ( ! b ) YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); b->yy_buf_size = size; /* yy_ch_buf has to be 2 characters longer than the size given because * we need to put in 2 end-of-buffer characters. */ b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) ); if ( ! b->yy_ch_buf ) YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); b->yy_is_our_buffer = 1; yy_init_buffer( b, file ); return b; } /* %if-c++-only */ /* %endif */ /** Destroy the buffer. * @param b a buffer created with yy_create_buffer() * */ /* %if-c-only */ void yy_delete_buffer (YY_BUFFER_STATE b ) /* %endif */ /* %if-c++-only */ /* %endif */ { if ( ! b ) return; if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; if ( b->yy_is_our_buffer ) yyfree( (void *) b->yy_ch_buf ); yyfree( (void *) b ); } /* Initializes or reinitializes a buffer. * This function is sometimes called more than once on the same buffer, * such as during a yyrestart() or at EOF. */ /* %if-c-only */ static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file ) /* %endif */ /* %if-c++-only */ /* %endif */ { int oerrno = errno; yy_flush_buffer( b ); /* %if-c-only */ b->yy_input_file = file; /* %endif */ /* %if-c++-only */ /* %endif */ b->yy_fill_buffer = 1; /* If b is the current buffer, then yy_init_buffer was _probably_ * called from yyrestart() or through yy_get_next_buffer. * In that case, we don't want to reset the lineno or column. */ if (b != YY_CURRENT_BUFFER){ b->yy_bs_lineno = 1; b->yy_bs_column = 0; } /* %if-c-only */ b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; /* %endif */ /* %if-c++-only */ /* %endif */ errno = oerrno; } /** Discard all buffered characters. On the next scan, YY_INPUT will be called. * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. * */ /* %if-c-only */ void yy_flush_buffer (YY_BUFFER_STATE b ) /* %endif */ /* %if-c++-only */ /* %endif */ { if ( ! b ) return; b->yy_n_chars = 0; /* We always need two end-of-buffer characters. The first causes * a transition to the end-of-buffer state. The second causes * a jam in that state. */ b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; b->yy_buf_pos = &b->yy_ch_buf[0]; b->yy_at_bol = 1; b->yy_buffer_status = YY_BUFFER_NEW; if ( b == YY_CURRENT_BUFFER ) yy_load_buffer_state( ); } /* %if-c-or-c++ */ /** Pushes the new state onto the stack. The new state becomes * the current state. This function will allocate the stack * if necessary. * @param new_buffer The new state. * */ /* %if-c-only */ void yypush_buffer_state (YY_BUFFER_STATE new_buffer ) /* %endif */ /* %if-c++-only */ /* %endif */ { if (new_buffer == NULL) return; yyensure_buffer_stack(); /* This block is copied from yy_switch_to_buffer. */ if ( YY_CURRENT_BUFFER ) { /* Flush out information for old buffer. */ *(yy_c_buf_p) = (yy_hold_char); YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); } /* Only push if top exists. Otherwise, replace top. */ if (YY_CURRENT_BUFFER) (yy_buffer_stack_top)++; YY_CURRENT_BUFFER_LVALUE = new_buffer; /* copied from yy_switch_to_buffer. */ yy_load_buffer_state( ); (yy_did_buffer_switch_on_eof) = 1; } /* %endif */ /* %if-c-or-c++ */ /** Removes and deletes the top of the stack, if present. * The next element becomes the new top. * */ /* %if-c-only */ void yypop_buffer_state (void) /* %endif */ /* %if-c++-only */ /* %endif */ { if (!YY_CURRENT_BUFFER) return; yy_delete_buffer(YY_CURRENT_BUFFER ); YY_CURRENT_BUFFER_LVALUE = NULL; if ((yy_buffer_stack_top) > 0) --(yy_buffer_stack_top); if (YY_CURRENT_BUFFER) { yy_load_buffer_state( ); (yy_did_buffer_switch_on_eof) = 1; } } /* %endif */ /* %if-c-or-c++ */ /* Allocates the stack if it does not exist. * Guarantees space for at least one push. */ /* %if-c-only */ static void yyensure_buffer_stack (void) /* %endif */ /* %if-c++-only */ /* %endif */ { yy_size_t num_to_alloc; if (!(yy_buffer_stack)) { /* First allocation is just for 2 elements, since we don't know if this * scanner will even need a stack. We use 2 instead of 1 to avoid an * immediate realloc on the next call. */ num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */ (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc (num_to_alloc * sizeof(struct yy_buffer_state*) ); if ( ! (yy_buffer_stack) ) YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*)); (yy_buffer_stack_max) = num_to_alloc; (yy_buffer_stack_top) = 0; return; } if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){ /* Increase the buffer to prepare for a possible push. */ yy_size_t grow_size = 8 /* arbitrary grow size */; num_to_alloc = (yy_buffer_stack_max) + grow_size; (yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc ((yy_buffer_stack), num_to_alloc * sizeof(struct yy_buffer_state*) ); if ( ! (yy_buffer_stack) ) YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); /* zero only the new slots.*/ memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*)); (yy_buffer_stack_max) = num_to_alloc; } } /* %endif */ /* %if-c-only */ /** Setup the input buffer state to scan directly from a user-specified character buffer. * @param base the character buffer * @param size the size in bytes of the character buffer * * @return the newly allocated buffer state object. */ YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size ) { YY_BUFFER_STATE b; if ( size < 2 || base[size-2] != YY_END_OF_BUFFER_CHAR || base[size-1] != YY_END_OF_BUFFER_CHAR ) /* They forgot to leave room for the EOB's. */ return NULL; b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) ); if ( ! b ) YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" ); b->yy_buf_size = (int) (size - 2); /* "- 2" to take care of EOB's */ b->yy_buf_pos = b->yy_ch_buf = base; b->yy_is_our_buffer = 0; b->yy_input_file = NULL; b->yy_n_chars = b->yy_buf_size; b->yy_is_interactive = 0; b->yy_at_bol = 1; b->yy_fill_buffer = 0; b->yy_buffer_status = YY_BUFFER_NEW; yy_switch_to_buffer( b ); return b; } /* %endif */ /* %if-c-only */ /** Setup the input buffer state to scan a string. The next call to yylex() will * scan from a @e copy of @a str. * @param yystr a NUL-terminated string to scan * * @return the newly allocated buffer state object. * @note If you want to scan bytes that may contain NUL values, then use * yy_scan_bytes() instead. */ YY_BUFFER_STATE yy_scan_string (const char * yystr ) { return yy_scan_bytes( yystr, (int) strlen(yystr) ); } /* %endif */ /* %if-c-only */ /** Setup the input buffer state to scan the given bytes. The next call to yylex() will * scan from a @e copy of @a bytes. * @param yybytes the byte buffer to scan * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes. * * @return the newly allocated buffer state object. */ YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, int _yybytes_len ) { YY_BUFFER_STATE b; char *buf; yy_size_t n; int i; /* Get memory for full buffer, including space for trailing EOB's. */ n = (yy_size_t) (_yybytes_len + 2); buf = (char *) yyalloc( n ); if ( ! buf ) YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); for ( i = 0; i < _yybytes_len; ++i ) buf[i] = yybytes[i]; buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; b = yy_scan_buffer( buf, n ); if ( ! b ) YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" ); /* It's okay to grow etc. this buffer, and we should throw it * away when we're done. */ b->yy_is_our_buffer = 1; return b; } /* %endif */ #ifndef YY_EXIT_FAILURE #define YY_EXIT_FAILURE 2 #endif /* %if-c-only */ static void yynoreturn yy_fatal_error (const char* msg ) { fprintf( stderr, "%s\n", msg ); exit( YY_EXIT_FAILURE ); } /* %endif */ /* %if-c++-only */ /* %endif */ /* Redefine yyless() so it works in section 3 code. */ #undef yyless #define yyless(n) \ do \ { \ /* Undo effects of setting up yytext. */ \ int yyless_macro_arg = (n); \ YY_LESS_LINENO(yyless_macro_arg);\ yytext[yyleng] = (yy_hold_char); \ (yy_c_buf_p) = yytext + yyless_macro_arg; \ (yy_hold_char) = *(yy_c_buf_p); \ *(yy_c_buf_p) = '\0'; \ yyleng = yyless_macro_arg; \ } \ while ( 0 ) /* Accessor methods (get/set functions) to struct members. */ /* %if-c-only */ /* %if-reentrant */ /* %endif */ /** Get the current line number. * */ int yyget_lineno (void) { return yylineno; } /** Get the input stream. * */ FILE *yyget_in (void) { return yyin; } /** Get the output stream. * */ FILE *yyget_out (void) { return yyout; } /** Get the length of the current token. * */ int yyget_leng (void) { return yyleng; } /** Get the current token. * */ char *yyget_text (void) { return yytext; } /* %if-reentrant */ /* %endif */ /** Set the current line number. * @param _line_number line number * */ void yyset_lineno (int _line_number ) { yylineno = _line_number; } /** Set the input stream. This does not discard the current * input buffer. * @param _in_str A readable stream. * * @see yy_switch_to_buffer */ void yyset_in (FILE * _in_str ) { yyin = _in_str ; } void yyset_out (FILE * _out_str ) { yyout = _out_str ; } int yyget_debug (void) { return yy_flex_debug; } void yyset_debug (int _bdebug ) { yy_flex_debug = _bdebug ; } /* %endif */ /* %if-reentrant */ /* %if-bison-bridge */ /* %endif */ /* %endif if-c-only */ /* %if-c-only */ static int yy_init_globals (void) { /* Initialization is the same as for the non-reentrant scanner. * This function is called from yylex_destroy(), so don't allocate here. */ (yy_buffer_stack) = NULL; (yy_buffer_stack_top) = 0; (yy_buffer_stack_max) = 0; (yy_c_buf_p) = NULL; (yy_init) = 0; (yy_start) = 0; /* Defined in main.c */ #ifdef YY_STDINIT yyin = stdin; yyout = stdout; #else yyin = NULL; yyout = NULL; #endif /* For future reference: Set errno on error, since we are called by * yylex_init() */ return 0; } /* %endif */ /* %if-c-only SNIP! this currently causes conflicts with the c++ scanner */ /* yylex_destroy is for both reentrant and non-reentrant scanners. */ int yylex_destroy (void) { /* Pop the buffer stack, destroying each element. */ while(YY_CURRENT_BUFFER){ yy_delete_buffer( YY_CURRENT_BUFFER ); YY_CURRENT_BUFFER_LVALUE = NULL; yypop_buffer_state(); } /* Destroy the stack itself. */ yyfree((yy_buffer_stack) ); (yy_buffer_stack) = NULL; /* Reset the globals. This is important in a non-reentrant scanner so the next time * yylex() is called, initialization will occur. */ yy_init_globals( ); /* %if-reentrant */ /* %endif */ return 0; } /* %endif */ /* * Internal utility routines. */ #ifndef yytext_ptr static void yy_flex_strncpy (char* s1, const char * s2, int n ) { int i; for ( i = 0; i < n; ++i ) s1[i] = s2[i]; } #endif #ifdef YY_NEED_STRLEN static int yy_flex_strlen (const char * s ) { int n; for ( n = 0; s[n]; ++n ) ; return n; } #endif void *yyalloc (yy_size_t size ) { return malloc(size); } void *yyrealloc (void * ptr, yy_size_t size ) { /* The cast to (char *) in the following accommodates both * implementations that use char* generic pointers, and those * that use void* generic pointers. It works with the latter * because both ANSI C and C++ allow castless assignment from * any pointer type to void*, and deal with argument conversions * as though doing an assignment. */ return realloc(ptr, size); } void yyfree (void * ptr ) { free( (char *) ptr ); /* see yyrealloc() for (char *) cast */ } /* %if-tables-serialization definitions */ /* %define-yytables The name for this specific scanner's tables. */ #define YYTABLES_NAME "yytables" /* %endif */ /* %ok-for-header */ #line 1334 "seclang-scanner.ll" namespace modsecurity { bool Driver::scan_begin () { yy_flex_debug = trace_scanning; if (buffer.empty() == false) { yy_scan_string(buffer.c_str()); return true; } return false; } void Driver::scan_end () { yylex_destroy(); BEGIN(INITIAL); } } modsecurity-v3.0.6/src/parser/seclang-scanner.ll0000775000175000017500000032244214146026157023076 0ustar mhsvierulamhsvierula%{ /* -*- C++ -*- */ #include #include #include #include #include "src/parser/driver.h" #include "src/parser/seclang-parser.hh" #include "src/utils/https_client.h" #include "src/utils/string.h" using modsecurity::Parser::Driver; using modsecurity::Utils::HttpsClient; using modsecurity::utils::string::parserSanitizer; typedef yy::seclang_parser p; static int state_variable_from = 0; static std::stack YY_PREVIOUS_STATE; // Work around an incompatibility in flex (at least versions // 2.5.31 through 2.5.33): it generates code that does // not conform to C89. See Debian bug 333231 // . # undef yywrap # define yywrap() 1 #define BEGINX(z) { \ YY_PREVIOUS_STATE.push(YY_START); \ BEGIN(z); \ } #define BEGINX_() { \ YY_PREVIOUS_STATE.push(YY_START); \ if (YY_START == SETVAR_ACTION_NONQUOTED) { \ BEGIN(EXPECTING_VAR_PARAMETER_OR_MACRO_NONQUOTED); \ } else if (YY_START == SETVAR_ACTION_QUOTED) { \ BEGIN(EXPECTING_VAR_PARAMETER_OR_MACRO_QUOTED); \ } else { \ BEGIN(EXPECTING_VAR_PARAMETER); \ } \ } #define BEGIN_PARAMETER() { if (YY_START == EXPECTING_OPERATOR_ENDS_WITH_SPACE) { BEGIN(TRANSITION_FROM_OP_TO_EXPECTING_PARAMETER_ENDS_WITH_SPACE); } else { BEGIN(TRANSITION_FROM_OP_TO_EXPECTING_PARAMETER_ENDS_WITH_QUOTE); } } #define BEGIN_NO_OP_INFORMED() { if (YY_START == EXPECTING_OPERATOR_ENDS_WITH_SPACE) { BEGIN(NO_OP_INFORMED_ENDS_WITH_SPACE); } else { BEGIN(NO_OP_INFORMED_ENDS_WITH_QUOTE); } } #define BEGIN_ACTION_OPERATION() { \ if (YY_START == SETVAR_ACTION_NONQUOTED) { \ BEGIN(SETVAR_ACTION_NONQUOTED_WAITING_OPERATION); \ } else if (YY_START == SETVAR_ACTION_QUOTED) { \ BEGIN(SETVAR_ACTION_QUOTED_WAITING_OPERATION); \ } else if (YY_START == SETVAR_ACTION_NONQUOTED_WAITING_COLLECTION_ELEM) { \ BEGIN(SETVAR_ACTION_NONQUOTED_WAITING_OPERATION); \ } else if (YY_START == SETVAR_ACTION_QUOTED_WAITING_COLLECTION_ELEM) { \ BEGIN(SETVAR_ACTION_QUOTED_WAITING_OPERATION); \ }\ } #define BEGIN_ACTION_WAITING_CONTENT() { \ if (YY_START == SETVAR_ACTION_NONQUOTED_WAITING_OPERATION) { \ BEGIN(SETVAR_ACTION_NONQUOTED_WAITING_CONTENT); \ } else if (YY_START == SETVAR_ACTION_QUOTED_WAITING_OPERATION) { \ BEGIN(SETVAR_ACTION_QUOTED_WAITING_CONTENT); \ } else if (YY_START == EXPECTING_VAR_PARAMETER_OR_MACRO_QUOTED) { \ BEGIN(SETVAR_ACTION_QUOTED_WAITING_CONTENT); \ } else if (YY_START == EXPECTING_VAR_PARAMETER_OR_MACRO_NONQUOTED) { \ BEGIN(SETVAR_ACTION_NONQUOTED_WAITING_CONTENT); \ } \ } #define BEGIN_PREVIOUS() { BEGIN(YY_PREVIOUS_STATE.top()); YY_PREVIOUS_STATE.pop(); } // The location of the current token. %} %option noyywrap nounput batch debug noinput ACTION_ACCURACY (?i:accuracy) ACTION_ALLOW ((?i:allow:(?i:REQUEST|PHASE))|(?i:phase:'(?i:REQUEST|PHASE)')|(?i:allow)) ACTION_APPEND (?i:append) ACTION_AUDIT_LOG (?i:auditlog) ACTION_BLOCK (?i:block) ACTION_CAPTURE (?i:capture) ACTION_CHAIN (?i:chain) ACTION_CTL_AUDIT_ENGINE (?i:ctl:auditEngine) ACTION_CTL_AUDIT_LOG_PARTS (?i:ctl:auditLogParts) ACTION_CTL_BDY_JSON (?i:ctl:requestBodyProcessor=JSON) ACTION_CTL_BDY_XML (?i:ctl:requestBodyProcessor=XML) ACTION_CTL_BDY_URLENCODED (?i:ctl:requestBodyProcessor=URLENCODED) ACTION_CTL_FORCE_REQ_BODY_VAR (?i:ctl:forceRequestBodyVariable) ACTION_CTL_REQUEST_BODY_ACCESS (?i:ctl:requestBodyAccess) ACTION_CTL_RULE_ENGINE (?i:ctl:ruleEngine) ACTION_CTL_RULE_REMOVE_BY_TAG (?i:ctl:ruleRemoveByTag) ACTION_CTL_RULE_REMOVE_BY_ID (?i:ctl:ruleRemoveById) ACTION_CTL_RULE_REMOVE_TARGET_BY_ID (?i:ctl:ruleRemoveTargetById) ACTION_CTL_RULE_REMOVE_TARGET_BY_TAG (?i:ctl:ruleRemoveTargetByTag) ACTION_DENY (?i:deny) ACTION_DEPRECATE_VAR (?i:deprecatevar) ACTION_DROP (?i:drop) ACTION_EXEC (?i:exec) ACTION_EXPIRE_VAR (?i:expirevar) ACTION_ID (?i:id:[0-9]+|id:'[0-9]+') ACTION_INITCOL (?i:initcol) ACTION_LOG_DATA (?i:logdata) ACTION_LOG (?i:log) ACTION_MATURITY (?i:maturity) ACTION_MSG (?i:msg) ACTION_MULTI_MATCH (?i:multiMatch) ACTION_NO_AUDIT_LOG (?i:noauditlog) ACTION_NO_LOG (?i:nolog) ACTION_PASS (?i:pass) ACTION_PAUSE (?i:pause) ACTION_PHASE ((?i:phase:(?i:REQUEST|RESPONSE|LOGGING|[0-9]+))|(?i:phase:'(?i:REQUEST|RESPONSE|LOGGING|[0-9]+)')) ACTION_PREPEND (?i:prepend) ACTION_PROXY (?i:proxy) ACTION_REDIRECT (?i:redirect) ACTION_REV (?i:rev) ACTION_SANITISE_ARG (?i:sanitiseArg) ACTION_SANITISE_MATCHED_BYTES (?i:sanitiseMatchedBytes) ACTION_SANITISE_MATCHED (?i:sanitiseMatched) ACTION_SANITISE_REQUEST_HEADER (?i:sanitiseRequestHeader) ACTION_SANITISE_RESPONSE_HEADER (?i:sanitiseResponseHeader) ACTION_SETENV (?i:setenv) ACTION_SETRSC (?i:setrsc) ACTION_SETSID (?i:setsid) ACTION_SETUID (?i:setuid) ACTION_SETVAR (?i:setvar) ACTION_SEVERITY (?i:severity) ACTION_SEVERITY_VALUE (?i:(EMERGENCY|ALERT|CRITICAL|ERROR|WARNING|NOTICE|INFO|DEBUG)|[0-9]+) ACTION_SKIP_AFTER (?i:skipAfter) ACTION_SKIP (?i:skip) ACTION_STATUS (?i:status:[0-9]+) ACTION_TAG (?i:tag) ACTION_VER (?i:ver) ACTION_XMLNS (?i:xmlns) ACTION_TRANSFORMATION_BASE_64_ENCODE (?i:t:base64Encode) ACTION_TRANSFORMATION_BASE_64_DECODE (?i:t:base64Decode) ACTION_TRANSFORMATION_BASE_64_DECODE_EXT (?i:t:base64DecodeExt) ACTION_TRANSFORMATION_CMD_LINE (?i:t:cmdLine) ACTION_TRANSFORMATION_COMPRESS_WHITESPACE (?i:t:compressWhitespace) ACTION_TRANSFORMATION_ESCAPE_SEQ_DECODE (?i:t:escapeSeqDecode) ACTION_TRANSFORMATION_CSS_DECODE (?i:t:cssDecode) ACTION_TRANSFORMATION_HEX_ENCODE (?i:t:hexEncode) ACTION_TRANSFORMATION_HEX_DECODE (?i:t:hexDecode) ACTION_TRANSFORMATION_HTML_ENTITY_DECODE (?i:t:htmlEntityDecode) ACTION_TRANSFORMATION_JS_DECODE (?i:t:jsDecode) ACTION_TRANSFORMATION_LENGTH (?i:t:length) ACTION_TRANSFORMATION_LOWERCASE (?i:t:lowercase) ACTION_TRANSFORMATION_MD5 (?i:t:md5) ACTION_TRANSFORMATION_NONE (?i:t:none) ACTION_TRANSFORMATION_NORMALISE_PATH (?i:t:(normalisePath|normalizePath)) ACTION_TRANSFORMATION_NORMALISE_PATH_WIN (?i:t:(normalisePathWin|normalizePathWin)) ACTION_TRANSFORMATION_PARITY_EVEN_7_BIT (?i:t:parityEven7bit) ACTION_TRANSFORMATION_PARITY_ODD_7_BIT (?i:t:parityOdd7bit) ACTION_TRANSFORMATION_PARITY_ZERO_7_BIT (?i:t:parityZero7bit) ACTION_TRANSFORMATION_REMOVE_COMMENTS (?i:t:removeComments) ACTION_TRANSFORMATION_REMOVE_COMMENTS_CHAR (?i:t:removeCommentsChar) ACTION_TRANSFORMATION_REMOVE_NULLS (?i:t:removeNulls) ACTION_TRANSFORMATION_REMOVE_WHITESPACE (?i:t:removeWhitespace) ACTION_TRANSFORMATION_REPLACE_COMMENTS (?i:t:replaceComments) ACTION_TRANSFORMATION_REPLACE_NULLS (?i:t:replaceNulls) ACTION_TRANSFORMATION_SHA1 (?i:t:sha1) ACTION_TRANSFORMATION_SQL_HEX_DECODE (?i:t:sqlHexDecode) ACTION_TRANSFORMATION_TRIM (?i:t:trim) ACTION_TRANSFORMATION_TRIM_LEFT (?i:t:trimLeft) ACTION_TRANSFORMATION_TRIM_RIGHT (?i:t:trimRight) ACTION_TRANSFORMATION_UPPERCASE (?i:t:uppercase) ACTION_TRANSFORMATION_URL_ENCODE (?i:t:urlEncode) ACTION_TRANSFORMATION_URL_DECODE (?i:t:urlDecode) ACTION_TRANSFORMATION_URL_DECODE_UNI (?i:t:urlDecodeUni) ACTION_TRANSFORMATION_UTF8_TO_UNICODE (?i:t:utf8toUnicode) VARIABLE_ARGS_COMBINED_SIZE (?i:ARGS_COMBINED_SIZE) VARIABLE_ARGS_GET_NAMES (?i:ARGS_GET_NAMES) VARIABLE_ARGS_NAMES (?i:ARGS_NAMES) VARIABLE_ARGS_POST_NAMES (?i:ARGS_POST_NAMES) VARIABLE_AUTH_TYPE (?i:AUTH_TYPE) VARIABLE_FILES_COMBINED_SIZE (?i:FILES_COMBINED_SIZE) VARIABLE_FILES_TMP_NAMES (?i:FILES_TMPNAMES) VARIABLE_FULL_REQUEST (?i:FULL_REQUEST) VARIABLE_FULL_REQUEST_LENGTH (?i:FULL_REQUEST_LENGTH) VARIABLE_GLOBAL (?i:GLOBAL) VARIABLE_INBOUND_DATA_ERROR (?i:INBOUND_DATA_ERROR) VARIABLE_MATCHED_VAR (?i:MATCHED_VAR) VARIABLE_MATCHED_VAR_NAME (?i:MATCHED_VAR_NAME) VARIABLE_MULTIPART_BOUNDARY_QUOTED (?i:MULTIPART_BOUNDARY_QUOTED) VARIABLE_MULTIPART_BOUNDARY_WHITESPACE (?i:MULTIPART_BOUNDARY_WHITESPACE) VARIABLE_MULTIPART_CRLF_LF_LINES (?i:MULTIPART_CRLF_LF_LINES) VARIABLE_MULTIPART_DATA_AFTER (?i:MULTIPART_DATA_AFTER) VARIABLE_MULTIPART_DATA_BEFORE (?i:MULTIPART_DATA_BEFORE) VARIABLE_MULTIPART_FILE_LIMIT_EXCEEDED (?i:MULTIPART_FILE_LIMIT_EXCEEDED) VARIABLE_MULTIPART_FILENAME (?i:MULTIPART_FILENAME) VARIABLE_MULTIPART_HEADER_FOLDING (?i:MULTIPART_HEADER_FOLDING) VARIABLE_MULTIPART_INVALID_HEADER_FOLDING (?i:MULTIPART_INVALID_HEADER_FOLDING) VARIABLE_MULTIPART_INVALID_PART (?i:MULTIPART_INVALID_PART) VARIABLE_MULTIPART_INVALID_QUOTING (?i:MULTIPART_INVALID_QUOTING) VARIABLE_MULTIPART_LF_LINE (?i:MULTIPART_LF_LINE) VARIABLE_MULTIPART_MISSING_SEMICOLON (?i:MULTIPART_MISSING_SEMICOLON) VARIABLE_MULTIPART_SEMICOLON_MISSING (?i:MULTIPART_SEMICOLON_MISSING) VARIABLE_MULTIPART_NAME (?i:MULTIPART_NAME) VARIABLE_MULTIPART_STRICT_ERROR (?i:MULTIPART_STRICT_ERROR) VARIABLE_MULTIPART_UNMATCHED_BOUNDARY (?i:MULTIPART_UNMATCHED_BOUNDARY) VARIABLE_OUTBOUND_DATA_ERROR (?i:OUTBOUND_DATA_ERROR) VARIABLE_PATH_INFO (?i:PATH_INFO) VARIABLE_QUERY_STRING (?i:QUERY_STRING) VARIABLE_REMOTE_ADDR (?i:REMOTE_ADDR) VARIABLE_REMOTE_HOST (?i:REMOTE_HOST) VARIABLE_REMOTE_PORT (?i:REMOTE_PORT) VARIABLE_REQBODY_ERROR (?i:REQBODY_ERROR) VARIABLE_REQBODY_ERROR_MSG (?i:REQBODY_ERROR_MSG) VARIABLE_REQBODY_PROCESSOR_ERROR (?i:REQBODY_PROCESSOR_ERROR) VARIABLE_REQBODY_PROCESSOR_ERROR_MSG (?i:REQBODY_PROCESSOR_ERROR_MSG) VARIABLE_REQBODY_PROCESSOR (?i:REQBODY_PROCESSOR) VARIABLE_REQUEST_BASENAME (?i:REQUEST_BASENAME) VARIABLE_REQUEST_BODY (?i:REQUEST_BODY) VARIABLE_REQUEST_BODY_LENGTH (?i:REQUEST_BODY_LENGTH) VARIABLE_REQUEST_FILE_NAME (?i:REQUEST_FILENAME) VARIABLE_REQUEST_HEADERS_NAMES (?i:REQUEST_HEADERS_NAMES) VARIABLE_REQUEST_LINE (?i:REQUEST_LINE) VARIABLE_REQUEST_METHOD (?i:REQUEST_METHOD) VARIABLE_REQUEST_PROTOCOL (?i:REQUEST_PROTOCOL) VARIABLE_REQUEST_URI (?i:REQUEST_URI) VARIABLE_REQUEST_URI_RAW (?i:REQUEST_URI_RAW) VARIABLE_RESOURCE (?i:RESOURCE) VARIABLE_RESPONSE_BODY (?i:RESPONSE_BODY) VARIABLE_RESPONSE_CONTENT_LENGTH (?i:RESPONSE_CONTENT_LENGTH) VARIABLE_RESPONSE_CONTENT_TYPE (?i:RESPONSE_CONTENT_TYPE) VARIABLE_RESPONSE_HEADERS_NAMES (?i:RESPONSE_HEADERS_NAMES) VARIABLE_RESPONSE_PROTOCOL (?i:RESPONSE_PROTOCOL) VARIABLE_RESPONSE_STATUS (?i:RESPONSE_STATUS) VARIABLE_SERVER_ADDR (?i:SERVER_ADDR) VARIABLE_SERVER_NAME (?i:SERVER_NAME) VARIABLE_SERVER_PORT (?i:SERVER_PORT) VARIABLE_SESSION_ID (?i:SESSIONID) VARIABLE_UNIQUE_ID (?i:UNIQUE_ID) VARIABLE_URL_ENCODED_ERROR (?i:URLENCODED_ERROR) VARIABLE_USER_ID (?i:USERID) VARIABLE_WEBSERVER_ERROR_LOG (?i:WEBSERVER_ERROR_LOG) VARIABLE_ARGS (?i:ARGS) VARIABLE_ARGS_POST (?i:ARGS_POST) VARIABLE_ARGS_GET (?i:ARGS_GET) VARIABLE_FILES_SIZES (?i:FILES_SIZES) VARIABLE_FILES_NAMES (?i:FILES_NAMES) VARIABLE_FILES_TMP_CONTENT (?i:FILES_TMP_CONTENT) VARIABLE_MATCHED_VARS_NAMES (?i:MATCHED_VARS_NAMES) VARIABLE_MATCHED_VARS (?i:MATCHED_VARS) VARIABLE_FILES (?i:FILES) VARIABLE_REQUEST_COOKIES (?i:REQUEST_COOKIES) VARIABLE_REQUEST_HEADERS (?i:REQUEST_HEADERS) VARIABLE_RESPONSE_HEADERS (?i:RESPONSE_HEADERS) VARIABLE_GEO (?i:GEO) VARIABLE_REQUEST_COOKIES_NAMES (?i:REQUEST_COOKIES_NAMES) VARIABLE_RULE (?i:RULE) VARIABLE_SESSION (?i:(SESSION)) VARIABLE_IP (?i:(IP)) VARIABLE_USER (?i:(USER)) VARIABLE_STATUS (?i:(STATUS)) VARIABLE_STATUS_LINE (?i:(STATUS_LINE)) VARIABLE_TX (?i:TX) VARIABLE_WEB_APP_ID (?i:WEBAPPID) RUN_TIME_VAR_BLD (?i:MODSEC_BUILD) RUN_TIME_VAR_DUR (?i:DURATION) RUN_TIME_VAR_ENV (?i:ENV) RUN_TIME_VAR_HSV (?i:HIGHEST_SEVERITY) RUN_TIME_VAR_REMOTE_USER (?i:REMOTE_USER) RUN_TIME_VAR_TIME (?i:TIME) RUN_TIME_VAR_TIME_DAY (?i:TIME_DAY) RUN_TIME_VAR_TIME_EPOCH (?i:TIME_EPOCH) RUN_TIME_VAR_TIME_HOUR (?i:TIME_HOUR) RUN_TIME_VAR_TIME_MIN (?i:TIME_MIN) RUN_TIME_VAR_TIME_MON (?i:TIME_MON) RUN_TIME_VAR_TIME_SEC (?i:TIME_SEC) RUN_TIME_VAR_TIME_WDAY (?i:TIME_WDAY) RUN_TIME_VAR_TIME_YEAR (?i:TIME_YEAR) RUN_TIME_VAR_XML (?i:XML) VAR_EXCLUSION ! VAR_COUNT & OPERATOR_BEGINS_WITH (?i:@beginsWith) OPERATOR_CONTAINS (?i:@contains) OPERATOR_CONTAINS_WORD (?i:@containsWord) OPERATOR_DETECT_SQLI (?i:@detectSQLi) OPERATOR_DETECT_XSS (?i:@detectXSS) OPERATOR_ENDS_WITH (?i:@endsWith) OPERATOR_EQ (?i:@eq) OPERATOR_FUZZY_HASH (?i:@fuzzyHash) OPERATOR_GE (?i:@ge) OPERATOR_GEOLOOKUP (?i:@geoLookup) OPERATOR_GSB_LOOKUP (?i:@gsbLookup) OPERATOR_GT (?i:@gt) OPERATOR_INSPECT_FILE (?i:@inspectFile) OPERATOR_IP_MATCH_FROM_FILE (?i:(@ipMatchF|@ipMatchFromFile)) OPERATOR_IP_MATCH (?i:@ipMatch) OPERATOR_LE (?i:@le) OPERATOR_LT (?i:@lt) OPERATOR_PM_FROM_FILE (?i:(@pmf|@pmFromFile)) OPERATOR_PM (?i:@pm) OPERATOR_RBL (?i:@rbl) OPERATOR_RSUB (?i:@rsub) OPERATOR_RX (?i:@rx) OPERATOR_RX_GLOBAL (?i:@rxGlobal) OPERATOR_STR_EQ (?i:@streq) OPERATOR_STR_MATCH (?i:@strmatch) OPERATOR_UNCONDITIONAL_MATCH (?i:@unconditionalMatch) OPERATOR_VALIDATE_BYTE_RANGE (?i:@validateByteRange) OPERATOR_VALIDATE_DTD (?i:@validateDTD) OPERATOR_VALIDATE_HASH (?i:@validateHash) OPERATOR_VALIDATE_SCHEMA (?i:@validateSchema) OPERATOR_VALIDATE_URL_ENCODING (?i:@validateUrlEncoding) OPERATOR_VALIDATE_UTF8_ENCODING (?i:@validateUtf8Encoding) OPERATOR_VERIFY_CC (?i:@verifyCC) OPERATOR_VERIFY_CPF (?i:@verifyCPF) OPERATOR_VERIFY_SSN (?i:@verifySSN) OPERATOR_VERIFY_SVNR (?i:@verifySVNR) OPERATOR_WITHIN (?i:@within) AUDIT_PARTS [ABCDEFGHJKIZ]+ COL_FREE_TEXT_SPACE_COMMA ([^,"])+ COL_NAME [A-Za-z]+ CONFIG_COMPONENT_SIG (?i:SecComponentSignature) CONFIG_SEC_SERVER_SIG (?i:SecServerSignature) CONFIG_SEC_WEB_APP_ID (?i:SecWebAppId) CONFIG_SEC_CACHE_TRANSFORMATIONS (?i:SecCacheTransformations) CONFIG_SEC_CHROOT_DIR (?i:SecChrootDir) CONFIG_CONN_ENGINE (?i:SecConnEngine) CONFIG_SEC_HASH_ENGINE (?i:SecHashEngine) CONFIG_SEC_HASH_KEY (?i:SecHashKey) CONFIG_SEC_HASH_PARAM (?i:SecHashParam) CONFIG_SEC_HASH_METHOD_RX (?i:SecHashMethodRx) CONFIG_SEC_HASH_METHOD_PM (?i:SecHashMethodPm) CONFIG_CONTENT_INJECTION (?i:SecContentInjection) CONFIG_SEC_ARGUMENT_SEPARATOR (?i:SecArgumentSeparator) CONFIG_DIR_AUDIT_DIR (?i:SecAuditLogStorageDir) CONFIG_DIR_AUDIT_DIR_MOD (?i:SecAuditLogDirMode) CONFIG_DIR_AUDIT_ENG (?i:SecAuditEngine) CONFIG_DIR_AUDIT_FLE_MOD (?i:SecAuditLogFileMode) CONFIG_DIR_AUDIT_LOG2 (?i:SecAuditLog2) CONFIG_DIR_AUDIT_LOG (?i:SecAuditLog) CONFIG_DIR_AUDIT_LOG_FMT (?i:SecAuditLogFormat) CONFIG_DIR_AUDIT_LOG_P (?i:SecAuditLogParts) CONFIG_DIR_AUDIT_STS (?i:SecAuditLogRelevantStatus) CONFIG_DIR_AUDIT_TPE (?i:SecAuditLogType) CONFIG_DIR_DEBUG_LOG (?i:SecDebugLog) CONFIG_DIR_DEBUG_LVL (?i:SecDebugLogLevel) CONFIG_DIR_GEO_DB (?i:SecGeoLookupDb) CONFIG_DIR_GSB_DB (?i:SecGsbLookupDb) CONFIG_SEC_GUARDIAN_LOG (?i:SecGuardianLog) CONFIG_SEC_INTERCEPT_ON_ERROR (?i:SecInterceptOnError) CONFIG_SEC_CONN_R_STATE_LIMIT (?i:SecConnReadStateLimit) CONFIG_SEC_CONN_W_STATE_LIMIT (?i:SecConnWriteStateLimit) CONFIG_SEC_SENSOR_ID (?i:SecSensorId) CONFIG_SEC_RULE_INHERITANCE (?i:SecRuleInheritance) CONFIG_SEC_RULE_PERF_TIME (?i:SecRulePerfTime) CONFIG_SEC_STREAM_IN_BODY_INSPECTION (?i:SecStreamInBodyInspection) CONFIG_SEC_STREAM_OUT_BODY_INSPECTION (?i:SecStreamOutBodyInspection) CONFIG_DIR_PCRE_MATCH_LIMIT (?i:SecPcreMatchLimit) CONFIG_DIR_PCRE_MATCH_LIMIT_RECURSION (?i:SecPcreMatchLimitRecursion) CONFIG_DIR_ARGS_LIMIT (?i:SecArgumentsLimit) CONFIG_DIR_REQ_BODY_JSON_DEPTH_LIMIT (?i:SecRequestBodyJsonDepthLimit) CONFIG_DIR_REQ_BODY (?i:SecRequestBodyAccess) CONFIG_DIR_REQ_BODY_IN_MEMORY_LIMIT (?i:SecRequestBodyInMemoryLimit) CONFIG_DIR_REQ_BODY_LIMIT (?i:SecRequestBodyLimit) CONFIG_DIR_REQ_BODY_LIMIT_ACTION (?i:SecRequestBodyLimitAction) CONFIG_DIR_REQ_BODY_NO_FILES_LIMIT (?i:SecRequestBodyNoFilesLimit) CONFIG_DIR_RES_BODY (?i:SecResponseBodyAccess) CONFIG_DIR_RES_BODY_LIMIT (?i:SecResponseBodyLimit) CONFIG_DIR_RES_BODY_LIMIT_ACTION (?i:SecResponseBodyLimitAction) CONFIG_DIR_RULE_ENG (?i:SecRuleEngine) CONFIG_DIR_SEC_ACTION (?i:SecAction) CONFIG_DIR_SEC_DEFAULT_ACTION (?i:SecDefaultAction) CONFIG_SEC_DISABLE_BACKEND_COMPRESS (?i:SecDisableBackendCompression) CONFIG_DIR_SEC_MARKER (?i:SecMarker) CONFIG_DIR_UNICODE_MAP_FILE (?i:SecUnicodeMapFile) CONFIG_INCLUDE (?i:Include) CONFIG_SEC_COLLECTION_TIMEOUT (?i:SecCollectionTimeout) CONFIG_SEC_HTTP_BLKEY (?i:SecHttpBlKey) CONFIG_SEC_REMOTE_RULES (?i:SecRemoteRules) CONFIG_SEC_REMOTE_RULES_FAIL_ACTION (?i:SecRemoteRulesFailAction) CONFIG_SEC_REMOVE_RULES_BY_ID (?i:SecRuleRemoveById) CONFIG_SEC_REMOVE_RULES_BY_MSG (?i:SecRuleRemoveByMsg) CONFIG_SEC_REMOVE_RULES_BY_TAG (?i:SecRuleRemoveByTag) CONFIG_SEC_UPDATE_TARGET_BY_TAG (?i:SecRuleUpdateTargetByTag) CONFIG_SEC_UPDATE_TARGET_BY_MSG (?i:SecRuleUpdateTargetByMsg) CONFIG_SEC_UPDATE_TARGET_BY_ID (?i:SecRuleUpdateTargetById) CONFIG_SEC_UPDATE_ACTION_BY_ID (?i:SecRuleUpdateActionById) CONFIG_UPDLOAD_KEEP_FILES (?i:SecUploadKeepFiles) CONFIG_UPDLOAD_SAVE_TMP_FILES (?i:SecTmpSaveUploadedFiles) CONFIG_UPLOAD_DIR (?i:SecUploadDir) CONFIG_UPLOAD_FILE_LIMIT (?i:SecUploadFileLimit) CONFIG_UPLOAD_FILE_MODE (?i:SecUploadFileMode) CONFIG_VALUE_ABORT (?i:Abort) CONFIG_VALUE_DETC (?i:DetectionOnly) CONFIG_VALUE_HTTPS (?i:https) CONFIG_VALUE_NUMBER [0-9]+ CONFIG_VALUE_OFF (?i:Off) CONFIG_VALUE_ON (?i:On) CONFIG_VALUE_PARALLEL (?i:Parallel|Concurrent) CONFIG_VALUE_PATH [0-9A-Za-z_\/\.\-\*\:]+ CONFIG_VALUE_PROCESS_PARTIAL (?i:ProcessPartial) CONFIG_VALUE_REJECT (?i:Reject) CONFIG_VALUE_RELEVANT_ONLY (?i:RelevantOnly) CONFIG_VALUE_SERIAL (?i:Serial) CONFIG_VALUE_WARN (?i:Warn) CONFIG_XML_EXTERNAL_ENTITY (?i:SecXmlExternalEntity) CONGIG_DIR_RESPONSE_BODY_MP (?i:SecResponseBodyMimeType) CONGIG_DIR_RESPONSE_BODY_MP_CLEAR (?i:SecResponseBodyMimeTypesClear) CONGIG_DIR_SEC_ARG_SEP (?i:SecArgumentSeparator) CONGIG_DIR_SEC_COOKIE_FORMAT (?i:SecCookieFormat) CONFIG_SEC_COOKIEV0_SEPARATOR (?i:SecCookieV0Separator) CONGIG_DIR_SEC_DATA_DIR (?i:SecDataDir) CONGIG_DIR_SEC_STATUS_ENGINE (?i:SecStatusEngine) CONGIG_DIR_SEC_TMP_DIR (?i:SecTmpDir) DICT_ELEMENT ([^\"|,\n \t}=]|([^\\]\\\"))+ DICT_ELEMENT_WITH_PIPE [^ =\t"]+ DICT_ELEMENT_NO_PIPE [^ =\|\t"]+ DICT_ELEMENT_NO_MACRO ([^\"|,%{\n \t}=]|([^\\]\\\"))+ DICT_ELEMENT_TWO [^\"\=, \t\r\n\\]* DICT_ELEMENT_TWO_QUOTED [^\"\'\=\r\n\\]* DICT_ELEMENT_TWO2 [A-Za-z_ -\%\{\.\}\-\/]+ DIRECTIVE (?i:SecRule) DIRECTIVE_SECRULESCRIPT (?i:SecRuleScript) FREE_TEXT_NEW_LINE [^\"|\n]+ FREE_TEXT_QUOTE ([^\']|([^\\]\\\'))+ QUOTE_BUT_SCAPED (') DOUBLE_QUOTE_BUT_SCAPED (") COMMA_BUT_SCAPED (,) FREE_TEXT_QUOTE_MACRO_EXPANSION (([^%'])|([^\\][\\][%][{])|([^\\]([\\][\\])+[\\][%][{])|[^\\][\\][']|[^\\]([\\][\\])+[\\]['])+ FREE_TEXT_DOUBLE_QUOTE_MACRO_EXPANSION ((([^"%])|([%][^{]))|([^\\][\\][%][{])|([^\\]([\\][\\])+[\\][%][{])|[^\\][\\]["]|[^\\]([\\][\\])+[\\]["])+ FREE_TEXT_EQUALS_MACRO_EXPANSION ((([^",=%])|([%][^{]))|([^\\][\\][%][{])|([^\\]([\\][\\])+[\\][%][{])|[^\\][\\][=]|[^\\]([\\][\\])+[\\][=])+ FREE_TEXT_EQUALS_QUOTE_MACRO_EXPANSION ((([^'",=%])|([%][^{]))|([^\\][\\][%][{])|([^\\]([\\][\\])+[\\][%][{])|[^\\][\\][=]|[^\\][\\][']|[^\\]([\\][\\])+[\\][=])+ FREE_TEXT_COMMA_MACRO_EXPANSION (([^%,])|([^\\][\\][%][{])|([^\\]([\\][\\])+[\\][%][{])|[^\\][\\][,]|[^\\]([\\][\\])+[\\][,])+ FREE_TEXT_COMMA_DOUBLE_QUOTE_MACRO_EXPANSION ((([^,"%])|([%][^{]))|([^\\][\\][%][{])|([^\\]([\\][\\])+[\\][%][{])|[^\\][\\]["]|[^\\]([\\][\\])+[\\]["])+ FREE_TEXT_SPACE_MACRO_EXPANSION (([^% ])|([^\\][\\][%][{])|([^\\]([\\][\\])+[\\][%][{])|[^\\][\\][ ]|[^\\]([\\][\\])+[\\][ ])+ START_MACRO_VARIABLE (\%\{) FREE_TEXT_QUOTE_COMMA [^,\']+ FREE_TEXT_SPACE [^ \t]+ FREE_TEXT_SPACE_COMMA [^, \t]+ FREE_TEXT_SPACE_COMMA_QUOTE [^, \t\"\n\r]+ FREE_TEXT_COMMA_QUOTE [^,\"\\n\\r]+ NEW_LINE_FREE_TEXT [^, \t\"\n\r]+ NOT ! FREE_TEXT ([^\"]|([^\\]\\\"))+ REMOVE_RULE_BY [0-9A-Za-z_\/\.\-\*\:\;\]\[\$]+ VAR_FREE_TEXT_QUOTE ([^\']|([^\\]\\\'))+ VAR_FREE_TEXT_SPACE [^ \t\"]+ VAR_FREE_TEXT_SPACE_COMMA [^, \t\"]+ JSON (?i:JSON) NATIVE (?i:NATIVE) NEW_LINE [\n\r]+ EQUALS (?i:=) EQUALS_PLUS (?i:=\+) EQUALS_MINUS (?i:=\-) %x EXPECTING_ACTION_PREDICATE_VARIABLE %x TRANSACTION_TO_VARIABLE %x EXPECTING_VARIABLE %x EXPECTING_OPERATOR_ENDS_WITH_SPACE EXPECTING_OPERATOR_ENDS_WITH_QUOTE %x EXPECTING_ACTION_PREDICATE ACTION_PREDICATE_ENDS_WITH_QUOTE ACTION_PREDICATE_ENDS_WITH_DOUBLE_QUOTE ACTION_PREDICATE_ENDS_WITH_COMMA_OR_DOUBLE_QUOTE %x COMMENT %x TRANSITION_FROM_OP_TO_EXPECTING_PARAMETER_ENDS_WITH_QUOTE TRANSITION_FROM_OP_TO_EXPECTING_PARAMETER_ENDS_WITH_SPACE %x EXPECTING_VAR_PARAMETER EXPECTING_VAR_PARAMETER_OR_MACRO_NONQUOTED EXPECTING_VAR_PARAMETER_OR_MACRO_QUOTED %x EXPECTING_PARAMETER_ENDS_WITH_QUOTE EXPECTING_PARAMETER_ENDS_WITH_SPACE %x EXPECTING_ACTIONS_ENDS_WITH_DOUBLE_QUOTE EXPECTING_ACTIONS_ONLY_ONE %x TRANSACTION_FROM_OPERATOR_TO_ACTIONS %x TRANSACTION_FROM_OPERATOR_PARAMETERS_TO_ACTIONS %x TRANSACTION_FROM_DIRECTIVE_TO_ACTIONS %x NO_OP_INFORMED_ENDS_WITH_SPACE NO_OP_INFORMED_ENDS_WITH_QUOTE %x FINISH_ACTIONS %x LEXING_ERROR %x LEXING_ERROR_ACTION %x LEXING_ERROR_VARIABLE %x SETVAR_ACTION_NONQUOTED %x SETVAR_ACTION_NONQUOTED_WAITING_COLLECTION_ELEM %x SETVAR_ACTION_NONQUOTED_WAITING_OPERATION %x SETVAR_ACTION_NONQUOTED_WAITING_CONTENT %x SETVAR_ACTION_QUOTED %x SETVAR_ACTION_QUOTED_WAITING_COLLECTION_ELEM %x SETVAR_ACTION_QUOTED_WAITING_OPERATION %x SETVAR_ACTION_QUOTED_WAITING_CONTENT %{ // Code run each time a pattern is matched. # define YY_USER_ACTION driver.loc.back()->columns (yyleng); %} %% %{ // Code run each time yylex is called. driver.loc.back()->step(); %} { {ACTION_APPEND} { return p::make_ACTION_APPEND(yytext, *driver.loc.back()); } {ACTION_BLOCK} { return p::make_ACTION_BLOCK(yytext, *driver.loc.back()); } {ACTION_CAPTURE} { return p::make_ACTION_CAPTURE(yytext, *driver.loc.back()); } {ACTION_CHAIN} { return p::make_ACTION_CHAIN(yytext, *driver.loc.back()); } {ACTION_DENY} { return p::make_ACTION_DENY(yytext, *driver.loc.back()); } {ACTION_DEPRECATE_VAR} { return p::make_ACTION_DEPRECATE_VAR(yytext, *driver.loc.back()); } {ACTION_DROP} { return p::make_ACTION_DROP(yytext, *driver.loc.back()); } {ACTION_ID} { return p::make_ACTION_ID(yytext, *driver.loc.back()); } {ACTION_LOG} { return p::make_ACTION_LOG(yytext, *driver.loc.back()); } {ACTION_MULTI_MATCH} { return p::make_ACTION_MULTI_MATCH(yytext, *driver.loc.back()); } {ACTION_NO_AUDIT_LOG} { return p::make_ACTION_NO_AUDIT_LOG(yytext, *driver.loc.back()); } {ACTION_NO_LOG} { return p::make_ACTION_NO_LOG(yytext, *driver.loc.back()); } {ACTION_PASS} { return p::make_ACTION_PASS(yytext, *driver.loc.back()); } {ACTION_PAUSE} { return p::make_ACTION_PAUSE(yytext, *driver.loc.back()); } {ACTION_PREPEND} { return p::make_ACTION_PREPEND(yytext, *driver.loc.back()); } {ACTION_PROXY} { return p::make_ACTION_PROXY(yytext, *driver.loc.back()); } {ACTION_SANITISE_ARG} { return p::make_ACTION_SANITISE_ARG(yytext, *driver.loc.back()); } {ACTION_SANITISE_MATCHED} { return p::make_ACTION_SANITISE_MATCHED(yytext, *driver.loc.back()); } {ACTION_SANITISE_MATCHED_BYTES} { return p::make_ACTION_SANITISE_MATCHED_BYTES(yytext, *driver.loc.back()); } {ACTION_SANITISE_REQUEST_HEADER} { return p::make_ACTION_SANITISE_REQUEST_HEADER(yytext, *driver.loc.back()); } {ACTION_SANITISE_RESPONSE_HEADER} { return p::make_ACTION_SANITISE_RESPONSE_HEADER(yytext, *driver.loc.back()); } {ACTION_SETRSC}: { BEGIN(EXPECTING_ACTION_PREDICATE); return p::make_ACTION_SETRSC(yytext, *driver.loc.back()); } {ACTION_STATUS} { return p::make_ACTION_STATUS(yytext, *driver.loc.back()); } {ACTION_ACCURACY}:'{FREE_TEXT_QUOTE}' { return p::make_ACTION_ACCURACY(yytext, *driver.loc.back()); } {ACTION_ACCURACY}:{FREE_TEXT_QUOTE} { return p::make_ACTION_ACCURACY(yytext, *driver.loc.back()); } {ACTION_ALLOW} { return p::make_ACTION_ALLOW(yytext, *driver.loc.back()); } {ACTION_AUDIT_LOG} { return p::make_ACTION_AUDIT_LOG(yytext, *driver.loc.back()); } {ACTION_CTL_AUDIT_ENGINE}= { return p::make_ACTION_CTL_AUDIT_ENGINE(yytext, *driver.loc.back()); } {ACTION_CTL_AUDIT_LOG_PARTS}=[+|-]{AUDIT_PARTS} { return p::make_ACTION_CTL_AUDIT_LOG_PARTS(yytext, *driver.loc.back()); } {ACTION_CTL_BDY_JSON} { return p::make_ACTION_CTL_BDY_JSON(yytext, *driver.loc.back()); } {ACTION_CTL_BDY_XML} { return p::make_ACTION_CTL_BDY_XML(yytext, *driver.loc.back()); } {ACTION_CTL_BDY_URLENCODED} { return p::make_ACTION_CTL_BDY_URLENCODED(yytext, *driver.loc.back()); } {ACTION_CTL_FORCE_REQ_BODY_VAR}= { return p::make_ACTION_CTL_FORCE_REQ_BODY_VAR(yytext, *driver.loc.back()); } {ACTION_CTL_REQUEST_BODY_ACCESS}= { return p::make_ACTION_CTL_REQUEST_BODY_ACCESS(yytext, *driver.loc.back()); } {ACTION_CTL_RULE_ENGINE}= { return p::make_ACTION_CTL_RULE_ENGINE(*driver.loc.back()); } {ACTION_CTL_RULE_REMOVE_BY_ID}[=]{REMOVE_RULE_BY} { return p::make_ACTION_CTL_RULE_REMOVE_BY_ID(yytext, *driver.loc.back()); } {ACTION_CTL_RULE_REMOVE_BY_TAG}[=]{REMOVE_RULE_BY} { return p::make_ACTION_CTL_RULE_REMOVE_BY_TAG(yytext, *driver.loc.back()); } {ACTION_CTL_RULE_REMOVE_TARGET_BY_ID}[=]{REMOVE_RULE_BY} { return p::make_ACTION_CTL_RULE_REMOVE_TARGET_BY_ID(yytext, *driver.loc.back()); } {ACTION_CTL_RULE_REMOVE_TARGET_BY_TAG}[=]{REMOVE_RULE_BY} { return p::make_ACTION_CTL_RULE_REMOVE_TARGET_BY_TAG(yytext, *driver.loc.back()); } {ACTION_EXEC}:'{VAR_FREE_TEXT_QUOTE}' { return p::make_ACTION_EXEC(yytext, *driver.loc.back()); } {ACTION_EXEC}:{VAR_FREE_TEXT_SPACE_COMMA} { return p::make_ACTION_EXEC(yytext, *driver.loc.back()); } {ACTION_EXPIRE_VAR}:'{VAR_FREE_TEXT_QUOTE}={VAR_FREE_TEXT_QUOTE}' { return p::make_ACTION_EXPIRE_VAR(yytext, *driver.loc.back()); } {ACTION_EXPIRE_VAR}:'{VAR_FREE_TEXT_QUOTE}' { return p::make_ACTION_EXPIRE_VAR(yytext, *driver.loc.back()); } {ACTION_EXPIRE_VAR}:{VAR_FREE_TEXT_SPACE_COMMA} { return p::make_ACTION_EXPIRE_VAR(yytext, *driver.loc.back()); } {ACTION_EXPIRE_VAR}:{VAR_FREE_TEXT_SPACE}={VAR_FREE_TEXT_SPACE_COMMA} { return p::make_ACTION_EXPIRE_VAR(yytext, *driver.loc.back()); } {ACTION_INITCOL}:{COL_NAME}= { BEGIN(EXPECTING_ACTION_PREDICATE); return p::make_ACTION_INITCOL(yytext, *driver.loc.back()); } {ACTION_MATURITY}:'{FREE_TEXT_QUOTE}' { return p::make_ACTION_MATURITY(yytext, *driver.loc.back()); } {ACTION_MATURITY}:{FREE_TEXT_QUOTE} { return p::make_ACTION_MATURITY(yytext, *driver.loc.back()); } {ACTION_MSG}: { BEGIN(EXPECTING_ACTION_PREDICATE); return p::make_ACTION_MSG(yytext, *driver.loc.back()); } {ACTION_PHASE} { return p::make_ACTION_PHASE(yytext, *driver.loc.back()); } {ACTION_REDIRECT}: { BEGIN(EXPECTING_ACTION_PREDICATE); return p::make_ACTION_REDIRECT(yytext, *driver.loc.back()); } {ACTION_REV}:'{FREE_TEXT_QUOTE_COMMA}' { return p::make_ACTION_REV(yytext, *driver.loc.back()); } {ACTION_REV}:{FREE_TEXT_QUOTE_COMMA} { return p::make_ACTION_REV(yytext, *driver.loc.back()); } {ACTION_SETENV}: { BEGIN(EXPECTING_ACTION_PREDICATE); return p::make_ACTION_SETENV(yytext, *driver.loc.back()); } {ACTION_SETSID}: { BEGIN(EXPECTING_ACTION_PREDICATE); return p::make_ACTION_SETSID(yytext, *driver.loc.back()); } {ACTION_SETUID}: { BEGIN(EXPECTING_ACTION_PREDICATE); return p::make_ACTION_SETUID(yytext, *driver.loc.back()); } {ACTION_SETVAR}:' { BEGIN(SETVAR_ACTION_QUOTED); return p::make_ACTION_SETVAR(*driver.loc.back()); } {ACTION_SETVAR}: { BEGIN(SETVAR_ACTION_NONQUOTED); return p::make_ACTION_SETVAR(*driver.loc.back()); } {ACTION_SEVERITY}:'{ACTION_SEVERITY_VALUE}' { return p::make_ACTION_SEVERITY(yytext, *driver.loc.back()); } {ACTION_SEVERITY}:{ACTION_SEVERITY_VALUE} { return p::make_ACTION_SEVERITY(yytext, *driver.loc.back()); } {ACTION_SKIP_AFTER}:{FREE_TEXT_SPACE_COMMA_QUOTE} { return p::make_ACTION_SKIP_AFTER(yytext, *driver.loc.back()); } {ACTION_SKIP}:{CONFIG_VALUE_NUMBER} { return p::make_ACTION_SKIP(yytext, *driver.loc.back()); } {ACTION_TAG}: { BEGIN(EXPECTING_ACTION_PREDICATE); return p::make_ACTION_TAG(yytext, *driver.loc.back()); } {ACTION_VER}:'{FREE_TEXT_QUOTE}' { return p::make_ACTION_VER(yytext, *driver.loc.back()); } {ACTION_XMLNS}:{FREE_TEXT_SPACE_COMMA_QUOTE} { return p::make_ACTION_XMLNS(yytext, *driver.loc.back()); } {ACTION_TRANSFORMATION_PARITY_ZERO_7_BIT} { return p::make_ACTION_TRANSFORMATION_PARITY_ZERO_7_BIT(yytext, *driver.loc.back()); } {ACTION_TRANSFORMATION_PARITY_ODD_7_BIT} { return p::make_ACTION_TRANSFORMATION_PARITY_ODD_7_BIT(yytext, *driver.loc.back()); } {ACTION_TRANSFORMATION_PARITY_EVEN_7_BIT} { return p::make_ACTION_TRANSFORMATION_PARITY_EVEN_7_BIT(yytext, *driver.loc.back()); } {ACTION_TRANSFORMATION_SQL_HEX_DECODE} { return p::make_ACTION_TRANSFORMATION_SQL_HEX_DECODE(yytext, *driver.loc.back()); } {ACTION_TRANSFORMATION_BASE_64_ENCODE} { return p::make_ACTION_TRANSFORMATION_BASE_64_ENCODE(yytext, *driver.loc.back()); } {ACTION_TRANSFORMATION_BASE_64_DECODE} { return p::make_ACTION_TRANSFORMATION_BASE_64_DECODE(yytext, *driver.loc.back()); } {ACTION_TRANSFORMATION_BASE_64_DECODE_EXT} { return p::make_ACTION_TRANSFORMATION_BASE_64_DECODE_EXT(yytext, *driver.loc.back()); } {ACTION_TRANSFORMATION_CMD_LINE} { return p::make_ACTION_TRANSFORMATION_CMD_LINE(yytext, *driver.loc.back()); } {ACTION_TRANSFORMATION_SHA1} { return p::make_ACTION_TRANSFORMATION_SHA1(yytext, *driver.loc.back()); } {ACTION_TRANSFORMATION_MD5} { return p::make_ACTION_TRANSFORMATION_MD5(yytext, *driver.loc.back()); } {ACTION_TRANSFORMATION_ESCAPE_SEQ_DECODE} { return p::make_ACTION_TRANSFORMATION_ESCAPE_SEQ_DECODE(yytext, *driver.loc.back()); } {ACTION_TRANSFORMATION_HEX_ENCODE} { return p::make_ACTION_TRANSFORMATION_HEX_ENCODE(yytext, *driver.loc.back()); } {ACTION_TRANSFORMATION_HEX_DECODE} { return p::make_ACTION_TRANSFORMATION_HEX_DECODE(yytext, *driver.loc.back()); } {ACTION_TRANSFORMATION_LOWERCASE} { return p::make_ACTION_TRANSFORMATION_LOWERCASE(yytext, *driver.loc.back()); } {ACTION_TRANSFORMATION_UPPERCASE} { return p::make_ACTION_TRANSFORMATION_UPPERCASE(yytext, *driver.loc.back()); } {ACTION_TRANSFORMATION_URL_ENCODE} { return p::make_ACTION_TRANSFORMATION_URL_ENCODE(yytext, *driver.loc.back()); } {ACTION_TRANSFORMATION_URL_DECODE_UNI} { return p::make_ACTION_TRANSFORMATION_URL_DECODE_UNI(yytext, *driver.loc.back()); } {ACTION_TRANSFORMATION_URL_DECODE} { return p::make_ACTION_TRANSFORMATION_URL_DECODE(yytext, *driver.loc.back()); } {ACTION_TRANSFORMATION_NONE} { return p::make_ACTION_TRANSFORMATION_NONE(yytext, *driver.loc.back()); } {ACTION_TRANSFORMATION_COMPRESS_WHITESPACE} { return p::make_ACTION_TRANSFORMATION_COMPRESS_WHITESPACE(yytext, *driver.loc.back()); } {ACTION_TRANSFORMATION_REMOVE_WHITESPACE} { return p::make_ACTION_TRANSFORMATION_REMOVE_WHITESPACE(yytext, *driver.loc.back()); } {ACTION_TRANSFORMATION_REPLACE_NULLS} { return p::make_ACTION_TRANSFORMATION_REPLACE_NULLS(yytext, *driver.loc.back()); } {ACTION_TRANSFORMATION_REMOVE_NULLS} { return p::make_ACTION_TRANSFORMATION_REMOVE_NULLS(yytext, *driver.loc.back()); } {ACTION_TRANSFORMATION_HTML_ENTITY_DECODE} { return p::make_ACTION_TRANSFORMATION_HTML_ENTITY_DECODE(yytext, *driver.loc.back()); } {ACTION_TRANSFORMATION_JS_DECODE} { return p::make_ACTION_TRANSFORMATION_JS_DECODE(yytext, *driver.loc.back()); } {ACTION_TRANSFORMATION_CSS_DECODE} { return p::make_ACTION_TRANSFORMATION_CSS_DECODE(yytext, *driver.loc.back()); } {ACTION_TRANSFORMATION_TRIM} { return p::make_ACTION_TRANSFORMATION_TRIM(yytext, *driver.loc.back()); } {ACTION_TRANSFORMATION_TRIM_LEFT} { return p::make_ACTION_TRANSFORMATION_TRIM_LEFT(yytext, *driver.loc.back()); } {ACTION_TRANSFORMATION_TRIM_RIGHT} { return p::make_ACTION_TRANSFORMATION_TRIM_RIGHT(yytext, *driver.loc.back()); } {ACTION_TRANSFORMATION_NORMALISE_PATH_WIN} { return p::make_ACTION_TRANSFORMATION_NORMALISE_PATH_WIN(yytext, *driver.loc.back()); } {ACTION_TRANSFORMATION_NORMALISE_PATH} { return p::make_ACTION_TRANSFORMATION_NORMALISE_PATH(yytext, *driver.loc.back()); } {ACTION_TRANSFORMATION_LENGTH} { return p::make_ACTION_TRANSFORMATION_LENGTH(yytext, *driver.loc.back()); } {ACTION_TRANSFORMATION_UTF8_TO_UNICODE} { return p::make_ACTION_TRANSFORMATION_UTF8_TO_UNICODE(yytext, *driver.loc.back()); } {ACTION_TRANSFORMATION_REMOVE_COMMENTS_CHAR} { return p::make_ACTION_TRANSFORMATION_REMOVE_COMMENTS_CHAR(yytext, *driver.loc.back()); } {ACTION_TRANSFORMATION_REMOVE_COMMENTS} { return p::make_ACTION_TRANSFORMATION_REMOVE_COMMENTS(yytext, *driver.loc.back()); } {ACTION_TRANSFORMATION_REPLACE_COMMENTS} { return p::make_ACTION_TRANSFORMATION_REPLACE_COMMENTS(yytext, *driver.loc.back()); } {ACTION_LOG_DATA}: { BEGIN(EXPECTING_ACTION_PREDICATE); return p::make_ACTION_LOG_DATA(yytext, *driver.loc.back()); } {CONFIG_VALUE_DETC} { return p::make_CONFIG_VALUE_DETC(yytext, *driver.loc.back()); } {CONFIG_VALUE_OFF} { return p::make_CONFIG_VALUE_OFF(yytext, *driver.loc.back()); } {CONFIG_VALUE_ON} { return p::make_CONFIG_VALUE_ON(yytext, *driver.loc.back()); } [ \t]*\\\n[ \t]* { driver.loc.back()->lines(1); driver.loc.back()->step(); } [ \t]*\\\r\n[ \t]* { driver.loc.back()->lines(1); driver.loc.back()->step(); } } { [ \t]*[,][ \t]* { return p::make_COMMA(*driver.loc.back()); } } { [ \t]*\n { BEGIN(INITIAL); yyless(yyleng); driver.loc.back()->lines(1); driver.loc.back()->step(); } [ \t]*\r\n { BEGIN(INITIAL); yyless(yyleng); driver.loc.back()->lines(1); driver.loc.back()->step(); } } { [ ][ \t]* { BEGIN(INITIAL); yyless(yyleng); } [ ]*[ \t]*\n { BEGIN(INITIAL); yyless(1); } [ ]*[ \t]*\r\n { BEGIN(INITIAL); driver.loc.back()->lines(1); driver.loc.back()->step(); } } { ["][ \t]* { BEGIN(INITIAL); yyless(yyleng); p::make_NEW_LINE(*driver.loc.back()); } ["][ \t]*\n { BEGIN(INITIAL); yyless(1); } ["][ \t]*\r\n { BEGIN(INITIAL); driver.loc.back()->lines(1); driver.loc.back()->step(); } } { . { BEGIN(LEXING_ERROR_ACTION); yyless(0); } } { ['] { BEGIN(ACTION_PREDICATE_ENDS_WITH_QUOTE); } ["] { BEGIN(ACTION_PREDICATE_ENDS_WITH_DOUBLE_QUOTE); } . { BEGIN(ACTION_PREDICATE_ENDS_WITH_COMMA_OR_DOUBLE_QUOTE); yyless(0); } } { [ \t]*\\\n[ \t]* { driver.loc.back()->lines(1); driver.loc.back()->step(); } [ \t]*\\\r\n[ \t]* { driver.loc.back()->lines(1); driver.loc.back()->step(); } } { [}][%][{] { yyless(1); BEGIN_PREVIOUS(); } [}][%] { BEGIN_PREVIOUS(); } [}] { BEGIN_PREVIOUS(); } } { ['] { BEGIN(EXPECTING_ACTIONS_ENDS_WITH_DOUBLE_QUOTE); yyless(yyleng); } {FREE_TEXT_QUOTE_MACRO_EXPANSION} { return p::make_FREE_TEXT_QUOTE_MACRO_EXPANSION(yytext, *driver.loc.back()); } } { ["] { BEGIN(EXPECTING_ACTIONS_ENDS_WITH_DOUBLE_QUOTE); yyless(yyleng); } {FREE_TEXT_DOUBLE_QUOTE_MACRO_EXPANSION} { return p::make_FREE_TEXT_QUOTE_MACRO_EXPANSION(yytext, *driver.loc.back()); } } { [,] { yyless(0); BEGIN(EXPECTING_ACTIONS_ENDS_WITH_DOUBLE_QUOTE); } ["] { yyless(0); BEGIN(EXPECTING_ACTIONS_ENDS_WITH_DOUBLE_QUOTE);} {FREE_TEXT_COMMA_DOUBLE_QUOTE_MACRO_EXPANSION} { return p::make_FREE_TEXT_QUOTE_MACRO_EXPANSION(yytext, *driver.loc.back()); } } { {START_MACRO_VARIABLE} { BEGINX(EXPECTING_ACTION_PREDICATE_VARIABLE); } . { BEGIN(LEXING_ERROR_VARIABLE); yyless(0); } } { {NOT} { return p::make_NOT(*driver.loc.back()); } .|\n { BEGIN_ACTION_OPERATION(); yyless(0); } } { {EQUALS_PLUS} { BEGIN_ACTION_WAITING_CONTENT(); return p::make_SETVAR_OPERATION_EQUALS_PLUS(*driver.loc.back()); } {EQUALS_MINUS} { BEGIN_ACTION_WAITING_CONTENT(); return p::make_SETVAR_OPERATION_EQUALS_MINUS(*driver.loc.back()); } {EQUALS} { BEGIN_ACTION_WAITING_CONTENT(); return p::make_SETVAR_OPERATION_EQUALS(*driver.loc.back()); } } { .|\n { BEGIN(EXPECTING_ACTIONS_ENDS_WITH_DOUBLE_QUOTE); yyless(0);} } { \' { BEGIN(EXPECTING_ACTIONS_ENDS_WITH_DOUBLE_QUOTE); } .|\n { BEGIN(LEXING_ERROR_ACTION); yyless(0); } } { {START_MACRO_VARIABLE} { BEGINX(EXPECTING_ACTION_PREDICATE_VARIABLE); } } { {FREE_TEXT_EQUALS_MACRO_EXPANSION} { return p::make_FREE_TEXT_QUOTE_MACRO_EXPANSION(yytext, *driver.loc.back()); } .|\n { BEGIN(EXPECTING_ACTIONS_ENDS_WITH_DOUBLE_QUOTE); yyless(0); } } { \' { BEGIN(EXPECTING_ACTIONS_ENDS_WITH_DOUBLE_QUOTE); } {FREE_TEXT_EQUALS_QUOTE_MACRO_EXPANSION} { return p::make_FREE_TEXT_QUOTE_MACRO_EXPANSION(yytext, *driver.loc.back()); } .|\n { BEGIN(EXPECTING_ACTIONS_ENDS_WITH_DOUBLE_QUOTE); yyless(0); } } { <> { BEGIN(INITIAL); yyless(0); p::make_NEW_LINE(*driver.loc.back()); } . { BEGIN(INITIAL); } } {CONFIG_COMPONENT_SIG}[ \t]+["]{FREE_TEXT}["] { return p::make_CONFIG_COMPONENT_SIG(strchr(yytext, ' ') + 2, *driver.loc.back()); } {CONFIG_SEC_SERVER_SIG}[ \t]+["]{FREE_TEXT}["] { return p::make_CONFIG_SEC_SERVER_SIG(strchr(yytext, ' ') + 2, *driver.loc.back()); } {CONFIG_SEC_WEB_APP_ID}[ \t]+["]{FREE_TEXT}["] { return p::make_CONFIG_SEC_WEB_APP_ID(parserSanitizer(strchr(yytext, ' ') + 2), *driver.loc.back()); } {CONFIG_SEC_WEB_APP_ID}[ \t]+{FREE_TEXT_NEW_LINE} { return p::make_CONFIG_SEC_WEB_APP_ID(parserSanitizer(strchr(yytext, ' ') + 1), *driver.loc.back()); } {CONFIG_CONTENT_INJECTION} { return p::make_CONFIG_CONTENT_INJECTION(*driver.loc.back()); } {CONFIG_DIR_AUDIT_DIR_MOD}[ \t]+{CONFIG_VALUE_NUMBER} { return p::make_CONFIG_DIR_AUDIT_DIR_MOD(parserSanitizer(strchr(yytext, ' ') + 1), *driver.loc.back()); } {CONFIG_DIR_AUDIT_DIR_MOD}[ \t]+["]{CONFIG_VALUE_NUMBER}["] { return p::make_CONFIG_DIR_AUDIT_DIR_MOD(parserSanitizer(strchr(yytext, ' ') + 1), *driver.loc.back()); } {CONFIG_DIR_AUDIT_DIR}[ \t]+{CONFIG_VALUE_PATH} { return p::make_CONFIG_DIR_AUDIT_DIR(parserSanitizer(strchr(yytext, ' ') + 1), *driver.loc.back()); } {CONFIG_DIR_AUDIT_DIR}[ \t]+["]{CONFIG_VALUE_PATH}["] { return p::make_CONFIG_DIR_AUDIT_DIR(parserSanitizer(strchr(yytext, ' ') + 1), *driver.loc.back()); } {CONFIG_SEC_ARGUMENT_SEPARATOR}[ \t]+["]{NEW_LINE_FREE_TEXT}["] { return p::make_CONFIG_SEC_ARGUMENT_SEPARATOR(parserSanitizer(strchr(yytext, ' ') + 1), *driver.loc.back()); } {CONFIG_SEC_ARGUMENT_SEPARATOR}[ \t]+{NEW_LINE_FREE_TEXT} { return p::make_CONFIG_SEC_ARGUMENT_SEPARATOR(parserSanitizer(strchr(yytext, ' ') + 1), *driver.loc.back()); } {CONFIG_DIR_AUDIT_ENG} { return p::make_CONFIG_DIR_AUDIT_ENG(yytext, *driver.loc.back()); } {CONFIG_DIR_AUDIT_FLE_MOD}[ \t]+{CONFIG_VALUE_NUMBER} { return p::make_CONFIG_DIR_AUDIT_FLE_MOD(strchr(yytext, ' ') + 1, *driver.loc.back()); } {CONFIG_DIR_AUDIT_LOG2}[ \t]+{CONFIG_VALUE_PATH} { return p::make_CONFIG_DIR_AUDIT_LOG2(strchr(yytext, ' ') + 1, *driver.loc.back()); } {CONFIG_DIR_AUDIT_LOG_P}[ \t]+{AUDIT_PARTS} { return p::make_CONFIG_DIR_AUDIT_LOG_P(parserSanitizer(strchr(yytext, ' ') + 1), *driver.loc.back()); } {CONFIG_DIR_AUDIT_LOG_P}[ \t]+["]{AUDIT_PARTS}["] { return p::make_CONFIG_DIR_AUDIT_LOG_P(parserSanitizer(strchr(yytext, ' ') + 1), *driver.loc.back()); } {CONFIG_DIR_AUDIT_LOG}[ \t]+{CONFIG_VALUE_PATH} { return p::make_CONFIG_DIR_AUDIT_LOG(strchr(yytext, ' ') + 1, *driver.loc.back()); } {CONFIG_DIR_AUDIT_LOG_FMT} { return p::make_CONFIG_DIR_AUDIT_LOG_FMT(*driver.loc.back()); } {JSON} { return p::make_JSON(*driver.loc.back()); } {NATIVE} { return p::make_NATIVE(*driver.loc.back()); } {CONFIG_DIR_AUDIT_LOG}[ \t]+["]{CONFIG_VALUE_PATH}["] { return p::make_CONFIG_DIR_AUDIT_LOG(parserSanitizer(strchr(yytext, ' ') + 1), *driver.loc.back()); } {CONFIG_DIR_AUDIT_STS}[ \t]+{FREE_TEXT_NEW_LINE} { return p::make_CONFIG_DIR_AUDIT_STS(parserSanitizer(strchr(yytext, ' ') + 1), *driver.loc.back()); } {CONFIG_DIR_AUDIT_STS}[ \t]+["]{NEW_LINE_FREE_TEXT}["] { return p::make_CONFIG_DIR_AUDIT_STS(parserSanitizer(strchr(yytext, ' ') + 1), *driver.loc.back()); } {CONFIG_DIR_AUDIT_TPE} { return p::make_CONFIG_DIR_AUDIT_TPE(yytext, *driver.loc.back()); } {CONFIG_DIR_DEBUG_LOG}[ \t]+{CONFIG_VALUE_PATH} { return p::make_CONFIG_DIR_DEBUG_LOG(strchr(yytext, ' ') + 1, *driver.loc.back()); } {CONFIG_DIR_DEBUG_LOG}[ \t]+["]{CONFIG_VALUE_PATH}["] { return p::make_CONFIG_DIR_DEBUG_LOG(parserSanitizer(strchr(yytext, ' ') + 1), *driver.loc.back()); } {CONFIG_DIR_DEBUG_LVL}[ \t]+{CONFIG_VALUE_NUMBER} { return p::make_CONFIG_DIR_DEBUG_LVL(strchr(yytext, ' ') + 1, *driver.loc.back()); } {CONFIG_DIR_GEO_DB}[ \t]+{FREE_TEXT_NEW_LINE} { return p::make_CONFIG_DIR_GEO_DB(strchr(yytext, ' ') + 1, *driver.loc.back()); } {CONFIG_DIR_PCRE_MATCH_LIMIT_RECURSION}[ \t]+{CONFIG_VALUE_NUMBER} { return p::make_CONFIG_DIR_PCRE_MATCH_LIMIT_RECURSION(strchr(yytext, ' ') + 1, *driver.loc.back()); } {CONFIG_DIR_PCRE_MATCH_LIMIT}[ \t]+{CONFIG_VALUE_NUMBER} { return p::make_CONFIG_DIR_PCRE_MATCH_LIMIT(strchr(yytext, ' ') + 1, *driver.loc.back()); } {CONFIG_DIR_ARGS_LIMIT}[ \t]+{CONFIG_VALUE_NUMBER} { return p::make_CONFIG_DIR_ARGS_LIMIT(strchr(yytext, ' ') + 1, *driver.loc.back()); } {CONFIG_DIR_REQ_BODY_JSON_DEPTH_LIMIT}[ \t]+{CONFIG_VALUE_NUMBER} { return p::make_CONFIG_DIR_REQ_BODY_JSON_DEPTH_LIMIT(strchr(yytext, ' ') + 1, *driver.loc.back()); } {CONFIG_DIR_REQ_BODY_IN_MEMORY_LIMIT}[ \t]+{CONFIG_VALUE_NUMBER} { return p::make_CONFIG_DIR_REQ_BODY_IN_MEMORY_LIMIT(strchr(yytext, ' ') + 1, *driver.loc.back()); } {CONFIG_DIR_REQ_BODY_LIMIT_ACTION} { return p::make_CONFIG_DIR_REQ_BODY_LIMIT_ACTION(yytext, *driver.loc.back()); } {CONFIG_DIR_REQ_BODY_LIMIT}[ \t]+{CONFIG_VALUE_NUMBER} { return p::make_CONFIG_DIR_REQ_BODY_LIMIT(strchr(yytext, ' ') + 1, *driver.loc.back()); } {CONFIG_DIR_REQ_BODY_NO_FILES_LIMIT}[ \t]+{CONFIG_VALUE_NUMBER} { return p::make_CONFIG_DIR_REQ_BODY_NO_FILES_LIMIT(strchr(yytext, ' ') + 1, *driver.loc.back()); } {CONFIG_DIR_REQ_BODY} { return p::make_CONFIG_DIR_REQ_BODY(yytext, *driver.loc.back()); } {CONFIG_DIR_RES_BODY_LIMIT_ACTION} { return p::make_CONFIG_DIR_RES_BODY_LIMIT_ACTION(yytext, *driver.loc.back()); } {CONFIG_DIR_RES_BODY_LIMIT}[ \t]+{CONFIG_VALUE_NUMBER} { return p::make_CONFIG_DIR_RES_BODY_LIMIT(strchr(yytext, ' ') + 1, *driver.loc.back()); } {CONFIG_DIR_RES_BODY} { return p::make_CONFIG_DIR_RES_BODY(yytext, *driver.loc.back()); } {CONFIG_DIR_RULE_ENG} { return p::make_CONFIG_DIR_RULE_ENG(yytext, *driver.loc.back()); } {CONFIG_DIR_SEC_MARKER}[ \t]+["]{NEW_LINE_FREE_TEXT}["] { return p::make_CONFIG_DIR_SEC_MARKER(strchr(yytext, ' ') + 1, *driver.loc.back()); } {CONFIG_DIR_SEC_MARKER}[ \t]+{NEW_LINE_FREE_TEXT} { return p::make_CONFIG_DIR_SEC_MARKER(strchr(yytext, ' ') + 1, *driver.loc.back()); } {CONFIG_DIR_UNICODE_MAP_FILE}[ \t]+{FREE_TEXT_NEW_LINE}[ ]+{CONFIG_VALUE_NUMBER} { return p::make_CONFIG_DIR_UNICODE_MAP_FILE(strchr(yytext, ' ') + 1, *driver.loc.back()); } {CONFIG_SEC_REMOVE_RULES_BY_ID}[ \t]+{FREE_TEXT_NEW_LINE} { return p::make_CONFIG_SEC_RULE_REMOVE_BY_ID(parserSanitizer(strchr(yytext, ' ') + 1), *driver.loc.back()); } {CONFIG_SEC_REMOVE_RULES_BY_MSG}[ \t]+{FREE_TEXT_NEW_LINE} { return p::make_CONFIG_SEC_RULE_REMOVE_BY_MSG(parserSanitizer(strchr(yytext, ' ') + 1), *driver.loc.back()); } {CONFIG_SEC_REMOVE_RULES_BY_MSG}[ \t]+["]{FREE_TEXT_NEW_LINE}["] { return p::make_CONFIG_SEC_RULE_REMOVE_BY_MSG(parserSanitizer(strchr(yytext, ' ') + 1), *driver.loc.back()); } {CONFIG_SEC_REMOVE_RULES_BY_TAG}[ \t]+{FREE_TEXT_NEW_LINE} { return p::make_CONFIG_SEC_RULE_REMOVE_BY_TAG(parserSanitizer(strchr(yytext, ' ') + 1), *driver.loc.back()); } {CONFIG_SEC_REMOVE_RULES_BY_TAG}[ \t]+["]{FREE_TEXT_NEW_LINE}["] { return p::make_CONFIG_SEC_RULE_REMOVE_BY_TAG(parserSanitizer(strchr(yytext, ' ') + 1), *driver.loc.back()); } {CONFIG_SEC_UPDATE_TARGET_BY_TAG}[ \t]+["]{FREE_TEXT_NEW_LINE}["] { state_variable_from = 1; BEGIN(TRANSACTION_TO_VARIABLE); return p::make_CONFIG_SEC_RULE_UPDATE_TARGET_BY_TAG(parserSanitizer(strchr(yytext, ' ') + 1), *driver.loc.back()); } {CONFIG_SEC_UPDATE_TARGET_BY_TAG}[ \t]+{FREE_TEXT_SPACE_COMMA_QUOTE} { state_variable_from = 1; BEGIN(TRANSACTION_TO_VARIABLE); return p::make_CONFIG_SEC_RULE_UPDATE_TARGET_BY_TAG(parserSanitizer(strchr(yytext, ' ') + 1), *driver.loc.back()); } {CONFIG_SEC_UPDATE_TARGET_BY_MSG}[ \t]+["]{FREE_TEXT_NEW_LINE}["] { state_variable_from = 1; BEGIN(TRANSACTION_TO_VARIABLE); return p::make_CONFIG_SEC_RULE_UPDATE_TARGET_BY_MSG(parserSanitizer(strchr(yytext, ' ') + 1), *driver.loc.back()); } {CONFIG_SEC_UPDATE_TARGET_BY_MSG}[ \t]+{FREE_TEXT_SPACE_COMMA_QUOTE} { state_variable_from = 1; BEGIN(TRANSACTION_TO_VARIABLE); return p::make_CONFIG_SEC_RULE_UPDATE_TARGET_BY_MSG(parserSanitizer(strchr(yytext, ' ') + 1), *driver.loc.back()); } {CONFIG_SEC_UPDATE_TARGET_BY_ID}[ \t]+["]{FREE_TEXT_NEW_LINE}["] { state_variable_from = 1; BEGIN(TRANSACTION_TO_VARIABLE); return p::make_CONFIG_SEC_RULE_UPDATE_TARGET_BY_ID(parserSanitizer(strchr(yytext, ' ') + 1), *driver.loc.back()); } {CONFIG_SEC_UPDATE_TARGET_BY_ID}[ \t]+{FREE_TEXT_SPACE_COMMA_QUOTE} { state_variable_from = 1; BEGIN(TRANSACTION_TO_VARIABLE); return p::make_CONFIG_SEC_RULE_UPDATE_TARGET_BY_ID(parserSanitizer(strchr(yytext, ' ') + 1), *driver.loc.back()); } {CONFIG_SEC_UPDATE_ACTION_BY_ID}[ \t]+["]{FREE_TEXT_NEW_LINE}["] { BEGIN(TRANSACTION_FROM_OPERATOR_TO_ACTIONS); return p::make_CONFIG_SEC_RULE_UPDATE_ACTION_BY_ID(parserSanitizer(strchr(yytext, ' ') + 1), *driver.loc.back()); } {CONFIG_SEC_UPDATE_ACTION_BY_ID}[ \t]+{FREE_TEXT_SPACE_COMMA_QUOTE} { BEGIN(TRANSACTION_FROM_OPERATOR_TO_ACTIONS); return p::make_CONFIG_SEC_RULE_UPDATE_ACTION_BY_ID(parserSanitizer(strchr(yytext, ' ') + 1), *driver.loc.back()); } {CONFIG_UPDLOAD_KEEP_FILES} { return p::make_CONFIG_UPDLOAD_KEEP_FILES(yytext, *driver.loc.back()); } {CONFIG_UPDLOAD_SAVE_TMP_FILES} { return p::make_CONFIG_UPDLOAD_SAVE_TMP_FILES(yytext, *driver.loc.back()); } {CONFIG_UPLOAD_DIR}[ \t]+{CONFIG_VALUE_PATH} { return p::make_CONFIG_UPLOAD_DIR(parserSanitizer(strchr(yytext, ' ') + 1), *driver.loc.back()); } {CONFIG_UPLOAD_DIR}[ \t]+["]{CONFIG_VALUE_PATH}["] { return p::make_CONFIG_UPLOAD_DIR(parserSanitizer(strchr(yytext, ' ') + 1), *driver.loc.back()); } {CONFIG_UPLOAD_FILE_LIMIT}[ \t]+{CONFIG_VALUE_NUMBER} { return p::make_CONFIG_UPLOAD_FILE_LIMIT(strchr(yytext, ' ') + 1, *driver.loc.back()); } {CONFIG_UPLOAD_FILE_MODE}[ \t]+{CONFIG_VALUE_NUMBER} { return p::make_CONFIG_UPLOAD_FILE_MODE(strchr(yytext, ' ') + 1, *driver.loc.back()); } {CONFIG_VALUE_ABORT} { return p::make_CONFIG_VALUE_ABORT(yytext, *driver.loc.back()); } {CONFIG_VALUE_DETC} { return p::make_CONFIG_VALUE_DETC(yytext, *driver.loc.back()); } {CONFIG_VALUE_HTTPS} { return p::make_CONFIG_VALUE_HTTPS(yytext, *driver.loc.back()); } {CONFIG_VALUE_OFF} { return p::make_CONFIG_VALUE_OFF(yytext, *driver.loc.back()); } {CONFIG_VALUE_ON} { return p::make_CONFIG_VALUE_ON(yytext, *driver.loc.back()); } {CONFIG_VALUE_PARALLEL} { return p::make_CONFIG_VALUE_PARALLEL(yytext, *driver.loc.back()); } {CONFIG_VALUE_PROCESS_PARTIAL} { return p::make_CONFIG_VALUE_PROCESS_PARTIAL(yytext, *driver.loc.back()); } {CONFIG_VALUE_REJECT} { return p::make_CONFIG_VALUE_REJECT(yytext, *driver.loc.back()); } {CONFIG_VALUE_RELEVANT_ONLY} { return p::make_CONFIG_VALUE_RELEVANT_ONLY(yytext, *driver.loc.back()); } {CONFIG_VALUE_SERIAL} { return p::make_CONFIG_VALUE_SERIAL(yytext, *driver.loc.back()); } {CONFIG_VALUE_WARN} { return p::make_CONFIG_VALUE_WARN(yytext, *driver.loc.back()); } {CONFIG_XML_EXTERNAL_ENTITY} { return p::make_CONFIG_XML_EXTERNAL_ENTITY(yytext, *driver.loc.back()); } {CONGIG_DIR_RESPONSE_BODY_MP}[ \t]+{FREE_TEXT_NEW_LINE} { return p::make_CONGIG_DIR_RESPONSE_BODY_MP(strchr(yytext, ' ') + 1, *driver.loc.back()); } {CONGIG_DIR_RESPONSE_BODY_MP_CLEAR} { return p::make_CONGIG_DIR_RESPONSE_BODY_MP_CLEAR(*driver.loc.back()); } {CONGIG_DIR_SEC_ARG_SEP}[ \t]+{FREE_TEXT_NEW_LINE} { return p::make_CONGIG_DIR_SEC_ARG_SEP(yytext, *driver.loc.back()); } {CONGIG_DIR_SEC_COOKIE_FORMAT}[ \t]+{CONFIG_VALUE_NUMBER} { return p::make_CONGIG_DIR_SEC_COOKIE_FORMAT(strchr(yytext, ' ') + 1, *driver.loc.back()); } {CONFIG_SEC_COOKIEV0_SEPARATOR}[ \t]+["]{NEW_LINE_FREE_TEXT}["] { return p::make_CONFIG_SEC_COOKIEV0_SEPARATOR(parserSanitizer(strchr(yytext, ' ') + 1), *driver.loc.back()); } {CONFIG_SEC_COOKIEV0_SEPARATOR}[ \t]+{NEW_LINE_FREE_TEXT} { return p::make_CONFIG_SEC_COOKIEV0_SEPARATOR(parserSanitizer(strchr(yytext, ' ') + 1), *driver.loc.back()); } {CONGIG_DIR_SEC_DATA_DIR}[ \t]+{CONFIG_VALUE_PATH} { return p::make_CONGIG_DIR_SEC_DATA_DIR(parserSanitizer(strchr(yytext, ' ') + 1), *driver.loc.back()); } {CONGIG_DIR_SEC_DATA_DIR}[ \t]+["]{CONFIG_VALUE_PATH}["] { return p::make_CONGIG_DIR_SEC_DATA_DIR(parserSanitizer(strchr(yytext, ' ') + 1), *driver.loc.back()); } {CONGIG_DIR_SEC_STATUS_ENGINE}[ \t]+{FREE_TEXT_NEW_LINE} { return p::make_CONGIG_DIR_SEC_STATUS_ENGINE(yytext, *driver.loc.back()); } {CONGIG_DIR_SEC_TMP_DIR}[ \t]+{CONFIG_VALUE_PATH} { return p::make_CONGIG_DIR_SEC_TMP_DIR(parserSanitizer(strchr(yytext, ' ') + 1), *driver.loc.back()); } {CONGIG_DIR_SEC_TMP_DIR}[ \t]+["]{CONFIG_VALUE_PATH}["] { return p::make_CONGIG_DIR_SEC_TMP_DIR(parserSanitizer(strchr(yytext, ' ') + 1), *driver.loc.back()); } {DIRECTIVE_SECRULESCRIPT}[ \t]+{CONFIG_VALUE_PATH} { BEGIN(TRANSACTION_FROM_DIRECTIVE_TO_ACTIONS); return p::make_DIRECTIVE_SECRULESCRIPT(parserSanitizer(strchr(yytext, ' ') + 1), *driver.loc.back()); } {DIRECTIVE_SECRULESCRIPT}[ \t]+["]{FREE_TEXT_SPACE_COMMA_QUOTE}["] { BEGIN(TRANSACTION_FROM_DIRECTIVE_TO_ACTIONS); return p::make_DIRECTIVE_SECRULESCRIPT(parserSanitizer(strchr(yytext, ' ') + 1), *driver.loc.back()); } {CONFIG_SEC_CACHE_TRANSFORMATIONS}{FREE_TEXT_NEW_LINE} { return p::make_CONFIG_SEC_CACHE_TRANSFORMATIONS(yytext, *driver.loc.back()); } {CONFIG_SEC_CHROOT_DIR}[ \t]+{CONFIG_VALUE_PATH} { return p::make_CONFIG_SEC_CHROOT_DIR(parserSanitizer(strchr(yytext, ' ') + 1), *driver.loc.back()); } {CONFIG_SEC_CHROOT_DIR}[ \t]+["]{CONFIG_VALUE_PATH}["] { return p::make_CONFIG_SEC_CHROOT_DIR(parserSanitizer(strchr(yytext, ' ') + 1), *driver.loc.back()); } {CONFIG_CONN_ENGINE} { return p::make_CONFIG_CONN_ENGINE(yytext, *driver.loc.back()); } {CONFIG_SEC_HASH_ENGINE} { return p::make_CONFIG_SEC_HASH_ENGINE(yytext, *driver.loc.back()); } {CONFIG_SEC_HASH_KEY} { return p::make_CONFIG_SEC_HASH_KEY(yytext, *driver.loc.back()); } {CONFIG_SEC_HASH_PARAM} { return p::make_CONFIG_SEC_HASH_PARAM(yytext, *driver.loc.back()); } {CONFIG_SEC_HASH_METHOD_RX} { return p::make_CONFIG_SEC_HASH_METHOD_RX(yytext, *driver.loc.back()); } {CONFIG_SEC_HASH_METHOD_PM} { return p::make_CONFIG_SEC_HASH_METHOD_PM(yytext, *driver.loc.back()); } {CONFIG_DIR_GSB_DB}[ \t]+{CONFIG_VALUE_PATH} { return p::make_CONFIG_DIR_GSB_DB(parserSanitizer(strchr(yytext, ' ') + 1), *driver.loc.back()); } {CONFIG_DIR_GSB_DB}[ \t]+["]{CONFIG_VALUE_PATH}["] { return p::make_CONFIG_DIR_GSB_DB(parserSanitizer(strchr(yytext, ' ') + 1), *driver.loc.back()); } {CONFIG_SEC_GUARDIAN_LOG} { return p::make_CONFIG_SEC_GUARDIAN_LOG(yytext, *driver.loc.back()); } {CONFIG_SEC_INTERCEPT_ON_ERROR} { return p::make_CONFIG_SEC_INTERCEPT_ON_ERROR(yytext, *driver.loc.back()); } {CONFIG_SEC_CONN_R_STATE_LIMIT}{FREE_TEXT_NEW_LINE} { return p::make_CONFIG_SEC_CONN_R_STATE_LIMIT(yytext, *driver.loc.back()); } {CONFIG_SEC_CONN_W_STATE_LIMIT}{FREE_TEXT_NEW_LINE} { return p::make_CONFIG_SEC_CONN_W_STATE_LIMIT(yytext, *driver.loc.back()); } {CONFIG_SEC_SENSOR_ID}{FREE_TEXT_NEW_LINE} { return p::make_CONFIG_SEC_SENSOR_ID(yytext, *driver.loc.back()); } {CONFIG_SEC_RULE_INHERITANCE} { return p::make_CONFIG_SEC_RULE_INHERITANCE(yytext, *driver.loc.back()); } {CONFIG_SEC_RULE_PERF_TIME}[ \t]+{CONFIG_VALUE_NUMBER} { return p::make_CONFIG_SEC_RULE_PERF_TIME(strchr(yytext, ' ') + 1, *driver.loc.back()); } {CONFIG_SEC_STREAM_IN_BODY_INSPECTION} { return p::make_CONFIG_SEC_STREAM_IN_BODY_INSPECTION(yytext, *driver.loc.back()); } {CONFIG_SEC_STREAM_OUT_BODY_INSPECTION} { return p::make_CONFIG_SEC_STREAM_OUT_BODY_INSPECTION(yytext, *driver.loc.back()); } {CONFIG_SEC_DISABLE_BACKEND_COMPRESS} { return p::make_CONFIG_SEC_DISABLE_BACKEND_COMPRESS(yytext, *driver.loc.back()); } {DIRECTIVE} { BEGIN(TRANSACTION_TO_VARIABLE); return p::make_DIRECTIVE(yytext, *driver.loc.back()); } {CONFIG_DIR_SEC_DEFAULT_ACTION} { BEGIN(TRANSACTION_FROM_DIRECTIVE_TO_ACTIONS); return p::make_CONFIG_DIR_SEC_DEFAULT_ACTION(yytext, *driver.loc.back()); } {CONFIG_DIR_SEC_ACTION} { BEGIN(TRANSACTION_FROM_DIRECTIVE_TO_ACTIONS); return p::make_CONFIG_DIR_SEC_ACTION(yytext, *driver.loc.back()); } {CONFIG_SEC_REMOTE_RULES_FAIL_ACTION} { return p::make_CONFIG_SEC_REMOTE_RULES_FAIL_ACTION(yytext, *driver.loc.back()); } {CONFIG_SEC_COLLECTION_TIMEOUT}[ \t]+{CONFIG_VALUE_NUMBER} { return p::make_CONFIG_SEC_COLLECTION_TIMEOUT(strchr(yytext, ' ') + 1, *driver.loc.back()); } {CONFIG_SEC_HTTP_BLKEY}[ \t]+{FREE_TEXT_NEW_LINE} { return p::make_CONFIG_SEC_HTTP_BLKEY(strchr(yytext, ' ') + 1, *driver.loc.back()); } [ \t]*[\n] { driver.loc.back()->lines(1); driver.loc.back()->step(); } #[ \t]*SecRule[^\\].*\\[ \t]*[\r\n]* { driver.loc.back()->lines(1); driver.loc.back()->step(); BEGIN(COMMENT); } #[ \t]*SecAction[^\\].*\\[ \t]*[^\\n] { driver.loc.back()->lines(1); driver.loc.back()->step(); BEGIN(COMMENT); } #.* { driver.loc.back()->step(); /* comment, just ignore. */ } \r { driver.loc.back()->step(); /* carriage return, just ignore. */} ["] { return p::make_QUOTATION_MARK(yytext, *driver.loc.back()); } [,] { return p::make_COMMA(*driver.loc.back()); } { [ \t]* { BEGIN(EXPECTING_VARIABLE); } } { [|] { return p::make_PIPE(*driver.loc.back()); } [,] { return p::make_PIPE(*driver.loc.back()); } ["] { return p::make_QUOTATION_MARK(yytext, *driver.loc.back()); } {VAR_EXCLUSION} { return p::make_VAR_EXCLUSION(*driver.loc.back()); } {VAR_COUNT} { return p::make_VAR_COUNT(*driver.loc.back()); } } { [ \t]+ { if (state_variable_from == 0) { BEGIN(EXPECTING_OPERATOR_ENDS_WITH_SPACE); } else { state_variable_from = 0; BEGIN(INITIAL);} } [ \t]*\" { if (state_variable_from == 0) { BEGIN(EXPECTING_OPERATOR_ENDS_WITH_QUOTE); } else { state_variable_from = 0; BEGIN(INITIAL);} } [ \t]*[\\\n]*[ \t]* { if (state_variable_from == 0) { BEGIN(EXPECTING_OPERATOR_ENDS_WITH_SPACE); } else { state_variable_from = 0; BEGIN(INITIAL);} } [ \t]*[\\\n]*[ \t]*\" { if (state_variable_from == 0) { BEGIN(EXPECTING_OPERATOR_ENDS_WITH_QUOTE); } else { state_variable_from = 0; BEGIN(INITIAL);} } [ \t]*[\\\r\n]*[ \t]* { if (state_variable_from == 0) { BEGIN(EXPECTING_OPERATOR_ENDS_WITH_SPACE); } else { state_variable_from = 0; BEGIN(INITIAL);} } [ \t]*[\\\r\n]*[ \t]*\" { if (state_variable_from == 0) { BEGIN(EXPECTING_OPERATOR_ENDS_WITH_QUOTE); } else { state_variable_from = 0; BEGIN(INITIAL);} } } { [ \t]* { } [ \t]*\"[ \t]* { BEGIN(EXPECTING_ACTIONS_ENDS_WITH_DOUBLE_QUOTE); } [ \t]*\\\n[ \t]*\"[ \t]* { BEGIN(EXPECTING_ACTIONS_ENDS_WITH_DOUBLE_QUOTE); } [ \t]*\\\r\n[ \t]*\"[ \t]* { BEGIN(EXPECTING_ACTIONS_ENDS_WITH_DOUBLE_QUOTE); } } { . { BEGIN(LEXING_ERROR_VARIABLE); yyless(0); } {VARIABLE_ARGS_COMBINED_SIZE} { return p::make_VARIABLE_ARGS_COMBINED_SIZE(*driver.loc.back()); } {VARIABLE_ARGS_GET_NAMES} { return p::make_VARIABLE_ARGS_GET_NAMES(*driver.loc.back()); } {VARIABLE_ARGS_GET_NAMES}[:.] { BEGINX(EXPECTING_VAR_PARAMETER); return p::make_VARIABLE_ARGS_GET_NAMES(*driver.loc.back()); } {VARIABLE_ARGS_NAMES} { return p::make_VARIABLE_ARGS_NAMES(*driver.loc.back()); } {VARIABLE_ARGS_NAMES}[:.] { BEGINX(EXPECTING_VAR_PARAMETER); return p::make_VARIABLE_ARGS_NAMES(*driver.loc.back()); } {VARIABLE_ARGS_POST_NAMES} { return p::make_VARIABLE_ARGS_POST_NAMES(*driver.loc.back()); } {VARIABLE_ARGS_POST_NAMES}[:.] { BEGINX(EXPECTING_VAR_PARAMETER); return p::make_VARIABLE_ARGS_POST_NAMES(*driver.loc.back()); } {VARIABLE_AUTH_TYPE} { return p::make_VARIABLE_AUTH_TYPE(*driver.loc.back()); } {VARIABLE_FILES_COMBINED_SIZE} { return p::make_VARIABLE_FILES_COMBINED_SIZE(*driver.loc.back()); } {VARIABLE_FULL_REQUEST_LENGTH} { return p::make_VARIABLE_FULL_REQUEST_LENGTH(*driver.loc.back()); } {VARIABLE_FULL_REQUEST} { return p::make_VARIABLE_FULL_REQUEST(*driver.loc.back()); } {VARIABLE_INBOUND_DATA_ERROR} { return p::make_VARIABLE_INBOUND_DATA_ERROR(*driver.loc.back()); } {VARIABLE_MATCHED_VAR_NAME} { return p::make_VARIABLE_MATCHED_VAR_NAME(*driver.loc.back()); } {VARIABLE_MATCHED_VAR} { return p::make_VARIABLE_MATCHED_VAR(*driver.loc.back()); } {VARIABLE_MULTIPART_BOUNDARY_QUOTED} { return p::make_VARIABLE_MULTIPART_BOUNDARY_QUOTED(*driver.loc.back()); } {VARIABLE_MULTIPART_BOUNDARY_WHITESPACE} { return p::make_VARIABLE_MULTIPART_BOUNDARY_WHITESPACE(*driver.loc.back()); } {VARIABLE_MULTIPART_CRLF_LF_LINES} { return p::make_VARIABLE_MULTIPART_CRLF_LF_LINES(*driver.loc.back()); } {VARIABLE_MULTIPART_DATA_AFTER} { return p::make_VARIABLE_MULTIPART_DATA_AFTER(*driver.loc.back()); } {VARIABLE_MULTIPART_DATA_BEFORE} { return p::make_VARIABLE_MULTIPART_DATA_BEFORE(*driver.loc.back()); } {VARIABLE_MULTIPART_FILE_LIMIT_EXCEEDED} { return p::make_VARIABLE_MULTIPART_FILE_LIMIT_EXCEEDED(*driver.loc.back()); } {VARIABLE_MULTIPART_FILENAME}[:.] { BEGINX(EXPECTING_VAR_PARAMETER); return p::make_VARIABLE_MULTIPART_FILENAME(*driver.loc.back()); } {VARIABLE_MULTIPART_FILENAME} { return p::make_VARIABLE_MULTIPART_FILENAME(*driver.loc.back()); } {VARIABLE_MULTIPART_HEADER_FOLDING} { return p::make_VARIABLE_MULTIPART_HEADER_FOLDING(*driver.loc.back()); } {VARIABLE_MULTIPART_HEADER_FOLDING} { return p::make_VARIABLE_MULTIPART_HEADER_FOLDING(*driver.loc.back()); } {VARIABLE_MULTIPART_INVALID_HEADER_FOLDING} { return p::make_VARIABLE_MULTIPART_INVALID_HEADER_FOLDING(*driver.loc.back()); } {VARIABLE_MULTIPART_INVALID_PART} { return p::make_VARIABLE_MULTIPART_INVALID_PART(*driver.loc.back()); } {VARIABLE_MULTIPART_INVALID_QUOTING} { return p::make_VARIABLE_MULTIPART_INVALID_QUOTING(*driver.loc.back()); } {VARIABLE_MULTIPART_LF_LINE} { return p::make_VARIABLE_MULTIPART_LF_LINE(*driver.loc.back()); } {VARIABLE_MULTIPART_MISSING_SEMICOLON} { return p::make_VARIABLE_MULTIPART_MISSING_SEMICOLON(*driver.loc.back()); } {VARIABLE_MULTIPART_SEMICOLON_MISSING} { return p::make_VARIABLE_MULTIPART_SEMICOLON_MISSING(*driver.loc.back()); } {VARIABLE_MULTIPART_NAME}[:.] { BEGINX(EXPECTING_VAR_PARAMETER); return p::make_VARIABLE_MULTIPART_NAME(*driver.loc.back()); } {VARIABLE_MULTIPART_NAME} { return p::make_VARIABLE_MULTIPART_NAME(*driver.loc.back()); } {VARIABLE_MULTIPART_STRICT_ERROR} { return p::make_VARIABLE_MULTIPART_STRICT_ERROR(*driver.loc.back()); } {VARIABLE_MULTIPART_UNMATCHED_BOUNDARY} { return p::make_VARIABLE_MULTIPART_UNMATCHED_BOUNDARY(*driver.loc.back()); } {VARIABLE_OUTBOUND_DATA_ERROR} { return p::make_VARIABLE_OUTBOUND_DATA_ERROR(*driver.loc.back()); } {VARIABLE_PATH_INFO} { return p::make_VARIABLE_PATH_INFO(*driver.loc.back()); } {VARIABLE_QUERY_STRING} { return p::make_VARIABLE_QUERY_STRING(*driver.loc.back()); } {VARIABLE_REMOTE_ADDR} { return p::make_VARIABLE_REMOTE_ADDR(*driver.loc.back()); } {VARIABLE_REMOTE_HOST} { return p::make_VARIABLE_REMOTE_HOST(*driver.loc.back()); } {VARIABLE_REMOTE_PORT} { return p::make_VARIABLE_REMOTE_PORT(*driver.loc.back()); } {VARIABLE_REQBODY_ERROR_MSG} { return p::make_VARIABLE_REQBODY_ERROR_MSG(*driver.loc.back()); } {VARIABLE_REQBODY_ERROR} { return p::make_VARIABLE_REQBODY_ERROR(*driver.loc.back()); } {VARIABLE_REQBODY_PROCESSOR_ERROR_MSG} { return p::make_VARIABLE_REQBODY_PROCESSOR_ERROR_MSG(*driver.loc.back()); } {VARIABLE_REQBODY_PROCESSOR_ERROR} { return p::make_VARIABLE_REQBODY_PROCESSOR_ERROR(*driver.loc.back()); } {VARIABLE_REQBODY_PROCESSOR} { return p::make_VARIABLE_REQBODY_PROCESSOR(*driver.loc.back()); } {VARIABLE_REQUEST_BASENAME} { return p::make_VARIABLE_REQUEST_BASENAME(*driver.loc.back()); } {VARIABLE_REQUEST_BODY_LENGTH} { return p::make_VARIABLE_REQUEST_BODY_LENGTH(*driver.loc.back()); } {VARIABLE_REQUEST_BODY} { return p::make_VARIABLE_REQUEST_BODY(*driver.loc.back()); } {VARIABLE_REQUEST_FILE_NAME} { return p::make_VARIABLE_REQUEST_FILE_NAME(*driver.loc.back()); } {VARIABLE_REQUEST_HEADERS_NAMES} { return p::make_VARIABLE_REQUEST_HEADERS_NAMES(*driver.loc.back()); } {VARIABLE_REQUEST_HEADERS_NAMES}[:.] { BEGINX(EXPECTING_VAR_PARAMETER); return p::make_VARIABLE_REQUEST_HEADERS_NAMES(*driver.loc.back()); } {VARIABLE_REQUEST_LINE} { return p::make_VARIABLE_REQUEST_LINE(*driver.loc.back()); } {VARIABLE_REQUEST_METHOD} { return p::make_VARIABLE_REQUEST_METHOD(*driver.loc.back()); } {VARIABLE_REQUEST_PROTOCOL} { return p::make_VARIABLE_REQUEST_PROTOCOL(*driver.loc.back()); } {VARIABLE_REQUEST_URI_RAW} { return p::make_VARIABLE_REQUEST_URI_RAW(*driver.loc.back()); } {VARIABLE_REQUEST_URI} { return p::make_VARIABLE_REQUEST_URI(*driver.loc.back()); } {VARIABLE_RESPONSE_BODY} { return p::make_VARIABLE_RESPONSE_BODY(*driver.loc.back()); } {VARIABLE_RESPONSE_CONTENT_LENGTH} { return p::make_VARIABLE_RESPONSE_CONTENT_LENGTH(*driver.loc.back()); } {VARIABLE_RESPONSE_CONTENT_TYPE} { return p::make_VARIABLE_RESPONSE_CONTENT_TYPE(*driver.loc.back()); } {VARIABLE_RESPONSE_HEADERS_NAMES} { return p::make_VARIABLE_RESPONSE_HEADERS_NAMES(*driver.loc.back()); } {VARIABLE_RESPONSE_HEADERS_NAMES}[:.] { BEGINX(EXPECTING_VAR_PARAMETER); return p::make_VARIABLE_RESPONSE_HEADERS_NAMES(*driver.loc.back()); } {VARIABLE_RESPONSE_PROTOCOL} { return p::make_VARIABLE_RESPONSE_PROTOCOL(*driver.loc.back()); } {VARIABLE_RESPONSE_STATUS} { return p::make_VARIABLE_RESPONSE_STATUS(*driver.loc.back()); } {VARIABLE_SERVER_ADDR} { return p::make_VARIABLE_SERVER_ADDR(*driver.loc.back()); } {VARIABLE_SERVER_NAME} { return p::make_VARIABLE_SERVER_NAME(*driver.loc.back()); } {VARIABLE_SERVER_PORT} { return p::make_VARIABLE_SERVER_PORT(*driver.loc.back()); } {VARIABLE_SESSION_ID} { return p::make_VARIABLE_SESSION_ID(*driver.loc.back()); } {VARIABLE_UNIQUE_ID} { return p::make_VARIABLE_UNIQUE_ID(*driver.loc.back()); } {VARIABLE_URL_ENCODED_ERROR} { return p::make_VARIABLE_URL_ENCODED_ERROR(*driver.loc.back()); } {VARIABLE_USER_ID} { return p::make_VARIABLE_USER_ID(*driver.loc.back()); } {VARIABLE_WEB_APP_ID} { return p::make_VARIABLE_WEB_APP_ID(*driver.loc.back()); } {VARIABLE_ARGS} { return p::make_VARIABLE_ARGS(*driver.loc.back()); } {VARIABLE_ARGS}[:.] { BEGINX(EXPECTING_VAR_PARAMETER); return p::make_VARIABLE_ARGS(*driver.loc.back()); } {VARIABLE_ARGS_GET} { return p::make_VARIABLE_ARGS_GET(*driver.loc.back()); } {VARIABLE_ARGS_GET}[:.] { BEGINX(EXPECTING_VAR_PARAMETER); return p::make_VARIABLE_ARGS_GET(*driver.loc.back()); } {VARIABLE_ARGS_POST} { return p::make_VARIABLE_ARGS_POST(*driver.loc.back()); } {VARIABLE_ARGS_POST}[:.] { BEGINX(EXPECTING_VAR_PARAMETER); return p::make_VARIABLE_ARGS_POST(*driver.loc.back()); } {VARIABLE_FILES_SIZES} { return p::make_VARIABLE_FILES_SIZES(*driver.loc.back()); } {VARIABLE_FILES_SIZES}[:.] { BEGINX(EXPECTING_VAR_PARAMETER); return p::make_VARIABLE_FILES_SIZES(*driver.loc.back()); } {VARIABLE_FILES_NAMES} { return p::make_VARIABLE_FILES_NAMES(*driver.loc.back()); } {VARIABLE_FILES_NAMES}[:.] { BEGINX(EXPECTING_VAR_PARAMETER); return p::make_VARIABLE_FILES_NAMES(*driver.loc.back()); } {VARIABLE_FILES_TMP_CONTENT} { return p::make_VARIABLE_FILES_TMP_CONTENT(*driver.loc.back()); } {VARIABLE_FILES_TMP_CONTENT}[:.] { BEGINX(EXPECTING_VAR_PARAMETER); return p::make_VARIABLE_FILES_TMP_CONTENT(*driver.loc.back()); } {VARIABLE_MATCHED_VARS_NAMES} { return p::make_VARIABLE_MATCHED_VARS_NAMES(*driver.loc.back()); } {VARIABLE_MATCHED_VARS_NAMES}[:.] { BEGINX(EXPECTING_VAR_PARAMETER); return p::make_VARIABLE_MATCHED_VARS_NAMES(*driver.loc.back()); } {VARIABLE_MATCHED_VARS} { return p::make_VARIABLE_MATCHED_VARS(*driver.loc.back()); } {VARIABLE_MATCHED_VARS}[:.] { BEGINX(EXPECTING_VAR_PARAMETER); return p::make_VARIABLE_MATCHED_VARS(*driver.loc.back()); } {VARIABLE_FILES} { return p::make_VARIABLE_FILES(*driver.loc.back()); } {VARIABLE_FILES}[:.] { BEGINX(EXPECTING_VAR_PARAMETER); return p::make_VARIABLE_FILES(*driver.loc.back()); } {VARIABLE_REQUEST_COOKIES} { return p::make_VARIABLE_REQUEST_COOKIES(*driver.loc.back()); } {VARIABLE_REQUEST_COOKIES}[:.] { BEGINX(EXPECTING_VAR_PARAMETER); return p::make_VARIABLE_REQUEST_COOKIES(*driver.loc.back()); } {VARIABLE_REQUEST_HEADERS} { return p::make_VARIABLE_REQUEST_HEADERS(*driver.loc.back()); } {VARIABLE_REQUEST_HEADERS}[:.] { BEGINX(EXPECTING_VAR_PARAMETER); return p::make_VARIABLE_REQUEST_HEADERS(*driver.loc.back()); } {VARIABLE_RESPONSE_HEADERS} { return p::make_VARIABLE_RESPONSE_HEADERS(*driver.loc.back()); } {VARIABLE_RESPONSE_HEADERS}[:.] { BEGINX(EXPECTING_VAR_PARAMETER); return p::make_VARIABLE_RESPONSE_HEADERS(*driver.loc.back()); } {VARIABLE_GEO} { return p::make_VARIABLE_GEO(*driver.loc.back()); } {VARIABLE_GEO}[:.] { BEGINX(EXPECTING_VAR_PARAMETER); return p::make_VARIABLE_GEO(*driver.loc.back()); } {VARIABLE_REQUEST_COOKIES_NAMES} { return p::make_VARIABLE_REQUEST_COOKIES_NAMES(*driver.loc.back()); } {VARIABLE_REQUEST_COOKIES_NAMES}[:.] { BEGINX(EXPECTING_VAR_PARAMETER); return p::make_VARIABLE_REQUEST_COOKIES_NAMES(*driver.loc.back()); } {VARIABLE_RULE} { return p::make_VARIABLE_RULE(*driver.loc.back()); } {VARIABLE_RULE}[:.] { BEGINX(EXPECTING_VAR_PARAMETER); return p::make_VARIABLE_RULE(*driver.loc.back()); } {VARIABLE_FILES_TMP_NAMES} { return p::make_VARIABLE_FILES_TMP_NAMES(*driver.loc.back()); } {VARIABLE_FILES_TMP_NAMES}[:.] { BEGINX(EXPECTING_VAR_PARAMETER); return p::make_VARIABLE_FILES_TMP_NAMES(*driver.loc.back()); } {RUN_TIME_VAR_XML} { return p::make_RUN_TIME_VAR_XML(*driver.loc.back()); } {RUN_TIME_VAR_XML}[:.] { BEGINX(EXPECTING_VAR_PARAMETER); return p::make_RUN_TIME_VAR_XML(*driver.loc.back()); } {RUN_TIME_VAR_ENV} { return p::make_RUN_TIME_VAR_ENV(*driver.loc.back()); } {RUN_TIME_VAR_ENV}[:.] { BEGINX(EXPECTING_VAR_PARAMETER); return p::make_RUN_TIME_VAR_ENV(*driver.loc.back()); } {RUN_TIME_VAR_BLD} { return p::make_RUN_TIME_VAR_BLD(yytext, *driver.loc.back()); } {RUN_TIME_VAR_DUR} { return p::make_RUN_TIME_VAR_DUR(yytext, *driver.loc.back()); } {RUN_TIME_VAR_HSV} { return p::make_RUN_TIME_VAR_HSV(yytext, *driver.loc.back()); } {RUN_TIME_VAR_REMOTE_USER} { return p::make_RUN_TIME_VAR_REMOTE_USER(yytext, *driver.loc.back()); } {RUN_TIME_VAR_TIME_DAY} { return p::make_RUN_TIME_VAR_TIME_DAY(yytext, *driver.loc.back()); } {RUN_TIME_VAR_TIME_EPOCH} { return p::make_RUN_TIME_VAR_TIME_EPOCH(yytext, *driver.loc.back()); } {RUN_TIME_VAR_TIME_HOUR} { return p::make_RUN_TIME_VAR_TIME_HOUR(yytext, *driver.loc.back()); } {RUN_TIME_VAR_TIME_MIN} { return p::make_RUN_TIME_VAR_TIME_MIN(yytext, *driver.loc.back()); } {RUN_TIME_VAR_TIME_MON} { return p::make_RUN_TIME_VAR_TIME_MON(yytext, *driver.loc.back()); } {RUN_TIME_VAR_TIME_SEC} { return p::make_RUN_TIME_VAR_TIME_SEC(yytext, *driver.loc.back()); } {RUN_TIME_VAR_TIME_YEAR} { return p::make_RUN_TIME_VAR_TIME_YEAR(yytext, *driver.loc.back()); } {RUN_TIME_VAR_TIME} { return p::make_RUN_TIME_VAR_TIME(yytext, *driver.loc.back()); } {RUN_TIME_VAR_TIME_WDAY} { return p::make_RUN_TIME_VAR_TIME_WDAY(yytext, *driver.loc.back()); } {VARIABLE_WEBSERVER_ERROR_LOG} { driver.error (*driver.loc.back(), "Variable VARIABLE_WEBSERVER_ERROR_LOG is not supported by libModSecurity", ""); throw p::syntax_error(*driver.loc.back(), "");} {VARIABLE_GLOBAL} { return p::make_VARIABLE_GLOBAL(*driver.loc.back()); } {VARIABLE_IP} { return p::make_VARIABLE_IP(*driver.loc.back()); } {VARIABLE_RESOURCE} { return p::make_VARIABLE_RESOURCE(*driver.loc.back()); } {VARIABLE_SESSION} { return p::make_VARIABLE_SESSION(*driver.loc.back()); } {VARIABLE_STATUS} { return p::make_VARIABLE_STATUS(*driver.loc.back()); } {VARIABLE_STATUS_LINE} { return p::make_VARIABLE_STATUS_LINE(*driver.loc.back()); } {VARIABLE_TX} { return p::make_VARIABLE_TX(*driver.loc.back()); } {VARIABLE_USER} { return p::make_VARIABLE_USER(*driver.loc.back()); } } { {VARIABLE_GLOBAL}[:.] { BEGINX_(); return p::make_VARIABLE_GLOBAL(*driver.loc.back()); } {VARIABLE_IP}[:.] { BEGINX_(); return p::make_VARIABLE_IP(*driver.loc.back()); } {VARIABLE_RESOURCE}[:.] { BEGINX_(); return p::make_VARIABLE_RESOURCE(*driver.loc.back()); } {VARIABLE_SESSION}[:.] { BEGINX_(); return p::make_VARIABLE_SESSION(*driver.loc.back()); } {VARIABLE_TX}[:.] { BEGINX_(); return p::make_VARIABLE_TX(*driver.loc.back()); } {VARIABLE_USER}[:.] { BEGINX_(); return p::make_VARIABLE_USER(*driver.loc.back()); } } { {EQUALS_PLUS} { BEGIN_ACTION_WAITING_CONTENT(); return p::make_SETVAR_OPERATION_EQUALS_PLUS(*driver.loc.back()); } {EQUALS_MINUS} { BEGIN_ACTION_WAITING_CONTENT(); return p::make_SETVAR_OPERATION_EQUALS_MINUS(*driver.loc.back()); } {EQUALS} { BEGIN_ACTION_WAITING_CONTENT(); return p::make_SETVAR_OPERATION_EQUALS(*driver.loc.back()); } [\/]{DICT_ELEMENT_NO_PIPE}[\/][ ] { BEGIN_PREVIOUS(); yyless(yyleng - 1); return p::make_DICT_ELEMENT_REGEXP(std::string(yytext, 1, yyleng-2), *driver.loc.back()); } [\/]{DICT_ELEMENT_NO_PIPE}[\/][|] { BEGIN_PREVIOUS(); yyless(yyleng - 1); return p::make_DICT_ELEMENT_REGEXP(std::string(yytext, 1, yyleng-2), *driver.loc.back()); } ['][\/]{DICT_ELEMENT_WITH_PIPE}[\/]['] { BEGIN_PREVIOUS(); yyless(yyleng - 0); return p::make_DICT_ELEMENT_REGEXP(std::string(yytext, 2, yyleng-4), *driver.loc.back()); } ['][\/]{DICT_ELEMENT_WITH_PIPE}[\/]['][|] { BEGIN_PREVIOUS(); yyless(yyleng - 1); return p::make_DICT_ELEMENT_REGEXP(std::string(yytext, 2, yyleng-4), *driver.loc.back()); } {FREE_TEXT_EQUALS_MACRO_EXPANSION}['] { yyless(yyleng - 1); BEGIN_PREVIOUS(); return p::make_FREE_TEXT_QUOTE_MACRO_EXPANSION(yytext, *driver.loc.back()); } {FREE_TEXT_EQUALS_MACRO_EXPANSION} { return p::make_FREE_TEXT_QUOTE_MACRO_EXPANSION(yytext, *driver.loc.back()); } [\/]{DICT_ELEMENT_NO_PIPE}[\/][,] { BEGIN_PREVIOUS(); yyless(yyleng - 1); return p::make_DICT_ELEMENT_REGEXP(std::string(yytext, 1, yyleng-2), *driver.loc.back()); } ['][\/]{DICT_ELEMENT_NO_PIPE}[\/]['][,] { BEGIN_PREVIOUS(); yyless(yyleng - 1); return p::make_DICT_ELEMENT_REGEXP(std::string(yytext, 2, yyleng-4), *driver.loc.back()); } ["] { BEGIN_PREVIOUS(); yyless(0); } [,] { BEGIN_PREVIOUS(); yyless(0); } . { BEGINX(LEXING_ERROR_ACTION); yyless(0); } } { [\/]{DICT_ELEMENT_NO_PIPE}[\/] { BEGIN_PREVIOUS(); yyless(yyleng); return p::make_DICT_ELEMENT_REGEXP(std::string(yytext, 1, yyleng-2), *driver.loc.back()); } [\/]{DICT_ELEMENT_NO_PIPE}[\/][ ] { BEGIN_PREVIOUS(); yyless(yyleng - 1); return p::make_DICT_ELEMENT_REGEXP(std::string(yytext, 1, yyleng-2), *driver.loc.back()); } [\/]{DICT_ELEMENT_NO_PIPE}[\/][|] { BEGIN_PREVIOUS(); yyless(yyleng - 1); return p::make_DICT_ELEMENT_REGEXP(std::string(yytext, 1, yyleng-2), *driver.loc.back()); } ['][\/]{DICT_ELEMENT_WITH_PIPE}[\/]['] { BEGIN_PREVIOUS(); yyless(yyleng - 0); return p::make_DICT_ELEMENT_REGEXP(std::string(yytext, 2, yyleng-4), *driver.loc.back()); } ['][\/]{DICT_ELEMENT_WITH_PIPE}[\/]['][|] { BEGIN_PREVIOUS(); yyless(yyleng - 1); return p::make_DICT_ELEMENT_REGEXP(std::string(yytext, 2, yyleng-4), *driver.loc.back()); } {DICT_ELEMENT} { BEGIN_PREVIOUS(); return p::make_DICT_ELEMENT(yytext, *driver.loc.back()); } [\/]{DICT_ELEMENT_NO_PIPE}[\/][,] { BEGIN_PREVIOUS(); yyless(yyleng - 1); return p::make_DICT_ELEMENT_REGEXP(std::string(yytext, 1, yyleng-2), *driver.loc.back()); } ['][\/]{DICT_ELEMENT_NO_PIPE}[\/]['][,] { BEGIN_PREVIOUS(); yyless(yyleng - 1); return p::make_DICT_ELEMENT_REGEXP(std::string(yytext, 2, yyleng-4), *driver.loc.back()); } . { BEGINX(LEXING_ERROR_ACTION); yyless(0); } ["] { return p::make_QUOTATION_MARK(yytext, *driver.loc.back()); } } { {OPERATOR_GEOLOOKUP}[ ] { BEGIN(TRANSACTION_FROM_OPERATOR_TO_ACTIONS); return p::make_OPERATOR_GEOLOOKUP(*driver.loc.back()); } {OPERATOR_UNCONDITIONAL_MATCH}[ ] { BEGIN(TRANSACTION_FROM_OPERATOR_TO_ACTIONS); return p::make_OPERATOR_UNCONDITIONAL_MATCH(*driver.loc.back()); } {OPERATOR_DETECT_SQLI}[ ] { BEGIN(TRANSACTION_FROM_OPERATOR_TO_ACTIONS); return p::make_OPERATOR_DETECT_SQLI(*driver.loc.back()); } {OPERATOR_DETECT_XSS}[ ] { BEGIN(TRANSACTION_FROM_OPERATOR_TO_ACTIONS); return p::make_OPERATOR_DETECT_XSS(*driver.loc.back()); } {OPERATOR_VALIDATE_URL_ENCODING}[ ] { BEGIN(TRANSACTION_FROM_OPERATOR_TO_ACTIONS); return p::make_OPERATOR_VALIDATE_URL_ENCODING(*driver.loc.back()); } {OPERATOR_VALIDATE_UTF8_ENCODING}[ ] { BEGIN(TRANSACTION_FROM_OPERATOR_TO_ACTIONS); return p::make_OPERATOR_VALIDATE_UTF8_ENCODING(*driver.loc.back()); } } { {OPERATOR_GEOLOOKUP}[ ]*["] { BEGIN(TRANSACTION_FROM_OPERATOR_TO_ACTIONS); return p::make_OPERATOR_GEOLOOKUP(*driver.loc.back()); } {OPERATOR_UNCONDITIONAL_MATCH}[ ]*["] { BEGIN(TRANSACTION_FROM_OPERATOR_TO_ACTIONS); return p::make_OPERATOR_UNCONDITIONAL_MATCH(*driver.loc.back()); } {OPERATOR_DETECT_SQLI}[ ]*["] { BEGIN(TRANSACTION_FROM_OPERATOR_TO_ACTIONS); return p::make_OPERATOR_DETECT_SQLI(*driver.loc.back()); } {OPERATOR_DETECT_XSS}[ ]*["] { BEGIN(TRANSACTION_FROM_OPERATOR_TO_ACTIONS); return p::make_OPERATOR_DETECT_XSS(*driver.loc.back()); } {OPERATOR_VALIDATE_URL_ENCODING}[ ]*["] { BEGIN(TRANSACTION_FROM_OPERATOR_TO_ACTIONS); return p::make_OPERATOR_VALIDATE_URL_ENCODING(*driver.loc.back()); } {OPERATOR_VALIDATE_UTF8_ENCODING}[ ]*["] { BEGIN(TRANSACTION_FROM_OPERATOR_TO_ACTIONS); return p::make_OPERATOR_VALIDATE_UTF8_ENCODING(*driver.loc.back()); } } { {OPERATOR_WITHIN} { BEGIN_PARAMETER(); return p::make_OPERATOR_WITHIN(*driver.loc.back()); } {OPERATOR_CONTAINS_WORD} { BEGIN_PARAMETER(); return p::make_OPERATOR_CONTAINS_WORD(*driver.loc.back()); } {OPERATOR_CONTAINS} { BEGIN_PARAMETER(); return p::make_OPERATOR_CONTAINS(*driver.loc.back()); } {OPERATOR_ENDS_WITH} { BEGIN_PARAMETER(); return p::make_OPERATOR_ENDS_WITH(*driver.loc.back()); } {OPERATOR_EQ} { BEGIN_PARAMETER(); return p::make_OPERATOR_EQ(*driver.loc.back()); } {OPERATOR_GE} { BEGIN_PARAMETER(); return p::make_OPERATOR_GE(*driver.loc.back()); } {OPERATOR_GT} { BEGIN_PARAMETER(); return p::make_OPERATOR_GT(*driver.loc.back()); } {OPERATOR_IP_MATCH_FROM_FILE} { BEGIN_PARAMETER(); return p::make_OPERATOR_IP_MATCH_FROM_FILE(*driver.loc.back()); } {OPERATOR_IP_MATCH} { BEGIN_PARAMETER(); return p::make_OPERATOR_IP_MATCH(*driver.loc.back()); } {OPERATOR_LE} { BEGIN_PARAMETER(); return p::make_OPERATOR_LE(*driver.loc.back()); } {OPERATOR_LT} { BEGIN_PARAMETER(); return p::make_OPERATOR_LT(*driver.loc.back()); } {OPERATOR_PM_FROM_FILE} { BEGIN_PARAMETER(); return p::make_OPERATOR_PM_FROM_FILE(*driver.loc.back()); } {OPERATOR_PM} { BEGIN_PARAMETER(); return p::make_OPERATOR_PM(*driver.loc.back()); } {OPERATOR_RBL} { BEGIN_PARAMETER(); return p::make_OPERATOR_RBL( *driver.loc.back()); } {OPERATOR_RX} { BEGIN_PARAMETER(); return p::make_OPERATOR_RX(*driver.loc.back()); } {OPERATOR_RX_GLOBAL} { BEGIN_PARAMETER(); return p::make_OPERATOR_RX_GLOBAL(*driver.loc.back()); } {OPERATOR_STR_EQ} { BEGIN_PARAMETER(); return p::make_OPERATOR_STR_EQ(*driver.loc.back()); } {OPERATOR_STR_MATCH} { BEGIN_PARAMETER(); return p::make_OPERATOR_STR_MATCH(*driver.loc.back()); } {OPERATOR_BEGINS_WITH} { BEGIN_PARAMETER(); return p::make_OPERATOR_BEGINS_WITH(*driver.loc.back()); } {OPERATOR_INSPECT_FILE} { BEGIN_PARAMETER(); return p::make_OPERATOR_INSPECT_FILE(*driver.loc.back()); } {OPERATOR_FUZZY_HASH} { BEGIN_PARAMETER(); return p::make_OPERATOR_FUZZY_HASH(*driver.loc.back()); } {OPERATOR_VALIDATE_BYTE_RANGE} { BEGIN_PARAMETER(); return p::make_OPERATOR_VALIDATE_BYTE_RANGE(*driver.loc.back()); } {OPERATOR_VALIDATE_DTD} { BEGIN_PARAMETER(); return p::make_OPERATOR_VALIDATE_DTD(*driver.loc.back()); } {OPERATOR_VALIDATE_HASH} { BEGIN_PARAMETER(); return p::make_OPERATOR_VALIDATE_HASH(*driver.loc.back()); } {OPERATOR_VALIDATE_SCHEMA} { BEGIN_PARAMETER(); return p::make_OPERATOR_VALIDATE_SCHEMA(*driver.loc.back()); } {OPERATOR_VERIFY_CC} { BEGIN_PARAMETER(); return p::make_OPERATOR_VERIFY_CC(*driver.loc.back()); } {OPERATOR_VERIFY_CPF} { BEGIN_PARAMETER(); return p::make_OPERATOR_VERIFY_CPF(*driver.loc.back()); } {OPERATOR_VERIFY_SSN} { BEGIN_PARAMETER(); return p::make_OPERATOR_VERIFY_SSN(*driver.loc.back()); } {OPERATOR_VERIFY_SVNR} { BEGIN_PARAMETER(); return p::make_OPERATOR_VERIFY_SVNR(*driver.loc.back()); } {OPERATOR_GSB_LOOKUP} { BEGIN_PARAMETER(); return p::make_OPERATOR_GSB_LOOKUP(*driver.loc.back()); } {OPERATOR_RSUB} { BEGIN_PARAMETER(); return p::make_OPERATOR_RSUB(*driver.loc.back()); } {NOT} { return p::make_NOT(*driver.loc.back()); } . { BEGIN_NO_OP_INFORMED(); yyless(0); } } { [ ] { BEGIN(EXPECTING_PARAMETER_ENDS_WITH_SPACE); } } { [ ] { BEGIN(EXPECTING_PARAMETER_ENDS_WITH_QUOTE); } } { ["] { BEGIN(TRANSACTION_FROM_OPERATOR_PARAMETERS_TO_ACTIONS); } {FREE_TEXT_DOUBLE_QUOTE_MACRO_EXPANSION} { return p::make_FREE_TEXT_QUOTE_MACRO_EXPANSION(yytext, *driver.loc.back()); } } { [ ] { BEGIN(TRANSACTION_FROM_OPERATOR_PARAMETERS_TO_ACTIONS); } {FREE_TEXT_SPACE_MACRO_EXPANSION} { return p::make_FREE_TEXT_QUOTE_MACRO_EXPANSION(yytext, *driver.loc.back()); } } { {START_MACRO_VARIABLE} { BEGINX(EXPECTING_ACTION_PREDICATE_VARIABLE); } . { BEGIN(LEXING_ERROR); yyless(0); } } { ["] { BEGIN(TRANSACTION_FROM_OPERATOR_PARAMETERS_TO_ACTIONS); } {FREE_TEXT_DOUBLE_QUOTE_MACRO_EXPANSION} { return p::make_FREE_TEXT_QUOTE_MACRO_EXPANSION(yytext, *driver.loc.back()); } } { [ ] { BEGIN(TRANSACTION_FROM_OPERATOR_PARAMETERS_TO_ACTIONS); } {FREE_TEXT_SPACE_MACRO_EXPANSION} { return p::make_FREE_TEXT_QUOTE_MACRO_EXPANSION(yytext, *driver.loc.back()); } } { {START_MACRO_VARIABLE} { BEGINX(EXPECTING_ACTION_PREDICATE_VARIABLE); } . { BEGIN(LEXING_ERROR_VARIABLE); yyless(0); } } { [ ]+ { BEGIN(EXPECTING_ACTIONS_ONLY_ONE); } [ \t]*\\\n[ \t]*\"[ \t]* { driver.loc.back()->lines(1); driver.loc.back()->step(); BEGIN(EXPECTING_ACTIONS_ENDS_WITH_DOUBLE_QUOTE); } [ \t]*\n[ \t]*\"[ \t]* { driver.loc.back()->lines(1); driver.loc.back()->step(); BEGIN(EXPECTING_ACTIONS_ENDS_WITH_DOUBLE_QUOTE); } [ \t]*\\\n[ \t]* { driver.loc.back()->lines(1); driver.loc.back()->step(); BEGIN(EXPECTING_ACTIONS_ONLY_ONE); } [ \t]*\n[ \t]* { driver.loc.back()->lines(1); driver.loc.back()->step(); BEGIN(EXPECTING_ACTIONS_ONLY_ONE); } [ \t]*\\\r\\\n[ \t]*\"[ \t]* { driver.loc.back()->lines(1); driver.loc.back()->step(); BEGIN(EXPECTING_ACTIONS_ENDS_WITH_DOUBLE_QUOTE); } [ \t]*\\\r\n[ \t]*\"[ \t]* { driver.loc.back()->lines(1); driver.loc.back()->step(); BEGIN(EXPECTING_ACTIONS_ENDS_WITH_DOUBLE_QUOTE); } [ \t]*\r\\\n[ \t]*\"[ \t]* { driver.loc.back()->lines(1); driver.loc.back()->step(); BEGIN(EXPECTING_ACTIONS_ENDS_WITH_DOUBLE_QUOTE); } [ \t]*\r\n[ \t]*\"[ \t]* { driver.loc.back()->lines(1); driver.loc.back()->step(); BEGIN(EXPECTING_ACTIONS_ENDS_WITH_DOUBLE_QUOTE); } [ \t]*\\\r\\\n[ \t]* { driver.loc.back()->lines(1); driver.loc.back()->step(); BEGIN(EXPECTING_ACTIONS_ONLY_ONE); } [ \t]*\\\r\n[ \t]* { driver.loc.back()->lines(1); driver.loc.back()->step(); BEGIN(EXPECTING_ACTIONS_ONLY_ONE); } [ \t]*\r\\\n[ \t]* { driver.loc.back()->lines(1); driver.loc.back()->step(); BEGIN(EXPECTING_ACTIONS_ONLY_ONE); } [ \t]*\r\n[ \t]* { driver.loc.back()->lines(1); driver.loc.back()->step(); BEGIN(EXPECTING_ACTIONS_ONLY_ONE); } [ \t]*\"[ \t]* { BEGIN(EXPECTING_ACTIONS_ENDS_WITH_DOUBLE_QUOTE); } [ \t]*\"[ \t]*\\\n[ \t]*\"[ \t]* { driver.loc.back()->lines(1); driver.loc.back()->step(); BEGIN(EXPECTING_ACTIONS_ENDS_WITH_DOUBLE_QUOTE); } [ \t]*\"[ \t]*\n[ \t]*\"[ \t]* { driver.loc.back()->lines(1); driver.loc.back()->step(); BEGIN(EXPECTING_ACTIONS_ENDS_WITH_DOUBLE_QUOTE); } [ \t]*\"[ \t]*\\\r\n[ \t]*\"[ \t]* { driver.loc.back()->lines(1); driver.loc.back()->step(); BEGIN(EXPECTING_ACTIONS_ENDS_WITH_DOUBLE_QUOTE); } [ \t]*\"[ \t]*\\\r\\\n[ \t]*\"[ \t]* { driver.loc.back()->lines(1); driver.loc.back()->step(); BEGIN(EXPECTING_ACTIONS_ENDS_WITH_DOUBLE_QUOTE); } [ \t]*\"[ \t]*\r\n[ \t]*\"[ \t]* { driver.loc.back()->lines(1); driver.loc.back()->step(); BEGIN(EXPECTING_ACTIONS_ENDS_WITH_DOUBLE_QUOTE); } [ \t]*\"[ \t]*\r\\\n[ \t]*\"[ \t]* { driver.loc.back()->lines(1); driver.loc.back()->step(); BEGIN(EXPECTING_ACTIONS_ENDS_WITH_DOUBLE_QUOTE); } [ \t]*\"[ \t]*\"[ \t]* { BEGIN(EXPECTING_ACTIONS_ENDS_WITH_DOUBLE_QUOTE); } } { [ \t]+ { } [ \t]*\\\n[ \t]* { driver.loc.back()->lines(1); driver.loc.back()->step(); } [ \t]*\\\r\n[ \t]* { driver.loc.back()->lines(1); driver.loc.back()->step(); } } { .*[ \t]*\\\n[ \t]* { driver.loc.back()->lines(1); driver.loc.back()->step(); } .*[ \t]*\\\r\n[ \t]* { driver.loc.back()->lines(1); driver.loc.back()->step(); } .*[^\\] { BEGIN(INITIAL); driver.loc.back()->lines(1); driver.loc.back()->step(); } } . { BEGIN(LEXING_ERROR); yyless(0); } .+ { driver.error (*driver.loc.back(), "Invalid input: ", yytext); throw p::syntax_error(*driver.loc.back(), ""); } .+ { driver.error (*driver.loc.back(), "Expecting an action, got: ", yytext); throw p::syntax_error(*driver.loc.back(), ""); } .+ { driver.error (*driver.loc.back(), "Expecting a variable, got: : ", yytext); throw p::syntax_error(*driver.loc.back(), ""); } <> { if (yyin) { fclose(yyin); } yypop_buffer_state(); if (!YY_CURRENT_BUFFER) { return p::make_END(*driver.loc.back()); } yy::location *l = driver.loc.back(); driver.loc.pop_back(); delete l; } {CONFIG_INCLUDE}[ \t]+{CONFIG_VALUE_PATH} { std::string err; const char *file = strchr(yytext, ' ') + 1; std::string fi = modsecurity::utils::find_resource(file, *driver.loc.back()->end.filename, &err); if (fi.empty() == true) { BEGIN(INITIAL); driver.error (*driver.loc.back(), "", file + std::string(": Not able to open file. ") + err); throw p::syntax_error(*driver.loc.back(), ""); } std::list files = modsecurity::utils::expandEnv(fi, 0); files.reverse(); for (auto& s: files) { std::string err; std::string f = modsecurity::utils::find_resource(s, *driver.loc.back()->end.filename, &err); driver.loc.push_back(new yy::location()); driver.loc.back()->begin.filename = driver.loc.back()->end.filename = new std::string(f); yyin = fopen(f.c_str(), "r" ); if (!yyin) { BEGIN(INITIAL); driver.loc.pop_back(); driver.error (*driver.loc.back(), "", s + std::string(": Not able to open file. ") + err); throw p::syntax_error(*driver.loc.back(), ""); } yypush_buffer_state(yy_create_buffer( yyin, YY_BUF_SIZE )); } } {CONFIG_INCLUDE}[ \t]+["]{CONFIG_VALUE_PATH}["] { std::string err; const char *file = strchr(yytext, ' ') + 1; char *f = strdup(file + 1); f[strlen(f)-1] = '\0'; std::string fi = modsecurity::utils::find_resource(f, *driver.loc.back()->end.filename, &err); if (fi.empty() == true) { BEGIN(INITIAL); driver.error (*driver.loc.back(), "", file + std::string(": Not able to open file. ") + err); throw p::syntax_error(*driver.loc.back(), ""); } std::list files = modsecurity::utils::expandEnv(fi, 0); files.reverse(); for (auto& s: files) { std::string f = modsecurity::utils::find_resource(s, *driver.loc.back()->end.filename, &err); driver.loc.push_back(new yy::location()); driver.loc.back()->begin.filename = driver.loc.back()->end.filename = new std::string(f); yyin = fopen(f.c_str(), "r" ); if (!yyin) { BEGIN(INITIAL); driver.loc.pop_back(); driver.error (*driver.loc.back(), "", s + std::string(": Not able to open file. ") + err); throw p::syntax_error(*driver.loc.back(), ""); } yypush_buffer_state(yy_create_buffer( yyin, YY_BUF_SIZE )); } free(f); } {CONFIG_SEC_REMOTE_RULES}[ ][^ ]+[ ][^\n\r ]+ { HttpsClient c; std::string key; std::string url; std::vector conf = modsecurity::utils::string::split(yytext, ' '); if (conf.size() < 2) { driver.error (*driver.loc.back(), "", "SecRemoteRules demands a key and a URI"); throw p::syntax_error(*driver.loc.back(), ""); } key = conf[1]; url = conf[2]; c.setKey(key); driver.loc.push_back(new yy::location()); driver.loc.back()->begin.filename = driver.loc.back()->end.filename = new std::string(url); YY_BUFFER_STATE temp = YY_CURRENT_BUFFER; yypush_buffer_state(temp); bool ret = c.download(url); if (ret == false) { BEGIN(INITIAL); if (driver.m_remoteRulesActionOnFailed == RulesSet::OnFailedRemoteRulesAction::WarnOnFailedRemoteRulesAction) { /** TODO: Implement the server logging mechanism. */ } if (driver.m_remoteRulesActionOnFailed == RulesSet::OnFailedRemoteRulesAction::AbortOnFailedRemoteRulesAction) { driver.error (*driver.loc.back(), "", yytext + std::string(" - Failed to download: ") + c.error); throw p::syntax_error(*driver.loc.back(), ""); } } yy_scan_string(c.content.c_str()); } %% namespace modsecurity { bool Driver::scan_begin () { yy_flex_debug = trace_scanning; if (buffer.empty() == false) { yy_scan_string(buffer.c_str()); return true; } return false; } void Driver::scan_end () { yylex_destroy(); BEGIN(INITIAL); } } modsecurity-v3.0.6/src/parser/seclang-parser.yy0000664000175000017500000032213414146026157022766 0ustar mhsvierulamhsvierula%skeleton "lalr1.cc" /* -*- C++ -*- */ %require "3.0.2" %defines %define parser_class_name {seclang_parser} %define api.token.constructor %define api.value.type variant //%define api.namespace {modsecurity::yy} %define parse.assert %code requires { #include #include namespace ModSecurity { namespace Parser { class Driver; } } #include "modsecurity/rule_unconditional.h" #include "src/rule_script.h" #include "src/actions/accuracy.h" #include "src/actions/audit_log.h" #include "src/actions/block.h" #include "src/actions/capture.h" #include "src/actions/chain.h" #include "src/actions/ctl/audit_log_parts.h" #include "src/actions/ctl/request_body_access.h" #include "src/actions/ctl/rule_engine.h" #include "src/actions/ctl/request_body_processor_json.h" #include "src/actions/ctl/request_body_processor_xml.h" #include "src/actions/ctl/request_body_processor_urlencoded.h" #include "src/actions/ctl/rule_remove_by_id.h" #include "src/actions/ctl/rule_remove_by_tag.h" #include "src/actions/ctl/rule_remove_target_by_id.h" #include "src/actions/ctl/rule_remove_target_by_tag.h" #include "src/actions/data/status.h" #include "src/actions/disruptive/allow.h" #include "src/actions/disruptive/deny.h" #include "src/actions/disruptive/drop.h" #include "src/actions/disruptive/pass.h" #include "src/actions/disruptive/redirect.h" #include "src/actions/init_col.h" #include "src/actions/exec.h" #include "src/actions/log_data.h" #include "src/actions/log.h" #include "src/actions/maturity.h" #include "src/actions/msg.h" #include "src/actions/multi_match.h" #include "src/actions/no_audit_log.h" #include "src/actions/no_log.h" #include "src/actions/phase.h" #include "src/actions/rev.h" #include "src/actions/rule_id.h" #include "src/actions/set_env.h" #include "src/actions/set_rsc.h" #include "src/actions/set_sid.h" #include "src/actions/set_uid.h" #include "src/actions/set_var.h" #include "src/actions/severity.h" #include "src/actions/skip_after.h" #include "src/actions/skip.h" #include "src/actions/tag.h" #include "src/actions/ver.h" #include "src/actions/xmlns.h" #include "src/actions/transformations/none.h" #include "src/actions/transformations/transformation.h" #include "src/actions/transformations/url_decode_uni.h" #include "src/actions/transformations/hex_encode.h" #include "src/actions/transformations/parity_even_7bit.h" #include "src/actions/transformations/utf8_to_unicode.h" #include "src/actions/transformations/parity_zero_7bit.h" #include "src/actions/transformations/sql_hex_decode.h" #include "src/actions/transformations/replace_comments.h" #include "src/actions/transformations/none.h" #include "src/actions/transformations/url_decode.h" #include "src/actions/transformations/lower_case.h" #include "src/actions/transformations/upper_case.h" #include "src/actions/transformations/hex_decode.h" #include "src/actions/transformations/url_encode.h" #include "src/actions/transformations/js_decode.h" #include "src/actions/transformations/url_decode_uni.h" #include "src/actions/transformations/parity_odd_7bit.h" #include "src/actions/transformations/transformation.h" #include "src/actions/transformations/trim_right.h" #include "src/actions/transformations/escape_seq_decode.h" #include "src/actions/transformations/base64_decode_ext.h" #include "src/actions/transformations/base64_decode.h" #include "src/actions/transformations/trim.h" #include "src/actions/transformations/cmd_line.h" #include "src/actions/transformations/replace_nulls.h" #include "src/actions/transformations/md5.h" #include "src/actions/transformations/length.h" #include "src/actions/transformations/sha1.h" #include "src/actions/transformations/compress_whitespace.h" #include "src/actions/transformations/normalise_path_win.h" #include "src/actions/transformations/remove_nulls.h" #include "src/actions/transformations/remove_comments.h" #include "src/actions/transformations/normalise_path.h" #include "src/actions/transformations/html_entity_decode.h" #include "src/actions/transformations/trim_left.h" #include "src/actions/transformations/remove_comments_char.h" #include "src/actions/transformations/base64_encode.h" #include "src/actions/transformations/remove_whitespace.h" #include "src/actions/transformations/css_decode.h" #include "src/operators/begins_with.h" #include "src/operators/contains.h" #include "src/operators/contains_word.h" #include "src/operators/detect_sqli.h" #include "src/operators/detect_xss.h" #include "src/operators/ends_with.h" #include "src/operators/eq.h" #include "src/operators/fuzzy_hash.h" #include "src/operators/ge.h" #include "src/operators/geo_lookup.h" #include "src/operators/gsblookup.h" #include "src/operators/gt.h" #include "src/operators/inspect_file.h" #include "src/operators/ip_match_f.h" #include "src/operators/ip_match_from_file.h" #include "src/operators/ip_match.h" #include "src/operators/le.h" #include "src/operators/lt.h" #include "src/operators/no_match.h" #include "src/operators/operator.h" #include "src/operators/pm_f.h" #include "src/operators/pm_from_file.h" #include "src/operators/pm.h" #include "src/operators/rbl.h" #include "src/operators/rsub.h" #include "src/operators/rx.h" #include "src/operators/rx_global.h" #include "src/operators/str_eq.h" #include "src/operators/str_match.h" #include "src/operators/unconditional_match.h" #include "src/operators/validate_byte_range.h" #include "src/operators/validate_dtd.h" #include "src/operators/validate_hash.h" #include "src/operators/validate_schema.h" #include "src/operators/validate_url_encoding.h" #include "src/operators/validate_utf8_encoding.h" #include "src/operators/verify_cc.h" #include "src/operators/verify_cpf.h" #include "src/operators/verify_ssn.h" #include "src/operators/verify_svnr.h" #include "src/operators/within.h" #include "modsecurity/audit_log.h" #include "modsecurity/modsecurity.h" #include "modsecurity/rules_set_properties.h" #include "modsecurity/rule.h" #include "src/operators/operator.h" #include "src/utils/geo_lookup.h" #include "src/utils/string.h" #include "src/utils/system.h" #include "src/variables/args_combined_size.h" #include "src/variables/args_get.h" #include "src/variables/args_get_names.h" #include "src/variables/args.h" #include "src/variables/args_names.h" #include "src/variables/args_post.h" #include "src/variables/args_post_names.h" #include "src/variables/auth_type.h" #include "src/variables/duration.h" #include "src/variables/env.h" #include "src/variables/files_combined_size.h" #include "src/variables/files.h" #include "src/variables/files_names.h" #include "src/variables/files_sizes.h" #include "src/variables/files_tmp_content.h" #include "src/variables/files_tmp_names.h" #include "src/variables/full_request.h" #include "src/variables/full_request_length.h" #include "src/variables/geo.h" #include "src/variables/highest_severity.h" #include "src/variables/inbound_data_error.h" #include "src/variables/matched_var.h" #include "src/variables/matched_var_name.h" #include "src/variables/matched_vars.h" #include "src/variables/matched_vars_names.h" #include "src/variables/modsec_build.h" #include "src/variables/multipart_boundary_quoted.h" #include "src/variables/multipart_boundary_whitespace.h" #include "src/variables/multipart_crlf_lf_lines.h" #include "src/variables/multipart_data_after.h" #include "src/variables/multipart_data_before.h" #include "src/variables/multipart_file_limit_exceeded.h" #include "src/variables/multipart_file_name.h" #include "src/variables/multipart_header_folding.h" #include "src/variables/multipart_invalid_header_folding.h" #include "src/variables/multipart_invalid_part.h" #include "src/variables/multipart_invalid_quoting.h" #include "src/variables/multipart_lf_line.h" #include "src/variables/multipart_missing_semicolon.h" #include "src/variables/multipart_name.h" #include "src/variables/multipart_strict_error.h" #include "src/variables/multipart_unmatched_boundary.h" #include "src/variables/outbound_data_error.h" #include "src/variables/path_info.h" #include "src/variables/query_string.h" #include "src/variables/remote_addr.h" #include "src/variables/remote_host.h" #include "src/variables/remote_port.h" #include "src/variables/remote_user.h" #include "src/variables/reqbody_error.h" #include "src/variables/reqbody_error_msg.h" #include "src/variables/reqbody_processor_error.h" #include "src/variables/reqbody_processor_error_msg.h" #include "src/variables/reqbody_processor.h" #include "src/variables/request_base_name.h" #include "src/variables/request_body.h" #include "src/variables/request_body_length.h" #include "src/variables/request_cookies.h" #include "src/variables/request_cookies_names.h" #include "src/variables/request_file_name.h" #include "src/variables/request_headers.h" #include "src/variables/request_headers_names.h" #include "src/variables/request_line.h" #include "src/variables/request_method.h" #include "src/variables/request_protocol.h" #include "src/variables/request_uri.h" #include "src/variables/request_uri_raw.h" #include "src/variables/resource.h" #include "src/variables/response_body.h" #include "src/variables/response_content_length.h" #include "src/variables/response_content_type.h" #include "src/variables/response_headers.h" #include "src/variables/response_headers_names.h" #include "src/variables/response_protocol.h" #include "src/variables/response_status.h" #include "src/variables/rule.h" #include "src/variables/server_addr.h" #include "src/variables/server_name.h" #include "src/variables/server_port.h" #include "src/variables/session_id.h" #include "src/variables/web_app_id.h" #include "src/variables/time_day.h" #include "src/variables/time_epoch.h" #include "src/variables/time.h" #include "src/variables/time_hour.h" #include "src/variables/time_min.h" #include "src/variables/time_mon.h" #include "src/variables/time_sec.h" #include "src/variables/time_wday.h" #include "src/variables/time_year.h" #include "src/variables/tx.h" #include "src/variables/unique_id.h" #include "src/variables/url_encoded_error.h" #include "src/variables/user.h" #include "src/variables/user_id.h" #include "src/variables/variable.h" #include "src/variables/xml.h" #include "src/variables/ip.h" #include "src/variables/global.h" #include "src/variables/session.h" #include "src/variables/status.h" using namespace modsecurity; using namespace modsecurity::variables; using namespace modsecurity::Utils; using namespace modsecurity::operators; #define CHECK_VARIATION_DECL \ Variable *var = NULL; \ bool t = false; #define CHECK_VARIATION(a) \ if (var == NULL) { \ if (name.at(0) == std::string(#a).at(0)) { \ name.erase(0, 1); \ t = true ; \ } \ } else { \ t = false; \ } \ if (t) #define ACTION_NOT_SUPPORTED(a, b) \ driver.error(b, "Action: " + std::string(a) + " is not yet supported."); \ YYERROR; #define OPERATOR_NOT_SUPPORTED(a, b) \ driver.error(b, "Operator: " + std::string(a) + " is not yet supported."); \ YYERROR; #define ACTION_INIT(a, b) \ std::string error; \ if (a->init(&error) == false) { \ driver.error(b, error); \ YYERROR; \ } #define OPERATOR_CONTAINER(a, b) \ std::unique_ptr c(b); \ a = std::move(c); #define ACTION_CONTAINER(a, b) \ std::unique_ptr c(b); \ a = std::move(c); #define VARIABLE_CONTAINER(a, b) \ std::unique_ptr c(b); \ a = std::move(c); } // The parsing context. %param { modsecurity::Parser::Driver& driver } %locations %initial-action { // Initialize the initial location. @$.begin.filename = @$.end.filename = new std::string(driver.file); }; %define parse.trace %define parse.error verbose %code { #include "src/parser/driver.h" } %define api.token.prefix {TOK_} %token END 0 "end of file" COMMA "," CONFIG_CONTENT_INJECTION "CONFIG_CONTENT_INJECTION" CONGIG_DIR_RESPONSE_BODY_MP_CLEAR "CONGIG_DIR_RESPONSE_BODY_MP_CLEAR" PIPE NEW_LINE VAR_COUNT VAR_EXCLUSION VARIABLE_ARGS VARIABLE_ARGS_POST VARIABLE_ARGS_GET VARIABLE_FILES_SIZES VARIABLE_FILES_NAMES VARIABLE_FILES_TMP_CONTENT VARIABLE_MULTIPART_FILENAME VARIABLE_MULTIPART_NAME VARIABLE_MATCHED_VARS_NAMES VARIABLE_MATCHED_VARS VARIABLE_FILES VARIABLE_REQUEST_COOKIES VARIABLE_REQUEST_HEADERS VARIABLE_RESPONSE_HEADERS VARIABLE_GEO VARIABLE_REQUEST_COOKIES_NAMES VARIABLE_ARGS_COMBINED_SIZE VARIABLE_ARGS_GET_NAMES VARIABLE_RULE VARIABLE_ARGS_NAMES "Variable ARGS_NAMES" VARIABLE_ARGS_POST_NAMES VARIABLE_AUTH_TYPE "AUTH_TYPE" VARIABLE_FILES_COMBINED_SIZE "FILES_COMBINED_SIZE" VARIABLE_FILES_TMP_NAMES "FILES_TMPNAMES" VARIABLE_FULL_REQUEST "FULL_REQUEST" VARIABLE_FULL_REQUEST_LENGTH "FULL_REQUEST_LENGTH" VARIABLE_INBOUND_DATA_ERROR "INBOUND_DATA_ERROR" VARIABLE_MATCHED_VAR "MATCHED_VAR" VARIABLE_MATCHED_VAR_NAME "MATCHED_VAR_NAME" VARIABLE_MULTIPART_BOUNDARY_QUOTED VARIABLE_MULTIPART_BOUNDARY_WHITESPACE VARIABLE_MULTIPART_CRLF_LF_LINES "MULTIPART_CRLF_LF_LINES" VARIABLE_MULTIPART_DATA_AFTER "MULTIPART_DATA_AFTER" VARIABLE_MULTIPART_DATA_BEFORE VARIABLE_MULTIPART_FILE_LIMIT_EXCEEDED "MULTIPART_FILE_LIMIT_EXCEEDED" VARIABLE_MULTIPART_HEADER_FOLDING "MULTIPART_HEADER_FOLDING" VARIABLE_MULTIPART_INVALID_HEADER_FOLDING "MULTIPART_INVALID_HEADER_FOLDING" VARIABLE_MULTIPART_INVALID_PART VARIABLE_MULTIPART_INVALID_QUOTING "MULTIPART_INVALID_QUOTING" VARIABLE_MULTIPART_LF_LINE VARIABLE_MULTIPART_MISSING_SEMICOLON VARIABLE_MULTIPART_SEMICOLON_MISSING VARIABLE_MULTIPART_STRICT_ERROR "MULTIPART_STRICT_ERROR" VARIABLE_MULTIPART_UNMATCHED_BOUNDARY "MULTIPART_UNMATCHED_BOUNDARY" VARIABLE_OUTBOUND_DATA_ERROR "OUTBOUND_DATA_ERROR" VARIABLE_PATH_INFO "PATH_INFO" VARIABLE_QUERY_STRING "QUERY_STRING" VARIABLE_REMOTE_ADDR "REMOTE_ADDR" VARIABLE_REMOTE_HOST "REMOTE_HOST" VARIABLE_REMOTE_PORT "REMOTE_PORT" VARIABLE_REQBODY_ERROR_MSG "REQBODY_ERROR_MSG" VARIABLE_REQBODY_ERROR "REQBODY_ERROR" VARIABLE_REQBODY_PROCESSOR_ERROR_MSG "REQBODY_PROCESSOR_ERROR_MSG" VARIABLE_REQBODY_PROCESSOR_ERROR "REQBODY_PROCESSOR_ERROR" VARIABLE_REQBODY_PROCESSOR "REQBODY_PROCESSOR" VARIABLE_REQUEST_BASENAME "REQUEST_BASENAME" VARIABLE_REQUEST_BODY_LENGTH "REQUEST_BODY_LENGTH" VARIABLE_REQUEST_BODY "REQUEST_BODY" VARIABLE_REQUEST_FILE_NAME "REQUEST_FILENAME" VARIABLE_REQUEST_HEADERS_NAMES VARIABLE_REQUEST_LINE "REQUEST_LINE" VARIABLE_REQUEST_METHOD "REQUEST_METHOD" VARIABLE_REQUEST_PROTOCOL "REQUEST_PROTOCOL" VARIABLE_REQUEST_URI_RAW "REQUEST_URI_RAW" VARIABLE_REQUEST_URI "REQUEST_URI" VARIABLE_RESOURCE "RESOURCE" VARIABLE_RESPONSE_BODY "RESPONSE_BODY" VARIABLE_RESPONSE_CONTENT_LENGTH "RESPONSE_CONTENT_LENGTH" VARIABLE_RESPONSE_CONTENT_TYPE VARIABLE_RESPONSE_HEADERS_NAMES VARIABLE_RESPONSE_PROTOCOL "RESPONSE_PROTOCOL" VARIABLE_RESPONSE_STATUS "RESPONSE_STATUS" VARIABLE_SERVER_ADDR "SERVER_ADDR" VARIABLE_SERVER_NAME "SERVER_NAME" VARIABLE_SERVER_PORT "SERVER_PORT" VARIABLE_SESSION_ID "SESSIONID" VARIABLE_UNIQUE_ID "UNIQUE_ID" VARIABLE_URL_ENCODED_ERROR "URLENCODED_ERROR" VARIABLE_USER_ID "USERID" VARIABLE_WEB_APP_ID "WEBAPPID" VARIABLE_STATUS "VARIABLE_STATUS" VARIABLE_STATUS_LINE "VARIABLE_STATUS_LINE" VARIABLE_IP "VARIABLE_IP" VARIABLE_GLOBAL "VARIABLE_GLOBAL" VARIABLE_TX "VARIABLE_TX" VARIABLE_SESSION "VARIABLE_SESSION" VARIABLE_USER "VARIABLE_USER" RUN_TIME_VAR_ENV "RUN_TIME_VAR_ENV" RUN_TIME_VAR_XML "RUN_TIME_VAR_XML" ACTION_SETVAR "SetVar" SETVAR_OPERATION_EQUALS SETVAR_OPERATION_EQUALS_PLUS SETVAR_OPERATION_EQUALS_MINUS NOT "NOT" OPERATOR_BEGINS_WITH "OPERATOR_BEGINS_WITH" OPERATOR_CONTAINS "OPERATOR_CONTAINS" OPERATOR_CONTAINS_WORD "OPERATOR_CONTAINS_WORD" OPERATOR_DETECT_SQLI "OPERATOR_DETECT_SQLI" OPERATOR_DETECT_XSS "OPERATOR_DETECT_XSS" OPERATOR_ENDS_WITH "OPERATOR_ENDS_WITH" OPERATOR_EQ "OPERATOR_EQ" OPERATOR_FUZZY_HASH "OPERATOR_FUZZY_HASH" OPERATOR_GEOLOOKUP "OPERATOR_GEOLOOKUP" OPERATOR_GE "OPERATOR_GE" OPERATOR_GSB_LOOKUP "OPERATOR_GSB_LOOKUP" OPERATOR_GT "OPERATOR_GT" OPERATOR_INSPECT_FILE "OPERATOR_INSPECT_FILE" OPERATOR_IP_MATCH_FROM_FILE "OPERATOR_IP_MATCH_FROM_FILE" OPERATOR_IP_MATCH "OPERATOR_IP_MATCH" OPERATOR_LE "OPERATOR_LE" OPERATOR_LT "OPERATOR_LT" OPERATOR_PM_FROM_FILE "OPERATOR_PM_FROM_FILE" OPERATOR_PM "OPERATOR_PM" OPERATOR_RBL "OPERATOR_RBL" OPERATOR_RSUB "OPERATOR_RSUB" OPERATOR_RX_CONTENT_ONLY "Operator RX (content only)" OPERATOR_RX "OPERATOR_RX" OPERATOR_RX_GLOBAL "OPERATOR_RX_GLOBAL" OPERATOR_STR_EQ "OPERATOR_STR_EQ" OPERATOR_STR_MATCH "OPERATOR_STR_MATCH" OPERATOR_UNCONDITIONAL_MATCH "OPERATOR_UNCONDITIONAL_MATCH" OPERATOR_VALIDATE_BYTE_RANGE "OPERATOR_VALIDATE_BYTE_RANGE" OPERATOR_VALIDATE_DTD "OPERATOR_VALIDATE_DTD" OPERATOR_VALIDATE_HASH "OPERATOR_VALIDATE_HASH" OPERATOR_VALIDATE_SCHEMA "OPERATOR_VALIDATE_SCHEMA" OPERATOR_VALIDATE_URL_ENCODING "OPERATOR_VALIDATE_URL_ENCODING" OPERATOR_VALIDATE_UTF8_ENCODING "OPERATOR_VALIDATE_UTF8_ENCODING" OPERATOR_VERIFY_CC "OPERATOR_VERIFY_CC" OPERATOR_VERIFY_CPF "OPERATOR_VERIFY_CPF" OPERATOR_VERIFY_SSN "OPERATOR_VERIFY_SSN" OPERATOR_VERIFY_SVNR "OPERATOR_VERIFY_SVNR" OPERATOR_WITHIN "OPERATOR_WITHIN" CONFIG_DIR_AUDIT_LOG_FMT JSON NATIVE ACTION_CTL_RULE_ENGINE "ACTION_CTL_RULE_ENGINE" ; %token ACTION_ACCURACY "Accuracy" ACTION_ALLOW "Allow" ACTION_APPEND "Append" ACTION_AUDIT_LOG "AuditLog" ACTION_BLOCK "Block" ACTION_CAPTURE "Capture" ACTION_CHAIN "Chain" ACTION_CTL_AUDIT_ENGINE "ACTION_CTL_AUDIT_ENGINE" ACTION_CTL_AUDIT_LOG_PARTS "ACTION_CTL_AUDIT_LOG_PARTS" ACTION_CTL_BDY_JSON "ACTION_CTL_BDY_JSON" ACTION_CTL_BDY_XML "ACTION_CTL_BDY_XML" ACTION_CTL_BDY_URLENCODED "ACTION_CTL_BDY_URLENCODED" ACTION_CTL_FORCE_REQ_BODY_VAR "ACTION_CTL_FORCE_REQ_BODY_VAR" ACTION_CTL_REQUEST_BODY_ACCESS "ACTION_CTL_REQUEST_BODY_ACCESS" ACTION_CTL_RULE_REMOVE_BY_ID "ACTION_CTL_RULE_REMOVE_BY_ID" ACTION_CTL_RULE_REMOVE_BY_TAG "ACTION_CTL_RULE_REMOVE_BY_TAG" ACTION_CTL_RULE_REMOVE_TARGET_BY_ID "ACTION_CTL_RULE_REMOVE_TARGET_BY_ID" ACTION_CTL_RULE_REMOVE_TARGET_BY_TAG "ACTION_CTL_RULE_REMOVE_TARGET_BY_TAG" ACTION_DENY "Deny" ACTION_DEPRECATE_VAR "DeprecateVar" ACTION_DROP "Drop" ACTION_EXEC "Exec" ACTION_EXPIRE_VAR "ExpireVar" ACTION_ID "Id" ACTION_INITCOL "InitCol" ACTION_LOG "Log" ACTION_LOG_DATA "LogData" ACTION_MATURITY "Maturity" ACTION_MSG "Msg" ACTION_MULTI_MATCH "MultiMatch" ACTION_NO_AUDIT_LOG "NoAuditLog" ACTION_NO_LOG "NoLog" ACTION_PASS "Pass" ACTION_PAUSE "Pause" ACTION_PHASE "Phase" ACTION_PREPEND "Prepend" ACTION_PROXY "Proxy" ACTION_REDIRECT "Redirect" ACTION_REV "Rev" ACTION_SANITISE_ARG "SanitiseArg" ACTION_SANITISE_MATCHED "SanitiseMatched" ACTION_SANITISE_MATCHED_BYTES "SanitiseMatchedBytes" ACTION_SANITISE_REQUEST_HEADER "SanitiseRequestHeader" ACTION_SANITISE_RESPONSE_HEADER "SanitiseResponseHeader" ACTION_SETENV "SetEnv" ACTION_SETRSC "SetRsc" ACTION_SETSID "SetSid" ACTION_SETUID "SetUID" ACTION_SEVERITY "Severity" ACTION_SKIP "Skip" ACTION_SKIP_AFTER "SkipAfter" ACTION_STATUS "Status" ACTION_TAG "Tag" ACTION_TRANSFORMATION_BASE_64_ENCODE "ACTION_TRANSFORMATION_BASE_64_ENCODE" ACTION_TRANSFORMATION_BASE_64_DECODE "ACTION_TRANSFORMATION_BASE_64_DECODE" ACTION_TRANSFORMATION_BASE_64_DECODE_EXT "ACTION_TRANSFORMATION_BASE_64_DECODE_EXT" ACTION_TRANSFORMATION_CMD_LINE "ACTION_TRANSFORMATION_CMD_LINE" ACTION_TRANSFORMATION_COMPRESS_WHITESPACE "ACTION_TRANSFORMATION_COMPRESS_WHITESPACE" ACTION_TRANSFORMATION_CSS_DECODE "ACTION_TRANSFORMATION_CSS_DECODE" ACTION_TRANSFORMATION_ESCAPE_SEQ_DECODE "ACTION_TRANSFORMATION_ESCAPE_SEQ_DECODE" ACTION_TRANSFORMATION_HEX_ENCODE "ACTION_TRANSFORMATION_HEX_ENCODE" ACTION_TRANSFORMATION_HEX_DECODE "ACTION_TRANSFORMATION_HEX_DECODE" ACTION_TRANSFORMATION_HTML_ENTITY_DECODE "ACTION_TRANSFORMATION_HTML_ENTITY_DECODE" ACTION_TRANSFORMATION_JS_DECODE "ACTION_TRANSFORMATION_JS_DECODE" ACTION_TRANSFORMATION_LENGTH "ACTION_TRANSFORMATION_LENGTH" ACTION_TRANSFORMATION_LOWERCASE "ACTION_TRANSFORMATION_LOWERCASE" ACTION_TRANSFORMATION_MD5 "ACTION_TRANSFORMATION_MD5" ACTION_TRANSFORMATION_NONE "ACTION_TRANSFORMATION_NONE" ACTION_TRANSFORMATION_NORMALISE_PATH "ACTION_TRANSFORMATION_NORMALISE_PATH" ACTION_TRANSFORMATION_NORMALISE_PATH_WIN "ACTION_TRANSFORMATION_NORMALISE_PATH_WIN" ACTION_TRANSFORMATION_PARITY_EVEN_7_BIT "ACTION_TRANSFORMATION_PARITY_EVEN_7_BIT" ACTION_TRANSFORMATION_PARITY_ODD_7_BIT "ACTION_TRANSFORMATION_PARITY_ODD_7_BIT" ACTION_TRANSFORMATION_PARITY_ZERO_7_BIT "ACTION_TRANSFORMATION_PARITY_ZERO_7_BIT" ACTION_TRANSFORMATION_REMOVE_COMMENTS "ACTION_TRANSFORMATION_REMOVE_COMMENTS" ACTION_TRANSFORMATION_REMOVE_COMMENTS_CHAR "ACTION_TRANSFORMATION_REMOVE_COMMENTS_CHAR" ACTION_TRANSFORMATION_REMOVE_NULLS "ACTION_TRANSFORMATION_REMOVE_NULLS" ACTION_TRANSFORMATION_REMOVE_WHITESPACE "ACTION_TRANSFORMATION_REMOVE_WHITESPACE" ACTION_TRANSFORMATION_REPLACE_COMMENTS "ACTION_TRANSFORMATION_REPLACE_COMMENTS" ACTION_TRANSFORMATION_REPLACE_NULLS "ACTION_TRANSFORMATION_REPLACE_NULLS" ACTION_TRANSFORMATION_SHA1 "ACTION_TRANSFORMATION_SHA1" ACTION_TRANSFORMATION_SQL_HEX_DECODE "ACTION_TRANSFORMATION_SQL_HEX_DECODE" ACTION_TRANSFORMATION_TRIM "ACTION_TRANSFORMATION_TRIM" ACTION_TRANSFORMATION_TRIM_LEFT "ACTION_TRANSFORMATION_TRIM_LEFT" ACTION_TRANSFORMATION_TRIM_RIGHT "ACTION_TRANSFORMATION_TRIM_RIGHT" ACTION_TRANSFORMATION_UPPERCASE "ACTION_TRANSFORMATION_UPPERCASE" ACTION_TRANSFORMATION_URL_ENCODE "ACTION_TRANSFORMATION_URL_ENCODE" ACTION_TRANSFORMATION_URL_DECODE "ACTION_TRANSFORMATION_URL_DECODE" ACTION_TRANSFORMATION_URL_DECODE_UNI "ACTION_TRANSFORMATION_URL_DECODE_UNI" ACTION_TRANSFORMATION_UTF8_TO_UNICODE "ACTION_TRANSFORMATION_UTF8_TO_UNICODE" ACTION_VER "Ver" ACTION_XMLNS "xmlns" CONFIG_COMPONENT_SIG "CONFIG_COMPONENT_SIG" CONFIG_CONN_ENGINE "CONFIG_CONN_ENGINE" CONFIG_SEC_ARGUMENT_SEPARATOR "CONFIG_SEC_ARGUMENT_SEPARATOR" CONFIG_SEC_WEB_APP_ID "CONFIG_SEC_WEB_APP_ID" CONFIG_SEC_SERVER_SIG "CONFIG_SEC_SERVER_SIG" CONFIG_DIR_AUDIT_DIR "CONFIG_DIR_AUDIT_DIR" CONFIG_DIR_AUDIT_DIR_MOD "CONFIG_DIR_AUDIT_DIR_MOD" CONFIG_DIR_AUDIT_ENG "CONFIG_DIR_AUDIT_ENG" CONFIG_DIR_AUDIT_FLE_MOD "CONFIG_DIR_AUDIT_FLE_MOD" CONFIG_DIR_AUDIT_LOG "CONFIG_DIR_AUDIT_LOG" CONFIG_DIR_AUDIT_LOG2 "CONFIG_DIR_AUDIT_LOG2" CONFIG_DIR_AUDIT_LOG_P "CONFIG_DIR_AUDIT_LOG_P" CONFIG_DIR_AUDIT_STS "CONFIG_DIR_AUDIT_STS" CONFIG_DIR_AUDIT_TPE "CONFIG_DIR_AUDIT_TPE" CONFIG_DIR_DEBUG_LOG "CONFIG_DIR_DEBUG_LOG" CONFIG_DIR_DEBUG_LVL "CONFIG_DIR_DEBUG_LVL" CONFIG_SEC_CACHE_TRANSFORMATIONS "CONFIG_SEC_CACHE_TRANSFORMATIONS" CONFIG_SEC_DISABLE_BACKEND_COMPRESS "CONFIG_SEC_DISABLE_BACKEND_COMPRESS" CONFIG_SEC_HASH_ENGINE "CONFIG_SEC_HASH_ENGINE" CONFIG_SEC_HASH_KEY "CONFIG_SEC_HASH_KEY" CONFIG_SEC_HASH_PARAM "CONFIG_SEC_HASH_PARAM" CONFIG_SEC_HASH_METHOD_RX "CONFIG_SEC_HASH_METHOD_RX" CONFIG_SEC_HASH_METHOD_PM "CONFIG_SEC_HASH_METHOD_PM" CONFIG_SEC_CHROOT_DIR "CONFIG_SEC_CHROOT_DIR" CONFIG_DIR_GEO_DB "CONFIG_DIR_GEO_DB" CONFIG_DIR_GSB_DB "CONFIG_DIR_GSB_DB" CONFIG_SEC_GUARDIAN_LOG "CONFIG_SEC_GUARDIAN_LOG" CONFIG_DIR_PCRE_MATCH_LIMIT "CONFIG_DIR_PCRE_MATCH_LIMIT" CONFIG_DIR_PCRE_MATCH_LIMIT_RECURSION "CONFIG_DIR_PCRE_MATCH_LIMIT_RECURSION" CONFIG_SEC_CONN_R_STATE_LIMIT "CONFIG_SEC_CONN_R_STATE_LIMIT" CONFIG_SEC_CONN_W_STATE_LIMIT "CONFIG_SEC_CONN_W_STATE_LIMIT" CONFIG_SEC_SENSOR_ID "CONFIG_SEC_SENSOR_ID" CONFIG_DIR_ARGS_LIMIT "CONFIG_DIR_ARGS_LIMIT" CONFIG_DIR_REQ_BODY_JSON_DEPTH_LIMIT "CONFIG_DIR_REQ_BODY_JSON_DEPTH_LIMIT" CONFIG_DIR_REQ_BODY "CONFIG_DIR_REQ_BODY" CONFIG_DIR_REQ_BODY_IN_MEMORY_LIMIT "CONFIG_DIR_REQ_BODY_IN_MEMORY_LIMIT" CONFIG_DIR_REQ_BODY_LIMIT "CONFIG_DIR_REQ_BODY_LIMIT" CONFIG_DIR_REQ_BODY_LIMIT_ACTION "CONFIG_DIR_REQ_BODY_LIMIT_ACTION" CONFIG_DIR_REQ_BODY_NO_FILES_LIMIT "CONFIG_DIR_REQ_BODY_NO_FILES_LIMIT" CONFIG_DIR_RES_BODY "CONFIG_DIR_RES_BODY" CONFIG_DIR_RES_BODY_LIMIT "CONFIG_DIR_RES_BODY_LIMIT" CONFIG_DIR_RES_BODY_LIMIT_ACTION "CONFIG_DIR_RES_BODY_LIMIT_ACTION" CONFIG_SEC_RULE_INHERITANCE "CONFIG_SEC_RULE_INHERITANCE" CONFIG_SEC_RULE_PERF_TIME "CONFIG_SEC_RULE_PERF_TIME" CONFIG_DIR_RULE_ENG "CONFIG_DIR_RULE_ENG" CONFIG_DIR_SEC_ACTION "CONFIG_DIR_SEC_ACTION" CONFIG_DIR_SEC_DEFAULT_ACTION "CONFIG_DIR_SEC_DEFAULT_ACTION" CONFIG_DIR_SEC_MARKER "CONFIG_DIR_SEC_MARKER" CONFIG_DIR_UNICODE_MAP_FILE "CONFIG_DIR_UNICODE_MAP_FILE" CONFIG_DIR_UNICODE_CODE_PAGE "CONFIG_DIR_UNICODE_CODE_PAGE" CONFIG_SEC_COLLECTION_TIMEOUT "CONFIG_SEC_COLLECTION_TIMEOUT" CONFIG_SEC_HTTP_BLKEY "CONFIG_SEC_HTTP_BLKEY" CONFIG_SEC_INTERCEPT_ON_ERROR "CONFIG_SEC_INTERCEPT_ON_ERROR" CONFIG_SEC_REMOTE_RULES_FAIL_ACTION "CONFIG_SEC_REMOTE_RULES_FAIL_ACTION" CONFIG_SEC_RULE_REMOVE_BY_ID "CONFIG_SEC_RULE_REMOVE_BY_ID" CONFIG_SEC_RULE_REMOVE_BY_MSG "CONFIG_SEC_RULE_REMOVE_BY_MSG" CONFIG_SEC_RULE_REMOVE_BY_TAG "CONFIG_SEC_RULE_REMOVE_BY_TAG" CONFIG_SEC_RULE_UPDATE_TARGET_BY_TAG "CONFIG_SEC_RULE_UPDATE_TARGET_BY_TAG" CONFIG_SEC_RULE_UPDATE_TARGET_BY_MSG "CONFIG_SEC_RULE_UPDATE_TARGET_BY_MSG" CONFIG_SEC_RULE_UPDATE_TARGET_BY_ID "CONFIG_SEC_RULE_UPDATE_TARGET_BY_ID" CONFIG_SEC_RULE_UPDATE_ACTION_BY_ID "CONFIG_SEC_RULE_UPDATE_ACTION_BY_ID" CONFIG_UPDLOAD_KEEP_FILES "CONFIG_UPDLOAD_KEEP_FILES" CONFIG_UPDLOAD_SAVE_TMP_FILES "CONFIG_UPDLOAD_SAVE_TMP_FILES" CONFIG_UPLOAD_DIR "CONFIG_UPLOAD_DIR" CONFIG_UPLOAD_FILE_LIMIT "CONFIG_UPLOAD_FILE_LIMIT" CONFIG_UPLOAD_FILE_MODE "CONFIG_UPLOAD_FILE_MODE" CONFIG_VALUE_ABORT "CONFIG_VALUE_ABORT" CONFIG_VALUE_DETC "CONFIG_VALUE_DETC" CONFIG_VALUE_HTTPS "CONFIG_VALUE_HTTPS" CONFIG_VALUE_OFF "CONFIG_VALUE_OFF" CONFIG_VALUE_ON "CONFIG_VALUE_ON" CONFIG_VALUE_PARALLEL "CONFIG_VALUE_PARALLEL" CONFIG_VALUE_PROCESS_PARTIAL "CONFIG_VALUE_PROCESS_PARTIAL" CONFIG_VALUE_REJECT "CONFIG_VALUE_REJECT" CONFIG_VALUE_RELEVANT_ONLY "CONFIG_VALUE_RELEVANT_ONLY" CONFIG_VALUE_SERIAL "CONFIG_VALUE_SERIAL" CONFIG_VALUE_WARN "CONFIG_VALUE_WARN" CONFIG_XML_EXTERNAL_ENTITY "CONFIG_XML_EXTERNAL_ENTITY" CONGIG_DIR_RESPONSE_BODY_MP "CONGIG_DIR_RESPONSE_BODY_MP" CONGIG_DIR_SEC_ARG_SEP "CONGIG_DIR_SEC_ARG_SEP" CONGIG_DIR_SEC_COOKIE_FORMAT "CONGIG_DIR_SEC_COOKIE_FORMAT" CONFIG_SEC_COOKIEV0_SEPARATOR "CONFIG_SEC_COOKIEV0_SEPARATOR" CONGIG_DIR_SEC_DATA_DIR "CONGIG_DIR_SEC_DATA_DIR" CONGIG_DIR_SEC_STATUS_ENGINE "CONGIG_DIR_SEC_STATUS_ENGINE" CONFIG_SEC_STREAM_IN_BODY_INSPECTION "CONFIG_SEC_STREAM_IN_BODY_INSPECTION" CONFIG_SEC_STREAM_OUT_BODY_INSPECTION "CONFIG_SEC_STREAM_OUT_BODY_INSPECTION" CONGIG_DIR_SEC_TMP_DIR "CONGIG_DIR_SEC_TMP_DIR" DIRECTIVE "DIRECTIVE" DIRECTIVE_SECRULESCRIPT "DIRECTIVE_SECRULESCRIPT" FREE_TEXT_QUOTE_MACRO_EXPANSION "FREE_TEXT_QUOTE_MACRO_EXPANSION" QUOTATION_MARK "QUOTATION_MARK" RUN_TIME_VAR_BLD "RUN_TIME_VAR_BLD" RUN_TIME_VAR_DUR "RUN_TIME_VAR_DUR" RUN_TIME_VAR_HSV "RUN_TIME_VAR_HSV" RUN_TIME_VAR_REMOTE_USER "RUN_TIME_VAR_REMOTE_USER" RUN_TIME_VAR_TIME "RUN_TIME_VAR_TIME" RUN_TIME_VAR_TIME_DAY "RUN_TIME_VAR_TIME_DAY" RUN_TIME_VAR_TIME_EPOCH "RUN_TIME_VAR_TIME_EPOCH" RUN_TIME_VAR_TIME_HOUR "RUN_TIME_VAR_TIME_HOUR" RUN_TIME_VAR_TIME_MIN "RUN_TIME_VAR_TIME_MIN" RUN_TIME_VAR_TIME_MON "RUN_TIME_VAR_TIME_MON" RUN_TIME_VAR_TIME_SEC "RUN_TIME_VAR_TIME_SEC" RUN_TIME_VAR_TIME_WDAY "RUN_TIME_VAR_TIME_WDAY" RUN_TIME_VAR_TIME_YEAR "RUN_TIME_VAR_TIME_YEAR" VARIABLE "VARIABLE" DICT_ELEMENT "Dictionary element" DICT_ELEMENT_REGEXP "Dictionary element, selected by regexp" ; %type > act %type > setvar_action %type > run_time_string %type > > > actions_may_quoted actions ; %type > op_before_init op ; %type > > > variables_pre_process %type > > > variables_may_be_quoted %type > > > variables %type > var //%printer { yyoutput << $$; } <*>; %% %start input; input: END { return 0; } | input line | line ; line: expression ; audit_log: /* SecAuditLogDirMode */ CONFIG_DIR_AUDIT_DIR_MOD { driver.m_auditLog->setStorageDirMode(strtol($1.c_str(), NULL, 8)); } /* SecAuditLogStorageDir */ | CONFIG_DIR_AUDIT_DIR { driver.m_auditLog->setStorageDir($1); } /* SecAuditEngine */ | CONFIG_DIR_AUDIT_ENG CONFIG_VALUE_RELEVANT_ONLY { driver.m_auditLog->setStatus(modsecurity::audit_log::AuditLog::RelevantOnlyAuditLogStatus); } | CONFIG_DIR_AUDIT_ENG CONFIG_VALUE_OFF { driver.m_auditLog->setStatus(modsecurity::audit_log::AuditLog::OffAuditLogStatus); } | CONFIG_DIR_AUDIT_ENG CONFIG_VALUE_ON { driver.m_auditLog->setStatus(modsecurity::audit_log::AuditLog::OnAuditLogStatus); } /* SecAuditLogFileMode */ | CONFIG_DIR_AUDIT_FLE_MOD { driver.m_auditLog->setFileMode(strtol($1.c_str(), NULL, 8)); } /* SecAuditLog2 */ | CONFIG_DIR_AUDIT_LOG2 { driver.m_auditLog->setFilePath2($1); } /* SecAuditLogParts */ | CONFIG_DIR_AUDIT_LOG_P { driver.m_auditLog->setParts($1); } /* SecAuditLog */ | CONFIG_DIR_AUDIT_LOG { driver.m_auditLog->setFilePath1($1); } | CONFIG_DIR_AUDIT_LOG_FMT JSON { driver.m_auditLog->setFormat(modsecurity::audit_log::AuditLog::JSONAuditLogFormat); } | CONFIG_DIR_AUDIT_LOG_FMT NATIVE { driver.m_auditLog->setFormat(modsecurity::audit_log::AuditLog::NativeAuditLogFormat); } /* SecAuditLogRelevantStatus */ | CONFIG_DIR_AUDIT_STS { std::string relevant_status($1); driver.m_auditLog->setRelevantStatus(relevant_status); } /* SecAuditLogType */ | CONFIG_DIR_AUDIT_TPE CONFIG_VALUE_SERIAL { driver.m_auditLog->setType(modsecurity::audit_log::AuditLog::SerialAuditLogType); } | CONFIG_DIR_AUDIT_TPE CONFIG_VALUE_PARALLEL { driver.m_auditLog->setType(modsecurity::audit_log::AuditLog::ParallelAuditLogType); } | CONFIG_DIR_AUDIT_TPE CONFIG_VALUE_HTTPS { driver.m_auditLog->setType(modsecurity::audit_log::AuditLog::HttpsAuditLogType); } /* Upload */ | CONFIG_UPDLOAD_KEEP_FILES CONFIG_VALUE_ON { driver.m_uploadKeepFiles = modsecurity::RulesSetProperties::TrueConfigBoolean; } | CONFIG_UPDLOAD_KEEP_FILES CONFIG_VALUE_OFF { driver.m_uploadKeepFiles = modsecurity::RulesSetProperties::FalseConfigBoolean; } | CONFIG_UPDLOAD_KEEP_FILES CONFIG_VALUE_RELEVANT_ONLY { driver.error(@0, "SecUploadKeepFiles RelevantOnly is not currently supported. Accepted values are On or Off"); YYERROR; } | CONFIG_UPLOAD_FILE_LIMIT { driver.m_uploadFileLimit.m_set = true; driver.m_uploadFileLimit.m_value = strtol($1.c_str(), NULL, 10); } | CONFIG_UPLOAD_FILE_MODE { driver.m_uploadFileMode.m_set = true; driver.m_uploadFileMode.m_value = strtol($1.c_str(), NULL, 8); } | CONFIG_UPLOAD_DIR { driver.m_uploadDirectory.m_set = true; driver.m_uploadDirectory.m_value = $1; } | CONFIG_UPDLOAD_SAVE_TMP_FILES CONFIG_VALUE_ON { driver.m_tmpSaveUploadedFiles = modsecurity::RulesSetProperties::TrueConfigBoolean; } | CONFIG_UPDLOAD_SAVE_TMP_FILES CONFIG_VALUE_OFF { driver.m_tmpSaveUploadedFiles = modsecurity::RulesSetProperties::FalseConfigBoolean; } ; actions: QUOTATION_MARK actions_may_quoted QUOTATION_MARK { $$ = std::move($2); } | actions_may_quoted { $$ = std::move($1); } ; actions_may_quoted: actions_may_quoted COMMA act { ACTION_INIT($3, @0) $1->push_back(std::move($3)); $$ = std::move($1); } | act { std::unique_ptr>> b(new std::vector>()); ACTION_INIT($1, @0) b->push_back(std::move($1)); $$ = std::move(b); } ; op: op_before_init { $$ = std::move($1); std::string error; if ($$->init(*@1.end.filename, &error) == false) { driver.error(@0, error); YYERROR; } } | NOT op_before_init { $$ = std::move($2); $$->m_negation = true; std::string error; if ($$->init(*@1.end.filename, &error) == false) { driver.error(@0, error); YYERROR; } } | run_time_string { OPERATOR_CONTAINER($$, new operators::Rx(std::move($1))); std::string error; if ($$->init(*@1.end.filename, &error) == false) { driver.error(@0, error); YYERROR; } } | NOT run_time_string { OPERATOR_CONTAINER($$, new operators::Rx(std::move($2))); $$->m_negation = true; std::string error; if ($$->init(*@1.end.filename, &error) == false) { driver.error(@0, error); YYERROR; } } ; op_before_init: OPERATOR_UNCONDITIONAL_MATCH { OPERATOR_CONTAINER($$, new operators::UnconditionalMatch()); } | OPERATOR_DETECT_SQLI { OPERATOR_CONTAINER($$, new operators::DetectSQLi()); } | OPERATOR_DETECT_XSS { OPERATOR_CONTAINER($$, new operators::DetectXSS()); } | OPERATOR_VALIDATE_URL_ENCODING { OPERATOR_CONTAINER($$, new operators::ValidateUrlEncoding()); } | OPERATOR_VALIDATE_UTF8_ENCODING { OPERATOR_CONTAINER($$, new operators::ValidateUtf8Encoding()); } | OPERATOR_INSPECT_FILE run_time_string { OPERATOR_CONTAINER($$, new operators::InspectFile(std::move($2))); } | OPERATOR_FUZZY_HASH run_time_string { OPERATOR_CONTAINER($$, new operators::FuzzyHash(std::move($2))); } | OPERATOR_VALIDATE_BYTE_RANGE run_time_string { OPERATOR_CONTAINER($$, new operators::ValidateByteRange(std::move($2))); } | OPERATOR_VALIDATE_DTD run_time_string { OPERATOR_CONTAINER($$, new operators::ValidateDTD(std::move($2))); } | OPERATOR_VALIDATE_HASH run_time_string { /* $$ = new operators::ValidateHash($1); */ OPERATOR_NOT_SUPPORTED("ValidateHash", @0); } | OPERATOR_VALIDATE_SCHEMA run_time_string { OPERATOR_CONTAINER($$, new operators::ValidateSchema(std::move($2))); } | OPERATOR_VERIFY_CC run_time_string { OPERATOR_CONTAINER($$, new operators::VerifyCC(std::move($2))); } | OPERATOR_VERIFY_CPF run_time_string { OPERATOR_CONTAINER($$, new operators::VerifyCPF(std::move($2))); } | OPERATOR_VERIFY_SSN run_time_string { OPERATOR_CONTAINER($$, new operators::VerifySSN(std::move($2))); } | OPERATOR_VERIFY_SVNR run_time_string { OPERATOR_CONTAINER($$, new operators::VerifySVNR(std::move($2))); } | OPERATOR_GSB_LOOKUP run_time_string { /* $$ = new operators::GsbLookup($1); */ OPERATOR_NOT_SUPPORTED("GsbLookup", @0); } | OPERATOR_RSUB run_time_string { /* $$ = new operators::Rsub($1); */ OPERATOR_NOT_SUPPORTED("Rsub", @0); } | OPERATOR_WITHIN run_time_string { OPERATOR_CONTAINER($$, new operators::Within(std::move($2))); } | OPERATOR_CONTAINS_WORD run_time_string { OPERATOR_CONTAINER($$, new operators::ContainsWord(std::move($2))); } | OPERATOR_CONTAINS run_time_string { OPERATOR_CONTAINER($$, new operators::Contains(std::move($2))); } | OPERATOR_ENDS_WITH run_time_string { OPERATOR_CONTAINER($$, new operators::EndsWith(std::move($2))); } | OPERATOR_EQ run_time_string { OPERATOR_CONTAINER($$, new operators::Eq(std::move($2))); } | OPERATOR_GE run_time_string { OPERATOR_CONTAINER($$, new operators::Ge(std::move($2))); } | OPERATOR_GT run_time_string { OPERATOR_CONTAINER($$, new operators::Gt(std::move($2))); } | OPERATOR_IP_MATCH_FROM_FILE run_time_string { OPERATOR_CONTAINER($$, new operators::IpMatchF(std::move($2))); } | OPERATOR_IP_MATCH run_time_string { OPERATOR_CONTAINER($$, new operators::IpMatch(std::move($2))); } | OPERATOR_LE run_time_string { OPERATOR_CONTAINER($$, new operators::Le(std::move($2))); } | OPERATOR_LT run_time_string { OPERATOR_CONTAINER($$, new operators::Lt(std::move($2))); } | OPERATOR_PM_FROM_FILE run_time_string { OPERATOR_CONTAINER($$, new operators::PmFromFile(std::move($2))); } | OPERATOR_PM run_time_string { OPERATOR_CONTAINER($$, new operators::Pm(std::move($2))); } | OPERATOR_RBL run_time_string { OPERATOR_CONTAINER($$, new operators::Rbl(std::move($2))); } | OPERATOR_RX run_time_string { OPERATOR_CONTAINER($$, new operators::Rx(std::move($2))); } | OPERATOR_RX_GLOBAL run_time_string { OPERATOR_CONTAINER($$, new operators::RxGlobal(std::move($2))); } | OPERATOR_STR_EQ run_time_string { OPERATOR_CONTAINER($$, new operators::StrEq(std::move($2))); } | OPERATOR_STR_MATCH run_time_string { OPERATOR_CONTAINER($$, new operators::StrMatch(std::move($2))); } | OPERATOR_BEGINS_WITH run_time_string { OPERATOR_CONTAINER($$, new operators::BeginsWith(std::move($2))); } | OPERATOR_GEOLOOKUP { #if defined(WITH_GEOIP) or defined(WITH_MAXMIND) OPERATOR_CONTAINER($$, new operators::GeoLookup()); #else std::stringstream ss; ss << "This version of ModSecurity was not compiled with GeoIP or MaxMind support."; driver.error(@0, ss.str()); YYERROR; #endif // WITH_GEOIP } ; expression: audit_log | DIRECTIVE variables op actions { std::vector *a = new std::vector(); std::vector *t = new std::vector(); for (auto &i : *$4.get()) { if (dynamic_cast(i.get())) { t->push_back(dynamic_cast(i.release())); } else { a->push_back(i.release()); } } variables::Variables *v = new variables::Variables(); for (auto &i : *$2.get()) { v->push_back(i.release()); } Operator *op = $3.release(); std::unique_ptr rule(new RuleWithOperator( /* op */ op, /* variables */ v, /* actions */ a, /* transformations */ t, /* file name */ std::unique_ptr(new std::string(*@1.end.filename)), /* line number */ @1.end.line )); if (driver.addSecRule(std::move(rule)) == false) { YYERROR; } } | DIRECTIVE variables op { variables::Variables *v = new variables::Variables(); for (auto &i : *$2.get()) { v->push_back(i.release()); } std::unique_ptr rule(new RuleWithOperator( /* op */ $3.release(), /* variables */ v, /* actions */ NULL, /* transformations */ NULL, /* file name */ std::unique_ptr(new std::string(*@1.end.filename)), /* line number */ @1.end.line )); if (driver.addSecRule(std::move(rule)) == false) { YYERROR; } } | CONFIG_DIR_SEC_ACTION actions { std::vector *a = new std::vector(); std::vector *t = new std::vector(); for (auto &i : *$2.get()) { if (dynamic_cast(i.get())) { t->push_back(dynamic_cast(i.release())); } else { a->push_back(i.release()); } } std::unique_ptr rule(new RuleUnconditional( /* actions */ a, /* transformations */ t, /* file name */ std::unique_ptr(new std::string(*@1.end.filename)), /* line number */ @1.end.line )); driver.addSecAction(std::move(rule)); } | DIRECTIVE_SECRULESCRIPT actions { std::string err; std::vector *a = new std::vector(); std::vector *t = new std::vector(); for (auto &i : *$2.get()) { if (dynamic_cast(i.get())) { t->push_back(dynamic_cast(i.release())); } else { a->push_back(i.release()); } } std::unique_ptr r(new RuleScript( /* path to script */ $1, /* actions */ a, /* transformations */ t, /* file name */ std::unique_ptr(new std::string(*@1.end.filename)), /* line number */ @1.end.line )); if (r->init(&err) == false) { driver.error(@0, "Failed to load script: " + err); YYERROR; } if (driver.addSecRuleScript(std::move(r)) == false) { YYERROR; } } | CONFIG_DIR_SEC_DEFAULT_ACTION actions { bool hasDisruptive = false; std::vector *actions = new std::vector(); for (auto &i : *$2.get()) { actions->push_back(i.release()); } std::vector checkedActions; int definedPhase = -1; int secRuleDefinedPhase = -1; for (actions::Action *a : *actions) { actions::Phase *phase = dynamic_cast(a); if (a->isDisruptive() == true && dynamic_cast(a) == NULL) { hasDisruptive = true; } if (phase != NULL) { definedPhase = phase->m_phase; secRuleDefinedPhase = phase->m_secRulesPhase; delete phase; } else if (a->action_kind == actions::Action::RunTimeOnlyIfMatchKind || a->action_kind == actions::Action::RunTimeBeforeMatchAttemptKind) { actions::transformations::None *none = dynamic_cast(a); if (none != NULL) { driver.error(@0, "The transformation none is not suitable to be part of the SecDefaultActions"); YYERROR; } checkedActions.push_back(a); } else { driver.error(@0, "The action '" + *a->m_name.get() + "' is not suitable to be part of the SecDefaultActions"); YYERROR; } } if (definedPhase == -1) { definedPhase = modsecurity::Phases::RequestHeadersPhase; } if (hasDisruptive == false) { driver.error(@0, "SecDefaultAction must specify a disruptive action."); YYERROR; } if (!driver.m_defaultActions[definedPhase].empty()) { std::stringstream ss; ss << "SecDefaultActions can only be placed once per phase and configuration context. Phase "; ss << secRuleDefinedPhase; ss << " was informed already."; driver.error(@0, ss.str()); YYERROR; } for (actions::Action *a : checkedActions) { driver.m_defaultActions[definedPhase].push_back( std::unique_ptr(a)); } delete actions; } | CONFIG_DIR_SEC_MARKER { driver.addSecMarker(modsecurity::utils::string::removeBracketsIfNeeded($1), /* file name */ std::unique_ptr(new std::string(*@1.end.filename)), /* line number */ @1.end.line ); } | CONFIG_DIR_RULE_ENG CONFIG_VALUE_OFF { driver.m_secRuleEngine = modsecurity::RulesSet::DisabledRuleEngine; } | CONFIG_DIR_RULE_ENG CONFIG_VALUE_ON { driver.m_secRuleEngine = modsecurity::RulesSet::EnabledRuleEngine; } | CONFIG_DIR_RULE_ENG CONFIG_VALUE_DETC { driver.m_secRuleEngine = modsecurity::RulesSet::DetectionOnlyRuleEngine; } | CONFIG_DIR_REQ_BODY CONFIG_VALUE_ON { driver.m_secRequestBodyAccess = modsecurity::RulesSetProperties::TrueConfigBoolean; } | CONFIG_DIR_REQ_BODY CONFIG_VALUE_OFF { driver.m_secRequestBodyAccess = modsecurity::RulesSetProperties::FalseConfigBoolean; } | CONFIG_DIR_RES_BODY CONFIG_VALUE_ON { driver.m_secResponseBodyAccess = modsecurity::RulesSetProperties::TrueConfigBoolean; } | CONFIG_DIR_RES_BODY CONFIG_VALUE_OFF { driver.m_secResponseBodyAccess = modsecurity::RulesSetProperties::FalseConfigBoolean; } | CONFIG_SEC_ARGUMENT_SEPARATOR { if ($1.length() != 1) { driver.error(@0, "Argument separator should be set to a single character."); YYERROR; } driver.m_secArgumentSeparator.m_value = $1; driver.m_secArgumentSeparator.m_set = true; } | CONFIG_COMPONENT_SIG { driver.m_components.push_back($1); } | CONFIG_CONN_ENGINE CONFIG_VALUE_ON { driver.error(@0, "SecConnEngine is not yet supported."); YYERROR; } | CONFIG_CONN_ENGINE CONFIG_VALUE_OFF { } | CONFIG_SEC_WEB_APP_ID { driver.m_secWebAppId.m_value = $1; driver.m_secWebAppId.m_set = true; } | CONFIG_SEC_SERVER_SIG { driver.error(@0, "SecServerSignature is not supported."); YYERROR; } | CONFIG_SEC_CACHE_TRANSFORMATIONS { driver.error(@0, "SecCacheTransformations is not supported."); YYERROR; } | CONFIG_SEC_DISABLE_BACKEND_COMPRESS CONFIG_VALUE_ON { driver.error(@0, "SecDisableBackendCompression is not supported."); YYERROR; } | CONFIG_SEC_DISABLE_BACKEND_COMPRESS CONFIG_VALUE_OFF { } | CONFIG_CONTENT_INJECTION CONFIG_VALUE_ON { driver.error(@0, "SecContentInjection is not yet supported."); YYERROR; } | CONFIG_CONTENT_INJECTION CONFIG_VALUE_OFF { } | CONFIG_SEC_CHROOT_DIR { driver.error(@0, "SecChrootDir is not supported."); YYERROR; } | CONFIG_SEC_HASH_ENGINE CONFIG_VALUE_ON { driver.error(@0, "SecHashEngine is not yet supported."); YYERROR; } | CONFIG_SEC_HASH_ENGINE CONFIG_VALUE_OFF { } | CONFIG_SEC_HASH_KEY { driver.error(@0, "SecHashKey is not yet supported."); YYERROR; } | CONFIG_SEC_HASH_PARAM { driver.error(@0, "SecHashParam is not yet supported."); YYERROR; } | CONFIG_SEC_HASH_METHOD_RX { driver.error(@0, "SecHashMethodRx is not yet supported."); YYERROR; } | CONFIG_SEC_HASH_METHOD_PM { driver.error(@0, "SecHashMethodPm is not yet supported."); YYERROR; } | CONFIG_DIR_GSB_DB { driver.error(@0, "SecGsbLookupDb is not supported."); YYERROR; } | CONFIG_SEC_GUARDIAN_LOG { driver.error(@0, "SecGuardianLog is not supported."); YYERROR; } | CONFIG_SEC_INTERCEPT_ON_ERROR CONFIG_VALUE_ON { driver.error(@0, "SecInterceptOnError is not yet supported."); YYERROR; } | CONFIG_SEC_INTERCEPT_ON_ERROR CONFIG_VALUE_OFF { } | CONFIG_SEC_CONN_R_STATE_LIMIT { driver.error(@0, "SecConnReadStateLimit is not yet supported."); YYERROR; } | CONFIG_SEC_CONN_W_STATE_LIMIT { driver.error(@0, "SecConnWriteStateLimit is not yet supported."); YYERROR; } | CONFIG_SEC_SENSOR_ID { driver.error(@0, "SecSensorId is not yet supported."); YYERROR; } | CONFIG_SEC_RULE_INHERITANCE CONFIG_VALUE_ON { driver.error(@0, "SecRuleInheritance is not yet supported."); YYERROR; } | CONFIG_SEC_RULE_INHERITANCE CONFIG_VALUE_OFF { } | CONFIG_SEC_RULE_PERF_TIME { driver.error(@0, "SecRulePerfTime is not yet supported."); YYERROR; } | CONFIG_SEC_STREAM_IN_BODY_INSPECTION { driver.error(@0, "SecStreamInBodyInspection is not supported."); YYERROR; } | CONFIG_SEC_STREAM_OUT_BODY_INSPECTION { driver.error(@0, "SecStreamOutBodyInspection is not supported."); YYERROR; } | CONFIG_SEC_RULE_REMOVE_BY_ID { std::string error; if (driver.m_exceptions.load($1, &error) == false) { std::stringstream ss; ss << "SecRuleRemoveById: failed to load:"; ss << $1; ss << ". "; ss << error; driver.error(@0, ss.str()); YYERROR; } } | CONFIG_SEC_RULE_REMOVE_BY_TAG { std::string error; if (driver.m_exceptions.loadRemoveRuleByTag($1, &error) == false) { std::stringstream ss; ss << "SecRuleRemoveByTag: failed to load:"; ss << $1; ss << ". "; ss << error; driver.error(@0, ss.str()); YYERROR; } } | CONFIG_SEC_RULE_REMOVE_BY_MSG { std::string error; if (driver.m_exceptions.loadRemoveRuleByMsg($1, &error) == false) { std::stringstream ss; ss << "SecRuleRemoveByMsg: failed to load:"; ss << $1; ss << ". "; ss << error; driver.error(@0, ss.str()); YYERROR; } } | CONFIG_SEC_RULE_UPDATE_TARGET_BY_TAG variables_pre_process { std::string error; if (driver.m_exceptions.loadUpdateTargetByTag($1, std::move($2), &error) == false) { std::stringstream ss; ss << "SecRuleUpdateTargetByTag: failed to load:"; ss << $1; ss << ". "; ss << error; driver.error(@0, ss.str()); YYERROR; } } | CONFIG_SEC_RULE_UPDATE_TARGET_BY_MSG variables_pre_process { std::string error; if (driver.m_exceptions.loadUpdateTargetByMsg($1, std::move($2), &error) == false) { std::stringstream ss; ss << "SecRuleUpdateTargetByMsg: failed to load:"; ss << $1; ss << ". "; ss << error; driver.error(@0, ss.str()); YYERROR; } } | CONFIG_SEC_RULE_UPDATE_TARGET_BY_ID variables_pre_process { std::string error; double ruleId; try { ruleId = std::stod($1); } catch (...) { std::stringstream ss; ss << "SecRuleUpdateTargetById: failed to load:"; ss << "The input \"" + $1 + "\" does not "; ss << "seems to be a valid rule id."; ss << ". "; driver.error(@0, ss.str()); YYERROR; } if (driver.m_exceptions.loadUpdateTargetById(ruleId, std::move($2), &error) == false) { std::stringstream ss; ss << "SecRuleUpdateTargetById: failed to load:"; ss << $1; ss << ". "; ss << error; driver.error(@0, ss.str()); YYERROR; } } | CONFIG_SEC_RULE_UPDATE_ACTION_BY_ID actions { std::string error; double ruleId; try { ruleId = std::stod($1); } catch (...) { std::stringstream ss; ss << "SecRuleUpdateActionById: failed to load:"; ss << "The input \"" + $1 + "\" does not "; ss << "seems to be a valid rule id."; ss << ". "; driver.error(@0, ss.str()); YYERROR; } if (driver.m_exceptions.loadUpdateActionById(ruleId, std::move($2), &error) == false) { std::stringstream ss; ss << "SecRuleUpdateActionById: failed to load:"; ss << $1; ss << ". "; ss << error; driver.error(@0, ss.str()); YYERROR; } } /* Debug log: start */ | CONFIG_DIR_DEBUG_LVL { if (driver.m_debugLog != NULL) { driver.m_debugLog->setDebugLogLevel(atoi($1.c_str())); } else { std::stringstream ss; ss << "Internal error, there is no DebugLog "; ss << "object associated with the driver class"; driver.error(@0, ss.str()); YYERROR; } } | CONFIG_DIR_DEBUG_LOG { if (driver.m_debugLog != NULL) { std::string error; driver.m_debugLog->setDebugLogFile($1, &error); if (error.size() > 0) { std::stringstream ss; ss << "Failed to start DebugLog: " << error; driver.error(@0, ss.str()); YYERROR; } } else { std::stringstream ss; ss << "Internal error, there is no DebugLog "; ss << "object associated with the driver class"; driver.error(@0, ss.str()); YYERROR; } } /* Debug log: end */ | CONFIG_DIR_GEO_DB { #if defined(WITH_GEOIP) or defined(WITH_MAXMIND) std::string err; std::string file = modsecurity::utils::find_resource($1, *@1.end.filename, &err); if (file.empty()) { std::stringstream ss; ss << "Failed to load locate the GeoDB file from: " << $1 << " "; ss << err; driver.error(@0, ss.str()); YYERROR; } if (Utils::GeoLookup::getInstance().setDataBase(file, &err) == false) { std::stringstream ss; ss << "Failed to load the GeoDB from: "; ss << file << ". " << err; driver.error(@0, ss.str()); YYERROR; } #else std::stringstream ss; ss << "This version of ModSecurity was not compiled with GeoIP or MaxMind support."; driver.error(@0, ss.str()); YYERROR; #endif // WITH_GEOIP } | CONFIG_DIR_ARGS_LIMIT { driver.m_argumentsLimit.m_set = true; driver.m_argumentsLimit.m_value = atoi($1.c_str()); } | CONFIG_DIR_REQ_BODY_JSON_DEPTH_LIMIT { driver.m_requestBodyJsonDepthLimit.m_set = true; driver.m_requestBodyJsonDepthLimit.m_value = atoi($1.c_str()); } /* Body limits */ | CONFIG_DIR_REQ_BODY_LIMIT { driver.m_requestBodyLimit.m_set = true; driver.m_requestBodyLimit.m_value = atoi($1.c_str()); } | CONFIG_DIR_REQ_BODY_NO_FILES_LIMIT { driver.m_requestBodyNoFilesLimit.m_set = true; driver.m_requestBodyNoFilesLimit.m_value = atoi($1.c_str()); } | CONFIG_DIR_REQ_BODY_IN_MEMORY_LIMIT { std::stringstream ss; ss << "As of ModSecurity version 3.0, SecRequestBodyInMemoryLimit is no longer "; ss << "supported. Instead, you can use your web server configurations to control "; ss << "those values. ModSecurity will follow the web server decision."; driver.error(@0, ss.str()); YYERROR; } | CONFIG_DIR_RES_BODY_LIMIT { driver.m_responseBodyLimit.m_set = true; driver.m_responseBodyLimit.m_value = atoi($1.c_str()); } | CONFIG_DIR_REQ_BODY_LIMIT_ACTION CONFIG_VALUE_PROCESS_PARTIAL { driver.m_requestBodyLimitAction = modsecurity::RulesSet::BodyLimitAction::ProcessPartialBodyLimitAction; } | CONFIG_DIR_REQ_BODY_LIMIT_ACTION CONFIG_VALUE_REJECT { driver.m_requestBodyLimitAction = modsecurity::RulesSet::BodyLimitAction::RejectBodyLimitAction; } | CONFIG_DIR_RES_BODY_LIMIT_ACTION CONFIG_VALUE_PROCESS_PARTIAL { driver.m_responseBodyLimitAction = modsecurity::RulesSet::BodyLimitAction::ProcessPartialBodyLimitAction; } | CONFIG_DIR_RES_BODY_LIMIT_ACTION CONFIG_VALUE_REJECT { driver.m_responseBodyLimitAction = modsecurity::RulesSet::BodyLimitAction::RejectBodyLimitAction; } | CONFIG_SEC_REMOTE_RULES_FAIL_ACTION CONFIG_VALUE_ABORT { driver.m_remoteRulesActionOnFailed = RulesSet::OnFailedRemoteRulesAction::AbortOnFailedRemoteRulesAction; } | CONFIG_SEC_REMOTE_RULES_FAIL_ACTION CONFIG_VALUE_WARN { driver.m_remoteRulesActionOnFailed = RulesSet::OnFailedRemoteRulesAction::WarnOnFailedRemoteRulesAction; } | CONFIG_DIR_PCRE_MATCH_LIMIT_RECURSION /* Parser error disabled to avoid breaking default installations with modsecurity.conf-recommended driver.error(@0, "SecPcreMatchLimitRecursion is not currently supported. Default PCRE values are being used for now"); YYERROR; */ | CONFIG_DIR_PCRE_MATCH_LIMIT /* Parser error disabled to avoid breaking default installations with modsecurity.conf-recommended driver.error(@0, "SecPcreMatchLimit is not currently supported. Default PCRE values are being used for now"); YYERROR; */ | CONGIG_DIR_RESPONSE_BODY_MP { std::istringstream buf($1); std::istream_iterator beg(buf), end; std::set tokens(beg, end); driver.m_responseBodyTypeToBeInspected.m_set = true; for (std::set::iterator it=tokens.begin(); it!=tokens.end(); ++it) { driver.m_responseBodyTypeToBeInspected.m_value.insert(*it); } } | CONGIG_DIR_RESPONSE_BODY_MP_CLEAR { driver.m_responseBodyTypeToBeInspected.m_set = true; driver.m_responseBodyTypeToBeInspected.m_clear = true; driver.m_responseBodyTypeToBeInspected.m_value.clear(); } | CONFIG_XML_EXTERNAL_ENTITY CONFIG_VALUE_OFF { driver.m_secXMLExternalEntity = modsecurity::RulesSetProperties::FalseConfigBoolean; } | CONFIG_XML_EXTERNAL_ENTITY CONFIG_VALUE_ON { driver.m_secXMLExternalEntity = modsecurity::RulesSetProperties::TrueConfigBoolean; } | CONGIG_DIR_SEC_TMP_DIR { /* Parser error disabled to avoid breaking default installations with modsecurity.conf-recommended std::stringstream ss; ss << "As of ModSecurity version 3.0, SecTmpDir is no longer supported."; ss << " Instead, you can use your web server configurations to control when"; ss << "and where to swap. ModSecurity will follow the web server decision."; driver.error(@0, ss.str()); YYERROR; */ } | CONGIG_DIR_SEC_DATA_DIR /* Parser error disabled to avoid breaking default installations with modsecurity.conf-recommended std::stringstream ss; ss << "SecDataDir is not currently supported."; ss << " Collections are kept in memory (in_memory-per_process) for now."; ss << " When using a backend such as LMDB, temp data path is currently defined by the backend."; driver.error(@0, ss.str()); YYERROR; */ | CONGIG_DIR_SEC_ARG_SEP | CONGIG_DIR_SEC_COOKIE_FORMAT { if (atoi($1.c_str()) == 1) { driver.error(@0, "SecCookieFormat 1 is not yet supported."); YYERROR; } } | CONFIG_SEC_COOKIEV0_SEPARATOR { driver.error(@0, "SecCookieV0Separator is not yet supported."); YYERROR; } | CONGIG_DIR_SEC_STATUS_ENGINE /* Parser error disabled to avoid breaking default installations with modsecurity.conf-recommended driver.error(@0, "SecStatusEngine is not yet supported."); YYERROR; */ | CONFIG_DIR_UNICODE_MAP_FILE { std::string error; std::vector param; double num = 0; std::string f; std::string file; std::string err; param = utils::string::ssplit($1, ' '); if (param.size() <= 1) { std::stringstream ss; ss << "Failed to process unicode map, missing "; ss << "parameter: " << $1 << " "; driver.error(@0, ss.str()); YYERROR; } try { num = std::stod(param.back()); } catch (...) { std::stringstream ss; ss << "Failed to process unicode map, last parameter is "; ss << "expected to be a number: " << param.back() << " "; driver.error(@0, ss.str()); YYERROR; } param.pop_back(); while (param.size() > 0) { if (f.empty()) { f = param.back(); } else { f = param.back() + " " + f; } param.pop_back(); } file = modsecurity::utils::find_resource(f, *@1.end.filename, &err); if (file.empty()) { std::stringstream ss; ss << "Failed to locate the unicode map file from: " << f << " "; ss << err; driver.error(@0, ss.str()); YYERROR; } ConfigUnicodeMap::loadConfig(file, num, &driver, &error); if (!error.empty()) { driver.error(@0, error); YYERROR; } } | CONFIG_SEC_COLLECTION_TIMEOUT { /* Parser error disabled to avoid breaking default CRS installations with crs-setup.conf-recommended driver.error(@0, "SecCollectionTimeout is not yet supported."); YYERROR; */ } | CONFIG_SEC_HTTP_BLKEY { driver.m_httpblKey.m_set = true; driver.m_httpblKey.m_value = $1; } ; variables: variables_pre_process { std::unique_ptr > > originalList = std::move($1); std::unique_ptr>> newList(new std::vector>()); std::unique_ptr>> newNewList(new std::vector>()); std::unique_ptr>> exclusionVars(new std::vector>()); while (!originalList->empty()) { std::unique_ptr var = std::move(originalList->back()); originalList->pop_back(); if (dynamic_cast(var.get())) { exclusionVars->push_back(std::move(var)); } else { newList->push_back(std::move(var)); } } while (!newList->empty()) { bool doNotAdd = false; std::unique_ptr var = std::move(newList->back()); newList->pop_back(); for (auto &i : *exclusionVars) { if (*var == *i) { doNotAdd = true; } if (i->belongsToCollection(var.get())) { var->addsKeyExclusion(i.get()); } } if (!doNotAdd) { newNewList->push_back(std::move(var)); } } $$ = std::move(newNewList); } ; variables_pre_process: variables_may_be_quoted { $$ = std::move($1); } | QUOTATION_MARK variables_may_be_quoted QUOTATION_MARK { $$ = std::move($2); } ; variables_may_be_quoted: variables_may_be_quoted PIPE var { $1->push_back(std::move($3)); $$ = std::move($1); } | variables_may_be_quoted PIPE VAR_EXCLUSION var { std::unique_ptr c(new VariableModificatorExclusion(std::move($4))); $1->push_back(std::move(c)); $$ = std::move($1); } | variables_may_be_quoted PIPE VAR_COUNT var { std::unique_ptr c(new VariableModificatorCount(std::move($4))); $1->push_back(std::move(c)); $$ = std::move($1); } | var { std::unique_ptr>> b(new std::vector>()); b->push_back(std::move($1)); $$ = std::move(b); } | VAR_EXCLUSION var { std::unique_ptr>> b(new std::vector>()); std::unique_ptr c(new VariableModificatorExclusion(std::move($2))); b->push_back(std::move(c)); $$ = std::move(b); } | VAR_COUNT var { std::unique_ptr>> b(new std::vector>()); std::unique_ptr c(new VariableModificatorCount(std::move($2))); b->push_back(std::move(c)); $$ = std::move(b); } ; var: VARIABLE_ARGS DICT_ELEMENT { VARIABLE_CONTAINER($$, new variables::Args_DictElement($2)); } | VARIABLE_ARGS DICT_ELEMENT_REGEXP { VARIABLE_CONTAINER($$, new variables::Args_DictElementRegexp($2)); } | VARIABLE_ARGS { VARIABLE_CONTAINER($$, new variables::Args_NoDictElement()); } | VARIABLE_ARGS_POST DICT_ELEMENT { VARIABLE_CONTAINER($$, new variables::ArgsPost_DictElement($2)); } | VARIABLE_ARGS_POST DICT_ELEMENT_REGEXP { VARIABLE_CONTAINER($$, new variables::ArgsPost_DictElementRegexp($2)); } | VARIABLE_ARGS_POST { VARIABLE_CONTAINER($$, new variables::ArgsPost_NoDictElement()); } | VARIABLE_ARGS_GET DICT_ELEMENT { VARIABLE_CONTAINER($$, new variables::ArgsGet_DictElement($2)); } | VARIABLE_ARGS_GET DICT_ELEMENT_REGEXP { VARIABLE_CONTAINER($$, new variables::ArgsGet_DictElementRegexp($2)); } | VARIABLE_ARGS_GET { VARIABLE_CONTAINER($$, new variables::ArgsGet_NoDictElement()); } | VARIABLE_FILES_SIZES DICT_ELEMENT { VARIABLE_CONTAINER($$, new variables::FilesSizes_DictElement($2)); } | VARIABLE_FILES_SIZES DICT_ELEMENT_REGEXP { VARIABLE_CONTAINER($$, new variables::FilesSizes_DictElementRegexp($2)); } | VARIABLE_FILES_SIZES { VARIABLE_CONTAINER($$, new variables::FilesSizes_NoDictElement()); } | VARIABLE_FILES_NAMES DICT_ELEMENT { VARIABLE_CONTAINER($$, new variables::FilesNames_DictElement($2)); } | VARIABLE_FILES_NAMES DICT_ELEMENT_REGEXP { VARIABLE_CONTAINER($$, new variables::FilesNames_DictElementRegexp($2)); } | VARIABLE_FILES_NAMES { VARIABLE_CONTAINER($$, new variables::FilesNames_NoDictElement()); } | VARIABLE_FILES_TMP_CONTENT DICT_ELEMENT { VARIABLE_CONTAINER($$, new variables::FilesTmpContent_DictElement($2)); } | VARIABLE_FILES_TMP_CONTENT DICT_ELEMENT_REGEXP { VARIABLE_CONTAINER($$, new variables::FilesTmpContent_DictElementRegexp($2)); } | VARIABLE_FILES_TMP_CONTENT { VARIABLE_CONTAINER($$, new variables::FilesTmpContent_NoDictElement()); } | VARIABLE_MULTIPART_FILENAME DICT_ELEMENT { VARIABLE_CONTAINER($$, new variables::MultiPartFileName_DictElement($2)); } | VARIABLE_MULTIPART_FILENAME DICT_ELEMENT_REGEXP { VARIABLE_CONTAINER($$, new variables::MultiPartFileName_DictElementRegexp($2)); } | VARIABLE_MULTIPART_FILENAME { VARIABLE_CONTAINER($$, new variables::MultiPartFileName_NoDictElement()); } | VARIABLE_MULTIPART_NAME DICT_ELEMENT { VARIABLE_CONTAINER($$, new variables::MultiPartName_DictElement($2)); } | VARIABLE_MULTIPART_NAME DICT_ELEMENT_REGEXP { VARIABLE_CONTAINER($$, new variables::MultiPartName_DictElementRegexp($2)); } | VARIABLE_MULTIPART_NAME { VARIABLE_CONTAINER($$, new variables::MultiPartName_NoDictElement()); } | VARIABLE_MATCHED_VARS_NAMES DICT_ELEMENT { VARIABLE_CONTAINER($$, new variables::MatchedVarsNames_DictElement($2)); } | VARIABLE_MATCHED_VARS_NAMES DICT_ELEMENT_REGEXP { VARIABLE_CONTAINER($$, new variables::MatchedVarsNames_DictElementRegexp($2)); } | VARIABLE_MATCHED_VARS_NAMES { VARIABLE_CONTAINER($$, new variables::MatchedVarsNames_NoDictElement()); } | VARIABLE_MATCHED_VARS DICT_ELEMENT { VARIABLE_CONTAINER($$, new variables::MatchedVars_DictElement($2)); } | VARIABLE_MATCHED_VARS DICT_ELEMENT_REGEXP { VARIABLE_CONTAINER($$, new variables::MatchedVars_DictElementRegexp($2)); } | VARIABLE_MATCHED_VARS { VARIABLE_CONTAINER($$, new variables::MatchedVars_NoDictElement()); } | VARIABLE_FILES DICT_ELEMENT { VARIABLE_CONTAINER($$, new variables::Files_DictElement($2)); } | VARIABLE_FILES DICT_ELEMENT_REGEXP { VARIABLE_CONTAINER($$, new variables::Files_DictElementRegexp($2)); } | VARIABLE_FILES { VARIABLE_CONTAINER($$, new variables::Files_NoDictElement()); } | VARIABLE_REQUEST_COOKIES DICT_ELEMENT { VARIABLE_CONTAINER($$, new variables::RequestCookies_DictElement($2)); } | VARIABLE_REQUEST_COOKIES DICT_ELEMENT_REGEXP { VARIABLE_CONTAINER($$, new variables::RequestCookies_DictElementRegexp($2)); } | VARIABLE_REQUEST_COOKIES { VARIABLE_CONTAINER($$, new variables::RequestCookies_NoDictElement()); } | VARIABLE_REQUEST_HEADERS DICT_ELEMENT { VARIABLE_CONTAINER($$, new variables::RequestHeaders_DictElement($2)); } | VARIABLE_REQUEST_HEADERS DICT_ELEMENT_REGEXP { VARIABLE_CONTAINER($$, new variables::RequestHeaders_DictElementRegexp($2)); } | VARIABLE_REQUEST_HEADERS { VARIABLE_CONTAINER($$, new variables::RequestHeaders_NoDictElement()); } | VARIABLE_RESPONSE_HEADERS DICT_ELEMENT { VARIABLE_CONTAINER($$, new variables::ResponseHeaders_DictElement($2)); } | VARIABLE_RESPONSE_HEADERS DICT_ELEMENT_REGEXP { VARIABLE_CONTAINER($$, new variables::ResponseHeaders_DictElementRegexp($2)); } | VARIABLE_RESPONSE_HEADERS { VARIABLE_CONTAINER($$, new variables::ResponseHeaders_NoDictElement()); } | VARIABLE_GEO DICT_ELEMENT { VARIABLE_CONTAINER($$, new variables::Geo_DictElement($2)); } | VARIABLE_GEO DICT_ELEMENT_REGEXP { VARIABLE_CONTAINER($$, new variables::Geo_DictElementRegexp($2)); } | VARIABLE_GEO { VARIABLE_CONTAINER($$, new variables::Geo_NoDictElement()); } | VARIABLE_REQUEST_COOKIES_NAMES DICT_ELEMENT { VARIABLE_CONTAINER($$, new variables::RequestCookiesNames_DictElement($2)); } | VARIABLE_REQUEST_COOKIES_NAMES DICT_ELEMENT_REGEXP { VARIABLE_CONTAINER($$, new variables::RequestCookiesNames_DictElementRegexp($2)); } | VARIABLE_REQUEST_COOKIES_NAMES { VARIABLE_CONTAINER($$, new variables::RequestCookiesNames_NoDictElement()); } | VARIABLE_RULE DICT_ELEMENT { VARIABLE_CONTAINER($$, new variables::Rule_DictElement($2)); } | VARIABLE_RULE DICT_ELEMENT_REGEXP { VARIABLE_CONTAINER($$, new variables::Rule_DictElementRegexp($2)); } | VARIABLE_RULE { VARIABLE_CONTAINER($$, new variables::Rule_NoDictElement()); } | RUN_TIME_VAR_ENV DICT_ELEMENT { VARIABLE_CONTAINER($$, new variables::Env("ENV:" + $2)); } | RUN_TIME_VAR_ENV DICT_ELEMENT_REGEXP { VARIABLE_CONTAINER($$, new variables::Env("ENV:" + $2)); } | RUN_TIME_VAR_ENV { VARIABLE_CONTAINER($$, new variables::Env("ENV")); } | RUN_TIME_VAR_XML DICT_ELEMENT { VARIABLE_CONTAINER($$, new variables::XML("XML:" + $2)); } | RUN_TIME_VAR_XML DICT_ELEMENT_REGEXP { VARIABLE_CONTAINER($$, new variables::XML("XML:" + $2)); } | RUN_TIME_VAR_XML { VARIABLE_CONTAINER($$, new variables::XML_NoDictElement()); } | VARIABLE_FILES_TMP_NAMES DICT_ELEMENT { VARIABLE_CONTAINER($$, new variables::FilesTmpNames_DictElement($2)); } | VARIABLE_FILES_TMP_NAMES DICT_ELEMENT_REGEXP { VARIABLE_CONTAINER($$, new variables::FilesTmpNames_DictElementRegexp($2)); } | VARIABLE_FILES_TMP_NAMES { VARIABLE_CONTAINER($$, new variables::FilesTmpNames_NoDictElement()); } | VARIABLE_RESOURCE run_time_string { VARIABLE_CONTAINER($$, new variables::Resource_DynamicElement(std::move($2))); } | VARIABLE_RESOURCE DICT_ELEMENT { VARIABLE_CONTAINER($$, new variables::Resource_DictElement($2)); } | VARIABLE_RESOURCE DICT_ELEMENT_REGEXP { VARIABLE_CONTAINER($$, new variables::Resource_DictElementRegexp($2)); } | VARIABLE_RESOURCE { VARIABLE_CONTAINER($$, new variables::Resource_NoDictElement()); } | VARIABLE_IP run_time_string { VARIABLE_CONTAINER($$, new variables::Ip_DynamicElement(std::move($2))); } | VARIABLE_IP DICT_ELEMENT { VARIABLE_CONTAINER($$, new variables::Ip_DictElement($2)); } | VARIABLE_IP DICT_ELEMENT_REGEXP { VARIABLE_CONTAINER($$, new variables::Ip_DictElementRegexp($2)); } | VARIABLE_IP { VARIABLE_CONTAINER($$, new variables::Ip_NoDictElement()); } | VARIABLE_GLOBAL run_time_string { VARIABLE_CONTAINER($$, new variables::Global_DynamicElement(std::move($2))); } | VARIABLE_GLOBAL DICT_ELEMENT { VARIABLE_CONTAINER($$, new variables::Global_DictElement($2)); } | VARIABLE_GLOBAL DICT_ELEMENT_REGEXP { VARIABLE_CONTAINER($$, new variables::Global_DictElementRegexp($2)); } | VARIABLE_GLOBAL { VARIABLE_CONTAINER($$, new variables::Global_NoDictElement()); } | VARIABLE_USER run_time_string { VARIABLE_CONTAINER($$, new variables::User_DynamicElement(std::move($2))); } | VARIABLE_USER DICT_ELEMENT { VARIABLE_CONTAINER($$, new variables::User_DictElement($2)); } | VARIABLE_USER DICT_ELEMENT_REGEXP { VARIABLE_CONTAINER($$, new variables::User_DictElementRegexp($2)); } | VARIABLE_USER { VARIABLE_CONTAINER($$, new variables::User_NoDictElement()); } | VARIABLE_TX run_time_string { VARIABLE_CONTAINER($$, new variables::Tx_DynamicElement(std::move($2))); } | VARIABLE_TX DICT_ELEMENT { VARIABLE_CONTAINER($$, new variables::Tx_DictElement($2)); } | VARIABLE_TX DICT_ELEMENT_REGEXP { VARIABLE_CONTAINER($$, new variables::Tx_DictElementRegexp($2)); } | VARIABLE_TX { VARIABLE_CONTAINER($$, new variables::Tx_NoDictElement()); } | VARIABLE_SESSION run_time_string { VARIABLE_CONTAINER($$, new variables::Session_DynamicElement(std::move($2))); } | VARIABLE_SESSION DICT_ELEMENT { VARIABLE_CONTAINER($$, new variables::Session_DictElement($2)); } | VARIABLE_SESSION DICT_ELEMENT_REGEXP { VARIABLE_CONTAINER($$, new variables::Session_DictElementRegexp($2)); } | VARIABLE_SESSION { VARIABLE_CONTAINER($$, new variables::Session_NoDictElement()); } | VARIABLE_ARGS_NAMES DICT_ELEMENT { VARIABLE_CONTAINER($$, new variables::ArgsNames_DictElement($2)); } | VARIABLE_ARGS_NAMES DICT_ELEMENT_REGEXP { VARIABLE_CONTAINER($$, new variables::ArgsNames_DictElementRegexp($2)); } | VARIABLE_ARGS_NAMES { VARIABLE_CONTAINER($$, new variables::ArgsNames_NoDictElement()); } | VARIABLE_ARGS_GET_NAMES DICT_ELEMENT { VARIABLE_CONTAINER($$, new variables::ArgsGetNames_DictElement($2)); } | VARIABLE_ARGS_GET_NAMES DICT_ELEMENT_REGEXP { VARIABLE_CONTAINER($$, new variables::ArgsGetNames_DictElementRegexp($2)); } | VARIABLE_ARGS_GET_NAMES { VARIABLE_CONTAINER($$, new variables::ArgsGetNames_NoDictElement()); } | VARIABLE_ARGS_POST_NAMES DICT_ELEMENT { VARIABLE_CONTAINER($$, new variables::ArgsPostNames_DictElement($2)); } | VARIABLE_ARGS_POST_NAMES DICT_ELEMENT_REGEXP { VARIABLE_CONTAINER($$, new variables::ArgsPostNames_DictElementRegexp($2)); } | VARIABLE_ARGS_POST_NAMES { VARIABLE_CONTAINER($$, new variables::ArgsPostNames_NoDictElement()); } | VARIABLE_REQUEST_HEADERS_NAMES DICT_ELEMENT { VARIABLE_CONTAINER($$, new variables::RequestHeadersNames_DictElement($2)); } | VARIABLE_REQUEST_HEADERS_NAMES DICT_ELEMENT_REGEXP { VARIABLE_CONTAINER($$, new variables::RequestHeadersNames_DictElementRegexp($2)); } | VARIABLE_REQUEST_HEADERS_NAMES { VARIABLE_CONTAINER($$, new variables::RequestHeadersNames_NoDictElement()); } | VARIABLE_RESPONSE_CONTENT_TYPE { VARIABLE_CONTAINER($$, new variables::ResponseContentType()); } | VARIABLE_RESPONSE_HEADERS_NAMES DICT_ELEMENT { VARIABLE_CONTAINER($$, new variables::ResponseHeadersNames_DictElement($2)); } | VARIABLE_RESPONSE_HEADERS_NAMES DICT_ELEMENT_REGEXP { VARIABLE_CONTAINER($$, new variables::ResponseHeadersNames_DictElementRegexp($2)); } | VARIABLE_RESPONSE_HEADERS_NAMES { VARIABLE_CONTAINER($$, new variables::ResponseHeadersNames_NoDictElement()); } | VARIABLE_ARGS_COMBINED_SIZE { VARIABLE_CONTAINER($$, new variables::ArgsCombinedSize()); } | VARIABLE_AUTH_TYPE { VARIABLE_CONTAINER($$, new variables::AuthType()); } | VARIABLE_FILES_COMBINED_SIZE { VARIABLE_CONTAINER($$, new variables::FilesCombinedSize()); } | VARIABLE_FULL_REQUEST { VARIABLE_CONTAINER($$, new variables::FullRequest()); } | VARIABLE_FULL_REQUEST_LENGTH { VARIABLE_CONTAINER($$, new variables::FullRequestLength()); } | VARIABLE_INBOUND_DATA_ERROR { VARIABLE_CONTAINER($$, new variables::InboundDataError()); } | VARIABLE_MATCHED_VAR { VARIABLE_CONTAINER($$, new variables::MatchedVar()); } | VARIABLE_MATCHED_VAR_NAME { VARIABLE_CONTAINER($$, new variables::MatchedVarName()); } | VARIABLE_MULTIPART_BOUNDARY_QUOTED { VARIABLE_CONTAINER($$, new variables::MultipartBoundaryQuoted()); } | VARIABLE_MULTIPART_BOUNDARY_WHITESPACE { VARIABLE_CONTAINER($$, new variables::MultipartBoundaryWhiteSpace()); } | VARIABLE_MULTIPART_CRLF_LF_LINES { VARIABLE_CONTAINER($$, new variables::MultipartCrlfLFLines()); } | VARIABLE_MULTIPART_DATA_AFTER { VARIABLE_CONTAINER($$, new variables::MultipartDateAfter()); } | VARIABLE_MULTIPART_DATA_BEFORE { VARIABLE_CONTAINER($$, new variables::MultipartDateBefore()); } | VARIABLE_MULTIPART_FILE_LIMIT_EXCEEDED { VARIABLE_CONTAINER($$, new variables::MultipartFileLimitExceeded()); } | VARIABLE_MULTIPART_HEADER_FOLDING { VARIABLE_CONTAINER($$, new variables::MultipartHeaderFolding()); } | VARIABLE_MULTIPART_INVALID_HEADER_FOLDING { VARIABLE_CONTAINER($$, new variables::MultipartInvalidHeaderFolding()); } | VARIABLE_MULTIPART_INVALID_PART { VARIABLE_CONTAINER($$, new variables::MultipartInvalidPart()); } | VARIABLE_MULTIPART_INVALID_QUOTING { VARIABLE_CONTAINER($$, new variables::MultipartInvalidQuoting()); } | VARIABLE_MULTIPART_LF_LINE { VARIABLE_CONTAINER($$, new variables::MultipartLFLine()); } | VARIABLE_MULTIPART_MISSING_SEMICOLON { VARIABLE_CONTAINER($$, new variables::MultipartMissingSemicolon()); } | VARIABLE_MULTIPART_SEMICOLON_MISSING { VARIABLE_CONTAINER($$, new variables::MultipartMissingSemicolon()); } | VARIABLE_MULTIPART_STRICT_ERROR { VARIABLE_CONTAINER($$, new variables::MultipartStrictError()); } | VARIABLE_MULTIPART_UNMATCHED_BOUNDARY { VARIABLE_CONTAINER($$, new variables::MultipartUnmatchedBoundary()); } | VARIABLE_OUTBOUND_DATA_ERROR { VARIABLE_CONTAINER($$, new variables::OutboundDataError()); } | VARIABLE_PATH_INFO { VARIABLE_CONTAINER($$, new variables::PathInfo()); } | VARIABLE_QUERY_STRING { VARIABLE_CONTAINER($$, new variables::QueryString()); } | VARIABLE_REMOTE_ADDR { VARIABLE_CONTAINER($$, new variables::RemoteAddr()); } | VARIABLE_REMOTE_HOST { VARIABLE_CONTAINER($$, new variables::RemoteHost()); } | VARIABLE_REMOTE_PORT { VARIABLE_CONTAINER($$, new variables::RemotePort()); } | VARIABLE_REQBODY_ERROR { VARIABLE_CONTAINER($$, new variables::ReqbodyError()); } | VARIABLE_REQBODY_ERROR_MSG { VARIABLE_CONTAINER($$, new variables::ReqbodyErrorMsg()); } | VARIABLE_REQBODY_PROCESSOR { VARIABLE_CONTAINER($$, new variables::ReqbodyProcessor()); } | VARIABLE_REQBODY_PROCESSOR_ERROR { VARIABLE_CONTAINER($$, new variables::ReqbodyProcessorError()); } | VARIABLE_REQBODY_PROCESSOR_ERROR_MSG { VARIABLE_CONTAINER($$, new variables::ReqbodyProcessorErrorMsg()); } | VARIABLE_REQUEST_BASENAME { VARIABLE_CONTAINER($$, new variables::RequestBasename()); } | VARIABLE_REQUEST_BODY { VARIABLE_CONTAINER($$, new variables::RequestBody()); } | VARIABLE_REQUEST_BODY_LENGTH { VARIABLE_CONTAINER($$, new variables::RequestBodyLength()); } | VARIABLE_REQUEST_FILE_NAME { VARIABLE_CONTAINER($$, new variables::RequestFilename()); } | VARIABLE_REQUEST_LINE { VARIABLE_CONTAINER($$, new variables::RequestLine()); } | VARIABLE_REQUEST_METHOD { VARIABLE_CONTAINER($$, new variables::RequestMethod()); } | VARIABLE_REQUEST_PROTOCOL { VARIABLE_CONTAINER($$, new variables::RequestProtocol()); } | VARIABLE_REQUEST_URI { VARIABLE_CONTAINER($$, new variables::RequestURI()); } | VARIABLE_REQUEST_URI_RAW { VARIABLE_CONTAINER($$, new variables::RequestURIRaw()); } | VARIABLE_RESPONSE_BODY { VARIABLE_CONTAINER($$, new variables::ResponseBody()); } | VARIABLE_RESPONSE_CONTENT_LENGTH { VARIABLE_CONTAINER($$, new variables::ResponseContentLength()); } | VARIABLE_RESPONSE_PROTOCOL { VARIABLE_CONTAINER($$, new variables::ResponseProtocol()); } | VARIABLE_RESPONSE_STATUS { VARIABLE_CONTAINER($$, new variables::ResponseStatus()); } | VARIABLE_SERVER_ADDR { VARIABLE_CONTAINER($$, new variables::ServerAddr()); } | VARIABLE_SERVER_NAME { VARIABLE_CONTAINER($$, new variables::ServerName()); } | VARIABLE_SERVER_PORT { VARIABLE_CONTAINER($$, new variables::ServerPort()); } | VARIABLE_SESSION_ID { VARIABLE_CONTAINER($$, new variables::SessionID()); } | VARIABLE_UNIQUE_ID { VARIABLE_CONTAINER($$, new variables::UniqueID()); } | VARIABLE_URL_ENCODED_ERROR { VARIABLE_CONTAINER($$, new variables::UrlEncodedError()); } | VARIABLE_USER_ID { VARIABLE_CONTAINER($$, new variables::UserID()); } | VARIABLE_STATUS { VARIABLE_CONTAINER($$, new variables::Status()); } | VARIABLE_STATUS_LINE { VARIABLE_CONTAINER($$, new variables::Status()); } | VARIABLE_WEB_APP_ID { VARIABLE_CONTAINER($$, new variables::WebAppId()); } | RUN_TIME_VAR_DUR { std::string name($1); char z = name.at(0); std::unique_ptr c(new Duration(name)); $$ = std::move(c); } | RUN_TIME_VAR_BLD { std::string name($1); char z = name.at(0); std::unique_ptr c(new ModsecBuild(name)); $$ = std::move(c); } | RUN_TIME_VAR_HSV { std::string name($1); char z = name.at(0); std::unique_ptr c(new HighestSeverity(name)); $$ = std::move(c); } | RUN_TIME_VAR_REMOTE_USER { std::string name($1); char z = name.at(0); std::unique_ptr c(new RemoteUser(name)); $$ = std::move(c); } | RUN_TIME_VAR_TIME { std::string name($1); char z = name.at(0); std::unique_ptr c(new Time(name)); $$ = std::move(c); } | RUN_TIME_VAR_TIME_DAY { std::string name($1); char z = name.at(0); std::unique_ptr c(new TimeDay(name)); $$ = std::move(c); } | RUN_TIME_VAR_TIME_EPOCH { std::string name($1); char z = name.at(0); std::unique_ptr c(new TimeEpoch(name)); $$ = std::move(c); } | RUN_TIME_VAR_TIME_HOUR { std::string name($1); char z = name.at(0); std::unique_ptr c(new TimeHour(name)); $$ = std::move(c); } | RUN_TIME_VAR_TIME_MIN { std::string name($1); char z = name.at(0); std::unique_ptr c(new TimeMin(name)); $$ = std::move(c); } | RUN_TIME_VAR_TIME_MON { std::string name($1); char z = name.at(0); std::unique_ptr c(new TimeMon(name)); $$ = std::move(c); } | RUN_TIME_VAR_TIME_SEC { std::string name($1); char z = name.at(0); std::unique_ptr c(new TimeSec(name)); $$ = std::move(c); } | RUN_TIME_VAR_TIME_WDAY { std::string name($1); char z = name.at(0); std::unique_ptr c(new TimeWDay(name)); $$ = std::move(c); } | RUN_TIME_VAR_TIME_YEAR { std::string name($1); char z = name.at(0); std::unique_ptr c(new TimeYear(name)); $$ = std::move(c); } ; act: ACTION_ACCURACY { ACTION_CONTAINER($$, new actions::Accuracy($1)); } | ACTION_ALLOW { ACTION_CONTAINER($$, new actions::disruptive::Allow($1)); } | ACTION_APPEND { ACTION_NOT_SUPPORTED("Append", @0); } | ACTION_AUDIT_LOG { ACTION_CONTAINER($$, new actions::AuditLog($1)); } | ACTION_BLOCK { ACTION_CONTAINER($$, new actions::Block($1)); } | ACTION_CAPTURE { ACTION_CONTAINER($$, new actions::Capture($1)); } | ACTION_CHAIN { ACTION_CONTAINER($$, new actions::Chain($1)); } | ACTION_CTL_AUDIT_ENGINE CONFIG_VALUE_ON { //ACTION_NOT_SUPPORTED("CtlAuditEngine", @0); ACTION_CONTAINER($$, new actions::Action($1)); } | ACTION_CTL_AUDIT_ENGINE CONFIG_VALUE_OFF { //ACTION_NOT_SUPPORTED("CtlAuditEngine", @0); ACTION_CONTAINER($$, new actions::Action($1)); } | ACTION_CTL_AUDIT_ENGINE CONFIG_VALUE_RELEVANT_ONLY { //ACTION_NOT_SUPPORTED("CtlAuditEngine", @0); ACTION_CONTAINER($$, new actions::Action($1)); } | ACTION_CTL_AUDIT_LOG_PARTS { ACTION_CONTAINER($$, new actions::ctl::AuditLogParts($1)); } | ACTION_CTL_BDY_JSON { ACTION_CONTAINER($$, new actions::ctl::RequestBodyProcessorJSON($1)); } | ACTION_CTL_BDY_XML { ACTION_CONTAINER($$, new actions::ctl::RequestBodyProcessorXML($1)); } | ACTION_CTL_BDY_URLENCODED { ACTION_CONTAINER($$, new actions::ctl::RequestBodyProcessorURLENCODED($1)); } | ACTION_CTL_FORCE_REQ_BODY_VAR CONFIG_VALUE_ON { //ACTION_NOT_SUPPORTED("CtlForceReequestBody", @0); ACTION_CONTAINER($$, new actions::Action($1)); } | ACTION_CTL_FORCE_REQ_BODY_VAR CONFIG_VALUE_OFF { //ACTION_NOT_SUPPORTED("CtlForceReequestBody", @0); ACTION_CONTAINER($$, new actions::Action($1)); } | ACTION_CTL_REQUEST_BODY_ACCESS CONFIG_VALUE_ON { ACTION_CONTAINER($$, new actions::ctl::RequestBodyAccess($1 + "true")); } | ACTION_CTL_REQUEST_BODY_ACCESS CONFIG_VALUE_OFF { ACTION_CONTAINER($$, new actions::ctl::RequestBodyAccess($1 + "false")); } | ACTION_CTL_RULE_ENGINE CONFIG_VALUE_ON { ACTION_CONTAINER($$, new actions::ctl::RuleEngine("ctl:RuleEngine=on")); } | ACTION_CTL_RULE_ENGINE CONFIG_VALUE_OFF { ACTION_CONTAINER($$, new actions::ctl::RuleEngine("ctl:RuleEngine=off")); } | ACTION_CTL_RULE_ENGINE CONFIG_VALUE_DETC { ACTION_CONTAINER($$, new actions::ctl::RuleEngine("ctl:RuleEngine=detectiononly")); } | ACTION_CTL_RULE_REMOVE_BY_ID { ACTION_CONTAINER($$, new actions::ctl::RuleRemoveById($1)); } | ACTION_CTL_RULE_REMOVE_BY_TAG { ACTION_CONTAINER($$, new actions::ctl::RuleRemoveByTag($1)); } | ACTION_CTL_RULE_REMOVE_TARGET_BY_ID { ACTION_CONTAINER($$, new actions::ctl::RuleRemoveTargetById($1)); } | ACTION_CTL_RULE_REMOVE_TARGET_BY_TAG { ACTION_CONTAINER($$, new actions::ctl::RuleRemoveTargetByTag($1)); } | ACTION_DENY { ACTION_CONTAINER($$, new actions::disruptive::Deny($1)); } | ACTION_DEPRECATE_VAR { ACTION_NOT_SUPPORTED("DeprecateVar", @0); } | ACTION_DROP { ACTION_CONTAINER($$, new actions::disruptive::Drop($1)); } | ACTION_EXEC { ACTION_CONTAINER($$, new actions::Exec($1)); } | ACTION_EXPIRE_VAR { //ACTION_NOT_SUPPORTED("ExpireVar", @0); ACTION_CONTAINER($$, new actions::Action($1)); } | ACTION_ID { ACTION_CONTAINER($$, new actions::RuleId($1)); } | ACTION_INITCOL run_time_string { ACTION_CONTAINER($$, new actions::InitCol($1, std::move($2))); } | ACTION_LOG_DATA run_time_string { ACTION_CONTAINER($$, new actions::LogData(std::move($2))); } | ACTION_LOG { ACTION_CONTAINER($$, new actions::Log($1)); } | ACTION_MATURITY { ACTION_CONTAINER($$, new actions::Maturity($1)); } | ACTION_MSG run_time_string { ACTION_CONTAINER($$, new actions::Msg(std::move($2))); } | ACTION_MULTI_MATCH { ACTION_CONTAINER($$, new actions::MultiMatch($1)); } | ACTION_NO_AUDIT_LOG { ACTION_CONTAINER($$, new actions::NoAuditLog($1)); } | ACTION_NO_LOG { ACTION_CONTAINER($$, new actions::NoLog($1)); } | ACTION_PASS { ACTION_CONTAINER($$, new actions::disruptive::Pass($1)); } | ACTION_PAUSE { ACTION_NOT_SUPPORTED("Pause", @0); } | ACTION_PHASE { ACTION_CONTAINER($$, new actions::Phase($1)); } | ACTION_PREPEND { ACTION_NOT_SUPPORTED("Prepend", @0); } | ACTION_PROXY { ACTION_NOT_SUPPORTED("Proxy", @0); } | ACTION_REDIRECT run_time_string { ACTION_CONTAINER($$, new actions::disruptive::Redirect(std::move($2))); } | ACTION_REV { ACTION_CONTAINER($$, new actions::Rev($1)); } | ACTION_SANITISE_ARG { ACTION_NOT_SUPPORTED("SanitiseArg", @0); } | ACTION_SANITISE_MATCHED { ACTION_NOT_SUPPORTED("SanitiseMatched", @0); } | ACTION_SANITISE_MATCHED_BYTES { ACTION_NOT_SUPPORTED("SanitiseMatchedBytes", @0); } | ACTION_SANITISE_REQUEST_HEADER { ACTION_NOT_SUPPORTED("SanitiseRequestHeader", @0); } | ACTION_SANITISE_RESPONSE_HEADER { ACTION_NOT_SUPPORTED("SanitiseResponseHeader", @0); } | ACTION_SETENV run_time_string { ACTION_CONTAINER($$, new actions::SetENV(std::move($2))); } | ACTION_SETRSC run_time_string { ACTION_CONTAINER($$, new actions::SetRSC(std::move($2))); } | ACTION_SETSID run_time_string { ACTION_CONTAINER($$, new actions::SetSID(std::move($2))); } | ACTION_SETUID run_time_string { ACTION_CONTAINER($$, new actions::SetUID(std::move($2))); } | ACTION_SETVAR setvar_action { $$ = std::move($2); } | ACTION_SEVERITY { ACTION_CONTAINER($$, new actions::Severity($1)); } | ACTION_SKIP { ACTION_CONTAINER($$, new actions::Skip($1)); } | ACTION_SKIP_AFTER { ACTION_CONTAINER($$, new actions::SkipAfter($1)); } | ACTION_STATUS { ACTION_CONTAINER($$, new actions::data::Status($1)); } | ACTION_TAG run_time_string { ACTION_CONTAINER($$, new actions::Tag(std::move($2))); } | ACTION_VER { ACTION_CONTAINER($$, new actions::Ver($1)); } | ACTION_XMLNS { ACTION_CONTAINER($$, new actions::XmlNS($1)); } | ACTION_TRANSFORMATION_PARITY_ZERO_7_BIT { ACTION_CONTAINER($$, new actions::transformations::ParityZero7bit($1)); } | ACTION_TRANSFORMATION_PARITY_ODD_7_BIT { ACTION_CONTAINER($$, new actions::transformations::ParityOdd7bit($1)); } | ACTION_TRANSFORMATION_PARITY_EVEN_7_BIT { ACTION_CONTAINER($$, new actions::transformations::ParityEven7bit($1)); } | ACTION_TRANSFORMATION_SQL_HEX_DECODE { ACTION_CONTAINER($$, new actions::transformations::SqlHexDecode($1)); } | ACTION_TRANSFORMATION_BASE_64_ENCODE { ACTION_CONTAINER($$, new actions::transformations::Base64Encode($1)); } | ACTION_TRANSFORMATION_BASE_64_DECODE { ACTION_CONTAINER($$, new actions::transformations::Base64Decode($1)); } | ACTION_TRANSFORMATION_BASE_64_DECODE_EXT { ACTION_CONTAINER($$, new actions::transformations::Base64DecodeExt($1)); } | ACTION_TRANSFORMATION_CMD_LINE { ACTION_CONTAINER($$, new actions::transformations::CmdLine($1)); } | ACTION_TRANSFORMATION_SHA1 { ACTION_CONTAINER($$, new actions::transformations::Sha1($1)); } | ACTION_TRANSFORMATION_MD5 { ACTION_CONTAINER($$, new actions::transformations::Md5($1)); } | ACTION_TRANSFORMATION_ESCAPE_SEQ_DECODE { ACTION_CONTAINER($$, new actions::transformations::EscapeSeqDecode($1)); } | ACTION_TRANSFORMATION_HEX_ENCODE { ACTION_CONTAINER($$, new actions::transformations::HexEncode($1)); } | ACTION_TRANSFORMATION_HEX_DECODE { ACTION_CONTAINER($$, new actions::transformations::HexDecode($1)); } | ACTION_TRANSFORMATION_LOWERCASE { ACTION_CONTAINER($$, new actions::transformations::LowerCase($1)); } | ACTION_TRANSFORMATION_UPPERCASE { ACTION_CONTAINER($$, new actions::transformations::UpperCase($1)); } | ACTION_TRANSFORMATION_URL_DECODE_UNI { ACTION_CONTAINER($$, new actions::transformations::UrlDecodeUni($1)); } | ACTION_TRANSFORMATION_URL_DECODE { ACTION_CONTAINER($$, new actions::transformations::UrlDecode($1)); } | ACTION_TRANSFORMATION_URL_ENCODE { ACTION_CONTAINER($$, new actions::transformations::UrlEncode($1)); } | ACTION_TRANSFORMATION_NONE { ACTION_CONTAINER($$, new actions::transformations::None($1)); } | ACTION_TRANSFORMATION_COMPRESS_WHITESPACE { ACTION_CONTAINER($$, new actions::transformations::CompressWhitespace($1)); } | ACTION_TRANSFORMATION_REMOVE_WHITESPACE { ACTION_CONTAINER($$, new actions::transformations::RemoveWhitespace($1)); } | ACTION_TRANSFORMATION_REPLACE_NULLS { ACTION_CONTAINER($$, new actions::transformations::ReplaceNulls($1)); } | ACTION_TRANSFORMATION_REMOVE_NULLS { ACTION_CONTAINER($$, new actions::transformations::RemoveNulls($1)); } | ACTION_TRANSFORMATION_HTML_ENTITY_DECODE { ACTION_CONTAINER($$, new actions::transformations::HtmlEntityDecode($1)); } | ACTION_TRANSFORMATION_JS_DECODE { ACTION_CONTAINER($$, new actions::transformations::JsDecode($1)); } | ACTION_TRANSFORMATION_CSS_DECODE { ACTION_CONTAINER($$, new actions::transformations::CssDecode($1)); } | ACTION_TRANSFORMATION_TRIM { ACTION_CONTAINER($$, new actions::transformations::Trim($1)); } | ACTION_TRANSFORMATION_TRIM_LEFT { ACTION_CONTAINER($$, new actions::transformations::TrimLeft($1)); } | ACTION_TRANSFORMATION_TRIM_RIGHT { ACTION_CONTAINER($$, new actions::transformations::TrimRight($1)); } | ACTION_TRANSFORMATION_NORMALISE_PATH_WIN { ACTION_CONTAINER($$, new actions::transformations::NormalisePathWin($1)); } | ACTION_TRANSFORMATION_NORMALISE_PATH { ACTION_CONTAINER($$, new actions::transformations::NormalisePath($1)); } | ACTION_TRANSFORMATION_LENGTH { ACTION_CONTAINER($$, new actions::transformations::Length($1)); } | ACTION_TRANSFORMATION_UTF8_TO_UNICODE { ACTION_CONTAINER($$, new actions::transformations::Utf8ToUnicode($1)); } | ACTION_TRANSFORMATION_REMOVE_COMMENTS_CHAR { ACTION_CONTAINER($$, new actions::transformations::RemoveCommentsChar($1)); } | ACTION_TRANSFORMATION_REMOVE_COMMENTS { ACTION_CONTAINER($$, new actions::transformations::RemoveComments($1)); } | ACTION_TRANSFORMATION_REPLACE_COMMENTS { ACTION_CONTAINER($$, new actions::transformations::ReplaceComments($1)); } ; setvar_action: NOT var { ACTION_CONTAINER($$, new actions::SetVar(actions::SetVarOperation::unsetOperation, std::move($2))); } | var { ACTION_CONTAINER($$, new actions::SetVar(actions::SetVarOperation::setToOneOperation, std::move($1))); } | var SETVAR_OPERATION_EQUALS run_time_string { ACTION_CONTAINER($$, new actions::SetVar(actions::SetVarOperation::setOperation, std::move($1), std::move($3))); } | var SETVAR_OPERATION_EQUALS_PLUS run_time_string { ACTION_CONTAINER($$, new actions::SetVar(actions::SetVarOperation::sumAndSetOperation, std::move($1), std::move($3))); } | var SETVAR_OPERATION_EQUALS_MINUS run_time_string { ACTION_CONTAINER($$, new actions::SetVar(actions::SetVarOperation::substractAndSetOperation, std::move($1), std::move($3))); } ; run_time_string: run_time_string FREE_TEXT_QUOTE_MACRO_EXPANSION { $1->appendText($2); $$ = std::move($1); } | run_time_string var { $1->appendVar(std::move($2)); $$ = std::move($1); } | FREE_TEXT_QUOTE_MACRO_EXPANSION { std::unique_ptr r(new RunTimeString()); r->appendText($1); $$ = std::move(r); } | var { std::unique_ptr r(new RunTimeString()); r->appendVar(std::move($1)); $$ = std::move(r); } ; %% void yy::seclang_parser::error (const location_type& l, const std::string& m) { driver.error (l, m); } modsecurity-v3.0.6/src/parser/seclang-parser.hh0000664000175000017500000126131114146026157022724 0ustar mhsvierulamhsvierula// A Bison parser, made by GNU Bison 3.7.2. // Skeleton interface for Bison LALR(1) parsers in C++ // Copyright (C) 2002-2015, 2018-2020 Free Software Foundation, Inc. // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // You should have received a copy of the GNU General Public License // along with this program. If not, see . // As a special exception, you may create a larger work that contains // part or all of the Bison parser skeleton and distribute that work // under terms of your choice, so long as that work isn't itself a // parser generator using the skeleton or a modified version thereof // as a parser skeleton. Alternatively, if you modify or redistribute // the parser skeleton itself, you may (at your option) remove this // special exception, which will cause the skeleton and the resulting // Bison output files to be licensed under the GNU General Public // License without this special exception. // This special exception was added by the Free Software Foundation in // version 2.2 of Bison. /** ** \file y.tab.h ** Define the yy::parser class. */ // C++ LALR(1) parser skeleton written by Akim Demaille. // DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual, // especially those whose name start with YY_ or yy_. They are // private implementation details that can be changed or removed. #ifndef YY_YY_SECLANG_PARSER_HH_INCLUDED # define YY_YY_SECLANG_PARSER_HH_INCLUDED // "%code requires" blocks. #line 10 "seclang-parser.yy" #include #include namespace ModSecurity { namespace Parser { class Driver; } } #include "modsecurity/rule_unconditional.h" #include "src/rule_script.h" #include "src/actions/accuracy.h" #include "src/actions/audit_log.h" #include "src/actions/block.h" #include "src/actions/capture.h" #include "src/actions/chain.h" #include "src/actions/ctl/audit_log_parts.h" #include "src/actions/ctl/request_body_access.h" #include "src/actions/ctl/rule_engine.h" #include "src/actions/ctl/request_body_processor_json.h" #include "src/actions/ctl/request_body_processor_xml.h" #include "src/actions/ctl/request_body_processor_urlencoded.h" #include "src/actions/ctl/rule_remove_by_id.h" #include "src/actions/ctl/rule_remove_by_tag.h" #include "src/actions/ctl/rule_remove_target_by_id.h" #include "src/actions/ctl/rule_remove_target_by_tag.h" #include "src/actions/data/status.h" #include "src/actions/disruptive/allow.h" #include "src/actions/disruptive/deny.h" #include "src/actions/disruptive/drop.h" #include "src/actions/disruptive/pass.h" #include "src/actions/disruptive/redirect.h" #include "src/actions/init_col.h" #include "src/actions/exec.h" #include "src/actions/log_data.h" #include "src/actions/log.h" #include "src/actions/maturity.h" #include "src/actions/msg.h" #include "src/actions/multi_match.h" #include "src/actions/no_audit_log.h" #include "src/actions/no_log.h" #include "src/actions/phase.h" #include "src/actions/rev.h" #include "src/actions/rule_id.h" #include "src/actions/set_env.h" #include "src/actions/set_rsc.h" #include "src/actions/set_sid.h" #include "src/actions/set_uid.h" #include "src/actions/set_var.h" #include "src/actions/severity.h" #include "src/actions/skip_after.h" #include "src/actions/skip.h" #include "src/actions/tag.h" #include "src/actions/ver.h" #include "src/actions/xmlns.h" #include "src/actions/transformations/none.h" #include "src/actions/transformations/transformation.h" #include "src/actions/transformations/url_decode_uni.h" #include "src/actions/transformations/hex_encode.h" #include "src/actions/transformations/parity_even_7bit.h" #include "src/actions/transformations/utf8_to_unicode.h" #include "src/actions/transformations/parity_zero_7bit.h" #include "src/actions/transformations/sql_hex_decode.h" #include "src/actions/transformations/replace_comments.h" #include "src/actions/transformations/none.h" #include "src/actions/transformations/url_decode.h" #include "src/actions/transformations/lower_case.h" #include "src/actions/transformations/upper_case.h" #include "src/actions/transformations/hex_decode.h" #include "src/actions/transformations/url_encode.h" #include "src/actions/transformations/js_decode.h" #include "src/actions/transformations/url_decode_uni.h" #include "src/actions/transformations/parity_odd_7bit.h" #include "src/actions/transformations/transformation.h" #include "src/actions/transformations/trim_right.h" #include "src/actions/transformations/escape_seq_decode.h" #include "src/actions/transformations/base64_decode_ext.h" #include "src/actions/transformations/base64_decode.h" #include "src/actions/transformations/trim.h" #include "src/actions/transformations/cmd_line.h" #include "src/actions/transformations/replace_nulls.h" #include "src/actions/transformations/md5.h" #include "src/actions/transformations/length.h" #include "src/actions/transformations/sha1.h" #include "src/actions/transformations/compress_whitespace.h" #include "src/actions/transformations/normalise_path_win.h" #include "src/actions/transformations/remove_nulls.h" #include "src/actions/transformations/remove_comments.h" #include "src/actions/transformations/normalise_path.h" #include "src/actions/transformations/html_entity_decode.h" #include "src/actions/transformations/trim_left.h" #include "src/actions/transformations/remove_comments_char.h" #include "src/actions/transformations/base64_encode.h" #include "src/actions/transformations/remove_whitespace.h" #include "src/actions/transformations/css_decode.h" #include "src/operators/begins_with.h" #include "src/operators/contains.h" #include "src/operators/contains_word.h" #include "src/operators/detect_sqli.h" #include "src/operators/detect_xss.h" #include "src/operators/ends_with.h" #include "src/operators/eq.h" #include "src/operators/fuzzy_hash.h" #include "src/operators/ge.h" #include "src/operators/geo_lookup.h" #include "src/operators/gsblookup.h" #include "src/operators/gt.h" #include "src/operators/inspect_file.h" #include "src/operators/ip_match_f.h" #include "src/operators/ip_match_from_file.h" #include "src/operators/ip_match.h" #include "src/operators/le.h" #include "src/operators/lt.h" #include "src/operators/no_match.h" #include "src/operators/operator.h" #include "src/operators/pm_f.h" #include "src/operators/pm_from_file.h" #include "src/operators/pm.h" #include "src/operators/rbl.h" #include "src/operators/rsub.h" #include "src/operators/rx.h" #include "src/operators/rx_global.h" #include "src/operators/str_eq.h" #include "src/operators/str_match.h" #include "src/operators/unconditional_match.h" #include "src/operators/validate_byte_range.h" #include "src/operators/validate_dtd.h" #include "src/operators/validate_hash.h" #include "src/operators/validate_schema.h" #include "src/operators/validate_url_encoding.h" #include "src/operators/validate_utf8_encoding.h" #include "src/operators/verify_cc.h" #include "src/operators/verify_cpf.h" #include "src/operators/verify_ssn.h" #include "src/operators/verify_svnr.h" #include "src/operators/within.h" #include "modsecurity/audit_log.h" #include "modsecurity/modsecurity.h" #include "modsecurity/rules_set_properties.h" #include "modsecurity/rule.h" #include "src/operators/operator.h" #include "src/utils/geo_lookup.h" #include "src/utils/string.h" #include "src/utils/system.h" #include "src/variables/args_combined_size.h" #include "src/variables/args_get.h" #include "src/variables/args_get_names.h" #include "src/variables/args.h" #include "src/variables/args_names.h" #include "src/variables/args_post.h" #include "src/variables/args_post_names.h" #include "src/variables/auth_type.h" #include "src/variables/duration.h" #include "src/variables/env.h" #include "src/variables/files_combined_size.h" #include "src/variables/files.h" #include "src/variables/files_names.h" #include "src/variables/files_sizes.h" #include "src/variables/files_tmp_content.h" #include "src/variables/files_tmp_names.h" #include "src/variables/full_request.h" #include "src/variables/full_request_length.h" #include "src/variables/geo.h" #include "src/variables/highest_severity.h" #include "src/variables/inbound_data_error.h" #include "src/variables/matched_var.h" #include "src/variables/matched_var_name.h" #include "src/variables/matched_vars.h" #include "src/variables/matched_vars_names.h" #include "src/variables/modsec_build.h" #include "src/variables/multipart_boundary_quoted.h" #include "src/variables/multipart_boundary_whitespace.h" #include "src/variables/multipart_crlf_lf_lines.h" #include "src/variables/multipart_data_after.h" #include "src/variables/multipart_data_before.h" #include "src/variables/multipart_file_limit_exceeded.h" #include "src/variables/multipart_file_name.h" #include "src/variables/multipart_header_folding.h" #include "src/variables/multipart_invalid_header_folding.h" #include "src/variables/multipart_invalid_part.h" #include "src/variables/multipart_invalid_quoting.h" #include "src/variables/multipart_lf_line.h" #include "src/variables/multipart_missing_semicolon.h" #include "src/variables/multipart_name.h" #include "src/variables/multipart_strict_error.h" #include "src/variables/multipart_unmatched_boundary.h" #include "src/variables/outbound_data_error.h" #include "src/variables/path_info.h" #include "src/variables/query_string.h" #include "src/variables/remote_addr.h" #include "src/variables/remote_host.h" #include "src/variables/remote_port.h" #include "src/variables/remote_user.h" #include "src/variables/reqbody_error.h" #include "src/variables/reqbody_error_msg.h" #include "src/variables/reqbody_processor_error.h" #include "src/variables/reqbody_processor_error_msg.h" #include "src/variables/reqbody_processor.h" #include "src/variables/request_base_name.h" #include "src/variables/request_body.h" #include "src/variables/request_body_length.h" #include "src/variables/request_cookies.h" #include "src/variables/request_cookies_names.h" #include "src/variables/request_file_name.h" #include "src/variables/request_headers.h" #include "src/variables/request_headers_names.h" #include "src/variables/request_line.h" #include "src/variables/request_method.h" #include "src/variables/request_protocol.h" #include "src/variables/request_uri.h" #include "src/variables/request_uri_raw.h" #include "src/variables/resource.h" #include "src/variables/response_body.h" #include "src/variables/response_content_length.h" #include "src/variables/response_content_type.h" #include "src/variables/response_headers.h" #include "src/variables/response_headers_names.h" #include "src/variables/response_protocol.h" #include "src/variables/response_status.h" #include "src/variables/rule.h" #include "src/variables/server_addr.h" #include "src/variables/server_name.h" #include "src/variables/server_port.h" #include "src/variables/session_id.h" #include "src/variables/web_app_id.h" #include "src/variables/time_day.h" #include "src/variables/time_epoch.h" #include "src/variables/time.h" #include "src/variables/time_hour.h" #include "src/variables/time_min.h" #include "src/variables/time_mon.h" #include "src/variables/time_sec.h" #include "src/variables/time_wday.h" #include "src/variables/time_year.h" #include "src/variables/tx.h" #include "src/variables/unique_id.h" #include "src/variables/url_encoded_error.h" #include "src/variables/user.h" #include "src/variables/user_id.h" #include "src/variables/variable.h" #include "src/variables/xml.h" #include "src/variables/ip.h" #include "src/variables/global.h" #include "src/variables/session.h" #include "src/variables/status.h" using namespace modsecurity; using namespace modsecurity::variables; using namespace modsecurity::Utils; using namespace modsecurity::operators; #define CHECK_VARIATION_DECL \ Variable *var = NULL; \ bool t = false; #define CHECK_VARIATION(a) \ if (var == NULL) { \ if (name.at(0) == std::string(#a).at(0)) { \ name.erase(0, 1); \ t = true ; \ } \ } else { \ t = false; \ } \ if (t) #define ACTION_NOT_SUPPORTED(a, b) \ driver.error(b, "Action: " + std::string(a) + " is not yet supported."); \ YYERROR; #define OPERATOR_NOT_SUPPORTED(a, b) \ driver.error(b, "Operator: " + std::string(a) + " is not yet supported."); \ YYERROR; #define ACTION_INIT(a, b) \ std::string error; \ if (a->init(&error) == false) { \ driver.error(b, error); \ YYERROR; \ } #define OPERATOR_CONTAINER(a, b) \ std::unique_ptr c(b); \ a = std::move(c); #define ACTION_CONTAINER(a, b) \ std::unique_ptr c(b); \ a = std::move(c); #define VARIABLE_CONTAINER(a, b) \ std::unique_ptr c(b); \ a = std::move(c); #line 354 "seclang-parser.hh" # include # include // std::abort # include # include # include # include #if defined __cplusplus # define YY_CPLUSPLUS __cplusplus #else # define YY_CPLUSPLUS 199711L #endif // Support move semantics when possible. #if 201103L <= YY_CPLUSPLUS # define YY_MOVE std::move # define YY_MOVE_OR_COPY move # define YY_MOVE_REF(Type) Type&& # define YY_RVREF(Type) Type&& # define YY_COPY(Type) Type #else # define YY_MOVE # define YY_MOVE_OR_COPY copy # define YY_MOVE_REF(Type) Type& # define YY_RVREF(Type) const Type& # define YY_COPY(Type) const Type& #endif // Support noexcept when possible. #if 201103L <= YY_CPLUSPLUS # define YY_NOEXCEPT noexcept # define YY_NOTHROW #else # define YY_NOEXCEPT # define YY_NOTHROW throw () #endif // Support constexpr when possible. #if 201703 <= YY_CPLUSPLUS # define YY_CONSTEXPR constexpr #else # define YY_CONSTEXPR #endif # include "location.hh" #include #ifndef YY_ASSERT # include # define YY_ASSERT assert #endif #ifndef YY_ATTRIBUTE_PURE # if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__) # define YY_ATTRIBUTE_PURE __attribute__ ((__pure__)) # else # define YY_ATTRIBUTE_PURE # endif #endif #ifndef YY_ATTRIBUTE_UNUSED # if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__) # define YY_ATTRIBUTE_UNUSED __attribute__ ((__unused__)) # else # define YY_ATTRIBUTE_UNUSED # endif #endif /* Suppress unused-variable warnings by "using" E. */ #if ! defined lint || defined __GNUC__ # define YYUSE(E) ((void) (E)) #else # define YYUSE(E) /* empty */ #endif #if defined __GNUC__ && ! defined __ICC && 407 <= __GNUC__ * 100 + __GNUC_MINOR__ /* Suppress an incorrect diagnostic about yylval being uninitialized. */ # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ _Pragma ("GCC diagnostic push") \ _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") \ _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") # define YY_IGNORE_MAYBE_UNINITIALIZED_END \ _Pragma ("GCC diagnostic pop") #else # define YY_INITIAL_VALUE(Value) Value #endif #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN # define YY_IGNORE_MAYBE_UNINITIALIZED_END #endif #ifndef YY_INITIAL_VALUE # define YY_INITIAL_VALUE(Value) /* Nothing. */ #endif #if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__ # define YY_IGNORE_USELESS_CAST_BEGIN \ _Pragma ("GCC diagnostic push") \ _Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"") # define YY_IGNORE_USELESS_CAST_END \ _Pragma ("GCC diagnostic pop") #endif #ifndef YY_IGNORE_USELESS_CAST_BEGIN # define YY_IGNORE_USELESS_CAST_BEGIN # define YY_IGNORE_USELESS_CAST_END #endif # ifndef YY_CAST # ifdef __cplusplus # define YY_CAST(Type, Val) static_cast (Val) # define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast (Val) # else # define YY_CAST(Type, Val) ((Type) (Val)) # define YY_REINTERPRET_CAST(Type, Val) ((Type) (Val)) # endif # endif # ifndef YY_NULLPTR # if defined __cplusplus # if 201103L <= __cplusplus # define YY_NULLPTR nullptr # else # define YY_NULLPTR 0 # endif # else # define YY_NULLPTR ((void*)0) # endif # endif /* Debug traces. */ #ifndef YYDEBUG # define YYDEBUG 1 #endif namespace yy { #line 488 "seclang-parser.hh" /// A Bison parser. class seclang_parser { public: #ifndef YYSTYPE /// A buffer to store and retrieve objects. /// /// Sort of a variant, but does not keep track of the nature /// of the stored data, since that knowledge is available /// via the current parser state. class semantic_type { public: /// Type of *this. typedef semantic_type self_type; /// Empty construction. semantic_type () YY_NOEXCEPT : yybuffer_ () , yytypeid_ (YY_NULLPTR) {} /// Construct and fill. template semantic_type (YY_RVREF (T) t) : yytypeid_ (&typeid (T)) { YY_ASSERT (sizeof (T) <= size); new (yyas_ ()) T (YY_MOVE (t)); } #if 201103L <= YY_CPLUSPLUS /// Non copyable. semantic_type (const self_type&) = delete; /// Non copyable. self_type& operator= (const self_type&) = delete; #endif /// Destruction, allowed only if empty. ~semantic_type () YY_NOEXCEPT { YY_ASSERT (!yytypeid_); } # if 201103L <= YY_CPLUSPLUS /// Instantiate a \a T in here from \a t. template T& emplace (U&&... u) { YY_ASSERT (!yytypeid_); YY_ASSERT (sizeof (T) <= size); yytypeid_ = & typeid (T); return *new (yyas_ ()) T (std::forward (u)...); } # else /// Instantiate an empty \a T in here. template T& emplace () { YY_ASSERT (!yytypeid_); YY_ASSERT (sizeof (T) <= size); yytypeid_ = & typeid (T); return *new (yyas_ ()) T (); } /// Instantiate a \a T in here from \a t. template T& emplace (const T& t) { YY_ASSERT (!yytypeid_); YY_ASSERT (sizeof (T) <= size); yytypeid_ = & typeid (T); return *new (yyas_ ()) T (std::move((T&)t)); } # endif /// Instantiate an empty \a T in here. /// Obsolete, use emplace. template T& build () { return emplace (); } /// Instantiate a \a T in here from \a t. /// Obsolete, use emplace. template T& build (const T& t) { return emplace (t); } /// Accessor to a built \a T. template T& as () YY_NOEXCEPT { YY_ASSERT (yytypeid_); YY_ASSERT (*yytypeid_ == typeid (T)); YY_ASSERT (sizeof (T) <= size); return *yyas_ (); } /// Const accessor to a built \a T (for %printer). template const T& as () const YY_NOEXCEPT { YY_ASSERT (yytypeid_); YY_ASSERT (*yytypeid_ == typeid (T)); YY_ASSERT (sizeof (T) <= size); return *yyas_ (); } /// Swap the content with \a that, of same type. /// /// Both variants must be built beforehand, because swapping the actual /// data requires reading it (with as()), and this is not possible on /// unconstructed variants: it would require some dynamic testing, which /// should not be the variant's responsibility. /// Swapping between built and (possibly) non-built is done with /// self_type::move (). template void swap (self_type& that) YY_NOEXCEPT { YY_ASSERT (yytypeid_); YY_ASSERT (*yytypeid_ == *that.yytypeid_); std::swap (as (), that.as ()); } /// Move the content of \a that to this. /// /// Destroys \a that. template void move (self_type& that) { # if 201103L <= YY_CPLUSPLUS emplace (std::move (that.as ())); # else emplace (); swap (that); # endif that.destroy (); } # if 201103L <= YY_CPLUSPLUS /// Move the content of \a that to this. template void move (self_type&& that) { emplace (std::move (that.as ())); that.destroy (); } #endif /// Copy the content of \a that to this. template void copy (const self_type& that) { emplace (that.as ()); } /// Destroy the stored \a T. template void destroy () { as ().~T (); yytypeid_ = YY_NULLPTR; } private: #if YY_CPLUSPLUS < 201103L /// Non copyable. semantic_type (const self_type&); /// Non copyable. self_type& operator= (const self_type&); #endif /// Accessor to raw memory as \a T. template T* yyas_ () YY_NOEXCEPT { void *yyp = yybuffer_.yyraw; return static_cast (yyp); } /// Const accessor to raw memory as \a T. template const T* yyas_ () const YY_NOEXCEPT { const void *yyp = yybuffer_.yyraw; return static_cast (yyp); } /// An auxiliary type to compute the largest semantic type. union union_type { // "Accuracy" // "Allow" // "Append" // "AuditLog" // "Block" // "Capture" // "Chain" // "ACTION_CTL_AUDIT_ENGINE" // "ACTION_CTL_AUDIT_LOG_PARTS" // "ACTION_CTL_BDY_JSON" // "ACTION_CTL_BDY_XML" // "ACTION_CTL_BDY_URLENCODED" // "ACTION_CTL_FORCE_REQ_BODY_VAR" // "ACTION_CTL_REQUEST_BODY_ACCESS" // "ACTION_CTL_RULE_REMOVE_BY_ID" // "ACTION_CTL_RULE_REMOVE_BY_TAG" // "ACTION_CTL_RULE_REMOVE_TARGET_BY_ID" // "ACTION_CTL_RULE_REMOVE_TARGET_BY_TAG" // "Deny" // "DeprecateVar" // "Drop" // "Exec" // "ExpireVar" // "Id" // "InitCol" // "Log" // "LogData" // "Maturity" // "Msg" // "MultiMatch" // "NoAuditLog" // "NoLog" // "Pass" // "Pause" // "Phase" // "Prepend" // "Proxy" // "Redirect" // "Rev" // "SanitiseArg" // "SanitiseMatched" // "SanitiseMatchedBytes" // "SanitiseRequestHeader" // "SanitiseResponseHeader" // "SetEnv" // "SetRsc" // "SetSid" // "SetUID" // "Severity" // "Skip" // "SkipAfter" // "Status" // "Tag" // "ACTION_TRANSFORMATION_BASE_64_ENCODE" // "ACTION_TRANSFORMATION_BASE_64_DECODE" // "ACTION_TRANSFORMATION_BASE_64_DECODE_EXT" // "ACTION_TRANSFORMATION_CMD_LINE" // "ACTION_TRANSFORMATION_COMPRESS_WHITESPACE" // "ACTION_TRANSFORMATION_CSS_DECODE" // "ACTION_TRANSFORMATION_ESCAPE_SEQ_DECODE" // "ACTION_TRANSFORMATION_HEX_ENCODE" // "ACTION_TRANSFORMATION_HEX_DECODE" // "ACTION_TRANSFORMATION_HTML_ENTITY_DECODE" // "ACTION_TRANSFORMATION_JS_DECODE" // "ACTION_TRANSFORMATION_LENGTH" // "ACTION_TRANSFORMATION_LOWERCASE" // "ACTION_TRANSFORMATION_MD5" // "ACTION_TRANSFORMATION_NONE" // "ACTION_TRANSFORMATION_NORMALISE_PATH" // "ACTION_TRANSFORMATION_NORMALISE_PATH_WIN" // "ACTION_TRANSFORMATION_PARITY_EVEN_7_BIT" // "ACTION_TRANSFORMATION_PARITY_ODD_7_BIT" // "ACTION_TRANSFORMATION_PARITY_ZERO_7_BIT" // "ACTION_TRANSFORMATION_REMOVE_COMMENTS" // "ACTION_TRANSFORMATION_REMOVE_COMMENTS_CHAR" // "ACTION_TRANSFORMATION_REMOVE_NULLS" // "ACTION_TRANSFORMATION_REMOVE_WHITESPACE" // "ACTION_TRANSFORMATION_REPLACE_COMMENTS" // "ACTION_TRANSFORMATION_REPLACE_NULLS" // "ACTION_TRANSFORMATION_SHA1" // "ACTION_TRANSFORMATION_SQL_HEX_DECODE" // "ACTION_TRANSFORMATION_TRIM" // "ACTION_TRANSFORMATION_TRIM_LEFT" // "ACTION_TRANSFORMATION_TRIM_RIGHT" // "ACTION_TRANSFORMATION_UPPERCASE" // "ACTION_TRANSFORMATION_URL_ENCODE" // "ACTION_TRANSFORMATION_URL_DECODE" // "ACTION_TRANSFORMATION_URL_DECODE_UNI" // "ACTION_TRANSFORMATION_UTF8_TO_UNICODE" // "Ver" // "xmlns" // "CONFIG_COMPONENT_SIG" // "CONFIG_CONN_ENGINE" // "CONFIG_SEC_ARGUMENT_SEPARATOR" // "CONFIG_SEC_WEB_APP_ID" // "CONFIG_SEC_SERVER_SIG" // "CONFIG_DIR_AUDIT_DIR" // "CONFIG_DIR_AUDIT_DIR_MOD" // "CONFIG_DIR_AUDIT_ENG" // "CONFIG_DIR_AUDIT_FLE_MOD" // "CONFIG_DIR_AUDIT_LOG" // "CONFIG_DIR_AUDIT_LOG2" // "CONFIG_DIR_AUDIT_LOG_P" // "CONFIG_DIR_AUDIT_STS" // "CONFIG_DIR_AUDIT_TPE" // "CONFIG_DIR_DEBUG_LOG" // "CONFIG_DIR_DEBUG_LVL" // "CONFIG_SEC_CACHE_TRANSFORMATIONS" // "CONFIG_SEC_DISABLE_BACKEND_COMPRESS" // "CONFIG_SEC_HASH_ENGINE" // "CONFIG_SEC_HASH_KEY" // "CONFIG_SEC_HASH_PARAM" // "CONFIG_SEC_HASH_METHOD_RX" // "CONFIG_SEC_HASH_METHOD_PM" // "CONFIG_SEC_CHROOT_DIR" // "CONFIG_DIR_GEO_DB" // "CONFIG_DIR_GSB_DB" // "CONFIG_SEC_GUARDIAN_LOG" // "CONFIG_DIR_PCRE_MATCH_LIMIT" // "CONFIG_DIR_PCRE_MATCH_LIMIT_RECURSION" // "CONFIG_SEC_CONN_R_STATE_LIMIT" // "CONFIG_SEC_CONN_W_STATE_LIMIT" // "CONFIG_SEC_SENSOR_ID" // "CONFIG_DIR_ARGS_LIMIT" // "CONFIG_DIR_REQ_BODY_JSON_DEPTH_LIMIT" // "CONFIG_DIR_REQ_BODY" // "CONFIG_DIR_REQ_BODY_IN_MEMORY_LIMIT" // "CONFIG_DIR_REQ_BODY_LIMIT" // "CONFIG_DIR_REQ_BODY_LIMIT_ACTION" // "CONFIG_DIR_REQ_BODY_NO_FILES_LIMIT" // "CONFIG_DIR_RES_BODY" // "CONFIG_DIR_RES_BODY_LIMIT" // "CONFIG_DIR_RES_BODY_LIMIT_ACTION" // "CONFIG_SEC_RULE_INHERITANCE" // "CONFIG_SEC_RULE_PERF_TIME" // "CONFIG_DIR_RULE_ENG" // "CONFIG_DIR_SEC_ACTION" // "CONFIG_DIR_SEC_DEFAULT_ACTION" // "CONFIG_DIR_SEC_MARKER" // "CONFIG_DIR_UNICODE_MAP_FILE" // "CONFIG_DIR_UNICODE_CODE_PAGE" // "CONFIG_SEC_COLLECTION_TIMEOUT" // "CONFIG_SEC_HTTP_BLKEY" // "CONFIG_SEC_INTERCEPT_ON_ERROR" // "CONFIG_SEC_REMOTE_RULES_FAIL_ACTION" // "CONFIG_SEC_RULE_REMOVE_BY_ID" // "CONFIG_SEC_RULE_REMOVE_BY_MSG" // "CONFIG_SEC_RULE_REMOVE_BY_TAG" // "CONFIG_SEC_RULE_UPDATE_TARGET_BY_TAG" // "CONFIG_SEC_RULE_UPDATE_TARGET_BY_MSG" // "CONFIG_SEC_RULE_UPDATE_TARGET_BY_ID" // "CONFIG_SEC_RULE_UPDATE_ACTION_BY_ID" // "CONFIG_UPDLOAD_KEEP_FILES" // "CONFIG_UPDLOAD_SAVE_TMP_FILES" // "CONFIG_UPLOAD_DIR" // "CONFIG_UPLOAD_FILE_LIMIT" // "CONFIG_UPLOAD_FILE_MODE" // "CONFIG_VALUE_ABORT" // "CONFIG_VALUE_DETC" // "CONFIG_VALUE_HTTPS" // "CONFIG_VALUE_OFF" // "CONFIG_VALUE_ON" // "CONFIG_VALUE_PARALLEL" // "CONFIG_VALUE_PROCESS_PARTIAL" // "CONFIG_VALUE_REJECT" // "CONFIG_VALUE_RELEVANT_ONLY" // "CONFIG_VALUE_SERIAL" // "CONFIG_VALUE_WARN" // "CONFIG_XML_EXTERNAL_ENTITY" // "CONGIG_DIR_RESPONSE_BODY_MP" // "CONGIG_DIR_SEC_ARG_SEP" // "CONGIG_DIR_SEC_COOKIE_FORMAT" // "CONFIG_SEC_COOKIEV0_SEPARATOR" // "CONGIG_DIR_SEC_DATA_DIR" // "CONGIG_DIR_SEC_STATUS_ENGINE" // "CONFIG_SEC_STREAM_IN_BODY_INSPECTION" // "CONFIG_SEC_STREAM_OUT_BODY_INSPECTION" // "CONGIG_DIR_SEC_TMP_DIR" // "DIRECTIVE" // "DIRECTIVE_SECRULESCRIPT" // "FREE_TEXT_QUOTE_MACRO_EXPANSION" // "QUOTATION_MARK" // "RUN_TIME_VAR_BLD" // "RUN_TIME_VAR_DUR" // "RUN_TIME_VAR_HSV" // "RUN_TIME_VAR_REMOTE_USER" // "RUN_TIME_VAR_TIME" // "RUN_TIME_VAR_TIME_DAY" // "RUN_TIME_VAR_TIME_EPOCH" // "RUN_TIME_VAR_TIME_HOUR" // "RUN_TIME_VAR_TIME_MIN" // "RUN_TIME_VAR_TIME_MON" // "RUN_TIME_VAR_TIME_SEC" // "RUN_TIME_VAR_TIME_WDAY" // "RUN_TIME_VAR_TIME_YEAR" // "VARIABLE" // "Dictionary element" // "Dictionary element, selected by regexp" char dummy1[sizeof (std::string)]; // op // op_before_init char dummy2[sizeof (std::unique_ptr)]; // run_time_string char dummy3[sizeof (std::unique_ptr)]; // var char dummy4[sizeof (std::unique_ptr)]; // act // setvar_action char dummy5[sizeof (std::unique_ptr)]; // variables // variables_pre_process // variables_may_be_quoted char dummy6[sizeof (std::unique_ptr > > )]; // actions // actions_may_quoted char dummy7[sizeof (std::unique_ptr > > )]; }; /// The size of the largest semantic type. enum { size = sizeof (union_type) }; /// A buffer to store semantic values. union { /// Strongest alignment constraints. long double yyalign_me; /// A buffer large enough to store any of the semantic values. char yyraw[size]; } yybuffer_; /// Whether the content is built: if defined, the name of the stored type. const std::type_info *yytypeid_; }; #else typedef YYSTYPE semantic_type; #endif /// Symbol locations. typedef location location_type; /// Syntax errors thrown from user actions. struct syntax_error : std::runtime_error { syntax_error (const location_type& l, const std::string& m) : std::runtime_error (m) , location (l) {} syntax_error (const syntax_error& s) : std::runtime_error (s.what ()) , location (s.location) {} ~syntax_error () YY_NOEXCEPT YY_NOTHROW; location_type location; }; /// Token kinds. struct token { enum token_kind_type { TOK_YYEMPTY = -2, TOK_END = 0, // "end of file" TOK_YYerror = 256, // error TOK_YYUNDEF = 257, // "invalid token" TOK_COMMA = 258, // "," TOK_CONFIG_CONTENT_INJECTION = 259, // "CONFIG_CONTENT_INJECTION" TOK_CONGIG_DIR_RESPONSE_BODY_MP_CLEAR = 260, // "CONGIG_DIR_RESPONSE_BODY_MP_CLEAR" TOK_PIPE = 261, // PIPE TOK_NEW_LINE = 262, // NEW_LINE TOK_VAR_COUNT = 263, // VAR_COUNT TOK_VAR_EXCLUSION = 264, // VAR_EXCLUSION TOK_VARIABLE_ARGS = 265, // VARIABLE_ARGS TOK_VARIABLE_ARGS_POST = 266, // VARIABLE_ARGS_POST TOK_VARIABLE_ARGS_GET = 267, // VARIABLE_ARGS_GET TOK_VARIABLE_FILES_SIZES = 268, // VARIABLE_FILES_SIZES TOK_VARIABLE_FILES_NAMES = 269, // VARIABLE_FILES_NAMES TOK_VARIABLE_FILES_TMP_CONTENT = 270, // VARIABLE_FILES_TMP_CONTENT TOK_VARIABLE_MULTIPART_FILENAME = 271, // VARIABLE_MULTIPART_FILENAME TOK_VARIABLE_MULTIPART_NAME = 272, // VARIABLE_MULTIPART_NAME TOK_VARIABLE_MATCHED_VARS_NAMES = 273, // VARIABLE_MATCHED_VARS_NAMES TOK_VARIABLE_MATCHED_VARS = 274, // VARIABLE_MATCHED_VARS TOK_VARIABLE_FILES = 275, // VARIABLE_FILES TOK_VARIABLE_REQUEST_COOKIES = 276, // VARIABLE_REQUEST_COOKIES TOK_VARIABLE_REQUEST_HEADERS = 277, // VARIABLE_REQUEST_HEADERS TOK_VARIABLE_RESPONSE_HEADERS = 278, // VARIABLE_RESPONSE_HEADERS TOK_VARIABLE_GEO = 279, // VARIABLE_GEO TOK_VARIABLE_REQUEST_COOKIES_NAMES = 280, // VARIABLE_REQUEST_COOKIES_NAMES TOK_VARIABLE_ARGS_COMBINED_SIZE = 281, // VARIABLE_ARGS_COMBINED_SIZE TOK_VARIABLE_ARGS_GET_NAMES = 282, // VARIABLE_ARGS_GET_NAMES TOK_VARIABLE_RULE = 283, // VARIABLE_RULE TOK_VARIABLE_ARGS_NAMES = 284, // "Variable ARGS_NAMES" TOK_VARIABLE_ARGS_POST_NAMES = 285, // VARIABLE_ARGS_POST_NAMES TOK_VARIABLE_AUTH_TYPE = 286, // "AUTH_TYPE" TOK_VARIABLE_FILES_COMBINED_SIZE = 287, // "FILES_COMBINED_SIZE" TOK_VARIABLE_FILES_TMP_NAMES = 288, // "FILES_TMPNAMES" TOK_VARIABLE_FULL_REQUEST = 289, // "FULL_REQUEST" TOK_VARIABLE_FULL_REQUEST_LENGTH = 290, // "FULL_REQUEST_LENGTH" TOK_VARIABLE_INBOUND_DATA_ERROR = 291, // "INBOUND_DATA_ERROR" TOK_VARIABLE_MATCHED_VAR = 292, // "MATCHED_VAR" TOK_VARIABLE_MATCHED_VAR_NAME = 293, // "MATCHED_VAR_NAME" TOK_VARIABLE_MULTIPART_BOUNDARY_QUOTED = 294, // VARIABLE_MULTIPART_BOUNDARY_QUOTED TOK_VARIABLE_MULTIPART_BOUNDARY_WHITESPACE = 295, // VARIABLE_MULTIPART_BOUNDARY_WHITESPACE TOK_VARIABLE_MULTIPART_CRLF_LF_LINES = 296, // "MULTIPART_CRLF_LF_LINES" TOK_VARIABLE_MULTIPART_DATA_AFTER = 297, // "MULTIPART_DATA_AFTER" TOK_VARIABLE_MULTIPART_DATA_BEFORE = 298, // VARIABLE_MULTIPART_DATA_BEFORE TOK_VARIABLE_MULTIPART_FILE_LIMIT_EXCEEDED = 299, // "MULTIPART_FILE_LIMIT_EXCEEDED" TOK_VARIABLE_MULTIPART_HEADER_FOLDING = 300, // "MULTIPART_HEADER_FOLDING" TOK_VARIABLE_MULTIPART_INVALID_HEADER_FOLDING = 301, // "MULTIPART_INVALID_HEADER_FOLDING" TOK_VARIABLE_MULTIPART_INVALID_PART = 302, // VARIABLE_MULTIPART_INVALID_PART TOK_VARIABLE_MULTIPART_INVALID_QUOTING = 303, // "MULTIPART_INVALID_QUOTING" TOK_VARIABLE_MULTIPART_LF_LINE = 304, // VARIABLE_MULTIPART_LF_LINE TOK_VARIABLE_MULTIPART_MISSING_SEMICOLON = 305, // VARIABLE_MULTIPART_MISSING_SEMICOLON TOK_VARIABLE_MULTIPART_SEMICOLON_MISSING = 306, // VARIABLE_MULTIPART_SEMICOLON_MISSING TOK_VARIABLE_MULTIPART_STRICT_ERROR = 307, // "MULTIPART_STRICT_ERROR" TOK_VARIABLE_MULTIPART_UNMATCHED_BOUNDARY = 308, // "MULTIPART_UNMATCHED_BOUNDARY" TOK_VARIABLE_OUTBOUND_DATA_ERROR = 309, // "OUTBOUND_DATA_ERROR" TOK_VARIABLE_PATH_INFO = 310, // "PATH_INFO" TOK_VARIABLE_QUERY_STRING = 311, // "QUERY_STRING" TOK_VARIABLE_REMOTE_ADDR = 312, // "REMOTE_ADDR" TOK_VARIABLE_REMOTE_HOST = 313, // "REMOTE_HOST" TOK_VARIABLE_REMOTE_PORT = 314, // "REMOTE_PORT" TOK_VARIABLE_REQBODY_ERROR_MSG = 315, // "REQBODY_ERROR_MSG" TOK_VARIABLE_REQBODY_ERROR = 316, // "REQBODY_ERROR" TOK_VARIABLE_REQBODY_PROCESSOR_ERROR_MSG = 317, // "REQBODY_PROCESSOR_ERROR_MSG" TOK_VARIABLE_REQBODY_PROCESSOR_ERROR = 318, // "REQBODY_PROCESSOR_ERROR" TOK_VARIABLE_REQBODY_PROCESSOR = 319, // "REQBODY_PROCESSOR" TOK_VARIABLE_REQUEST_BASENAME = 320, // "REQUEST_BASENAME" TOK_VARIABLE_REQUEST_BODY_LENGTH = 321, // "REQUEST_BODY_LENGTH" TOK_VARIABLE_REQUEST_BODY = 322, // "REQUEST_BODY" TOK_VARIABLE_REQUEST_FILE_NAME = 323, // "REQUEST_FILENAME" TOK_VARIABLE_REQUEST_HEADERS_NAMES = 324, // VARIABLE_REQUEST_HEADERS_NAMES TOK_VARIABLE_REQUEST_LINE = 325, // "REQUEST_LINE" TOK_VARIABLE_REQUEST_METHOD = 326, // "REQUEST_METHOD" TOK_VARIABLE_REQUEST_PROTOCOL = 327, // "REQUEST_PROTOCOL" TOK_VARIABLE_REQUEST_URI_RAW = 328, // "REQUEST_URI_RAW" TOK_VARIABLE_REQUEST_URI = 329, // "REQUEST_URI" TOK_VARIABLE_RESOURCE = 330, // "RESOURCE" TOK_VARIABLE_RESPONSE_BODY = 331, // "RESPONSE_BODY" TOK_VARIABLE_RESPONSE_CONTENT_LENGTH = 332, // "RESPONSE_CONTENT_LENGTH" TOK_VARIABLE_RESPONSE_CONTENT_TYPE = 333, // VARIABLE_RESPONSE_CONTENT_TYPE TOK_VARIABLE_RESPONSE_HEADERS_NAMES = 334, // VARIABLE_RESPONSE_HEADERS_NAMES TOK_VARIABLE_RESPONSE_PROTOCOL = 335, // "RESPONSE_PROTOCOL" TOK_VARIABLE_RESPONSE_STATUS = 336, // "RESPONSE_STATUS" TOK_VARIABLE_SERVER_ADDR = 337, // "SERVER_ADDR" TOK_VARIABLE_SERVER_NAME = 338, // "SERVER_NAME" TOK_VARIABLE_SERVER_PORT = 339, // "SERVER_PORT" TOK_VARIABLE_SESSION_ID = 340, // "SESSIONID" TOK_VARIABLE_UNIQUE_ID = 341, // "UNIQUE_ID" TOK_VARIABLE_URL_ENCODED_ERROR = 342, // "URLENCODED_ERROR" TOK_VARIABLE_USER_ID = 343, // "USERID" TOK_VARIABLE_WEB_APP_ID = 344, // "WEBAPPID" TOK_VARIABLE_STATUS = 345, // "VARIABLE_STATUS" TOK_VARIABLE_STATUS_LINE = 346, // "VARIABLE_STATUS_LINE" TOK_VARIABLE_IP = 347, // "VARIABLE_IP" TOK_VARIABLE_GLOBAL = 348, // "VARIABLE_GLOBAL" TOK_VARIABLE_TX = 349, // "VARIABLE_TX" TOK_VARIABLE_SESSION = 350, // "VARIABLE_SESSION" TOK_VARIABLE_USER = 351, // "VARIABLE_USER" TOK_RUN_TIME_VAR_ENV = 352, // "RUN_TIME_VAR_ENV" TOK_RUN_TIME_VAR_XML = 353, // "RUN_TIME_VAR_XML" TOK_ACTION_SETVAR = 354, // "SetVar" TOK_SETVAR_OPERATION_EQUALS = 355, // SETVAR_OPERATION_EQUALS TOK_SETVAR_OPERATION_EQUALS_PLUS = 356, // SETVAR_OPERATION_EQUALS_PLUS TOK_SETVAR_OPERATION_EQUALS_MINUS = 357, // SETVAR_OPERATION_EQUALS_MINUS TOK_NOT = 358, // "NOT" TOK_OPERATOR_BEGINS_WITH = 359, // "OPERATOR_BEGINS_WITH" TOK_OPERATOR_CONTAINS = 360, // "OPERATOR_CONTAINS" TOK_OPERATOR_CONTAINS_WORD = 361, // "OPERATOR_CONTAINS_WORD" TOK_OPERATOR_DETECT_SQLI = 362, // "OPERATOR_DETECT_SQLI" TOK_OPERATOR_DETECT_XSS = 363, // "OPERATOR_DETECT_XSS" TOK_OPERATOR_ENDS_WITH = 364, // "OPERATOR_ENDS_WITH" TOK_OPERATOR_EQ = 365, // "OPERATOR_EQ" TOK_OPERATOR_FUZZY_HASH = 366, // "OPERATOR_FUZZY_HASH" TOK_OPERATOR_GEOLOOKUP = 367, // "OPERATOR_GEOLOOKUP" TOK_OPERATOR_GE = 368, // "OPERATOR_GE" TOK_OPERATOR_GSB_LOOKUP = 369, // "OPERATOR_GSB_LOOKUP" TOK_OPERATOR_GT = 370, // "OPERATOR_GT" TOK_OPERATOR_INSPECT_FILE = 371, // "OPERATOR_INSPECT_FILE" TOK_OPERATOR_IP_MATCH_FROM_FILE = 372, // "OPERATOR_IP_MATCH_FROM_FILE" TOK_OPERATOR_IP_MATCH = 373, // "OPERATOR_IP_MATCH" TOK_OPERATOR_LE = 374, // "OPERATOR_LE" TOK_OPERATOR_LT = 375, // "OPERATOR_LT" TOK_OPERATOR_PM_FROM_FILE = 376, // "OPERATOR_PM_FROM_FILE" TOK_OPERATOR_PM = 377, // "OPERATOR_PM" TOK_OPERATOR_RBL = 378, // "OPERATOR_RBL" TOK_OPERATOR_RSUB = 379, // "OPERATOR_RSUB" TOK_OPERATOR_RX_CONTENT_ONLY = 380, // "Operator RX (content only)" TOK_OPERATOR_RX = 381, // "OPERATOR_RX" TOK_OPERATOR_RX_GLOBAL = 382, // "OPERATOR_RX_GLOBAL" TOK_OPERATOR_STR_EQ = 383, // "OPERATOR_STR_EQ" TOK_OPERATOR_STR_MATCH = 384, // "OPERATOR_STR_MATCH" TOK_OPERATOR_UNCONDITIONAL_MATCH = 385, // "OPERATOR_UNCONDITIONAL_MATCH" TOK_OPERATOR_VALIDATE_BYTE_RANGE = 386, // "OPERATOR_VALIDATE_BYTE_RANGE" TOK_OPERATOR_VALIDATE_DTD = 387, // "OPERATOR_VALIDATE_DTD" TOK_OPERATOR_VALIDATE_HASH = 388, // "OPERATOR_VALIDATE_HASH" TOK_OPERATOR_VALIDATE_SCHEMA = 389, // "OPERATOR_VALIDATE_SCHEMA" TOK_OPERATOR_VALIDATE_URL_ENCODING = 390, // "OPERATOR_VALIDATE_URL_ENCODING" TOK_OPERATOR_VALIDATE_UTF8_ENCODING = 391, // "OPERATOR_VALIDATE_UTF8_ENCODING" TOK_OPERATOR_VERIFY_CC = 392, // "OPERATOR_VERIFY_CC" TOK_OPERATOR_VERIFY_CPF = 393, // "OPERATOR_VERIFY_CPF" TOK_OPERATOR_VERIFY_SSN = 394, // "OPERATOR_VERIFY_SSN" TOK_OPERATOR_VERIFY_SVNR = 395, // "OPERATOR_VERIFY_SVNR" TOK_OPERATOR_WITHIN = 396, // "OPERATOR_WITHIN" TOK_CONFIG_DIR_AUDIT_LOG_FMT = 397, // CONFIG_DIR_AUDIT_LOG_FMT TOK_JSON = 398, // JSON TOK_NATIVE = 399, // NATIVE TOK_ACTION_CTL_RULE_ENGINE = 400, // "ACTION_CTL_RULE_ENGINE" TOK_ACTION_ACCURACY = 401, // "Accuracy" TOK_ACTION_ALLOW = 402, // "Allow" TOK_ACTION_APPEND = 403, // "Append" TOK_ACTION_AUDIT_LOG = 404, // "AuditLog" TOK_ACTION_BLOCK = 405, // "Block" TOK_ACTION_CAPTURE = 406, // "Capture" TOK_ACTION_CHAIN = 407, // "Chain" TOK_ACTION_CTL_AUDIT_ENGINE = 408, // "ACTION_CTL_AUDIT_ENGINE" TOK_ACTION_CTL_AUDIT_LOG_PARTS = 409, // "ACTION_CTL_AUDIT_LOG_PARTS" TOK_ACTION_CTL_BDY_JSON = 410, // "ACTION_CTL_BDY_JSON" TOK_ACTION_CTL_BDY_XML = 411, // "ACTION_CTL_BDY_XML" TOK_ACTION_CTL_BDY_URLENCODED = 412, // "ACTION_CTL_BDY_URLENCODED" TOK_ACTION_CTL_FORCE_REQ_BODY_VAR = 413, // "ACTION_CTL_FORCE_REQ_BODY_VAR" TOK_ACTION_CTL_REQUEST_BODY_ACCESS = 414, // "ACTION_CTL_REQUEST_BODY_ACCESS" TOK_ACTION_CTL_RULE_REMOVE_BY_ID = 415, // "ACTION_CTL_RULE_REMOVE_BY_ID" TOK_ACTION_CTL_RULE_REMOVE_BY_TAG = 416, // "ACTION_CTL_RULE_REMOVE_BY_TAG" TOK_ACTION_CTL_RULE_REMOVE_TARGET_BY_ID = 417, // "ACTION_CTL_RULE_REMOVE_TARGET_BY_ID" TOK_ACTION_CTL_RULE_REMOVE_TARGET_BY_TAG = 418, // "ACTION_CTL_RULE_REMOVE_TARGET_BY_TAG" TOK_ACTION_DENY = 419, // "Deny" TOK_ACTION_DEPRECATE_VAR = 420, // "DeprecateVar" TOK_ACTION_DROP = 421, // "Drop" TOK_ACTION_EXEC = 422, // "Exec" TOK_ACTION_EXPIRE_VAR = 423, // "ExpireVar" TOK_ACTION_ID = 424, // "Id" TOK_ACTION_INITCOL = 425, // "InitCol" TOK_ACTION_LOG = 426, // "Log" TOK_ACTION_LOG_DATA = 427, // "LogData" TOK_ACTION_MATURITY = 428, // "Maturity" TOK_ACTION_MSG = 429, // "Msg" TOK_ACTION_MULTI_MATCH = 430, // "MultiMatch" TOK_ACTION_NO_AUDIT_LOG = 431, // "NoAuditLog" TOK_ACTION_NO_LOG = 432, // "NoLog" TOK_ACTION_PASS = 433, // "Pass" TOK_ACTION_PAUSE = 434, // "Pause" TOK_ACTION_PHASE = 435, // "Phase" TOK_ACTION_PREPEND = 436, // "Prepend" TOK_ACTION_PROXY = 437, // "Proxy" TOK_ACTION_REDIRECT = 438, // "Redirect" TOK_ACTION_REV = 439, // "Rev" TOK_ACTION_SANITISE_ARG = 440, // "SanitiseArg" TOK_ACTION_SANITISE_MATCHED = 441, // "SanitiseMatched" TOK_ACTION_SANITISE_MATCHED_BYTES = 442, // "SanitiseMatchedBytes" TOK_ACTION_SANITISE_REQUEST_HEADER = 443, // "SanitiseRequestHeader" TOK_ACTION_SANITISE_RESPONSE_HEADER = 444, // "SanitiseResponseHeader" TOK_ACTION_SETENV = 445, // "SetEnv" TOK_ACTION_SETRSC = 446, // "SetRsc" TOK_ACTION_SETSID = 447, // "SetSid" TOK_ACTION_SETUID = 448, // "SetUID" TOK_ACTION_SEVERITY = 449, // "Severity" TOK_ACTION_SKIP = 450, // "Skip" TOK_ACTION_SKIP_AFTER = 451, // "SkipAfter" TOK_ACTION_STATUS = 452, // "Status" TOK_ACTION_TAG = 453, // "Tag" TOK_ACTION_TRANSFORMATION_BASE_64_ENCODE = 454, // "ACTION_TRANSFORMATION_BASE_64_ENCODE" TOK_ACTION_TRANSFORMATION_BASE_64_DECODE = 455, // "ACTION_TRANSFORMATION_BASE_64_DECODE" TOK_ACTION_TRANSFORMATION_BASE_64_DECODE_EXT = 456, // "ACTION_TRANSFORMATION_BASE_64_DECODE_EXT" TOK_ACTION_TRANSFORMATION_CMD_LINE = 457, // "ACTION_TRANSFORMATION_CMD_LINE" TOK_ACTION_TRANSFORMATION_COMPRESS_WHITESPACE = 458, // "ACTION_TRANSFORMATION_COMPRESS_WHITESPACE" TOK_ACTION_TRANSFORMATION_CSS_DECODE = 459, // "ACTION_TRANSFORMATION_CSS_DECODE" TOK_ACTION_TRANSFORMATION_ESCAPE_SEQ_DECODE = 460, // "ACTION_TRANSFORMATION_ESCAPE_SEQ_DECODE" TOK_ACTION_TRANSFORMATION_HEX_ENCODE = 461, // "ACTION_TRANSFORMATION_HEX_ENCODE" TOK_ACTION_TRANSFORMATION_HEX_DECODE = 462, // "ACTION_TRANSFORMATION_HEX_DECODE" TOK_ACTION_TRANSFORMATION_HTML_ENTITY_DECODE = 463, // "ACTION_TRANSFORMATION_HTML_ENTITY_DECODE" TOK_ACTION_TRANSFORMATION_JS_DECODE = 464, // "ACTION_TRANSFORMATION_JS_DECODE" TOK_ACTION_TRANSFORMATION_LENGTH = 465, // "ACTION_TRANSFORMATION_LENGTH" TOK_ACTION_TRANSFORMATION_LOWERCASE = 466, // "ACTION_TRANSFORMATION_LOWERCASE" TOK_ACTION_TRANSFORMATION_MD5 = 467, // "ACTION_TRANSFORMATION_MD5" TOK_ACTION_TRANSFORMATION_NONE = 468, // "ACTION_TRANSFORMATION_NONE" TOK_ACTION_TRANSFORMATION_NORMALISE_PATH = 469, // "ACTION_TRANSFORMATION_NORMALISE_PATH" TOK_ACTION_TRANSFORMATION_NORMALISE_PATH_WIN = 470, // "ACTION_TRANSFORMATION_NORMALISE_PATH_WIN" TOK_ACTION_TRANSFORMATION_PARITY_EVEN_7_BIT = 471, // "ACTION_TRANSFORMATION_PARITY_EVEN_7_BIT" TOK_ACTION_TRANSFORMATION_PARITY_ODD_7_BIT = 472, // "ACTION_TRANSFORMATION_PARITY_ODD_7_BIT" TOK_ACTION_TRANSFORMATION_PARITY_ZERO_7_BIT = 473, // "ACTION_TRANSFORMATION_PARITY_ZERO_7_BIT" TOK_ACTION_TRANSFORMATION_REMOVE_COMMENTS = 474, // "ACTION_TRANSFORMATION_REMOVE_COMMENTS" TOK_ACTION_TRANSFORMATION_REMOVE_COMMENTS_CHAR = 475, // "ACTION_TRANSFORMATION_REMOVE_COMMENTS_CHAR" TOK_ACTION_TRANSFORMATION_REMOVE_NULLS = 476, // "ACTION_TRANSFORMATION_REMOVE_NULLS" TOK_ACTION_TRANSFORMATION_REMOVE_WHITESPACE = 477, // "ACTION_TRANSFORMATION_REMOVE_WHITESPACE" TOK_ACTION_TRANSFORMATION_REPLACE_COMMENTS = 478, // "ACTION_TRANSFORMATION_REPLACE_COMMENTS" TOK_ACTION_TRANSFORMATION_REPLACE_NULLS = 479, // "ACTION_TRANSFORMATION_REPLACE_NULLS" TOK_ACTION_TRANSFORMATION_SHA1 = 480, // "ACTION_TRANSFORMATION_SHA1" TOK_ACTION_TRANSFORMATION_SQL_HEX_DECODE = 481, // "ACTION_TRANSFORMATION_SQL_HEX_DECODE" TOK_ACTION_TRANSFORMATION_TRIM = 482, // "ACTION_TRANSFORMATION_TRIM" TOK_ACTION_TRANSFORMATION_TRIM_LEFT = 483, // "ACTION_TRANSFORMATION_TRIM_LEFT" TOK_ACTION_TRANSFORMATION_TRIM_RIGHT = 484, // "ACTION_TRANSFORMATION_TRIM_RIGHT" TOK_ACTION_TRANSFORMATION_UPPERCASE = 485, // "ACTION_TRANSFORMATION_UPPERCASE" TOK_ACTION_TRANSFORMATION_URL_ENCODE = 486, // "ACTION_TRANSFORMATION_URL_ENCODE" TOK_ACTION_TRANSFORMATION_URL_DECODE = 487, // "ACTION_TRANSFORMATION_URL_DECODE" TOK_ACTION_TRANSFORMATION_URL_DECODE_UNI = 488, // "ACTION_TRANSFORMATION_URL_DECODE_UNI" TOK_ACTION_TRANSFORMATION_UTF8_TO_UNICODE = 489, // "ACTION_TRANSFORMATION_UTF8_TO_UNICODE" TOK_ACTION_VER = 490, // "Ver" TOK_ACTION_XMLNS = 491, // "xmlns" TOK_CONFIG_COMPONENT_SIG = 492, // "CONFIG_COMPONENT_SIG" TOK_CONFIG_CONN_ENGINE = 493, // "CONFIG_CONN_ENGINE" TOK_CONFIG_SEC_ARGUMENT_SEPARATOR = 494, // "CONFIG_SEC_ARGUMENT_SEPARATOR" TOK_CONFIG_SEC_WEB_APP_ID = 495, // "CONFIG_SEC_WEB_APP_ID" TOK_CONFIG_SEC_SERVER_SIG = 496, // "CONFIG_SEC_SERVER_SIG" TOK_CONFIG_DIR_AUDIT_DIR = 497, // "CONFIG_DIR_AUDIT_DIR" TOK_CONFIG_DIR_AUDIT_DIR_MOD = 498, // "CONFIG_DIR_AUDIT_DIR_MOD" TOK_CONFIG_DIR_AUDIT_ENG = 499, // "CONFIG_DIR_AUDIT_ENG" TOK_CONFIG_DIR_AUDIT_FLE_MOD = 500, // "CONFIG_DIR_AUDIT_FLE_MOD" TOK_CONFIG_DIR_AUDIT_LOG = 501, // "CONFIG_DIR_AUDIT_LOG" TOK_CONFIG_DIR_AUDIT_LOG2 = 502, // "CONFIG_DIR_AUDIT_LOG2" TOK_CONFIG_DIR_AUDIT_LOG_P = 503, // "CONFIG_DIR_AUDIT_LOG_P" TOK_CONFIG_DIR_AUDIT_STS = 504, // "CONFIG_DIR_AUDIT_STS" TOK_CONFIG_DIR_AUDIT_TPE = 505, // "CONFIG_DIR_AUDIT_TPE" TOK_CONFIG_DIR_DEBUG_LOG = 506, // "CONFIG_DIR_DEBUG_LOG" TOK_CONFIG_DIR_DEBUG_LVL = 507, // "CONFIG_DIR_DEBUG_LVL" TOK_CONFIG_SEC_CACHE_TRANSFORMATIONS = 508, // "CONFIG_SEC_CACHE_TRANSFORMATIONS" TOK_CONFIG_SEC_DISABLE_BACKEND_COMPRESS = 509, // "CONFIG_SEC_DISABLE_BACKEND_COMPRESS" TOK_CONFIG_SEC_HASH_ENGINE = 510, // "CONFIG_SEC_HASH_ENGINE" TOK_CONFIG_SEC_HASH_KEY = 511, // "CONFIG_SEC_HASH_KEY" TOK_CONFIG_SEC_HASH_PARAM = 512, // "CONFIG_SEC_HASH_PARAM" TOK_CONFIG_SEC_HASH_METHOD_RX = 513, // "CONFIG_SEC_HASH_METHOD_RX" TOK_CONFIG_SEC_HASH_METHOD_PM = 514, // "CONFIG_SEC_HASH_METHOD_PM" TOK_CONFIG_SEC_CHROOT_DIR = 515, // "CONFIG_SEC_CHROOT_DIR" TOK_CONFIG_DIR_GEO_DB = 516, // "CONFIG_DIR_GEO_DB" TOK_CONFIG_DIR_GSB_DB = 517, // "CONFIG_DIR_GSB_DB" TOK_CONFIG_SEC_GUARDIAN_LOG = 518, // "CONFIG_SEC_GUARDIAN_LOG" TOK_CONFIG_DIR_PCRE_MATCH_LIMIT = 519, // "CONFIG_DIR_PCRE_MATCH_LIMIT" TOK_CONFIG_DIR_PCRE_MATCH_LIMIT_RECURSION = 520, // "CONFIG_DIR_PCRE_MATCH_LIMIT_RECURSION" TOK_CONFIG_SEC_CONN_R_STATE_LIMIT = 521, // "CONFIG_SEC_CONN_R_STATE_LIMIT" TOK_CONFIG_SEC_CONN_W_STATE_LIMIT = 522, // "CONFIG_SEC_CONN_W_STATE_LIMIT" TOK_CONFIG_SEC_SENSOR_ID = 523, // "CONFIG_SEC_SENSOR_ID" TOK_CONFIG_DIR_ARGS_LIMIT = 524, // "CONFIG_DIR_ARGS_LIMIT" TOK_CONFIG_DIR_REQ_BODY_JSON_DEPTH_LIMIT = 525, // "CONFIG_DIR_REQ_BODY_JSON_DEPTH_LIMIT" TOK_CONFIG_DIR_REQ_BODY = 526, // "CONFIG_DIR_REQ_BODY" TOK_CONFIG_DIR_REQ_BODY_IN_MEMORY_LIMIT = 527, // "CONFIG_DIR_REQ_BODY_IN_MEMORY_LIMIT" TOK_CONFIG_DIR_REQ_BODY_LIMIT = 528, // "CONFIG_DIR_REQ_BODY_LIMIT" TOK_CONFIG_DIR_REQ_BODY_LIMIT_ACTION = 529, // "CONFIG_DIR_REQ_BODY_LIMIT_ACTION" TOK_CONFIG_DIR_REQ_BODY_NO_FILES_LIMIT = 530, // "CONFIG_DIR_REQ_BODY_NO_FILES_LIMIT" TOK_CONFIG_DIR_RES_BODY = 531, // "CONFIG_DIR_RES_BODY" TOK_CONFIG_DIR_RES_BODY_LIMIT = 532, // "CONFIG_DIR_RES_BODY_LIMIT" TOK_CONFIG_DIR_RES_BODY_LIMIT_ACTION = 533, // "CONFIG_DIR_RES_BODY_LIMIT_ACTION" TOK_CONFIG_SEC_RULE_INHERITANCE = 534, // "CONFIG_SEC_RULE_INHERITANCE" TOK_CONFIG_SEC_RULE_PERF_TIME = 535, // "CONFIG_SEC_RULE_PERF_TIME" TOK_CONFIG_DIR_RULE_ENG = 536, // "CONFIG_DIR_RULE_ENG" TOK_CONFIG_DIR_SEC_ACTION = 537, // "CONFIG_DIR_SEC_ACTION" TOK_CONFIG_DIR_SEC_DEFAULT_ACTION = 538, // "CONFIG_DIR_SEC_DEFAULT_ACTION" TOK_CONFIG_DIR_SEC_MARKER = 539, // "CONFIG_DIR_SEC_MARKER" TOK_CONFIG_DIR_UNICODE_MAP_FILE = 540, // "CONFIG_DIR_UNICODE_MAP_FILE" TOK_CONFIG_DIR_UNICODE_CODE_PAGE = 541, // "CONFIG_DIR_UNICODE_CODE_PAGE" TOK_CONFIG_SEC_COLLECTION_TIMEOUT = 542, // "CONFIG_SEC_COLLECTION_TIMEOUT" TOK_CONFIG_SEC_HTTP_BLKEY = 543, // "CONFIG_SEC_HTTP_BLKEY" TOK_CONFIG_SEC_INTERCEPT_ON_ERROR = 544, // "CONFIG_SEC_INTERCEPT_ON_ERROR" TOK_CONFIG_SEC_REMOTE_RULES_FAIL_ACTION = 545, // "CONFIG_SEC_REMOTE_RULES_FAIL_ACTION" TOK_CONFIG_SEC_RULE_REMOVE_BY_ID = 546, // "CONFIG_SEC_RULE_REMOVE_BY_ID" TOK_CONFIG_SEC_RULE_REMOVE_BY_MSG = 547, // "CONFIG_SEC_RULE_REMOVE_BY_MSG" TOK_CONFIG_SEC_RULE_REMOVE_BY_TAG = 548, // "CONFIG_SEC_RULE_REMOVE_BY_TAG" TOK_CONFIG_SEC_RULE_UPDATE_TARGET_BY_TAG = 549, // "CONFIG_SEC_RULE_UPDATE_TARGET_BY_TAG" TOK_CONFIG_SEC_RULE_UPDATE_TARGET_BY_MSG = 550, // "CONFIG_SEC_RULE_UPDATE_TARGET_BY_MSG" TOK_CONFIG_SEC_RULE_UPDATE_TARGET_BY_ID = 551, // "CONFIG_SEC_RULE_UPDATE_TARGET_BY_ID" TOK_CONFIG_SEC_RULE_UPDATE_ACTION_BY_ID = 552, // "CONFIG_SEC_RULE_UPDATE_ACTION_BY_ID" TOK_CONFIG_UPDLOAD_KEEP_FILES = 553, // "CONFIG_UPDLOAD_KEEP_FILES" TOK_CONFIG_UPDLOAD_SAVE_TMP_FILES = 554, // "CONFIG_UPDLOAD_SAVE_TMP_FILES" TOK_CONFIG_UPLOAD_DIR = 555, // "CONFIG_UPLOAD_DIR" TOK_CONFIG_UPLOAD_FILE_LIMIT = 556, // "CONFIG_UPLOAD_FILE_LIMIT" TOK_CONFIG_UPLOAD_FILE_MODE = 557, // "CONFIG_UPLOAD_FILE_MODE" TOK_CONFIG_VALUE_ABORT = 558, // "CONFIG_VALUE_ABORT" TOK_CONFIG_VALUE_DETC = 559, // "CONFIG_VALUE_DETC" TOK_CONFIG_VALUE_HTTPS = 560, // "CONFIG_VALUE_HTTPS" TOK_CONFIG_VALUE_OFF = 561, // "CONFIG_VALUE_OFF" TOK_CONFIG_VALUE_ON = 562, // "CONFIG_VALUE_ON" TOK_CONFIG_VALUE_PARALLEL = 563, // "CONFIG_VALUE_PARALLEL" TOK_CONFIG_VALUE_PROCESS_PARTIAL = 564, // "CONFIG_VALUE_PROCESS_PARTIAL" TOK_CONFIG_VALUE_REJECT = 565, // "CONFIG_VALUE_REJECT" TOK_CONFIG_VALUE_RELEVANT_ONLY = 566, // "CONFIG_VALUE_RELEVANT_ONLY" TOK_CONFIG_VALUE_SERIAL = 567, // "CONFIG_VALUE_SERIAL" TOK_CONFIG_VALUE_WARN = 568, // "CONFIG_VALUE_WARN" TOK_CONFIG_XML_EXTERNAL_ENTITY = 569, // "CONFIG_XML_EXTERNAL_ENTITY" TOK_CONGIG_DIR_RESPONSE_BODY_MP = 570, // "CONGIG_DIR_RESPONSE_BODY_MP" TOK_CONGIG_DIR_SEC_ARG_SEP = 571, // "CONGIG_DIR_SEC_ARG_SEP" TOK_CONGIG_DIR_SEC_COOKIE_FORMAT = 572, // "CONGIG_DIR_SEC_COOKIE_FORMAT" TOK_CONFIG_SEC_COOKIEV0_SEPARATOR = 573, // "CONFIG_SEC_COOKIEV0_SEPARATOR" TOK_CONGIG_DIR_SEC_DATA_DIR = 574, // "CONGIG_DIR_SEC_DATA_DIR" TOK_CONGIG_DIR_SEC_STATUS_ENGINE = 575, // "CONGIG_DIR_SEC_STATUS_ENGINE" TOK_CONFIG_SEC_STREAM_IN_BODY_INSPECTION = 576, // "CONFIG_SEC_STREAM_IN_BODY_INSPECTION" TOK_CONFIG_SEC_STREAM_OUT_BODY_INSPECTION = 577, // "CONFIG_SEC_STREAM_OUT_BODY_INSPECTION" TOK_CONGIG_DIR_SEC_TMP_DIR = 578, // "CONGIG_DIR_SEC_TMP_DIR" TOK_DIRECTIVE = 579, // "DIRECTIVE" TOK_DIRECTIVE_SECRULESCRIPT = 580, // "DIRECTIVE_SECRULESCRIPT" TOK_FREE_TEXT_QUOTE_MACRO_EXPANSION = 581, // "FREE_TEXT_QUOTE_MACRO_EXPANSION" TOK_QUOTATION_MARK = 582, // "QUOTATION_MARK" TOK_RUN_TIME_VAR_BLD = 583, // "RUN_TIME_VAR_BLD" TOK_RUN_TIME_VAR_DUR = 584, // "RUN_TIME_VAR_DUR" TOK_RUN_TIME_VAR_HSV = 585, // "RUN_TIME_VAR_HSV" TOK_RUN_TIME_VAR_REMOTE_USER = 586, // "RUN_TIME_VAR_REMOTE_USER" TOK_RUN_TIME_VAR_TIME = 587, // "RUN_TIME_VAR_TIME" TOK_RUN_TIME_VAR_TIME_DAY = 588, // "RUN_TIME_VAR_TIME_DAY" TOK_RUN_TIME_VAR_TIME_EPOCH = 589, // "RUN_TIME_VAR_TIME_EPOCH" TOK_RUN_TIME_VAR_TIME_HOUR = 590, // "RUN_TIME_VAR_TIME_HOUR" TOK_RUN_TIME_VAR_TIME_MIN = 591, // "RUN_TIME_VAR_TIME_MIN" TOK_RUN_TIME_VAR_TIME_MON = 592, // "RUN_TIME_VAR_TIME_MON" TOK_RUN_TIME_VAR_TIME_SEC = 593, // "RUN_TIME_VAR_TIME_SEC" TOK_RUN_TIME_VAR_TIME_WDAY = 594, // "RUN_TIME_VAR_TIME_WDAY" TOK_RUN_TIME_VAR_TIME_YEAR = 595, // "RUN_TIME_VAR_TIME_YEAR" TOK_VARIABLE = 596, // "VARIABLE" TOK_DICT_ELEMENT = 597, // "Dictionary element" TOK_DICT_ELEMENT_REGEXP = 598 // "Dictionary element, selected by regexp" }; /// Backward compatibility alias (Bison 3.6). typedef token_kind_type yytokentype; }; /// Token kind, as returned by yylex. typedef token::yytokentype token_kind_type; /// Backward compatibility alias (Bison 3.6). typedef token_kind_type token_type; /// Symbol kinds. struct symbol_kind { enum symbol_kind_type { YYNTOKENS = 344, ///< Number of tokens. S_YYEMPTY = -2, S_YYEOF = 0, // "end of file" S_YYerror = 1, // error S_YYUNDEF = 2, // "invalid token" S_COMMA = 3, // "," S_CONFIG_CONTENT_INJECTION = 4, // "CONFIG_CONTENT_INJECTION" S_CONGIG_DIR_RESPONSE_BODY_MP_CLEAR = 5, // "CONGIG_DIR_RESPONSE_BODY_MP_CLEAR" S_PIPE = 6, // PIPE S_NEW_LINE = 7, // NEW_LINE S_VAR_COUNT = 8, // VAR_COUNT S_VAR_EXCLUSION = 9, // VAR_EXCLUSION S_VARIABLE_ARGS = 10, // VARIABLE_ARGS S_VARIABLE_ARGS_POST = 11, // VARIABLE_ARGS_POST S_VARIABLE_ARGS_GET = 12, // VARIABLE_ARGS_GET S_VARIABLE_FILES_SIZES = 13, // VARIABLE_FILES_SIZES S_VARIABLE_FILES_NAMES = 14, // VARIABLE_FILES_NAMES S_VARIABLE_FILES_TMP_CONTENT = 15, // VARIABLE_FILES_TMP_CONTENT S_VARIABLE_MULTIPART_FILENAME = 16, // VARIABLE_MULTIPART_FILENAME S_VARIABLE_MULTIPART_NAME = 17, // VARIABLE_MULTIPART_NAME S_VARIABLE_MATCHED_VARS_NAMES = 18, // VARIABLE_MATCHED_VARS_NAMES S_VARIABLE_MATCHED_VARS = 19, // VARIABLE_MATCHED_VARS S_VARIABLE_FILES = 20, // VARIABLE_FILES S_VARIABLE_REQUEST_COOKIES = 21, // VARIABLE_REQUEST_COOKIES S_VARIABLE_REQUEST_HEADERS = 22, // VARIABLE_REQUEST_HEADERS S_VARIABLE_RESPONSE_HEADERS = 23, // VARIABLE_RESPONSE_HEADERS S_VARIABLE_GEO = 24, // VARIABLE_GEO S_VARIABLE_REQUEST_COOKIES_NAMES = 25, // VARIABLE_REQUEST_COOKIES_NAMES S_VARIABLE_ARGS_COMBINED_SIZE = 26, // VARIABLE_ARGS_COMBINED_SIZE S_VARIABLE_ARGS_GET_NAMES = 27, // VARIABLE_ARGS_GET_NAMES S_VARIABLE_RULE = 28, // VARIABLE_RULE S_VARIABLE_ARGS_NAMES = 29, // "Variable ARGS_NAMES" S_VARIABLE_ARGS_POST_NAMES = 30, // VARIABLE_ARGS_POST_NAMES S_VARIABLE_AUTH_TYPE = 31, // "AUTH_TYPE" S_VARIABLE_FILES_COMBINED_SIZE = 32, // "FILES_COMBINED_SIZE" S_VARIABLE_FILES_TMP_NAMES = 33, // "FILES_TMPNAMES" S_VARIABLE_FULL_REQUEST = 34, // "FULL_REQUEST" S_VARIABLE_FULL_REQUEST_LENGTH = 35, // "FULL_REQUEST_LENGTH" S_VARIABLE_INBOUND_DATA_ERROR = 36, // "INBOUND_DATA_ERROR" S_VARIABLE_MATCHED_VAR = 37, // "MATCHED_VAR" S_VARIABLE_MATCHED_VAR_NAME = 38, // "MATCHED_VAR_NAME" S_VARIABLE_MULTIPART_BOUNDARY_QUOTED = 39, // VARIABLE_MULTIPART_BOUNDARY_QUOTED S_VARIABLE_MULTIPART_BOUNDARY_WHITESPACE = 40, // VARIABLE_MULTIPART_BOUNDARY_WHITESPACE S_VARIABLE_MULTIPART_CRLF_LF_LINES = 41, // "MULTIPART_CRLF_LF_LINES" S_VARIABLE_MULTIPART_DATA_AFTER = 42, // "MULTIPART_DATA_AFTER" S_VARIABLE_MULTIPART_DATA_BEFORE = 43, // VARIABLE_MULTIPART_DATA_BEFORE S_VARIABLE_MULTIPART_FILE_LIMIT_EXCEEDED = 44, // "MULTIPART_FILE_LIMIT_EXCEEDED" S_VARIABLE_MULTIPART_HEADER_FOLDING = 45, // "MULTIPART_HEADER_FOLDING" S_VARIABLE_MULTIPART_INVALID_HEADER_FOLDING = 46, // "MULTIPART_INVALID_HEADER_FOLDING" S_VARIABLE_MULTIPART_INVALID_PART = 47, // VARIABLE_MULTIPART_INVALID_PART S_VARIABLE_MULTIPART_INVALID_QUOTING = 48, // "MULTIPART_INVALID_QUOTING" S_VARIABLE_MULTIPART_LF_LINE = 49, // VARIABLE_MULTIPART_LF_LINE S_VARIABLE_MULTIPART_MISSING_SEMICOLON = 50, // VARIABLE_MULTIPART_MISSING_SEMICOLON S_VARIABLE_MULTIPART_SEMICOLON_MISSING = 51, // VARIABLE_MULTIPART_SEMICOLON_MISSING S_VARIABLE_MULTIPART_STRICT_ERROR = 52, // "MULTIPART_STRICT_ERROR" S_VARIABLE_MULTIPART_UNMATCHED_BOUNDARY = 53, // "MULTIPART_UNMATCHED_BOUNDARY" S_VARIABLE_OUTBOUND_DATA_ERROR = 54, // "OUTBOUND_DATA_ERROR" S_VARIABLE_PATH_INFO = 55, // "PATH_INFO" S_VARIABLE_QUERY_STRING = 56, // "QUERY_STRING" S_VARIABLE_REMOTE_ADDR = 57, // "REMOTE_ADDR" S_VARIABLE_REMOTE_HOST = 58, // "REMOTE_HOST" S_VARIABLE_REMOTE_PORT = 59, // "REMOTE_PORT" S_VARIABLE_REQBODY_ERROR_MSG = 60, // "REQBODY_ERROR_MSG" S_VARIABLE_REQBODY_ERROR = 61, // "REQBODY_ERROR" S_VARIABLE_REQBODY_PROCESSOR_ERROR_MSG = 62, // "REQBODY_PROCESSOR_ERROR_MSG" S_VARIABLE_REQBODY_PROCESSOR_ERROR = 63, // "REQBODY_PROCESSOR_ERROR" S_VARIABLE_REQBODY_PROCESSOR = 64, // "REQBODY_PROCESSOR" S_VARIABLE_REQUEST_BASENAME = 65, // "REQUEST_BASENAME" S_VARIABLE_REQUEST_BODY_LENGTH = 66, // "REQUEST_BODY_LENGTH" S_VARIABLE_REQUEST_BODY = 67, // "REQUEST_BODY" S_VARIABLE_REQUEST_FILE_NAME = 68, // "REQUEST_FILENAME" S_VARIABLE_REQUEST_HEADERS_NAMES = 69, // VARIABLE_REQUEST_HEADERS_NAMES S_VARIABLE_REQUEST_LINE = 70, // "REQUEST_LINE" S_VARIABLE_REQUEST_METHOD = 71, // "REQUEST_METHOD" S_VARIABLE_REQUEST_PROTOCOL = 72, // "REQUEST_PROTOCOL" S_VARIABLE_REQUEST_URI_RAW = 73, // "REQUEST_URI_RAW" S_VARIABLE_REQUEST_URI = 74, // "REQUEST_URI" S_VARIABLE_RESOURCE = 75, // "RESOURCE" S_VARIABLE_RESPONSE_BODY = 76, // "RESPONSE_BODY" S_VARIABLE_RESPONSE_CONTENT_LENGTH = 77, // "RESPONSE_CONTENT_LENGTH" S_VARIABLE_RESPONSE_CONTENT_TYPE = 78, // VARIABLE_RESPONSE_CONTENT_TYPE S_VARIABLE_RESPONSE_HEADERS_NAMES = 79, // VARIABLE_RESPONSE_HEADERS_NAMES S_VARIABLE_RESPONSE_PROTOCOL = 80, // "RESPONSE_PROTOCOL" S_VARIABLE_RESPONSE_STATUS = 81, // "RESPONSE_STATUS" S_VARIABLE_SERVER_ADDR = 82, // "SERVER_ADDR" S_VARIABLE_SERVER_NAME = 83, // "SERVER_NAME" S_VARIABLE_SERVER_PORT = 84, // "SERVER_PORT" S_VARIABLE_SESSION_ID = 85, // "SESSIONID" S_VARIABLE_UNIQUE_ID = 86, // "UNIQUE_ID" S_VARIABLE_URL_ENCODED_ERROR = 87, // "URLENCODED_ERROR" S_VARIABLE_USER_ID = 88, // "USERID" S_VARIABLE_WEB_APP_ID = 89, // "WEBAPPID" S_VARIABLE_STATUS = 90, // "VARIABLE_STATUS" S_VARIABLE_STATUS_LINE = 91, // "VARIABLE_STATUS_LINE" S_VARIABLE_IP = 92, // "VARIABLE_IP" S_VARIABLE_GLOBAL = 93, // "VARIABLE_GLOBAL" S_VARIABLE_TX = 94, // "VARIABLE_TX" S_VARIABLE_SESSION = 95, // "VARIABLE_SESSION" S_VARIABLE_USER = 96, // "VARIABLE_USER" S_RUN_TIME_VAR_ENV = 97, // "RUN_TIME_VAR_ENV" S_RUN_TIME_VAR_XML = 98, // "RUN_TIME_VAR_XML" S_ACTION_SETVAR = 99, // "SetVar" S_SETVAR_OPERATION_EQUALS = 100, // SETVAR_OPERATION_EQUALS S_SETVAR_OPERATION_EQUALS_PLUS = 101, // SETVAR_OPERATION_EQUALS_PLUS S_SETVAR_OPERATION_EQUALS_MINUS = 102, // SETVAR_OPERATION_EQUALS_MINUS S_NOT = 103, // "NOT" S_OPERATOR_BEGINS_WITH = 104, // "OPERATOR_BEGINS_WITH" S_OPERATOR_CONTAINS = 105, // "OPERATOR_CONTAINS" S_OPERATOR_CONTAINS_WORD = 106, // "OPERATOR_CONTAINS_WORD" S_OPERATOR_DETECT_SQLI = 107, // "OPERATOR_DETECT_SQLI" S_OPERATOR_DETECT_XSS = 108, // "OPERATOR_DETECT_XSS" S_OPERATOR_ENDS_WITH = 109, // "OPERATOR_ENDS_WITH" S_OPERATOR_EQ = 110, // "OPERATOR_EQ" S_OPERATOR_FUZZY_HASH = 111, // "OPERATOR_FUZZY_HASH" S_OPERATOR_GEOLOOKUP = 112, // "OPERATOR_GEOLOOKUP" S_OPERATOR_GE = 113, // "OPERATOR_GE" S_OPERATOR_GSB_LOOKUP = 114, // "OPERATOR_GSB_LOOKUP" S_OPERATOR_GT = 115, // "OPERATOR_GT" S_OPERATOR_INSPECT_FILE = 116, // "OPERATOR_INSPECT_FILE" S_OPERATOR_IP_MATCH_FROM_FILE = 117, // "OPERATOR_IP_MATCH_FROM_FILE" S_OPERATOR_IP_MATCH = 118, // "OPERATOR_IP_MATCH" S_OPERATOR_LE = 119, // "OPERATOR_LE" S_OPERATOR_LT = 120, // "OPERATOR_LT" S_OPERATOR_PM_FROM_FILE = 121, // "OPERATOR_PM_FROM_FILE" S_OPERATOR_PM = 122, // "OPERATOR_PM" S_OPERATOR_RBL = 123, // "OPERATOR_RBL" S_OPERATOR_RSUB = 124, // "OPERATOR_RSUB" S_OPERATOR_RX_CONTENT_ONLY = 125, // "Operator RX (content only)" S_OPERATOR_RX = 126, // "OPERATOR_RX" S_OPERATOR_RX_GLOBAL = 127, // "OPERATOR_RX_GLOBAL" S_OPERATOR_STR_EQ = 128, // "OPERATOR_STR_EQ" S_OPERATOR_STR_MATCH = 129, // "OPERATOR_STR_MATCH" S_OPERATOR_UNCONDITIONAL_MATCH = 130, // "OPERATOR_UNCONDITIONAL_MATCH" S_OPERATOR_VALIDATE_BYTE_RANGE = 131, // "OPERATOR_VALIDATE_BYTE_RANGE" S_OPERATOR_VALIDATE_DTD = 132, // "OPERATOR_VALIDATE_DTD" S_OPERATOR_VALIDATE_HASH = 133, // "OPERATOR_VALIDATE_HASH" S_OPERATOR_VALIDATE_SCHEMA = 134, // "OPERATOR_VALIDATE_SCHEMA" S_OPERATOR_VALIDATE_URL_ENCODING = 135, // "OPERATOR_VALIDATE_URL_ENCODING" S_OPERATOR_VALIDATE_UTF8_ENCODING = 136, // "OPERATOR_VALIDATE_UTF8_ENCODING" S_OPERATOR_VERIFY_CC = 137, // "OPERATOR_VERIFY_CC" S_OPERATOR_VERIFY_CPF = 138, // "OPERATOR_VERIFY_CPF" S_OPERATOR_VERIFY_SSN = 139, // "OPERATOR_VERIFY_SSN" S_OPERATOR_VERIFY_SVNR = 140, // "OPERATOR_VERIFY_SVNR" S_OPERATOR_WITHIN = 141, // "OPERATOR_WITHIN" S_CONFIG_DIR_AUDIT_LOG_FMT = 142, // CONFIG_DIR_AUDIT_LOG_FMT S_JSON = 143, // JSON S_NATIVE = 144, // NATIVE S_ACTION_CTL_RULE_ENGINE = 145, // "ACTION_CTL_RULE_ENGINE" S_ACTION_ACCURACY = 146, // "Accuracy" S_ACTION_ALLOW = 147, // "Allow" S_ACTION_APPEND = 148, // "Append" S_ACTION_AUDIT_LOG = 149, // "AuditLog" S_ACTION_BLOCK = 150, // "Block" S_ACTION_CAPTURE = 151, // "Capture" S_ACTION_CHAIN = 152, // "Chain" S_ACTION_CTL_AUDIT_ENGINE = 153, // "ACTION_CTL_AUDIT_ENGINE" S_ACTION_CTL_AUDIT_LOG_PARTS = 154, // "ACTION_CTL_AUDIT_LOG_PARTS" S_ACTION_CTL_BDY_JSON = 155, // "ACTION_CTL_BDY_JSON" S_ACTION_CTL_BDY_XML = 156, // "ACTION_CTL_BDY_XML" S_ACTION_CTL_BDY_URLENCODED = 157, // "ACTION_CTL_BDY_URLENCODED" S_ACTION_CTL_FORCE_REQ_BODY_VAR = 158, // "ACTION_CTL_FORCE_REQ_BODY_VAR" S_ACTION_CTL_REQUEST_BODY_ACCESS = 159, // "ACTION_CTL_REQUEST_BODY_ACCESS" S_ACTION_CTL_RULE_REMOVE_BY_ID = 160, // "ACTION_CTL_RULE_REMOVE_BY_ID" S_ACTION_CTL_RULE_REMOVE_BY_TAG = 161, // "ACTION_CTL_RULE_REMOVE_BY_TAG" S_ACTION_CTL_RULE_REMOVE_TARGET_BY_ID = 162, // "ACTION_CTL_RULE_REMOVE_TARGET_BY_ID" S_ACTION_CTL_RULE_REMOVE_TARGET_BY_TAG = 163, // "ACTION_CTL_RULE_REMOVE_TARGET_BY_TAG" S_ACTION_DENY = 164, // "Deny" S_ACTION_DEPRECATE_VAR = 165, // "DeprecateVar" S_ACTION_DROP = 166, // "Drop" S_ACTION_EXEC = 167, // "Exec" S_ACTION_EXPIRE_VAR = 168, // "ExpireVar" S_ACTION_ID = 169, // "Id" S_ACTION_INITCOL = 170, // "InitCol" S_ACTION_LOG = 171, // "Log" S_ACTION_LOG_DATA = 172, // "LogData" S_ACTION_MATURITY = 173, // "Maturity" S_ACTION_MSG = 174, // "Msg" S_ACTION_MULTI_MATCH = 175, // "MultiMatch" S_ACTION_NO_AUDIT_LOG = 176, // "NoAuditLog" S_ACTION_NO_LOG = 177, // "NoLog" S_ACTION_PASS = 178, // "Pass" S_ACTION_PAUSE = 179, // "Pause" S_ACTION_PHASE = 180, // "Phase" S_ACTION_PREPEND = 181, // "Prepend" S_ACTION_PROXY = 182, // "Proxy" S_ACTION_REDIRECT = 183, // "Redirect" S_ACTION_REV = 184, // "Rev" S_ACTION_SANITISE_ARG = 185, // "SanitiseArg" S_ACTION_SANITISE_MATCHED = 186, // "SanitiseMatched" S_ACTION_SANITISE_MATCHED_BYTES = 187, // "SanitiseMatchedBytes" S_ACTION_SANITISE_REQUEST_HEADER = 188, // "SanitiseRequestHeader" S_ACTION_SANITISE_RESPONSE_HEADER = 189, // "SanitiseResponseHeader" S_ACTION_SETENV = 190, // "SetEnv" S_ACTION_SETRSC = 191, // "SetRsc" S_ACTION_SETSID = 192, // "SetSid" S_ACTION_SETUID = 193, // "SetUID" S_ACTION_SEVERITY = 194, // "Severity" S_ACTION_SKIP = 195, // "Skip" S_ACTION_SKIP_AFTER = 196, // "SkipAfter" S_ACTION_STATUS = 197, // "Status" S_ACTION_TAG = 198, // "Tag" S_ACTION_TRANSFORMATION_BASE_64_ENCODE = 199, // "ACTION_TRANSFORMATION_BASE_64_ENCODE" S_ACTION_TRANSFORMATION_BASE_64_DECODE = 200, // "ACTION_TRANSFORMATION_BASE_64_DECODE" S_ACTION_TRANSFORMATION_BASE_64_DECODE_EXT = 201, // "ACTION_TRANSFORMATION_BASE_64_DECODE_EXT" S_ACTION_TRANSFORMATION_CMD_LINE = 202, // "ACTION_TRANSFORMATION_CMD_LINE" S_ACTION_TRANSFORMATION_COMPRESS_WHITESPACE = 203, // "ACTION_TRANSFORMATION_COMPRESS_WHITESPACE" S_ACTION_TRANSFORMATION_CSS_DECODE = 204, // "ACTION_TRANSFORMATION_CSS_DECODE" S_ACTION_TRANSFORMATION_ESCAPE_SEQ_DECODE = 205, // "ACTION_TRANSFORMATION_ESCAPE_SEQ_DECODE" S_ACTION_TRANSFORMATION_HEX_ENCODE = 206, // "ACTION_TRANSFORMATION_HEX_ENCODE" S_ACTION_TRANSFORMATION_HEX_DECODE = 207, // "ACTION_TRANSFORMATION_HEX_DECODE" S_ACTION_TRANSFORMATION_HTML_ENTITY_DECODE = 208, // "ACTION_TRANSFORMATION_HTML_ENTITY_DECODE" S_ACTION_TRANSFORMATION_JS_DECODE = 209, // "ACTION_TRANSFORMATION_JS_DECODE" S_ACTION_TRANSFORMATION_LENGTH = 210, // "ACTION_TRANSFORMATION_LENGTH" S_ACTION_TRANSFORMATION_LOWERCASE = 211, // "ACTION_TRANSFORMATION_LOWERCASE" S_ACTION_TRANSFORMATION_MD5 = 212, // "ACTION_TRANSFORMATION_MD5" S_ACTION_TRANSFORMATION_NONE = 213, // "ACTION_TRANSFORMATION_NONE" S_ACTION_TRANSFORMATION_NORMALISE_PATH = 214, // "ACTION_TRANSFORMATION_NORMALISE_PATH" S_ACTION_TRANSFORMATION_NORMALISE_PATH_WIN = 215, // "ACTION_TRANSFORMATION_NORMALISE_PATH_WIN" S_ACTION_TRANSFORMATION_PARITY_EVEN_7_BIT = 216, // "ACTION_TRANSFORMATION_PARITY_EVEN_7_BIT" S_ACTION_TRANSFORMATION_PARITY_ODD_7_BIT = 217, // "ACTION_TRANSFORMATION_PARITY_ODD_7_BIT" S_ACTION_TRANSFORMATION_PARITY_ZERO_7_BIT = 218, // "ACTION_TRANSFORMATION_PARITY_ZERO_7_BIT" S_ACTION_TRANSFORMATION_REMOVE_COMMENTS = 219, // "ACTION_TRANSFORMATION_REMOVE_COMMENTS" S_ACTION_TRANSFORMATION_REMOVE_COMMENTS_CHAR = 220, // "ACTION_TRANSFORMATION_REMOVE_COMMENTS_CHAR" S_ACTION_TRANSFORMATION_REMOVE_NULLS = 221, // "ACTION_TRANSFORMATION_REMOVE_NULLS" S_ACTION_TRANSFORMATION_REMOVE_WHITESPACE = 222, // "ACTION_TRANSFORMATION_REMOVE_WHITESPACE" S_ACTION_TRANSFORMATION_REPLACE_COMMENTS = 223, // "ACTION_TRANSFORMATION_REPLACE_COMMENTS" S_ACTION_TRANSFORMATION_REPLACE_NULLS = 224, // "ACTION_TRANSFORMATION_REPLACE_NULLS" S_ACTION_TRANSFORMATION_SHA1 = 225, // "ACTION_TRANSFORMATION_SHA1" S_ACTION_TRANSFORMATION_SQL_HEX_DECODE = 226, // "ACTION_TRANSFORMATION_SQL_HEX_DECODE" S_ACTION_TRANSFORMATION_TRIM = 227, // "ACTION_TRANSFORMATION_TRIM" S_ACTION_TRANSFORMATION_TRIM_LEFT = 228, // "ACTION_TRANSFORMATION_TRIM_LEFT" S_ACTION_TRANSFORMATION_TRIM_RIGHT = 229, // "ACTION_TRANSFORMATION_TRIM_RIGHT" S_ACTION_TRANSFORMATION_UPPERCASE = 230, // "ACTION_TRANSFORMATION_UPPERCASE" S_ACTION_TRANSFORMATION_URL_ENCODE = 231, // "ACTION_TRANSFORMATION_URL_ENCODE" S_ACTION_TRANSFORMATION_URL_DECODE = 232, // "ACTION_TRANSFORMATION_URL_DECODE" S_ACTION_TRANSFORMATION_URL_DECODE_UNI = 233, // "ACTION_TRANSFORMATION_URL_DECODE_UNI" S_ACTION_TRANSFORMATION_UTF8_TO_UNICODE = 234, // "ACTION_TRANSFORMATION_UTF8_TO_UNICODE" S_ACTION_VER = 235, // "Ver" S_ACTION_XMLNS = 236, // "xmlns" S_CONFIG_COMPONENT_SIG = 237, // "CONFIG_COMPONENT_SIG" S_CONFIG_CONN_ENGINE = 238, // "CONFIG_CONN_ENGINE" S_CONFIG_SEC_ARGUMENT_SEPARATOR = 239, // "CONFIG_SEC_ARGUMENT_SEPARATOR" S_CONFIG_SEC_WEB_APP_ID = 240, // "CONFIG_SEC_WEB_APP_ID" S_CONFIG_SEC_SERVER_SIG = 241, // "CONFIG_SEC_SERVER_SIG" S_CONFIG_DIR_AUDIT_DIR = 242, // "CONFIG_DIR_AUDIT_DIR" S_CONFIG_DIR_AUDIT_DIR_MOD = 243, // "CONFIG_DIR_AUDIT_DIR_MOD" S_CONFIG_DIR_AUDIT_ENG = 244, // "CONFIG_DIR_AUDIT_ENG" S_CONFIG_DIR_AUDIT_FLE_MOD = 245, // "CONFIG_DIR_AUDIT_FLE_MOD" S_CONFIG_DIR_AUDIT_LOG = 246, // "CONFIG_DIR_AUDIT_LOG" S_CONFIG_DIR_AUDIT_LOG2 = 247, // "CONFIG_DIR_AUDIT_LOG2" S_CONFIG_DIR_AUDIT_LOG_P = 248, // "CONFIG_DIR_AUDIT_LOG_P" S_CONFIG_DIR_AUDIT_STS = 249, // "CONFIG_DIR_AUDIT_STS" S_CONFIG_DIR_AUDIT_TPE = 250, // "CONFIG_DIR_AUDIT_TPE" S_CONFIG_DIR_DEBUG_LOG = 251, // "CONFIG_DIR_DEBUG_LOG" S_CONFIG_DIR_DEBUG_LVL = 252, // "CONFIG_DIR_DEBUG_LVL" S_CONFIG_SEC_CACHE_TRANSFORMATIONS = 253, // "CONFIG_SEC_CACHE_TRANSFORMATIONS" S_CONFIG_SEC_DISABLE_BACKEND_COMPRESS = 254, // "CONFIG_SEC_DISABLE_BACKEND_COMPRESS" S_CONFIG_SEC_HASH_ENGINE = 255, // "CONFIG_SEC_HASH_ENGINE" S_CONFIG_SEC_HASH_KEY = 256, // "CONFIG_SEC_HASH_KEY" S_CONFIG_SEC_HASH_PARAM = 257, // "CONFIG_SEC_HASH_PARAM" S_CONFIG_SEC_HASH_METHOD_RX = 258, // "CONFIG_SEC_HASH_METHOD_RX" S_CONFIG_SEC_HASH_METHOD_PM = 259, // "CONFIG_SEC_HASH_METHOD_PM" S_CONFIG_SEC_CHROOT_DIR = 260, // "CONFIG_SEC_CHROOT_DIR" S_CONFIG_DIR_GEO_DB = 261, // "CONFIG_DIR_GEO_DB" S_CONFIG_DIR_GSB_DB = 262, // "CONFIG_DIR_GSB_DB" S_CONFIG_SEC_GUARDIAN_LOG = 263, // "CONFIG_SEC_GUARDIAN_LOG" S_CONFIG_DIR_PCRE_MATCH_LIMIT = 264, // "CONFIG_DIR_PCRE_MATCH_LIMIT" S_CONFIG_DIR_PCRE_MATCH_LIMIT_RECURSION = 265, // "CONFIG_DIR_PCRE_MATCH_LIMIT_RECURSION" S_CONFIG_SEC_CONN_R_STATE_LIMIT = 266, // "CONFIG_SEC_CONN_R_STATE_LIMIT" S_CONFIG_SEC_CONN_W_STATE_LIMIT = 267, // "CONFIG_SEC_CONN_W_STATE_LIMIT" S_CONFIG_SEC_SENSOR_ID = 268, // "CONFIG_SEC_SENSOR_ID" S_CONFIG_DIR_ARGS_LIMIT = 269, // "CONFIG_DIR_ARGS_LIMIT" S_CONFIG_DIR_REQ_BODY_JSON_DEPTH_LIMIT = 270, // "CONFIG_DIR_REQ_BODY_JSON_DEPTH_LIMIT" S_CONFIG_DIR_REQ_BODY = 271, // "CONFIG_DIR_REQ_BODY" S_CONFIG_DIR_REQ_BODY_IN_MEMORY_LIMIT = 272, // "CONFIG_DIR_REQ_BODY_IN_MEMORY_LIMIT" S_CONFIG_DIR_REQ_BODY_LIMIT = 273, // "CONFIG_DIR_REQ_BODY_LIMIT" S_CONFIG_DIR_REQ_BODY_LIMIT_ACTION = 274, // "CONFIG_DIR_REQ_BODY_LIMIT_ACTION" S_CONFIG_DIR_REQ_BODY_NO_FILES_LIMIT = 275, // "CONFIG_DIR_REQ_BODY_NO_FILES_LIMIT" S_CONFIG_DIR_RES_BODY = 276, // "CONFIG_DIR_RES_BODY" S_CONFIG_DIR_RES_BODY_LIMIT = 277, // "CONFIG_DIR_RES_BODY_LIMIT" S_CONFIG_DIR_RES_BODY_LIMIT_ACTION = 278, // "CONFIG_DIR_RES_BODY_LIMIT_ACTION" S_CONFIG_SEC_RULE_INHERITANCE = 279, // "CONFIG_SEC_RULE_INHERITANCE" S_CONFIG_SEC_RULE_PERF_TIME = 280, // "CONFIG_SEC_RULE_PERF_TIME" S_CONFIG_DIR_RULE_ENG = 281, // "CONFIG_DIR_RULE_ENG" S_CONFIG_DIR_SEC_ACTION = 282, // "CONFIG_DIR_SEC_ACTION" S_CONFIG_DIR_SEC_DEFAULT_ACTION = 283, // "CONFIG_DIR_SEC_DEFAULT_ACTION" S_CONFIG_DIR_SEC_MARKER = 284, // "CONFIG_DIR_SEC_MARKER" S_CONFIG_DIR_UNICODE_MAP_FILE = 285, // "CONFIG_DIR_UNICODE_MAP_FILE" S_CONFIG_DIR_UNICODE_CODE_PAGE = 286, // "CONFIG_DIR_UNICODE_CODE_PAGE" S_CONFIG_SEC_COLLECTION_TIMEOUT = 287, // "CONFIG_SEC_COLLECTION_TIMEOUT" S_CONFIG_SEC_HTTP_BLKEY = 288, // "CONFIG_SEC_HTTP_BLKEY" S_CONFIG_SEC_INTERCEPT_ON_ERROR = 289, // "CONFIG_SEC_INTERCEPT_ON_ERROR" S_CONFIG_SEC_REMOTE_RULES_FAIL_ACTION = 290, // "CONFIG_SEC_REMOTE_RULES_FAIL_ACTION" S_CONFIG_SEC_RULE_REMOVE_BY_ID = 291, // "CONFIG_SEC_RULE_REMOVE_BY_ID" S_CONFIG_SEC_RULE_REMOVE_BY_MSG = 292, // "CONFIG_SEC_RULE_REMOVE_BY_MSG" S_CONFIG_SEC_RULE_REMOVE_BY_TAG = 293, // "CONFIG_SEC_RULE_REMOVE_BY_TAG" S_CONFIG_SEC_RULE_UPDATE_TARGET_BY_TAG = 294, // "CONFIG_SEC_RULE_UPDATE_TARGET_BY_TAG" S_CONFIG_SEC_RULE_UPDATE_TARGET_BY_MSG = 295, // "CONFIG_SEC_RULE_UPDATE_TARGET_BY_MSG" S_CONFIG_SEC_RULE_UPDATE_TARGET_BY_ID = 296, // "CONFIG_SEC_RULE_UPDATE_TARGET_BY_ID" S_CONFIG_SEC_RULE_UPDATE_ACTION_BY_ID = 297, // "CONFIG_SEC_RULE_UPDATE_ACTION_BY_ID" S_CONFIG_UPDLOAD_KEEP_FILES = 298, // "CONFIG_UPDLOAD_KEEP_FILES" S_CONFIG_UPDLOAD_SAVE_TMP_FILES = 299, // "CONFIG_UPDLOAD_SAVE_TMP_FILES" S_CONFIG_UPLOAD_DIR = 300, // "CONFIG_UPLOAD_DIR" S_CONFIG_UPLOAD_FILE_LIMIT = 301, // "CONFIG_UPLOAD_FILE_LIMIT" S_CONFIG_UPLOAD_FILE_MODE = 302, // "CONFIG_UPLOAD_FILE_MODE" S_CONFIG_VALUE_ABORT = 303, // "CONFIG_VALUE_ABORT" S_CONFIG_VALUE_DETC = 304, // "CONFIG_VALUE_DETC" S_CONFIG_VALUE_HTTPS = 305, // "CONFIG_VALUE_HTTPS" S_CONFIG_VALUE_OFF = 306, // "CONFIG_VALUE_OFF" S_CONFIG_VALUE_ON = 307, // "CONFIG_VALUE_ON" S_CONFIG_VALUE_PARALLEL = 308, // "CONFIG_VALUE_PARALLEL" S_CONFIG_VALUE_PROCESS_PARTIAL = 309, // "CONFIG_VALUE_PROCESS_PARTIAL" S_CONFIG_VALUE_REJECT = 310, // "CONFIG_VALUE_REJECT" S_CONFIG_VALUE_RELEVANT_ONLY = 311, // "CONFIG_VALUE_RELEVANT_ONLY" S_CONFIG_VALUE_SERIAL = 312, // "CONFIG_VALUE_SERIAL" S_CONFIG_VALUE_WARN = 313, // "CONFIG_VALUE_WARN" S_CONFIG_XML_EXTERNAL_ENTITY = 314, // "CONFIG_XML_EXTERNAL_ENTITY" S_CONGIG_DIR_RESPONSE_BODY_MP = 315, // "CONGIG_DIR_RESPONSE_BODY_MP" S_CONGIG_DIR_SEC_ARG_SEP = 316, // "CONGIG_DIR_SEC_ARG_SEP" S_CONGIG_DIR_SEC_COOKIE_FORMAT = 317, // "CONGIG_DIR_SEC_COOKIE_FORMAT" S_CONFIG_SEC_COOKIEV0_SEPARATOR = 318, // "CONFIG_SEC_COOKIEV0_SEPARATOR" S_CONGIG_DIR_SEC_DATA_DIR = 319, // "CONGIG_DIR_SEC_DATA_DIR" S_CONGIG_DIR_SEC_STATUS_ENGINE = 320, // "CONGIG_DIR_SEC_STATUS_ENGINE" S_CONFIG_SEC_STREAM_IN_BODY_INSPECTION = 321, // "CONFIG_SEC_STREAM_IN_BODY_INSPECTION" S_CONFIG_SEC_STREAM_OUT_BODY_INSPECTION = 322, // "CONFIG_SEC_STREAM_OUT_BODY_INSPECTION" S_CONGIG_DIR_SEC_TMP_DIR = 323, // "CONGIG_DIR_SEC_TMP_DIR" S_DIRECTIVE = 324, // "DIRECTIVE" S_DIRECTIVE_SECRULESCRIPT = 325, // "DIRECTIVE_SECRULESCRIPT" S_FREE_TEXT_QUOTE_MACRO_EXPANSION = 326, // "FREE_TEXT_QUOTE_MACRO_EXPANSION" S_QUOTATION_MARK = 327, // "QUOTATION_MARK" S_RUN_TIME_VAR_BLD = 328, // "RUN_TIME_VAR_BLD" S_RUN_TIME_VAR_DUR = 329, // "RUN_TIME_VAR_DUR" S_RUN_TIME_VAR_HSV = 330, // "RUN_TIME_VAR_HSV" S_RUN_TIME_VAR_REMOTE_USER = 331, // "RUN_TIME_VAR_REMOTE_USER" S_RUN_TIME_VAR_TIME = 332, // "RUN_TIME_VAR_TIME" S_RUN_TIME_VAR_TIME_DAY = 333, // "RUN_TIME_VAR_TIME_DAY" S_RUN_TIME_VAR_TIME_EPOCH = 334, // "RUN_TIME_VAR_TIME_EPOCH" S_RUN_TIME_VAR_TIME_HOUR = 335, // "RUN_TIME_VAR_TIME_HOUR" S_RUN_TIME_VAR_TIME_MIN = 336, // "RUN_TIME_VAR_TIME_MIN" S_RUN_TIME_VAR_TIME_MON = 337, // "RUN_TIME_VAR_TIME_MON" S_RUN_TIME_VAR_TIME_SEC = 338, // "RUN_TIME_VAR_TIME_SEC" S_RUN_TIME_VAR_TIME_WDAY = 339, // "RUN_TIME_VAR_TIME_WDAY" S_RUN_TIME_VAR_TIME_YEAR = 340, // "RUN_TIME_VAR_TIME_YEAR" S_VARIABLE = 341, // "VARIABLE" S_DICT_ELEMENT = 342, // "Dictionary element" S_DICT_ELEMENT_REGEXP = 343, // "Dictionary element, selected by regexp" S_YYACCEPT = 344, // $accept S_input = 345, // input S_line = 346, // line S_audit_log = 347, // audit_log S_actions = 348, // actions S_actions_may_quoted = 349, // actions_may_quoted S_op = 350, // op S_op_before_init = 351, // op_before_init S_expression = 352, // expression S_variables = 353, // variables S_variables_pre_process = 354, // variables_pre_process S_variables_may_be_quoted = 355, // variables_may_be_quoted S_var = 356, // var S_act = 357, // act S_setvar_action = 358, // setvar_action S_run_time_string = 359 // run_time_string }; }; /// (Internal) symbol kind. typedef symbol_kind::symbol_kind_type symbol_kind_type; /// The number of tokens. static const symbol_kind_type YYNTOKENS = symbol_kind::YYNTOKENS; /// A complete symbol. /// /// Expects its Base type to provide access to the symbol kind /// via kind (). /// /// Provide access to semantic value and location. template struct basic_symbol : Base { /// Alias to Base. typedef Base super_type; /// Default constructor. basic_symbol () : value () , location () {} #if 201103L <= YY_CPLUSPLUS /// Move constructor. basic_symbol (basic_symbol&& that) : Base (std::move (that)) , value () , location (std::move (that.location)) { switch (this->kind ()) { case symbol_kind::S_ACTION_ACCURACY: // "Accuracy" case symbol_kind::S_ACTION_ALLOW: // "Allow" case symbol_kind::S_ACTION_APPEND: // "Append" case symbol_kind::S_ACTION_AUDIT_LOG: // "AuditLog" case symbol_kind::S_ACTION_BLOCK: // "Block" case symbol_kind::S_ACTION_CAPTURE: // "Capture" case symbol_kind::S_ACTION_CHAIN: // "Chain" case symbol_kind::S_ACTION_CTL_AUDIT_ENGINE: // "ACTION_CTL_AUDIT_ENGINE" case symbol_kind::S_ACTION_CTL_AUDIT_LOG_PARTS: // "ACTION_CTL_AUDIT_LOG_PARTS" case symbol_kind::S_ACTION_CTL_BDY_JSON: // "ACTION_CTL_BDY_JSON" case symbol_kind::S_ACTION_CTL_BDY_XML: // "ACTION_CTL_BDY_XML" case symbol_kind::S_ACTION_CTL_BDY_URLENCODED: // "ACTION_CTL_BDY_URLENCODED" case symbol_kind::S_ACTION_CTL_FORCE_REQ_BODY_VAR: // "ACTION_CTL_FORCE_REQ_BODY_VAR" case symbol_kind::S_ACTION_CTL_REQUEST_BODY_ACCESS: // "ACTION_CTL_REQUEST_BODY_ACCESS" case symbol_kind::S_ACTION_CTL_RULE_REMOVE_BY_ID: // "ACTION_CTL_RULE_REMOVE_BY_ID" case symbol_kind::S_ACTION_CTL_RULE_REMOVE_BY_TAG: // "ACTION_CTL_RULE_REMOVE_BY_TAG" case symbol_kind::S_ACTION_CTL_RULE_REMOVE_TARGET_BY_ID: // "ACTION_CTL_RULE_REMOVE_TARGET_BY_ID" case symbol_kind::S_ACTION_CTL_RULE_REMOVE_TARGET_BY_TAG: // "ACTION_CTL_RULE_REMOVE_TARGET_BY_TAG" case symbol_kind::S_ACTION_DENY: // "Deny" case symbol_kind::S_ACTION_DEPRECATE_VAR: // "DeprecateVar" case symbol_kind::S_ACTION_DROP: // "Drop" case symbol_kind::S_ACTION_EXEC: // "Exec" case symbol_kind::S_ACTION_EXPIRE_VAR: // "ExpireVar" case symbol_kind::S_ACTION_ID: // "Id" case symbol_kind::S_ACTION_INITCOL: // "InitCol" case symbol_kind::S_ACTION_LOG: // "Log" case symbol_kind::S_ACTION_LOG_DATA: // "LogData" case symbol_kind::S_ACTION_MATURITY: // "Maturity" case symbol_kind::S_ACTION_MSG: // "Msg" case symbol_kind::S_ACTION_MULTI_MATCH: // "MultiMatch" case symbol_kind::S_ACTION_NO_AUDIT_LOG: // "NoAuditLog" case symbol_kind::S_ACTION_NO_LOG: // "NoLog" case symbol_kind::S_ACTION_PASS: // "Pass" case symbol_kind::S_ACTION_PAUSE: // "Pause" case symbol_kind::S_ACTION_PHASE: // "Phase" case symbol_kind::S_ACTION_PREPEND: // "Prepend" case symbol_kind::S_ACTION_PROXY: // "Proxy" case symbol_kind::S_ACTION_REDIRECT: // "Redirect" case symbol_kind::S_ACTION_REV: // "Rev" case symbol_kind::S_ACTION_SANITISE_ARG: // "SanitiseArg" case symbol_kind::S_ACTION_SANITISE_MATCHED: // "SanitiseMatched" case symbol_kind::S_ACTION_SANITISE_MATCHED_BYTES: // "SanitiseMatchedBytes" case symbol_kind::S_ACTION_SANITISE_REQUEST_HEADER: // "SanitiseRequestHeader" case symbol_kind::S_ACTION_SANITISE_RESPONSE_HEADER: // "SanitiseResponseHeader" case symbol_kind::S_ACTION_SETENV: // "SetEnv" case symbol_kind::S_ACTION_SETRSC: // "SetRsc" case symbol_kind::S_ACTION_SETSID: // "SetSid" case symbol_kind::S_ACTION_SETUID: // "SetUID" case symbol_kind::S_ACTION_SEVERITY: // "Severity" case symbol_kind::S_ACTION_SKIP: // "Skip" case symbol_kind::S_ACTION_SKIP_AFTER: // "SkipAfter" case symbol_kind::S_ACTION_STATUS: // "Status" case symbol_kind::S_ACTION_TAG: // "Tag" case symbol_kind::S_ACTION_TRANSFORMATION_BASE_64_ENCODE: // "ACTION_TRANSFORMATION_BASE_64_ENCODE" case symbol_kind::S_ACTION_TRANSFORMATION_BASE_64_DECODE: // "ACTION_TRANSFORMATION_BASE_64_DECODE" case symbol_kind::S_ACTION_TRANSFORMATION_BASE_64_DECODE_EXT: // "ACTION_TRANSFORMATION_BASE_64_DECODE_EXT" case symbol_kind::S_ACTION_TRANSFORMATION_CMD_LINE: // "ACTION_TRANSFORMATION_CMD_LINE" case symbol_kind::S_ACTION_TRANSFORMATION_COMPRESS_WHITESPACE: // "ACTION_TRANSFORMATION_COMPRESS_WHITESPACE" case symbol_kind::S_ACTION_TRANSFORMATION_CSS_DECODE: // "ACTION_TRANSFORMATION_CSS_DECODE" case symbol_kind::S_ACTION_TRANSFORMATION_ESCAPE_SEQ_DECODE: // "ACTION_TRANSFORMATION_ESCAPE_SEQ_DECODE" case symbol_kind::S_ACTION_TRANSFORMATION_HEX_ENCODE: // "ACTION_TRANSFORMATION_HEX_ENCODE" case symbol_kind::S_ACTION_TRANSFORMATION_HEX_DECODE: // "ACTION_TRANSFORMATION_HEX_DECODE" case symbol_kind::S_ACTION_TRANSFORMATION_HTML_ENTITY_DECODE: // "ACTION_TRANSFORMATION_HTML_ENTITY_DECODE" case symbol_kind::S_ACTION_TRANSFORMATION_JS_DECODE: // "ACTION_TRANSFORMATION_JS_DECODE" case symbol_kind::S_ACTION_TRANSFORMATION_LENGTH: // "ACTION_TRANSFORMATION_LENGTH" case symbol_kind::S_ACTION_TRANSFORMATION_LOWERCASE: // "ACTION_TRANSFORMATION_LOWERCASE" case symbol_kind::S_ACTION_TRANSFORMATION_MD5: // "ACTION_TRANSFORMATION_MD5" case symbol_kind::S_ACTION_TRANSFORMATION_NONE: // "ACTION_TRANSFORMATION_NONE" case symbol_kind::S_ACTION_TRANSFORMATION_NORMALISE_PATH: // "ACTION_TRANSFORMATION_NORMALISE_PATH" case symbol_kind::S_ACTION_TRANSFORMATION_NORMALISE_PATH_WIN: // "ACTION_TRANSFORMATION_NORMALISE_PATH_WIN" case symbol_kind::S_ACTION_TRANSFORMATION_PARITY_EVEN_7_BIT: // "ACTION_TRANSFORMATION_PARITY_EVEN_7_BIT" case symbol_kind::S_ACTION_TRANSFORMATION_PARITY_ODD_7_BIT: // "ACTION_TRANSFORMATION_PARITY_ODD_7_BIT" case symbol_kind::S_ACTION_TRANSFORMATION_PARITY_ZERO_7_BIT: // "ACTION_TRANSFORMATION_PARITY_ZERO_7_BIT" case symbol_kind::S_ACTION_TRANSFORMATION_REMOVE_COMMENTS: // "ACTION_TRANSFORMATION_REMOVE_COMMENTS" case symbol_kind::S_ACTION_TRANSFORMATION_REMOVE_COMMENTS_CHAR: // "ACTION_TRANSFORMATION_REMOVE_COMMENTS_CHAR" case symbol_kind::S_ACTION_TRANSFORMATION_REMOVE_NULLS: // "ACTION_TRANSFORMATION_REMOVE_NULLS" case symbol_kind::S_ACTION_TRANSFORMATION_REMOVE_WHITESPACE: // "ACTION_TRANSFORMATION_REMOVE_WHITESPACE" case symbol_kind::S_ACTION_TRANSFORMATION_REPLACE_COMMENTS: // "ACTION_TRANSFORMATION_REPLACE_COMMENTS" case symbol_kind::S_ACTION_TRANSFORMATION_REPLACE_NULLS: // "ACTION_TRANSFORMATION_REPLACE_NULLS" case symbol_kind::S_ACTION_TRANSFORMATION_SHA1: // "ACTION_TRANSFORMATION_SHA1" case symbol_kind::S_ACTION_TRANSFORMATION_SQL_HEX_DECODE: // "ACTION_TRANSFORMATION_SQL_HEX_DECODE" case symbol_kind::S_ACTION_TRANSFORMATION_TRIM: // "ACTION_TRANSFORMATION_TRIM" case symbol_kind::S_ACTION_TRANSFORMATION_TRIM_LEFT: // "ACTION_TRANSFORMATION_TRIM_LEFT" case symbol_kind::S_ACTION_TRANSFORMATION_TRIM_RIGHT: // "ACTION_TRANSFORMATION_TRIM_RIGHT" case symbol_kind::S_ACTION_TRANSFORMATION_UPPERCASE: // "ACTION_TRANSFORMATION_UPPERCASE" case symbol_kind::S_ACTION_TRANSFORMATION_URL_ENCODE: // "ACTION_TRANSFORMATION_URL_ENCODE" case symbol_kind::S_ACTION_TRANSFORMATION_URL_DECODE: // "ACTION_TRANSFORMATION_URL_DECODE" case symbol_kind::S_ACTION_TRANSFORMATION_URL_DECODE_UNI: // "ACTION_TRANSFORMATION_URL_DECODE_UNI" case symbol_kind::S_ACTION_TRANSFORMATION_UTF8_TO_UNICODE: // "ACTION_TRANSFORMATION_UTF8_TO_UNICODE" case symbol_kind::S_ACTION_VER: // "Ver" case symbol_kind::S_ACTION_XMLNS: // "xmlns" case symbol_kind::S_CONFIG_COMPONENT_SIG: // "CONFIG_COMPONENT_SIG" case symbol_kind::S_CONFIG_CONN_ENGINE: // "CONFIG_CONN_ENGINE" case symbol_kind::S_CONFIG_SEC_ARGUMENT_SEPARATOR: // "CONFIG_SEC_ARGUMENT_SEPARATOR" case symbol_kind::S_CONFIG_SEC_WEB_APP_ID: // "CONFIG_SEC_WEB_APP_ID" case symbol_kind::S_CONFIG_SEC_SERVER_SIG: // "CONFIG_SEC_SERVER_SIG" case symbol_kind::S_CONFIG_DIR_AUDIT_DIR: // "CONFIG_DIR_AUDIT_DIR" case symbol_kind::S_CONFIG_DIR_AUDIT_DIR_MOD: // "CONFIG_DIR_AUDIT_DIR_MOD" case symbol_kind::S_CONFIG_DIR_AUDIT_ENG: // "CONFIG_DIR_AUDIT_ENG" case symbol_kind::S_CONFIG_DIR_AUDIT_FLE_MOD: // "CONFIG_DIR_AUDIT_FLE_MOD" case symbol_kind::S_CONFIG_DIR_AUDIT_LOG: // "CONFIG_DIR_AUDIT_LOG" case symbol_kind::S_CONFIG_DIR_AUDIT_LOG2: // "CONFIG_DIR_AUDIT_LOG2" case symbol_kind::S_CONFIG_DIR_AUDIT_LOG_P: // "CONFIG_DIR_AUDIT_LOG_P" case symbol_kind::S_CONFIG_DIR_AUDIT_STS: // "CONFIG_DIR_AUDIT_STS" case symbol_kind::S_CONFIG_DIR_AUDIT_TPE: // "CONFIG_DIR_AUDIT_TPE" case symbol_kind::S_CONFIG_DIR_DEBUG_LOG: // "CONFIG_DIR_DEBUG_LOG" case symbol_kind::S_CONFIG_DIR_DEBUG_LVL: // "CONFIG_DIR_DEBUG_LVL" case symbol_kind::S_CONFIG_SEC_CACHE_TRANSFORMATIONS: // "CONFIG_SEC_CACHE_TRANSFORMATIONS" case symbol_kind::S_CONFIG_SEC_DISABLE_BACKEND_COMPRESS: // "CONFIG_SEC_DISABLE_BACKEND_COMPRESS" case symbol_kind::S_CONFIG_SEC_HASH_ENGINE: // "CONFIG_SEC_HASH_ENGINE" case symbol_kind::S_CONFIG_SEC_HASH_KEY: // "CONFIG_SEC_HASH_KEY" case symbol_kind::S_CONFIG_SEC_HASH_PARAM: // "CONFIG_SEC_HASH_PARAM" case symbol_kind::S_CONFIG_SEC_HASH_METHOD_RX: // "CONFIG_SEC_HASH_METHOD_RX" case symbol_kind::S_CONFIG_SEC_HASH_METHOD_PM: // "CONFIG_SEC_HASH_METHOD_PM" case symbol_kind::S_CONFIG_SEC_CHROOT_DIR: // "CONFIG_SEC_CHROOT_DIR" case symbol_kind::S_CONFIG_DIR_GEO_DB: // "CONFIG_DIR_GEO_DB" case symbol_kind::S_CONFIG_DIR_GSB_DB: // "CONFIG_DIR_GSB_DB" case symbol_kind::S_CONFIG_SEC_GUARDIAN_LOG: // "CONFIG_SEC_GUARDIAN_LOG" case symbol_kind::S_CONFIG_DIR_PCRE_MATCH_LIMIT: // "CONFIG_DIR_PCRE_MATCH_LIMIT" case symbol_kind::S_CONFIG_DIR_PCRE_MATCH_LIMIT_RECURSION: // "CONFIG_DIR_PCRE_MATCH_LIMIT_RECURSION" case symbol_kind::S_CONFIG_SEC_CONN_R_STATE_LIMIT: // "CONFIG_SEC_CONN_R_STATE_LIMIT" case symbol_kind::S_CONFIG_SEC_CONN_W_STATE_LIMIT: // "CONFIG_SEC_CONN_W_STATE_LIMIT" case symbol_kind::S_CONFIG_SEC_SENSOR_ID: // "CONFIG_SEC_SENSOR_ID" case symbol_kind::S_CONFIG_DIR_ARGS_LIMIT: // "CONFIG_DIR_ARGS_LIMIT" case symbol_kind::S_CONFIG_DIR_REQ_BODY_JSON_DEPTH_LIMIT: // "CONFIG_DIR_REQ_BODY_JSON_DEPTH_LIMIT" case symbol_kind::S_CONFIG_DIR_REQ_BODY: // "CONFIG_DIR_REQ_BODY" case symbol_kind::S_CONFIG_DIR_REQ_BODY_IN_MEMORY_LIMIT: // "CONFIG_DIR_REQ_BODY_IN_MEMORY_LIMIT" case symbol_kind::S_CONFIG_DIR_REQ_BODY_LIMIT: // "CONFIG_DIR_REQ_BODY_LIMIT" case symbol_kind::S_CONFIG_DIR_REQ_BODY_LIMIT_ACTION: // "CONFIG_DIR_REQ_BODY_LIMIT_ACTION" case symbol_kind::S_CONFIG_DIR_REQ_BODY_NO_FILES_LIMIT: // "CONFIG_DIR_REQ_BODY_NO_FILES_LIMIT" case symbol_kind::S_CONFIG_DIR_RES_BODY: // "CONFIG_DIR_RES_BODY" case symbol_kind::S_CONFIG_DIR_RES_BODY_LIMIT: // "CONFIG_DIR_RES_BODY_LIMIT" case symbol_kind::S_CONFIG_DIR_RES_BODY_LIMIT_ACTION: // "CONFIG_DIR_RES_BODY_LIMIT_ACTION" case symbol_kind::S_CONFIG_SEC_RULE_INHERITANCE: // "CONFIG_SEC_RULE_INHERITANCE" case symbol_kind::S_CONFIG_SEC_RULE_PERF_TIME: // "CONFIG_SEC_RULE_PERF_TIME" case symbol_kind::S_CONFIG_DIR_RULE_ENG: // "CONFIG_DIR_RULE_ENG" case symbol_kind::S_CONFIG_DIR_SEC_ACTION: // "CONFIG_DIR_SEC_ACTION" case symbol_kind::S_CONFIG_DIR_SEC_DEFAULT_ACTION: // "CONFIG_DIR_SEC_DEFAULT_ACTION" case symbol_kind::S_CONFIG_DIR_SEC_MARKER: // "CONFIG_DIR_SEC_MARKER" case symbol_kind::S_CONFIG_DIR_UNICODE_MAP_FILE: // "CONFIG_DIR_UNICODE_MAP_FILE" case symbol_kind::S_CONFIG_DIR_UNICODE_CODE_PAGE: // "CONFIG_DIR_UNICODE_CODE_PAGE" case symbol_kind::S_CONFIG_SEC_COLLECTION_TIMEOUT: // "CONFIG_SEC_COLLECTION_TIMEOUT" case symbol_kind::S_CONFIG_SEC_HTTP_BLKEY: // "CONFIG_SEC_HTTP_BLKEY" case symbol_kind::S_CONFIG_SEC_INTERCEPT_ON_ERROR: // "CONFIG_SEC_INTERCEPT_ON_ERROR" case symbol_kind::S_CONFIG_SEC_REMOTE_RULES_FAIL_ACTION: // "CONFIG_SEC_REMOTE_RULES_FAIL_ACTION" case symbol_kind::S_CONFIG_SEC_RULE_REMOVE_BY_ID: // "CONFIG_SEC_RULE_REMOVE_BY_ID" case symbol_kind::S_CONFIG_SEC_RULE_REMOVE_BY_MSG: // "CONFIG_SEC_RULE_REMOVE_BY_MSG" case symbol_kind::S_CONFIG_SEC_RULE_REMOVE_BY_TAG: // "CONFIG_SEC_RULE_REMOVE_BY_TAG" case symbol_kind::S_CONFIG_SEC_RULE_UPDATE_TARGET_BY_TAG: // "CONFIG_SEC_RULE_UPDATE_TARGET_BY_TAG" case symbol_kind::S_CONFIG_SEC_RULE_UPDATE_TARGET_BY_MSG: // "CONFIG_SEC_RULE_UPDATE_TARGET_BY_MSG" case symbol_kind::S_CONFIG_SEC_RULE_UPDATE_TARGET_BY_ID: // "CONFIG_SEC_RULE_UPDATE_TARGET_BY_ID" case symbol_kind::S_CONFIG_SEC_RULE_UPDATE_ACTION_BY_ID: // "CONFIG_SEC_RULE_UPDATE_ACTION_BY_ID" case symbol_kind::S_CONFIG_UPDLOAD_KEEP_FILES: // "CONFIG_UPDLOAD_KEEP_FILES" case symbol_kind::S_CONFIG_UPDLOAD_SAVE_TMP_FILES: // "CONFIG_UPDLOAD_SAVE_TMP_FILES" case symbol_kind::S_CONFIG_UPLOAD_DIR: // "CONFIG_UPLOAD_DIR" case symbol_kind::S_CONFIG_UPLOAD_FILE_LIMIT: // "CONFIG_UPLOAD_FILE_LIMIT" case symbol_kind::S_CONFIG_UPLOAD_FILE_MODE: // "CONFIG_UPLOAD_FILE_MODE" case symbol_kind::S_CONFIG_VALUE_ABORT: // "CONFIG_VALUE_ABORT" case symbol_kind::S_CONFIG_VALUE_DETC: // "CONFIG_VALUE_DETC" case symbol_kind::S_CONFIG_VALUE_HTTPS: // "CONFIG_VALUE_HTTPS" case symbol_kind::S_CONFIG_VALUE_OFF: // "CONFIG_VALUE_OFF" case symbol_kind::S_CONFIG_VALUE_ON: // "CONFIG_VALUE_ON" case symbol_kind::S_CONFIG_VALUE_PARALLEL: // "CONFIG_VALUE_PARALLEL" case symbol_kind::S_CONFIG_VALUE_PROCESS_PARTIAL: // "CONFIG_VALUE_PROCESS_PARTIAL" case symbol_kind::S_CONFIG_VALUE_REJECT: // "CONFIG_VALUE_REJECT" case symbol_kind::S_CONFIG_VALUE_RELEVANT_ONLY: // "CONFIG_VALUE_RELEVANT_ONLY" case symbol_kind::S_CONFIG_VALUE_SERIAL: // "CONFIG_VALUE_SERIAL" case symbol_kind::S_CONFIG_VALUE_WARN: // "CONFIG_VALUE_WARN" case symbol_kind::S_CONFIG_XML_EXTERNAL_ENTITY: // "CONFIG_XML_EXTERNAL_ENTITY" case symbol_kind::S_CONGIG_DIR_RESPONSE_BODY_MP: // "CONGIG_DIR_RESPONSE_BODY_MP" case symbol_kind::S_CONGIG_DIR_SEC_ARG_SEP: // "CONGIG_DIR_SEC_ARG_SEP" case symbol_kind::S_CONGIG_DIR_SEC_COOKIE_FORMAT: // "CONGIG_DIR_SEC_COOKIE_FORMAT" case symbol_kind::S_CONFIG_SEC_COOKIEV0_SEPARATOR: // "CONFIG_SEC_COOKIEV0_SEPARATOR" case symbol_kind::S_CONGIG_DIR_SEC_DATA_DIR: // "CONGIG_DIR_SEC_DATA_DIR" case symbol_kind::S_CONGIG_DIR_SEC_STATUS_ENGINE: // "CONGIG_DIR_SEC_STATUS_ENGINE" case symbol_kind::S_CONFIG_SEC_STREAM_IN_BODY_INSPECTION: // "CONFIG_SEC_STREAM_IN_BODY_INSPECTION" case symbol_kind::S_CONFIG_SEC_STREAM_OUT_BODY_INSPECTION: // "CONFIG_SEC_STREAM_OUT_BODY_INSPECTION" case symbol_kind::S_CONGIG_DIR_SEC_TMP_DIR: // "CONGIG_DIR_SEC_TMP_DIR" case symbol_kind::S_DIRECTIVE: // "DIRECTIVE" case symbol_kind::S_DIRECTIVE_SECRULESCRIPT: // "DIRECTIVE_SECRULESCRIPT" case symbol_kind::S_FREE_TEXT_QUOTE_MACRO_EXPANSION: // "FREE_TEXT_QUOTE_MACRO_EXPANSION" case symbol_kind::S_QUOTATION_MARK: // "QUOTATION_MARK" case symbol_kind::S_RUN_TIME_VAR_BLD: // "RUN_TIME_VAR_BLD" case symbol_kind::S_RUN_TIME_VAR_DUR: // "RUN_TIME_VAR_DUR" case symbol_kind::S_RUN_TIME_VAR_HSV: // "RUN_TIME_VAR_HSV" case symbol_kind::S_RUN_TIME_VAR_REMOTE_USER: // "RUN_TIME_VAR_REMOTE_USER" case symbol_kind::S_RUN_TIME_VAR_TIME: // "RUN_TIME_VAR_TIME" case symbol_kind::S_RUN_TIME_VAR_TIME_DAY: // "RUN_TIME_VAR_TIME_DAY" case symbol_kind::S_RUN_TIME_VAR_TIME_EPOCH: // "RUN_TIME_VAR_TIME_EPOCH" case symbol_kind::S_RUN_TIME_VAR_TIME_HOUR: // "RUN_TIME_VAR_TIME_HOUR" case symbol_kind::S_RUN_TIME_VAR_TIME_MIN: // "RUN_TIME_VAR_TIME_MIN" case symbol_kind::S_RUN_TIME_VAR_TIME_MON: // "RUN_TIME_VAR_TIME_MON" case symbol_kind::S_RUN_TIME_VAR_TIME_SEC: // "RUN_TIME_VAR_TIME_SEC" case symbol_kind::S_RUN_TIME_VAR_TIME_WDAY: // "RUN_TIME_VAR_TIME_WDAY" case symbol_kind::S_RUN_TIME_VAR_TIME_YEAR: // "RUN_TIME_VAR_TIME_YEAR" case symbol_kind::S_VARIABLE: // "VARIABLE" case symbol_kind::S_DICT_ELEMENT: // "Dictionary element" case symbol_kind::S_DICT_ELEMENT_REGEXP: // "Dictionary element, selected by regexp" value.move< std::string > (std::move (that.value)); break; case symbol_kind::S_op: // op case symbol_kind::S_op_before_init: // op_before_init value.move< std::unique_ptr > (std::move (that.value)); break; case symbol_kind::S_run_time_string: // run_time_string value.move< std::unique_ptr > (std::move (that.value)); break; case symbol_kind::S_var: // var value.move< std::unique_ptr > (std::move (that.value)); break; case symbol_kind::S_act: // act case symbol_kind::S_setvar_action: // setvar_action value.move< std::unique_ptr > (std::move (that.value)); break; case symbol_kind::S_variables: // variables case symbol_kind::S_variables_pre_process: // variables_pre_process case symbol_kind::S_variables_may_be_quoted: // variables_may_be_quoted value.move< std::unique_ptr > > > (std::move (that.value)); break; case symbol_kind::S_actions: // actions case symbol_kind::S_actions_may_quoted: // actions_may_quoted value.move< std::unique_ptr > > > (std::move (that.value)); break; default: break; } } #endif /// Copy constructor. basic_symbol (const basic_symbol& that); /// Constructor for valueless symbols, and symbols from each type. #if 201103L <= YY_CPLUSPLUS basic_symbol (typename Base::kind_type t, location_type&& l) : Base (t) , location (std::move (l)) {} #else basic_symbol (typename Base::kind_type t, const location_type& l) : Base (t) , location (l) {} #endif #if 201103L <= YY_CPLUSPLUS basic_symbol (typename Base::kind_type t, std::string&& v, location_type&& l) : Base (t) , value (std::move (v)) , location (std::move (l)) {} #else basic_symbol (typename Base::kind_type t, const std::string& v, const location_type& l) : Base (t) , value (v) , location (l) {} #endif #if 201103L <= YY_CPLUSPLUS basic_symbol (typename Base::kind_type t, std::unique_ptr&& v, location_type&& l) : Base (t) , value (std::move (v)) , location (std::move (l)) {} #else basic_symbol (typename Base::kind_type t, const std::unique_ptr& v, const location_type& l) : Base (t) , value (v) , location (l) {} #endif #if 201103L <= YY_CPLUSPLUS basic_symbol (typename Base::kind_type t, std::unique_ptr&& v, location_type&& l) : Base (t) , value (std::move (v)) , location (std::move (l)) {} #else basic_symbol (typename Base::kind_type t, const std::unique_ptr& v, const location_type& l) : Base (t) , value (v) , location (l) {} #endif #if 201103L <= YY_CPLUSPLUS basic_symbol (typename Base::kind_type t, std::unique_ptr&& v, location_type&& l) : Base (t) , value (std::move (v)) , location (std::move (l)) {} #else basic_symbol (typename Base::kind_type t, const std::unique_ptr& v, const location_type& l) : Base (t) , value (v) , location (l) {} #endif #if 201103L <= YY_CPLUSPLUS basic_symbol (typename Base::kind_type t, std::unique_ptr&& v, location_type&& l) : Base (t) , value (std::move (v)) , location (std::move (l)) {} #else basic_symbol (typename Base::kind_type t, const std::unique_ptr& v, const location_type& l) : Base (t) , value (v) , location (l) {} #endif #if 201103L <= YY_CPLUSPLUS basic_symbol (typename Base::kind_type t, std::unique_ptr > > && v, location_type&& l) : Base (t) , value (std::move (v)) , location (std::move (l)) {} #else basic_symbol (typename Base::kind_type t, const std::unique_ptr > > & v, const location_type& l) : Base (t) , value (v) , location (l) {} #endif #if 201103L <= YY_CPLUSPLUS basic_symbol (typename Base::kind_type t, std::unique_ptr > > && v, location_type&& l) : Base (t) , value (std::move (v)) , location (std::move (l)) {} #else basic_symbol (typename Base::kind_type t, const std::unique_ptr > > & v, const location_type& l) : Base (t) , value (v) , location (l) {} #endif /// Destroy the symbol. ~basic_symbol () { clear (); } /// Destroy contents, and record that is empty. void clear () { // User destructor. symbol_kind_type yykind = this->kind (); basic_symbol& yysym = *this; (void) yysym; switch (yykind) { default: break; } // Value type destructor. switch (yykind) { case symbol_kind::S_ACTION_ACCURACY: // "Accuracy" case symbol_kind::S_ACTION_ALLOW: // "Allow" case symbol_kind::S_ACTION_APPEND: // "Append" case symbol_kind::S_ACTION_AUDIT_LOG: // "AuditLog" case symbol_kind::S_ACTION_BLOCK: // "Block" case symbol_kind::S_ACTION_CAPTURE: // "Capture" case symbol_kind::S_ACTION_CHAIN: // "Chain" case symbol_kind::S_ACTION_CTL_AUDIT_ENGINE: // "ACTION_CTL_AUDIT_ENGINE" case symbol_kind::S_ACTION_CTL_AUDIT_LOG_PARTS: // "ACTION_CTL_AUDIT_LOG_PARTS" case symbol_kind::S_ACTION_CTL_BDY_JSON: // "ACTION_CTL_BDY_JSON" case symbol_kind::S_ACTION_CTL_BDY_XML: // "ACTION_CTL_BDY_XML" case symbol_kind::S_ACTION_CTL_BDY_URLENCODED: // "ACTION_CTL_BDY_URLENCODED" case symbol_kind::S_ACTION_CTL_FORCE_REQ_BODY_VAR: // "ACTION_CTL_FORCE_REQ_BODY_VAR" case symbol_kind::S_ACTION_CTL_REQUEST_BODY_ACCESS: // "ACTION_CTL_REQUEST_BODY_ACCESS" case symbol_kind::S_ACTION_CTL_RULE_REMOVE_BY_ID: // "ACTION_CTL_RULE_REMOVE_BY_ID" case symbol_kind::S_ACTION_CTL_RULE_REMOVE_BY_TAG: // "ACTION_CTL_RULE_REMOVE_BY_TAG" case symbol_kind::S_ACTION_CTL_RULE_REMOVE_TARGET_BY_ID: // "ACTION_CTL_RULE_REMOVE_TARGET_BY_ID" case symbol_kind::S_ACTION_CTL_RULE_REMOVE_TARGET_BY_TAG: // "ACTION_CTL_RULE_REMOVE_TARGET_BY_TAG" case symbol_kind::S_ACTION_DENY: // "Deny" case symbol_kind::S_ACTION_DEPRECATE_VAR: // "DeprecateVar" case symbol_kind::S_ACTION_DROP: // "Drop" case symbol_kind::S_ACTION_EXEC: // "Exec" case symbol_kind::S_ACTION_EXPIRE_VAR: // "ExpireVar" case symbol_kind::S_ACTION_ID: // "Id" case symbol_kind::S_ACTION_INITCOL: // "InitCol" case symbol_kind::S_ACTION_LOG: // "Log" case symbol_kind::S_ACTION_LOG_DATA: // "LogData" case symbol_kind::S_ACTION_MATURITY: // "Maturity" case symbol_kind::S_ACTION_MSG: // "Msg" case symbol_kind::S_ACTION_MULTI_MATCH: // "MultiMatch" case symbol_kind::S_ACTION_NO_AUDIT_LOG: // "NoAuditLog" case symbol_kind::S_ACTION_NO_LOG: // "NoLog" case symbol_kind::S_ACTION_PASS: // "Pass" case symbol_kind::S_ACTION_PAUSE: // "Pause" case symbol_kind::S_ACTION_PHASE: // "Phase" case symbol_kind::S_ACTION_PREPEND: // "Prepend" case symbol_kind::S_ACTION_PROXY: // "Proxy" case symbol_kind::S_ACTION_REDIRECT: // "Redirect" case symbol_kind::S_ACTION_REV: // "Rev" case symbol_kind::S_ACTION_SANITISE_ARG: // "SanitiseArg" case symbol_kind::S_ACTION_SANITISE_MATCHED: // "SanitiseMatched" case symbol_kind::S_ACTION_SANITISE_MATCHED_BYTES: // "SanitiseMatchedBytes" case symbol_kind::S_ACTION_SANITISE_REQUEST_HEADER: // "SanitiseRequestHeader" case symbol_kind::S_ACTION_SANITISE_RESPONSE_HEADER: // "SanitiseResponseHeader" case symbol_kind::S_ACTION_SETENV: // "SetEnv" case symbol_kind::S_ACTION_SETRSC: // "SetRsc" case symbol_kind::S_ACTION_SETSID: // "SetSid" case symbol_kind::S_ACTION_SETUID: // "SetUID" case symbol_kind::S_ACTION_SEVERITY: // "Severity" case symbol_kind::S_ACTION_SKIP: // "Skip" case symbol_kind::S_ACTION_SKIP_AFTER: // "SkipAfter" case symbol_kind::S_ACTION_STATUS: // "Status" case symbol_kind::S_ACTION_TAG: // "Tag" case symbol_kind::S_ACTION_TRANSFORMATION_BASE_64_ENCODE: // "ACTION_TRANSFORMATION_BASE_64_ENCODE" case symbol_kind::S_ACTION_TRANSFORMATION_BASE_64_DECODE: // "ACTION_TRANSFORMATION_BASE_64_DECODE" case symbol_kind::S_ACTION_TRANSFORMATION_BASE_64_DECODE_EXT: // "ACTION_TRANSFORMATION_BASE_64_DECODE_EXT" case symbol_kind::S_ACTION_TRANSFORMATION_CMD_LINE: // "ACTION_TRANSFORMATION_CMD_LINE" case symbol_kind::S_ACTION_TRANSFORMATION_COMPRESS_WHITESPACE: // "ACTION_TRANSFORMATION_COMPRESS_WHITESPACE" case symbol_kind::S_ACTION_TRANSFORMATION_CSS_DECODE: // "ACTION_TRANSFORMATION_CSS_DECODE" case symbol_kind::S_ACTION_TRANSFORMATION_ESCAPE_SEQ_DECODE: // "ACTION_TRANSFORMATION_ESCAPE_SEQ_DECODE" case symbol_kind::S_ACTION_TRANSFORMATION_HEX_ENCODE: // "ACTION_TRANSFORMATION_HEX_ENCODE" case symbol_kind::S_ACTION_TRANSFORMATION_HEX_DECODE: // "ACTION_TRANSFORMATION_HEX_DECODE" case symbol_kind::S_ACTION_TRANSFORMATION_HTML_ENTITY_DECODE: // "ACTION_TRANSFORMATION_HTML_ENTITY_DECODE" case symbol_kind::S_ACTION_TRANSFORMATION_JS_DECODE: // "ACTION_TRANSFORMATION_JS_DECODE" case symbol_kind::S_ACTION_TRANSFORMATION_LENGTH: // "ACTION_TRANSFORMATION_LENGTH" case symbol_kind::S_ACTION_TRANSFORMATION_LOWERCASE: // "ACTION_TRANSFORMATION_LOWERCASE" case symbol_kind::S_ACTION_TRANSFORMATION_MD5: // "ACTION_TRANSFORMATION_MD5" case symbol_kind::S_ACTION_TRANSFORMATION_NONE: // "ACTION_TRANSFORMATION_NONE" case symbol_kind::S_ACTION_TRANSFORMATION_NORMALISE_PATH: // "ACTION_TRANSFORMATION_NORMALISE_PATH" case symbol_kind::S_ACTION_TRANSFORMATION_NORMALISE_PATH_WIN: // "ACTION_TRANSFORMATION_NORMALISE_PATH_WIN" case symbol_kind::S_ACTION_TRANSFORMATION_PARITY_EVEN_7_BIT: // "ACTION_TRANSFORMATION_PARITY_EVEN_7_BIT" case symbol_kind::S_ACTION_TRANSFORMATION_PARITY_ODD_7_BIT: // "ACTION_TRANSFORMATION_PARITY_ODD_7_BIT" case symbol_kind::S_ACTION_TRANSFORMATION_PARITY_ZERO_7_BIT: // "ACTION_TRANSFORMATION_PARITY_ZERO_7_BIT" case symbol_kind::S_ACTION_TRANSFORMATION_REMOVE_COMMENTS: // "ACTION_TRANSFORMATION_REMOVE_COMMENTS" case symbol_kind::S_ACTION_TRANSFORMATION_REMOVE_COMMENTS_CHAR: // "ACTION_TRANSFORMATION_REMOVE_COMMENTS_CHAR" case symbol_kind::S_ACTION_TRANSFORMATION_REMOVE_NULLS: // "ACTION_TRANSFORMATION_REMOVE_NULLS" case symbol_kind::S_ACTION_TRANSFORMATION_REMOVE_WHITESPACE: // "ACTION_TRANSFORMATION_REMOVE_WHITESPACE" case symbol_kind::S_ACTION_TRANSFORMATION_REPLACE_COMMENTS: // "ACTION_TRANSFORMATION_REPLACE_COMMENTS" case symbol_kind::S_ACTION_TRANSFORMATION_REPLACE_NULLS: // "ACTION_TRANSFORMATION_REPLACE_NULLS" case symbol_kind::S_ACTION_TRANSFORMATION_SHA1: // "ACTION_TRANSFORMATION_SHA1" case symbol_kind::S_ACTION_TRANSFORMATION_SQL_HEX_DECODE: // "ACTION_TRANSFORMATION_SQL_HEX_DECODE" case symbol_kind::S_ACTION_TRANSFORMATION_TRIM: // "ACTION_TRANSFORMATION_TRIM" case symbol_kind::S_ACTION_TRANSFORMATION_TRIM_LEFT: // "ACTION_TRANSFORMATION_TRIM_LEFT" case symbol_kind::S_ACTION_TRANSFORMATION_TRIM_RIGHT: // "ACTION_TRANSFORMATION_TRIM_RIGHT" case symbol_kind::S_ACTION_TRANSFORMATION_UPPERCASE: // "ACTION_TRANSFORMATION_UPPERCASE" case symbol_kind::S_ACTION_TRANSFORMATION_URL_ENCODE: // "ACTION_TRANSFORMATION_URL_ENCODE" case symbol_kind::S_ACTION_TRANSFORMATION_URL_DECODE: // "ACTION_TRANSFORMATION_URL_DECODE" case symbol_kind::S_ACTION_TRANSFORMATION_URL_DECODE_UNI: // "ACTION_TRANSFORMATION_URL_DECODE_UNI" case symbol_kind::S_ACTION_TRANSFORMATION_UTF8_TO_UNICODE: // "ACTION_TRANSFORMATION_UTF8_TO_UNICODE" case symbol_kind::S_ACTION_VER: // "Ver" case symbol_kind::S_ACTION_XMLNS: // "xmlns" case symbol_kind::S_CONFIG_COMPONENT_SIG: // "CONFIG_COMPONENT_SIG" case symbol_kind::S_CONFIG_CONN_ENGINE: // "CONFIG_CONN_ENGINE" case symbol_kind::S_CONFIG_SEC_ARGUMENT_SEPARATOR: // "CONFIG_SEC_ARGUMENT_SEPARATOR" case symbol_kind::S_CONFIG_SEC_WEB_APP_ID: // "CONFIG_SEC_WEB_APP_ID" case symbol_kind::S_CONFIG_SEC_SERVER_SIG: // "CONFIG_SEC_SERVER_SIG" case symbol_kind::S_CONFIG_DIR_AUDIT_DIR: // "CONFIG_DIR_AUDIT_DIR" case symbol_kind::S_CONFIG_DIR_AUDIT_DIR_MOD: // "CONFIG_DIR_AUDIT_DIR_MOD" case symbol_kind::S_CONFIG_DIR_AUDIT_ENG: // "CONFIG_DIR_AUDIT_ENG" case symbol_kind::S_CONFIG_DIR_AUDIT_FLE_MOD: // "CONFIG_DIR_AUDIT_FLE_MOD" case symbol_kind::S_CONFIG_DIR_AUDIT_LOG: // "CONFIG_DIR_AUDIT_LOG" case symbol_kind::S_CONFIG_DIR_AUDIT_LOG2: // "CONFIG_DIR_AUDIT_LOG2" case symbol_kind::S_CONFIG_DIR_AUDIT_LOG_P: // "CONFIG_DIR_AUDIT_LOG_P" case symbol_kind::S_CONFIG_DIR_AUDIT_STS: // "CONFIG_DIR_AUDIT_STS" case symbol_kind::S_CONFIG_DIR_AUDIT_TPE: // "CONFIG_DIR_AUDIT_TPE" case symbol_kind::S_CONFIG_DIR_DEBUG_LOG: // "CONFIG_DIR_DEBUG_LOG" case symbol_kind::S_CONFIG_DIR_DEBUG_LVL: // "CONFIG_DIR_DEBUG_LVL" case symbol_kind::S_CONFIG_SEC_CACHE_TRANSFORMATIONS: // "CONFIG_SEC_CACHE_TRANSFORMATIONS" case symbol_kind::S_CONFIG_SEC_DISABLE_BACKEND_COMPRESS: // "CONFIG_SEC_DISABLE_BACKEND_COMPRESS" case symbol_kind::S_CONFIG_SEC_HASH_ENGINE: // "CONFIG_SEC_HASH_ENGINE" case symbol_kind::S_CONFIG_SEC_HASH_KEY: // "CONFIG_SEC_HASH_KEY" case symbol_kind::S_CONFIG_SEC_HASH_PARAM: // "CONFIG_SEC_HASH_PARAM" case symbol_kind::S_CONFIG_SEC_HASH_METHOD_RX: // "CONFIG_SEC_HASH_METHOD_RX" case symbol_kind::S_CONFIG_SEC_HASH_METHOD_PM: // "CONFIG_SEC_HASH_METHOD_PM" case symbol_kind::S_CONFIG_SEC_CHROOT_DIR: // "CONFIG_SEC_CHROOT_DIR" case symbol_kind::S_CONFIG_DIR_GEO_DB: // "CONFIG_DIR_GEO_DB" case symbol_kind::S_CONFIG_DIR_GSB_DB: // "CONFIG_DIR_GSB_DB" case symbol_kind::S_CONFIG_SEC_GUARDIAN_LOG: // "CONFIG_SEC_GUARDIAN_LOG" case symbol_kind::S_CONFIG_DIR_PCRE_MATCH_LIMIT: // "CONFIG_DIR_PCRE_MATCH_LIMIT" case symbol_kind::S_CONFIG_DIR_PCRE_MATCH_LIMIT_RECURSION: // "CONFIG_DIR_PCRE_MATCH_LIMIT_RECURSION" case symbol_kind::S_CONFIG_SEC_CONN_R_STATE_LIMIT: // "CONFIG_SEC_CONN_R_STATE_LIMIT" case symbol_kind::S_CONFIG_SEC_CONN_W_STATE_LIMIT: // "CONFIG_SEC_CONN_W_STATE_LIMIT" case symbol_kind::S_CONFIG_SEC_SENSOR_ID: // "CONFIG_SEC_SENSOR_ID" case symbol_kind::S_CONFIG_DIR_ARGS_LIMIT: // "CONFIG_DIR_ARGS_LIMIT" case symbol_kind::S_CONFIG_DIR_REQ_BODY_JSON_DEPTH_LIMIT: // "CONFIG_DIR_REQ_BODY_JSON_DEPTH_LIMIT" case symbol_kind::S_CONFIG_DIR_REQ_BODY: // "CONFIG_DIR_REQ_BODY" case symbol_kind::S_CONFIG_DIR_REQ_BODY_IN_MEMORY_LIMIT: // "CONFIG_DIR_REQ_BODY_IN_MEMORY_LIMIT" case symbol_kind::S_CONFIG_DIR_REQ_BODY_LIMIT: // "CONFIG_DIR_REQ_BODY_LIMIT" case symbol_kind::S_CONFIG_DIR_REQ_BODY_LIMIT_ACTION: // "CONFIG_DIR_REQ_BODY_LIMIT_ACTION" case symbol_kind::S_CONFIG_DIR_REQ_BODY_NO_FILES_LIMIT: // "CONFIG_DIR_REQ_BODY_NO_FILES_LIMIT" case symbol_kind::S_CONFIG_DIR_RES_BODY: // "CONFIG_DIR_RES_BODY" case symbol_kind::S_CONFIG_DIR_RES_BODY_LIMIT: // "CONFIG_DIR_RES_BODY_LIMIT" case symbol_kind::S_CONFIG_DIR_RES_BODY_LIMIT_ACTION: // "CONFIG_DIR_RES_BODY_LIMIT_ACTION" case symbol_kind::S_CONFIG_SEC_RULE_INHERITANCE: // "CONFIG_SEC_RULE_INHERITANCE" case symbol_kind::S_CONFIG_SEC_RULE_PERF_TIME: // "CONFIG_SEC_RULE_PERF_TIME" case symbol_kind::S_CONFIG_DIR_RULE_ENG: // "CONFIG_DIR_RULE_ENG" case symbol_kind::S_CONFIG_DIR_SEC_ACTION: // "CONFIG_DIR_SEC_ACTION" case symbol_kind::S_CONFIG_DIR_SEC_DEFAULT_ACTION: // "CONFIG_DIR_SEC_DEFAULT_ACTION" case symbol_kind::S_CONFIG_DIR_SEC_MARKER: // "CONFIG_DIR_SEC_MARKER" case symbol_kind::S_CONFIG_DIR_UNICODE_MAP_FILE: // "CONFIG_DIR_UNICODE_MAP_FILE" case symbol_kind::S_CONFIG_DIR_UNICODE_CODE_PAGE: // "CONFIG_DIR_UNICODE_CODE_PAGE" case symbol_kind::S_CONFIG_SEC_COLLECTION_TIMEOUT: // "CONFIG_SEC_COLLECTION_TIMEOUT" case symbol_kind::S_CONFIG_SEC_HTTP_BLKEY: // "CONFIG_SEC_HTTP_BLKEY" case symbol_kind::S_CONFIG_SEC_INTERCEPT_ON_ERROR: // "CONFIG_SEC_INTERCEPT_ON_ERROR" case symbol_kind::S_CONFIG_SEC_REMOTE_RULES_FAIL_ACTION: // "CONFIG_SEC_REMOTE_RULES_FAIL_ACTION" case symbol_kind::S_CONFIG_SEC_RULE_REMOVE_BY_ID: // "CONFIG_SEC_RULE_REMOVE_BY_ID" case symbol_kind::S_CONFIG_SEC_RULE_REMOVE_BY_MSG: // "CONFIG_SEC_RULE_REMOVE_BY_MSG" case symbol_kind::S_CONFIG_SEC_RULE_REMOVE_BY_TAG: // "CONFIG_SEC_RULE_REMOVE_BY_TAG" case symbol_kind::S_CONFIG_SEC_RULE_UPDATE_TARGET_BY_TAG: // "CONFIG_SEC_RULE_UPDATE_TARGET_BY_TAG" case symbol_kind::S_CONFIG_SEC_RULE_UPDATE_TARGET_BY_MSG: // "CONFIG_SEC_RULE_UPDATE_TARGET_BY_MSG" case symbol_kind::S_CONFIG_SEC_RULE_UPDATE_TARGET_BY_ID: // "CONFIG_SEC_RULE_UPDATE_TARGET_BY_ID" case symbol_kind::S_CONFIG_SEC_RULE_UPDATE_ACTION_BY_ID: // "CONFIG_SEC_RULE_UPDATE_ACTION_BY_ID" case symbol_kind::S_CONFIG_UPDLOAD_KEEP_FILES: // "CONFIG_UPDLOAD_KEEP_FILES" case symbol_kind::S_CONFIG_UPDLOAD_SAVE_TMP_FILES: // "CONFIG_UPDLOAD_SAVE_TMP_FILES" case symbol_kind::S_CONFIG_UPLOAD_DIR: // "CONFIG_UPLOAD_DIR" case symbol_kind::S_CONFIG_UPLOAD_FILE_LIMIT: // "CONFIG_UPLOAD_FILE_LIMIT" case symbol_kind::S_CONFIG_UPLOAD_FILE_MODE: // "CONFIG_UPLOAD_FILE_MODE" case symbol_kind::S_CONFIG_VALUE_ABORT: // "CONFIG_VALUE_ABORT" case symbol_kind::S_CONFIG_VALUE_DETC: // "CONFIG_VALUE_DETC" case symbol_kind::S_CONFIG_VALUE_HTTPS: // "CONFIG_VALUE_HTTPS" case symbol_kind::S_CONFIG_VALUE_OFF: // "CONFIG_VALUE_OFF" case symbol_kind::S_CONFIG_VALUE_ON: // "CONFIG_VALUE_ON" case symbol_kind::S_CONFIG_VALUE_PARALLEL: // "CONFIG_VALUE_PARALLEL" case symbol_kind::S_CONFIG_VALUE_PROCESS_PARTIAL: // "CONFIG_VALUE_PROCESS_PARTIAL" case symbol_kind::S_CONFIG_VALUE_REJECT: // "CONFIG_VALUE_REJECT" case symbol_kind::S_CONFIG_VALUE_RELEVANT_ONLY: // "CONFIG_VALUE_RELEVANT_ONLY" case symbol_kind::S_CONFIG_VALUE_SERIAL: // "CONFIG_VALUE_SERIAL" case symbol_kind::S_CONFIG_VALUE_WARN: // "CONFIG_VALUE_WARN" case symbol_kind::S_CONFIG_XML_EXTERNAL_ENTITY: // "CONFIG_XML_EXTERNAL_ENTITY" case symbol_kind::S_CONGIG_DIR_RESPONSE_BODY_MP: // "CONGIG_DIR_RESPONSE_BODY_MP" case symbol_kind::S_CONGIG_DIR_SEC_ARG_SEP: // "CONGIG_DIR_SEC_ARG_SEP" case symbol_kind::S_CONGIG_DIR_SEC_COOKIE_FORMAT: // "CONGIG_DIR_SEC_COOKIE_FORMAT" case symbol_kind::S_CONFIG_SEC_COOKIEV0_SEPARATOR: // "CONFIG_SEC_COOKIEV0_SEPARATOR" case symbol_kind::S_CONGIG_DIR_SEC_DATA_DIR: // "CONGIG_DIR_SEC_DATA_DIR" case symbol_kind::S_CONGIG_DIR_SEC_STATUS_ENGINE: // "CONGIG_DIR_SEC_STATUS_ENGINE" case symbol_kind::S_CONFIG_SEC_STREAM_IN_BODY_INSPECTION: // "CONFIG_SEC_STREAM_IN_BODY_INSPECTION" case symbol_kind::S_CONFIG_SEC_STREAM_OUT_BODY_INSPECTION: // "CONFIG_SEC_STREAM_OUT_BODY_INSPECTION" case symbol_kind::S_CONGIG_DIR_SEC_TMP_DIR: // "CONGIG_DIR_SEC_TMP_DIR" case symbol_kind::S_DIRECTIVE: // "DIRECTIVE" case symbol_kind::S_DIRECTIVE_SECRULESCRIPT: // "DIRECTIVE_SECRULESCRIPT" case symbol_kind::S_FREE_TEXT_QUOTE_MACRO_EXPANSION: // "FREE_TEXT_QUOTE_MACRO_EXPANSION" case symbol_kind::S_QUOTATION_MARK: // "QUOTATION_MARK" case symbol_kind::S_RUN_TIME_VAR_BLD: // "RUN_TIME_VAR_BLD" case symbol_kind::S_RUN_TIME_VAR_DUR: // "RUN_TIME_VAR_DUR" case symbol_kind::S_RUN_TIME_VAR_HSV: // "RUN_TIME_VAR_HSV" case symbol_kind::S_RUN_TIME_VAR_REMOTE_USER: // "RUN_TIME_VAR_REMOTE_USER" case symbol_kind::S_RUN_TIME_VAR_TIME: // "RUN_TIME_VAR_TIME" case symbol_kind::S_RUN_TIME_VAR_TIME_DAY: // "RUN_TIME_VAR_TIME_DAY" case symbol_kind::S_RUN_TIME_VAR_TIME_EPOCH: // "RUN_TIME_VAR_TIME_EPOCH" case symbol_kind::S_RUN_TIME_VAR_TIME_HOUR: // "RUN_TIME_VAR_TIME_HOUR" case symbol_kind::S_RUN_TIME_VAR_TIME_MIN: // "RUN_TIME_VAR_TIME_MIN" case symbol_kind::S_RUN_TIME_VAR_TIME_MON: // "RUN_TIME_VAR_TIME_MON" case symbol_kind::S_RUN_TIME_VAR_TIME_SEC: // "RUN_TIME_VAR_TIME_SEC" case symbol_kind::S_RUN_TIME_VAR_TIME_WDAY: // "RUN_TIME_VAR_TIME_WDAY" case symbol_kind::S_RUN_TIME_VAR_TIME_YEAR: // "RUN_TIME_VAR_TIME_YEAR" case symbol_kind::S_VARIABLE: // "VARIABLE" case symbol_kind::S_DICT_ELEMENT: // "Dictionary element" case symbol_kind::S_DICT_ELEMENT_REGEXP: // "Dictionary element, selected by regexp" value.template destroy< std::string > (); break; case symbol_kind::S_op: // op case symbol_kind::S_op_before_init: // op_before_init value.template destroy< std::unique_ptr > (); break; case symbol_kind::S_run_time_string: // run_time_string value.template destroy< std::unique_ptr > (); break; case symbol_kind::S_var: // var value.template destroy< std::unique_ptr > (); break; case symbol_kind::S_act: // act case symbol_kind::S_setvar_action: // setvar_action value.template destroy< std::unique_ptr > (); break; case symbol_kind::S_variables: // variables case symbol_kind::S_variables_pre_process: // variables_pre_process case symbol_kind::S_variables_may_be_quoted: // variables_may_be_quoted value.template destroy< std::unique_ptr > > > (); break; case symbol_kind::S_actions: // actions case symbol_kind::S_actions_may_quoted: // actions_may_quoted value.template destroy< std::unique_ptr > > > (); break; default: break; } Base::clear (); } /// The user-facing name of this symbol. std::string name () const YY_NOEXCEPT { return seclang_parser::symbol_name (this->kind ()); } /// Backward compatibility (Bison 3.6). symbol_kind_type type_get () const YY_NOEXCEPT; /// Whether empty. bool empty () const YY_NOEXCEPT; /// Destructive move, \a s is emptied into this. void move (basic_symbol& s); /// The semantic value. semantic_type value; /// The location. location_type location; private: #if YY_CPLUSPLUS < 201103L /// Assignment operator. basic_symbol& operator= (const basic_symbol& that); #endif }; /// Type access provider for token (enum) based symbols. struct by_kind { /// Default constructor. by_kind (); #if 201103L <= YY_CPLUSPLUS /// Move constructor. by_kind (by_kind&& that); #endif /// Copy constructor. by_kind (const by_kind& that); /// The symbol kind as needed by the constructor. typedef token_kind_type kind_type; /// Constructor from (external) token numbers. by_kind (kind_type t); /// Record that this symbol is empty. void clear (); /// Steal the symbol kind from \a that. void move (by_kind& that); /// The (internal) type number (corresponding to \a type). /// \a empty when empty. symbol_kind_type kind () const YY_NOEXCEPT; /// Backward compatibility (Bison 3.6). symbol_kind_type type_get () const YY_NOEXCEPT; /// The symbol kind. /// \a S_YYEMPTY when empty. symbol_kind_type kind_; }; /// Backward compatibility for a private implementation detail (Bison 3.6). typedef by_kind by_type; /// "External" symbols: returned by the scanner. struct symbol_type : basic_symbol { /// Superclass. typedef basic_symbol super_type; /// Empty symbol. symbol_type () {} /// Constructor for valueless symbols, and symbols from each type. #if 201103L <= YY_CPLUSPLUS symbol_type (int tok, location_type l) : super_type(token_type (tok), std::move (l)) { YY_ASSERT (tok == token::TOK_END || tok == token::TOK_YYerror || tok == token::TOK_YYUNDEF || tok == token::TOK_COMMA || tok == token::TOK_CONFIG_CONTENT_INJECTION || tok == token::TOK_CONGIG_DIR_RESPONSE_BODY_MP_CLEAR || tok == token::TOK_PIPE || tok == token::TOK_NEW_LINE || tok == token::TOK_VAR_COUNT || tok == token::TOK_VAR_EXCLUSION || tok == token::TOK_VARIABLE_ARGS || tok == token::TOK_VARIABLE_ARGS_POST || tok == token::TOK_VARIABLE_ARGS_GET || tok == token::TOK_VARIABLE_FILES_SIZES || tok == token::TOK_VARIABLE_FILES_NAMES || tok == token::TOK_VARIABLE_FILES_TMP_CONTENT || tok == token::TOK_VARIABLE_MULTIPART_FILENAME || tok == token::TOK_VARIABLE_MULTIPART_NAME || tok == token::TOK_VARIABLE_MATCHED_VARS_NAMES || tok == token::TOK_VARIABLE_MATCHED_VARS || tok == token::TOK_VARIABLE_FILES || tok == token::TOK_VARIABLE_REQUEST_COOKIES || tok == token::TOK_VARIABLE_REQUEST_HEADERS || tok == token::TOK_VARIABLE_RESPONSE_HEADERS || tok == token::TOK_VARIABLE_GEO || tok == token::TOK_VARIABLE_REQUEST_COOKIES_NAMES || tok == token::TOK_VARIABLE_ARGS_COMBINED_SIZE || tok == token::TOK_VARIABLE_ARGS_GET_NAMES || tok == token::TOK_VARIABLE_RULE || tok == token::TOK_VARIABLE_ARGS_NAMES || tok == token::TOK_VARIABLE_ARGS_POST_NAMES || tok == token::TOK_VARIABLE_AUTH_TYPE || tok == token::TOK_VARIABLE_FILES_COMBINED_SIZE || tok == token::TOK_VARIABLE_FILES_TMP_NAMES || tok == token::TOK_VARIABLE_FULL_REQUEST || tok == token::TOK_VARIABLE_FULL_REQUEST_LENGTH || tok == token::TOK_VARIABLE_INBOUND_DATA_ERROR || tok == token::TOK_VARIABLE_MATCHED_VAR || tok == token::TOK_VARIABLE_MATCHED_VAR_NAME || tok == token::TOK_VARIABLE_MULTIPART_BOUNDARY_QUOTED || tok == token::TOK_VARIABLE_MULTIPART_BOUNDARY_WHITESPACE || tok == token::TOK_VARIABLE_MULTIPART_CRLF_LF_LINES || tok == token::TOK_VARIABLE_MULTIPART_DATA_AFTER || tok == token::TOK_VARIABLE_MULTIPART_DATA_BEFORE || tok == token::TOK_VARIABLE_MULTIPART_FILE_LIMIT_EXCEEDED || tok == token::TOK_VARIABLE_MULTIPART_HEADER_FOLDING || tok == token::TOK_VARIABLE_MULTIPART_INVALID_HEADER_FOLDING || tok == token::TOK_VARIABLE_MULTIPART_INVALID_PART || tok == token::TOK_VARIABLE_MULTIPART_INVALID_QUOTING || tok == token::TOK_VARIABLE_MULTIPART_LF_LINE || tok == token::TOK_VARIABLE_MULTIPART_MISSING_SEMICOLON || tok == token::TOK_VARIABLE_MULTIPART_SEMICOLON_MISSING || tok == token::TOK_VARIABLE_MULTIPART_STRICT_ERROR || tok == token::TOK_VARIABLE_MULTIPART_UNMATCHED_BOUNDARY || tok == token::TOK_VARIABLE_OUTBOUND_DATA_ERROR || tok == token::TOK_VARIABLE_PATH_INFO || tok == token::TOK_VARIABLE_QUERY_STRING || tok == token::TOK_VARIABLE_REMOTE_ADDR || tok == token::TOK_VARIABLE_REMOTE_HOST || tok == token::TOK_VARIABLE_REMOTE_PORT || tok == token::TOK_VARIABLE_REQBODY_ERROR_MSG || tok == token::TOK_VARIABLE_REQBODY_ERROR || tok == token::TOK_VARIABLE_REQBODY_PROCESSOR_ERROR_MSG || tok == token::TOK_VARIABLE_REQBODY_PROCESSOR_ERROR || tok == token::TOK_VARIABLE_REQBODY_PROCESSOR || tok == token::TOK_VARIABLE_REQUEST_BASENAME || tok == token::TOK_VARIABLE_REQUEST_BODY_LENGTH || tok == token::TOK_VARIABLE_REQUEST_BODY || tok == token::TOK_VARIABLE_REQUEST_FILE_NAME || tok == token::TOK_VARIABLE_REQUEST_HEADERS_NAMES || tok == token::TOK_VARIABLE_REQUEST_LINE || tok == token::TOK_VARIABLE_REQUEST_METHOD || tok == token::TOK_VARIABLE_REQUEST_PROTOCOL || tok == token::TOK_VARIABLE_REQUEST_URI_RAW || tok == token::TOK_VARIABLE_REQUEST_URI || tok == token::TOK_VARIABLE_RESOURCE || tok == token::TOK_VARIABLE_RESPONSE_BODY || tok == token::TOK_VARIABLE_RESPONSE_CONTENT_LENGTH || tok == token::TOK_VARIABLE_RESPONSE_CONTENT_TYPE || tok == token::TOK_VARIABLE_RESPONSE_HEADERS_NAMES || tok == token::TOK_VARIABLE_RESPONSE_PROTOCOL || tok == token::TOK_VARIABLE_RESPONSE_STATUS || tok == token::TOK_VARIABLE_SERVER_ADDR || tok == token::TOK_VARIABLE_SERVER_NAME || tok == token::TOK_VARIABLE_SERVER_PORT || tok == token::TOK_VARIABLE_SESSION_ID || tok == token::TOK_VARIABLE_UNIQUE_ID || tok == token::TOK_VARIABLE_URL_ENCODED_ERROR || tok == token::TOK_VARIABLE_USER_ID || tok == token::TOK_VARIABLE_WEB_APP_ID || tok == token::TOK_VARIABLE_STATUS || tok == token::TOK_VARIABLE_STATUS_LINE || tok == token::TOK_VARIABLE_IP || tok == token::TOK_VARIABLE_GLOBAL || tok == token::TOK_VARIABLE_TX || tok == token::TOK_VARIABLE_SESSION || tok == token::TOK_VARIABLE_USER || tok == token::TOK_RUN_TIME_VAR_ENV || tok == token::TOK_RUN_TIME_VAR_XML || tok == token::TOK_ACTION_SETVAR || tok == token::TOK_SETVAR_OPERATION_EQUALS || tok == token::TOK_SETVAR_OPERATION_EQUALS_PLUS || tok == token::TOK_SETVAR_OPERATION_EQUALS_MINUS || tok == token::TOK_NOT || tok == token::TOK_OPERATOR_BEGINS_WITH || tok == token::TOK_OPERATOR_CONTAINS || tok == token::TOK_OPERATOR_CONTAINS_WORD || tok == token::TOK_OPERATOR_DETECT_SQLI || tok == token::TOK_OPERATOR_DETECT_XSS || tok == token::TOK_OPERATOR_ENDS_WITH || tok == token::TOK_OPERATOR_EQ || tok == token::TOK_OPERATOR_FUZZY_HASH || tok == token::TOK_OPERATOR_GEOLOOKUP || tok == token::TOK_OPERATOR_GE || tok == token::TOK_OPERATOR_GSB_LOOKUP || tok == token::TOK_OPERATOR_GT || tok == token::TOK_OPERATOR_INSPECT_FILE || tok == token::TOK_OPERATOR_IP_MATCH_FROM_FILE || tok == token::TOK_OPERATOR_IP_MATCH || tok == token::TOK_OPERATOR_LE || tok == token::TOK_OPERATOR_LT || tok == token::TOK_OPERATOR_PM_FROM_FILE || tok == token::TOK_OPERATOR_PM || tok == token::TOK_OPERATOR_RBL || tok == token::TOK_OPERATOR_RSUB || tok == token::TOK_OPERATOR_RX_CONTENT_ONLY || tok == token::TOK_OPERATOR_RX || tok == token::TOK_OPERATOR_RX_GLOBAL || tok == token::TOK_OPERATOR_STR_EQ || tok == token::TOK_OPERATOR_STR_MATCH || tok == token::TOK_OPERATOR_UNCONDITIONAL_MATCH || tok == token::TOK_OPERATOR_VALIDATE_BYTE_RANGE || tok == token::TOK_OPERATOR_VALIDATE_DTD || tok == token::TOK_OPERATOR_VALIDATE_HASH || tok == token::TOK_OPERATOR_VALIDATE_SCHEMA || tok == token::TOK_OPERATOR_VALIDATE_URL_ENCODING || tok == token::TOK_OPERATOR_VALIDATE_UTF8_ENCODING || tok == token::TOK_OPERATOR_VERIFY_CC || tok == token::TOK_OPERATOR_VERIFY_CPF || tok == token::TOK_OPERATOR_VERIFY_SSN || tok == token::TOK_OPERATOR_VERIFY_SVNR || tok == token::TOK_OPERATOR_WITHIN || tok == token::TOK_CONFIG_DIR_AUDIT_LOG_FMT || tok == token::TOK_JSON || tok == token::TOK_NATIVE || tok == token::TOK_ACTION_CTL_RULE_ENGINE); } #else symbol_type (int tok, const location_type& l) : super_type(token_type (tok), l) { YY_ASSERT (tok == token::TOK_END || tok == token::TOK_YYerror || tok == token::TOK_YYUNDEF || tok == token::TOK_COMMA || tok == token::TOK_CONFIG_CONTENT_INJECTION || tok == token::TOK_CONGIG_DIR_RESPONSE_BODY_MP_CLEAR || tok == token::TOK_PIPE || tok == token::TOK_NEW_LINE || tok == token::TOK_VAR_COUNT || tok == token::TOK_VAR_EXCLUSION || tok == token::TOK_VARIABLE_ARGS || tok == token::TOK_VARIABLE_ARGS_POST || tok == token::TOK_VARIABLE_ARGS_GET || tok == token::TOK_VARIABLE_FILES_SIZES || tok == token::TOK_VARIABLE_FILES_NAMES || tok == token::TOK_VARIABLE_FILES_TMP_CONTENT || tok == token::TOK_VARIABLE_MULTIPART_FILENAME || tok == token::TOK_VARIABLE_MULTIPART_NAME || tok == token::TOK_VARIABLE_MATCHED_VARS_NAMES || tok == token::TOK_VARIABLE_MATCHED_VARS || tok == token::TOK_VARIABLE_FILES || tok == token::TOK_VARIABLE_REQUEST_COOKIES || tok == token::TOK_VARIABLE_REQUEST_HEADERS || tok == token::TOK_VARIABLE_RESPONSE_HEADERS || tok == token::TOK_VARIABLE_GEO || tok == token::TOK_VARIABLE_REQUEST_COOKIES_NAMES || tok == token::TOK_VARIABLE_ARGS_COMBINED_SIZE || tok == token::TOK_VARIABLE_ARGS_GET_NAMES || tok == token::TOK_VARIABLE_RULE || tok == token::TOK_VARIABLE_ARGS_NAMES || tok == token::TOK_VARIABLE_ARGS_POST_NAMES || tok == token::TOK_VARIABLE_AUTH_TYPE || tok == token::TOK_VARIABLE_FILES_COMBINED_SIZE || tok == token::TOK_VARIABLE_FILES_TMP_NAMES || tok == token::TOK_VARIABLE_FULL_REQUEST || tok == token::TOK_VARIABLE_FULL_REQUEST_LENGTH || tok == token::TOK_VARIABLE_INBOUND_DATA_ERROR || tok == token::TOK_VARIABLE_MATCHED_VAR || tok == token::TOK_VARIABLE_MATCHED_VAR_NAME || tok == token::TOK_VARIABLE_MULTIPART_BOUNDARY_QUOTED || tok == token::TOK_VARIABLE_MULTIPART_BOUNDARY_WHITESPACE || tok == token::TOK_VARIABLE_MULTIPART_CRLF_LF_LINES || tok == token::TOK_VARIABLE_MULTIPART_DATA_AFTER || tok == token::TOK_VARIABLE_MULTIPART_DATA_BEFORE || tok == token::TOK_VARIABLE_MULTIPART_FILE_LIMIT_EXCEEDED || tok == token::TOK_VARIABLE_MULTIPART_HEADER_FOLDING || tok == token::TOK_VARIABLE_MULTIPART_INVALID_HEADER_FOLDING || tok == token::TOK_VARIABLE_MULTIPART_INVALID_PART || tok == token::TOK_VARIABLE_MULTIPART_INVALID_QUOTING || tok == token::TOK_VARIABLE_MULTIPART_LF_LINE || tok == token::TOK_VARIABLE_MULTIPART_MISSING_SEMICOLON || tok == token::TOK_VARIABLE_MULTIPART_SEMICOLON_MISSING || tok == token::TOK_VARIABLE_MULTIPART_STRICT_ERROR || tok == token::TOK_VARIABLE_MULTIPART_UNMATCHED_BOUNDARY || tok == token::TOK_VARIABLE_OUTBOUND_DATA_ERROR || tok == token::TOK_VARIABLE_PATH_INFO || tok == token::TOK_VARIABLE_QUERY_STRING || tok == token::TOK_VARIABLE_REMOTE_ADDR || tok == token::TOK_VARIABLE_REMOTE_HOST || tok == token::TOK_VARIABLE_REMOTE_PORT || tok == token::TOK_VARIABLE_REQBODY_ERROR_MSG || tok == token::TOK_VARIABLE_REQBODY_ERROR || tok == token::TOK_VARIABLE_REQBODY_PROCESSOR_ERROR_MSG || tok == token::TOK_VARIABLE_REQBODY_PROCESSOR_ERROR || tok == token::TOK_VARIABLE_REQBODY_PROCESSOR || tok == token::TOK_VARIABLE_REQUEST_BASENAME || tok == token::TOK_VARIABLE_REQUEST_BODY_LENGTH || tok == token::TOK_VARIABLE_REQUEST_BODY || tok == token::TOK_VARIABLE_REQUEST_FILE_NAME || tok == token::TOK_VARIABLE_REQUEST_HEADERS_NAMES || tok == token::TOK_VARIABLE_REQUEST_LINE || tok == token::TOK_VARIABLE_REQUEST_METHOD || tok == token::TOK_VARIABLE_REQUEST_PROTOCOL || tok == token::TOK_VARIABLE_REQUEST_URI_RAW || tok == token::TOK_VARIABLE_REQUEST_URI || tok == token::TOK_VARIABLE_RESOURCE || tok == token::TOK_VARIABLE_RESPONSE_BODY || tok == token::TOK_VARIABLE_RESPONSE_CONTENT_LENGTH || tok == token::TOK_VARIABLE_RESPONSE_CONTENT_TYPE || tok == token::TOK_VARIABLE_RESPONSE_HEADERS_NAMES || tok == token::TOK_VARIABLE_RESPONSE_PROTOCOL || tok == token::TOK_VARIABLE_RESPONSE_STATUS || tok == token::TOK_VARIABLE_SERVER_ADDR || tok == token::TOK_VARIABLE_SERVER_NAME || tok == token::TOK_VARIABLE_SERVER_PORT || tok == token::TOK_VARIABLE_SESSION_ID || tok == token::TOK_VARIABLE_UNIQUE_ID || tok == token::TOK_VARIABLE_URL_ENCODED_ERROR || tok == token::TOK_VARIABLE_USER_ID || tok == token::TOK_VARIABLE_WEB_APP_ID || tok == token::TOK_VARIABLE_STATUS || tok == token::TOK_VARIABLE_STATUS_LINE || tok == token::TOK_VARIABLE_IP || tok == token::TOK_VARIABLE_GLOBAL || tok == token::TOK_VARIABLE_TX || tok == token::TOK_VARIABLE_SESSION || tok == token::TOK_VARIABLE_USER || tok == token::TOK_RUN_TIME_VAR_ENV || tok == token::TOK_RUN_TIME_VAR_XML || tok == token::TOK_ACTION_SETVAR || tok == token::TOK_SETVAR_OPERATION_EQUALS || tok == token::TOK_SETVAR_OPERATION_EQUALS_PLUS || tok == token::TOK_SETVAR_OPERATION_EQUALS_MINUS || tok == token::TOK_NOT || tok == token::TOK_OPERATOR_BEGINS_WITH || tok == token::TOK_OPERATOR_CONTAINS || tok == token::TOK_OPERATOR_CONTAINS_WORD || tok == token::TOK_OPERATOR_DETECT_SQLI || tok == token::TOK_OPERATOR_DETECT_XSS || tok == token::TOK_OPERATOR_ENDS_WITH || tok == token::TOK_OPERATOR_EQ || tok == token::TOK_OPERATOR_FUZZY_HASH || tok == token::TOK_OPERATOR_GEOLOOKUP || tok == token::TOK_OPERATOR_GE || tok == token::TOK_OPERATOR_GSB_LOOKUP || tok == token::TOK_OPERATOR_GT || tok == token::TOK_OPERATOR_INSPECT_FILE || tok == token::TOK_OPERATOR_IP_MATCH_FROM_FILE || tok == token::TOK_OPERATOR_IP_MATCH || tok == token::TOK_OPERATOR_LE || tok == token::TOK_OPERATOR_LT || tok == token::TOK_OPERATOR_PM_FROM_FILE || tok == token::TOK_OPERATOR_PM || tok == token::TOK_OPERATOR_RBL || tok == token::TOK_OPERATOR_RSUB || tok == token::TOK_OPERATOR_RX_CONTENT_ONLY || tok == token::TOK_OPERATOR_RX || tok == token::TOK_OPERATOR_RX_GLOBAL || tok == token::TOK_OPERATOR_STR_EQ || tok == token::TOK_OPERATOR_STR_MATCH || tok == token::TOK_OPERATOR_UNCONDITIONAL_MATCH || tok == token::TOK_OPERATOR_VALIDATE_BYTE_RANGE || tok == token::TOK_OPERATOR_VALIDATE_DTD || tok == token::TOK_OPERATOR_VALIDATE_HASH || tok == token::TOK_OPERATOR_VALIDATE_SCHEMA || tok == token::TOK_OPERATOR_VALIDATE_URL_ENCODING || tok == token::TOK_OPERATOR_VALIDATE_UTF8_ENCODING || tok == token::TOK_OPERATOR_VERIFY_CC || tok == token::TOK_OPERATOR_VERIFY_CPF || tok == token::TOK_OPERATOR_VERIFY_SSN || tok == token::TOK_OPERATOR_VERIFY_SVNR || tok == token::TOK_OPERATOR_WITHIN || tok == token::TOK_CONFIG_DIR_AUDIT_LOG_FMT || tok == token::TOK_JSON || tok == token::TOK_NATIVE || tok == token::TOK_ACTION_CTL_RULE_ENGINE); } #endif #if 201103L <= YY_CPLUSPLUS symbol_type (int tok, std::string v, location_type l) : super_type(token_type (tok), std::move (v), std::move (l)) { YY_ASSERT (tok == token::TOK_ACTION_ACCURACY || tok == token::TOK_ACTION_ALLOW || tok == token::TOK_ACTION_APPEND || tok == token::TOK_ACTION_AUDIT_LOG || tok == token::TOK_ACTION_BLOCK || tok == token::TOK_ACTION_CAPTURE || tok == token::TOK_ACTION_CHAIN || tok == token::TOK_ACTION_CTL_AUDIT_ENGINE || tok == token::TOK_ACTION_CTL_AUDIT_LOG_PARTS || tok == token::TOK_ACTION_CTL_BDY_JSON || tok == token::TOK_ACTION_CTL_BDY_XML || tok == token::TOK_ACTION_CTL_BDY_URLENCODED || tok == token::TOK_ACTION_CTL_FORCE_REQ_BODY_VAR || tok == token::TOK_ACTION_CTL_REQUEST_BODY_ACCESS || tok == token::TOK_ACTION_CTL_RULE_REMOVE_BY_ID || tok == token::TOK_ACTION_CTL_RULE_REMOVE_BY_TAG || tok == token::TOK_ACTION_CTL_RULE_REMOVE_TARGET_BY_ID || tok == token::TOK_ACTION_CTL_RULE_REMOVE_TARGET_BY_TAG || tok == token::TOK_ACTION_DENY || tok == token::TOK_ACTION_DEPRECATE_VAR || tok == token::TOK_ACTION_DROP || tok == token::TOK_ACTION_EXEC || tok == token::TOK_ACTION_EXPIRE_VAR || tok == token::TOK_ACTION_ID || tok == token::TOK_ACTION_INITCOL || tok == token::TOK_ACTION_LOG || tok == token::TOK_ACTION_LOG_DATA || tok == token::TOK_ACTION_MATURITY || tok == token::TOK_ACTION_MSG || tok == token::TOK_ACTION_MULTI_MATCH || tok == token::TOK_ACTION_NO_AUDIT_LOG || tok == token::TOK_ACTION_NO_LOG || tok == token::TOK_ACTION_PASS || tok == token::TOK_ACTION_PAUSE || tok == token::TOK_ACTION_PHASE || tok == token::TOK_ACTION_PREPEND || tok == token::TOK_ACTION_PROXY || tok == token::TOK_ACTION_REDIRECT || tok == token::TOK_ACTION_REV || tok == token::TOK_ACTION_SANITISE_ARG || tok == token::TOK_ACTION_SANITISE_MATCHED || tok == token::TOK_ACTION_SANITISE_MATCHED_BYTES || tok == token::TOK_ACTION_SANITISE_REQUEST_HEADER || tok == token::TOK_ACTION_SANITISE_RESPONSE_HEADER || tok == token::TOK_ACTION_SETENV || tok == token::TOK_ACTION_SETRSC || tok == token::TOK_ACTION_SETSID || tok == token::TOK_ACTION_SETUID || tok == token::TOK_ACTION_SEVERITY || tok == token::TOK_ACTION_SKIP || tok == token::TOK_ACTION_SKIP_AFTER || tok == token::TOK_ACTION_STATUS || tok == token::TOK_ACTION_TAG || tok == token::TOK_ACTION_TRANSFORMATION_BASE_64_ENCODE || tok == token::TOK_ACTION_TRANSFORMATION_BASE_64_DECODE || tok == token::TOK_ACTION_TRANSFORMATION_BASE_64_DECODE_EXT || tok == token::TOK_ACTION_TRANSFORMATION_CMD_LINE || tok == token::TOK_ACTION_TRANSFORMATION_COMPRESS_WHITESPACE || tok == token::TOK_ACTION_TRANSFORMATION_CSS_DECODE || tok == token::TOK_ACTION_TRANSFORMATION_ESCAPE_SEQ_DECODE || tok == token::TOK_ACTION_TRANSFORMATION_HEX_ENCODE || tok == token::TOK_ACTION_TRANSFORMATION_HEX_DECODE || tok == token::TOK_ACTION_TRANSFORMATION_HTML_ENTITY_DECODE || tok == token::TOK_ACTION_TRANSFORMATION_JS_DECODE || tok == token::TOK_ACTION_TRANSFORMATION_LENGTH || tok == token::TOK_ACTION_TRANSFORMATION_LOWERCASE || tok == token::TOK_ACTION_TRANSFORMATION_MD5 || tok == token::TOK_ACTION_TRANSFORMATION_NONE || tok == token::TOK_ACTION_TRANSFORMATION_NORMALISE_PATH || tok == token::TOK_ACTION_TRANSFORMATION_NORMALISE_PATH_WIN || tok == token::TOK_ACTION_TRANSFORMATION_PARITY_EVEN_7_BIT || tok == token::TOK_ACTION_TRANSFORMATION_PARITY_ODD_7_BIT || tok == token::TOK_ACTION_TRANSFORMATION_PARITY_ZERO_7_BIT || tok == token::TOK_ACTION_TRANSFORMATION_REMOVE_COMMENTS || tok == token::TOK_ACTION_TRANSFORMATION_REMOVE_COMMENTS_CHAR || tok == token::TOK_ACTION_TRANSFORMATION_REMOVE_NULLS || tok == token::TOK_ACTION_TRANSFORMATION_REMOVE_WHITESPACE || tok == token::TOK_ACTION_TRANSFORMATION_REPLACE_COMMENTS || tok == token::TOK_ACTION_TRANSFORMATION_REPLACE_NULLS || tok == token::TOK_ACTION_TRANSFORMATION_SHA1 || tok == token::TOK_ACTION_TRANSFORMATION_SQL_HEX_DECODE || tok == token::TOK_ACTION_TRANSFORMATION_TRIM || tok == token::TOK_ACTION_TRANSFORMATION_TRIM_LEFT || tok == token::TOK_ACTION_TRANSFORMATION_TRIM_RIGHT || tok == token::TOK_ACTION_TRANSFORMATION_UPPERCASE || tok == token::TOK_ACTION_TRANSFORMATION_URL_ENCODE || tok == token::TOK_ACTION_TRANSFORMATION_URL_DECODE || tok == token::TOK_ACTION_TRANSFORMATION_URL_DECODE_UNI || tok == token::TOK_ACTION_TRANSFORMATION_UTF8_TO_UNICODE || tok == token::TOK_ACTION_VER || tok == token::TOK_ACTION_XMLNS || tok == token::TOK_CONFIG_COMPONENT_SIG || tok == token::TOK_CONFIG_CONN_ENGINE || tok == token::TOK_CONFIG_SEC_ARGUMENT_SEPARATOR || tok == token::TOK_CONFIG_SEC_WEB_APP_ID || tok == token::TOK_CONFIG_SEC_SERVER_SIG || tok == token::TOK_CONFIG_DIR_AUDIT_DIR || tok == token::TOK_CONFIG_DIR_AUDIT_DIR_MOD || tok == token::TOK_CONFIG_DIR_AUDIT_ENG || tok == token::TOK_CONFIG_DIR_AUDIT_FLE_MOD || tok == token::TOK_CONFIG_DIR_AUDIT_LOG || tok == token::TOK_CONFIG_DIR_AUDIT_LOG2 || tok == token::TOK_CONFIG_DIR_AUDIT_LOG_P || tok == token::TOK_CONFIG_DIR_AUDIT_STS || tok == token::TOK_CONFIG_DIR_AUDIT_TPE || tok == token::TOK_CONFIG_DIR_DEBUG_LOG || tok == token::TOK_CONFIG_DIR_DEBUG_LVL || tok == token::TOK_CONFIG_SEC_CACHE_TRANSFORMATIONS || tok == token::TOK_CONFIG_SEC_DISABLE_BACKEND_COMPRESS || tok == token::TOK_CONFIG_SEC_HASH_ENGINE || tok == token::TOK_CONFIG_SEC_HASH_KEY || tok == token::TOK_CONFIG_SEC_HASH_PARAM || tok == token::TOK_CONFIG_SEC_HASH_METHOD_RX || tok == token::TOK_CONFIG_SEC_HASH_METHOD_PM || tok == token::TOK_CONFIG_SEC_CHROOT_DIR || tok == token::TOK_CONFIG_DIR_GEO_DB || tok == token::TOK_CONFIG_DIR_GSB_DB || tok == token::TOK_CONFIG_SEC_GUARDIAN_LOG || tok == token::TOK_CONFIG_DIR_PCRE_MATCH_LIMIT || tok == token::TOK_CONFIG_DIR_PCRE_MATCH_LIMIT_RECURSION || tok == token::TOK_CONFIG_SEC_CONN_R_STATE_LIMIT || tok == token::TOK_CONFIG_SEC_CONN_W_STATE_LIMIT || tok == token::TOK_CONFIG_SEC_SENSOR_ID || tok == token::TOK_CONFIG_DIR_ARGS_LIMIT || tok == token::TOK_CONFIG_DIR_REQ_BODY_JSON_DEPTH_LIMIT || tok == token::TOK_CONFIG_DIR_REQ_BODY || tok == token::TOK_CONFIG_DIR_REQ_BODY_IN_MEMORY_LIMIT || tok == token::TOK_CONFIG_DIR_REQ_BODY_LIMIT || tok == token::TOK_CONFIG_DIR_REQ_BODY_LIMIT_ACTION || tok == token::TOK_CONFIG_DIR_REQ_BODY_NO_FILES_LIMIT || tok == token::TOK_CONFIG_DIR_RES_BODY || tok == token::TOK_CONFIG_DIR_RES_BODY_LIMIT || tok == token::TOK_CONFIG_DIR_RES_BODY_LIMIT_ACTION || tok == token::TOK_CONFIG_SEC_RULE_INHERITANCE || tok == token::TOK_CONFIG_SEC_RULE_PERF_TIME || tok == token::TOK_CONFIG_DIR_RULE_ENG || tok == token::TOK_CONFIG_DIR_SEC_ACTION || tok == token::TOK_CONFIG_DIR_SEC_DEFAULT_ACTION || tok == token::TOK_CONFIG_DIR_SEC_MARKER || tok == token::TOK_CONFIG_DIR_UNICODE_MAP_FILE || tok == token::TOK_CONFIG_DIR_UNICODE_CODE_PAGE || tok == token::TOK_CONFIG_SEC_COLLECTION_TIMEOUT || tok == token::TOK_CONFIG_SEC_HTTP_BLKEY || tok == token::TOK_CONFIG_SEC_INTERCEPT_ON_ERROR || tok == token::TOK_CONFIG_SEC_REMOTE_RULES_FAIL_ACTION || tok == token::TOK_CONFIG_SEC_RULE_REMOVE_BY_ID || tok == token::TOK_CONFIG_SEC_RULE_REMOVE_BY_MSG || tok == token::TOK_CONFIG_SEC_RULE_REMOVE_BY_TAG || tok == token::TOK_CONFIG_SEC_RULE_UPDATE_TARGET_BY_TAG || tok == token::TOK_CONFIG_SEC_RULE_UPDATE_TARGET_BY_MSG || tok == token::TOK_CONFIG_SEC_RULE_UPDATE_TARGET_BY_ID || tok == token::TOK_CONFIG_SEC_RULE_UPDATE_ACTION_BY_ID || tok == token::TOK_CONFIG_UPDLOAD_KEEP_FILES || tok == token::TOK_CONFIG_UPDLOAD_SAVE_TMP_FILES || tok == token::TOK_CONFIG_UPLOAD_DIR || tok == token::TOK_CONFIG_UPLOAD_FILE_LIMIT || tok == token::TOK_CONFIG_UPLOAD_FILE_MODE || tok == token::TOK_CONFIG_VALUE_ABORT || tok == token::TOK_CONFIG_VALUE_DETC || tok == token::TOK_CONFIG_VALUE_HTTPS || tok == token::TOK_CONFIG_VALUE_OFF || tok == token::TOK_CONFIG_VALUE_ON || tok == token::TOK_CONFIG_VALUE_PARALLEL || tok == token::TOK_CONFIG_VALUE_PROCESS_PARTIAL || tok == token::TOK_CONFIG_VALUE_REJECT || tok == token::TOK_CONFIG_VALUE_RELEVANT_ONLY || tok == token::TOK_CONFIG_VALUE_SERIAL || tok == token::TOK_CONFIG_VALUE_WARN || tok == token::TOK_CONFIG_XML_EXTERNAL_ENTITY || tok == token::TOK_CONGIG_DIR_RESPONSE_BODY_MP || tok == token::TOK_CONGIG_DIR_SEC_ARG_SEP || tok == token::TOK_CONGIG_DIR_SEC_COOKIE_FORMAT || tok == token::TOK_CONFIG_SEC_COOKIEV0_SEPARATOR || tok == token::TOK_CONGIG_DIR_SEC_DATA_DIR || tok == token::TOK_CONGIG_DIR_SEC_STATUS_ENGINE || tok == token::TOK_CONFIG_SEC_STREAM_IN_BODY_INSPECTION || tok == token::TOK_CONFIG_SEC_STREAM_OUT_BODY_INSPECTION || tok == token::TOK_CONGIG_DIR_SEC_TMP_DIR || tok == token::TOK_DIRECTIVE || tok == token::TOK_DIRECTIVE_SECRULESCRIPT || tok == token::TOK_FREE_TEXT_QUOTE_MACRO_EXPANSION || tok == token::TOK_QUOTATION_MARK || tok == token::TOK_RUN_TIME_VAR_BLD || tok == token::TOK_RUN_TIME_VAR_DUR || tok == token::TOK_RUN_TIME_VAR_HSV || tok == token::TOK_RUN_TIME_VAR_REMOTE_USER || tok == token::TOK_RUN_TIME_VAR_TIME || tok == token::TOK_RUN_TIME_VAR_TIME_DAY || tok == token::TOK_RUN_TIME_VAR_TIME_EPOCH || tok == token::TOK_RUN_TIME_VAR_TIME_HOUR || tok == token::TOK_RUN_TIME_VAR_TIME_MIN || tok == token::TOK_RUN_TIME_VAR_TIME_MON || tok == token::TOK_RUN_TIME_VAR_TIME_SEC || tok == token::TOK_RUN_TIME_VAR_TIME_WDAY || tok == token::TOK_RUN_TIME_VAR_TIME_YEAR || tok == token::TOK_VARIABLE || tok == token::TOK_DICT_ELEMENT || tok == token::TOK_DICT_ELEMENT_REGEXP); } #else symbol_type (int tok, const std::string& v, const location_type& l) : super_type(token_type (tok), v, l) { YY_ASSERT (tok == token::TOK_ACTION_ACCURACY || tok == token::TOK_ACTION_ALLOW || tok == token::TOK_ACTION_APPEND || tok == token::TOK_ACTION_AUDIT_LOG || tok == token::TOK_ACTION_BLOCK || tok == token::TOK_ACTION_CAPTURE || tok == token::TOK_ACTION_CHAIN || tok == token::TOK_ACTION_CTL_AUDIT_ENGINE || tok == token::TOK_ACTION_CTL_AUDIT_LOG_PARTS || tok == token::TOK_ACTION_CTL_BDY_JSON || tok == token::TOK_ACTION_CTL_BDY_XML || tok == token::TOK_ACTION_CTL_BDY_URLENCODED || tok == token::TOK_ACTION_CTL_FORCE_REQ_BODY_VAR || tok == token::TOK_ACTION_CTL_REQUEST_BODY_ACCESS || tok == token::TOK_ACTION_CTL_RULE_REMOVE_BY_ID || tok == token::TOK_ACTION_CTL_RULE_REMOVE_BY_TAG || tok == token::TOK_ACTION_CTL_RULE_REMOVE_TARGET_BY_ID || tok == token::TOK_ACTION_CTL_RULE_REMOVE_TARGET_BY_TAG || tok == token::TOK_ACTION_DENY || tok == token::TOK_ACTION_DEPRECATE_VAR || tok == token::TOK_ACTION_DROP || tok == token::TOK_ACTION_EXEC || tok == token::TOK_ACTION_EXPIRE_VAR || tok == token::TOK_ACTION_ID || tok == token::TOK_ACTION_INITCOL || tok == token::TOK_ACTION_LOG || tok == token::TOK_ACTION_LOG_DATA || tok == token::TOK_ACTION_MATURITY || tok == token::TOK_ACTION_MSG || tok == token::TOK_ACTION_MULTI_MATCH || tok == token::TOK_ACTION_NO_AUDIT_LOG || tok == token::TOK_ACTION_NO_LOG || tok == token::TOK_ACTION_PASS || tok == token::TOK_ACTION_PAUSE || tok == token::TOK_ACTION_PHASE || tok == token::TOK_ACTION_PREPEND || tok == token::TOK_ACTION_PROXY || tok == token::TOK_ACTION_REDIRECT || tok == token::TOK_ACTION_REV || tok == token::TOK_ACTION_SANITISE_ARG || tok == token::TOK_ACTION_SANITISE_MATCHED || tok == token::TOK_ACTION_SANITISE_MATCHED_BYTES || tok == token::TOK_ACTION_SANITISE_REQUEST_HEADER || tok == token::TOK_ACTION_SANITISE_RESPONSE_HEADER || tok == token::TOK_ACTION_SETENV || tok == token::TOK_ACTION_SETRSC || tok == token::TOK_ACTION_SETSID || tok == token::TOK_ACTION_SETUID || tok == token::TOK_ACTION_SEVERITY || tok == token::TOK_ACTION_SKIP || tok == token::TOK_ACTION_SKIP_AFTER || tok == token::TOK_ACTION_STATUS || tok == token::TOK_ACTION_TAG || tok == token::TOK_ACTION_TRANSFORMATION_BASE_64_ENCODE || tok == token::TOK_ACTION_TRANSFORMATION_BASE_64_DECODE || tok == token::TOK_ACTION_TRANSFORMATION_BASE_64_DECODE_EXT || tok == token::TOK_ACTION_TRANSFORMATION_CMD_LINE || tok == token::TOK_ACTION_TRANSFORMATION_COMPRESS_WHITESPACE || tok == token::TOK_ACTION_TRANSFORMATION_CSS_DECODE || tok == token::TOK_ACTION_TRANSFORMATION_ESCAPE_SEQ_DECODE || tok == token::TOK_ACTION_TRANSFORMATION_HEX_ENCODE || tok == token::TOK_ACTION_TRANSFORMATION_HEX_DECODE || tok == token::TOK_ACTION_TRANSFORMATION_HTML_ENTITY_DECODE || tok == token::TOK_ACTION_TRANSFORMATION_JS_DECODE || tok == token::TOK_ACTION_TRANSFORMATION_LENGTH || tok == token::TOK_ACTION_TRANSFORMATION_LOWERCASE || tok == token::TOK_ACTION_TRANSFORMATION_MD5 || tok == token::TOK_ACTION_TRANSFORMATION_NONE || tok == token::TOK_ACTION_TRANSFORMATION_NORMALISE_PATH || tok == token::TOK_ACTION_TRANSFORMATION_NORMALISE_PATH_WIN || tok == token::TOK_ACTION_TRANSFORMATION_PARITY_EVEN_7_BIT || tok == token::TOK_ACTION_TRANSFORMATION_PARITY_ODD_7_BIT || tok == token::TOK_ACTION_TRANSFORMATION_PARITY_ZERO_7_BIT || tok == token::TOK_ACTION_TRANSFORMATION_REMOVE_COMMENTS || tok == token::TOK_ACTION_TRANSFORMATION_REMOVE_COMMENTS_CHAR || tok == token::TOK_ACTION_TRANSFORMATION_REMOVE_NULLS || tok == token::TOK_ACTION_TRANSFORMATION_REMOVE_WHITESPACE || tok == token::TOK_ACTION_TRANSFORMATION_REPLACE_COMMENTS || tok == token::TOK_ACTION_TRANSFORMATION_REPLACE_NULLS || tok == token::TOK_ACTION_TRANSFORMATION_SHA1 || tok == token::TOK_ACTION_TRANSFORMATION_SQL_HEX_DECODE || tok == token::TOK_ACTION_TRANSFORMATION_TRIM || tok == token::TOK_ACTION_TRANSFORMATION_TRIM_LEFT || tok == token::TOK_ACTION_TRANSFORMATION_TRIM_RIGHT || tok == token::TOK_ACTION_TRANSFORMATION_UPPERCASE || tok == token::TOK_ACTION_TRANSFORMATION_URL_ENCODE || tok == token::TOK_ACTION_TRANSFORMATION_URL_DECODE || tok == token::TOK_ACTION_TRANSFORMATION_URL_DECODE_UNI || tok == token::TOK_ACTION_TRANSFORMATION_UTF8_TO_UNICODE || tok == token::TOK_ACTION_VER || tok == token::TOK_ACTION_XMLNS || tok == token::TOK_CONFIG_COMPONENT_SIG || tok == token::TOK_CONFIG_CONN_ENGINE || tok == token::TOK_CONFIG_SEC_ARGUMENT_SEPARATOR || tok == token::TOK_CONFIG_SEC_WEB_APP_ID || tok == token::TOK_CONFIG_SEC_SERVER_SIG || tok == token::TOK_CONFIG_DIR_AUDIT_DIR || tok == token::TOK_CONFIG_DIR_AUDIT_DIR_MOD || tok == token::TOK_CONFIG_DIR_AUDIT_ENG || tok == token::TOK_CONFIG_DIR_AUDIT_FLE_MOD || tok == token::TOK_CONFIG_DIR_AUDIT_LOG || tok == token::TOK_CONFIG_DIR_AUDIT_LOG2 || tok == token::TOK_CONFIG_DIR_AUDIT_LOG_P || tok == token::TOK_CONFIG_DIR_AUDIT_STS || tok == token::TOK_CONFIG_DIR_AUDIT_TPE || tok == token::TOK_CONFIG_DIR_DEBUG_LOG || tok == token::TOK_CONFIG_DIR_DEBUG_LVL || tok == token::TOK_CONFIG_SEC_CACHE_TRANSFORMATIONS || tok == token::TOK_CONFIG_SEC_DISABLE_BACKEND_COMPRESS || tok == token::TOK_CONFIG_SEC_HASH_ENGINE || tok == token::TOK_CONFIG_SEC_HASH_KEY || tok == token::TOK_CONFIG_SEC_HASH_PARAM || tok == token::TOK_CONFIG_SEC_HASH_METHOD_RX || tok == token::TOK_CONFIG_SEC_HASH_METHOD_PM || tok == token::TOK_CONFIG_SEC_CHROOT_DIR || tok == token::TOK_CONFIG_DIR_GEO_DB || tok == token::TOK_CONFIG_DIR_GSB_DB || tok == token::TOK_CONFIG_SEC_GUARDIAN_LOG || tok == token::TOK_CONFIG_DIR_PCRE_MATCH_LIMIT || tok == token::TOK_CONFIG_DIR_PCRE_MATCH_LIMIT_RECURSION || tok == token::TOK_CONFIG_SEC_CONN_R_STATE_LIMIT || tok == token::TOK_CONFIG_SEC_CONN_W_STATE_LIMIT || tok == token::TOK_CONFIG_SEC_SENSOR_ID || tok == token::TOK_CONFIG_DIR_ARGS_LIMIT || tok == token::TOK_CONFIG_DIR_REQ_BODY_JSON_DEPTH_LIMIT || tok == token::TOK_CONFIG_DIR_REQ_BODY || tok == token::TOK_CONFIG_DIR_REQ_BODY_IN_MEMORY_LIMIT || tok == token::TOK_CONFIG_DIR_REQ_BODY_LIMIT || tok == token::TOK_CONFIG_DIR_REQ_BODY_LIMIT_ACTION || tok == token::TOK_CONFIG_DIR_REQ_BODY_NO_FILES_LIMIT || tok == token::TOK_CONFIG_DIR_RES_BODY || tok == token::TOK_CONFIG_DIR_RES_BODY_LIMIT || tok == token::TOK_CONFIG_DIR_RES_BODY_LIMIT_ACTION || tok == token::TOK_CONFIG_SEC_RULE_INHERITANCE || tok == token::TOK_CONFIG_SEC_RULE_PERF_TIME || tok == token::TOK_CONFIG_DIR_RULE_ENG || tok == token::TOK_CONFIG_DIR_SEC_ACTION || tok == token::TOK_CONFIG_DIR_SEC_DEFAULT_ACTION || tok == token::TOK_CONFIG_DIR_SEC_MARKER || tok == token::TOK_CONFIG_DIR_UNICODE_MAP_FILE || tok == token::TOK_CONFIG_DIR_UNICODE_CODE_PAGE || tok == token::TOK_CONFIG_SEC_COLLECTION_TIMEOUT || tok == token::TOK_CONFIG_SEC_HTTP_BLKEY || tok == token::TOK_CONFIG_SEC_INTERCEPT_ON_ERROR || tok == token::TOK_CONFIG_SEC_REMOTE_RULES_FAIL_ACTION || tok == token::TOK_CONFIG_SEC_RULE_REMOVE_BY_ID || tok == token::TOK_CONFIG_SEC_RULE_REMOVE_BY_MSG || tok == token::TOK_CONFIG_SEC_RULE_REMOVE_BY_TAG || tok == token::TOK_CONFIG_SEC_RULE_UPDATE_TARGET_BY_TAG || tok == token::TOK_CONFIG_SEC_RULE_UPDATE_TARGET_BY_MSG || tok == token::TOK_CONFIG_SEC_RULE_UPDATE_TARGET_BY_ID || tok == token::TOK_CONFIG_SEC_RULE_UPDATE_ACTION_BY_ID || tok == token::TOK_CONFIG_UPDLOAD_KEEP_FILES || tok == token::TOK_CONFIG_UPDLOAD_SAVE_TMP_FILES || tok == token::TOK_CONFIG_UPLOAD_DIR || tok == token::TOK_CONFIG_UPLOAD_FILE_LIMIT || tok == token::TOK_CONFIG_UPLOAD_FILE_MODE || tok == token::TOK_CONFIG_VALUE_ABORT || tok == token::TOK_CONFIG_VALUE_DETC || tok == token::TOK_CONFIG_VALUE_HTTPS || tok == token::TOK_CONFIG_VALUE_OFF || tok == token::TOK_CONFIG_VALUE_ON || tok == token::TOK_CONFIG_VALUE_PARALLEL || tok == token::TOK_CONFIG_VALUE_PROCESS_PARTIAL || tok == token::TOK_CONFIG_VALUE_REJECT || tok == token::TOK_CONFIG_VALUE_RELEVANT_ONLY || tok == token::TOK_CONFIG_VALUE_SERIAL || tok == token::TOK_CONFIG_VALUE_WARN || tok == token::TOK_CONFIG_XML_EXTERNAL_ENTITY || tok == token::TOK_CONGIG_DIR_RESPONSE_BODY_MP || tok == token::TOK_CONGIG_DIR_SEC_ARG_SEP || tok == token::TOK_CONGIG_DIR_SEC_COOKIE_FORMAT || tok == token::TOK_CONFIG_SEC_COOKIEV0_SEPARATOR || tok == token::TOK_CONGIG_DIR_SEC_DATA_DIR || tok == token::TOK_CONGIG_DIR_SEC_STATUS_ENGINE || tok == token::TOK_CONFIG_SEC_STREAM_IN_BODY_INSPECTION || tok == token::TOK_CONFIG_SEC_STREAM_OUT_BODY_INSPECTION || tok == token::TOK_CONGIG_DIR_SEC_TMP_DIR || tok == token::TOK_DIRECTIVE || tok == token::TOK_DIRECTIVE_SECRULESCRIPT || tok == token::TOK_FREE_TEXT_QUOTE_MACRO_EXPANSION || tok == token::TOK_QUOTATION_MARK || tok == token::TOK_RUN_TIME_VAR_BLD || tok == token::TOK_RUN_TIME_VAR_DUR || tok == token::TOK_RUN_TIME_VAR_HSV || tok == token::TOK_RUN_TIME_VAR_REMOTE_USER || tok == token::TOK_RUN_TIME_VAR_TIME || tok == token::TOK_RUN_TIME_VAR_TIME_DAY || tok == token::TOK_RUN_TIME_VAR_TIME_EPOCH || tok == token::TOK_RUN_TIME_VAR_TIME_HOUR || tok == token::TOK_RUN_TIME_VAR_TIME_MIN || tok == token::TOK_RUN_TIME_VAR_TIME_MON || tok == token::TOK_RUN_TIME_VAR_TIME_SEC || tok == token::TOK_RUN_TIME_VAR_TIME_WDAY || tok == token::TOK_RUN_TIME_VAR_TIME_YEAR || tok == token::TOK_VARIABLE || tok == token::TOK_DICT_ELEMENT || tok == token::TOK_DICT_ELEMENT_REGEXP); } #endif }; /// Build a parser object. seclang_parser (modsecurity::Parser::Driver& driver_yyarg); virtual ~seclang_parser (); #if 201103L <= YY_CPLUSPLUS /// Non copyable. seclang_parser (const seclang_parser&) = delete; /// Non copyable. seclang_parser& operator= (const seclang_parser&) = delete; #endif /// Parse. An alias for parse (). /// \returns 0 iff parsing succeeded. int operator() (); /// Parse. /// \returns 0 iff parsing succeeded. virtual int parse (); #if YYDEBUG /// The current debugging stream. std::ostream& debug_stream () const YY_ATTRIBUTE_PURE; /// Set the current debugging stream. void set_debug_stream (std::ostream &); /// Type for debugging levels. typedef int debug_level_type; /// The current debugging level. debug_level_type debug_level () const YY_ATTRIBUTE_PURE; /// Set the current debugging level. void set_debug_level (debug_level_type l); #endif /// Report a syntax error. /// \param loc where the syntax error is found. /// \param msg a description of the syntax error. virtual void error (const location_type& loc, const std::string& msg); /// Report a syntax error. void error (const syntax_error& err); /// The user-facing name of the symbol whose (internal) number is /// YYSYMBOL. No bounds checking. static std::string symbol_name (symbol_kind_type yysymbol); // Implementation of make_symbol for each symbol type. #if 201103L <= YY_CPLUSPLUS static symbol_type make_END (location_type l) { return symbol_type (token::TOK_END, std::move (l)); } #else static symbol_type make_END (const location_type& l) { return symbol_type (token::TOK_END, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_YYerror (location_type l) { return symbol_type (token::TOK_YYerror, std::move (l)); } #else static symbol_type make_YYerror (const location_type& l) { return symbol_type (token::TOK_YYerror, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_YYUNDEF (location_type l) { return symbol_type (token::TOK_YYUNDEF, std::move (l)); } #else static symbol_type make_YYUNDEF (const location_type& l) { return symbol_type (token::TOK_YYUNDEF, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_COMMA (location_type l) { return symbol_type (token::TOK_COMMA, std::move (l)); } #else static symbol_type make_COMMA (const location_type& l) { return symbol_type (token::TOK_COMMA, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_CONFIG_CONTENT_INJECTION (location_type l) { return symbol_type (token::TOK_CONFIG_CONTENT_INJECTION, std::move (l)); } #else static symbol_type make_CONFIG_CONTENT_INJECTION (const location_type& l) { return symbol_type (token::TOK_CONFIG_CONTENT_INJECTION, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_CONGIG_DIR_RESPONSE_BODY_MP_CLEAR (location_type l) { return symbol_type (token::TOK_CONGIG_DIR_RESPONSE_BODY_MP_CLEAR, std::move (l)); } #else static symbol_type make_CONGIG_DIR_RESPONSE_BODY_MP_CLEAR (const location_type& l) { return symbol_type (token::TOK_CONGIG_DIR_RESPONSE_BODY_MP_CLEAR, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_PIPE (location_type l) { return symbol_type (token::TOK_PIPE, std::move (l)); } #else static symbol_type make_PIPE (const location_type& l) { return symbol_type (token::TOK_PIPE, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_NEW_LINE (location_type l) { return symbol_type (token::TOK_NEW_LINE, std::move (l)); } #else static symbol_type make_NEW_LINE (const location_type& l) { return symbol_type (token::TOK_NEW_LINE, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_VAR_COUNT (location_type l) { return symbol_type (token::TOK_VAR_COUNT, std::move (l)); } #else static symbol_type make_VAR_COUNT (const location_type& l) { return symbol_type (token::TOK_VAR_COUNT, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_VAR_EXCLUSION (location_type l) { return symbol_type (token::TOK_VAR_EXCLUSION, std::move (l)); } #else static symbol_type make_VAR_EXCLUSION (const location_type& l) { return symbol_type (token::TOK_VAR_EXCLUSION, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_VARIABLE_ARGS (location_type l) { return symbol_type (token::TOK_VARIABLE_ARGS, std::move (l)); } #else static symbol_type make_VARIABLE_ARGS (const location_type& l) { return symbol_type (token::TOK_VARIABLE_ARGS, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_VARIABLE_ARGS_POST (location_type l) { return symbol_type (token::TOK_VARIABLE_ARGS_POST, std::move (l)); } #else static symbol_type make_VARIABLE_ARGS_POST (const location_type& l) { return symbol_type (token::TOK_VARIABLE_ARGS_POST, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_VARIABLE_ARGS_GET (location_type l) { return symbol_type (token::TOK_VARIABLE_ARGS_GET, std::move (l)); } #else static symbol_type make_VARIABLE_ARGS_GET (const location_type& l) { return symbol_type (token::TOK_VARIABLE_ARGS_GET, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_VARIABLE_FILES_SIZES (location_type l) { return symbol_type (token::TOK_VARIABLE_FILES_SIZES, std::move (l)); } #else static symbol_type make_VARIABLE_FILES_SIZES (const location_type& l) { return symbol_type (token::TOK_VARIABLE_FILES_SIZES, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_VARIABLE_FILES_NAMES (location_type l) { return symbol_type (token::TOK_VARIABLE_FILES_NAMES, std::move (l)); } #else static symbol_type make_VARIABLE_FILES_NAMES (const location_type& l) { return symbol_type (token::TOK_VARIABLE_FILES_NAMES, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_VARIABLE_FILES_TMP_CONTENT (location_type l) { return symbol_type (token::TOK_VARIABLE_FILES_TMP_CONTENT, std::move (l)); } #else static symbol_type make_VARIABLE_FILES_TMP_CONTENT (const location_type& l) { return symbol_type (token::TOK_VARIABLE_FILES_TMP_CONTENT, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_VARIABLE_MULTIPART_FILENAME (location_type l) { return symbol_type (token::TOK_VARIABLE_MULTIPART_FILENAME, std::move (l)); } #else static symbol_type make_VARIABLE_MULTIPART_FILENAME (const location_type& l) { return symbol_type (token::TOK_VARIABLE_MULTIPART_FILENAME, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_VARIABLE_MULTIPART_NAME (location_type l) { return symbol_type (token::TOK_VARIABLE_MULTIPART_NAME, std::move (l)); } #else static symbol_type make_VARIABLE_MULTIPART_NAME (const location_type& l) { return symbol_type (token::TOK_VARIABLE_MULTIPART_NAME, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_VARIABLE_MATCHED_VARS_NAMES (location_type l) { return symbol_type (token::TOK_VARIABLE_MATCHED_VARS_NAMES, std::move (l)); } #else static symbol_type make_VARIABLE_MATCHED_VARS_NAMES (const location_type& l) { return symbol_type (token::TOK_VARIABLE_MATCHED_VARS_NAMES, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_VARIABLE_MATCHED_VARS (location_type l) { return symbol_type (token::TOK_VARIABLE_MATCHED_VARS, std::move (l)); } #else static symbol_type make_VARIABLE_MATCHED_VARS (const location_type& l) { return symbol_type (token::TOK_VARIABLE_MATCHED_VARS, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_VARIABLE_FILES (location_type l) { return symbol_type (token::TOK_VARIABLE_FILES, std::move (l)); } #else static symbol_type make_VARIABLE_FILES (const location_type& l) { return symbol_type (token::TOK_VARIABLE_FILES, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_VARIABLE_REQUEST_COOKIES (location_type l) { return symbol_type (token::TOK_VARIABLE_REQUEST_COOKIES, std::move (l)); } #else static symbol_type make_VARIABLE_REQUEST_COOKIES (const location_type& l) { return symbol_type (token::TOK_VARIABLE_REQUEST_COOKIES, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_VARIABLE_REQUEST_HEADERS (location_type l) { return symbol_type (token::TOK_VARIABLE_REQUEST_HEADERS, std::move (l)); } #else static symbol_type make_VARIABLE_REQUEST_HEADERS (const location_type& l) { return symbol_type (token::TOK_VARIABLE_REQUEST_HEADERS, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_VARIABLE_RESPONSE_HEADERS (location_type l) { return symbol_type (token::TOK_VARIABLE_RESPONSE_HEADERS, std::move (l)); } #else static symbol_type make_VARIABLE_RESPONSE_HEADERS (const location_type& l) { return symbol_type (token::TOK_VARIABLE_RESPONSE_HEADERS, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_VARIABLE_GEO (location_type l) { return symbol_type (token::TOK_VARIABLE_GEO, std::move (l)); } #else static symbol_type make_VARIABLE_GEO (const location_type& l) { return symbol_type (token::TOK_VARIABLE_GEO, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_VARIABLE_REQUEST_COOKIES_NAMES (location_type l) { return symbol_type (token::TOK_VARIABLE_REQUEST_COOKIES_NAMES, std::move (l)); } #else static symbol_type make_VARIABLE_REQUEST_COOKIES_NAMES (const location_type& l) { return symbol_type (token::TOK_VARIABLE_REQUEST_COOKIES_NAMES, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_VARIABLE_ARGS_COMBINED_SIZE (location_type l) { return symbol_type (token::TOK_VARIABLE_ARGS_COMBINED_SIZE, std::move (l)); } #else static symbol_type make_VARIABLE_ARGS_COMBINED_SIZE (const location_type& l) { return symbol_type (token::TOK_VARIABLE_ARGS_COMBINED_SIZE, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_VARIABLE_ARGS_GET_NAMES (location_type l) { return symbol_type (token::TOK_VARIABLE_ARGS_GET_NAMES, std::move (l)); } #else static symbol_type make_VARIABLE_ARGS_GET_NAMES (const location_type& l) { return symbol_type (token::TOK_VARIABLE_ARGS_GET_NAMES, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_VARIABLE_RULE (location_type l) { return symbol_type (token::TOK_VARIABLE_RULE, std::move (l)); } #else static symbol_type make_VARIABLE_RULE (const location_type& l) { return symbol_type (token::TOK_VARIABLE_RULE, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_VARIABLE_ARGS_NAMES (location_type l) { return symbol_type (token::TOK_VARIABLE_ARGS_NAMES, std::move (l)); } #else static symbol_type make_VARIABLE_ARGS_NAMES (const location_type& l) { return symbol_type (token::TOK_VARIABLE_ARGS_NAMES, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_VARIABLE_ARGS_POST_NAMES (location_type l) { return symbol_type (token::TOK_VARIABLE_ARGS_POST_NAMES, std::move (l)); } #else static symbol_type make_VARIABLE_ARGS_POST_NAMES (const location_type& l) { return symbol_type (token::TOK_VARIABLE_ARGS_POST_NAMES, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_VARIABLE_AUTH_TYPE (location_type l) { return symbol_type (token::TOK_VARIABLE_AUTH_TYPE, std::move (l)); } #else static symbol_type make_VARIABLE_AUTH_TYPE (const location_type& l) { return symbol_type (token::TOK_VARIABLE_AUTH_TYPE, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_VARIABLE_FILES_COMBINED_SIZE (location_type l) { return symbol_type (token::TOK_VARIABLE_FILES_COMBINED_SIZE, std::move (l)); } #else static symbol_type make_VARIABLE_FILES_COMBINED_SIZE (const location_type& l) { return symbol_type (token::TOK_VARIABLE_FILES_COMBINED_SIZE, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_VARIABLE_FILES_TMP_NAMES (location_type l) { return symbol_type (token::TOK_VARIABLE_FILES_TMP_NAMES, std::move (l)); } #else static symbol_type make_VARIABLE_FILES_TMP_NAMES (const location_type& l) { return symbol_type (token::TOK_VARIABLE_FILES_TMP_NAMES, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_VARIABLE_FULL_REQUEST (location_type l) { return symbol_type (token::TOK_VARIABLE_FULL_REQUEST, std::move (l)); } #else static symbol_type make_VARIABLE_FULL_REQUEST (const location_type& l) { return symbol_type (token::TOK_VARIABLE_FULL_REQUEST, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_VARIABLE_FULL_REQUEST_LENGTH (location_type l) { return symbol_type (token::TOK_VARIABLE_FULL_REQUEST_LENGTH, std::move (l)); } #else static symbol_type make_VARIABLE_FULL_REQUEST_LENGTH (const location_type& l) { return symbol_type (token::TOK_VARIABLE_FULL_REQUEST_LENGTH, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_VARIABLE_INBOUND_DATA_ERROR (location_type l) { return symbol_type (token::TOK_VARIABLE_INBOUND_DATA_ERROR, std::move (l)); } #else static symbol_type make_VARIABLE_INBOUND_DATA_ERROR (const location_type& l) { return symbol_type (token::TOK_VARIABLE_INBOUND_DATA_ERROR, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_VARIABLE_MATCHED_VAR (location_type l) { return symbol_type (token::TOK_VARIABLE_MATCHED_VAR, std::move (l)); } #else static symbol_type make_VARIABLE_MATCHED_VAR (const location_type& l) { return symbol_type (token::TOK_VARIABLE_MATCHED_VAR, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_VARIABLE_MATCHED_VAR_NAME (location_type l) { return symbol_type (token::TOK_VARIABLE_MATCHED_VAR_NAME, std::move (l)); } #else static symbol_type make_VARIABLE_MATCHED_VAR_NAME (const location_type& l) { return symbol_type (token::TOK_VARIABLE_MATCHED_VAR_NAME, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_VARIABLE_MULTIPART_BOUNDARY_QUOTED (location_type l) { return symbol_type (token::TOK_VARIABLE_MULTIPART_BOUNDARY_QUOTED, std::move (l)); } #else static symbol_type make_VARIABLE_MULTIPART_BOUNDARY_QUOTED (const location_type& l) { return symbol_type (token::TOK_VARIABLE_MULTIPART_BOUNDARY_QUOTED, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_VARIABLE_MULTIPART_BOUNDARY_WHITESPACE (location_type l) { return symbol_type (token::TOK_VARIABLE_MULTIPART_BOUNDARY_WHITESPACE, std::move (l)); } #else static symbol_type make_VARIABLE_MULTIPART_BOUNDARY_WHITESPACE (const location_type& l) { return symbol_type (token::TOK_VARIABLE_MULTIPART_BOUNDARY_WHITESPACE, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_VARIABLE_MULTIPART_CRLF_LF_LINES (location_type l) { return symbol_type (token::TOK_VARIABLE_MULTIPART_CRLF_LF_LINES, std::move (l)); } #else static symbol_type make_VARIABLE_MULTIPART_CRLF_LF_LINES (const location_type& l) { return symbol_type (token::TOK_VARIABLE_MULTIPART_CRLF_LF_LINES, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_VARIABLE_MULTIPART_DATA_AFTER (location_type l) { return symbol_type (token::TOK_VARIABLE_MULTIPART_DATA_AFTER, std::move (l)); } #else static symbol_type make_VARIABLE_MULTIPART_DATA_AFTER (const location_type& l) { return symbol_type (token::TOK_VARIABLE_MULTIPART_DATA_AFTER, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_VARIABLE_MULTIPART_DATA_BEFORE (location_type l) { return symbol_type (token::TOK_VARIABLE_MULTIPART_DATA_BEFORE, std::move (l)); } #else static symbol_type make_VARIABLE_MULTIPART_DATA_BEFORE (const location_type& l) { return symbol_type (token::TOK_VARIABLE_MULTIPART_DATA_BEFORE, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_VARIABLE_MULTIPART_FILE_LIMIT_EXCEEDED (location_type l) { return symbol_type (token::TOK_VARIABLE_MULTIPART_FILE_LIMIT_EXCEEDED, std::move (l)); } #else static symbol_type make_VARIABLE_MULTIPART_FILE_LIMIT_EXCEEDED (const location_type& l) { return symbol_type (token::TOK_VARIABLE_MULTIPART_FILE_LIMIT_EXCEEDED, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_VARIABLE_MULTIPART_HEADER_FOLDING (location_type l) { return symbol_type (token::TOK_VARIABLE_MULTIPART_HEADER_FOLDING, std::move (l)); } #else static symbol_type make_VARIABLE_MULTIPART_HEADER_FOLDING (const location_type& l) { return symbol_type (token::TOK_VARIABLE_MULTIPART_HEADER_FOLDING, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_VARIABLE_MULTIPART_INVALID_HEADER_FOLDING (location_type l) { return symbol_type (token::TOK_VARIABLE_MULTIPART_INVALID_HEADER_FOLDING, std::move (l)); } #else static symbol_type make_VARIABLE_MULTIPART_INVALID_HEADER_FOLDING (const location_type& l) { return symbol_type (token::TOK_VARIABLE_MULTIPART_INVALID_HEADER_FOLDING, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_VARIABLE_MULTIPART_INVALID_PART (location_type l) { return symbol_type (token::TOK_VARIABLE_MULTIPART_INVALID_PART, std::move (l)); } #else static symbol_type make_VARIABLE_MULTIPART_INVALID_PART (const location_type& l) { return symbol_type (token::TOK_VARIABLE_MULTIPART_INVALID_PART, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_VARIABLE_MULTIPART_INVALID_QUOTING (location_type l) { return symbol_type (token::TOK_VARIABLE_MULTIPART_INVALID_QUOTING, std::move (l)); } #else static symbol_type make_VARIABLE_MULTIPART_INVALID_QUOTING (const location_type& l) { return symbol_type (token::TOK_VARIABLE_MULTIPART_INVALID_QUOTING, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_VARIABLE_MULTIPART_LF_LINE (location_type l) { return symbol_type (token::TOK_VARIABLE_MULTIPART_LF_LINE, std::move (l)); } #else static symbol_type make_VARIABLE_MULTIPART_LF_LINE (const location_type& l) { return symbol_type (token::TOK_VARIABLE_MULTIPART_LF_LINE, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_VARIABLE_MULTIPART_MISSING_SEMICOLON (location_type l) { return symbol_type (token::TOK_VARIABLE_MULTIPART_MISSING_SEMICOLON, std::move (l)); } #else static symbol_type make_VARIABLE_MULTIPART_MISSING_SEMICOLON (const location_type& l) { return symbol_type (token::TOK_VARIABLE_MULTIPART_MISSING_SEMICOLON, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_VARIABLE_MULTIPART_SEMICOLON_MISSING (location_type l) { return symbol_type (token::TOK_VARIABLE_MULTIPART_SEMICOLON_MISSING, std::move (l)); } #else static symbol_type make_VARIABLE_MULTIPART_SEMICOLON_MISSING (const location_type& l) { return symbol_type (token::TOK_VARIABLE_MULTIPART_SEMICOLON_MISSING, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_VARIABLE_MULTIPART_STRICT_ERROR (location_type l) { return symbol_type (token::TOK_VARIABLE_MULTIPART_STRICT_ERROR, std::move (l)); } #else static symbol_type make_VARIABLE_MULTIPART_STRICT_ERROR (const location_type& l) { return symbol_type (token::TOK_VARIABLE_MULTIPART_STRICT_ERROR, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_VARIABLE_MULTIPART_UNMATCHED_BOUNDARY (location_type l) { return symbol_type (token::TOK_VARIABLE_MULTIPART_UNMATCHED_BOUNDARY, std::move (l)); } #else static symbol_type make_VARIABLE_MULTIPART_UNMATCHED_BOUNDARY (const location_type& l) { return symbol_type (token::TOK_VARIABLE_MULTIPART_UNMATCHED_BOUNDARY, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_VARIABLE_OUTBOUND_DATA_ERROR (location_type l) { return symbol_type (token::TOK_VARIABLE_OUTBOUND_DATA_ERROR, std::move (l)); } #else static symbol_type make_VARIABLE_OUTBOUND_DATA_ERROR (const location_type& l) { return symbol_type (token::TOK_VARIABLE_OUTBOUND_DATA_ERROR, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_VARIABLE_PATH_INFO (location_type l) { return symbol_type (token::TOK_VARIABLE_PATH_INFO, std::move (l)); } #else static symbol_type make_VARIABLE_PATH_INFO (const location_type& l) { return symbol_type (token::TOK_VARIABLE_PATH_INFO, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_VARIABLE_QUERY_STRING (location_type l) { return symbol_type (token::TOK_VARIABLE_QUERY_STRING, std::move (l)); } #else static symbol_type make_VARIABLE_QUERY_STRING (const location_type& l) { return symbol_type (token::TOK_VARIABLE_QUERY_STRING, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_VARIABLE_REMOTE_ADDR (location_type l) { return symbol_type (token::TOK_VARIABLE_REMOTE_ADDR, std::move (l)); } #else static symbol_type make_VARIABLE_REMOTE_ADDR (const location_type& l) { return symbol_type (token::TOK_VARIABLE_REMOTE_ADDR, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_VARIABLE_REMOTE_HOST (location_type l) { return symbol_type (token::TOK_VARIABLE_REMOTE_HOST, std::move (l)); } #else static symbol_type make_VARIABLE_REMOTE_HOST (const location_type& l) { return symbol_type (token::TOK_VARIABLE_REMOTE_HOST, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_VARIABLE_REMOTE_PORT (location_type l) { return symbol_type (token::TOK_VARIABLE_REMOTE_PORT, std::move (l)); } #else static symbol_type make_VARIABLE_REMOTE_PORT (const location_type& l) { return symbol_type (token::TOK_VARIABLE_REMOTE_PORT, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_VARIABLE_REQBODY_ERROR_MSG (location_type l) { return symbol_type (token::TOK_VARIABLE_REQBODY_ERROR_MSG, std::move (l)); } #else static symbol_type make_VARIABLE_REQBODY_ERROR_MSG (const location_type& l) { return symbol_type (token::TOK_VARIABLE_REQBODY_ERROR_MSG, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_VARIABLE_REQBODY_ERROR (location_type l) { return symbol_type (token::TOK_VARIABLE_REQBODY_ERROR, std::move (l)); } #else static symbol_type make_VARIABLE_REQBODY_ERROR (const location_type& l) { return symbol_type (token::TOK_VARIABLE_REQBODY_ERROR, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_VARIABLE_REQBODY_PROCESSOR_ERROR_MSG (location_type l) { return symbol_type (token::TOK_VARIABLE_REQBODY_PROCESSOR_ERROR_MSG, std::move (l)); } #else static symbol_type make_VARIABLE_REQBODY_PROCESSOR_ERROR_MSG (const location_type& l) { return symbol_type (token::TOK_VARIABLE_REQBODY_PROCESSOR_ERROR_MSG, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_VARIABLE_REQBODY_PROCESSOR_ERROR (location_type l) { return symbol_type (token::TOK_VARIABLE_REQBODY_PROCESSOR_ERROR, std::move (l)); } #else static symbol_type make_VARIABLE_REQBODY_PROCESSOR_ERROR (const location_type& l) { return symbol_type (token::TOK_VARIABLE_REQBODY_PROCESSOR_ERROR, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_VARIABLE_REQBODY_PROCESSOR (location_type l) { return symbol_type (token::TOK_VARIABLE_REQBODY_PROCESSOR, std::move (l)); } #else static symbol_type make_VARIABLE_REQBODY_PROCESSOR (const location_type& l) { return symbol_type (token::TOK_VARIABLE_REQBODY_PROCESSOR, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_VARIABLE_REQUEST_BASENAME (location_type l) { return symbol_type (token::TOK_VARIABLE_REQUEST_BASENAME, std::move (l)); } #else static symbol_type make_VARIABLE_REQUEST_BASENAME (const location_type& l) { return symbol_type (token::TOK_VARIABLE_REQUEST_BASENAME, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_VARIABLE_REQUEST_BODY_LENGTH (location_type l) { return symbol_type (token::TOK_VARIABLE_REQUEST_BODY_LENGTH, std::move (l)); } #else static symbol_type make_VARIABLE_REQUEST_BODY_LENGTH (const location_type& l) { return symbol_type (token::TOK_VARIABLE_REQUEST_BODY_LENGTH, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_VARIABLE_REQUEST_BODY (location_type l) { return symbol_type (token::TOK_VARIABLE_REQUEST_BODY, std::move (l)); } #else static symbol_type make_VARIABLE_REQUEST_BODY (const location_type& l) { return symbol_type (token::TOK_VARIABLE_REQUEST_BODY, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_VARIABLE_REQUEST_FILE_NAME (location_type l) { return symbol_type (token::TOK_VARIABLE_REQUEST_FILE_NAME, std::move (l)); } #else static symbol_type make_VARIABLE_REQUEST_FILE_NAME (const location_type& l) { return symbol_type (token::TOK_VARIABLE_REQUEST_FILE_NAME, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_VARIABLE_REQUEST_HEADERS_NAMES (location_type l) { return symbol_type (token::TOK_VARIABLE_REQUEST_HEADERS_NAMES, std::move (l)); } #else static symbol_type make_VARIABLE_REQUEST_HEADERS_NAMES (const location_type& l) { return symbol_type (token::TOK_VARIABLE_REQUEST_HEADERS_NAMES, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_VARIABLE_REQUEST_LINE (location_type l) { return symbol_type (token::TOK_VARIABLE_REQUEST_LINE, std::move (l)); } #else static symbol_type make_VARIABLE_REQUEST_LINE (const location_type& l) { return symbol_type (token::TOK_VARIABLE_REQUEST_LINE, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_VARIABLE_REQUEST_METHOD (location_type l) { return symbol_type (token::TOK_VARIABLE_REQUEST_METHOD, std::move (l)); } #else static symbol_type make_VARIABLE_REQUEST_METHOD (const location_type& l) { return symbol_type (token::TOK_VARIABLE_REQUEST_METHOD, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_VARIABLE_REQUEST_PROTOCOL (location_type l) { return symbol_type (token::TOK_VARIABLE_REQUEST_PROTOCOL, std::move (l)); } #else static symbol_type make_VARIABLE_REQUEST_PROTOCOL (const location_type& l) { return symbol_type (token::TOK_VARIABLE_REQUEST_PROTOCOL, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_VARIABLE_REQUEST_URI_RAW (location_type l) { return symbol_type (token::TOK_VARIABLE_REQUEST_URI_RAW, std::move (l)); } #else static symbol_type make_VARIABLE_REQUEST_URI_RAW (const location_type& l) { return symbol_type (token::TOK_VARIABLE_REQUEST_URI_RAW, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_VARIABLE_REQUEST_URI (location_type l) { return symbol_type (token::TOK_VARIABLE_REQUEST_URI, std::move (l)); } #else static symbol_type make_VARIABLE_REQUEST_URI (const location_type& l) { return symbol_type (token::TOK_VARIABLE_REQUEST_URI, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_VARIABLE_RESOURCE (location_type l) { return symbol_type (token::TOK_VARIABLE_RESOURCE, std::move (l)); } #else static symbol_type make_VARIABLE_RESOURCE (const location_type& l) { return symbol_type (token::TOK_VARIABLE_RESOURCE, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_VARIABLE_RESPONSE_BODY (location_type l) { return symbol_type (token::TOK_VARIABLE_RESPONSE_BODY, std::move (l)); } #else static symbol_type make_VARIABLE_RESPONSE_BODY (const location_type& l) { return symbol_type (token::TOK_VARIABLE_RESPONSE_BODY, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_VARIABLE_RESPONSE_CONTENT_LENGTH (location_type l) { return symbol_type (token::TOK_VARIABLE_RESPONSE_CONTENT_LENGTH, std::move (l)); } #else static symbol_type make_VARIABLE_RESPONSE_CONTENT_LENGTH (const location_type& l) { return symbol_type (token::TOK_VARIABLE_RESPONSE_CONTENT_LENGTH, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_VARIABLE_RESPONSE_CONTENT_TYPE (location_type l) { return symbol_type (token::TOK_VARIABLE_RESPONSE_CONTENT_TYPE, std::move (l)); } #else static symbol_type make_VARIABLE_RESPONSE_CONTENT_TYPE (const location_type& l) { return symbol_type (token::TOK_VARIABLE_RESPONSE_CONTENT_TYPE, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_VARIABLE_RESPONSE_HEADERS_NAMES (location_type l) { return symbol_type (token::TOK_VARIABLE_RESPONSE_HEADERS_NAMES, std::move (l)); } #else static symbol_type make_VARIABLE_RESPONSE_HEADERS_NAMES (const location_type& l) { return symbol_type (token::TOK_VARIABLE_RESPONSE_HEADERS_NAMES, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_VARIABLE_RESPONSE_PROTOCOL (location_type l) { return symbol_type (token::TOK_VARIABLE_RESPONSE_PROTOCOL, std::move (l)); } #else static symbol_type make_VARIABLE_RESPONSE_PROTOCOL (const location_type& l) { return symbol_type (token::TOK_VARIABLE_RESPONSE_PROTOCOL, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_VARIABLE_RESPONSE_STATUS (location_type l) { return symbol_type (token::TOK_VARIABLE_RESPONSE_STATUS, std::move (l)); } #else static symbol_type make_VARIABLE_RESPONSE_STATUS (const location_type& l) { return symbol_type (token::TOK_VARIABLE_RESPONSE_STATUS, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_VARIABLE_SERVER_ADDR (location_type l) { return symbol_type (token::TOK_VARIABLE_SERVER_ADDR, std::move (l)); } #else static symbol_type make_VARIABLE_SERVER_ADDR (const location_type& l) { return symbol_type (token::TOK_VARIABLE_SERVER_ADDR, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_VARIABLE_SERVER_NAME (location_type l) { return symbol_type (token::TOK_VARIABLE_SERVER_NAME, std::move (l)); } #else static symbol_type make_VARIABLE_SERVER_NAME (const location_type& l) { return symbol_type (token::TOK_VARIABLE_SERVER_NAME, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_VARIABLE_SERVER_PORT (location_type l) { return symbol_type (token::TOK_VARIABLE_SERVER_PORT, std::move (l)); } #else static symbol_type make_VARIABLE_SERVER_PORT (const location_type& l) { return symbol_type (token::TOK_VARIABLE_SERVER_PORT, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_VARIABLE_SESSION_ID (location_type l) { return symbol_type (token::TOK_VARIABLE_SESSION_ID, std::move (l)); } #else static symbol_type make_VARIABLE_SESSION_ID (const location_type& l) { return symbol_type (token::TOK_VARIABLE_SESSION_ID, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_VARIABLE_UNIQUE_ID (location_type l) { return symbol_type (token::TOK_VARIABLE_UNIQUE_ID, std::move (l)); } #else static symbol_type make_VARIABLE_UNIQUE_ID (const location_type& l) { return symbol_type (token::TOK_VARIABLE_UNIQUE_ID, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_VARIABLE_URL_ENCODED_ERROR (location_type l) { return symbol_type (token::TOK_VARIABLE_URL_ENCODED_ERROR, std::move (l)); } #else static symbol_type make_VARIABLE_URL_ENCODED_ERROR (const location_type& l) { return symbol_type (token::TOK_VARIABLE_URL_ENCODED_ERROR, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_VARIABLE_USER_ID (location_type l) { return symbol_type (token::TOK_VARIABLE_USER_ID, std::move (l)); } #else static symbol_type make_VARIABLE_USER_ID (const location_type& l) { return symbol_type (token::TOK_VARIABLE_USER_ID, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_VARIABLE_WEB_APP_ID (location_type l) { return symbol_type (token::TOK_VARIABLE_WEB_APP_ID, std::move (l)); } #else static symbol_type make_VARIABLE_WEB_APP_ID (const location_type& l) { return symbol_type (token::TOK_VARIABLE_WEB_APP_ID, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_VARIABLE_STATUS (location_type l) { return symbol_type (token::TOK_VARIABLE_STATUS, std::move (l)); } #else static symbol_type make_VARIABLE_STATUS (const location_type& l) { return symbol_type (token::TOK_VARIABLE_STATUS, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_VARIABLE_STATUS_LINE (location_type l) { return symbol_type (token::TOK_VARIABLE_STATUS_LINE, std::move (l)); } #else static symbol_type make_VARIABLE_STATUS_LINE (const location_type& l) { return symbol_type (token::TOK_VARIABLE_STATUS_LINE, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_VARIABLE_IP (location_type l) { return symbol_type (token::TOK_VARIABLE_IP, std::move (l)); } #else static symbol_type make_VARIABLE_IP (const location_type& l) { return symbol_type (token::TOK_VARIABLE_IP, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_VARIABLE_GLOBAL (location_type l) { return symbol_type (token::TOK_VARIABLE_GLOBAL, std::move (l)); } #else static symbol_type make_VARIABLE_GLOBAL (const location_type& l) { return symbol_type (token::TOK_VARIABLE_GLOBAL, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_VARIABLE_TX (location_type l) { return symbol_type (token::TOK_VARIABLE_TX, std::move (l)); } #else static symbol_type make_VARIABLE_TX (const location_type& l) { return symbol_type (token::TOK_VARIABLE_TX, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_VARIABLE_SESSION (location_type l) { return symbol_type (token::TOK_VARIABLE_SESSION, std::move (l)); } #else static symbol_type make_VARIABLE_SESSION (const location_type& l) { return symbol_type (token::TOK_VARIABLE_SESSION, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_VARIABLE_USER (location_type l) { return symbol_type (token::TOK_VARIABLE_USER, std::move (l)); } #else static symbol_type make_VARIABLE_USER (const location_type& l) { return symbol_type (token::TOK_VARIABLE_USER, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_RUN_TIME_VAR_ENV (location_type l) { return symbol_type (token::TOK_RUN_TIME_VAR_ENV, std::move (l)); } #else static symbol_type make_RUN_TIME_VAR_ENV (const location_type& l) { return symbol_type (token::TOK_RUN_TIME_VAR_ENV, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_RUN_TIME_VAR_XML (location_type l) { return symbol_type (token::TOK_RUN_TIME_VAR_XML, std::move (l)); } #else static symbol_type make_RUN_TIME_VAR_XML (const location_type& l) { return symbol_type (token::TOK_RUN_TIME_VAR_XML, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_ACTION_SETVAR (location_type l) { return symbol_type (token::TOK_ACTION_SETVAR, std::move (l)); } #else static symbol_type make_ACTION_SETVAR (const location_type& l) { return symbol_type (token::TOK_ACTION_SETVAR, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_SETVAR_OPERATION_EQUALS (location_type l) { return symbol_type (token::TOK_SETVAR_OPERATION_EQUALS, std::move (l)); } #else static symbol_type make_SETVAR_OPERATION_EQUALS (const location_type& l) { return symbol_type (token::TOK_SETVAR_OPERATION_EQUALS, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_SETVAR_OPERATION_EQUALS_PLUS (location_type l) { return symbol_type (token::TOK_SETVAR_OPERATION_EQUALS_PLUS, std::move (l)); } #else static symbol_type make_SETVAR_OPERATION_EQUALS_PLUS (const location_type& l) { return symbol_type (token::TOK_SETVAR_OPERATION_EQUALS_PLUS, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_SETVAR_OPERATION_EQUALS_MINUS (location_type l) { return symbol_type (token::TOK_SETVAR_OPERATION_EQUALS_MINUS, std::move (l)); } #else static symbol_type make_SETVAR_OPERATION_EQUALS_MINUS (const location_type& l) { return symbol_type (token::TOK_SETVAR_OPERATION_EQUALS_MINUS, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_NOT (location_type l) { return symbol_type (token::TOK_NOT, std::move (l)); } #else static symbol_type make_NOT (const location_type& l) { return symbol_type (token::TOK_NOT, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_OPERATOR_BEGINS_WITH (location_type l) { return symbol_type (token::TOK_OPERATOR_BEGINS_WITH, std::move (l)); } #else static symbol_type make_OPERATOR_BEGINS_WITH (const location_type& l) { return symbol_type (token::TOK_OPERATOR_BEGINS_WITH, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_OPERATOR_CONTAINS (location_type l) { return symbol_type (token::TOK_OPERATOR_CONTAINS, std::move (l)); } #else static symbol_type make_OPERATOR_CONTAINS (const location_type& l) { return symbol_type (token::TOK_OPERATOR_CONTAINS, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_OPERATOR_CONTAINS_WORD (location_type l) { return symbol_type (token::TOK_OPERATOR_CONTAINS_WORD, std::move (l)); } #else static symbol_type make_OPERATOR_CONTAINS_WORD (const location_type& l) { return symbol_type (token::TOK_OPERATOR_CONTAINS_WORD, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_OPERATOR_DETECT_SQLI (location_type l) { return symbol_type (token::TOK_OPERATOR_DETECT_SQLI, std::move (l)); } #else static symbol_type make_OPERATOR_DETECT_SQLI (const location_type& l) { return symbol_type (token::TOK_OPERATOR_DETECT_SQLI, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_OPERATOR_DETECT_XSS (location_type l) { return symbol_type (token::TOK_OPERATOR_DETECT_XSS, std::move (l)); } #else static symbol_type make_OPERATOR_DETECT_XSS (const location_type& l) { return symbol_type (token::TOK_OPERATOR_DETECT_XSS, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_OPERATOR_ENDS_WITH (location_type l) { return symbol_type (token::TOK_OPERATOR_ENDS_WITH, std::move (l)); } #else static symbol_type make_OPERATOR_ENDS_WITH (const location_type& l) { return symbol_type (token::TOK_OPERATOR_ENDS_WITH, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_OPERATOR_EQ (location_type l) { return symbol_type (token::TOK_OPERATOR_EQ, std::move (l)); } #else static symbol_type make_OPERATOR_EQ (const location_type& l) { return symbol_type (token::TOK_OPERATOR_EQ, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_OPERATOR_FUZZY_HASH (location_type l) { return symbol_type (token::TOK_OPERATOR_FUZZY_HASH, std::move (l)); } #else static symbol_type make_OPERATOR_FUZZY_HASH (const location_type& l) { return symbol_type (token::TOK_OPERATOR_FUZZY_HASH, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_OPERATOR_GEOLOOKUP (location_type l) { return symbol_type (token::TOK_OPERATOR_GEOLOOKUP, std::move (l)); } #else static symbol_type make_OPERATOR_GEOLOOKUP (const location_type& l) { return symbol_type (token::TOK_OPERATOR_GEOLOOKUP, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_OPERATOR_GE (location_type l) { return symbol_type (token::TOK_OPERATOR_GE, std::move (l)); } #else static symbol_type make_OPERATOR_GE (const location_type& l) { return symbol_type (token::TOK_OPERATOR_GE, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_OPERATOR_GSB_LOOKUP (location_type l) { return symbol_type (token::TOK_OPERATOR_GSB_LOOKUP, std::move (l)); } #else static symbol_type make_OPERATOR_GSB_LOOKUP (const location_type& l) { return symbol_type (token::TOK_OPERATOR_GSB_LOOKUP, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_OPERATOR_GT (location_type l) { return symbol_type (token::TOK_OPERATOR_GT, std::move (l)); } #else static symbol_type make_OPERATOR_GT (const location_type& l) { return symbol_type (token::TOK_OPERATOR_GT, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_OPERATOR_INSPECT_FILE (location_type l) { return symbol_type (token::TOK_OPERATOR_INSPECT_FILE, std::move (l)); } #else static symbol_type make_OPERATOR_INSPECT_FILE (const location_type& l) { return symbol_type (token::TOK_OPERATOR_INSPECT_FILE, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_OPERATOR_IP_MATCH_FROM_FILE (location_type l) { return symbol_type (token::TOK_OPERATOR_IP_MATCH_FROM_FILE, std::move (l)); } #else static symbol_type make_OPERATOR_IP_MATCH_FROM_FILE (const location_type& l) { return symbol_type (token::TOK_OPERATOR_IP_MATCH_FROM_FILE, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_OPERATOR_IP_MATCH (location_type l) { return symbol_type (token::TOK_OPERATOR_IP_MATCH, std::move (l)); } #else static symbol_type make_OPERATOR_IP_MATCH (const location_type& l) { return symbol_type (token::TOK_OPERATOR_IP_MATCH, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_OPERATOR_LE (location_type l) { return symbol_type (token::TOK_OPERATOR_LE, std::move (l)); } #else static symbol_type make_OPERATOR_LE (const location_type& l) { return symbol_type (token::TOK_OPERATOR_LE, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_OPERATOR_LT (location_type l) { return symbol_type (token::TOK_OPERATOR_LT, std::move (l)); } #else static symbol_type make_OPERATOR_LT (const location_type& l) { return symbol_type (token::TOK_OPERATOR_LT, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_OPERATOR_PM_FROM_FILE (location_type l) { return symbol_type (token::TOK_OPERATOR_PM_FROM_FILE, std::move (l)); } #else static symbol_type make_OPERATOR_PM_FROM_FILE (const location_type& l) { return symbol_type (token::TOK_OPERATOR_PM_FROM_FILE, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_OPERATOR_PM (location_type l) { return symbol_type (token::TOK_OPERATOR_PM, std::move (l)); } #else static symbol_type make_OPERATOR_PM (const location_type& l) { return symbol_type (token::TOK_OPERATOR_PM, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_OPERATOR_RBL (location_type l) { return symbol_type (token::TOK_OPERATOR_RBL, std::move (l)); } #else static symbol_type make_OPERATOR_RBL (const location_type& l) { return symbol_type (token::TOK_OPERATOR_RBL, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_OPERATOR_RSUB (location_type l) { return symbol_type (token::TOK_OPERATOR_RSUB, std::move (l)); } #else static symbol_type make_OPERATOR_RSUB (const location_type& l) { return symbol_type (token::TOK_OPERATOR_RSUB, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_OPERATOR_RX_CONTENT_ONLY (location_type l) { return symbol_type (token::TOK_OPERATOR_RX_CONTENT_ONLY, std::move (l)); } #else static symbol_type make_OPERATOR_RX_CONTENT_ONLY (const location_type& l) { return symbol_type (token::TOK_OPERATOR_RX_CONTENT_ONLY, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_OPERATOR_RX (location_type l) { return symbol_type (token::TOK_OPERATOR_RX, std::move (l)); } #else static symbol_type make_OPERATOR_RX (const location_type& l) { return symbol_type (token::TOK_OPERATOR_RX, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_OPERATOR_RX_GLOBAL (location_type l) { return symbol_type (token::TOK_OPERATOR_RX_GLOBAL, std::move (l)); } #else static symbol_type make_OPERATOR_RX_GLOBAL (const location_type& l) { return symbol_type (token::TOK_OPERATOR_RX_GLOBAL, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_OPERATOR_STR_EQ (location_type l) { return symbol_type (token::TOK_OPERATOR_STR_EQ, std::move (l)); } #else static symbol_type make_OPERATOR_STR_EQ (const location_type& l) { return symbol_type (token::TOK_OPERATOR_STR_EQ, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_OPERATOR_STR_MATCH (location_type l) { return symbol_type (token::TOK_OPERATOR_STR_MATCH, std::move (l)); } #else static symbol_type make_OPERATOR_STR_MATCH (const location_type& l) { return symbol_type (token::TOK_OPERATOR_STR_MATCH, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_OPERATOR_UNCONDITIONAL_MATCH (location_type l) { return symbol_type (token::TOK_OPERATOR_UNCONDITIONAL_MATCH, std::move (l)); } #else static symbol_type make_OPERATOR_UNCONDITIONAL_MATCH (const location_type& l) { return symbol_type (token::TOK_OPERATOR_UNCONDITIONAL_MATCH, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_OPERATOR_VALIDATE_BYTE_RANGE (location_type l) { return symbol_type (token::TOK_OPERATOR_VALIDATE_BYTE_RANGE, std::move (l)); } #else static symbol_type make_OPERATOR_VALIDATE_BYTE_RANGE (const location_type& l) { return symbol_type (token::TOK_OPERATOR_VALIDATE_BYTE_RANGE, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_OPERATOR_VALIDATE_DTD (location_type l) { return symbol_type (token::TOK_OPERATOR_VALIDATE_DTD, std::move (l)); } #else static symbol_type make_OPERATOR_VALIDATE_DTD (const location_type& l) { return symbol_type (token::TOK_OPERATOR_VALIDATE_DTD, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_OPERATOR_VALIDATE_HASH (location_type l) { return symbol_type (token::TOK_OPERATOR_VALIDATE_HASH, std::move (l)); } #else static symbol_type make_OPERATOR_VALIDATE_HASH (const location_type& l) { return symbol_type (token::TOK_OPERATOR_VALIDATE_HASH, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_OPERATOR_VALIDATE_SCHEMA (location_type l) { return symbol_type (token::TOK_OPERATOR_VALIDATE_SCHEMA, std::move (l)); } #else static symbol_type make_OPERATOR_VALIDATE_SCHEMA (const location_type& l) { return symbol_type (token::TOK_OPERATOR_VALIDATE_SCHEMA, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_OPERATOR_VALIDATE_URL_ENCODING (location_type l) { return symbol_type (token::TOK_OPERATOR_VALIDATE_URL_ENCODING, std::move (l)); } #else static symbol_type make_OPERATOR_VALIDATE_URL_ENCODING (const location_type& l) { return symbol_type (token::TOK_OPERATOR_VALIDATE_URL_ENCODING, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_OPERATOR_VALIDATE_UTF8_ENCODING (location_type l) { return symbol_type (token::TOK_OPERATOR_VALIDATE_UTF8_ENCODING, std::move (l)); } #else static symbol_type make_OPERATOR_VALIDATE_UTF8_ENCODING (const location_type& l) { return symbol_type (token::TOK_OPERATOR_VALIDATE_UTF8_ENCODING, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_OPERATOR_VERIFY_CC (location_type l) { return symbol_type (token::TOK_OPERATOR_VERIFY_CC, std::move (l)); } #else static symbol_type make_OPERATOR_VERIFY_CC (const location_type& l) { return symbol_type (token::TOK_OPERATOR_VERIFY_CC, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_OPERATOR_VERIFY_CPF (location_type l) { return symbol_type (token::TOK_OPERATOR_VERIFY_CPF, std::move (l)); } #else static symbol_type make_OPERATOR_VERIFY_CPF (const location_type& l) { return symbol_type (token::TOK_OPERATOR_VERIFY_CPF, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_OPERATOR_VERIFY_SSN (location_type l) { return symbol_type (token::TOK_OPERATOR_VERIFY_SSN, std::move (l)); } #else static symbol_type make_OPERATOR_VERIFY_SSN (const location_type& l) { return symbol_type (token::TOK_OPERATOR_VERIFY_SSN, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_OPERATOR_VERIFY_SVNR (location_type l) { return symbol_type (token::TOK_OPERATOR_VERIFY_SVNR, std::move (l)); } #else static symbol_type make_OPERATOR_VERIFY_SVNR (const location_type& l) { return symbol_type (token::TOK_OPERATOR_VERIFY_SVNR, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_OPERATOR_WITHIN (location_type l) { return symbol_type (token::TOK_OPERATOR_WITHIN, std::move (l)); } #else static symbol_type make_OPERATOR_WITHIN (const location_type& l) { return symbol_type (token::TOK_OPERATOR_WITHIN, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_CONFIG_DIR_AUDIT_LOG_FMT (location_type l) { return symbol_type (token::TOK_CONFIG_DIR_AUDIT_LOG_FMT, std::move (l)); } #else static symbol_type make_CONFIG_DIR_AUDIT_LOG_FMT (const location_type& l) { return symbol_type (token::TOK_CONFIG_DIR_AUDIT_LOG_FMT, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_JSON (location_type l) { return symbol_type (token::TOK_JSON, std::move (l)); } #else static symbol_type make_JSON (const location_type& l) { return symbol_type (token::TOK_JSON, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_NATIVE (location_type l) { return symbol_type (token::TOK_NATIVE, std::move (l)); } #else static symbol_type make_NATIVE (const location_type& l) { return symbol_type (token::TOK_NATIVE, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_ACTION_CTL_RULE_ENGINE (location_type l) { return symbol_type (token::TOK_ACTION_CTL_RULE_ENGINE, std::move (l)); } #else static symbol_type make_ACTION_CTL_RULE_ENGINE (const location_type& l) { return symbol_type (token::TOK_ACTION_CTL_RULE_ENGINE, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_ACTION_ACCURACY (std::string v, location_type l) { return symbol_type (token::TOK_ACTION_ACCURACY, std::move (v), std::move (l)); } #else static symbol_type make_ACTION_ACCURACY (const std::string& v, const location_type& l) { return symbol_type (token::TOK_ACTION_ACCURACY, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_ACTION_ALLOW (std::string v, location_type l) { return symbol_type (token::TOK_ACTION_ALLOW, std::move (v), std::move (l)); } #else static symbol_type make_ACTION_ALLOW (const std::string& v, const location_type& l) { return symbol_type (token::TOK_ACTION_ALLOW, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_ACTION_APPEND (std::string v, location_type l) { return symbol_type (token::TOK_ACTION_APPEND, std::move (v), std::move (l)); } #else static symbol_type make_ACTION_APPEND (const std::string& v, const location_type& l) { return symbol_type (token::TOK_ACTION_APPEND, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_ACTION_AUDIT_LOG (std::string v, location_type l) { return symbol_type (token::TOK_ACTION_AUDIT_LOG, std::move (v), std::move (l)); } #else static symbol_type make_ACTION_AUDIT_LOG (const std::string& v, const location_type& l) { return symbol_type (token::TOK_ACTION_AUDIT_LOG, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_ACTION_BLOCK (std::string v, location_type l) { return symbol_type (token::TOK_ACTION_BLOCK, std::move (v), std::move (l)); } #else static symbol_type make_ACTION_BLOCK (const std::string& v, const location_type& l) { return symbol_type (token::TOK_ACTION_BLOCK, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_ACTION_CAPTURE (std::string v, location_type l) { return symbol_type (token::TOK_ACTION_CAPTURE, std::move (v), std::move (l)); } #else static symbol_type make_ACTION_CAPTURE (const std::string& v, const location_type& l) { return symbol_type (token::TOK_ACTION_CAPTURE, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_ACTION_CHAIN (std::string v, location_type l) { return symbol_type (token::TOK_ACTION_CHAIN, std::move (v), std::move (l)); } #else static symbol_type make_ACTION_CHAIN (const std::string& v, const location_type& l) { return symbol_type (token::TOK_ACTION_CHAIN, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_ACTION_CTL_AUDIT_ENGINE (std::string v, location_type l) { return symbol_type (token::TOK_ACTION_CTL_AUDIT_ENGINE, std::move (v), std::move (l)); } #else static symbol_type make_ACTION_CTL_AUDIT_ENGINE (const std::string& v, const location_type& l) { return symbol_type (token::TOK_ACTION_CTL_AUDIT_ENGINE, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_ACTION_CTL_AUDIT_LOG_PARTS (std::string v, location_type l) { return symbol_type (token::TOK_ACTION_CTL_AUDIT_LOG_PARTS, std::move (v), std::move (l)); } #else static symbol_type make_ACTION_CTL_AUDIT_LOG_PARTS (const std::string& v, const location_type& l) { return symbol_type (token::TOK_ACTION_CTL_AUDIT_LOG_PARTS, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_ACTION_CTL_BDY_JSON (std::string v, location_type l) { return symbol_type (token::TOK_ACTION_CTL_BDY_JSON, std::move (v), std::move (l)); } #else static symbol_type make_ACTION_CTL_BDY_JSON (const std::string& v, const location_type& l) { return symbol_type (token::TOK_ACTION_CTL_BDY_JSON, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_ACTION_CTL_BDY_XML (std::string v, location_type l) { return symbol_type (token::TOK_ACTION_CTL_BDY_XML, std::move (v), std::move (l)); } #else static symbol_type make_ACTION_CTL_BDY_XML (const std::string& v, const location_type& l) { return symbol_type (token::TOK_ACTION_CTL_BDY_XML, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_ACTION_CTL_BDY_URLENCODED (std::string v, location_type l) { return symbol_type (token::TOK_ACTION_CTL_BDY_URLENCODED, std::move (v), std::move (l)); } #else static symbol_type make_ACTION_CTL_BDY_URLENCODED (const std::string& v, const location_type& l) { return symbol_type (token::TOK_ACTION_CTL_BDY_URLENCODED, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_ACTION_CTL_FORCE_REQ_BODY_VAR (std::string v, location_type l) { return symbol_type (token::TOK_ACTION_CTL_FORCE_REQ_BODY_VAR, std::move (v), std::move (l)); } #else static symbol_type make_ACTION_CTL_FORCE_REQ_BODY_VAR (const std::string& v, const location_type& l) { return symbol_type (token::TOK_ACTION_CTL_FORCE_REQ_BODY_VAR, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_ACTION_CTL_REQUEST_BODY_ACCESS (std::string v, location_type l) { return symbol_type (token::TOK_ACTION_CTL_REQUEST_BODY_ACCESS, std::move (v), std::move (l)); } #else static symbol_type make_ACTION_CTL_REQUEST_BODY_ACCESS (const std::string& v, const location_type& l) { return symbol_type (token::TOK_ACTION_CTL_REQUEST_BODY_ACCESS, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_ACTION_CTL_RULE_REMOVE_BY_ID (std::string v, location_type l) { return symbol_type (token::TOK_ACTION_CTL_RULE_REMOVE_BY_ID, std::move (v), std::move (l)); } #else static symbol_type make_ACTION_CTL_RULE_REMOVE_BY_ID (const std::string& v, const location_type& l) { return symbol_type (token::TOK_ACTION_CTL_RULE_REMOVE_BY_ID, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_ACTION_CTL_RULE_REMOVE_BY_TAG (std::string v, location_type l) { return symbol_type (token::TOK_ACTION_CTL_RULE_REMOVE_BY_TAG, std::move (v), std::move (l)); } #else static symbol_type make_ACTION_CTL_RULE_REMOVE_BY_TAG (const std::string& v, const location_type& l) { return symbol_type (token::TOK_ACTION_CTL_RULE_REMOVE_BY_TAG, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_ACTION_CTL_RULE_REMOVE_TARGET_BY_ID (std::string v, location_type l) { return symbol_type (token::TOK_ACTION_CTL_RULE_REMOVE_TARGET_BY_ID, std::move (v), std::move (l)); } #else static symbol_type make_ACTION_CTL_RULE_REMOVE_TARGET_BY_ID (const std::string& v, const location_type& l) { return symbol_type (token::TOK_ACTION_CTL_RULE_REMOVE_TARGET_BY_ID, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_ACTION_CTL_RULE_REMOVE_TARGET_BY_TAG (std::string v, location_type l) { return symbol_type (token::TOK_ACTION_CTL_RULE_REMOVE_TARGET_BY_TAG, std::move (v), std::move (l)); } #else static symbol_type make_ACTION_CTL_RULE_REMOVE_TARGET_BY_TAG (const std::string& v, const location_type& l) { return symbol_type (token::TOK_ACTION_CTL_RULE_REMOVE_TARGET_BY_TAG, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_ACTION_DENY (std::string v, location_type l) { return symbol_type (token::TOK_ACTION_DENY, std::move (v), std::move (l)); } #else static symbol_type make_ACTION_DENY (const std::string& v, const location_type& l) { return symbol_type (token::TOK_ACTION_DENY, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_ACTION_DEPRECATE_VAR (std::string v, location_type l) { return symbol_type (token::TOK_ACTION_DEPRECATE_VAR, std::move (v), std::move (l)); } #else static symbol_type make_ACTION_DEPRECATE_VAR (const std::string& v, const location_type& l) { return symbol_type (token::TOK_ACTION_DEPRECATE_VAR, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_ACTION_DROP (std::string v, location_type l) { return symbol_type (token::TOK_ACTION_DROP, std::move (v), std::move (l)); } #else static symbol_type make_ACTION_DROP (const std::string& v, const location_type& l) { return symbol_type (token::TOK_ACTION_DROP, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_ACTION_EXEC (std::string v, location_type l) { return symbol_type (token::TOK_ACTION_EXEC, std::move (v), std::move (l)); } #else static symbol_type make_ACTION_EXEC (const std::string& v, const location_type& l) { return symbol_type (token::TOK_ACTION_EXEC, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_ACTION_EXPIRE_VAR (std::string v, location_type l) { return symbol_type (token::TOK_ACTION_EXPIRE_VAR, std::move (v), std::move (l)); } #else static symbol_type make_ACTION_EXPIRE_VAR (const std::string& v, const location_type& l) { return symbol_type (token::TOK_ACTION_EXPIRE_VAR, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_ACTION_ID (std::string v, location_type l) { return symbol_type (token::TOK_ACTION_ID, std::move (v), std::move (l)); } #else static symbol_type make_ACTION_ID (const std::string& v, const location_type& l) { return symbol_type (token::TOK_ACTION_ID, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_ACTION_INITCOL (std::string v, location_type l) { return symbol_type (token::TOK_ACTION_INITCOL, std::move (v), std::move (l)); } #else static symbol_type make_ACTION_INITCOL (const std::string& v, const location_type& l) { return symbol_type (token::TOK_ACTION_INITCOL, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_ACTION_LOG (std::string v, location_type l) { return symbol_type (token::TOK_ACTION_LOG, std::move (v), std::move (l)); } #else static symbol_type make_ACTION_LOG (const std::string& v, const location_type& l) { return symbol_type (token::TOK_ACTION_LOG, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_ACTION_LOG_DATA (std::string v, location_type l) { return symbol_type (token::TOK_ACTION_LOG_DATA, std::move (v), std::move (l)); } #else static symbol_type make_ACTION_LOG_DATA (const std::string& v, const location_type& l) { return symbol_type (token::TOK_ACTION_LOG_DATA, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_ACTION_MATURITY (std::string v, location_type l) { return symbol_type (token::TOK_ACTION_MATURITY, std::move (v), std::move (l)); } #else static symbol_type make_ACTION_MATURITY (const std::string& v, const location_type& l) { return symbol_type (token::TOK_ACTION_MATURITY, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_ACTION_MSG (std::string v, location_type l) { return symbol_type (token::TOK_ACTION_MSG, std::move (v), std::move (l)); } #else static symbol_type make_ACTION_MSG (const std::string& v, const location_type& l) { return symbol_type (token::TOK_ACTION_MSG, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_ACTION_MULTI_MATCH (std::string v, location_type l) { return symbol_type (token::TOK_ACTION_MULTI_MATCH, std::move (v), std::move (l)); } #else static symbol_type make_ACTION_MULTI_MATCH (const std::string& v, const location_type& l) { return symbol_type (token::TOK_ACTION_MULTI_MATCH, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_ACTION_NO_AUDIT_LOG (std::string v, location_type l) { return symbol_type (token::TOK_ACTION_NO_AUDIT_LOG, std::move (v), std::move (l)); } #else static symbol_type make_ACTION_NO_AUDIT_LOG (const std::string& v, const location_type& l) { return symbol_type (token::TOK_ACTION_NO_AUDIT_LOG, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_ACTION_NO_LOG (std::string v, location_type l) { return symbol_type (token::TOK_ACTION_NO_LOG, std::move (v), std::move (l)); } #else static symbol_type make_ACTION_NO_LOG (const std::string& v, const location_type& l) { return symbol_type (token::TOK_ACTION_NO_LOG, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_ACTION_PASS (std::string v, location_type l) { return symbol_type (token::TOK_ACTION_PASS, std::move (v), std::move (l)); } #else static symbol_type make_ACTION_PASS (const std::string& v, const location_type& l) { return symbol_type (token::TOK_ACTION_PASS, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_ACTION_PAUSE (std::string v, location_type l) { return symbol_type (token::TOK_ACTION_PAUSE, std::move (v), std::move (l)); } #else static symbol_type make_ACTION_PAUSE (const std::string& v, const location_type& l) { return symbol_type (token::TOK_ACTION_PAUSE, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_ACTION_PHASE (std::string v, location_type l) { return symbol_type (token::TOK_ACTION_PHASE, std::move (v), std::move (l)); } #else static symbol_type make_ACTION_PHASE (const std::string& v, const location_type& l) { return symbol_type (token::TOK_ACTION_PHASE, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_ACTION_PREPEND (std::string v, location_type l) { return symbol_type (token::TOK_ACTION_PREPEND, std::move (v), std::move (l)); } #else static symbol_type make_ACTION_PREPEND (const std::string& v, const location_type& l) { return symbol_type (token::TOK_ACTION_PREPEND, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_ACTION_PROXY (std::string v, location_type l) { return symbol_type (token::TOK_ACTION_PROXY, std::move (v), std::move (l)); } #else static symbol_type make_ACTION_PROXY (const std::string& v, const location_type& l) { return symbol_type (token::TOK_ACTION_PROXY, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_ACTION_REDIRECT (std::string v, location_type l) { return symbol_type (token::TOK_ACTION_REDIRECT, std::move (v), std::move (l)); } #else static symbol_type make_ACTION_REDIRECT (const std::string& v, const location_type& l) { return symbol_type (token::TOK_ACTION_REDIRECT, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_ACTION_REV (std::string v, location_type l) { return symbol_type (token::TOK_ACTION_REV, std::move (v), std::move (l)); } #else static symbol_type make_ACTION_REV (const std::string& v, const location_type& l) { return symbol_type (token::TOK_ACTION_REV, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_ACTION_SANITISE_ARG (std::string v, location_type l) { return symbol_type (token::TOK_ACTION_SANITISE_ARG, std::move (v), std::move (l)); } #else static symbol_type make_ACTION_SANITISE_ARG (const std::string& v, const location_type& l) { return symbol_type (token::TOK_ACTION_SANITISE_ARG, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_ACTION_SANITISE_MATCHED (std::string v, location_type l) { return symbol_type (token::TOK_ACTION_SANITISE_MATCHED, std::move (v), std::move (l)); } #else static symbol_type make_ACTION_SANITISE_MATCHED (const std::string& v, const location_type& l) { return symbol_type (token::TOK_ACTION_SANITISE_MATCHED, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_ACTION_SANITISE_MATCHED_BYTES (std::string v, location_type l) { return symbol_type (token::TOK_ACTION_SANITISE_MATCHED_BYTES, std::move (v), std::move (l)); } #else static symbol_type make_ACTION_SANITISE_MATCHED_BYTES (const std::string& v, const location_type& l) { return symbol_type (token::TOK_ACTION_SANITISE_MATCHED_BYTES, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_ACTION_SANITISE_REQUEST_HEADER (std::string v, location_type l) { return symbol_type (token::TOK_ACTION_SANITISE_REQUEST_HEADER, std::move (v), std::move (l)); } #else static symbol_type make_ACTION_SANITISE_REQUEST_HEADER (const std::string& v, const location_type& l) { return symbol_type (token::TOK_ACTION_SANITISE_REQUEST_HEADER, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_ACTION_SANITISE_RESPONSE_HEADER (std::string v, location_type l) { return symbol_type (token::TOK_ACTION_SANITISE_RESPONSE_HEADER, std::move (v), std::move (l)); } #else static symbol_type make_ACTION_SANITISE_RESPONSE_HEADER (const std::string& v, const location_type& l) { return symbol_type (token::TOK_ACTION_SANITISE_RESPONSE_HEADER, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_ACTION_SETENV (std::string v, location_type l) { return symbol_type (token::TOK_ACTION_SETENV, std::move (v), std::move (l)); } #else static symbol_type make_ACTION_SETENV (const std::string& v, const location_type& l) { return symbol_type (token::TOK_ACTION_SETENV, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_ACTION_SETRSC (std::string v, location_type l) { return symbol_type (token::TOK_ACTION_SETRSC, std::move (v), std::move (l)); } #else static symbol_type make_ACTION_SETRSC (const std::string& v, const location_type& l) { return symbol_type (token::TOK_ACTION_SETRSC, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_ACTION_SETSID (std::string v, location_type l) { return symbol_type (token::TOK_ACTION_SETSID, std::move (v), std::move (l)); } #else static symbol_type make_ACTION_SETSID (const std::string& v, const location_type& l) { return symbol_type (token::TOK_ACTION_SETSID, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_ACTION_SETUID (std::string v, location_type l) { return symbol_type (token::TOK_ACTION_SETUID, std::move (v), std::move (l)); } #else static symbol_type make_ACTION_SETUID (const std::string& v, const location_type& l) { return symbol_type (token::TOK_ACTION_SETUID, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_ACTION_SEVERITY (std::string v, location_type l) { return symbol_type (token::TOK_ACTION_SEVERITY, std::move (v), std::move (l)); } #else static symbol_type make_ACTION_SEVERITY (const std::string& v, const location_type& l) { return symbol_type (token::TOK_ACTION_SEVERITY, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_ACTION_SKIP (std::string v, location_type l) { return symbol_type (token::TOK_ACTION_SKIP, std::move (v), std::move (l)); } #else static symbol_type make_ACTION_SKIP (const std::string& v, const location_type& l) { return symbol_type (token::TOK_ACTION_SKIP, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_ACTION_SKIP_AFTER (std::string v, location_type l) { return symbol_type (token::TOK_ACTION_SKIP_AFTER, std::move (v), std::move (l)); } #else static symbol_type make_ACTION_SKIP_AFTER (const std::string& v, const location_type& l) { return symbol_type (token::TOK_ACTION_SKIP_AFTER, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_ACTION_STATUS (std::string v, location_type l) { return symbol_type (token::TOK_ACTION_STATUS, std::move (v), std::move (l)); } #else static symbol_type make_ACTION_STATUS (const std::string& v, const location_type& l) { return symbol_type (token::TOK_ACTION_STATUS, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_ACTION_TAG (std::string v, location_type l) { return symbol_type (token::TOK_ACTION_TAG, std::move (v), std::move (l)); } #else static symbol_type make_ACTION_TAG (const std::string& v, const location_type& l) { return symbol_type (token::TOK_ACTION_TAG, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_ACTION_TRANSFORMATION_BASE_64_ENCODE (std::string v, location_type l) { return symbol_type (token::TOK_ACTION_TRANSFORMATION_BASE_64_ENCODE, std::move (v), std::move (l)); } #else static symbol_type make_ACTION_TRANSFORMATION_BASE_64_ENCODE (const std::string& v, const location_type& l) { return symbol_type (token::TOK_ACTION_TRANSFORMATION_BASE_64_ENCODE, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_ACTION_TRANSFORMATION_BASE_64_DECODE (std::string v, location_type l) { return symbol_type (token::TOK_ACTION_TRANSFORMATION_BASE_64_DECODE, std::move (v), std::move (l)); } #else static symbol_type make_ACTION_TRANSFORMATION_BASE_64_DECODE (const std::string& v, const location_type& l) { return symbol_type (token::TOK_ACTION_TRANSFORMATION_BASE_64_DECODE, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_ACTION_TRANSFORMATION_BASE_64_DECODE_EXT (std::string v, location_type l) { return symbol_type (token::TOK_ACTION_TRANSFORMATION_BASE_64_DECODE_EXT, std::move (v), std::move (l)); } #else static symbol_type make_ACTION_TRANSFORMATION_BASE_64_DECODE_EXT (const std::string& v, const location_type& l) { return symbol_type (token::TOK_ACTION_TRANSFORMATION_BASE_64_DECODE_EXT, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_ACTION_TRANSFORMATION_CMD_LINE (std::string v, location_type l) { return symbol_type (token::TOK_ACTION_TRANSFORMATION_CMD_LINE, std::move (v), std::move (l)); } #else static symbol_type make_ACTION_TRANSFORMATION_CMD_LINE (const std::string& v, const location_type& l) { return symbol_type (token::TOK_ACTION_TRANSFORMATION_CMD_LINE, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_ACTION_TRANSFORMATION_COMPRESS_WHITESPACE (std::string v, location_type l) { return symbol_type (token::TOK_ACTION_TRANSFORMATION_COMPRESS_WHITESPACE, std::move (v), std::move (l)); } #else static symbol_type make_ACTION_TRANSFORMATION_COMPRESS_WHITESPACE (const std::string& v, const location_type& l) { return symbol_type (token::TOK_ACTION_TRANSFORMATION_COMPRESS_WHITESPACE, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_ACTION_TRANSFORMATION_CSS_DECODE (std::string v, location_type l) { return symbol_type (token::TOK_ACTION_TRANSFORMATION_CSS_DECODE, std::move (v), std::move (l)); } #else static symbol_type make_ACTION_TRANSFORMATION_CSS_DECODE (const std::string& v, const location_type& l) { return symbol_type (token::TOK_ACTION_TRANSFORMATION_CSS_DECODE, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_ACTION_TRANSFORMATION_ESCAPE_SEQ_DECODE (std::string v, location_type l) { return symbol_type (token::TOK_ACTION_TRANSFORMATION_ESCAPE_SEQ_DECODE, std::move (v), std::move (l)); } #else static symbol_type make_ACTION_TRANSFORMATION_ESCAPE_SEQ_DECODE (const std::string& v, const location_type& l) { return symbol_type (token::TOK_ACTION_TRANSFORMATION_ESCAPE_SEQ_DECODE, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_ACTION_TRANSFORMATION_HEX_ENCODE (std::string v, location_type l) { return symbol_type (token::TOK_ACTION_TRANSFORMATION_HEX_ENCODE, std::move (v), std::move (l)); } #else static symbol_type make_ACTION_TRANSFORMATION_HEX_ENCODE (const std::string& v, const location_type& l) { return symbol_type (token::TOK_ACTION_TRANSFORMATION_HEX_ENCODE, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_ACTION_TRANSFORMATION_HEX_DECODE (std::string v, location_type l) { return symbol_type (token::TOK_ACTION_TRANSFORMATION_HEX_DECODE, std::move (v), std::move (l)); } #else static symbol_type make_ACTION_TRANSFORMATION_HEX_DECODE (const std::string& v, const location_type& l) { return symbol_type (token::TOK_ACTION_TRANSFORMATION_HEX_DECODE, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_ACTION_TRANSFORMATION_HTML_ENTITY_DECODE (std::string v, location_type l) { return symbol_type (token::TOK_ACTION_TRANSFORMATION_HTML_ENTITY_DECODE, std::move (v), std::move (l)); } #else static symbol_type make_ACTION_TRANSFORMATION_HTML_ENTITY_DECODE (const std::string& v, const location_type& l) { return symbol_type (token::TOK_ACTION_TRANSFORMATION_HTML_ENTITY_DECODE, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_ACTION_TRANSFORMATION_JS_DECODE (std::string v, location_type l) { return symbol_type (token::TOK_ACTION_TRANSFORMATION_JS_DECODE, std::move (v), std::move (l)); } #else static symbol_type make_ACTION_TRANSFORMATION_JS_DECODE (const std::string& v, const location_type& l) { return symbol_type (token::TOK_ACTION_TRANSFORMATION_JS_DECODE, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_ACTION_TRANSFORMATION_LENGTH (std::string v, location_type l) { return symbol_type (token::TOK_ACTION_TRANSFORMATION_LENGTH, std::move (v), std::move (l)); } #else static symbol_type make_ACTION_TRANSFORMATION_LENGTH (const std::string& v, const location_type& l) { return symbol_type (token::TOK_ACTION_TRANSFORMATION_LENGTH, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_ACTION_TRANSFORMATION_LOWERCASE (std::string v, location_type l) { return symbol_type (token::TOK_ACTION_TRANSFORMATION_LOWERCASE, std::move (v), std::move (l)); } #else static symbol_type make_ACTION_TRANSFORMATION_LOWERCASE (const std::string& v, const location_type& l) { return symbol_type (token::TOK_ACTION_TRANSFORMATION_LOWERCASE, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_ACTION_TRANSFORMATION_MD5 (std::string v, location_type l) { return symbol_type (token::TOK_ACTION_TRANSFORMATION_MD5, std::move (v), std::move (l)); } #else static symbol_type make_ACTION_TRANSFORMATION_MD5 (const std::string& v, const location_type& l) { return symbol_type (token::TOK_ACTION_TRANSFORMATION_MD5, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_ACTION_TRANSFORMATION_NONE (std::string v, location_type l) { return symbol_type (token::TOK_ACTION_TRANSFORMATION_NONE, std::move (v), std::move (l)); } #else static symbol_type make_ACTION_TRANSFORMATION_NONE (const std::string& v, const location_type& l) { return symbol_type (token::TOK_ACTION_TRANSFORMATION_NONE, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_ACTION_TRANSFORMATION_NORMALISE_PATH (std::string v, location_type l) { return symbol_type (token::TOK_ACTION_TRANSFORMATION_NORMALISE_PATH, std::move (v), std::move (l)); } #else static symbol_type make_ACTION_TRANSFORMATION_NORMALISE_PATH (const std::string& v, const location_type& l) { return symbol_type (token::TOK_ACTION_TRANSFORMATION_NORMALISE_PATH, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_ACTION_TRANSFORMATION_NORMALISE_PATH_WIN (std::string v, location_type l) { return symbol_type (token::TOK_ACTION_TRANSFORMATION_NORMALISE_PATH_WIN, std::move (v), std::move (l)); } #else static symbol_type make_ACTION_TRANSFORMATION_NORMALISE_PATH_WIN (const std::string& v, const location_type& l) { return symbol_type (token::TOK_ACTION_TRANSFORMATION_NORMALISE_PATH_WIN, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_ACTION_TRANSFORMATION_PARITY_EVEN_7_BIT (std::string v, location_type l) { return symbol_type (token::TOK_ACTION_TRANSFORMATION_PARITY_EVEN_7_BIT, std::move (v), std::move (l)); } #else static symbol_type make_ACTION_TRANSFORMATION_PARITY_EVEN_7_BIT (const std::string& v, const location_type& l) { return symbol_type (token::TOK_ACTION_TRANSFORMATION_PARITY_EVEN_7_BIT, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_ACTION_TRANSFORMATION_PARITY_ODD_7_BIT (std::string v, location_type l) { return symbol_type (token::TOK_ACTION_TRANSFORMATION_PARITY_ODD_7_BIT, std::move (v), std::move (l)); } #else static symbol_type make_ACTION_TRANSFORMATION_PARITY_ODD_7_BIT (const std::string& v, const location_type& l) { return symbol_type (token::TOK_ACTION_TRANSFORMATION_PARITY_ODD_7_BIT, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_ACTION_TRANSFORMATION_PARITY_ZERO_7_BIT (std::string v, location_type l) { return symbol_type (token::TOK_ACTION_TRANSFORMATION_PARITY_ZERO_7_BIT, std::move (v), std::move (l)); } #else static symbol_type make_ACTION_TRANSFORMATION_PARITY_ZERO_7_BIT (const std::string& v, const location_type& l) { return symbol_type (token::TOK_ACTION_TRANSFORMATION_PARITY_ZERO_7_BIT, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_ACTION_TRANSFORMATION_REMOVE_COMMENTS (std::string v, location_type l) { return symbol_type (token::TOK_ACTION_TRANSFORMATION_REMOVE_COMMENTS, std::move (v), std::move (l)); } #else static symbol_type make_ACTION_TRANSFORMATION_REMOVE_COMMENTS (const std::string& v, const location_type& l) { return symbol_type (token::TOK_ACTION_TRANSFORMATION_REMOVE_COMMENTS, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_ACTION_TRANSFORMATION_REMOVE_COMMENTS_CHAR (std::string v, location_type l) { return symbol_type (token::TOK_ACTION_TRANSFORMATION_REMOVE_COMMENTS_CHAR, std::move (v), std::move (l)); } #else static symbol_type make_ACTION_TRANSFORMATION_REMOVE_COMMENTS_CHAR (const std::string& v, const location_type& l) { return symbol_type (token::TOK_ACTION_TRANSFORMATION_REMOVE_COMMENTS_CHAR, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_ACTION_TRANSFORMATION_REMOVE_NULLS (std::string v, location_type l) { return symbol_type (token::TOK_ACTION_TRANSFORMATION_REMOVE_NULLS, std::move (v), std::move (l)); } #else static symbol_type make_ACTION_TRANSFORMATION_REMOVE_NULLS (const std::string& v, const location_type& l) { return symbol_type (token::TOK_ACTION_TRANSFORMATION_REMOVE_NULLS, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_ACTION_TRANSFORMATION_REMOVE_WHITESPACE (std::string v, location_type l) { return symbol_type (token::TOK_ACTION_TRANSFORMATION_REMOVE_WHITESPACE, std::move (v), std::move (l)); } #else static symbol_type make_ACTION_TRANSFORMATION_REMOVE_WHITESPACE (const std::string& v, const location_type& l) { return symbol_type (token::TOK_ACTION_TRANSFORMATION_REMOVE_WHITESPACE, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_ACTION_TRANSFORMATION_REPLACE_COMMENTS (std::string v, location_type l) { return symbol_type (token::TOK_ACTION_TRANSFORMATION_REPLACE_COMMENTS, std::move (v), std::move (l)); } #else static symbol_type make_ACTION_TRANSFORMATION_REPLACE_COMMENTS (const std::string& v, const location_type& l) { return symbol_type (token::TOK_ACTION_TRANSFORMATION_REPLACE_COMMENTS, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_ACTION_TRANSFORMATION_REPLACE_NULLS (std::string v, location_type l) { return symbol_type (token::TOK_ACTION_TRANSFORMATION_REPLACE_NULLS, std::move (v), std::move (l)); } #else static symbol_type make_ACTION_TRANSFORMATION_REPLACE_NULLS (const std::string& v, const location_type& l) { return symbol_type (token::TOK_ACTION_TRANSFORMATION_REPLACE_NULLS, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_ACTION_TRANSFORMATION_SHA1 (std::string v, location_type l) { return symbol_type (token::TOK_ACTION_TRANSFORMATION_SHA1, std::move (v), std::move (l)); } #else static symbol_type make_ACTION_TRANSFORMATION_SHA1 (const std::string& v, const location_type& l) { return symbol_type (token::TOK_ACTION_TRANSFORMATION_SHA1, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_ACTION_TRANSFORMATION_SQL_HEX_DECODE (std::string v, location_type l) { return symbol_type (token::TOK_ACTION_TRANSFORMATION_SQL_HEX_DECODE, std::move (v), std::move (l)); } #else static symbol_type make_ACTION_TRANSFORMATION_SQL_HEX_DECODE (const std::string& v, const location_type& l) { return symbol_type (token::TOK_ACTION_TRANSFORMATION_SQL_HEX_DECODE, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_ACTION_TRANSFORMATION_TRIM (std::string v, location_type l) { return symbol_type (token::TOK_ACTION_TRANSFORMATION_TRIM, std::move (v), std::move (l)); } #else static symbol_type make_ACTION_TRANSFORMATION_TRIM (const std::string& v, const location_type& l) { return symbol_type (token::TOK_ACTION_TRANSFORMATION_TRIM, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_ACTION_TRANSFORMATION_TRIM_LEFT (std::string v, location_type l) { return symbol_type (token::TOK_ACTION_TRANSFORMATION_TRIM_LEFT, std::move (v), std::move (l)); } #else static symbol_type make_ACTION_TRANSFORMATION_TRIM_LEFT (const std::string& v, const location_type& l) { return symbol_type (token::TOK_ACTION_TRANSFORMATION_TRIM_LEFT, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_ACTION_TRANSFORMATION_TRIM_RIGHT (std::string v, location_type l) { return symbol_type (token::TOK_ACTION_TRANSFORMATION_TRIM_RIGHT, std::move (v), std::move (l)); } #else static symbol_type make_ACTION_TRANSFORMATION_TRIM_RIGHT (const std::string& v, const location_type& l) { return symbol_type (token::TOK_ACTION_TRANSFORMATION_TRIM_RIGHT, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_ACTION_TRANSFORMATION_UPPERCASE (std::string v, location_type l) { return symbol_type (token::TOK_ACTION_TRANSFORMATION_UPPERCASE, std::move (v), std::move (l)); } #else static symbol_type make_ACTION_TRANSFORMATION_UPPERCASE (const std::string& v, const location_type& l) { return symbol_type (token::TOK_ACTION_TRANSFORMATION_UPPERCASE, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_ACTION_TRANSFORMATION_URL_ENCODE (std::string v, location_type l) { return symbol_type (token::TOK_ACTION_TRANSFORMATION_URL_ENCODE, std::move (v), std::move (l)); } #else static symbol_type make_ACTION_TRANSFORMATION_URL_ENCODE (const std::string& v, const location_type& l) { return symbol_type (token::TOK_ACTION_TRANSFORMATION_URL_ENCODE, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_ACTION_TRANSFORMATION_URL_DECODE (std::string v, location_type l) { return symbol_type (token::TOK_ACTION_TRANSFORMATION_URL_DECODE, std::move (v), std::move (l)); } #else static symbol_type make_ACTION_TRANSFORMATION_URL_DECODE (const std::string& v, const location_type& l) { return symbol_type (token::TOK_ACTION_TRANSFORMATION_URL_DECODE, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_ACTION_TRANSFORMATION_URL_DECODE_UNI (std::string v, location_type l) { return symbol_type (token::TOK_ACTION_TRANSFORMATION_URL_DECODE_UNI, std::move (v), std::move (l)); } #else static symbol_type make_ACTION_TRANSFORMATION_URL_DECODE_UNI (const std::string& v, const location_type& l) { return symbol_type (token::TOK_ACTION_TRANSFORMATION_URL_DECODE_UNI, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_ACTION_TRANSFORMATION_UTF8_TO_UNICODE (std::string v, location_type l) { return symbol_type (token::TOK_ACTION_TRANSFORMATION_UTF8_TO_UNICODE, std::move (v), std::move (l)); } #else static symbol_type make_ACTION_TRANSFORMATION_UTF8_TO_UNICODE (const std::string& v, const location_type& l) { return symbol_type (token::TOK_ACTION_TRANSFORMATION_UTF8_TO_UNICODE, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_ACTION_VER (std::string v, location_type l) { return symbol_type (token::TOK_ACTION_VER, std::move (v), std::move (l)); } #else static symbol_type make_ACTION_VER (const std::string& v, const location_type& l) { return symbol_type (token::TOK_ACTION_VER, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_ACTION_XMLNS (std::string v, location_type l) { return symbol_type (token::TOK_ACTION_XMLNS, std::move (v), std::move (l)); } #else static symbol_type make_ACTION_XMLNS (const std::string& v, const location_type& l) { return symbol_type (token::TOK_ACTION_XMLNS, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_CONFIG_COMPONENT_SIG (std::string v, location_type l) { return symbol_type (token::TOK_CONFIG_COMPONENT_SIG, std::move (v), std::move (l)); } #else static symbol_type make_CONFIG_COMPONENT_SIG (const std::string& v, const location_type& l) { return symbol_type (token::TOK_CONFIG_COMPONENT_SIG, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_CONFIG_CONN_ENGINE (std::string v, location_type l) { return symbol_type (token::TOK_CONFIG_CONN_ENGINE, std::move (v), std::move (l)); } #else static symbol_type make_CONFIG_CONN_ENGINE (const std::string& v, const location_type& l) { return symbol_type (token::TOK_CONFIG_CONN_ENGINE, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_CONFIG_SEC_ARGUMENT_SEPARATOR (std::string v, location_type l) { return symbol_type (token::TOK_CONFIG_SEC_ARGUMENT_SEPARATOR, std::move (v), std::move (l)); } #else static symbol_type make_CONFIG_SEC_ARGUMENT_SEPARATOR (const std::string& v, const location_type& l) { return symbol_type (token::TOK_CONFIG_SEC_ARGUMENT_SEPARATOR, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_CONFIG_SEC_WEB_APP_ID (std::string v, location_type l) { return symbol_type (token::TOK_CONFIG_SEC_WEB_APP_ID, std::move (v), std::move (l)); } #else static symbol_type make_CONFIG_SEC_WEB_APP_ID (const std::string& v, const location_type& l) { return symbol_type (token::TOK_CONFIG_SEC_WEB_APP_ID, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_CONFIG_SEC_SERVER_SIG (std::string v, location_type l) { return symbol_type (token::TOK_CONFIG_SEC_SERVER_SIG, std::move (v), std::move (l)); } #else static symbol_type make_CONFIG_SEC_SERVER_SIG (const std::string& v, const location_type& l) { return symbol_type (token::TOK_CONFIG_SEC_SERVER_SIG, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_CONFIG_DIR_AUDIT_DIR (std::string v, location_type l) { return symbol_type (token::TOK_CONFIG_DIR_AUDIT_DIR, std::move (v), std::move (l)); } #else static symbol_type make_CONFIG_DIR_AUDIT_DIR (const std::string& v, const location_type& l) { return symbol_type (token::TOK_CONFIG_DIR_AUDIT_DIR, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_CONFIG_DIR_AUDIT_DIR_MOD (std::string v, location_type l) { return symbol_type (token::TOK_CONFIG_DIR_AUDIT_DIR_MOD, std::move (v), std::move (l)); } #else static symbol_type make_CONFIG_DIR_AUDIT_DIR_MOD (const std::string& v, const location_type& l) { return symbol_type (token::TOK_CONFIG_DIR_AUDIT_DIR_MOD, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_CONFIG_DIR_AUDIT_ENG (std::string v, location_type l) { return symbol_type (token::TOK_CONFIG_DIR_AUDIT_ENG, std::move (v), std::move (l)); } #else static symbol_type make_CONFIG_DIR_AUDIT_ENG (const std::string& v, const location_type& l) { return symbol_type (token::TOK_CONFIG_DIR_AUDIT_ENG, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_CONFIG_DIR_AUDIT_FLE_MOD (std::string v, location_type l) { return symbol_type (token::TOK_CONFIG_DIR_AUDIT_FLE_MOD, std::move (v), std::move (l)); } #else static symbol_type make_CONFIG_DIR_AUDIT_FLE_MOD (const std::string& v, const location_type& l) { return symbol_type (token::TOK_CONFIG_DIR_AUDIT_FLE_MOD, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_CONFIG_DIR_AUDIT_LOG (std::string v, location_type l) { return symbol_type (token::TOK_CONFIG_DIR_AUDIT_LOG, std::move (v), std::move (l)); } #else static symbol_type make_CONFIG_DIR_AUDIT_LOG (const std::string& v, const location_type& l) { return symbol_type (token::TOK_CONFIG_DIR_AUDIT_LOG, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_CONFIG_DIR_AUDIT_LOG2 (std::string v, location_type l) { return symbol_type (token::TOK_CONFIG_DIR_AUDIT_LOG2, std::move (v), std::move (l)); } #else static symbol_type make_CONFIG_DIR_AUDIT_LOG2 (const std::string& v, const location_type& l) { return symbol_type (token::TOK_CONFIG_DIR_AUDIT_LOG2, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_CONFIG_DIR_AUDIT_LOG_P (std::string v, location_type l) { return symbol_type (token::TOK_CONFIG_DIR_AUDIT_LOG_P, std::move (v), std::move (l)); } #else static symbol_type make_CONFIG_DIR_AUDIT_LOG_P (const std::string& v, const location_type& l) { return symbol_type (token::TOK_CONFIG_DIR_AUDIT_LOG_P, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_CONFIG_DIR_AUDIT_STS (std::string v, location_type l) { return symbol_type (token::TOK_CONFIG_DIR_AUDIT_STS, std::move (v), std::move (l)); } #else static symbol_type make_CONFIG_DIR_AUDIT_STS (const std::string& v, const location_type& l) { return symbol_type (token::TOK_CONFIG_DIR_AUDIT_STS, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_CONFIG_DIR_AUDIT_TPE (std::string v, location_type l) { return symbol_type (token::TOK_CONFIG_DIR_AUDIT_TPE, std::move (v), std::move (l)); } #else static symbol_type make_CONFIG_DIR_AUDIT_TPE (const std::string& v, const location_type& l) { return symbol_type (token::TOK_CONFIG_DIR_AUDIT_TPE, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_CONFIG_DIR_DEBUG_LOG (std::string v, location_type l) { return symbol_type (token::TOK_CONFIG_DIR_DEBUG_LOG, std::move (v), std::move (l)); } #else static symbol_type make_CONFIG_DIR_DEBUG_LOG (const std::string& v, const location_type& l) { return symbol_type (token::TOK_CONFIG_DIR_DEBUG_LOG, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_CONFIG_DIR_DEBUG_LVL (std::string v, location_type l) { return symbol_type (token::TOK_CONFIG_DIR_DEBUG_LVL, std::move (v), std::move (l)); } #else static symbol_type make_CONFIG_DIR_DEBUG_LVL (const std::string& v, const location_type& l) { return symbol_type (token::TOK_CONFIG_DIR_DEBUG_LVL, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_CONFIG_SEC_CACHE_TRANSFORMATIONS (std::string v, location_type l) { return symbol_type (token::TOK_CONFIG_SEC_CACHE_TRANSFORMATIONS, std::move (v), std::move (l)); } #else static symbol_type make_CONFIG_SEC_CACHE_TRANSFORMATIONS (const std::string& v, const location_type& l) { return symbol_type (token::TOK_CONFIG_SEC_CACHE_TRANSFORMATIONS, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_CONFIG_SEC_DISABLE_BACKEND_COMPRESS (std::string v, location_type l) { return symbol_type (token::TOK_CONFIG_SEC_DISABLE_BACKEND_COMPRESS, std::move (v), std::move (l)); } #else static symbol_type make_CONFIG_SEC_DISABLE_BACKEND_COMPRESS (const std::string& v, const location_type& l) { return symbol_type (token::TOK_CONFIG_SEC_DISABLE_BACKEND_COMPRESS, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_CONFIG_SEC_HASH_ENGINE (std::string v, location_type l) { return symbol_type (token::TOK_CONFIG_SEC_HASH_ENGINE, std::move (v), std::move (l)); } #else static symbol_type make_CONFIG_SEC_HASH_ENGINE (const std::string& v, const location_type& l) { return symbol_type (token::TOK_CONFIG_SEC_HASH_ENGINE, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_CONFIG_SEC_HASH_KEY (std::string v, location_type l) { return symbol_type (token::TOK_CONFIG_SEC_HASH_KEY, std::move (v), std::move (l)); } #else static symbol_type make_CONFIG_SEC_HASH_KEY (const std::string& v, const location_type& l) { return symbol_type (token::TOK_CONFIG_SEC_HASH_KEY, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_CONFIG_SEC_HASH_PARAM (std::string v, location_type l) { return symbol_type (token::TOK_CONFIG_SEC_HASH_PARAM, std::move (v), std::move (l)); } #else static symbol_type make_CONFIG_SEC_HASH_PARAM (const std::string& v, const location_type& l) { return symbol_type (token::TOK_CONFIG_SEC_HASH_PARAM, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_CONFIG_SEC_HASH_METHOD_RX (std::string v, location_type l) { return symbol_type (token::TOK_CONFIG_SEC_HASH_METHOD_RX, std::move (v), std::move (l)); } #else static symbol_type make_CONFIG_SEC_HASH_METHOD_RX (const std::string& v, const location_type& l) { return symbol_type (token::TOK_CONFIG_SEC_HASH_METHOD_RX, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_CONFIG_SEC_HASH_METHOD_PM (std::string v, location_type l) { return symbol_type (token::TOK_CONFIG_SEC_HASH_METHOD_PM, std::move (v), std::move (l)); } #else static symbol_type make_CONFIG_SEC_HASH_METHOD_PM (const std::string& v, const location_type& l) { return symbol_type (token::TOK_CONFIG_SEC_HASH_METHOD_PM, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_CONFIG_SEC_CHROOT_DIR (std::string v, location_type l) { return symbol_type (token::TOK_CONFIG_SEC_CHROOT_DIR, std::move (v), std::move (l)); } #else static symbol_type make_CONFIG_SEC_CHROOT_DIR (const std::string& v, const location_type& l) { return symbol_type (token::TOK_CONFIG_SEC_CHROOT_DIR, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_CONFIG_DIR_GEO_DB (std::string v, location_type l) { return symbol_type (token::TOK_CONFIG_DIR_GEO_DB, std::move (v), std::move (l)); } #else static symbol_type make_CONFIG_DIR_GEO_DB (const std::string& v, const location_type& l) { return symbol_type (token::TOK_CONFIG_DIR_GEO_DB, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_CONFIG_DIR_GSB_DB (std::string v, location_type l) { return symbol_type (token::TOK_CONFIG_DIR_GSB_DB, std::move (v), std::move (l)); } #else static symbol_type make_CONFIG_DIR_GSB_DB (const std::string& v, const location_type& l) { return symbol_type (token::TOK_CONFIG_DIR_GSB_DB, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_CONFIG_SEC_GUARDIAN_LOG (std::string v, location_type l) { return symbol_type (token::TOK_CONFIG_SEC_GUARDIAN_LOG, std::move (v), std::move (l)); } #else static symbol_type make_CONFIG_SEC_GUARDIAN_LOG (const std::string& v, const location_type& l) { return symbol_type (token::TOK_CONFIG_SEC_GUARDIAN_LOG, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_CONFIG_DIR_PCRE_MATCH_LIMIT (std::string v, location_type l) { return symbol_type (token::TOK_CONFIG_DIR_PCRE_MATCH_LIMIT, std::move (v), std::move (l)); } #else static symbol_type make_CONFIG_DIR_PCRE_MATCH_LIMIT (const std::string& v, const location_type& l) { return symbol_type (token::TOK_CONFIG_DIR_PCRE_MATCH_LIMIT, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_CONFIG_DIR_PCRE_MATCH_LIMIT_RECURSION (std::string v, location_type l) { return symbol_type (token::TOK_CONFIG_DIR_PCRE_MATCH_LIMIT_RECURSION, std::move (v), std::move (l)); } #else static symbol_type make_CONFIG_DIR_PCRE_MATCH_LIMIT_RECURSION (const std::string& v, const location_type& l) { return symbol_type (token::TOK_CONFIG_DIR_PCRE_MATCH_LIMIT_RECURSION, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_CONFIG_SEC_CONN_R_STATE_LIMIT (std::string v, location_type l) { return symbol_type (token::TOK_CONFIG_SEC_CONN_R_STATE_LIMIT, std::move (v), std::move (l)); } #else static symbol_type make_CONFIG_SEC_CONN_R_STATE_LIMIT (const std::string& v, const location_type& l) { return symbol_type (token::TOK_CONFIG_SEC_CONN_R_STATE_LIMIT, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_CONFIG_SEC_CONN_W_STATE_LIMIT (std::string v, location_type l) { return symbol_type (token::TOK_CONFIG_SEC_CONN_W_STATE_LIMIT, std::move (v), std::move (l)); } #else static symbol_type make_CONFIG_SEC_CONN_W_STATE_LIMIT (const std::string& v, const location_type& l) { return symbol_type (token::TOK_CONFIG_SEC_CONN_W_STATE_LIMIT, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_CONFIG_SEC_SENSOR_ID (std::string v, location_type l) { return symbol_type (token::TOK_CONFIG_SEC_SENSOR_ID, std::move (v), std::move (l)); } #else static symbol_type make_CONFIG_SEC_SENSOR_ID (const std::string& v, const location_type& l) { return symbol_type (token::TOK_CONFIG_SEC_SENSOR_ID, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_CONFIG_DIR_ARGS_LIMIT (std::string v, location_type l) { return symbol_type (token::TOK_CONFIG_DIR_ARGS_LIMIT, std::move (v), std::move (l)); } #else static symbol_type make_CONFIG_DIR_ARGS_LIMIT (const std::string& v, const location_type& l) { return symbol_type (token::TOK_CONFIG_DIR_ARGS_LIMIT, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_CONFIG_DIR_REQ_BODY_JSON_DEPTH_LIMIT (std::string v, location_type l) { return symbol_type (token::TOK_CONFIG_DIR_REQ_BODY_JSON_DEPTH_LIMIT, std::move (v), std::move (l)); } #else static symbol_type make_CONFIG_DIR_REQ_BODY_JSON_DEPTH_LIMIT (const std::string& v, const location_type& l) { return symbol_type (token::TOK_CONFIG_DIR_REQ_BODY_JSON_DEPTH_LIMIT, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_CONFIG_DIR_REQ_BODY (std::string v, location_type l) { return symbol_type (token::TOK_CONFIG_DIR_REQ_BODY, std::move (v), std::move (l)); } #else static symbol_type make_CONFIG_DIR_REQ_BODY (const std::string& v, const location_type& l) { return symbol_type (token::TOK_CONFIG_DIR_REQ_BODY, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_CONFIG_DIR_REQ_BODY_IN_MEMORY_LIMIT (std::string v, location_type l) { return symbol_type (token::TOK_CONFIG_DIR_REQ_BODY_IN_MEMORY_LIMIT, std::move (v), std::move (l)); } #else static symbol_type make_CONFIG_DIR_REQ_BODY_IN_MEMORY_LIMIT (const std::string& v, const location_type& l) { return symbol_type (token::TOK_CONFIG_DIR_REQ_BODY_IN_MEMORY_LIMIT, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_CONFIG_DIR_REQ_BODY_LIMIT (std::string v, location_type l) { return symbol_type (token::TOK_CONFIG_DIR_REQ_BODY_LIMIT, std::move (v), std::move (l)); } #else static symbol_type make_CONFIG_DIR_REQ_BODY_LIMIT (const std::string& v, const location_type& l) { return symbol_type (token::TOK_CONFIG_DIR_REQ_BODY_LIMIT, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_CONFIG_DIR_REQ_BODY_LIMIT_ACTION (std::string v, location_type l) { return symbol_type (token::TOK_CONFIG_DIR_REQ_BODY_LIMIT_ACTION, std::move (v), std::move (l)); } #else static symbol_type make_CONFIG_DIR_REQ_BODY_LIMIT_ACTION (const std::string& v, const location_type& l) { return symbol_type (token::TOK_CONFIG_DIR_REQ_BODY_LIMIT_ACTION, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_CONFIG_DIR_REQ_BODY_NO_FILES_LIMIT (std::string v, location_type l) { return symbol_type (token::TOK_CONFIG_DIR_REQ_BODY_NO_FILES_LIMIT, std::move (v), std::move (l)); } #else static symbol_type make_CONFIG_DIR_REQ_BODY_NO_FILES_LIMIT (const std::string& v, const location_type& l) { return symbol_type (token::TOK_CONFIG_DIR_REQ_BODY_NO_FILES_LIMIT, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_CONFIG_DIR_RES_BODY (std::string v, location_type l) { return symbol_type (token::TOK_CONFIG_DIR_RES_BODY, std::move (v), std::move (l)); } #else static symbol_type make_CONFIG_DIR_RES_BODY (const std::string& v, const location_type& l) { return symbol_type (token::TOK_CONFIG_DIR_RES_BODY, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_CONFIG_DIR_RES_BODY_LIMIT (std::string v, location_type l) { return symbol_type (token::TOK_CONFIG_DIR_RES_BODY_LIMIT, std::move (v), std::move (l)); } #else static symbol_type make_CONFIG_DIR_RES_BODY_LIMIT (const std::string& v, const location_type& l) { return symbol_type (token::TOK_CONFIG_DIR_RES_BODY_LIMIT, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_CONFIG_DIR_RES_BODY_LIMIT_ACTION (std::string v, location_type l) { return symbol_type (token::TOK_CONFIG_DIR_RES_BODY_LIMIT_ACTION, std::move (v), std::move (l)); } #else static symbol_type make_CONFIG_DIR_RES_BODY_LIMIT_ACTION (const std::string& v, const location_type& l) { return symbol_type (token::TOK_CONFIG_DIR_RES_BODY_LIMIT_ACTION, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_CONFIG_SEC_RULE_INHERITANCE (std::string v, location_type l) { return symbol_type (token::TOK_CONFIG_SEC_RULE_INHERITANCE, std::move (v), std::move (l)); } #else static symbol_type make_CONFIG_SEC_RULE_INHERITANCE (const std::string& v, const location_type& l) { return symbol_type (token::TOK_CONFIG_SEC_RULE_INHERITANCE, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_CONFIG_SEC_RULE_PERF_TIME (std::string v, location_type l) { return symbol_type (token::TOK_CONFIG_SEC_RULE_PERF_TIME, std::move (v), std::move (l)); } #else static symbol_type make_CONFIG_SEC_RULE_PERF_TIME (const std::string& v, const location_type& l) { return symbol_type (token::TOK_CONFIG_SEC_RULE_PERF_TIME, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_CONFIG_DIR_RULE_ENG (std::string v, location_type l) { return symbol_type (token::TOK_CONFIG_DIR_RULE_ENG, std::move (v), std::move (l)); } #else static symbol_type make_CONFIG_DIR_RULE_ENG (const std::string& v, const location_type& l) { return symbol_type (token::TOK_CONFIG_DIR_RULE_ENG, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_CONFIG_DIR_SEC_ACTION (std::string v, location_type l) { return symbol_type (token::TOK_CONFIG_DIR_SEC_ACTION, std::move (v), std::move (l)); } #else static symbol_type make_CONFIG_DIR_SEC_ACTION (const std::string& v, const location_type& l) { return symbol_type (token::TOK_CONFIG_DIR_SEC_ACTION, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_CONFIG_DIR_SEC_DEFAULT_ACTION (std::string v, location_type l) { return symbol_type (token::TOK_CONFIG_DIR_SEC_DEFAULT_ACTION, std::move (v), std::move (l)); } #else static symbol_type make_CONFIG_DIR_SEC_DEFAULT_ACTION (const std::string& v, const location_type& l) { return symbol_type (token::TOK_CONFIG_DIR_SEC_DEFAULT_ACTION, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_CONFIG_DIR_SEC_MARKER (std::string v, location_type l) { return symbol_type (token::TOK_CONFIG_DIR_SEC_MARKER, std::move (v), std::move (l)); } #else static symbol_type make_CONFIG_DIR_SEC_MARKER (const std::string& v, const location_type& l) { return symbol_type (token::TOK_CONFIG_DIR_SEC_MARKER, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_CONFIG_DIR_UNICODE_MAP_FILE (std::string v, location_type l) { return symbol_type (token::TOK_CONFIG_DIR_UNICODE_MAP_FILE, std::move (v), std::move (l)); } #else static symbol_type make_CONFIG_DIR_UNICODE_MAP_FILE (const std::string& v, const location_type& l) { return symbol_type (token::TOK_CONFIG_DIR_UNICODE_MAP_FILE, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_CONFIG_DIR_UNICODE_CODE_PAGE (std::string v, location_type l) { return symbol_type (token::TOK_CONFIG_DIR_UNICODE_CODE_PAGE, std::move (v), std::move (l)); } #else static symbol_type make_CONFIG_DIR_UNICODE_CODE_PAGE (const std::string& v, const location_type& l) { return symbol_type (token::TOK_CONFIG_DIR_UNICODE_CODE_PAGE, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_CONFIG_SEC_COLLECTION_TIMEOUT (std::string v, location_type l) { return symbol_type (token::TOK_CONFIG_SEC_COLLECTION_TIMEOUT, std::move (v), std::move (l)); } #else static symbol_type make_CONFIG_SEC_COLLECTION_TIMEOUT (const std::string& v, const location_type& l) { return symbol_type (token::TOK_CONFIG_SEC_COLLECTION_TIMEOUT, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_CONFIG_SEC_HTTP_BLKEY (std::string v, location_type l) { return symbol_type (token::TOK_CONFIG_SEC_HTTP_BLKEY, std::move (v), std::move (l)); } #else static symbol_type make_CONFIG_SEC_HTTP_BLKEY (const std::string& v, const location_type& l) { return symbol_type (token::TOK_CONFIG_SEC_HTTP_BLKEY, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_CONFIG_SEC_INTERCEPT_ON_ERROR (std::string v, location_type l) { return symbol_type (token::TOK_CONFIG_SEC_INTERCEPT_ON_ERROR, std::move (v), std::move (l)); } #else static symbol_type make_CONFIG_SEC_INTERCEPT_ON_ERROR (const std::string& v, const location_type& l) { return symbol_type (token::TOK_CONFIG_SEC_INTERCEPT_ON_ERROR, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_CONFIG_SEC_REMOTE_RULES_FAIL_ACTION (std::string v, location_type l) { return symbol_type (token::TOK_CONFIG_SEC_REMOTE_RULES_FAIL_ACTION, std::move (v), std::move (l)); } #else static symbol_type make_CONFIG_SEC_REMOTE_RULES_FAIL_ACTION (const std::string& v, const location_type& l) { return symbol_type (token::TOK_CONFIG_SEC_REMOTE_RULES_FAIL_ACTION, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_CONFIG_SEC_RULE_REMOVE_BY_ID (std::string v, location_type l) { return symbol_type (token::TOK_CONFIG_SEC_RULE_REMOVE_BY_ID, std::move (v), std::move (l)); } #else static symbol_type make_CONFIG_SEC_RULE_REMOVE_BY_ID (const std::string& v, const location_type& l) { return symbol_type (token::TOK_CONFIG_SEC_RULE_REMOVE_BY_ID, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_CONFIG_SEC_RULE_REMOVE_BY_MSG (std::string v, location_type l) { return symbol_type (token::TOK_CONFIG_SEC_RULE_REMOVE_BY_MSG, std::move (v), std::move (l)); } #else static symbol_type make_CONFIG_SEC_RULE_REMOVE_BY_MSG (const std::string& v, const location_type& l) { return symbol_type (token::TOK_CONFIG_SEC_RULE_REMOVE_BY_MSG, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_CONFIG_SEC_RULE_REMOVE_BY_TAG (std::string v, location_type l) { return symbol_type (token::TOK_CONFIG_SEC_RULE_REMOVE_BY_TAG, std::move (v), std::move (l)); } #else static symbol_type make_CONFIG_SEC_RULE_REMOVE_BY_TAG (const std::string& v, const location_type& l) { return symbol_type (token::TOK_CONFIG_SEC_RULE_REMOVE_BY_TAG, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_CONFIG_SEC_RULE_UPDATE_TARGET_BY_TAG (std::string v, location_type l) { return symbol_type (token::TOK_CONFIG_SEC_RULE_UPDATE_TARGET_BY_TAG, std::move (v), std::move (l)); } #else static symbol_type make_CONFIG_SEC_RULE_UPDATE_TARGET_BY_TAG (const std::string& v, const location_type& l) { return symbol_type (token::TOK_CONFIG_SEC_RULE_UPDATE_TARGET_BY_TAG, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_CONFIG_SEC_RULE_UPDATE_TARGET_BY_MSG (std::string v, location_type l) { return symbol_type (token::TOK_CONFIG_SEC_RULE_UPDATE_TARGET_BY_MSG, std::move (v), std::move (l)); } #else static symbol_type make_CONFIG_SEC_RULE_UPDATE_TARGET_BY_MSG (const std::string& v, const location_type& l) { return symbol_type (token::TOK_CONFIG_SEC_RULE_UPDATE_TARGET_BY_MSG, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_CONFIG_SEC_RULE_UPDATE_TARGET_BY_ID (std::string v, location_type l) { return symbol_type (token::TOK_CONFIG_SEC_RULE_UPDATE_TARGET_BY_ID, std::move (v), std::move (l)); } #else static symbol_type make_CONFIG_SEC_RULE_UPDATE_TARGET_BY_ID (const std::string& v, const location_type& l) { return symbol_type (token::TOK_CONFIG_SEC_RULE_UPDATE_TARGET_BY_ID, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_CONFIG_SEC_RULE_UPDATE_ACTION_BY_ID (std::string v, location_type l) { return symbol_type (token::TOK_CONFIG_SEC_RULE_UPDATE_ACTION_BY_ID, std::move (v), std::move (l)); } #else static symbol_type make_CONFIG_SEC_RULE_UPDATE_ACTION_BY_ID (const std::string& v, const location_type& l) { return symbol_type (token::TOK_CONFIG_SEC_RULE_UPDATE_ACTION_BY_ID, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_CONFIG_UPDLOAD_KEEP_FILES (std::string v, location_type l) { return symbol_type (token::TOK_CONFIG_UPDLOAD_KEEP_FILES, std::move (v), std::move (l)); } #else static symbol_type make_CONFIG_UPDLOAD_KEEP_FILES (const std::string& v, const location_type& l) { return symbol_type (token::TOK_CONFIG_UPDLOAD_KEEP_FILES, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_CONFIG_UPDLOAD_SAVE_TMP_FILES (std::string v, location_type l) { return symbol_type (token::TOK_CONFIG_UPDLOAD_SAVE_TMP_FILES, std::move (v), std::move (l)); } #else static symbol_type make_CONFIG_UPDLOAD_SAVE_TMP_FILES (const std::string& v, const location_type& l) { return symbol_type (token::TOK_CONFIG_UPDLOAD_SAVE_TMP_FILES, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_CONFIG_UPLOAD_DIR (std::string v, location_type l) { return symbol_type (token::TOK_CONFIG_UPLOAD_DIR, std::move (v), std::move (l)); } #else static symbol_type make_CONFIG_UPLOAD_DIR (const std::string& v, const location_type& l) { return symbol_type (token::TOK_CONFIG_UPLOAD_DIR, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_CONFIG_UPLOAD_FILE_LIMIT (std::string v, location_type l) { return symbol_type (token::TOK_CONFIG_UPLOAD_FILE_LIMIT, std::move (v), std::move (l)); } #else static symbol_type make_CONFIG_UPLOAD_FILE_LIMIT (const std::string& v, const location_type& l) { return symbol_type (token::TOK_CONFIG_UPLOAD_FILE_LIMIT, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_CONFIG_UPLOAD_FILE_MODE (std::string v, location_type l) { return symbol_type (token::TOK_CONFIG_UPLOAD_FILE_MODE, std::move (v), std::move (l)); } #else static symbol_type make_CONFIG_UPLOAD_FILE_MODE (const std::string& v, const location_type& l) { return symbol_type (token::TOK_CONFIG_UPLOAD_FILE_MODE, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_CONFIG_VALUE_ABORT (std::string v, location_type l) { return symbol_type (token::TOK_CONFIG_VALUE_ABORT, std::move (v), std::move (l)); } #else static symbol_type make_CONFIG_VALUE_ABORT (const std::string& v, const location_type& l) { return symbol_type (token::TOK_CONFIG_VALUE_ABORT, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_CONFIG_VALUE_DETC (std::string v, location_type l) { return symbol_type (token::TOK_CONFIG_VALUE_DETC, std::move (v), std::move (l)); } #else static symbol_type make_CONFIG_VALUE_DETC (const std::string& v, const location_type& l) { return symbol_type (token::TOK_CONFIG_VALUE_DETC, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_CONFIG_VALUE_HTTPS (std::string v, location_type l) { return symbol_type (token::TOK_CONFIG_VALUE_HTTPS, std::move (v), std::move (l)); } #else static symbol_type make_CONFIG_VALUE_HTTPS (const std::string& v, const location_type& l) { return symbol_type (token::TOK_CONFIG_VALUE_HTTPS, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_CONFIG_VALUE_OFF (std::string v, location_type l) { return symbol_type (token::TOK_CONFIG_VALUE_OFF, std::move (v), std::move (l)); } #else static symbol_type make_CONFIG_VALUE_OFF (const std::string& v, const location_type& l) { return symbol_type (token::TOK_CONFIG_VALUE_OFF, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_CONFIG_VALUE_ON (std::string v, location_type l) { return symbol_type (token::TOK_CONFIG_VALUE_ON, std::move (v), std::move (l)); } #else static symbol_type make_CONFIG_VALUE_ON (const std::string& v, const location_type& l) { return symbol_type (token::TOK_CONFIG_VALUE_ON, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_CONFIG_VALUE_PARALLEL (std::string v, location_type l) { return symbol_type (token::TOK_CONFIG_VALUE_PARALLEL, std::move (v), std::move (l)); } #else static symbol_type make_CONFIG_VALUE_PARALLEL (const std::string& v, const location_type& l) { return symbol_type (token::TOK_CONFIG_VALUE_PARALLEL, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_CONFIG_VALUE_PROCESS_PARTIAL (std::string v, location_type l) { return symbol_type (token::TOK_CONFIG_VALUE_PROCESS_PARTIAL, std::move (v), std::move (l)); } #else static symbol_type make_CONFIG_VALUE_PROCESS_PARTIAL (const std::string& v, const location_type& l) { return symbol_type (token::TOK_CONFIG_VALUE_PROCESS_PARTIAL, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_CONFIG_VALUE_REJECT (std::string v, location_type l) { return symbol_type (token::TOK_CONFIG_VALUE_REJECT, std::move (v), std::move (l)); } #else static symbol_type make_CONFIG_VALUE_REJECT (const std::string& v, const location_type& l) { return symbol_type (token::TOK_CONFIG_VALUE_REJECT, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_CONFIG_VALUE_RELEVANT_ONLY (std::string v, location_type l) { return symbol_type (token::TOK_CONFIG_VALUE_RELEVANT_ONLY, std::move (v), std::move (l)); } #else static symbol_type make_CONFIG_VALUE_RELEVANT_ONLY (const std::string& v, const location_type& l) { return symbol_type (token::TOK_CONFIG_VALUE_RELEVANT_ONLY, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_CONFIG_VALUE_SERIAL (std::string v, location_type l) { return symbol_type (token::TOK_CONFIG_VALUE_SERIAL, std::move (v), std::move (l)); } #else static symbol_type make_CONFIG_VALUE_SERIAL (const std::string& v, const location_type& l) { return symbol_type (token::TOK_CONFIG_VALUE_SERIAL, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_CONFIG_VALUE_WARN (std::string v, location_type l) { return symbol_type (token::TOK_CONFIG_VALUE_WARN, std::move (v), std::move (l)); } #else static symbol_type make_CONFIG_VALUE_WARN (const std::string& v, const location_type& l) { return symbol_type (token::TOK_CONFIG_VALUE_WARN, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_CONFIG_XML_EXTERNAL_ENTITY (std::string v, location_type l) { return symbol_type (token::TOK_CONFIG_XML_EXTERNAL_ENTITY, std::move (v), std::move (l)); } #else static symbol_type make_CONFIG_XML_EXTERNAL_ENTITY (const std::string& v, const location_type& l) { return symbol_type (token::TOK_CONFIG_XML_EXTERNAL_ENTITY, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_CONGIG_DIR_RESPONSE_BODY_MP (std::string v, location_type l) { return symbol_type (token::TOK_CONGIG_DIR_RESPONSE_BODY_MP, std::move (v), std::move (l)); } #else static symbol_type make_CONGIG_DIR_RESPONSE_BODY_MP (const std::string& v, const location_type& l) { return symbol_type (token::TOK_CONGIG_DIR_RESPONSE_BODY_MP, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_CONGIG_DIR_SEC_ARG_SEP (std::string v, location_type l) { return symbol_type (token::TOK_CONGIG_DIR_SEC_ARG_SEP, std::move (v), std::move (l)); } #else static symbol_type make_CONGIG_DIR_SEC_ARG_SEP (const std::string& v, const location_type& l) { return symbol_type (token::TOK_CONGIG_DIR_SEC_ARG_SEP, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_CONGIG_DIR_SEC_COOKIE_FORMAT (std::string v, location_type l) { return symbol_type (token::TOK_CONGIG_DIR_SEC_COOKIE_FORMAT, std::move (v), std::move (l)); } #else static symbol_type make_CONGIG_DIR_SEC_COOKIE_FORMAT (const std::string& v, const location_type& l) { return symbol_type (token::TOK_CONGIG_DIR_SEC_COOKIE_FORMAT, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_CONFIG_SEC_COOKIEV0_SEPARATOR (std::string v, location_type l) { return symbol_type (token::TOK_CONFIG_SEC_COOKIEV0_SEPARATOR, std::move (v), std::move (l)); } #else static symbol_type make_CONFIG_SEC_COOKIEV0_SEPARATOR (const std::string& v, const location_type& l) { return symbol_type (token::TOK_CONFIG_SEC_COOKIEV0_SEPARATOR, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_CONGIG_DIR_SEC_DATA_DIR (std::string v, location_type l) { return symbol_type (token::TOK_CONGIG_DIR_SEC_DATA_DIR, std::move (v), std::move (l)); } #else static symbol_type make_CONGIG_DIR_SEC_DATA_DIR (const std::string& v, const location_type& l) { return symbol_type (token::TOK_CONGIG_DIR_SEC_DATA_DIR, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_CONGIG_DIR_SEC_STATUS_ENGINE (std::string v, location_type l) { return symbol_type (token::TOK_CONGIG_DIR_SEC_STATUS_ENGINE, std::move (v), std::move (l)); } #else static symbol_type make_CONGIG_DIR_SEC_STATUS_ENGINE (const std::string& v, const location_type& l) { return symbol_type (token::TOK_CONGIG_DIR_SEC_STATUS_ENGINE, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_CONFIG_SEC_STREAM_IN_BODY_INSPECTION (std::string v, location_type l) { return symbol_type (token::TOK_CONFIG_SEC_STREAM_IN_BODY_INSPECTION, std::move (v), std::move (l)); } #else static symbol_type make_CONFIG_SEC_STREAM_IN_BODY_INSPECTION (const std::string& v, const location_type& l) { return symbol_type (token::TOK_CONFIG_SEC_STREAM_IN_BODY_INSPECTION, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_CONFIG_SEC_STREAM_OUT_BODY_INSPECTION (std::string v, location_type l) { return symbol_type (token::TOK_CONFIG_SEC_STREAM_OUT_BODY_INSPECTION, std::move (v), std::move (l)); } #else static symbol_type make_CONFIG_SEC_STREAM_OUT_BODY_INSPECTION (const std::string& v, const location_type& l) { return symbol_type (token::TOK_CONFIG_SEC_STREAM_OUT_BODY_INSPECTION, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_CONGIG_DIR_SEC_TMP_DIR (std::string v, location_type l) { return symbol_type (token::TOK_CONGIG_DIR_SEC_TMP_DIR, std::move (v), std::move (l)); } #else static symbol_type make_CONGIG_DIR_SEC_TMP_DIR (const std::string& v, const location_type& l) { return symbol_type (token::TOK_CONGIG_DIR_SEC_TMP_DIR, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_DIRECTIVE (std::string v, location_type l) { return symbol_type (token::TOK_DIRECTIVE, std::move (v), std::move (l)); } #else static symbol_type make_DIRECTIVE (const std::string& v, const location_type& l) { return symbol_type (token::TOK_DIRECTIVE, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_DIRECTIVE_SECRULESCRIPT (std::string v, location_type l) { return symbol_type (token::TOK_DIRECTIVE_SECRULESCRIPT, std::move (v), std::move (l)); } #else static symbol_type make_DIRECTIVE_SECRULESCRIPT (const std::string& v, const location_type& l) { return symbol_type (token::TOK_DIRECTIVE_SECRULESCRIPT, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_FREE_TEXT_QUOTE_MACRO_EXPANSION (std::string v, location_type l) { return symbol_type (token::TOK_FREE_TEXT_QUOTE_MACRO_EXPANSION, std::move (v), std::move (l)); } #else static symbol_type make_FREE_TEXT_QUOTE_MACRO_EXPANSION (const std::string& v, const location_type& l) { return symbol_type (token::TOK_FREE_TEXT_QUOTE_MACRO_EXPANSION, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_QUOTATION_MARK (std::string v, location_type l) { return symbol_type (token::TOK_QUOTATION_MARK, std::move (v), std::move (l)); } #else static symbol_type make_QUOTATION_MARK (const std::string& v, const location_type& l) { return symbol_type (token::TOK_QUOTATION_MARK, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_RUN_TIME_VAR_BLD (std::string v, location_type l) { return symbol_type (token::TOK_RUN_TIME_VAR_BLD, std::move (v), std::move (l)); } #else static symbol_type make_RUN_TIME_VAR_BLD (const std::string& v, const location_type& l) { return symbol_type (token::TOK_RUN_TIME_VAR_BLD, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_RUN_TIME_VAR_DUR (std::string v, location_type l) { return symbol_type (token::TOK_RUN_TIME_VAR_DUR, std::move (v), std::move (l)); } #else static symbol_type make_RUN_TIME_VAR_DUR (const std::string& v, const location_type& l) { return symbol_type (token::TOK_RUN_TIME_VAR_DUR, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_RUN_TIME_VAR_HSV (std::string v, location_type l) { return symbol_type (token::TOK_RUN_TIME_VAR_HSV, std::move (v), std::move (l)); } #else static symbol_type make_RUN_TIME_VAR_HSV (const std::string& v, const location_type& l) { return symbol_type (token::TOK_RUN_TIME_VAR_HSV, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_RUN_TIME_VAR_REMOTE_USER (std::string v, location_type l) { return symbol_type (token::TOK_RUN_TIME_VAR_REMOTE_USER, std::move (v), std::move (l)); } #else static symbol_type make_RUN_TIME_VAR_REMOTE_USER (const std::string& v, const location_type& l) { return symbol_type (token::TOK_RUN_TIME_VAR_REMOTE_USER, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_RUN_TIME_VAR_TIME (std::string v, location_type l) { return symbol_type (token::TOK_RUN_TIME_VAR_TIME, std::move (v), std::move (l)); } #else static symbol_type make_RUN_TIME_VAR_TIME (const std::string& v, const location_type& l) { return symbol_type (token::TOK_RUN_TIME_VAR_TIME, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_RUN_TIME_VAR_TIME_DAY (std::string v, location_type l) { return symbol_type (token::TOK_RUN_TIME_VAR_TIME_DAY, std::move (v), std::move (l)); } #else static symbol_type make_RUN_TIME_VAR_TIME_DAY (const std::string& v, const location_type& l) { return symbol_type (token::TOK_RUN_TIME_VAR_TIME_DAY, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_RUN_TIME_VAR_TIME_EPOCH (std::string v, location_type l) { return symbol_type (token::TOK_RUN_TIME_VAR_TIME_EPOCH, std::move (v), std::move (l)); } #else static symbol_type make_RUN_TIME_VAR_TIME_EPOCH (const std::string& v, const location_type& l) { return symbol_type (token::TOK_RUN_TIME_VAR_TIME_EPOCH, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_RUN_TIME_VAR_TIME_HOUR (std::string v, location_type l) { return symbol_type (token::TOK_RUN_TIME_VAR_TIME_HOUR, std::move (v), std::move (l)); } #else static symbol_type make_RUN_TIME_VAR_TIME_HOUR (const std::string& v, const location_type& l) { return symbol_type (token::TOK_RUN_TIME_VAR_TIME_HOUR, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_RUN_TIME_VAR_TIME_MIN (std::string v, location_type l) { return symbol_type (token::TOK_RUN_TIME_VAR_TIME_MIN, std::move (v), std::move (l)); } #else static symbol_type make_RUN_TIME_VAR_TIME_MIN (const std::string& v, const location_type& l) { return symbol_type (token::TOK_RUN_TIME_VAR_TIME_MIN, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_RUN_TIME_VAR_TIME_MON (std::string v, location_type l) { return symbol_type (token::TOK_RUN_TIME_VAR_TIME_MON, std::move (v), std::move (l)); } #else static symbol_type make_RUN_TIME_VAR_TIME_MON (const std::string& v, const location_type& l) { return symbol_type (token::TOK_RUN_TIME_VAR_TIME_MON, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_RUN_TIME_VAR_TIME_SEC (std::string v, location_type l) { return symbol_type (token::TOK_RUN_TIME_VAR_TIME_SEC, std::move (v), std::move (l)); } #else static symbol_type make_RUN_TIME_VAR_TIME_SEC (const std::string& v, const location_type& l) { return symbol_type (token::TOK_RUN_TIME_VAR_TIME_SEC, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_RUN_TIME_VAR_TIME_WDAY (std::string v, location_type l) { return symbol_type (token::TOK_RUN_TIME_VAR_TIME_WDAY, std::move (v), std::move (l)); } #else static symbol_type make_RUN_TIME_VAR_TIME_WDAY (const std::string& v, const location_type& l) { return symbol_type (token::TOK_RUN_TIME_VAR_TIME_WDAY, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_RUN_TIME_VAR_TIME_YEAR (std::string v, location_type l) { return symbol_type (token::TOK_RUN_TIME_VAR_TIME_YEAR, std::move (v), std::move (l)); } #else static symbol_type make_RUN_TIME_VAR_TIME_YEAR (const std::string& v, const location_type& l) { return symbol_type (token::TOK_RUN_TIME_VAR_TIME_YEAR, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_VARIABLE (std::string v, location_type l) { return symbol_type (token::TOK_VARIABLE, std::move (v), std::move (l)); } #else static symbol_type make_VARIABLE (const std::string& v, const location_type& l) { return symbol_type (token::TOK_VARIABLE, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_DICT_ELEMENT (std::string v, location_type l) { return symbol_type (token::TOK_DICT_ELEMENT, std::move (v), std::move (l)); } #else static symbol_type make_DICT_ELEMENT (const std::string& v, const location_type& l) { return symbol_type (token::TOK_DICT_ELEMENT, v, l); } #endif #if 201103L <= YY_CPLUSPLUS static symbol_type make_DICT_ELEMENT_REGEXP (std::string v, location_type l) { return symbol_type (token::TOK_DICT_ELEMENT_REGEXP, std::move (v), std::move (l)); } #else static symbol_type make_DICT_ELEMENT_REGEXP (const std::string& v, const location_type& l) { return symbol_type (token::TOK_DICT_ELEMENT_REGEXP, v, l); } #endif class context { public: context (const seclang_parser& yyparser, const symbol_type& yyla); const symbol_type& lookahead () const { return yyla_; } symbol_kind_type token () const { return yyla_.kind (); } const location_type& location () const { return yyla_.location; } /// Put in YYARG at most YYARGN of the expected tokens, and return the /// number of tokens stored in YYARG. If YYARG is null, return the /// number of expected tokens (guaranteed to be less than YYNTOKENS). int expected_tokens (symbol_kind_type yyarg[], int yyargn) const; private: const seclang_parser& yyparser_; const symbol_type& yyla_; }; private: #if YY_CPLUSPLUS < 201103L /// Non copyable. seclang_parser (const seclang_parser&); /// Non copyable. seclang_parser& operator= (const seclang_parser&); #endif /// Stored state numbers (used for stacks). typedef short state_type; /// The arguments of the error message. int yy_syntax_error_arguments_ (const context& yyctx, symbol_kind_type yyarg[], int yyargn) const; /// Generate an error message. /// \param yyctx the context in which the error occurred. virtual std::string yysyntax_error_ (const context& yyctx) const; /// Compute post-reduction state. /// \param yystate the current state /// \param yysym the nonterminal to push on the stack static state_type yy_lr_goto_state_ (state_type yystate, int yysym); /// Whether the given \c yypact_ value indicates a defaulted state. /// \param yyvalue the value to check static bool yy_pact_value_is_default_ (int yyvalue); /// Whether the given \c yytable_ value indicates a syntax error. /// \param yyvalue the value to check static bool yy_table_value_is_error_ (int yyvalue); static const short yypact_ninf_; static const signed char yytable_ninf_; /// Convert a scanner token kind \a t to a symbol kind. /// In theory \a t should be a token_kind_type, but character literals /// are valid, yet not members of the token_type enum. static symbol_kind_type yytranslate_ (int t); /// Convert the symbol name \a n to a form suitable for a diagnostic. static std::string yytnamerr_ (const char *yystr); /// For a symbol, its name in clear. static const char* const yytname_[]; // Tables. // YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing // STATE-NUM. static const short yypact_[]; // YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. // Performed when YYTABLE does not specify something else to do. Zero // means the default is an error. static const short yydefact_[]; // YYPGOTO[NTERM-NUM]. static const short yypgoto_[]; // YYDEFGOTO[NTERM-NUM]. static const short yydefgoto_[]; // YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If // positive, shift that token. If negative, reduce the rule whose // number is the opposite. If YYTABLE_NINF, syntax error. static const short yytable_[]; static const short yycheck_[]; // YYSTOS[STATE-NUM] -- The (internal number of the) accessing // symbol of state STATE-NUM. static const short yystos_[]; // YYR1[YYN] -- Symbol number of symbol that rule YYN derives. static const short yyr1_[]; // YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. static const signed char yyr2_[]; #if YYDEBUG // YYRLINE[YYN] -- Source line where rule number YYN was defined. static const short yyrline_[]; /// Report on the debug stream that the rule \a r is going to be reduced. virtual void yy_reduce_print_ (int r) const; /// Print the state stack on the debug stream. virtual void yy_stack_print_ () const; /// Debugging level. int yydebug_; /// Debug stream. std::ostream* yycdebug_; /// \brief Display a symbol kind, value and location. /// \param yyo The output stream. /// \param yysym The symbol. template void yy_print_ (std::ostream& yyo, const basic_symbol& yysym) const; #endif /// \brief Reclaim the memory associated to a symbol. /// \param yymsg Why this token is reclaimed. /// If null, print nothing. /// \param yysym The symbol. template void yy_destroy_ (const char* yymsg, basic_symbol& yysym) const; private: /// Type access provider for state based symbols. struct by_state { /// Default constructor. by_state () YY_NOEXCEPT; /// The symbol kind as needed by the constructor. typedef state_type kind_type; /// Constructor. by_state (kind_type s) YY_NOEXCEPT; /// Copy constructor. by_state (const by_state& that) YY_NOEXCEPT; /// Record that this symbol is empty. void clear () YY_NOEXCEPT; /// Steal the symbol kind from \a that. void move (by_state& that); /// The symbol kind (corresponding to \a state). /// \a symbol_kind::S_YYEMPTY when empty. symbol_kind_type kind () const YY_NOEXCEPT; /// The state number used to denote an empty symbol. /// We use the initial state, as it does not have a value. enum { empty_state = 0 }; /// The state. /// \a empty when empty. state_type state; }; /// "Internal" symbol: element of the stack. struct stack_symbol_type : basic_symbol { /// Superclass. typedef basic_symbol super_type; /// Construct an empty symbol. stack_symbol_type (); /// Move or copy construction. stack_symbol_type (YY_RVREF (stack_symbol_type) that); /// Steal the contents from \a sym to build this. stack_symbol_type (state_type s, YY_MOVE_REF (symbol_type) sym); #if YY_CPLUSPLUS < 201103L /// Assignment, needed by push_back by some old implementations. /// Moves the contents of that. stack_symbol_type& operator= (stack_symbol_type& that); /// Assignment, needed by push_back by other implementations. /// Needed by some other old implementations. stack_symbol_type& operator= (const stack_symbol_type& that); #endif }; /// A stack with random access from its top. template > class stack { public: // Hide our reversed order. typedef typename S::iterator iterator; typedef typename S::const_iterator const_iterator; typedef typename S::size_type size_type; typedef typename std::ptrdiff_t index_type; stack (size_type n = 200) : seq_ (n) {} #if 201103L <= YY_CPLUSPLUS /// Non copyable. stack (const stack&) = delete; /// Non copyable. stack& operator= (const stack&) = delete; #endif /// Random access. /// /// Index 0 returns the topmost element. const T& operator[] (index_type i) const { return seq_[size_type (size () - 1 - i)]; } /// Random access. /// /// Index 0 returns the topmost element. T& operator[] (index_type i) { return seq_[size_type (size () - 1 - i)]; } /// Steal the contents of \a t. /// /// Close to move-semantics. void push (YY_MOVE_REF (T) t) { seq_.push_back (T ()); operator[] (0).move (t); } /// Pop elements from the stack. void pop (std::ptrdiff_t n = 1) YY_NOEXCEPT { for (; 0 < n; --n) seq_.pop_back (); } /// Pop all elements from the stack. void clear () YY_NOEXCEPT { seq_.clear (); } /// Number of elements on the stack. index_type size () const YY_NOEXCEPT { return index_type (seq_.size ()); } /// Iterator on top of the stack (going downwards). const_iterator begin () const YY_NOEXCEPT { return seq_.begin (); } /// Bottom of the stack. const_iterator end () const YY_NOEXCEPT { return seq_.end (); } /// Present a slice of the top of a stack. class slice { public: slice (const stack& stack, index_type range) : stack_ (stack) , range_ (range) {} const T& operator[] (index_type i) const { return stack_[range_ - i]; } private: const stack& stack_; index_type range_; }; private: #if YY_CPLUSPLUS < 201103L /// Non copyable. stack (const stack&); /// Non copyable. stack& operator= (const stack&); #endif /// The wrapped container. S seq_; }; /// Stack type. typedef stack stack_type; /// The stack. stack_type yystack_; /// Push a new state on the stack. /// \param m a debug message to display /// if null, no trace is output. /// \param sym the symbol /// \warning the contents of \a s.value is stolen. void yypush_ (const char* m, YY_MOVE_REF (stack_symbol_type) sym); /// Push a new look ahead token on the state on the stack. /// \param m a debug message to display /// if null, no trace is output. /// \param s the state /// \param sym the symbol (for its value and location). /// \warning the contents of \a sym.value is stolen. void yypush_ (const char* m, state_type s, YY_MOVE_REF (symbol_type) sym); /// Pop \a n symbols from the stack. void yypop_ (int n = 1); /// Constants. enum { yylast_ = 3274, ///< Last index in yytable_. yynnts_ = 16, ///< Number of nonterminal symbols. yyfinal_ = 338 ///< Termination state number. }; // User arguments. modsecurity::Parser::Driver& driver; }; inline seclang_parser::symbol_kind_type seclang_parser::yytranslate_ (int t) { // YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to // TOKEN-NUM as returned by yylex. static const short translate_table[] = { 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343 }; // Last valid token kind. const int code_max = 598; if (t <= 0) return symbol_kind::S_YYEOF; else if (t <= code_max) return YY_CAST (symbol_kind_type, translate_table[t]); else return symbol_kind::S_YYUNDEF; } // basic_symbol. template seclang_parser::basic_symbol::basic_symbol (const basic_symbol& that) : Base (that) , value () , location (that.location) { switch (this->kind ()) { case symbol_kind::S_ACTION_ACCURACY: // "Accuracy" case symbol_kind::S_ACTION_ALLOW: // "Allow" case symbol_kind::S_ACTION_APPEND: // "Append" case symbol_kind::S_ACTION_AUDIT_LOG: // "AuditLog" case symbol_kind::S_ACTION_BLOCK: // "Block" case symbol_kind::S_ACTION_CAPTURE: // "Capture" case symbol_kind::S_ACTION_CHAIN: // "Chain" case symbol_kind::S_ACTION_CTL_AUDIT_ENGINE: // "ACTION_CTL_AUDIT_ENGINE" case symbol_kind::S_ACTION_CTL_AUDIT_LOG_PARTS: // "ACTION_CTL_AUDIT_LOG_PARTS" case symbol_kind::S_ACTION_CTL_BDY_JSON: // "ACTION_CTL_BDY_JSON" case symbol_kind::S_ACTION_CTL_BDY_XML: // "ACTION_CTL_BDY_XML" case symbol_kind::S_ACTION_CTL_BDY_URLENCODED: // "ACTION_CTL_BDY_URLENCODED" case symbol_kind::S_ACTION_CTL_FORCE_REQ_BODY_VAR: // "ACTION_CTL_FORCE_REQ_BODY_VAR" case symbol_kind::S_ACTION_CTL_REQUEST_BODY_ACCESS: // "ACTION_CTL_REQUEST_BODY_ACCESS" case symbol_kind::S_ACTION_CTL_RULE_REMOVE_BY_ID: // "ACTION_CTL_RULE_REMOVE_BY_ID" case symbol_kind::S_ACTION_CTL_RULE_REMOVE_BY_TAG: // "ACTION_CTL_RULE_REMOVE_BY_TAG" case symbol_kind::S_ACTION_CTL_RULE_REMOVE_TARGET_BY_ID: // "ACTION_CTL_RULE_REMOVE_TARGET_BY_ID" case symbol_kind::S_ACTION_CTL_RULE_REMOVE_TARGET_BY_TAG: // "ACTION_CTL_RULE_REMOVE_TARGET_BY_TAG" case symbol_kind::S_ACTION_DENY: // "Deny" case symbol_kind::S_ACTION_DEPRECATE_VAR: // "DeprecateVar" case symbol_kind::S_ACTION_DROP: // "Drop" case symbol_kind::S_ACTION_EXEC: // "Exec" case symbol_kind::S_ACTION_EXPIRE_VAR: // "ExpireVar" case symbol_kind::S_ACTION_ID: // "Id" case symbol_kind::S_ACTION_INITCOL: // "InitCol" case symbol_kind::S_ACTION_LOG: // "Log" case symbol_kind::S_ACTION_LOG_DATA: // "LogData" case symbol_kind::S_ACTION_MATURITY: // "Maturity" case symbol_kind::S_ACTION_MSG: // "Msg" case symbol_kind::S_ACTION_MULTI_MATCH: // "MultiMatch" case symbol_kind::S_ACTION_NO_AUDIT_LOG: // "NoAuditLog" case symbol_kind::S_ACTION_NO_LOG: // "NoLog" case symbol_kind::S_ACTION_PASS: // "Pass" case symbol_kind::S_ACTION_PAUSE: // "Pause" case symbol_kind::S_ACTION_PHASE: // "Phase" case symbol_kind::S_ACTION_PREPEND: // "Prepend" case symbol_kind::S_ACTION_PROXY: // "Proxy" case symbol_kind::S_ACTION_REDIRECT: // "Redirect" case symbol_kind::S_ACTION_REV: // "Rev" case symbol_kind::S_ACTION_SANITISE_ARG: // "SanitiseArg" case symbol_kind::S_ACTION_SANITISE_MATCHED: // "SanitiseMatched" case symbol_kind::S_ACTION_SANITISE_MATCHED_BYTES: // "SanitiseMatchedBytes" case symbol_kind::S_ACTION_SANITISE_REQUEST_HEADER: // "SanitiseRequestHeader" case symbol_kind::S_ACTION_SANITISE_RESPONSE_HEADER: // "SanitiseResponseHeader" case symbol_kind::S_ACTION_SETENV: // "SetEnv" case symbol_kind::S_ACTION_SETRSC: // "SetRsc" case symbol_kind::S_ACTION_SETSID: // "SetSid" case symbol_kind::S_ACTION_SETUID: // "SetUID" case symbol_kind::S_ACTION_SEVERITY: // "Severity" case symbol_kind::S_ACTION_SKIP: // "Skip" case symbol_kind::S_ACTION_SKIP_AFTER: // "SkipAfter" case symbol_kind::S_ACTION_STATUS: // "Status" case symbol_kind::S_ACTION_TAG: // "Tag" case symbol_kind::S_ACTION_TRANSFORMATION_BASE_64_ENCODE: // "ACTION_TRANSFORMATION_BASE_64_ENCODE" case symbol_kind::S_ACTION_TRANSFORMATION_BASE_64_DECODE: // "ACTION_TRANSFORMATION_BASE_64_DECODE" case symbol_kind::S_ACTION_TRANSFORMATION_BASE_64_DECODE_EXT: // "ACTION_TRANSFORMATION_BASE_64_DECODE_EXT" case symbol_kind::S_ACTION_TRANSFORMATION_CMD_LINE: // "ACTION_TRANSFORMATION_CMD_LINE" case symbol_kind::S_ACTION_TRANSFORMATION_COMPRESS_WHITESPACE: // "ACTION_TRANSFORMATION_COMPRESS_WHITESPACE" case symbol_kind::S_ACTION_TRANSFORMATION_CSS_DECODE: // "ACTION_TRANSFORMATION_CSS_DECODE" case symbol_kind::S_ACTION_TRANSFORMATION_ESCAPE_SEQ_DECODE: // "ACTION_TRANSFORMATION_ESCAPE_SEQ_DECODE" case symbol_kind::S_ACTION_TRANSFORMATION_HEX_ENCODE: // "ACTION_TRANSFORMATION_HEX_ENCODE" case symbol_kind::S_ACTION_TRANSFORMATION_HEX_DECODE: // "ACTION_TRANSFORMATION_HEX_DECODE" case symbol_kind::S_ACTION_TRANSFORMATION_HTML_ENTITY_DECODE: // "ACTION_TRANSFORMATION_HTML_ENTITY_DECODE" case symbol_kind::S_ACTION_TRANSFORMATION_JS_DECODE: // "ACTION_TRANSFORMATION_JS_DECODE" case symbol_kind::S_ACTION_TRANSFORMATION_LENGTH: // "ACTION_TRANSFORMATION_LENGTH" case symbol_kind::S_ACTION_TRANSFORMATION_LOWERCASE: // "ACTION_TRANSFORMATION_LOWERCASE" case symbol_kind::S_ACTION_TRANSFORMATION_MD5: // "ACTION_TRANSFORMATION_MD5" case symbol_kind::S_ACTION_TRANSFORMATION_NONE: // "ACTION_TRANSFORMATION_NONE" case symbol_kind::S_ACTION_TRANSFORMATION_NORMALISE_PATH: // "ACTION_TRANSFORMATION_NORMALISE_PATH" case symbol_kind::S_ACTION_TRANSFORMATION_NORMALISE_PATH_WIN: // "ACTION_TRANSFORMATION_NORMALISE_PATH_WIN" case symbol_kind::S_ACTION_TRANSFORMATION_PARITY_EVEN_7_BIT: // "ACTION_TRANSFORMATION_PARITY_EVEN_7_BIT" case symbol_kind::S_ACTION_TRANSFORMATION_PARITY_ODD_7_BIT: // "ACTION_TRANSFORMATION_PARITY_ODD_7_BIT" case symbol_kind::S_ACTION_TRANSFORMATION_PARITY_ZERO_7_BIT: // "ACTION_TRANSFORMATION_PARITY_ZERO_7_BIT" case symbol_kind::S_ACTION_TRANSFORMATION_REMOVE_COMMENTS: // "ACTION_TRANSFORMATION_REMOVE_COMMENTS" case symbol_kind::S_ACTION_TRANSFORMATION_REMOVE_COMMENTS_CHAR: // "ACTION_TRANSFORMATION_REMOVE_COMMENTS_CHAR" case symbol_kind::S_ACTION_TRANSFORMATION_REMOVE_NULLS: // "ACTION_TRANSFORMATION_REMOVE_NULLS" case symbol_kind::S_ACTION_TRANSFORMATION_REMOVE_WHITESPACE: // "ACTION_TRANSFORMATION_REMOVE_WHITESPACE" case symbol_kind::S_ACTION_TRANSFORMATION_REPLACE_COMMENTS: // "ACTION_TRANSFORMATION_REPLACE_COMMENTS" case symbol_kind::S_ACTION_TRANSFORMATION_REPLACE_NULLS: // "ACTION_TRANSFORMATION_REPLACE_NULLS" case symbol_kind::S_ACTION_TRANSFORMATION_SHA1: // "ACTION_TRANSFORMATION_SHA1" case symbol_kind::S_ACTION_TRANSFORMATION_SQL_HEX_DECODE: // "ACTION_TRANSFORMATION_SQL_HEX_DECODE" case symbol_kind::S_ACTION_TRANSFORMATION_TRIM: // "ACTION_TRANSFORMATION_TRIM" case symbol_kind::S_ACTION_TRANSFORMATION_TRIM_LEFT: // "ACTION_TRANSFORMATION_TRIM_LEFT" case symbol_kind::S_ACTION_TRANSFORMATION_TRIM_RIGHT: // "ACTION_TRANSFORMATION_TRIM_RIGHT" case symbol_kind::S_ACTION_TRANSFORMATION_UPPERCASE: // "ACTION_TRANSFORMATION_UPPERCASE" case symbol_kind::S_ACTION_TRANSFORMATION_URL_ENCODE: // "ACTION_TRANSFORMATION_URL_ENCODE" case symbol_kind::S_ACTION_TRANSFORMATION_URL_DECODE: // "ACTION_TRANSFORMATION_URL_DECODE" case symbol_kind::S_ACTION_TRANSFORMATION_URL_DECODE_UNI: // "ACTION_TRANSFORMATION_URL_DECODE_UNI" case symbol_kind::S_ACTION_TRANSFORMATION_UTF8_TO_UNICODE: // "ACTION_TRANSFORMATION_UTF8_TO_UNICODE" case symbol_kind::S_ACTION_VER: // "Ver" case symbol_kind::S_ACTION_XMLNS: // "xmlns" case symbol_kind::S_CONFIG_COMPONENT_SIG: // "CONFIG_COMPONENT_SIG" case symbol_kind::S_CONFIG_CONN_ENGINE: // "CONFIG_CONN_ENGINE" case symbol_kind::S_CONFIG_SEC_ARGUMENT_SEPARATOR: // "CONFIG_SEC_ARGUMENT_SEPARATOR" case symbol_kind::S_CONFIG_SEC_WEB_APP_ID: // "CONFIG_SEC_WEB_APP_ID" case symbol_kind::S_CONFIG_SEC_SERVER_SIG: // "CONFIG_SEC_SERVER_SIG" case symbol_kind::S_CONFIG_DIR_AUDIT_DIR: // "CONFIG_DIR_AUDIT_DIR" case symbol_kind::S_CONFIG_DIR_AUDIT_DIR_MOD: // "CONFIG_DIR_AUDIT_DIR_MOD" case symbol_kind::S_CONFIG_DIR_AUDIT_ENG: // "CONFIG_DIR_AUDIT_ENG" case symbol_kind::S_CONFIG_DIR_AUDIT_FLE_MOD: // "CONFIG_DIR_AUDIT_FLE_MOD" case symbol_kind::S_CONFIG_DIR_AUDIT_LOG: // "CONFIG_DIR_AUDIT_LOG" case symbol_kind::S_CONFIG_DIR_AUDIT_LOG2: // "CONFIG_DIR_AUDIT_LOG2" case symbol_kind::S_CONFIG_DIR_AUDIT_LOG_P: // "CONFIG_DIR_AUDIT_LOG_P" case symbol_kind::S_CONFIG_DIR_AUDIT_STS: // "CONFIG_DIR_AUDIT_STS" case symbol_kind::S_CONFIG_DIR_AUDIT_TPE: // "CONFIG_DIR_AUDIT_TPE" case symbol_kind::S_CONFIG_DIR_DEBUG_LOG: // "CONFIG_DIR_DEBUG_LOG" case symbol_kind::S_CONFIG_DIR_DEBUG_LVL: // "CONFIG_DIR_DEBUG_LVL" case symbol_kind::S_CONFIG_SEC_CACHE_TRANSFORMATIONS: // "CONFIG_SEC_CACHE_TRANSFORMATIONS" case symbol_kind::S_CONFIG_SEC_DISABLE_BACKEND_COMPRESS: // "CONFIG_SEC_DISABLE_BACKEND_COMPRESS" case symbol_kind::S_CONFIG_SEC_HASH_ENGINE: // "CONFIG_SEC_HASH_ENGINE" case symbol_kind::S_CONFIG_SEC_HASH_KEY: // "CONFIG_SEC_HASH_KEY" case symbol_kind::S_CONFIG_SEC_HASH_PARAM: // "CONFIG_SEC_HASH_PARAM" case symbol_kind::S_CONFIG_SEC_HASH_METHOD_RX: // "CONFIG_SEC_HASH_METHOD_RX" case symbol_kind::S_CONFIG_SEC_HASH_METHOD_PM: // "CONFIG_SEC_HASH_METHOD_PM" case symbol_kind::S_CONFIG_SEC_CHROOT_DIR: // "CONFIG_SEC_CHROOT_DIR" case symbol_kind::S_CONFIG_DIR_GEO_DB: // "CONFIG_DIR_GEO_DB" case symbol_kind::S_CONFIG_DIR_GSB_DB: // "CONFIG_DIR_GSB_DB" case symbol_kind::S_CONFIG_SEC_GUARDIAN_LOG: // "CONFIG_SEC_GUARDIAN_LOG" case symbol_kind::S_CONFIG_DIR_PCRE_MATCH_LIMIT: // "CONFIG_DIR_PCRE_MATCH_LIMIT" case symbol_kind::S_CONFIG_DIR_PCRE_MATCH_LIMIT_RECURSION: // "CONFIG_DIR_PCRE_MATCH_LIMIT_RECURSION" case symbol_kind::S_CONFIG_SEC_CONN_R_STATE_LIMIT: // "CONFIG_SEC_CONN_R_STATE_LIMIT" case symbol_kind::S_CONFIG_SEC_CONN_W_STATE_LIMIT: // "CONFIG_SEC_CONN_W_STATE_LIMIT" case symbol_kind::S_CONFIG_SEC_SENSOR_ID: // "CONFIG_SEC_SENSOR_ID" case symbol_kind::S_CONFIG_DIR_ARGS_LIMIT: // "CONFIG_DIR_ARGS_LIMIT" case symbol_kind::S_CONFIG_DIR_REQ_BODY_JSON_DEPTH_LIMIT: // "CONFIG_DIR_REQ_BODY_JSON_DEPTH_LIMIT" case symbol_kind::S_CONFIG_DIR_REQ_BODY: // "CONFIG_DIR_REQ_BODY" case symbol_kind::S_CONFIG_DIR_REQ_BODY_IN_MEMORY_LIMIT: // "CONFIG_DIR_REQ_BODY_IN_MEMORY_LIMIT" case symbol_kind::S_CONFIG_DIR_REQ_BODY_LIMIT: // "CONFIG_DIR_REQ_BODY_LIMIT" case symbol_kind::S_CONFIG_DIR_REQ_BODY_LIMIT_ACTION: // "CONFIG_DIR_REQ_BODY_LIMIT_ACTION" case symbol_kind::S_CONFIG_DIR_REQ_BODY_NO_FILES_LIMIT: // "CONFIG_DIR_REQ_BODY_NO_FILES_LIMIT" case symbol_kind::S_CONFIG_DIR_RES_BODY: // "CONFIG_DIR_RES_BODY" case symbol_kind::S_CONFIG_DIR_RES_BODY_LIMIT: // "CONFIG_DIR_RES_BODY_LIMIT" case symbol_kind::S_CONFIG_DIR_RES_BODY_LIMIT_ACTION: // "CONFIG_DIR_RES_BODY_LIMIT_ACTION" case symbol_kind::S_CONFIG_SEC_RULE_INHERITANCE: // "CONFIG_SEC_RULE_INHERITANCE" case symbol_kind::S_CONFIG_SEC_RULE_PERF_TIME: // "CONFIG_SEC_RULE_PERF_TIME" case symbol_kind::S_CONFIG_DIR_RULE_ENG: // "CONFIG_DIR_RULE_ENG" case symbol_kind::S_CONFIG_DIR_SEC_ACTION: // "CONFIG_DIR_SEC_ACTION" case symbol_kind::S_CONFIG_DIR_SEC_DEFAULT_ACTION: // "CONFIG_DIR_SEC_DEFAULT_ACTION" case symbol_kind::S_CONFIG_DIR_SEC_MARKER: // "CONFIG_DIR_SEC_MARKER" case symbol_kind::S_CONFIG_DIR_UNICODE_MAP_FILE: // "CONFIG_DIR_UNICODE_MAP_FILE" case symbol_kind::S_CONFIG_DIR_UNICODE_CODE_PAGE: // "CONFIG_DIR_UNICODE_CODE_PAGE" case symbol_kind::S_CONFIG_SEC_COLLECTION_TIMEOUT: // "CONFIG_SEC_COLLECTION_TIMEOUT" case symbol_kind::S_CONFIG_SEC_HTTP_BLKEY: // "CONFIG_SEC_HTTP_BLKEY" case symbol_kind::S_CONFIG_SEC_INTERCEPT_ON_ERROR: // "CONFIG_SEC_INTERCEPT_ON_ERROR" case symbol_kind::S_CONFIG_SEC_REMOTE_RULES_FAIL_ACTION: // "CONFIG_SEC_REMOTE_RULES_FAIL_ACTION" case symbol_kind::S_CONFIG_SEC_RULE_REMOVE_BY_ID: // "CONFIG_SEC_RULE_REMOVE_BY_ID" case symbol_kind::S_CONFIG_SEC_RULE_REMOVE_BY_MSG: // "CONFIG_SEC_RULE_REMOVE_BY_MSG" case symbol_kind::S_CONFIG_SEC_RULE_REMOVE_BY_TAG: // "CONFIG_SEC_RULE_REMOVE_BY_TAG" case symbol_kind::S_CONFIG_SEC_RULE_UPDATE_TARGET_BY_TAG: // "CONFIG_SEC_RULE_UPDATE_TARGET_BY_TAG" case symbol_kind::S_CONFIG_SEC_RULE_UPDATE_TARGET_BY_MSG: // "CONFIG_SEC_RULE_UPDATE_TARGET_BY_MSG" case symbol_kind::S_CONFIG_SEC_RULE_UPDATE_TARGET_BY_ID: // "CONFIG_SEC_RULE_UPDATE_TARGET_BY_ID" case symbol_kind::S_CONFIG_SEC_RULE_UPDATE_ACTION_BY_ID: // "CONFIG_SEC_RULE_UPDATE_ACTION_BY_ID" case symbol_kind::S_CONFIG_UPDLOAD_KEEP_FILES: // "CONFIG_UPDLOAD_KEEP_FILES" case symbol_kind::S_CONFIG_UPDLOAD_SAVE_TMP_FILES: // "CONFIG_UPDLOAD_SAVE_TMP_FILES" case symbol_kind::S_CONFIG_UPLOAD_DIR: // "CONFIG_UPLOAD_DIR" case symbol_kind::S_CONFIG_UPLOAD_FILE_LIMIT: // "CONFIG_UPLOAD_FILE_LIMIT" case symbol_kind::S_CONFIG_UPLOAD_FILE_MODE: // "CONFIG_UPLOAD_FILE_MODE" case symbol_kind::S_CONFIG_VALUE_ABORT: // "CONFIG_VALUE_ABORT" case symbol_kind::S_CONFIG_VALUE_DETC: // "CONFIG_VALUE_DETC" case symbol_kind::S_CONFIG_VALUE_HTTPS: // "CONFIG_VALUE_HTTPS" case symbol_kind::S_CONFIG_VALUE_OFF: // "CONFIG_VALUE_OFF" case symbol_kind::S_CONFIG_VALUE_ON: // "CONFIG_VALUE_ON" case symbol_kind::S_CONFIG_VALUE_PARALLEL: // "CONFIG_VALUE_PARALLEL" case symbol_kind::S_CONFIG_VALUE_PROCESS_PARTIAL: // "CONFIG_VALUE_PROCESS_PARTIAL" case symbol_kind::S_CONFIG_VALUE_REJECT: // "CONFIG_VALUE_REJECT" case symbol_kind::S_CONFIG_VALUE_RELEVANT_ONLY: // "CONFIG_VALUE_RELEVANT_ONLY" case symbol_kind::S_CONFIG_VALUE_SERIAL: // "CONFIG_VALUE_SERIAL" case symbol_kind::S_CONFIG_VALUE_WARN: // "CONFIG_VALUE_WARN" case symbol_kind::S_CONFIG_XML_EXTERNAL_ENTITY: // "CONFIG_XML_EXTERNAL_ENTITY" case symbol_kind::S_CONGIG_DIR_RESPONSE_BODY_MP: // "CONGIG_DIR_RESPONSE_BODY_MP" case symbol_kind::S_CONGIG_DIR_SEC_ARG_SEP: // "CONGIG_DIR_SEC_ARG_SEP" case symbol_kind::S_CONGIG_DIR_SEC_COOKIE_FORMAT: // "CONGIG_DIR_SEC_COOKIE_FORMAT" case symbol_kind::S_CONFIG_SEC_COOKIEV0_SEPARATOR: // "CONFIG_SEC_COOKIEV0_SEPARATOR" case symbol_kind::S_CONGIG_DIR_SEC_DATA_DIR: // "CONGIG_DIR_SEC_DATA_DIR" case symbol_kind::S_CONGIG_DIR_SEC_STATUS_ENGINE: // "CONGIG_DIR_SEC_STATUS_ENGINE" case symbol_kind::S_CONFIG_SEC_STREAM_IN_BODY_INSPECTION: // "CONFIG_SEC_STREAM_IN_BODY_INSPECTION" case symbol_kind::S_CONFIG_SEC_STREAM_OUT_BODY_INSPECTION: // "CONFIG_SEC_STREAM_OUT_BODY_INSPECTION" case symbol_kind::S_CONGIG_DIR_SEC_TMP_DIR: // "CONGIG_DIR_SEC_TMP_DIR" case symbol_kind::S_DIRECTIVE: // "DIRECTIVE" case symbol_kind::S_DIRECTIVE_SECRULESCRIPT: // "DIRECTIVE_SECRULESCRIPT" case symbol_kind::S_FREE_TEXT_QUOTE_MACRO_EXPANSION: // "FREE_TEXT_QUOTE_MACRO_EXPANSION" case symbol_kind::S_QUOTATION_MARK: // "QUOTATION_MARK" case symbol_kind::S_RUN_TIME_VAR_BLD: // "RUN_TIME_VAR_BLD" case symbol_kind::S_RUN_TIME_VAR_DUR: // "RUN_TIME_VAR_DUR" case symbol_kind::S_RUN_TIME_VAR_HSV: // "RUN_TIME_VAR_HSV" case symbol_kind::S_RUN_TIME_VAR_REMOTE_USER: // "RUN_TIME_VAR_REMOTE_USER" case symbol_kind::S_RUN_TIME_VAR_TIME: // "RUN_TIME_VAR_TIME" case symbol_kind::S_RUN_TIME_VAR_TIME_DAY: // "RUN_TIME_VAR_TIME_DAY" case symbol_kind::S_RUN_TIME_VAR_TIME_EPOCH: // "RUN_TIME_VAR_TIME_EPOCH" case symbol_kind::S_RUN_TIME_VAR_TIME_HOUR: // "RUN_TIME_VAR_TIME_HOUR" case symbol_kind::S_RUN_TIME_VAR_TIME_MIN: // "RUN_TIME_VAR_TIME_MIN" case symbol_kind::S_RUN_TIME_VAR_TIME_MON: // "RUN_TIME_VAR_TIME_MON" case symbol_kind::S_RUN_TIME_VAR_TIME_SEC: // "RUN_TIME_VAR_TIME_SEC" case symbol_kind::S_RUN_TIME_VAR_TIME_WDAY: // "RUN_TIME_VAR_TIME_WDAY" case symbol_kind::S_RUN_TIME_VAR_TIME_YEAR: // "RUN_TIME_VAR_TIME_YEAR" case symbol_kind::S_VARIABLE: // "VARIABLE" case symbol_kind::S_DICT_ELEMENT: // "Dictionary element" case symbol_kind::S_DICT_ELEMENT_REGEXP: // "Dictionary element, selected by regexp" value.copy< std::string > (YY_MOVE (that.value)); break; case symbol_kind::S_op: // op case symbol_kind::S_op_before_init: // op_before_init value.copy< std::unique_ptr > (YY_MOVE (that.value)); break; case symbol_kind::S_run_time_string: // run_time_string value.copy< std::unique_ptr > (YY_MOVE (that.value)); break; case symbol_kind::S_var: // var value.copy< std::unique_ptr > (YY_MOVE (that.value)); break; case symbol_kind::S_act: // act case symbol_kind::S_setvar_action: // setvar_action value.copy< std::unique_ptr > (YY_MOVE (that.value)); break; case symbol_kind::S_variables: // variables case symbol_kind::S_variables_pre_process: // variables_pre_process case symbol_kind::S_variables_may_be_quoted: // variables_may_be_quoted value.copy< std::unique_ptr > > > (YY_MOVE (that.value)); break; case symbol_kind::S_actions: // actions case symbol_kind::S_actions_may_quoted: // actions_may_quoted value.copy< std::unique_ptr > > > (YY_MOVE (that.value)); break; default: break; } } template seclang_parser::symbol_kind_type seclang_parser::basic_symbol::type_get () const YY_NOEXCEPT { return this->kind (); } template bool seclang_parser::basic_symbol::empty () const YY_NOEXCEPT { return this->kind () == symbol_kind::S_YYEMPTY; } template void seclang_parser::basic_symbol::move (basic_symbol& s) { super_type::move (s); switch (this->kind ()) { case symbol_kind::S_ACTION_ACCURACY: // "Accuracy" case symbol_kind::S_ACTION_ALLOW: // "Allow" case symbol_kind::S_ACTION_APPEND: // "Append" case symbol_kind::S_ACTION_AUDIT_LOG: // "AuditLog" case symbol_kind::S_ACTION_BLOCK: // "Block" case symbol_kind::S_ACTION_CAPTURE: // "Capture" case symbol_kind::S_ACTION_CHAIN: // "Chain" case symbol_kind::S_ACTION_CTL_AUDIT_ENGINE: // "ACTION_CTL_AUDIT_ENGINE" case symbol_kind::S_ACTION_CTL_AUDIT_LOG_PARTS: // "ACTION_CTL_AUDIT_LOG_PARTS" case symbol_kind::S_ACTION_CTL_BDY_JSON: // "ACTION_CTL_BDY_JSON" case symbol_kind::S_ACTION_CTL_BDY_XML: // "ACTION_CTL_BDY_XML" case symbol_kind::S_ACTION_CTL_BDY_URLENCODED: // "ACTION_CTL_BDY_URLENCODED" case symbol_kind::S_ACTION_CTL_FORCE_REQ_BODY_VAR: // "ACTION_CTL_FORCE_REQ_BODY_VAR" case symbol_kind::S_ACTION_CTL_REQUEST_BODY_ACCESS: // "ACTION_CTL_REQUEST_BODY_ACCESS" case symbol_kind::S_ACTION_CTL_RULE_REMOVE_BY_ID: // "ACTION_CTL_RULE_REMOVE_BY_ID" case symbol_kind::S_ACTION_CTL_RULE_REMOVE_BY_TAG: // "ACTION_CTL_RULE_REMOVE_BY_TAG" case symbol_kind::S_ACTION_CTL_RULE_REMOVE_TARGET_BY_ID: // "ACTION_CTL_RULE_REMOVE_TARGET_BY_ID" case symbol_kind::S_ACTION_CTL_RULE_REMOVE_TARGET_BY_TAG: // "ACTION_CTL_RULE_REMOVE_TARGET_BY_TAG" case symbol_kind::S_ACTION_DENY: // "Deny" case symbol_kind::S_ACTION_DEPRECATE_VAR: // "DeprecateVar" case symbol_kind::S_ACTION_DROP: // "Drop" case symbol_kind::S_ACTION_EXEC: // "Exec" case symbol_kind::S_ACTION_EXPIRE_VAR: // "ExpireVar" case symbol_kind::S_ACTION_ID: // "Id" case symbol_kind::S_ACTION_INITCOL: // "InitCol" case symbol_kind::S_ACTION_LOG: // "Log" case symbol_kind::S_ACTION_LOG_DATA: // "LogData" case symbol_kind::S_ACTION_MATURITY: // "Maturity" case symbol_kind::S_ACTION_MSG: // "Msg" case symbol_kind::S_ACTION_MULTI_MATCH: // "MultiMatch" case symbol_kind::S_ACTION_NO_AUDIT_LOG: // "NoAuditLog" case symbol_kind::S_ACTION_NO_LOG: // "NoLog" case symbol_kind::S_ACTION_PASS: // "Pass" case symbol_kind::S_ACTION_PAUSE: // "Pause" case symbol_kind::S_ACTION_PHASE: // "Phase" case symbol_kind::S_ACTION_PREPEND: // "Prepend" case symbol_kind::S_ACTION_PROXY: // "Proxy" case symbol_kind::S_ACTION_REDIRECT: // "Redirect" case symbol_kind::S_ACTION_REV: // "Rev" case symbol_kind::S_ACTION_SANITISE_ARG: // "SanitiseArg" case symbol_kind::S_ACTION_SANITISE_MATCHED: // "SanitiseMatched" case symbol_kind::S_ACTION_SANITISE_MATCHED_BYTES: // "SanitiseMatchedBytes" case symbol_kind::S_ACTION_SANITISE_REQUEST_HEADER: // "SanitiseRequestHeader" case symbol_kind::S_ACTION_SANITISE_RESPONSE_HEADER: // "SanitiseResponseHeader" case symbol_kind::S_ACTION_SETENV: // "SetEnv" case symbol_kind::S_ACTION_SETRSC: // "SetRsc" case symbol_kind::S_ACTION_SETSID: // "SetSid" case symbol_kind::S_ACTION_SETUID: // "SetUID" case symbol_kind::S_ACTION_SEVERITY: // "Severity" case symbol_kind::S_ACTION_SKIP: // "Skip" case symbol_kind::S_ACTION_SKIP_AFTER: // "SkipAfter" case symbol_kind::S_ACTION_STATUS: // "Status" case symbol_kind::S_ACTION_TAG: // "Tag" case symbol_kind::S_ACTION_TRANSFORMATION_BASE_64_ENCODE: // "ACTION_TRANSFORMATION_BASE_64_ENCODE" case symbol_kind::S_ACTION_TRANSFORMATION_BASE_64_DECODE: // "ACTION_TRANSFORMATION_BASE_64_DECODE" case symbol_kind::S_ACTION_TRANSFORMATION_BASE_64_DECODE_EXT: // "ACTION_TRANSFORMATION_BASE_64_DECODE_EXT" case symbol_kind::S_ACTION_TRANSFORMATION_CMD_LINE: // "ACTION_TRANSFORMATION_CMD_LINE" case symbol_kind::S_ACTION_TRANSFORMATION_COMPRESS_WHITESPACE: // "ACTION_TRANSFORMATION_COMPRESS_WHITESPACE" case symbol_kind::S_ACTION_TRANSFORMATION_CSS_DECODE: // "ACTION_TRANSFORMATION_CSS_DECODE" case symbol_kind::S_ACTION_TRANSFORMATION_ESCAPE_SEQ_DECODE: // "ACTION_TRANSFORMATION_ESCAPE_SEQ_DECODE" case symbol_kind::S_ACTION_TRANSFORMATION_HEX_ENCODE: // "ACTION_TRANSFORMATION_HEX_ENCODE" case symbol_kind::S_ACTION_TRANSFORMATION_HEX_DECODE: // "ACTION_TRANSFORMATION_HEX_DECODE" case symbol_kind::S_ACTION_TRANSFORMATION_HTML_ENTITY_DECODE: // "ACTION_TRANSFORMATION_HTML_ENTITY_DECODE" case symbol_kind::S_ACTION_TRANSFORMATION_JS_DECODE: // "ACTION_TRANSFORMATION_JS_DECODE" case symbol_kind::S_ACTION_TRANSFORMATION_LENGTH: // "ACTION_TRANSFORMATION_LENGTH" case symbol_kind::S_ACTION_TRANSFORMATION_LOWERCASE: // "ACTION_TRANSFORMATION_LOWERCASE" case symbol_kind::S_ACTION_TRANSFORMATION_MD5: // "ACTION_TRANSFORMATION_MD5" case symbol_kind::S_ACTION_TRANSFORMATION_NONE: // "ACTION_TRANSFORMATION_NONE" case symbol_kind::S_ACTION_TRANSFORMATION_NORMALISE_PATH: // "ACTION_TRANSFORMATION_NORMALISE_PATH" case symbol_kind::S_ACTION_TRANSFORMATION_NORMALISE_PATH_WIN: // "ACTION_TRANSFORMATION_NORMALISE_PATH_WIN" case symbol_kind::S_ACTION_TRANSFORMATION_PARITY_EVEN_7_BIT: // "ACTION_TRANSFORMATION_PARITY_EVEN_7_BIT" case symbol_kind::S_ACTION_TRANSFORMATION_PARITY_ODD_7_BIT: // "ACTION_TRANSFORMATION_PARITY_ODD_7_BIT" case symbol_kind::S_ACTION_TRANSFORMATION_PARITY_ZERO_7_BIT: // "ACTION_TRANSFORMATION_PARITY_ZERO_7_BIT" case symbol_kind::S_ACTION_TRANSFORMATION_REMOVE_COMMENTS: // "ACTION_TRANSFORMATION_REMOVE_COMMENTS" case symbol_kind::S_ACTION_TRANSFORMATION_REMOVE_COMMENTS_CHAR: // "ACTION_TRANSFORMATION_REMOVE_COMMENTS_CHAR" case symbol_kind::S_ACTION_TRANSFORMATION_REMOVE_NULLS: // "ACTION_TRANSFORMATION_REMOVE_NULLS" case symbol_kind::S_ACTION_TRANSFORMATION_REMOVE_WHITESPACE: // "ACTION_TRANSFORMATION_REMOVE_WHITESPACE" case symbol_kind::S_ACTION_TRANSFORMATION_REPLACE_COMMENTS: // "ACTION_TRANSFORMATION_REPLACE_COMMENTS" case symbol_kind::S_ACTION_TRANSFORMATION_REPLACE_NULLS: // "ACTION_TRANSFORMATION_REPLACE_NULLS" case symbol_kind::S_ACTION_TRANSFORMATION_SHA1: // "ACTION_TRANSFORMATION_SHA1" case symbol_kind::S_ACTION_TRANSFORMATION_SQL_HEX_DECODE: // "ACTION_TRANSFORMATION_SQL_HEX_DECODE" case symbol_kind::S_ACTION_TRANSFORMATION_TRIM: // "ACTION_TRANSFORMATION_TRIM" case symbol_kind::S_ACTION_TRANSFORMATION_TRIM_LEFT: // "ACTION_TRANSFORMATION_TRIM_LEFT" case symbol_kind::S_ACTION_TRANSFORMATION_TRIM_RIGHT: // "ACTION_TRANSFORMATION_TRIM_RIGHT" case symbol_kind::S_ACTION_TRANSFORMATION_UPPERCASE: // "ACTION_TRANSFORMATION_UPPERCASE" case symbol_kind::S_ACTION_TRANSFORMATION_URL_ENCODE: // "ACTION_TRANSFORMATION_URL_ENCODE" case symbol_kind::S_ACTION_TRANSFORMATION_URL_DECODE: // "ACTION_TRANSFORMATION_URL_DECODE" case symbol_kind::S_ACTION_TRANSFORMATION_URL_DECODE_UNI: // "ACTION_TRANSFORMATION_URL_DECODE_UNI" case symbol_kind::S_ACTION_TRANSFORMATION_UTF8_TO_UNICODE: // "ACTION_TRANSFORMATION_UTF8_TO_UNICODE" case symbol_kind::S_ACTION_VER: // "Ver" case symbol_kind::S_ACTION_XMLNS: // "xmlns" case symbol_kind::S_CONFIG_COMPONENT_SIG: // "CONFIG_COMPONENT_SIG" case symbol_kind::S_CONFIG_CONN_ENGINE: // "CONFIG_CONN_ENGINE" case symbol_kind::S_CONFIG_SEC_ARGUMENT_SEPARATOR: // "CONFIG_SEC_ARGUMENT_SEPARATOR" case symbol_kind::S_CONFIG_SEC_WEB_APP_ID: // "CONFIG_SEC_WEB_APP_ID" case symbol_kind::S_CONFIG_SEC_SERVER_SIG: // "CONFIG_SEC_SERVER_SIG" case symbol_kind::S_CONFIG_DIR_AUDIT_DIR: // "CONFIG_DIR_AUDIT_DIR" case symbol_kind::S_CONFIG_DIR_AUDIT_DIR_MOD: // "CONFIG_DIR_AUDIT_DIR_MOD" case symbol_kind::S_CONFIG_DIR_AUDIT_ENG: // "CONFIG_DIR_AUDIT_ENG" case symbol_kind::S_CONFIG_DIR_AUDIT_FLE_MOD: // "CONFIG_DIR_AUDIT_FLE_MOD" case symbol_kind::S_CONFIG_DIR_AUDIT_LOG: // "CONFIG_DIR_AUDIT_LOG" case symbol_kind::S_CONFIG_DIR_AUDIT_LOG2: // "CONFIG_DIR_AUDIT_LOG2" case symbol_kind::S_CONFIG_DIR_AUDIT_LOG_P: // "CONFIG_DIR_AUDIT_LOG_P" case symbol_kind::S_CONFIG_DIR_AUDIT_STS: // "CONFIG_DIR_AUDIT_STS" case symbol_kind::S_CONFIG_DIR_AUDIT_TPE: // "CONFIG_DIR_AUDIT_TPE" case symbol_kind::S_CONFIG_DIR_DEBUG_LOG: // "CONFIG_DIR_DEBUG_LOG" case symbol_kind::S_CONFIG_DIR_DEBUG_LVL: // "CONFIG_DIR_DEBUG_LVL" case symbol_kind::S_CONFIG_SEC_CACHE_TRANSFORMATIONS: // "CONFIG_SEC_CACHE_TRANSFORMATIONS" case symbol_kind::S_CONFIG_SEC_DISABLE_BACKEND_COMPRESS: // "CONFIG_SEC_DISABLE_BACKEND_COMPRESS" case symbol_kind::S_CONFIG_SEC_HASH_ENGINE: // "CONFIG_SEC_HASH_ENGINE" case symbol_kind::S_CONFIG_SEC_HASH_KEY: // "CONFIG_SEC_HASH_KEY" case symbol_kind::S_CONFIG_SEC_HASH_PARAM: // "CONFIG_SEC_HASH_PARAM" case symbol_kind::S_CONFIG_SEC_HASH_METHOD_RX: // "CONFIG_SEC_HASH_METHOD_RX" case symbol_kind::S_CONFIG_SEC_HASH_METHOD_PM: // "CONFIG_SEC_HASH_METHOD_PM" case symbol_kind::S_CONFIG_SEC_CHROOT_DIR: // "CONFIG_SEC_CHROOT_DIR" case symbol_kind::S_CONFIG_DIR_GEO_DB: // "CONFIG_DIR_GEO_DB" case symbol_kind::S_CONFIG_DIR_GSB_DB: // "CONFIG_DIR_GSB_DB" case symbol_kind::S_CONFIG_SEC_GUARDIAN_LOG: // "CONFIG_SEC_GUARDIAN_LOG" case symbol_kind::S_CONFIG_DIR_PCRE_MATCH_LIMIT: // "CONFIG_DIR_PCRE_MATCH_LIMIT" case symbol_kind::S_CONFIG_DIR_PCRE_MATCH_LIMIT_RECURSION: // "CONFIG_DIR_PCRE_MATCH_LIMIT_RECURSION" case symbol_kind::S_CONFIG_SEC_CONN_R_STATE_LIMIT: // "CONFIG_SEC_CONN_R_STATE_LIMIT" case symbol_kind::S_CONFIG_SEC_CONN_W_STATE_LIMIT: // "CONFIG_SEC_CONN_W_STATE_LIMIT" case symbol_kind::S_CONFIG_SEC_SENSOR_ID: // "CONFIG_SEC_SENSOR_ID" case symbol_kind::S_CONFIG_DIR_ARGS_LIMIT: // "CONFIG_DIR_ARGS_LIMIT" case symbol_kind::S_CONFIG_DIR_REQ_BODY_JSON_DEPTH_LIMIT: // "CONFIG_DIR_REQ_BODY_JSON_DEPTH_LIMIT" case symbol_kind::S_CONFIG_DIR_REQ_BODY: // "CONFIG_DIR_REQ_BODY" case symbol_kind::S_CONFIG_DIR_REQ_BODY_IN_MEMORY_LIMIT: // "CONFIG_DIR_REQ_BODY_IN_MEMORY_LIMIT" case symbol_kind::S_CONFIG_DIR_REQ_BODY_LIMIT: // "CONFIG_DIR_REQ_BODY_LIMIT" case symbol_kind::S_CONFIG_DIR_REQ_BODY_LIMIT_ACTION: // "CONFIG_DIR_REQ_BODY_LIMIT_ACTION" case symbol_kind::S_CONFIG_DIR_REQ_BODY_NO_FILES_LIMIT: // "CONFIG_DIR_REQ_BODY_NO_FILES_LIMIT" case symbol_kind::S_CONFIG_DIR_RES_BODY: // "CONFIG_DIR_RES_BODY" case symbol_kind::S_CONFIG_DIR_RES_BODY_LIMIT: // "CONFIG_DIR_RES_BODY_LIMIT" case symbol_kind::S_CONFIG_DIR_RES_BODY_LIMIT_ACTION: // "CONFIG_DIR_RES_BODY_LIMIT_ACTION" case symbol_kind::S_CONFIG_SEC_RULE_INHERITANCE: // "CONFIG_SEC_RULE_INHERITANCE" case symbol_kind::S_CONFIG_SEC_RULE_PERF_TIME: // "CONFIG_SEC_RULE_PERF_TIME" case symbol_kind::S_CONFIG_DIR_RULE_ENG: // "CONFIG_DIR_RULE_ENG" case symbol_kind::S_CONFIG_DIR_SEC_ACTION: // "CONFIG_DIR_SEC_ACTION" case symbol_kind::S_CONFIG_DIR_SEC_DEFAULT_ACTION: // "CONFIG_DIR_SEC_DEFAULT_ACTION" case symbol_kind::S_CONFIG_DIR_SEC_MARKER: // "CONFIG_DIR_SEC_MARKER" case symbol_kind::S_CONFIG_DIR_UNICODE_MAP_FILE: // "CONFIG_DIR_UNICODE_MAP_FILE" case symbol_kind::S_CONFIG_DIR_UNICODE_CODE_PAGE: // "CONFIG_DIR_UNICODE_CODE_PAGE" case symbol_kind::S_CONFIG_SEC_COLLECTION_TIMEOUT: // "CONFIG_SEC_COLLECTION_TIMEOUT" case symbol_kind::S_CONFIG_SEC_HTTP_BLKEY: // "CONFIG_SEC_HTTP_BLKEY" case symbol_kind::S_CONFIG_SEC_INTERCEPT_ON_ERROR: // "CONFIG_SEC_INTERCEPT_ON_ERROR" case symbol_kind::S_CONFIG_SEC_REMOTE_RULES_FAIL_ACTION: // "CONFIG_SEC_REMOTE_RULES_FAIL_ACTION" case symbol_kind::S_CONFIG_SEC_RULE_REMOVE_BY_ID: // "CONFIG_SEC_RULE_REMOVE_BY_ID" case symbol_kind::S_CONFIG_SEC_RULE_REMOVE_BY_MSG: // "CONFIG_SEC_RULE_REMOVE_BY_MSG" case symbol_kind::S_CONFIG_SEC_RULE_REMOVE_BY_TAG: // "CONFIG_SEC_RULE_REMOVE_BY_TAG" case symbol_kind::S_CONFIG_SEC_RULE_UPDATE_TARGET_BY_TAG: // "CONFIG_SEC_RULE_UPDATE_TARGET_BY_TAG" case symbol_kind::S_CONFIG_SEC_RULE_UPDATE_TARGET_BY_MSG: // "CONFIG_SEC_RULE_UPDATE_TARGET_BY_MSG" case symbol_kind::S_CONFIG_SEC_RULE_UPDATE_TARGET_BY_ID: // "CONFIG_SEC_RULE_UPDATE_TARGET_BY_ID" case symbol_kind::S_CONFIG_SEC_RULE_UPDATE_ACTION_BY_ID: // "CONFIG_SEC_RULE_UPDATE_ACTION_BY_ID" case symbol_kind::S_CONFIG_UPDLOAD_KEEP_FILES: // "CONFIG_UPDLOAD_KEEP_FILES" case symbol_kind::S_CONFIG_UPDLOAD_SAVE_TMP_FILES: // "CONFIG_UPDLOAD_SAVE_TMP_FILES" case symbol_kind::S_CONFIG_UPLOAD_DIR: // "CONFIG_UPLOAD_DIR" case symbol_kind::S_CONFIG_UPLOAD_FILE_LIMIT: // "CONFIG_UPLOAD_FILE_LIMIT" case symbol_kind::S_CONFIG_UPLOAD_FILE_MODE: // "CONFIG_UPLOAD_FILE_MODE" case symbol_kind::S_CONFIG_VALUE_ABORT: // "CONFIG_VALUE_ABORT" case symbol_kind::S_CONFIG_VALUE_DETC: // "CONFIG_VALUE_DETC" case symbol_kind::S_CONFIG_VALUE_HTTPS: // "CONFIG_VALUE_HTTPS" case symbol_kind::S_CONFIG_VALUE_OFF: // "CONFIG_VALUE_OFF" case symbol_kind::S_CONFIG_VALUE_ON: // "CONFIG_VALUE_ON" case symbol_kind::S_CONFIG_VALUE_PARALLEL: // "CONFIG_VALUE_PARALLEL" case symbol_kind::S_CONFIG_VALUE_PROCESS_PARTIAL: // "CONFIG_VALUE_PROCESS_PARTIAL" case symbol_kind::S_CONFIG_VALUE_REJECT: // "CONFIG_VALUE_REJECT" case symbol_kind::S_CONFIG_VALUE_RELEVANT_ONLY: // "CONFIG_VALUE_RELEVANT_ONLY" case symbol_kind::S_CONFIG_VALUE_SERIAL: // "CONFIG_VALUE_SERIAL" case symbol_kind::S_CONFIG_VALUE_WARN: // "CONFIG_VALUE_WARN" case symbol_kind::S_CONFIG_XML_EXTERNAL_ENTITY: // "CONFIG_XML_EXTERNAL_ENTITY" case symbol_kind::S_CONGIG_DIR_RESPONSE_BODY_MP: // "CONGIG_DIR_RESPONSE_BODY_MP" case symbol_kind::S_CONGIG_DIR_SEC_ARG_SEP: // "CONGIG_DIR_SEC_ARG_SEP" case symbol_kind::S_CONGIG_DIR_SEC_COOKIE_FORMAT: // "CONGIG_DIR_SEC_COOKIE_FORMAT" case symbol_kind::S_CONFIG_SEC_COOKIEV0_SEPARATOR: // "CONFIG_SEC_COOKIEV0_SEPARATOR" case symbol_kind::S_CONGIG_DIR_SEC_DATA_DIR: // "CONGIG_DIR_SEC_DATA_DIR" case symbol_kind::S_CONGIG_DIR_SEC_STATUS_ENGINE: // "CONGIG_DIR_SEC_STATUS_ENGINE" case symbol_kind::S_CONFIG_SEC_STREAM_IN_BODY_INSPECTION: // "CONFIG_SEC_STREAM_IN_BODY_INSPECTION" case symbol_kind::S_CONFIG_SEC_STREAM_OUT_BODY_INSPECTION: // "CONFIG_SEC_STREAM_OUT_BODY_INSPECTION" case symbol_kind::S_CONGIG_DIR_SEC_TMP_DIR: // "CONGIG_DIR_SEC_TMP_DIR" case symbol_kind::S_DIRECTIVE: // "DIRECTIVE" case symbol_kind::S_DIRECTIVE_SECRULESCRIPT: // "DIRECTIVE_SECRULESCRIPT" case symbol_kind::S_FREE_TEXT_QUOTE_MACRO_EXPANSION: // "FREE_TEXT_QUOTE_MACRO_EXPANSION" case symbol_kind::S_QUOTATION_MARK: // "QUOTATION_MARK" case symbol_kind::S_RUN_TIME_VAR_BLD: // "RUN_TIME_VAR_BLD" case symbol_kind::S_RUN_TIME_VAR_DUR: // "RUN_TIME_VAR_DUR" case symbol_kind::S_RUN_TIME_VAR_HSV: // "RUN_TIME_VAR_HSV" case symbol_kind::S_RUN_TIME_VAR_REMOTE_USER: // "RUN_TIME_VAR_REMOTE_USER" case symbol_kind::S_RUN_TIME_VAR_TIME: // "RUN_TIME_VAR_TIME" case symbol_kind::S_RUN_TIME_VAR_TIME_DAY: // "RUN_TIME_VAR_TIME_DAY" case symbol_kind::S_RUN_TIME_VAR_TIME_EPOCH: // "RUN_TIME_VAR_TIME_EPOCH" case symbol_kind::S_RUN_TIME_VAR_TIME_HOUR: // "RUN_TIME_VAR_TIME_HOUR" case symbol_kind::S_RUN_TIME_VAR_TIME_MIN: // "RUN_TIME_VAR_TIME_MIN" case symbol_kind::S_RUN_TIME_VAR_TIME_MON: // "RUN_TIME_VAR_TIME_MON" case symbol_kind::S_RUN_TIME_VAR_TIME_SEC: // "RUN_TIME_VAR_TIME_SEC" case symbol_kind::S_RUN_TIME_VAR_TIME_WDAY: // "RUN_TIME_VAR_TIME_WDAY" case symbol_kind::S_RUN_TIME_VAR_TIME_YEAR: // "RUN_TIME_VAR_TIME_YEAR" case symbol_kind::S_VARIABLE: // "VARIABLE" case symbol_kind::S_DICT_ELEMENT: // "Dictionary element" case symbol_kind::S_DICT_ELEMENT_REGEXP: // "Dictionary element, selected by regexp" value.move< std::string > (YY_MOVE (s.value)); break; case symbol_kind::S_op: // op case symbol_kind::S_op_before_init: // op_before_init value.move< std::unique_ptr > (YY_MOVE (s.value)); break; case symbol_kind::S_run_time_string: // run_time_string value.move< std::unique_ptr > (YY_MOVE (s.value)); break; case symbol_kind::S_var: // var value.move< std::unique_ptr > (YY_MOVE (s.value)); break; case symbol_kind::S_act: // act case symbol_kind::S_setvar_action: // setvar_action value.move< std::unique_ptr > (YY_MOVE (s.value)); break; case symbol_kind::S_variables: // variables case symbol_kind::S_variables_pre_process: // variables_pre_process case symbol_kind::S_variables_may_be_quoted: // variables_may_be_quoted value.move< std::unique_ptr > > > (YY_MOVE (s.value)); break; case symbol_kind::S_actions: // actions case symbol_kind::S_actions_may_quoted: // actions_may_quoted value.move< std::unique_ptr > > > (YY_MOVE (s.value)); break; default: break; } location = YY_MOVE (s.location); } // by_kind. inline seclang_parser::by_kind::by_kind () : kind_ (symbol_kind::S_YYEMPTY) {} #if 201103L <= YY_CPLUSPLUS inline seclang_parser::by_kind::by_kind (by_kind&& that) : kind_ (that.kind_) { that.clear (); } #endif inline seclang_parser::by_kind::by_kind (const by_kind& that) : kind_ (that.kind_) {} inline seclang_parser::by_kind::by_kind (token_kind_type t) : kind_ (yytranslate_ (t)) {} inline void seclang_parser::by_kind::clear () { kind_ = symbol_kind::S_YYEMPTY; } inline void seclang_parser::by_kind::move (by_kind& that) { kind_ = that.kind_; that.clear (); } inline seclang_parser::symbol_kind_type seclang_parser::by_kind::kind () const YY_NOEXCEPT { return kind_; } inline seclang_parser::symbol_kind_type seclang_parser::by_kind::type_get () const YY_NOEXCEPT { return this->kind (); } } // yy #line 8629 "seclang-parser.hh" #endif // !YY_YY_SECLANG_PARSER_HH_INCLUDED modsecurity-v3.0.6/src/parser/location.hh0000664000175000017500000001726714146026157021636 0ustar mhsvierulamhsvierula// A Bison parser, made by GNU Bison 3.7.2. // Locations for Bison parsers in C++ // Copyright (C) 2002-2015, 2018-2020 Free Software Foundation, Inc. // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // You should have received a copy of the GNU General Public License // along with this program. If not, see . // As a special exception, you may create a larger work that contains // part or all of the Bison parser skeleton and distribute that work // under terms of your choice, so long as that work isn't itself a // parser generator using the skeleton or a modified version thereof // as a parser skeleton. Alternatively, if you modify or redistribute // the parser skeleton itself, you may (at your option) remove this // special exception, which will cause the skeleton and the resulting // Bison output files to be licensed under the GNU General Public // License without this special exception. // This special exception was added by the Free Software Foundation in // version 2.2 of Bison. /** ** \file location.hh ** Define the yy::location class. */ #ifndef YY_YY_LOCATION_HH_INCLUDED # define YY_YY_LOCATION_HH_INCLUDED # include # include # ifndef YY_NULLPTR # if defined __cplusplus # if 201103L <= __cplusplus # define YY_NULLPTR nullptr # else # define YY_NULLPTR 0 # endif # else # define YY_NULLPTR ((void*)0) # endif # endif namespace yy { #line 58 "location.hh" /// A point in a source file. class position { public: /// Type for file name. typedef const std::string filename_type; /// Type for line and column numbers. typedef int counter_type; /// Construct a position. explicit position (filename_type* f = YY_NULLPTR, counter_type l = 1, counter_type c = 1) : filename (f) , line (l) , column (c) {} /// Initialization. void initialize (filename_type* fn = YY_NULLPTR, counter_type l = 1, counter_type c = 1) { filename = fn; line = l; column = c; } /** \name Line and Column related manipulators ** \{ */ /// (line related) Advance to the COUNT next lines. void lines (counter_type count = 1) { if (count) { column = 1; line = add_ (line, count, 1); } } /// (column related) Advance to the COUNT next columns. void columns (counter_type count = 1) { column = add_ (column, count, 1); } /** \} */ /// File name to which this position refers. filename_type* filename; /// Current line number. counter_type line; /// Current column number. counter_type column; private: /// Compute max (min, lhs+rhs). static counter_type add_ (counter_type lhs, counter_type rhs, counter_type min) { return lhs + rhs < min ? min : lhs + rhs; } }; /// Add \a width columns, in place. inline position& operator+= (position& res, position::counter_type width) { res.columns (width); return res; } /// Add \a width columns. inline position operator+ (position res, position::counter_type width) { return res += width; } /// Subtract \a width columns, in place. inline position& operator-= (position& res, position::counter_type width) { return res += -width; } /// Subtract \a width columns. inline position operator- (position res, position::counter_type width) { return res -= width; } /** \brief Intercept output stream redirection. ** \param ostr the destination output stream ** \param pos a reference to the position to redirect */ template std::basic_ostream& operator<< (std::basic_ostream& ostr, const position& pos) { if (pos.filename) ostr << *pos.filename << ':'; return ostr << pos.line << '.' << pos.column; } /// Two points in a source file. class location { public: /// Type for file name. typedef position::filename_type filename_type; /// Type for line and column numbers. typedef position::counter_type counter_type; /// Construct a location from \a b to \a e. location (const position& b, const position& e) : begin (b) , end (e) {} /// Construct a 0-width location in \a p. explicit location (const position& p = position ()) : begin (p) , end (p) {} /// Construct a 0-width location in \a f, \a l, \a c. explicit location (filename_type* f, counter_type l = 1, counter_type c = 1) : begin (f, l, c) , end (f, l, c) {} /// Initialization. void initialize (filename_type* f = YY_NULLPTR, counter_type l = 1, counter_type c = 1) { begin.initialize (f, l, c); end = begin; } /** \name Line and Column related manipulators ** \{ */ public: /// Reset initial location to final location. void step () { begin = end; } /// Extend the current location to the COUNT next columns. void columns (counter_type count = 1) { end += count; } /// Extend the current location to the COUNT next lines. void lines (counter_type count = 1) { end.lines (count); } /** \} */ public: /// Beginning of the located region. position begin; /// End of the located region. position end; }; /// Join two locations, in place. inline location& operator+= (location& res, const location& end) { res.end = end.end; return res; } /// Join two locations. inline location operator+ (location res, const location& end) { return res += end; } /// Add \a width columns to the end position, in place. inline location& operator+= (location& res, location::counter_type width) { res.columns (width); return res; } /// Add \a width columns to the end position. inline location operator+ (location res, location::counter_type width) { return res += width; } /// Subtract \a width columns to the end position, in place. inline location& operator-= (location& res, location::counter_type width) { return res += -width; } /// Subtract \a width columns to the end position. inline location operator- (location res, location::counter_type width) { return res -= width; } /** \brief Intercept output stream redirection. ** \param ostr the destination output stream ** \param loc a reference to the location to redirect ** ** Avoid duplicate information. */ template std::basic_ostream& operator<< (std::basic_ostream& ostr, const location& loc) { location::counter_type end_col = 0 < loc.end.column ? loc.end.column - 1 : 0; ostr << loc.begin; if (loc.end.filename && (!loc.begin.filename || *loc.begin.filename != *loc.end.filename)) ostr << '-' << loc.end.filename << ':' << loc.end.line << '.' << end_col; else if (loc.begin.line < loc.end.line) ostr << '-' << loc.end.line << '.' << end_col; else if (loc.begin.column < end_col) ostr << '-' << end_col; return ostr; } } // yy #line 303 "location.hh" #endif // !YY_YY_LOCATION_HH_INCLUDED modsecurity-v3.0.6/src/run_time_string.h0000664000175000017500000000322314146026157021555 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include #include #include #include #include #include #include "modsecurity/modsecurity.h" #include "modsecurity/transaction.h" #include "src/variables/variable.h" #ifndef SRC_RUN_TIME_STRING_H_ #define SRC_RUN_TIME_STRING_H_ namespace modsecurity { class RunTimeElementHolder { public: RunTimeElementHolder() : m_string("") { m_var.reset(NULL); } std::unique_ptr m_var; std::string m_string; }; class RunTimeString { public: RunTimeString() : m_containsMacro(false) { } void appendText(const std::string &text); void appendVar(std::unique_ptr var); std::string evaluate(Transaction *t); std::string evaluate(Transaction *t, Rule *r); std::string evaluate() { return evaluate(NULL); } inline bool containsMacro() const { return m_containsMacro; } bool m_containsMacro; protected: std::list> m_elements; }; } // namespace modsecurity #endif // SRC_RUN_TIME_STRING_H_ modsecurity-v3.0.6/src/run_time_string.cc0000664000175000017500000000404614146026157021717 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include "src/run_time_string.h" #include "modsecurity/variable_value.h" #include "modsecurity/transaction.h" #include "src/variables/rule.h" #include "src/variables/tx.h" #include "src/variables/highest_severity.h" #include "src/utils/string.h" #include "src/variables/variable.h" namespace modsecurity { void RunTimeString::appendText(const std::string &text) { std::unique_ptr r(new RunTimeElementHolder); r->m_string = text; m_elements.push_back(std::move(r)); } void RunTimeString::appendVar( std::unique_ptr var) { std::unique_ptr r(new RunTimeElementHolder); r->m_var = std::move(var); m_elements.push_back(std::move(r)); m_containsMacro = true; } std::string RunTimeString::evaluate(Transaction *t) { return evaluate(t, NULL); } std::string RunTimeString::evaluate(Transaction *t, Rule *r) { std::string s; for (auto &z : m_elements) { if (z->m_string.size() > 0) { s.append(z->m_string); } else if (z->m_var != NULL && t != NULL) { std::vector l; // FIXME: This cast should be removed. RuleWithOperator *rr = dynamic_cast(r); z->m_var->evaluate(t, rr, &l); if (l.size() > 0) { s.append(l[0]->getValue()); } for (auto &i : l) { delete i; } } } return s; } } // namespace modsecurity modsecurity-v3.0.6/src/rules_set_phases.cc0000664000175000017500000000431114146026157022052 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include #include #include #include #include "modsecurity/rules_set_phases.h" #include "modsecurity/rule.h" #include "modsecurity/rules.h" #include "modsecurity/modsecurity.h" namespace modsecurity { bool RulesSetPhases::insert(std::shared_ptr rule) { if (rule->getPhase() >= modsecurity::Phases::NUMBER_OF_PHASES) { return false; } m_rulesAtPhase[rule->getPhase()].insert(rule); return true; } int RulesSetPhases::append(RulesSetPhases *from, std::ostringstream *err) { int amount_of_rules = 0; std::vector v; for (int i = 0; i < modsecurity::Phases::NUMBER_OF_PHASES; i++) { v.reserve(m_rulesAtPhase[i].size()); for (size_t z = 0; z < m_rulesAtPhase[i].size(); z++) { RuleWithOperator *rule_ckc = dynamic_cast(m_rulesAtPhase[i].at(z).get()); if (!rule_ckc) { continue; } v.push_back(rule_ckc->m_ruleId); } } std::sort (v.begin(), v.end()); for (int phase = 0; phase < modsecurity::Phases::NUMBER_OF_PHASES; phase++) { int res = m_rulesAtPhase[phase].append(from->at(phase), v, err); if (res < 0) { return res; } amount_of_rules = amount_of_rules + res; } return amount_of_rules; } void RulesSetPhases::dump() const { for (int i = 0; i <= modsecurity::Phases::NUMBER_OF_PHASES; i++) { std::cout << "Phase: " << std::to_string(i); std::cout << " (" << std::to_string(m_rulesAtPhase[i].size()); std::cout << " rules)" << std::endl; m_rulesAtPhase[i].dump(); } } } // namespace modsecurity modsecurity-v3.0.6/src/engine/0000775000175000017500000000000014146026763017444 5ustar mhsvierulamhsvierulamodsecurity-v3.0.6/src/engine/lua.h0000664000175000017500000000604314146026157020376 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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. * */ #ifdef WITH_LUA #include #endif #include #include #include #include #ifndef SRC_ENGINE_LUA_H_ #define SRC_ENGINE_LUA_H_ namespace modsecurity { class Transaction; namespace engine { #ifdef WITH_LUA class LuaScriptBlob { public: LuaScriptBlob() : m_data(NULL), m_len(0) { } ~LuaScriptBlob() { if (m_data) { free(m_data); m_data = NULL; } } void write(const void *data, size_t len) { unsigned char *d = (unsigned char *)realloc((unsigned char *)m_data, len + m_len); std::memcpy(d + m_len, data, len); m_len = m_len + len; m_data = d; } const char *read(size_t *len) const { *len = m_len; return (const char *)m_data; } unsigned char *m_data; size_t m_len; }; #endif class Lua { public: Lua() { } bool load(const std::string &script, std::string *err); int run(Transaction *t, const std::string &str=""); static bool isCompatible(const std::string &script, Lua *l, std::string *error); #ifdef WITH_LUA static int blob_keeper(lua_State *L, const void *p, size_t sz, void *ud); static const char *blob_reader(lua_State *L, void *us, size_t *size); static int log(lua_State *L); static int getvar(lua_State *L); static int getvars(lua_State *L); static int setvar(lua_State *L); static std::string applyTransformations(lua_State *L, Transaction *t, int idx, std::string var); LuaScriptBlob m_blob; #endif std::string m_scriptName; }; #ifdef WITH_LUA static const struct luaL_Reg mscLuaLib[] = { { "log", Lua::log }, { "getvar", Lua::getvar }, { "getvars", Lua::getvars }, { "setvar", Lua::setvar }, { NULL, NULL } }; #endif } // namespace engine } // namespace modsecurity #ifdef WITH_LUA #if defined LUA_VERSION_NUM && LUA_VERSION_NUM < 502 && !defined WITH_LUA_JIT_2_1 /* ** Adapted from Lua 5.2.0 */ #define LUA_OK 0 static void luaL_setfuncs(lua_State *L, const luaL_Reg *l, int nup) { luaL_checkstack(L, nup + 1, "too many upvalues"); for (; l->name != NULL; l++) { /* fill the table with given functions */ int i; lua_pushstring(L, l->name); for (i = 0; i < nup; i++) /* copy upvalues to the top */ lua_pushvalue(L, -(nup + 1)); lua_pushcclosure(L, l->func, nup); /* closure with those upvalues */ lua_settable(L, -(nup + 3)); } lua_pop(L, nup); /* remove upvalues */ } #endif #endif #endif // SRC_ENGINE_LUA_H_ modsecurity-v3.0.6/src/engine/lua.cc0000664000175000017500000003061314146026157020534 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "src/engine/lua.h" #include #include #include #include #include #include #include #include #include "modsecurity/variable_value.h" #include "modsecurity/modsecurity.h" #include "src/utils/string.h" #include "modsecurity/transaction.h" #include "src/variables/variable.h" #include "src/variables/highest_severity.h" #include "src/actions/transformations/transformation.h" namespace modsecurity { namespace engine { bool Lua::isCompatible(const std::string &script, Lua *l, std::string *error) { #ifdef WITH_LUA std::string lua(".lua"); std::string err; if (!(script.size() >= lua.size() && script.compare(script.size() - lua.size(), lua.size(), lua) == 0)) { error->assign("Expecting a Lua script: " + script); return false; } if (l->load(script, &err) == false) { error->assign("Problems load script: " + err); return false; } return true; #else error->assign("Lua support was not enabled."); return false; #endif } bool Lua::load(const std::string &script, std::string *err) { #ifdef WITH_LUA lua_State *L = luaL_newstate(); luaL_openlibs(L); m_scriptName = script; if (luaL_loadfile(L, script.c_str())) { const char *luaerr = lua_tostring(L, -1); err->assign("Failed to compile script '" + script + ""); if (luaerr) { err->append(": " + std::string(luaerr)); } err->append("."); lua_close(L); return false; } #if defined (WITH_LUA_5_2) || defined (WITH_LUA_5_1) if (lua_dump(L, Lua::blob_keeper, reinterpret_cast(&m_blob))) { #else if (lua_dump(L, Lua::blob_keeper, reinterpret_cast(&m_blob), 0)) { #endif const char *luaerr = lua_tostring(L, -1); err->assign("Failed to compile script '" + script + ""); if (luaerr) { err->append(": " + std::string(luaerr)); } err->append("."); lua_close(L); return false; } lua_close(L); return true; #else err->assign("Lua support was not enabled."); return false; #endif } #ifdef WITH_LUA int Lua::blob_keeper(lua_State *L, const void *p, size_t sz, void *ud) { LuaScriptBlob *lsb = static_cast(ud); lsb->write(p, sz); return 0; } const char *Lua::blob_reader(lua_State *L, void *ud, size_t *size) { LuaScriptBlob *lsb = static_cast(ud); const char *data = lsb->read(size); return data; } #endif int Lua::run(Transaction *t, const std::string &str) { #ifdef WITH_LUA std::string luaRet; const char *a = NULL; int ret = true; lua_State *L = luaL_newstate(); luaL_openlibs(L); luaL_newmetatable(L, "luaL_msc"); lua_newtable(L); lua_pushlightuserdata(L, reinterpret_cast(t)); lua_setglobal(L, "__transaction"); luaL_setfuncs(L, mscLuaLib, 0); lua_setglobal(L, "m"); #ifdef WITH_LUA_5_1 int rc = lua_load(L, Lua::blob_reader, &m_blob, m_scriptName.c_str()); #else int rc = lua_load(L, Lua::blob_reader, &m_blob, m_scriptName.c_str(), NULL); #endif if (rc != LUA_OK) { std::string e; e.assign("Failed to execute lua script: " + m_scriptName + ". "); switch (rc) { case LUA_ERRSYNTAX: e.assign("Syntax error. "); break; case LUA_ERRMEM: e.assign("Memory error. "); break; #if !defined(WITH_LUA_5_1) and !defined(WITH_LUA_5_4) case LUA_ERRGCMM: e.assign("Garbage Collector error. "); break; #endif } e.append(lua_tostring(L, -1)); ms_dbg_a(t, 2, e); ret = false; goto err; } if (lua_pcall(L, 0, 0, 0)) { std::string e; const char *luaerr = lua_tostring(L, -1); e.assign("Failed to execute lua script: " + m_scriptName \ + " (before main)"); if (luaerr != NULL) { e.append(" - "); e.append(luaerr); } ms_dbg_a(t, 2, e); ret = false; goto err; } lua_setglobal(L, "modsec"); lua_getglobal(L, "main"); ms_dbg_a(t, 1, str); /* Put the parameter on the stack. */ if (!str.empty() ) { lua_pushlstring(L, str.c_str(), str.length()); } if (lua_pcall(L, ((!str.empty()) ? 1 : 0), 1, 0)) { std::string e; const char *luaerr = lua_tostring(L, -1); e.assign("Failed to execute lua script: " + m_scriptName + " (main)"); if (luaerr != NULL) { e.append(" - "); e.append(luaerr); } ms_dbg_a(t, 2, e); ret = false; goto err; } a = reinterpret_cast(lua_tostring(L, -1)); if (a != NULL) { luaRet.assign(a); } ms_dbg_a(t, 9, "Returning from lua script: " + luaRet); if (luaRet.size() == 0) { ret = false; } err: lua_pop(L, 1); lua_close(L); return ret; #else ms_dbg_a(t, 9, "Lua support was not enabled."); return false; #endif } #ifdef WITH_LUA int Lua::log(lua_State *L) { const Transaction *t(NULL); const char *text; int level; /* Retrieve parameters. */ level = luaL_checknumber(L, 1); text = luaL_checkstring(L, 2); /* Retrieve msr. */ lua_getglobal(L, "__transaction"); t = reinterpret_cast(lua_topointer(L, -1)); /* Log message. */ if (t != NULL) { ms_dbg_a(t, level, text); } return 0; } int Lua::getvar(lua_State *L) { const char *varname(NULL); Transaction *t(NULL); void *z(NULL); /* Retrieve parameters. */ varname = reinterpret_cast(luaL_checkstring(L, 1)); lua_getglobal(L, "__transaction"); z = const_cast(lua_topointer(L, -1)); t = reinterpret_cast(z); std::string var = variables::Variable::stringMatchResolve(t, varname); var = applyTransformations(L, t, 2, var); if (var.size() == 0) { lua_pushnil(L); return 0; } lua_pushlstring(L, var.c_str(), var.size()); return 1; } int Lua::getvars(lua_State *L) { const char *varname(NULL); Transaction *t(NULL); void *z(NULL); std::vector l; int idx = 1; /* Retrieve parameters. */ varname = reinterpret_cast(luaL_checkstring(L, 1)); lua_getglobal(L, "__transaction"); z = const_cast(lua_topointer(L, -1)); t = reinterpret_cast(z); variables::Variable::stringMatchResolveMulti(t, varname, &l); lua_newtable(L); for (auto i : l) { lua_pushnumber(L, idx); lua_newtable(L); lua_pushstring(L, "name"); lua_pushlstring(L, i->getKeyWithCollection().c_str(), i->getKeyWithCollection().size()); lua_settable(L, -3); lua_pushstring(L, "value"); lua_pushlstring(L, i->getValue().c_str(), i->getValue().size()); lua_settable(L, -3); lua_settable(L, -3); idx++; } for (const VariableValue * i : l) { delete i; } return 1; } int Lua::setvar(lua_State *L) { Transaction *t(NULL); const char *var_value(NULL); const char *var_name(NULL); std::string vname; std::string collection; std::string variableName; int nargs = lua_gettop(L); char *chr = NULL; size_t pos; void *z(NULL); lua_getglobal(L, "__transaction"); z = const_cast(lua_topointer(L, -1)); t = reinterpret_cast(z); if (nargs != 2) { ms_dbg_a(t, 8, "m.setvar: Failed m.setvar funtion must has 2 arguments"); return -1; } var_value = luaL_checkstring(L, 2); var_name = luaL_checkstring(L, 1); lua_pop(L, 2); if (var_value == NULL || var_name == NULL) { return -1; } vname.assign(var_name); pos = vname.find("."); if (pos != std::string::npos) { collection = std::string(vname, 0, pos); collection = utils::string::toupper(collection); variableName = std::string(vname, pos + 1, std::string::npos); } else { ms_dbg_a(t, 8, "m.setvar: Must specify a collection using dot character" \ " - ie m.setvar(tx.myvar,mydata)"); return -1; } if (collection == "TX") { t->m_collections.m_tx_collection->storeOrUpdateFirst( variableName, var_value); } else if (collection == "IP") { t->m_collections.m_ip_collection->storeOrUpdateFirst( variableName, t->m_collections.m_ip_collection_key, t->m_rules->m_secWebAppId.m_value, var_value); } else if (collection == "GLOBAL") { t->m_collections.m_global_collection->storeOrUpdateFirst( variableName, t->m_collections.m_global_collection_key, t->m_rules->m_secWebAppId.m_value, var_value); } else if (collection == "RESOURCE") { t->m_collections.m_resource_collection->storeOrUpdateFirst( variableName, t->m_collections.m_resource_collection_key, t->m_rules->m_secWebAppId.m_value, var_value); } else if (collection == "SESSION") { t->m_collections.m_session_collection->storeOrUpdateFirst( variableName, t->m_collections.m_session_collection_key, t->m_rules->m_secWebAppId.m_value, var_value); } else if (collection == "USER") { t->m_collections.m_user_collection->storeOrUpdateFirst( variableName, t->m_collections.m_user_collection_key, t->m_rules->m_secWebAppId.m_value, var_value); } return 0; } std::string Lua::applyTransformations(lua_State *L, Transaction *t, int idx, std::string var) { std::string newVar = var; if (lua_isuserdata(L, idx) || lua_isnoneornil(L, idx)) { return var; } if (lua_istable(L, idx)) { const char *name = NULL; #ifdef WITH_LUA_5_1 int i, n = lua_objlen(L, idx); #else int i, n = lua_rawlen(L, idx); #endif for (i = 1; i <= n; i++) { lua_rawgeti(L, idx, i); name = reinterpret_cast(luaL_checkstring(L, -1)); /* A "none" means start over */ if (strcmp("none", name) == 0) { newVar = var; continue; } actions::transformations::Transformation *tfn = \ actions::transformations::Transformation::instantiate( "t:" + std::string(name)); // FIXME: transformation is not yet returning null. if (tfn) { newVar = tfn->evaluate(newVar, t); } else { ms_dbg_a(t, 1, "SecRuleScript: Invalid transformation function: " \ + std::string(name)); } delete tfn; } return newVar; } if (lua_isstring(L, idx)) { const char *name(NULL); name = reinterpret_cast(luaL_checkstring(L, idx)); actions::transformations::Transformation *tfn = \ actions::transformations::Transformation::instantiate( "t:" + std::string(name)); // FIXME: transformation is not yet returning null. if (tfn) { newVar = tfn->evaluate(newVar, t); delete tfn; } else { ms_dbg_a(t, 1, "SecRuleScript: Invalid transformation function: " \ + std::string(name)); } return newVar; } ms_dbg_a(t, 8, "SecRuleScript: Transformation parameter must be a " \ "transformation name or array of transformation names, but found " \ "" + std::string(lua_typename(L, idx)) + " (type " \ + std::to_string(lua_type(L, idx)) + ")"); return newVar; } #endif } // namespace engine } // namespace modsecurity modsecurity-v3.0.6/src/rule_with_operator.cc0000664000175000017500000002754014146026157022430 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "modsecurity/rule_with_operator.h" #include #include #include #include #include #include #include #include #include "modsecurity/rules_set.h" #include "src/operators/operator.h" #include "modsecurity/actions/action.h" #include "modsecurity/modsecurity.h" #include "src/actions/transformations/none.h" #include "src/actions/tag.h" #include "src/utils/string.h" #include "modsecurity/rule_message.h" #include "src/actions/msg.h" #include "src/actions/log_data.h" #include "src/actions/severity.h" #include "src/actions/capture.h" #include "src/actions/multi_match.h" #include "src/actions/set_var.h" #include "src/actions/block.h" #include "src/variables/variable.h" namespace modsecurity { using operators::Operator; using actions::Action; using variables::Variable; using actions::transformations::None; RuleWithOperator::RuleWithOperator(Operator *op, variables::Variables *_variables, std::vector *actions, Transformations *transformations, std::unique_ptr fileName, int lineNumber) : RuleWithActions(actions, transformations, std::move(fileName), lineNumber), m_variables(_variables), m_operator(op) { /* */ } RuleWithOperator::~RuleWithOperator() { if (m_operator != NULL) { delete m_operator; } while (m_variables != NULL && m_variables->empty() == false) { auto *a = m_variables->back(); m_variables->pop_back(); delete a; } if (m_variables != NULL) { delete m_variables; } } void RuleWithOperator::updateMatchedVars(Transaction *trans, const std::string &key, const std::string &value) { ms_dbg_a(trans, 9, "Matched vars updated."); trans->m_variableMatchedVar.set(value, trans->m_variableOffset); trans->m_variableMatchedVarName.set(key, trans->m_variableOffset); trans->m_variableMatchedVars.set(key, value, trans->m_variableOffset); trans->m_variableMatchedVarsNames.set(key, key, trans->m_variableOffset); } void RuleWithOperator::cleanMatchedVars(Transaction *trans) { ms_dbg_a(trans, 9, "Matched vars cleaned."); trans->m_variableMatchedVar.unset(); trans->m_variableMatchedVars.unset(); trans->m_variableMatchedVarName.unset(); trans->m_variableMatchedVarsNames.unset(); } bool RuleWithOperator::executeOperatorAt(Transaction *trans, const std::string &key, std::string value, std::shared_ptr ruleMessage) { #if MSC_EXEC_CLOCK_ENABLED clock_t begin = clock(); clock_t end; double elapsed_s = 0; #endif bool ret; ms_dbg_a(trans, 9, "Target value: \"" + utils::string::limitTo(80, utils::string::toHexIfNeeded(value)) \ + "\" (Variable: " + key + ")"); ret = this->m_operator->evaluateInternal(trans, this, value, ruleMessage); if (ret == false) { return false; } #if MSC_EXEC_CLOCK_ENABLED end = clock(); elapsed_s = static_cast(end - begin) / CLOCKS_PER_SEC; ms_dbg_a(trans, 5, "Operator completed in " + \ std::to_string(elapsed_s) + " seconds"); #endif return ret; } void RuleWithOperator::getVariablesExceptions(Transaction *t, variables::Variables *exclusion, variables::Variables *addition) { for (auto &a : t->m_rules->m_exceptions.m_variable_update_target_by_tag) { if (containsTag(*a.first.get(), t) == false) { continue; } Variable *b = a.second.get(); if (dynamic_cast(b)) { exclusion->push_back( dynamic_cast( b)->m_base.get()); } else { addition->push_back(b); } } for (auto &a : t->m_rules->m_exceptions.m_variable_update_target_by_msg) { if (containsMsg(*a.first.get(), t) == false) { continue; } Variable *b = a.second.get(); if (dynamic_cast(b)) { exclusion->push_back( dynamic_cast( b)->m_base.get()); } else { addition->push_back(b); } } for (auto &a : t->m_rules->m_exceptions.m_variable_update_target_by_id) { if (m_ruleId != a.first) { continue; } Variable *b = a.second.get(); if (dynamic_cast(b)) { exclusion->push_back( dynamic_cast( b)->m_base.get()); } else { addition->push_back(b); } } } inline void RuleWithOperator::getFinalVars(variables::Variables *vars, variables::Variables *exclusion, Transaction *trans) { variables::Variables addition; getVariablesExceptions(trans, exclusion, &addition); for (int i = 0; i < m_variables->size(); i++) { Variable *variable = m_variables->at(i); if (exclusion->contains(variable)) { continue; } if (std::find_if(trans->m_ruleRemoveTargetById.begin(), trans->m_ruleRemoveTargetById.end(), [&, variable, this](std::pair &m) -> bool { return m.first == m_ruleId && m.second == *variable->m_fullName.get(); }) != trans->m_ruleRemoveTargetById.end()) { continue; } if (std::find_if(trans->m_ruleRemoveTargetByTag.begin(), trans->m_ruleRemoveTargetByTag.end(), [&, variable, trans, this]( std::pair &m) -> bool { return containsTag(m.first, trans) && m.second == *variable->m_fullName.get(); }) != trans->m_ruleRemoveTargetByTag.end()) { continue; } vars->push_back(variable); } for (int i = 0; i < addition.size(); i++) { Variable *variable = addition.at(i); vars->push_back(variable); } } bool RuleWithOperator::evaluate(Transaction *trans, std::shared_ptr ruleMessage) { bool globalRet = false; variables::Variables *variables = this->m_variables; bool recursiveGlobalRet; bool containsBlock = hasBlockAction(); std::string eparam; variables::Variables vars; vars.reserve(4); variables::Variables exclusion; RuleWithActions::evaluate(trans, ruleMessage); // FIXME: Make a class runTimeException to handle this cases. for (auto &i : trans->m_ruleRemoveById) { if (m_ruleId != i) { continue; } ms_dbg_a(trans, 9, "Rule id: " + std::to_string(m_ruleId) + " was skipped due to a ruleRemoveById action..."); return true; } for (auto &i : trans->m_ruleRemoveByIdRange) { if (!(i.first <= m_ruleId && i.second >= m_ruleId)) { continue; } ms_dbg_a(trans, 9, "Rule id: " + std::to_string(m_ruleId) + " was skipped due to a ruleRemoveById action..."); return true; } if (m_operator->m_string) { eparam = m_operator->m_string->evaluate(trans); if (m_operator->m_string->containsMacro()) { eparam = "\"" + eparam + "\" Was: \"" \ + m_operator->m_string->evaluate(NULL) + "\""; } else { eparam = "\"" + eparam + "\""; } ms_dbg_a(trans, 4, "(Rule: " + std::to_string(m_ruleId) \ + ") Executing operator \"" + getOperatorName() \ + "\" with param " \ + eparam \ + " against " \ + variables + "."); } else { ms_dbg_a(trans, 4, "(Rule: " + std::to_string(m_ruleId) \ + ") Executing operator \"" + getOperatorName() \ + " against " \ + variables + "."); } getFinalVars(&vars, &exclusion, trans); for (auto &var : vars) { std::vector e; if (!var) { continue; } var->evaluate(trans, this, &e); for (const VariableValue *v : e) { const std::string &value = v->getValue(); const std::string &key = v->getKeyWithCollection(); if (exclusion.contains(v) || std::find_if(trans->m_ruleRemoveTargetById.begin(), trans->m_ruleRemoveTargetById.end(), [&, v, this](std::pair &m) -> bool { return m.first == m_ruleId && m.second == v->getKeyWithCollection(); }) != trans->m_ruleRemoveTargetById.end() ) { delete v; v = NULL; continue; } if (exclusion.contains(v) || std::find_if(trans->m_ruleRemoveTargetByTag.begin(), trans->m_ruleRemoveTargetByTag.end(), [&, v, trans, this](std::pair &m) -> bool { return containsTag(m.first, trans) && m.second == v->getKeyWithCollection(); }) != trans->m_ruleRemoveTargetByTag.end() ) { delete v; v = NULL; continue; } TransformationResults values; executeTransformations(trans, value, values); for (const auto &valueTemp : values) { bool ret; std::string valueAfterTrans = std::move(*valueTemp.first); ret = executeOperatorAt(trans, key, valueAfterTrans, ruleMessage); if (ret == true) { ruleMessage->m_match = m_operator->resolveMatchMessage(trans, key, value); for (auto &i : v->getOrigin()) { ruleMessage->m_reference.append(i->toText()); } ruleMessage->m_reference.append(*valueTemp.second); updateMatchedVars(trans, key, valueAfterTrans); executeActionsIndependentOfChainedRuleResult(trans, &containsBlock, ruleMessage); performLogging(trans, ruleMessage, false); globalRet = true; } } delete v; v = NULL; } e.clear(); e.reserve(4); } if (globalRet == false) { ms_dbg_a(trans, 4, "Rule returned 0."); cleanMatchedVars(trans); goto end_clean; } ms_dbg_a(trans, 4, "Rule returned 1."); if (this->isChained() == false) { goto end_exec; } /* FIXME: this check should happens on the parser. */ if (this->m_chainedRuleChild == nullptr) { ms_dbg_a(trans, 4, "Rule is marked as chained but there " \ "isn't a subsequent rule."); goto end_clean; } ms_dbg_a(trans, 4, "Executing chained rule."); recursiveGlobalRet = m_chainedRuleChild->evaluate(trans, ruleMessage); if (recursiveGlobalRet == true) { goto end_exec; } end_clean: return false; end_exec: executeActionsAfterFullMatch(trans, containsBlock, ruleMessage); /* last rule in the chain. */ performLogging(trans, ruleMessage, true, true); return true; } std::string RuleWithOperator::getOperatorName() const { return m_operator->m_op; } } // namespace modsecurity modsecurity-v3.0.6/src/anchored_variable.cc0000664000175000017500000000631314146026157022136 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include #include #include #include #include "../headers/modsecurity/anchored_variable.h" #include "modsecurity/modsecurity.h" #include "modsecurity/transaction.h" #include "src/utils/regex.h" namespace modsecurity { AnchoredVariable::AnchoredVariable(Transaction *t, const std::string &name) : m_transaction(t), m_offset(0), m_name(""), m_value(""), m_var(NULL) { m_name.append(name); m_var = new VariableValue(&m_name); } AnchoredVariable::~AnchoredVariable() { if (m_var) { delete (m_var); m_var = NULL; } } void AnchoredVariable::unset() { m_value.clear(); } void AnchoredVariable::set(const std::string &a, size_t offset, size_t offsetLen) { std::unique_ptr origin(new VariableOrigin()); m_offset = offset; m_value.assign(a.c_str(), a.size()); origin->m_offset = offset; origin->m_length = offsetLen; m_var->addOrigin(std::move(origin)); } void AnchoredVariable::set(const std::string &a, size_t offset) { std::unique_ptr origin(new VariableOrigin()); m_offset = offset; m_value.assign(a.c_str(), a.size()); origin->m_offset = offset; origin->m_length = m_value.size(); m_var->addOrigin(std::move(origin)); } void AnchoredVariable::append(const std::string &a, size_t offset, bool spaceSeparator) { std::unique_ptr origin( new VariableOrigin()); if (spaceSeparator && !m_value.empty()) { m_value.append(" " + a); } else { m_value.append(a); } m_offset = offset; origin->m_offset = offset; origin->m_length = a.size(); m_var->addOrigin(std::move(origin)); } void AnchoredVariable::append(const std::string &a, size_t offset, bool spaceSeparator, int size) { std::unique_ptr origin( new VariableOrigin()); if (spaceSeparator && !m_value.empty()) { m_value.append(" " + a); } else { m_value.append(a); } m_offset = offset; origin->m_offset = offset; origin->m_length = size; m_var->addOrigin(std::move(origin)); } void AnchoredVariable::evaluate(std::vector *l) { if (m_name.empty()) { return; } m_var->setValue(m_value); VariableValue *m_var2 = new VariableValue(m_var); l->push_back(m_var2); } std::string * AnchoredVariable::evaluate() { return &m_value; } std::unique_ptr AnchoredVariable::resolveFirst() { if (m_value.empty()) { return nullptr; } std::unique_ptr a(new std::string()); a->append(m_value); return a; } } // namespace modsecurity modsecurity-v3.0.6/src/rules_exceptions.cc0000664000175000017500000001634014146026157022102 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "modsecurity/rules_exceptions.h" #include #include "src/utils/string.h" #include "src/variables/variable.h" namespace modsecurity { RulesExceptions::RulesExceptions() { } RulesExceptions::~RulesExceptions() { } bool RulesExceptions::loadUpdateActionById(double id, std::unique_ptr > > actions, std::string *error) { for (auto &a : *actions) { if (a->action_kind == actions::Action::ConfigurationKind) { std::cout << "General failure, action: " << a->m_name; std::cout << " has not expected to be used with UpdateActionByID."; std::cout << std::endl; } else if (a->action_kind == actions::Action::RunTimeBeforeMatchAttemptKind) { m_action_pre_update_target_by_id.emplace(std::pair>(id , std::move(a))); } else if (a->action_kind == actions::Action::RunTimeOnlyIfMatchKind) { m_action_pos_update_target_by_id.emplace(std::pair>(id , std::move(a))); } else { std::cout << "General failure, action: " << a->m_name; std::cout << " has an unknown type." << std::endl; } } return true; } bool RulesExceptions::loadRemoveRuleByMsg(const std::string &msg, std::string *error) { m_remove_rule_by_msg.push_back(msg); return true; } bool RulesExceptions::loadRemoveRuleByTag(const std::string &msg, std::string *error) { m_remove_rule_by_tag.push_back(msg); return true; } bool RulesExceptions::loadUpdateTargetByMsg(const std::string &msg, std::unique_ptr > > var, std::string *error) { for (auto &i : *var) { m_variable_update_target_by_msg.emplace( std::pair, std::unique_ptr>( std::make_shared(msg), std::move(i))); } return true; } bool RulesExceptions::loadUpdateTargetByTag(const std::string &tag, std::unique_ptr > > var, std::string *error) { for (auto &i : *var) { m_variable_update_target_by_tag.emplace( std::pair, std::unique_ptr>( std::make_shared(tag), std::move(i))); } return true; } bool RulesExceptions::loadUpdateTargetById(double id, std::unique_ptr > > var, std::string *error) { for (auto &i : *var) { m_variable_update_target_by_id.emplace( std::pair>(id, std::move(i))); } return true; } bool RulesExceptions::load(const std::string &a, std::string *error) { bool added = false; std::vector toRemove = utils::string::ssplit(a, ' '); for (std::string &r : toRemove) { std::string b = modsecurity::utils::string::parserSanitizer(r); if (b.size() == 0) { continue; } size_t dash = b.find('-'); if (dash != std::string::npos) { std::string n1s = std::string(b, 0, dash); std::string n2s = std::string(b, dash + 1, b.size() - (dash + 1)); int n1n = 0; int n2n = 0; try { n1n = std::stoi(n1s); added = true; } catch (...) { error->assign("Not a number: " + n1s); return false; } try { n2n = std::stoi(n2s); added = true; } catch (...) { error->assign("Not a number: " + n2s); return false; } if (n1s > n2s) { error->assign("Invalid range: " + b); return false; } addRange(n1n, n2n); added = true; } else { try { int num = std::stoi(b); addNumber(num); added = true; } catch (...) { error->assign("Not a number or range: " + b); return false; } } } if (added) { return true; } error->assign("Not a number or range: " + a); return false; } bool RulesExceptions::addNumber(int a) { m_numbers.push_back(a); return true; } bool RulesExceptions::addRange(int a, int b) { m_ranges.push_back(std::make_pair(a, b)); return true; } bool RulesExceptions::contains(int a) { for (int z : m_numbers) { if (a == z) { return true; } } for (auto z : m_ranges) { if (z.first <= a && z.second >= a) { return true; } } return false; } bool RulesExceptions::merge(RulesExceptions *from) { for (int a : from->m_numbers) { bool ret = addNumber(a); if (ret == false) { return ret; } } for (auto b : from->m_ranges) { bool ret = addRange(b.first, b.second); if (ret == false) { return ret; } } for (auto &p : from->m_variable_update_target_by_tag) { m_variable_update_target_by_tag.emplace( std::pair, std::shared_ptr>(p.first, p.second)); } for (auto &p : from->m_variable_update_target_by_msg) { m_variable_update_target_by_msg.emplace( std::pair, std::shared_ptr>(p.first, p.second)); } for (auto &p : from->m_variable_update_target_by_id) { m_variable_update_target_by_id.emplace( std::pair>(p.first, p.second)); } for (auto &p : from->m_action_pos_update_target_by_id) { m_action_pos_update_target_by_id.emplace( std::pair>(p.first, p.second)); } for (auto &p : from->m_action_pre_update_target_by_id) { m_action_pre_update_target_by_id.emplace( std::pair>(p.first, p.second)); } for (auto &p : from->m_remove_rule_by_msg) { m_remove_rule_by_msg.push_back(p); } for (auto &p : from->m_remove_rule_by_tag) { m_remove_rule_by_tag.push_back(p); } return true; } } // namespace modsecurity modsecurity-v3.0.6/src/transaction.cc0000664000175000017500000022237414146026157021042 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "modsecurity/transaction.h" #ifdef WITH_YAJL #include #include #endif #include #include #include #include #include #include #include #include #include #include #include "modsecurity/actions/action.h" #include "src/actions/disruptive/deny.h" #include "modsecurity/intervention.h" #include "modsecurity/modsecurity.h" #include "src/request_body_processor/multipart.h" #include "src/request_body_processor/xml.h" #ifdef WITH_YAJL #include "src/request_body_processor/json.h" #endif #include "modsecurity/audit_log.h" #include "src/unique_id.h" #include "src/utils/string.h" #include "src/utils/system.h" #include "src/utils/decode.h" #include "src/utils/random.h" #include "modsecurity/rule.h" #include "modsecurity/rule_message.h" #include "modsecurity/rules_set_properties.h" #include "src/actions/disruptive/allow.h" #include "src/variables/remote_user.h" using modsecurity::actions::Action; using modsecurity::RequestBodyProcessor::Multipart; using modsecurity::RequestBodyProcessor::XML; namespace modsecurity { /** * @name Transaction * @brief Represents the inspection on an entire request. * * An instance of the Transaction class represents an entire request, on its * different phases. * * @param ms ModSecurity core instance. * @param rules Rules instance. * * Example Usage: * @code * * using ModSecurity::ModSecurity; * using ModSecurity::Rules; * using ModSecurity::Transaction; * * ModSecurity *modsec; * ModSecurity::Rules *rules; * * modsec = new ModSecurity(); * rules = new Rules(); * rules->loadFromUri(rules_file); * * Transaction *modsecTransaction = new Transaction(modsec, rules); * modsecTransaction->processConnection("127.0.0.1", 33333, "127.0.0.1", 8080); * * if (modsecTransaction->intervention()) { * std::cout << "There is an intervention" << std::endl; * } * * ... * * delete modsecTransaction; * * @endcode * */ Transaction::Transaction(ModSecurity *ms, RulesSet *rules, void *logCbData) : m_creationTimeStamp(utils::cpu_seconds()), /* m_clientIpAddress(nullptr), */ m_httpVersion(""), /* m_serverIpAddress(""), */ m_uri(""), /* m_uri_no_query_string_decoded(""), */ m_ARGScombinedSizeDouble(0), m_clientPort(0), m_highestSeverityAction(255), m_httpCodeReturned(200), m_serverPort(0), m_ms(ms), m_requestBodyType(UnknownFormat), m_requestBodyProcessor(UnknownFormat), m_rules(rules), m_ruleRemoveById(), m_ruleRemoveByIdRange(), m_ruleRemoveByTag(), m_ruleRemoveTargetByTag(), m_ruleRemoveTargetById(), m_requestBodyAccess(RulesSet::PropertyNotSetConfigBoolean), m_auditLogModifier(), m_rulesMessages(), m_requestBody(), m_responseBody(), /* m_id(), */ m_skip_next(0), m_allowType(modsecurity::actions::disruptive::NoneAllowType), m_uri_decoded(""), m_actions(), m_it(), m_timeStamp(std::time(NULL)), m_collections(ms->m_global_collection, ms->m_ip_collection, ms->m_session_collection, ms->m_user_collection, ms->m_resource_collection), m_matched(), #ifdef WITH_LIBXML2 m_xml(new RequestBodyProcessor::XML(this)), #else m_xml(NULL), #endif #ifdef WITH_YAJL m_json(new RequestBodyProcessor::JSON(this)), #else m_json(NULL), #endif m_secRuleEngine(RulesSetProperties::PropertyNotSetRuleEngine), m_variableDuration(""), m_variableEnvs(), m_variableHighestSeverityAction(""), m_variableRemoteUser(""), m_variableTime(""), m_variableTimeDay(""), m_variableTimeEpoch(""), m_variableTimeHour(""), m_variableTimeMin(""), m_variableTimeSec(""), m_variableTimeWDay(""), m_variableTimeYear(""), m_logCbData(logCbData), TransactionAnchoredVariables(this) { m_id = std::unique_ptr( new std::string( std::to_string(m_timeStamp))); m_variableUrlEncodedError.set("0", 0); ms_dbg(4, "Initializing transaction"); intervention::clean(&m_it); } Transaction::Transaction(ModSecurity *ms, RulesSet *rules, char *id, void *logCbData) : m_creationTimeStamp(utils::cpu_seconds()), /* m_clientIpAddress(""), */ m_httpVersion(""), /* m_serverIpAddress(""), */ m_uri(""), /* m_uri_no_query_string_decoded(""), */ m_ARGScombinedSizeDouble(0), m_clientPort(0), m_highestSeverityAction(255), m_httpCodeReturned(200), m_serverPort(0), m_ms(ms), m_requestBodyType(UnknownFormat), m_requestBodyProcessor(UnknownFormat), m_rules(rules), m_ruleRemoveById(), m_ruleRemoveByIdRange(), m_ruleRemoveByTag(), m_ruleRemoveTargetByTag(), m_ruleRemoveTargetById(), m_requestBodyAccess(RulesSet::PropertyNotSetConfigBoolean), m_auditLogModifier(), m_rulesMessages(), m_requestBody(), m_responseBody(), m_id(std::unique_ptr(new std::string(id))), m_skip_next(0), m_allowType(modsecurity::actions::disruptive::NoneAllowType), m_uri_decoded(""), m_actions(), m_it(), m_timeStamp(std::time(NULL)), m_collections(ms->m_global_collection, ms->m_ip_collection, ms->m_session_collection, ms->m_user_collection, ms->m_resource_collection), m_matched(), #ifdef WITH_LIBXML2 m_xml(new RequestBodyProcessor::XML(this)), #else m_xml(NULL), #endif #ifdef WITH_YAJL m_json(new RequestBodyProcessor::JSON(this)), #else m_json(NULL), #endif m_secRuleEngine(RulesSetProperties::PropertyNotSetRuleEngine), m_variableDuration(""), m_variableEnvs(), m_variableHighestSeverityAction(""), m_variableRemoteUser(""), m_variableTime(""), m_variableTimeDay(""), m_variableTimeEpoch(""), m_variableTimeHour(""), m_variableTimeMin(""), m_variableTimeSec(""), m_variableTimeWDay(""), m_variableTimeYear(""), m_logCbData(logCbData), TransactionAnchoredVariables(this) { m_variableUrlEncodedError.set("0", 0); ms_dbg(4, "Initializing transaction"); intervention::clean(&m_it); } Transaction::~Transaction() { m_responseBody.str(std::string()); m_responseBody.clear(); m_requestBody.str(std::string()); m_requestBody.clear(); m_rulesMessages.clear(); intervention::free(&m_it); intervention::clean(&m_it); #ifdef WITH_YAJL delete m_json; #endif #ifdef WITH_LIBXML2 delete m_xml; #endif } /** * @name debug * @brief Prints a message on the debug logs. * * Debug logs are important during the rules creation phase, this method can be * used to print message on this debug log. * * @param level Debug level, current supported from 0 to 9. * @param message Message to be logged. * */ #ifndef NO_LOGS void Transaction::debug(int level, std::string message) const { if (m_rules == NULL) { return; } m_rules->debug(level, *m_id.get(), m_uri, message); } #endif /** * @name processConnection * @brief Perform the analysis on the connection. * * This method should be called at very beginning of a request process, it is * expected to be executed prior to the virtual host resolution, when the * connection arrives on the server. * * @note Remember to check for a possible intervention. * * @param transaction ModSecurity Transaction. * @param client Client's IP address in text format. * @param cPort Client's port * @param server Server's IP address in text format. * @param sPort Server's port * * @returns If the operation was successful or not. * @retval true Operation was successful. * @retval false Operation failed. * */ int Transaction::processConnection(const char *client, int cPort, const char *server, int sPort) { m_clientIpAddress = std::unique_ptr(new std::string(client)); m_serverIpAddress = std::unique_ptr(new std::string(server)); this->m_clientPort = cPort; this->m_serverPort = sPort; ms_dbg(4, "Transaction context created."); ms_dbg(4, "Starting phase CONNECTION. (SecRules 0)"); m_variableRemoteHost.set(*m_clientIpAddress.get(), m_variableOffset); m_variableUniqueID.set(*m_id.get(), m_variableOffset); m_variableRemoteAddr.set(*m_clientIpAddress.get(), m_variableOffset); m_variableServerAddr.set(*m_serverIpAddress.get(), m_variableOffset); m_variableServerPort.set(std::to_string(this->m_serverPort), m_variableOffset); m_variableRemotePort.set(std::to_string(this->m_clientPort), m_variableOffset); this->m_rules->evaluate(modsecurity::ConnectionPhase, this); return true; } bool Transaction::extractArguments(const std::string &orig, const std::string& buf, size_t offset) { char sep1 = '&'; if (m_rules->m_secArgumentSeparator.m_set) { sep1 = m_rules->m_secArgumentSeparator.m_value.at(0); } std::vector key_value_sets = utils::string::ssplit(buf, sep1); for (std::string t : key_value_sets) { char sep2 = '='; size_t key_s = 0; size_t value_s = 0; int invalid = 0; int changed = 0; std::string key; std::string value; std::pair key_value_pair = utils::string::ssplit_pair(t, sep2); key = key_value_pair.first; value = key_value_pair.second; key_s = (key.length() + 1); value_s = (value.length() + 1); unsigned char *key_c = reinterpret_cast( calloc(sizeof(char), key_s)); unsigned char *value_c = reinterpret_cast( calloc(sizeof(char), value_s)); memcpy(key_c, key.c_str(), key_s); memcpy(value_c, value.c_str(), value_s); key_s = utils::urldecode_nonstrict_inplace(key_c, key_s, &invalid, &changed); value_s = utils::urldecode_nonstrict_inplace(value_c, value_s, &invalid, &changed); if (invalid) { m_variableUrlEncodedError.set("1", m_variableOffset); } addArgument(orig, std::string(reinterpret_cast(key_c), key_s-1), std::string(reinterpret_cast(value_c), value_s-1), offset); offset = offset + t.size() + 1; free(key_c); free(value_c); } return true; } bool Transaction::addArgument(const std::string& orig, const std::string& key, const std::string& value, size_t offset) { ms_dbg(4, "Adding request argument (" + orig + "): name \"" + \ key + "\", value \"" + value + "\""); if (m_rules->m_argumentsLimit.m_set && m_variableArgs.size() >= m_rules->m_argumentsLimit.m_value) { ms_dbg(4, "Skipping request argument, over limit (" + std::to_string(m_rules->m_argumentsLimit.m_value) + ")") return false; } offset = offset + key.size() + 1; m_variableArgs.set(key, value, offset); if (orig == "GET") { m_variableArgsGet.set(key, value, offset); } else if (orig == "POST") { m_variableArgsPost.set(key, value, offset); } m_ARGScombinedSizeDouble = m_ARGScombinedSizeDouble + \ key.length() + value.length(); m_variableARGScombinedSize.set(std::to_string(m_ARGScombinedSizeDouble), offset - key.size() - 1, key.size()); m_variableARGScombinedSize.set(std::to_string(m_ARGScombinedSizeDouble), offset, value.length()); return true; } /** * @name processURI * @brief Perform the analysis on the URI and all the query string variables. * * This method should be called at very beginning of a request process, it is * expected to be executed prior to the virtual host resolution, when the * connection arrives on the server. * * @note There is no direct connection between this function and any phase of * the SecLanguage's phases. It is something that may occur between the * SecLanguage phase 1 and 2. * @note Remember to check for a possible intervention. * * @param transaction ModSecurity transaction. * @param uri Uri. * @param method Method (GET, POST, PUT). * @param http_version Http version (1.0, 1.1, 2.0). * * @returns If the operation was successful or not. * @retval true Operation was successful. * @retval false Operation failed. * */ int Transaction::processURI(const char *uri, const char *method, const char *http_version) { ms_dbg(4, "Starting phase URI. (SecRules 0 + 1/2)"); m_httpVersion = http_version; m_uri = uri; std::string uri_s(uri); // any uri-fragment that was received should only be retained in // - m_uri // - m_variableRequestURIRaw // - m_variableRequestLine size_t pos_raw_fragment = uri_s.find("#"); if (pos_raw_fragment != std::string::npos) { uri_s = uri_s.substr(0, pos_raw_fragment); } size_t pos_raw_query = uri_s.find("?"); m_uri_decoded = utils::uri_decode(uri_s); size_t var_size = pos_raw_query; m_variableRequestMethod.set(method, 0); std::string requestLine(std::string(method) + " " + std::string(uri)); m_variableRequestLine.set(requestLine \ + " HTTP/" + std::string(http_version), m_variableOffset); m_variableRequestProtocol.set("HTTP/" + std::string(http_version), m_variableOffset + requestLine.size() + 1); size_t pos_query = m_uri_decoded.find("?"); if (pos_query != std::string::npos) { m_uri_no_query_string_decoded = std::unique_ptr( new std::string(m_uri_decoded, 0, pos_query)); } else { m_uri_no_query_string_decoded = std::unique_ptr( new std::string(m_uri_decoded)); } if (pos_raw_query != std::string::npos) { std::string qry = std::string(uri_s, pos_raw_query + 1, uri_s.length() - (pos_raw_query + 1)); m_variableQueryString.set(qry, pos_raw_query + 1 + std::string(method).size() + 1); } std::string path_info; if (pos_query == std::string::npos) { path_info = std::string(m_uri_decoded, 0); } else { path_info = std::string(m_uri_decoded, 0, pos_query); } if (var_size == std::string::npos) { var_size = uri_s.size(); } m_variablePathInfo.set(path_info, m_variableOffset + strlen(method) + 1, var_size); m_variableRequestFilename.set(path_info, m_variableOffset + strlen(method) + 1, var_size); size_t offset = path_info.find_last_of("/\\"); if (offset != std::string::npos && path_info.length() > offset + 1) { std::string basename = std::string(path_info, offset + 1, path_info.length() - (offset + 1)); m_variableRequestBasename.set(basename, m_variableOffset + strlen(method) + 1 + offset + 1); } m_variableOffset = m_variableRequestLine.m_value.size(); std::string parsedURI = m_uri_decoded; // The more popular case is without domain if (!m_uri_decoded.empty() && m_uri_decoded.at(0) != '/') { bool fullDomain = true; size_t scheme = m_uri_decoded.find(":")+1; if (scheme == std::string::npos) { fullDomain = false; } // Searching with a pos of -1 is undefined we also shortcut if (scheme != std::string::npos && fullDomain == true) { // Assuming we found a colon make sure its followed size_t netloc = m_uri_decoded.find("//", scheme) + 2; if (netloc == std::string::npos || (netloc != scheme + 2)) { fullDomain = false; } if (netloc != std::string::npos && fullDomain == true) { size_t path = m_uri_decoded.find("/", netloc); if (path != std::string::npos) { parsedURI = m_uri_decoded.substr(path); } } } } m_variableRequestURI.set(parsedURI, std::string(method).size() + 1, uri_s.size()); m_variableRequestURIRaw.set(uri, std::string(method).size() + 1); if (m_variableQueryString.m_value.empty() == false) { extractArguments("GET", m_variableQueryString.m_value, m_variableQueryString.m_offset); } m_variableOffset = m_variableOffset + 1; return true; } /** * @name processRequestHeaders * @brief Perform the analysis on the request readers. * * This method perform the analysis on the request headers, notice however * that the headers should be added prior to the execution of this function. * * @note Remember to check for a possible intervention. * * @returns If the operation was successful or not. * @retval true Operation was successful. * @retval false Operation failed. * */ int Transaction::processRequestHeaders() { ms_dbg(4, "Starting phase REQUEST_HEADERS. (SecRules 1)"); if (getRuleEngineState() == RulesSet::DisabledRuleEngine) { ms_dbg(4, "Rule engine disabled, returning..."); return true; } this->m_rules->evaluate(modsecurity::RequestHeadersPhase, this); return true; } /** * @name addRequestHeader * @brief Adds a request header * * With this method it is possible to feed ModSecurity with a request header. * * @note This function expects a NULL terminated string, for both: key and * value. * * @param key header name. * @param value header value. * * @returns If the operation was successful or not. * @retval true Operation was successful. * @retval false Operation failed. * */ int Transaction::addRequestHeader(const std::string& key, const std::string& value) { m_variableRequestHeadersNames.set(key, key, m_variableOffset); m_variableOffset = m_variableOffset + key.size() + 2; m_variableRequestHeaders.set(key, value, m_variableOffset); std::string keyl = utils::string::tolower(key); if (keyl == "authorization") { std::vector type = utils::string::split(value, ' '); m_variableAuthType.set(type[0], m_variableOffset); } if (keyl == "cookie") { size_t localOffset = m_variableOffset; size_t pos; std::vector cookies = utils::string::ssplit(value, ';'); if (!cookies.empty()) { // Get rid of any optional whitespace after the cookie-string // (i.e. after the end of the final cookie-pair) std::string& final_cookie_pair = cookies.back(); while (!final_cookie_pair.empty() && isspace(final_cookie_pair.back())) { final_cookie_pair.pop_back(); } } for (const std::string &c : cookies) { // skip empty substring, eg "Cookie: ;;foo=bar" if (c.empty() == true) { localOffset++; // add length of ';' continue; } // find the first '=' pos = c.find_first_of("=", 0); std::string ckey = ""; std::string cval = ""; // if the cookie doesn't contains '=', its just a key if (pos == std::string::npos) { ckey = c; } // else split to two substrings by first = else { ckey = c.substr(0, pos); // value will contains the next '=' chars if exists // eg. foo=bar=baz -> key: foo, value: bar=baz cval = c.substr(pos+1); } // ltrim the key - following the modsec v2 way while (ckey.empty() == false && isspace(ckey.at(0))) { ckey.erase(0, 1); localOffset++; } // if the key is empty (eg: "Cookie: =bar;") skip it if (ckey.empty() == true) { localOffset = localOffset + c.length() + 1; continue; } else { // handle cookie only if the key is not empty // set cookie name m_variableRequestCookiesNames.set(ckey, ckey, localOffset); localOffset = localOffset + ckey.size() + 1; // set cookie value m_variableRequestCookies.set(ckey, cval, localOffset); localOffset = localOffset + cval.size() + 1; } } } /** * Simple check to decide the request body content. This is not the right * place, the "body processor" should be able to tell what he is capable * to deal with. * */ if (keyl == "content-type") { std::string multipart("multipart/form-data"); std::string urlencoded("application/x-www-form-urlencoded"); std::string l = utils::string::tolower(value); if (l.compare(0, multipart.length(), multipart) == 0) { this->m_requestBodyType = MultiPartRequestBody; m_variableReqbodyProcessor.set("MULTIPART", m_variableOffset); } if (l.compare(0, urlencoded.length(), urlencoded) == 0) { this->m_requestBodyType = WWWFormUrlEncoded; m_variableReqbodyProcessor.set("URLENCODED", m_variableOffset); } } if (keyl == "host") { std::vector host = utils::string::split(value, ':'); m_variableServerName.set(host[0], m_variableOffset); } m_variableOffset = m_variableOffset + value.size() + 1; return 1; } /** * @name addRequestHeader * @brief Adds a request header * * With this method it is possible to feed ModSecurity with a request header. * * @note This function expects a NULL terminated string, for both: key and * value. * * @param key header name. * @param value header value. * * @returns If the operation was successful or not. * @retval true Operation was successful. * @retval false Operation failed. * */ int Transaction::addRequestHeader(const unsigned char *key, const unsigned char *value) { return this->addRequestHeader(key, strlen(reinterpret_cast(key)), value, strlen(reinterpret_cast(value))); } /** * @name addRequestHeader * @brief Adds a request header * * Do not expect a NULL terminated string, instead it expect the string and the * string size, for the value and key. * * @param transaction ModSecurity transaction. * @param key header name. * @param key_n header name size. * @param value header value. * @param value_n header value size. * * @returns If the operation was successful or not. * @retval 1 Operation was successful. * @retval 0 Operation failed. * */ int Transaction::addRequestHeader(const unsigned char *key, size_t key_n, const unsigned char *value, size_t value_n) { std::string keys; std::string values; keys.assign(reinterpret_cast(key), key_n); values.assign(reinterpret_cast(value), value_n); return this->addRequestHeader(keys, values); } /** * @name processRequestBody * @brief Perform the request body (if any) * * This method perform the analysis on the request body. It is optional to * call that function. If this API consumer already know that there isn't a * body for inspect it is recommended to skip this step. * * @note It is necessary to "append" the request body prior to the execution * of this function. * @note Remember to check for a possible intervention. * * @returns If the operation was successful or not. * @retval true Operation was successful. * @retval false Operation failed. * */ int Transaction::processRequestBody() { ms_dbg(4, "Starting phase REQUEST_BODY. (SecRules 2)"); if (getRuleEngineState() == RulesSetProperties::DisabledRuleEngine) { ms_dbg(4, "Rule engine disabled, returning..."); return true; } if (m_variableInboundDataError.m_value.empty() == true) { m_variableInboundDataError.set("0", 0); } /* * Process the request body even if there is nothing to be done. * * if (m_requestBody.tellp() <= 0) { * return true; * } * */ std::unique_ptr a = m_variableRequestHeaders.resolveFirst( "Content-Type"); #ifdef WITH_LIBXML2 if (m_requestBodyProcessor == XMLRequestBody) { std::string error; if (m_xml->init() == true) { m_xml->processChunk(m_requestBody.str().c_str(), m_requestBody.str().size(), &error); m_xml->complete(&error); } if (error.empty() == false) { m_variableReqbodyError.set("1", m_variableOffset); m_variableReqbodyErrorMsg.set("XML parsing error: " + error, m_variableOffset); m_variableReqbodyProcessorErrorMsg.set("XML parsing error: " \ + error, m_variableOffset); m_variableReqbodyProcessorError.set("1", m_variableOffset); } else { m_variableReqbodyError.set("0", m_variableOffset); m_variableReqbodyProcessorError.set("0", m_variableOffset); } #endif #if WITH_YAJL #ifdef WITH_LIBXML2 } else if (m_requestBodyProcessor == JSONRequestBody) { #else if (m_requestBodyProcessor == JSONRequestBody) { #endif std::string error; if (m_rules->m_requestBodyJsonDepthLimit.m_set) { m_json->setMaxDepth(m_rules->m_requestBodyJsonDepthLimit.m_value); } if (m_json->init() == true) { m_json->processChunk(m_requestBody.str().c_str(), m_requestBody.str().size(), &error); m_json->complete(&error); } if (error.empty() == false && m_requestBody.str().size() > 0) { m_variableReqbodyError.set("1", m_variableOffset); m_variableReqbodyProcessorError.set("1", m_variableOffset); m_variableReqbodyErrorMsg.set("JSON parsing error: " + error, m_variableOffset); m_variableReqbodyProcessorErrorMsg.set("JSON parsing error: " \ + error, m_variableOffset); } else { m_variableReqbodyError.set("0", m_variableOffset); m_variableReqbodyProcessorError.set("0", m_variableOffset); } #endif #if defined(WITH_LIBXML2) or defined(WITH_YAJL) } else if (m_requestBodyType == MultiPartRequestBody) { #else if (m_requestBodyType == MultiPartRequestBody) { #endif std::string error; if (a != NULL) { Multipart m(*a, this); if (m.init(&error) == true) { m.process(m_requestBody.str(), &error, m_variableOffset); } m.multipart_complete(&error); } if (error.empty() == false) { m_variableReqbodyError.set("1", m_variableOffset); m_variableReqbodyProcessorError.set("1", m_variableOffset); m_variableReqbodyErrorMsg.set("Multipart parsing error: " + error, m_variableOffset); m_variableReqbodyProcessorErrorMsg.set("Multipart parsing " \ "error: " + error, m_variableOffset); } else { m_variableReqbodyError.set("0", m_variableOffset); m_variableReqbodyProcessorError.set("0", m_variableOffset); } } else if (m_requestBodyType == WWWFormUrlEncoded) { m_variableOffset++; extractArguments("POST", m_requestBody.str(), m_variableOffset); } else if (m_requestBodyType != UnknownFormat) { /** * FIXME: double check to see if that is a valid scenario... * */ std::string error; if (a != NULL && a->empty() == false) { error.assign(*a); } m_variableReqbodyError.set("1", m_variableOffset); m_variableReqbodyProcessorError.set("1", m_variableOffset); m_variableReqbodyErrorMsg.set("Unknown request body processor: " \ + error, m_variableOffset); m_variableReqbodyProcessorErrorMsg.set("Unknown request body " \ "processor: " + error, m_variableOffset); } else { m_variableReqbodyError.set("0", m_variableOffset); m_variableReqbodyProcessorError.set("0", m_variableOffset); } if (m_rules->m_secRequestBodyAccess == RulesSetProperties::FalseConfigBoolean) { if (m_requestBodyAccess != RulesSetProperties::TrueConfigBoolean) { ms_dbg(4, "Request body processing is disabled"); return true; } else { ms_dbg(4, "Request body processing is disabled, but " \ "enabled to this transaction due to ctl:requestBodyAccess " \ "action"); } } else { if (m_requestBodyAccess == RulesSetProperties::FalseConfigBoolean) { ms_dbg(4, "Request body processing is enabled, but " \ "disabled to this transaction due to ctl:requestBodyAccess " \ "action"); return true; } } /** * FIXME: This variable should be calculated on demand, it is * computationally intensive. */ std::string fullRequest; std::vector l; m_variableRequestHeaders.resolve(&l); for (auto &h : l) { fullRequest = fullRequest + h->getKey() + ": " + h->getValue() + "\n"; delete h; } fullRequest = fullRequest + "\n\n"; fullRequest = fullRequest + m_requestBody.str(); m_variableFullRequest.set(fullRequest, m_variableOffset); m_variableFullRequestLength.set(std::to_string(fullRequest.size()), m_variableOffset); if (m_requestBody.tellp() > 0) { m_variableRequestBody.set(m_requestBody.str(), m_variableOffset); m_variableRequestBodyLength.set(std::to_string( m_requestBody.str().size()), m_variableOffset, m_requestBody.str().size()); } this->m_rules->evaluate(modsecurity::RequestBodyPhase, this); return true; } /** * @name appendRequestBody * @brief Adds request body to be inspected. * * With this method it is possible to feed ModSecurity with data for * inspection regarding the request body. There are two possibilities here: * * 1 - Adds the buffer in a row; * 2 - Adds it in chunks; * * A third option should be developed which is share your application buffer. * In any case, remember that the utilization of this function may reduce your * server throughput, as this buffer creations is computationally expensive. * * @note While feeding ModSecurity remember to keep checking if there is an * intervention, Sec Language has the capability to set the maximum * inspection size which may be reached, and the decision on what to do * in this case is upon the rules. * * @returns If the operation was successful or not. * @retval true Operation was successful. * @retval false Operation failed. * */ int Transaction::requestBodyFromFile(const char *path) { std::ifstream request_body(path); std::string str; if (request_body.is_open() == false) { ms_dbg(3, "Failed to open request body at: " + std::string(path)); return false; } request_body.seekg(0, std::ios::end); try { str.reserve(request_body.tellg()); } catch (...) { ms_dbg(3, "Failed to allocate memory to load request body."); return false; } request_body.seekg(0, std::ios::beg); str.assign((std::istreambuf_iterator(request_body)), std::istreambuf_iterator()); const char *buf = str.c_str(); int len = request_body.tellg(); ms_dbg(9, "Adding request body: " + std::to_string(len) + " bytes. " \ "Limit set to: " + std::to_string(this->m_rules->m_requestBodyLimit.m_value)); return appendRequestBody(reinterpret_cast(buf), len); } int Transaction::appendRequestBody(const unsigned char *buf, size_t len) { int current_size = this->m_requestBody.tellp(); ms_dbg(9, "Appending request body: " + std::to_string(len) + " bytes. " \ "Limit set to: " + std::to_string(this->m_rules->m_requestBodyLimit.m_value)); if (this->m_rules->m_requestBodyLimit.m_value > 0 && this->m_rules->m_requestBodyLimit.m_value < len + current_size) { m_variableInboundDataError.set("1", m_variableOffset); ms_dbg(5, "Request body is bigger than the maximum expected."); if (this->m_rules->m_requestBodyLimitAction == RulesSet::BodyLimitAction::ProcessPartialBodyLimitAction) { size_t spaceLeft = this->m_rules->m_requestBodyLimit.m_value - current_size; this->m_requestBody.write(reinterpret_cast(buf), spaceLeft); ms_dbg(5, "Request body limit is marked to process partial"); return false; } else { if (this->m_rules->m_requestBodyLimitAction == RulesSet::BodyLimitAction::RejectBodyLimitAction) { ms_dbg(5, "Request body limit is marked to reject the " \ "request"); if (getRuleEngineState() == RulesSet::EnabledRuleEngine) { intervention::free(&m_it); m_it.log = strdup("Request body limit is marked to " \ "reject the request"); m_it.status = 403; m_it.disruptive = true; } else { ms_dbg(5, "Not rejecting the request as the engine is " \ "not Enabled"); } } return true; } } this->m_requestBody.write(reinterpret_cast(buf), len); return true; } /** * @name processResponseHeaders * @brief Perform the analysis on the response readers. * * This method perform the analysis on the response headers, notice however * that the headers should be added prior to the execution of this function. * * @note Remember to check for a possible intervention. * * @param code The returned http code. * @param proto Protocol used on the response. * * @returns If the operation was successful or not. * @retval true Operation was successful. * @retval false Operation failed. * */ int Transaction::processResponseHeaders(int code, const std::string& proto) { ms_dbg(4, "Starting phase RESPONSE_HEADERS. (SecRules 3)"); this->m_httpCodeReturned = code; m_variableResponseStatus.set(std::to_string(code), m_variableOffset); m_variableResponseProtocol.set(proto, m_variableOffset); if (getRuleEngineState() == RulesSet::DisabledRuleEngine) { ms_dbg(4, "Rule engine disabled, returning..."); return true; } this->m_rules->evaluate(modsecurity::ResponseHeadersPhase, this); return true; } /** * @name addResponseHeader * @brief Adds a response header * * With this method it is possible to feed ModSecurity with a response * header. * * @note This method expects a NULL terminated string, for both: key and * value. * * @param key header name. * @param value header value. * * @returns If the operation was successful or not. * @retval true Operation was successful. * @retval false Operation failed. * */ int Transaction::addResponseHeader(const std::string& key, const std::string& value) { m_variableResponseHeadersNames.set(key, key, m_variableOffset); m_variableResponseHeaders.set(key, value, m_variableOffset); if (utils::string::tolower(key) == "content-type") { // Removes the charset=... // Content-Type: text/html; charset=UTF-8 std::vector val = utils::string::split(value, ';'); if (val.size() > 0) { m_variableResponseContentType.set(val[0], 0); } } return 1; } /** * @name addResponseHeader * @brief Adds a response header * * With this method it is possible to feed ModSecurity with a response * header. * * @note This method expects a NULL terminated string, for both: key and * value. * * @param key header name. * @param value header value. * * @returns If the operation was successful or not. * @retval true Operation was successful. * @retval false Operation failed. * */ int Transaction::addResponseHeader(const unsigned char *key, const unsigned char *value) { return this->addResponseHeader(key, strlen(reinterpret_cast(key)), value, strlen(reinterpret_cast(value))); } /** * @name msc_add_n_response_header * @brief Adds a response header * * Do not expect a NULL terminated string, instead it expect the string and the * string size, for the value and key. * * @param key header name. * @param key_n header name size. * @param value header value. * @param value_n header value size. * * @returns If the operation was successful or not. * @retval true Operation was successful. * @retval false Operation failed. * */ int Transaction::addResponseHeader(const unsigned char *key, size_t key_n, const unsigned char *value, size_t value_n) { std::string keys; std::string values; keys.assign(reinterpret_cast(key), key_n); values.assign(reinterpret_cast(value), value_n); return this->addResponseHeader(keys, values); } /** * @name processResponseBody * @brief Perform the request body (if any) * * This method perform the analysis on the request body. It is optional to * call that method. If this API consumer already know that there isn't a * body for inspect it is recommended to skip this step. * * @note It is necessary to "append" the request body prior to the execution * of this method. * @note Remember to check for a possible intervention. * * @returns If the operation was successful or not. * @retval true Operation was successful. * @retval false Operation failed. * */ int Transaction::processResponseBody() { ms_dbg(4, "Starting phase RESPONSE_BODY. (SecRules 4)"); if (getRuleEngineState() == RulesSet::DisabledRuleEngine) { ms_dbg(4, "Rule engine disabled, returning..."); return true; } if (m_rules->m_secResponseBodyAccess != RulesSetProperties::TrueConfigBoolean) { ms_dbg(4, "Response body is disabled, returning... " + std::to_string(m_rules->m_secResponseBodyAccess)); return true; } std::set &bi = \ m_rules->m_responseBodyTypeToBeInspected.m_value; auto t = bi.find(m_variableResponseContentType.m_value); if (t == bi.end() && m_rules->m_responseBodyTypeToBeInspected.m_set == true) { ms_dbg(5, "Response Content-Type is " \ + m_variableResponseContentType.m_value \ + ". It is not marked to be inspected."); std::string validContetTypes(""); for (std::set::iterator i = bi.begin(); i != bi.end(); ++i) { validContetTypes.append(*i + " "); } ms_dbg(8, "Content-Type(s) marked to be inspected: " \ + validContetTypes); return true; } if (m_variableOutboundDataError.m_value.empty() == true) { m_variableOutboundDataError.set("0", m_variableOffset); } m_variableResponseBody.set(m_responseBody.str(), m_variableOffset); m_variableResponseContentLength.set(std::to_string( m_responseBody.str().size()), m_variableOffset); m_rules->evaluate(modsecurity::ResponseBodyPhase, this); return true; } /** * @name appendResponseBody * @brief Adds reponse body to be inspected. * * With this method it is possible to feed ModSecurity with data for * inspection regarding the response body. ModSecurity can also update the * contents of the response body, this is not quite ready yet on this version * of the API. * * @note If the content is updated, the client cannot receive the content * length header filled, at least not with the old values. Otherwise * unexpected behavior may happens. * * @returns If the operation was successful or not. * @retval true Operation was successful. * @retval false Operation failed, process partial demanded. * */ int Transaction::appendResponseBody(const unsigned char *buf, size_t len) { int current_size = this->m_responseBody.tellp(); std::set &bi = \ this->m_rules->m_responseBodyTypeToBeInspected.m_value; auto t = bi.find(m_variableResponseContentType.m_value); if (t == bi.end() && bi.empty() == false) { ms_dbg(4, "Not appending response body. " \ "Response Content-Type is " \ + m_variableResponseContentType.m_value \ + ". It is not marked to be inspected."); return true; } ms_dbg(9, "Appending response body: " + std::to_string(len + current_size) + " bytes. Limit set to: " + std::to_string(this->m_rules->m_responseBodyLimit.m_value)); if (this->m_rules->m_responseBodyLimit.m_value > 0 && this->m_rules->m_responseBodyLimit.m_value < len + current_size) { m_variableOutboundDataError.set("1", m_variableOffset); ms_dbg(5, "Response body is bigger than the maximum expected."); if (this->m_rules->m_responseBodyLimitAction == RulesSet::BodyLimitAction::ProcessPartialBodyLimitAction) { size_t spaceLeft = this->m_rules->m_responseBodyLimit.m_value \ - current_size; this->m_responseBody.write(reinterpret_cast(buf), spaceLeft); ms_dbg(5, "Response body limit is marked to process partial"); return false; } else { if (this->m_rules->m_responseBodyLimitAction == RulesSet::BodyLimitAction::RejectBodyLimitAction) { ms_dbg(5, "Response body limit is marked to reject the " \ "request"); if (getRuleEngineState() == RulesSet::EnabledRuleEngine) { intervention::free(&m_it); m_it.log = strdup("Response body limit is marked to reject " \ "the request"); m_it.status = 403; m_it.disruptive = true; } else { ms_dbg(5, "Not rejecting the request as the engine is " \ "not Enabled"); } } return true; } } this->m_responseBody.write(reinterpret_cast(buf), len); return true; } /** * @name getResponseBody * @brief Retrieve a buffer with the updated response body. * * This method is needed to be called whenever ModSecurity update the * contents of the response body, otherwise there is no need to call this * method. * * WARN: This is a skeleton that it is not in use yet. * * @return It returns a buffer (const char *) * */ const char *Transaction::getResponseBody() const { return strdup(this->m_responseBody.str().c_str()); } /** * @name getResponseBodyLength * @brief Retrieve the length of the response body. * * This method returns the size of the response body buffer. * * * @return Size of the update response body. * */ size_t Transaction::getResponseBodyLength() { size_t size = 0; m_responseBody.seekp(0, std::ios::end); size = m_responseBody.tellp(); return size; } /** * @name getRequestBodyLength * @brief Retrieve the length of the request body. * * This method returns the size of the request body buffer, notice * however, that most likely there isn't an update. Thus, this method will * return 0. * * * @return Size of the request body. * */ size_t Transaction::getRequestBodyLength() { size_t size = 0; m_requestBody.seekp(0, std::ios::end); size = m_requestBody.tellp(); return size; } /** * @name processLogging * @brief Logging all information relative to this transaction. * * At this point there is not need to hold the connection, the response can be * delivered prior to the execution of this method. * * @returns If the operation was successful or not. * @retval true Operation was successful. * @retval false Operation failed. * */ int Transaction::processLogging() { ms_dbg(4, "Starting phase LOGGING. (SecRules 5)"); if (getRuleEngineState() == RulesSet::DisabledRuleEngine) { ms_dbg(4, "Rule engine disabled, returning..."); return true; } this->m_rules->evaluate(modsecurity::LoggingPhase, this); /* If relevant, save this transaction information at the audit_logs */ if (m_rules != NULL && m_rules->m_auditLog != NULL) { int parts = this->m_rules->m_auditLog->getParts(); ms_dbg(8, "Checking if this request is suitable to be " \ "saved as an audit log."); if (!this->m_auditLogModifier.empty()) { ms_dbg(4, "There was an audit log modifier for this transaction."); std::list>::iterator it; ms_dbg(7, "AuditLog parts before modification(s): " + std::to_string(parts) + "."); for (it = m_auditLogModifier.begin(); it != m_auditLogModifier.end(); ++it) { std::pair p = *it; if (p.first == 0) { // Add parts = this->m_rules->m_auditLog->addParts(parts, p.second); } else { // Remove parts = this->m_rules->m_auditLog->removeParts(parts, p.second); } } } ms_dbg(8, "Checking if this request is relevant to be " \ "part of the audit logs."); bool saved = this->m_rules->m_auditLog->saveIfRelevant(this, parts); if (saved) { ms_dbg(8, "Request was relevant to be saved. Parts: " + std::to_string(parts)); } } return true; } /** * @name intervention * @brief Check if ModSecurity has anything to ask to the server. * * Intervention can generate a log event and/or perform a disruptive action. * * @param Pointer ModSecurityIntervention structure * @retval true A intervention should be made. * @retval false Nothing to be done. * */ bool Transaction::intervention(ModSecurityIntervention *it) { if (m_it.disruptive) { if (m_it.url) { it->url = strdup(m_it.url); } it->disruptive = m_it.disruptive; it->status = m_it.status; if (m_it.log != NULL) { std::string log(""); log.append(m_it.log); utils::string::replaceAll(&log, std::string("%d"), std::to_string(it->status)); it->log = strdup(log.c_str()); } intervention::reset(&m_it); } return it->disruptive; } std::string Transaction::toOldAuditLogFormatIndex(const std::string &filename, double size, const std::string &md5) { std::stringstream ss; struct tm timeinfo; char tstr[300]; memset(tstr, '\0', 300); localtime_r(&this->m_timeStamp, &timeinfo); strftime(tstr, 299, "[%d/%b/%Y:%H:%M:%S %z]", &timeinfo); ss << utils::string::dash_if_empty( m_variableRequestHeaders.resolveFirst("Host").get()) << " "; ss << utils::string::dash_if_empty(this->m_clientIpAddress->c_str()) << " "; /** TODO: Check variable */ variables::RemoteUser *r = new variables::RemoteUser("REMOTE_USER"); std::vector l; r->evaluate(this, NULL, &l); delete r; ss << utils::string::dash_if_empty( m_variableRemoteUser.c_str()); ss << " "; /** TODO: Check variable */ //ss << utils::string::dash_if_empty( // this->m_collections.resolveFirst("LOCAL_USER").get()); //ss << " "; ss << tstr << " "; ss << "\""; ss << utils::string::dash_if_empty(m_variableRequestMethod.evaluate()); ss << " "; ss << this->m_uri.c_str() << " "; ss << "HTTP/" << m_httpVersion.c_str(); ss << "\" "; ss << this->m_httpCodeReturned << " "; ss << this->m_responseBody.tellp() << " "; /** TODO: Check variable */ ss << utils::string::dash_if_empty( m_variableRequestHeaders.resolveFirst("REFERER").get()) << " "; ss << "\""; ss << utils::string::dash_if_empty( m_variableRequestHeaders.resolveFirst("User-Agent").get()); ss << "\" "; ss << *m_id.get() << " "; /** TODO: Check variable */ ss << utils::string::dash_if_empty( m_variableRequestHeaders.resolveFirst("REFERER").get()) << " "; ss << filename << " "; ss << "0" << " "; ss << std::to_string(size) << " "; ss << "md5:" << md5 << std::endl; return ss.str(); } std::string Transaction::toOldAuditLogFormat(int parts, const std::string &trailer) { std::stringstream audit_log; struct tm timeinfo; char tstr[300]; memset(tstr, '\0', 300); localtime_r(&this->m_timeStamp, &timeinfo); audit_log << "--" << trailer << "-" << "A--" << std::endl; strftime(tstr, 299, "[%d/%b/%Y:%H:%M:%S %z]", &timeinfo); audit_log << tstr; audit_log << " " << m_id->c_str(); audit_log << " " << this->m_clientIpAddress->c_str(); audit_log << " " << this->m_clientPort; audit_log << " " << m_serverIpAddress->c_str(); audit_log << " " << this->m_serverPort; audit_log << std::endl; if (parts & audit_log::AuditLog::BAuditLogPart) { std::vector l; audit_log << "--" << trailer << "-" << "B--" << std::endl; audit_log << utils::string::dash_if_empty( m_variableRequestMethod.evaluate()); audit_log << " " << this->m_uri.c_str() << " " << "HTTP/"; audit_log << this->m_httpVersion.c_str() << std::endl; m_variableRequestHeaders.resolve(&l); for (auto &h : l) { size_t pos = strlen("REQUEST_HEADERS:"); audit_log << h->getKeyWithCollection().c_str() + pos << ": "; audit_log << h->getValue().c_str() << std::endl; delete h; } audit_log << std::endl; } if (parts & audit_log::AuditLog::CAuditLogPart && m_requestBody.tellp() > 0) { std::string body = m_requestBody.str(); audit_log << "--" << trailer << "-" << "C--" << std::endl; if (body.size() > 0) { audit_log << body << std::endl; } audit_log << std::endl; } if (parts & audit_log::AuditLog::DAuditLogPart) { audit_log << "--" << trailer << "-" << "D--" << std::endl; audit_log << std::endl; /** TODO: write audit_log D part. */ } if (parts & audit_log::AuditLog::EAuditLogPart && m_responseBody.tellp() > 0) { std::string body = utils::string::toHexIfNeeded(m_responseBody.str()); audit_log << "--" << trailer << "-" << "E--" << std::endl; if (body.size() > 0) { audit_log << body << std::endl; } audit_log << std::endl; } if (parts & audit_log::AuditLog::FAuditLogPart) { std::vector l; audit_log << "--" << trailer << "-" << "F--" << std::endl; audit_log << "HTTP/" << m_httpVersion.c_str() << " "; audit_log << this->m_httpCodeReturned << std::endl; m_variableResponseHeaders.resolve(&l); for (auto &h : l) { audit_log << h->getKey().c_str() << ": "; audit_log << h->getValue().c_str() << std::endl; delete h; } } audit_log << std::endl; if (parts & audit_log::AuditLog::GAuditLogPart) { audit_log << "--" << trailer << "-" << "G--" << std::endl; audit_log << std::endl; /** TODO: write audit_log G part. */ } if (parts & audit_log::AuditLog::HAuditLogPart) { audit_log << "--" << trailer << "-" << "H--" << std::endl; for (auto a : m_rulesMessages) { audit_log << a.log(0, m_httpCodeReturned) << std::endl; } audit_log << std::endl; /** TODO: write audit_log H part. */ } if (parts & audit_log::AuditLog::IAuditLogPart) { audit_log << "--" << trailer << "-" << "I--" << std::endl; audit_log << std::endl; /** TODO: write audit_log I part. */ } if (parts & audit_log::AuditLog::JAuditLogPart) { audit_log << "--" << trailer << "-" << "J--" << std::endl; audit_log << std::endl; /** TODO: write audit_log J part. */ } if (parts & audit_log::AuditLog::KAuditLogPart) { audit_log << "--" << trailer << "-" << "K--" << std::endl; audit_log << std::endl; /** TODO: write audit_log K part. */ } audit_log << "--" << trailer << "-" << "Z--" << std::endl << std::endl; return audit_log.str(); } std::string Transaction::toJSON(int parts) { #ifdef WITH_YAJL const unsigned char *buf; size_t len; yajl_gen g; std::string log; std::string ts = utils::string::ascTime(&m_timeStamp).c_str(); std::string uniqueId = UniqueId::uniqueId(); g = yajl_gen_alloc(NULL); if (g == NULL) { return ""; } yajl_gen_config(g, yajl_gen_beautify, 0); /* main */ yajl_gen_map_open(g); /* trasaction */ yajl_gen_string(g, reinterpret_cast("transaction"), strlen("transaction")); yajl_gen_map_open(g); /* Part: A (header mandatory) */ LOGFY_ADD("client_ip", this->m_clientIpAddress->c_str()); LOGFY_ADD("time_stamp", ts.c_str()); LOGFY_ADD("server_id", uniqueId.c_str()); LOGFY_ADD_NUM("client_port", m_clientPort); LOGFY_ADD("host_ip", m_serverIpAddress->c_str()); LOGFY_ADD_NUM("host_port", m_serverPort); LOGFY_ADD("unique_id", m_id->c_str()); /* request */ yajl_gen_string(g, reinterpret_cast("request"), strlen("request")); yajl_gen_map_open(g); LOGFY_ADD("method", utils::string::dash_if_empty( m_variableRequestMethod.evaluate()).c_str()); LOGFY_ADD_INT("http_version", m_httpVersion.c_str()); LOGFY_ADD("uri", this->m_uri.c_str()); if (parts & audit_log::AuditLog::CAuditLogPart) { // FIXME: check for the binary content size. LOGFY_ADD("body", this->m_requestBody.str().c_str()); } /* request headers */ if (parts & audit_log::AuditLog::BAuditLogPart) { std::vector l; yajl_gen_string(g, reinterpret_cast("headers"), strlen("headers")); yajl_gen_map_open(g); m_variableRequestHeaders.resolve(&l); for (auto &h : l) { LOGFY_ADD(h->getKey().c_str(), h->getValue().c_str()); delete h; } /* end: request headers */ yajl_gen_map_close(g); } /* end: request */ yajl_gen_map_close(g); /* response */ yajl_gen_string(g, reinterpret_cast("response"), strlen("response")); yajl_gen_map_open(g); if (parts & audit_log::AuditLog::EAuditLogPart) { LOGFY_ADD("body", this->m_responseBody.str().c_str()); } LOGFY_ADD_NUM("http_code", m_httpCodeReturned); /* response headers */ if (parts & audit_log::AuditLog::FAuditLogPart) { std::vector l; yajl_gen_string(g, reinterpret_cast("headers"), strlen("headers")); yajl_gen_map_open(g); m_variableResponseHeaders.resolve(&l); for (auto &h : l) { LOGFY_ADD(h->getKey().c_str(), h->getValue().c_str()); delete h; } /* end: response headers */ yajl_gen_map_close(g); } /* end: response */ yajl_gen_map_close(g); /* producer */ if (parts & audit_log::AuditLog::HAuditLogPart) { yajl_gen_string(g, reinterpret_cast("producer"), strlen("producer")); yajl_gen_map_open(g); /* producer > libmodsecurity */ LOGFY_ADD("modsecurity", m_ms->whoAmI().c_str()); /* producer > connector */ LOGFY_ADD("connector", m_ms->getConnectorInformation().c_str()); /* producer > engine state */ LOGFY_ADD("secrules_engine", RulesSet::ruleEngineStateString( (RulesSetProperties::RuleEngine) getRuleEngineState())); /* producer > components */ yajl_gen_string(g, reinterpret_cast("components"), strlen("components")); yajl_gen_array_open(g); for (auto a : m_rules->m_components) { yajl_gen_string(g, reinterpret_cast (a.c_str()), a.length()); } yajl_gen_array_close(g); /* end: producer */ yajl_gen_map_close(g); /* messages */ yajl_gen_string(g, reinterpret_cast("messages"), strlen("messages")); yajl_gen_array_open(g); for (auto a : m_rulesMessages) { yajl_gen_map_open(g); LOGFY_ADD("message", a.m_message.c_str()); yajl_gen_string(g, reinterpret_cast("details"), strlen("details")); yajl_gen_map_open(g); LOGFY_ADD("match", a.m_match.c_str()); LOGFY_ADD("reference", a.m_reference.c_str()); LOGFY_ADD("ruleId", std::to_string(a.m_ruleId).c_str()); LOGFY_ADD("file", a.m_ruleFile->c_str()); LOGFY_ADD("lineNumber", std::to_string(a.m_ruleLine).c_str()); LOGFY_ADD("data", a.m_data.c_str()); LOGFY_ADD("severity", std::to_string(a.m_severity).c_str()); LOGFY_ADD("ver", a.m_ver.c_str()); LOGFY_ADD("rev", a.m_rev.c_str()); yajl_gen_string(g, reinterpret_cast("tags"), strlen("tags")); yajl_gen_array_open(g); for (auto b : a.m_tags) { yajl_gen_string(g, reinterpret_cast(b.c_str()), strlen(b.c_str())); } yajl_gen_array_close(g); LOGFY_ADD("maturity", std::to_string(a.m_maturity).c_str()); LOGFY_ADD("accuracy", std::to_string(a.m_accuracy).c_str()); yajl_gen_map_close(g); yajl_gen_map_close(g); } yajl_gen_array_close(g); /* end: messages */ } /* end: transaction */ yajl_gen_map_close(g); /* end: main */ yajl_gen_map_close(g); yajl_gen_get_buf(g, &buf, &len); log.assign(reinterpret_cast(buf), len); log.append("\n"); yajl_gen_free(g); return log; #else return std::string("{\"error\":\"ModSecurity was " \ "not compiled with JSON support.\"}"); #endif } void Transaction::serverLog(std::shared_ptr rm) { m_ms->serverLog(m_logCbData, rm); } int Transaction::getRuleEngineState() const { if (m_secRuleEngine == RulesSetProperties::PropertyNotSetRuleEngine) { return m_rules->m_secRuleEngine; } return m_secRuleEngine; } /** * @name updateStatusCode * @brief Updates response status code. * * Called after processResponseHeaders to inform a new response code. * Not mandatory. * * * @param status The returned http code. * * @returns If the operation was successful or not. * @retval true Operation was successful. * @retval false Operation failed. * */ int Transaction::updateStatusCode(int code) { this->m_httpCodeReturned = code; m_variableResponseStatus.set(std::to_string(code), m_variableOffset); return true; } /** * @name msc_new_transaction * @brief Create a new transaction for a given configuration and ModSecurity core. * * The transaction is the unit that will be used the inspect every request. It holds * all the information for a given request. * * @note Remember to cleanup the transaction when the transaction is complete. * * @param ms ModSecurity core pointer. * @param rules Rules pointer. * * @return Pointer to Transaction structure * @retval >0 Transaction structure was initialized correctly * @retval NULL Transaction cannot be initialized, either by problems with the rules, * problems with the ModSecurity core or missing memory to * allocate the resources needed by the transaction. * */ extern "C" Transaction *msc_new_transaction(ModSecurity *ms, RulesSet *rules, void *logCbData) { return new Transaction(ms, rules, logCbData); } extern "C" Transaction *msc_new_transaction_with_id(ModSecurity *ms, RulesSet *rules, char *id, void *logCbData) { return new Transaction(ms, rules, id, logCbData); } /** * @name msc_process_connection * @brief Perform the analysis on the connection. * * This function should be called at very beginning of a request process, it is * expected to be executed prior to the virtual host resolution, when the * connection arrives on the server. * * @note Remember to check for a possible intervention. * * @param transaction ModSecurity transaction. * @param client Client's IP address in text format. * @param cPort Client's port * @param server Server's IP address in text format. * @param sPort Server's port * * @returns If the operation was successful or not. * @retval 1 Operation was successful. * @retval 0 Operation failed. * */ extern "C" int msc_process_connection(Transaction *transaction, const char *client, int cPort, const char *server, int sPort) { return transaction->processConnection(client, cPort, server, sPort); } /** * @name msc_process_uri * @brief Perform the analysis on the URI and all the query string variables. * * This function should be called at very beginning of a request process, it is * expected to be executed prior to the virtual host resolution, when the * connection arrives on the server. * * @note There is no direct connection between this function and any phase of * the SecLanguage's phases. It is something that may occur between the * SecLanguage phase 1 and 2. * @note Remember to check for a possible intervention. * * @param transaction ModSecurity transaction. * @param uri Uri. * @param protocol Protocol (GET, POST, PUT). * @param http_version Http version (1.0, 1.2, 2.0). * * @returns If the operation was successful or not. * @retval 1 Operation was successful. * @retval 0 Operation failed. * */ extern "C" int msc_process_uri(Transaction *transaction, const char *uri, const char *protocol, const char *http_version) { return transaction->processURI(uri, protocol, http_version); } /** * @name msc_process_request_headers * @brief Perform the analysis on the request readers. * * This function perform the analysis on the request headers, notice however * that the headers should be added prior to the execution of this function. * * @note Remember to check for a possible intervention. * * @param transaction ModSecurity transaction. * * @returns If the operation was successful or not. * @retval 1 Operation was successful. * @retval 0 Operation failed. * */ extern "C" int msc_process_request_headers(Transaction *transaction) { return transaction->processRequestHeaders(); } /** * @name msc_process_request_body * @brief Perform the analysis on the request body (if any) * * This function perform the analysis on the request body. It is optional to * call that function. If this API consumer already know that there isn't a * body for inspect it is recommended to skip this step. * * @note It is necessary to "append" the request body prior to the execution * of this function. * @note Remember to check for a possible intervention. * * @param transaction ModSecurity transaction. * * @returns If the operation was successful or not. * @retval 1 Operation was successful. * @retval 0 Operation failed. * */ extern "C" int msc_process_request_body(Transaction *transaction) { return transaction->processRequestBody(); } /** * @name msc_append_request_body * @brief Adds request body to be inspected. * * With this function it is possible to feed ModSecurity with data for * inspection regarding the request body. There are two possibilities here: * * 1 - Adds the buffer in a row; * 2 - Adds it in chunks; * * A third option should be developed which is share your application buffer. * In any case, remember that the utilization of this function may reduce your * server throughput, as this buffer creations is computationally expensive. * * @note While feeding ModSecurity remember to keep checking if there is an * intervention, Sec Language has the capability to set the maximum * inspection size which may be reached, and the decision on what to do * in this case is upon the rules. * * @param transaction ModSecurity transaction. * * @returns If the operation was successful or not. * @retval 1 Operation was successful. * @retval 0 Operation failed. * */ extern "C" int msc_append_request_body(Transaction *transaction, const unsigned char *buf, size_t len) { return transaction->appendRequestBody(buf, len); } extern "C" int msc_request_body_from_file(Transaction *transaction, const char *path) { return transaction->requestBodyFromFile(path); } /** * @name msc_process_response_headers * @brief Perform the analysis on the response headers. * * This function perform the analysis on the response headers, notice however * that the headers should be added prior to the execution of this function. * * @note Remember to check for a possible intervention. * * @param transaction ModSecurity transaction. * * @returns If the operation was successful or not. * @retval 1 Operation was successful. * @retval 0 Operation failed. * */ extern "C" int msc_process_response_headers(Transaction *transaction, int code, const char* protocol) { return transaction->processResponseHeaders(code, protocol); } /** * @name msc_process_response_body * @brief Perform the analysis on the response body (if any) * * This function perform the analysis on the response body. It is optional to * call that function. If this API consumer already know that there isn't a * body for inspect it is recommended to skip this step. * * @note It is necessary to "append" the response body prior to the execution * of this function. * @note Remember to check for a possible intervention. * * @param transaction ModSecurity transaction. * * @returns If the operation was successful or not. * @retval 1 Operation was successful. * @retval 0 Operation failed. * */ extern "C" int msc_process_response_body(Transaction *transaction) { return transaction->processResponseBody(); } /** * @name msc_append_response_body * @brief Adds reponse body to be inspected. * * With this function it is possible to feed ModSecurity with data for * inspection regarding the response body. ModSecurity can also update the * contents of the response body, this is not quite ready yet on this version * of the API. * * @note If the content is updated, the client cannot receive the content * length header filled, at least not with the old values. Otherwise * unexpected behavior may happens. * * @param transaction ModSecurity transaction. * * @returns If the operation was successful or not. * @retval 1 Operation was successful. * @retval 0 Operation failed. * */ extern "C" int msc_append_response_body(Transaction *transaction, const unsigned char *buf, size_t len) { return transaction->appendResponseBody(buf, len); } /** * @name msc_add_request_header * @brief Adds a request header * * With this function it is possible to feed ModSecurity with a request header. * * @note This function expects a NULL terminated string, for both: key and * value. * * @param transaction ModSecurity transaction. * @param key header name. * @param value header value. * * @returns If the operation was successful or not. * @retval 1 Operation was successful. * @retval 0 Operation failed. * */ extern "C" int msc_add_request_header(Transaction *transaction, const unsigned char *key, const unsigned char *value) { return transaction->addRequestHeader(key, value); } /** * @name msc_add_n_request_header * @brief Adds a request header * * Same as msc_add_request_header, do not expect a NULL terminated string, * instead it expect the string and the string size, for the value and key. * * @param transaction ModSecurity transaction. * @param key header name. * @param key_len header name size. * @param value header value. * @param val_len header value size. * * @returns If the operation was successful or not. * @retval 1 Operation was successful. * @retval 0 Operation failed. * */ extern "C" int msc_add_n_request_header(Transaction *transaction, const unsigned char *key, size_t key_len, const unsigned char *value, size_t value_len) { return transaction->addRequestHeader(key, key_len, value, value_len); } /** * @name msc_add_response_header * @brief Adds a response header * * With this function it is possible to feed ModSecurity with a response * header. * * @note This function expects a NULL terminated string, for both: key and * value. * * @param transaction ModSecurity transaction. * @param key header name. * @param value header value. * * @returns If the operation was successful or not. * @retval 1 Operation was successful. * @retval 0 Operation failed. * */ extern "C" int msc_add_response_header(Transaction *transaction, const unsigned char *key, const unsigned char *value) { return transaction->addResponseHeader(key, value); } /** * @name msc_add_n_response_header * @brief Adds a response header * * Same as msc_add_response_header, do not expect a NULL terminated string, * instead it expect the string and the string size, for the value and key. * * @param transaction ModSecurity transaction. * @param key header name. * @param key_len header name size. * @param value header value. * @param val_len header value size. * * @returns If the operation was successful or not. * @retval 1 Operation was successful. * @retval 0 Operation failed. * */ extern "C" int msc_add_n_response_header(Transaction *transaction, const unsigned char *key, size_t key_len, const unsigned char *value, size_t value_len) { return transaction->addResponseHeader(key, key_len, value, value_len); } /** * @name msc_transaction_cleanup * @brief Removes all the resources allocated by a given Transaction. * * It is mandatory to call this function after every request being finished, * otherwise it may end up in a huge memory leak. * * @param transaction ModSecurity transaction. * * @returns If the operation was successful or not. * @retval 1 Operation was successful. * @retval 0 Operation failed. * */ extern "C" void msc_transaction_cleanup(Transaction *transaction) { delete transaction; } /** * @name msc_intervention * @brief Check if ModSecurity has anything to ask to the server. * * Intervention can generate a log event and/or perform a disruptive action. * * @param transaction ModSecurity transaction. * * @return Pointer to ModSecurityIntervention structure * @retval >0 A intervention should be made. * @retval NULL Nothing to be done. * */ extern "C" int msc_intervention(Transaction *transaction, ModSecurityIntervention *it) { return transaction->intervention(it); } /** * @name msc_get_response_body * @brief Retrieve a buffer with the updated response body. * * This function is needed to be called whenever ModSecurity update the * contents of the response body, otherwise there is no need to call this * function. * * @param transaction ModSecurity transaction. * * @return It returns a buffer (const char *) * @retval >0 body was update and available. * @retval NULL Nothing was updated. * */ extern "C" const char *msc_get_response_body(Transaction *transaction) { return transaction->getResponseBody(); } /** * @name msc_get_response_body_length * @brief Retrieve the length of the response body. * * This function returns the size of the response body buffer. * * @param transaction ModSecurity transaction. * * @return Size of the response body. * */ extern "C" size_t msc_get_response_body_length(Transaction *transaction) { return transaction->getResponseBodyLength(); } /** * @name msc_get_request_body_length * @brief Retrieve the length of the request body. * * This function returns the size of the request body buffer. * * @param transaction ModSecurity transaction. * * @return Size of the request body. * */ extern "C" size_t msc_get_request_body_length(Transaction *transaction) { return transaction->getRequestBodyLength(); } /** * @name msc_process_logging * @brief Logging all information relative to this transaction. * * At this point there is not need to hold the connection, the response can be * delivered prior to the execution of this function. * * @param transaction ModSecurity transaction. * * @returns If the operation was successful or not. * @retval 1 Operation was successful. * @retval 0 Operation failed. * */ extern "C" int msc_process_logging(Transaction *transaction) { return transaction->processLogging(); } /** * @name msc_update_status_code * @brief Updates response status code. * * Called after msc_process_response_headers to inform a new response code. * Not mandatory. * * @param transaction ModSecurity transaction. * * @returns If the operation was successful or not. * @retval 1 Operation was successful. * @retval 0 Operation failed. * */ extern "C" int msc_update_status_code(Transaction *transaction, int status) { return transaction->updateStatusCode(status); } } // namespace modsecurity modsecurity-v3.0.6/src/rule_script.h0000664000175000017500000000347414146026157020710 0ustar mhsvierulamhsvierula /* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include #include #include "modsecurity/rules_set.h" #include "modsecurity/rule.h" #include "src/engine/lua.h" #include "src/operators/operator.h" #include "modsecurity/actions/action.h" #include "modsecurity/modsecurity.h" #include "src/actions/transformations/none.h" #include "src/actions/tag.h" #include "src/utils/string.h" #include "modsecurity/rule_message.h" #include "src/actions/msg.h" #include "src/actions/log_data.h" #include "src/actions/severity.h" #include "src/variables/variable.h" #ifndef SRC_RULE_SCRIPT_H_ #define SRC_RULE_SCRIPT_H_ namespace modsecurity { using actions::Action; /** @ingroup ModSecurity_CPP_API */ class RuleScript : public RuleWithActions { public: RuleScript(const std::string &name, std::vector *actions, Transformations *t, std::unique_ptr fileName, int lineNumber) : RuleWithActions(actions, t, std::move(fileName), lineNumber), m_name(name), m_lua() { } RuleScript(const RuleWithActions& r) = delete; bool init(std::string *err); bool evaluate(Transaction *trans, std::shared_ptr ruleMessage) override; std::string m_name; engine::Lua m_lua; }; } // namespace modsecurity #endif // SRC_RULE_SCRIPT_H_ modsecurity-v3.0.6/src/rule.cc0000664000175000017500000000236214146026157017455 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "modsecurity/rule.h" #include #include #include #include #include #include #include #include #include "modsecurity/rules_set.h" #include "src/operators/operator.h" #include "modsecurity/actions/action.h" #include "modsecurity/modsecurity.h" #include "src/actions/transformations/none.h" #include "src/actions/tag.h" #include "src/utils/string.h" #include "modsecurity/rule_message.h" #include "src/actions/msg.h" #include "src/actions/log_data.h" #include "src/actions/severity.h" #include "src/actions/capture.h" #include "src/actions/multi_match.h" #include "src/actions/set_var.h" #include "src/actions/block.h" #include "src/variables/variable.h" modsecurity-v3.0.6/src/debug_log_writer_agent.h0000664000175000017500000000207014146026157023045 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include #include #ifndef SRC_DEBUG_LOG_WRITER_AGENT_H_ #define SRC_DEBUG_LOG_WRITER_AGENT_H_ namespace modsecurity { /** @ingroup ModSecurity_CPP_API */ class DebugLogWriterAgent : public std::ofstream { public: explicit DebugLogWriterAgent(const std::string& fileName); ~DebugLogWriterAgent() { if (is_open()) { close(); } } void write(const std::string& msg); std::string m_fileName; }; } // namespace modsecurity #endif // SRC_DEBUG_LOG_WRITER_AGENT_H_ modsecurity-v3.0.6/src/modsecurity.cc0000664000175000017500000003311714146026157021057 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "modsecurity/modsecurity.h" #include "src/config.h" #ifdef WITH_YAJL #include #include #endif #ifdef WITH_LIBXML2 #include #include #endif #ifdef MSC_WITH_CURL #include #endif #include #include #include "modsecurity/rule.h" #include "modsecurity/rule_message.h" #include "src/collection/backend/in_memory-per_process.h" #include "src/collection/backend/lmdb.h" #include "src/unique_id.h" #include "src/utils/regex.h" #include "src/utils/geo_lookup.h" #include "src/actions/transformations/transformation.h" namespace modsecurity { /** * @name ModSecurity * @brief Initilizes ModSecurity CPP API * * ModSecurity initializer. * * Example Usage: * @code * * using ModSecurity::ModSecurity; * * ModSecurity *msc = new ModSecurity(); * * @endcode */ ModSecurity::ModSecurity() : #ifdef WITH_LMDB m_global_collection(new collection::backend::LMDB("GLOBAL")), m_resource_collection(new collection::backend::LMDB("RESOURCE")), m_ip_collection(new collection::backend::LMDB("IP")), m_session_collection(new collection::backend::LMDB("SESSION")), m_user_collection(new collection::backend::LMDB("USER")), #else m_global_collection(new collection::backend::InMemoryPerProcess("GLOBAL")), m_resource_collection( new collection::backend::InMemoryPerProcess("RESOURCE")), m_ip_collection(new collection::backend::InMemoryPerProcess("IP")), m_session_collection( new collection::backend::InMemoryPerProcess("SESSION")), m_user_collection(new collection::backend::InMemoryPerProcess("USER")), #endif m_connector(""), m_whoami(""), m_logCb(NULL), m_logProperties(0) { UniqueId::uniqueId(); srand(time(NULL)); #ifdef MSC_WITH_CURL curl_global_init(CURL_GLOBAL_ALL); #endif #ifdef WITH_LIBXML2 xmlInitParser(); #endif } ModSecurity::~ModSecurity() { #ifdef MSC_WITH_CURL curl_global_cleanup(); #endif #ifdef WITH_GEOIP Utils::GeoLookup::getInstance().cleanUp(); #endif #ifdef WITH_LIBXML2 xmlCleanupParser(); #endif delete m_global_collection; delete m_resource_collection; delete m_ip_collection; delete m_session_collection; delete m_user_collection; } /** * @name whoAmI * @brief Return information about this ModSecurity version and platform. * * Platform and version are two questions that community will ask prior to * provide support. Making it available internally and to the connector as * well. * * @note This information maybe will be used by a log parser. If you want to * update it, make it in a fashion that won't break the existent parsers. * (e.g. adding extra information _only_ to the end of the string) */ const std::string& ModSecurity::whoAmI() { std::string platform("Unknown platform"); #if AIX platform = "AIX"; #elif LINUX platform = "Linux"; #elif OPENBSD platform = "OpenBSD"; #elif SOLARIS platform = "Solaris"; #elif HPUX platform = "HPUX"; #elif MACOSX platform = "MacOSX"; #elif FREEBSD platform = "FreeBSD"; #elif DRAGONFLY platform = "DragonFlyBSD"; #elif NETBSD platform = "NetBSD"; #elif WIN32 platform = "Windows"; #endif if (m_whoami.empty()) { m_whoami = "ModSecurity v" MODSECURITY_VERSION " (" + platform + ")"; } return m_whoami; } /** * @name setConnectorInformation * @brief Set information about the connector that is using the library. * * For the purpose of log it is necessary for modsecurity to understand which * 'connector' is consuming the API. * * @note It is strongly recommended to set a information in the following * pattern: * * ConnectorName vX.Y.Z-tag (something else) * * For instance: ModSecurity-nginx v0.0.1-alpha (Whee) * * @param connector Information about the connector. * */ void ModSecurity::setConnectorInformation(const std::string &connector) { m_connector = connector; } /** * @name getConnectorInformation * @brief Returns the connector information. * * Returns whatever was set by 'setConnectorInformation'. Check * setConnectorInformation documentation to understand the expected format. * * @retval "" Nothing was informed about the connector. * @retval !="" Connector information. */ const std::string& ModSecurity::getConnectorInformation() const { return m_connector; } void ModSecurity::serverLog(void *data, std::shared_ptr rm) { if (m_logCb == NULL) { std::cerr << "Server log callback is not set -- " << rm->errorLog(); std::cerr << std::endl; return; } if (rm == NULL) { return; } if (m_logProperties & TextLogProperty) { std::string &&d = rm->log(); const void *a = static_cast(d.c_str()); m_logCb(data, a); return; } if (m_logProperties & RuleMessageLogProperty) { const void *a = static_cast(rm.get()); if (m_logProperties & IncludeFullHighlightLogProperty) { m_logCb(data, a); return; } m_logCb(data, a); return; } } int ModSecurity::processContentOffset(const char *content, size_t len, const char *matchString, std::string *json, const char **err) { #ifdef WITH_YAJL Utils::Regex variables("v([0-9]+),([0-9]+)"); Utils::Regex operators("o([0-9]+),([0-9]+)"); Utils::Regex transformations("t:(?:(?!t:).)+"); yajl_gen g; std::string varValue; const unsigned char *buf; size_t jsonSize; std::list vars = variables.searchAll(matchString); std::list ops = operators.searchAll(matchString); std::list trans = transformations.searchAll(matchString); g = yajl_gen_alloc(NULL); if (g == NULL) { *err = "Failed to allocate memory for the JSON creation."; return -1; } yajl_gen_config(g, yajl_gen_beautify, 0); yajl_gen_map_open(g); yajl_gen_string(g, reinterpret_cast("match"), strlen("match")); yajl_gen_array_open(g); yajl_gen_map_open(g); yajl_gen_string(g, reinterpret_cast("variable"), strlen("variable")); yajl_gen_map_open(g); yajl_gen_string(g, reinterpret_cast("highlight"), strlen("highlight")); yajl_gen_array_open(g); while (vars.size() > 3) { std::string value; yajl_gen_map_open(g); vars.pop_back(); const std::string &startingAt = vars.back().str(); vars.pop_back(); const std::string &size = vars.back().str(); vars.pop_back(); yajl_gen_string(g, reinterpret_cast("startingAt"), strlen("startingAt")); yajl_gen_string(g, reinterpret_cast(startingAt.c_str()), startingAt.size()); yajl_gen_string(g, reinterpret_cast("size"), strlen("size")); yajl_gen_string(g, reinterpret_cast(size.c_str()), size.size()); yajl_gen_map_close(g); if (stoi(startingAt) >= len) { *err = "Offset is out of the content limits."; return -1; } value = std::string(content, stoi(startingAt), stoi(size)); if (varValue.size() > 0) { varValue.append(" " + value); } else { varValue.append(value); } } yajl_gen_array_close(g); yajl_gen_string(g, reinterpret_cast("value"), strlen("value")); yajl_gen_array_open(g); yajl_gen_map_open(g); yajl_gen_string(g, reinterpret_cast("value"), strlen("value")); yajl_gen_string(g, reinterpret_cast(varValue.c_str()), varValue.size()); yajl_gen_map_close(g); while (!trans.empty()) { modsecurity::actions::transformations::Transformation *t; std::string varValueRes; yajl_gen_map_open(g); yajl_gen_string(g, reinterpret_cast("transformation"), strlen("transformation")); yajl_gen_string(g, reinterpret_cast(trans.back().str().c_str()), trans.back().str().size()); t = modsecurity::actions::transformations::Transformation::instantiate( trans.back().str().c_str()); varValueRes = t->evaluate(varValue, NULL); varValue.assign(varValueRes); trans.pop_back(); yajl_gen_string(g, reinterpret_cast("value"), strlen("value")); yajl_gen_string(g, reinterpret_cast( varValue.c_str()), varValue.size()); yajl_gen_map_close(g); delete t; } yajl_gen_array_close(g); yajl_gen_string(g, reinterpret_cast("operator"), strlen("operator")); yajl_gen_map_open(g); while (ops.size() > 3) { std::string value; yajl_gen_string(g, reinterpret_cast("highlight"), strlen("highlight")); yajl_gen_map_open(g); ops.pop_back(); std::string startingAt = ops.back().str(); ops.pop_back(); std::string size = ops.back().str(); ops.pop_back(); yajl_gen_string(g, reinterpret_cast("startingAt"), strlen("startingAt")); yajl_gen_string(g, reinterpret_cast(startingAt.c_str()), startingAt.size()); yajl_gen_string(g, reinterpret_cast("size"), strlen("size")); yajl_gen_string(g, reinterpret_cast(size.c_str()), size.size()); yajl_gen_map_close(g); if (stoi(startingAt) >= varValue.size()) { *err = "Offset is out of the variable limits."; return -1; } yajl_gen_string(g, reinterpret_cast("value"), strlen("value")); value = std::string(varValue, stoi(startingAt), stoi(size)); yajl_gen_string(g, reinterpret_cast(value.c_str()), value.size()); } yajl_gen_map_close(g); yajl_gen_map_close(g); yajl_gen_array_close(g); yajl_gen_map_close(g); yajl_gen_array_close(g); yajl_gen_map_close(g); yajl_gen_get_buf(g, &buf, &jsonSize); json->assign(reinterpret_cast(buf), jsonSize); json->append("\n"); yajl_gen_free(g); return 0; #else *err = "Without YAJL support, we cannot generate JSON."; return -1; #endif } void ModSecurity::setServerLogCb(ModSecLogCb cb) { setServerLogCb(cb, TextLogProperty); } void ModSecurity::setServerLogCb(ModSecLogCb cb, int properties) { m_logCb = (ModSecLogCb) cb; m_logProperties = properties; } /** * @name msc_set_log_cb * @brief Set the log callback functiond * * It is neccessary to indicate to libModSecurity which function within the * connector should be called when logging is required. * * @oarm msc The current ModSecurity instance * @param ModSecLogCb The callback function to which a reference to the log msgs * will be passed. * */ extern "C" void msc_set_log_cb(ModSecurity *msc, ModSecLogCb cb) { msc->setServerLogCb(cb); } /** * @name msc_set_connector_info * @brief Set information about the connector that is using the library. * * For the purpose of log it is necessary for modsecurity to understand which * 'connector' is consuming the API. * * @note It is strongly recommended to set a information in the following * pattern: * * ConnectorName vX.Y.Z-tag (something else) * * For instance: ModSecurity-nginx v0.0.1-alpha * * @param connector Information about the connector. * */ extern "C" void msc_set_connector_info(ModSecurity *msc, const char *connector) { msc->setConnectorInformation(std::string(connector)); } /** * @name msc_who_am_i * @brief Return information about this ModSecurity version and platform. * * Platform and version are two questions that community will ask prior to * provide support. Making it available internally and to the connector as * well. * * @note This information maybe will be used by a log parser. If you want to * update it, make it in a fashion that won't break the existent parsers. * (e.g. adding extra information _only_ to the end of the string) */ extern "C" const char *msc_who_am_i(ModSecurity *msc) { return msc->whoAmI().c_str(); } /** * @name msc_cleanup * @brief Cleanup ModSecurity C API * * Cleanup ModSecurity instance. * */ extern "C" void msc_cleanup(ModSecurity *msc) { delete msc; } /** * @name msc_init * @brief Initilizes ModSecurity C API * * ModSecurity initializer. * * Example Usage: * @code * * ModSecurity msc = msc_init(); * * @endcode */ extern "C" ModSecurity *msc_init(void) { return new ModSecurity(); } } // namespace modsecurity modsecurity-v3.0.6/src/debug_log/0000775000175000017500000000000014146026763020126 5ustar mhsvierulamhsvierulamodsecurity-v3.0.6/src/debug_log/debug_log_writer.h0000664000175000017500000000326614146026157023626 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include #include #include #include #include #include #include #ifndef SRC_DEBUG_LOG_DEBUG_LOG_WRITER_H_ #define SRC_DEBUG_LOG_DEBUG_LOG_WRITER_H_ namespace modsecurity { namespace debug_log { /** @ingroup ModSecurity_CPP_API */ class DebugLogWriter { public: static DebugLogWriter& getInstance() { static DebugLogWriter instance; return instance; } static void write_log(const std::string& file, const std::string& msg); static void close(const std::string& m_fileName); static int open(const std::string& m_fileName, std::string *error); private: DebugLogWriter() : m_first(NULL) { } ~DebugLogWriter() { } // C++ 03 // ======== // Dont forget to declare these two. You want to make sure they // are unacceptable otherwise you may accidentally get copies of // your singleton appearing. DebugLogWriter(DebugLogWriter const&); void operator=(DebugLogWriter const&); struct debug_log_file_handler *m_first; }; } // namespace debug_log } // namespace modsecurity #endif // SRC_DEBUG_LOG_DEBUG_LOG_WRITER_H_ modsecurity-v3.0.6/src/debug_log/debug_log_writer.cc0000664000175000017500000000256614146026157023766 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "src/debug_log/debug_log_writer.h" #include #include #include #include #include #include #include #include #include #include #include "src/utils/shared_files.h" namespace modsecurity { namespace debug_log { int DebugLogWriter::open(const std::string& fileName, std::string *error) { return utils::SharedFiles::getInstance().open(fileName, error); } void DebugLogWriter::close(const std::string& fileName) { utils::SharedFiles::getInstance().close(fileName); } void DebugLogWriter::write_log(const std::string& fileName, const std::string &msg) { std::string err; std::string lmsg = msg + "\n"; utils::SharedFiles::getInstance().write(fileName, lmsg, &err); } } // namespace debug_log } // namespace modsecurity modsecurity-v3.0.6/src/debug_log/debug_log.cc0000664000175000017500000000421614146026157022364 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "modsecurity/debug_log.h" #include #include #include "src/debug_log/debug_log_writer.h" #include "src/debug_log_writer_agent.h" namespace modsecurity { namespace debug_log { DebugLog::~DebugLog() { DebugLogWriter::getInstance().close(m_fileName); } void DebugLog::setDebugLogFile(const std::string& fileName, std::string *error) { if (isLogFileSet()) { DebugLogWriter::getInstance().close(m_fileName); } m_fileName = fileName; DebugLogWriter::getInstance().open(m_fileName, error); } void DebugLog::setDebugLogLevel(int level) { m_debugLevel = level; } bool DebugLog::isLogFileSet() { return m_fileName.empty() == false; } bool DebugLog::isLogLevelSet() { return m_debugLevel != -1; } const std::string& DebugLog::getDebugLogFile() { return m_fileName; } int DebugLog::getDebugLogLevel() { if (m_debugLevel < 0) { return 0; } return m_debugLevel; } void DebugLog::write(int level, const std::string &id, const std::string &uri, const std::string &msg) { if (level <= m_debugLevel) { std::string msgf = "[" + std::to_string(level) + "] " + msg; msgf = "[" + id + "] [" + uri + "] " + msgf; DebugLogWriter &d = DebugLogWriter::getInstance(); d.write_log(m_fileName, msgf); } } void DebugLog::write(int level, const std::string &msg) { if (level <= m_debugLevel) { std::string msgf = "[" + std::to_string(level) + "] " + msg; DebugLogWriter &d = DebugLogWriter::getInstance(); d.write_log(m_fileName, msgf); } } } // namespace debug_log } // namespace modsecurity modsecurity-v3.0.6/src/rule_message.cc0000664000175000017500000000610014146026157021153 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "modsecurity/rule_message.h" #include "modsecurity/rules_set.h" #include "modsecurity/modsecurity.h" #include "modsecurity/transaction.h" #include "src/utils/string.h" namespace modsecurity { std::string RuleMessage::_details(const RuleMessage *rm) { std::string msg; msg.append(" [file \"" + std::string(*rm->m_ruleFile.get()) + "\"]"); msg.append(" [line \"" + std::to_string(rm->m_ruleLine) + "\"]"); msg.append(" [id \"" + std::to_string(rm->m_ruleId) + "\"]"); msg.append(" [rev \"" + rm->m_rev + "\"]"); msg.append(" [msg \"" + rm->m_message + "\"]"); msg.append(" [data \"" + utils::string::limitTo(200, rm->m_data) + "\"]"); msg.append(" [severity \"" + std::to_string(rm->m_severity) + "\"]"); msg.append(" [ver \"" + rm->m_ver + "\"]"); msg.append(" [maturity \"" + std::to_string(rm->m_maturity) + "\"]"); msg.append(" [accuracy \"" + std::to_string(rm->m_accuracy) + "\"]"); for (auto &a : rm->m_tags) { msg.append(" [tag \"" + a + "\"]"); } msg.append(" [hostname \"" + *rm->m_serverIpAddress.get() \ + "\"]"); msg.append(" [uri \"" + utils::string::limitTo(200, *rm->m_uriNoQueryStringDecoded.get()) + "\"]"); msg.append(" [unique_id \"" + *rm->m_id + "\"]"); msg.append(" [ref \"" + utils::string::limitTo(200, rm->m_reference) + "\"]"); return msg; } std::string RuleMessage::_errorLogTail(const RuleMessage *rm) { std::string msg; msg.append("[hostname \"" + *rm->m_serverIpAddress.get() + "\"]"); msg.append(" [uri \"" + utils::string::limitTo(200, *rm->m_uriNoQueryStringDecoded.get()) + "\"]"); msg.append(" [unique_id \"" + *rm->m_id + "\"]"); return msg; } std::string RuleMessage::log(const RuleMessage *rm, int props, int code) { std::string msg(""); msg.reserve(2048); if (props & ClientLogMessageInfo) { msg.append("[client " + std::string(*rm->m_clientIpAddress.get()) + "] "); } if (rm->m_isDisruptive) { msg.append("ModSecurity: Access denied with code "); if (code == -1) { msg.append("%d"); } else { msg.append(std::to_string(code)); } msg.append(" (phase "); msg.append(std::to_string(rm->m_rule->getPhase() - 1) + "). "); } else { msg.append("ModSecurity: Warning. "); } msg.append(rm->m_match); msg.append(_details(rm)); if (props & ErrorLogTailLogMessageInfo) { msg.append(" " + _errorLogTail(rm)); } return modsecurity::utils::string::toHexIfNeeded(msg); } } // namespace modsecurity modsecurity-v3.0.6/src/actions/0000775000175000017500000000000014146026763017637 5ustar mhsvierulamhsvierulamodsecurity-v3.0.6/src/actions/data/0000775000175000017500000000000014146026763020550 5ustar mhsvierulamhsvierulamodsecurity-v3.0.6/src/actions/data/status.cc0000664000175000017500000000226014146026157022377 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "src/actions/data/status.h" #include #include #include #include "modsecurity/transaction.h" namespace modsecurity { namespace actions { namespace data { bool Status::init(std::string *error) { try { m_status = std::stoi(m_parser_payload); } catch (...) { error->assign("Not a valid number: " + m_parser_payload); return false; } return true; } bool Status::evaluate(RuleWithActions *rule, Transaction *transaction, std::shared_ptr rm) { transaction->m_it.status = m_status; return true; } } // namespace data } // namespace actions } // namespace modsecurity modsecurity-v3.0.6/src/actions/data/status.h0000664000175000017500000000236314146026157022245 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include #include "modsecurity/actions/action.h" #include "modsecurity/rule_message.h" #ifndef SRC_ACTIONS_DATA_STATUS_H_ #define SRC_ACTIONS_DATA_STATUS_H_ #ifdef __cplusplus class Transaction; namespace modsecurity { class Transaction; namespace actions { namespace data { class Status : public Action { public: explicit Status(const std::string &action) : Action(action, 2), m_status(0) { } bool init(std::string *error) override; bool evaluate(RuleWithActions *rule, Transaction *transaction, std::shared_ptr rm) override; int m_status; }; } // namespace data } // namespace actions } // namespace modsecurity #endif #endif // SRC_ACTIONS_DATA_STATUS_H_ modsecurity-v3.0.6/src/actions/set_env.h0000664000175000017500000000247114146026157021454 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include #include #include "modsecurity/actions/action.h" #include "src/run_time_string.h" #ifndef SRC_ACTIONS_SET_ENV_H_ #define SRC_ACTIONS_SET_ENV_H_ class Transaction; namespace modsecurity { class Transaction; namespace actions { class SetENV : public Action { public: explicit SetENV(const std::string &_action) : Action(_action) { } explicit SetENV(std::unique_ptr z) : Action("setenv", RunTimeOnlyIfMatchKind), m_string(std::move(z)) { } bool evaluate(RuleWithActions *rule, Transaction *transaction) override; bool init(std::string *error) override; private: std::unique_ptr m_string; }; } // namespace actions } // namespace modsecurity #endif // SRC_ACTIONS_SET_ENV_H_ modsecurity-v3.0.6/src/actions/audit_log.h0000664000175000017500000000216414146026157021757 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include #include "modsecurity/actions/action.h" #ifndef SRC_ACTIONS_AUDIT_LOG_H_ #define SRC_ACTIONS_AUDIT_LOG_H_ #ifdef __cplusplus class Transaction; namespace modsecurity { class Transaction; namespace actions { class AuditLog : public Action { public: explicit AuditLog(const std::string &action) : Action(action, RunTimeOnlyIfMatchKind) { } bool evaluate(RuleWithActions *rule, Transaction *transaction, std::shared_ptr rm) override; }; } // namespace actions } // namespace modsecurity #endif #endif // SRC_ACTIONS_AUDIT_LOG_H_ modsecurity-v3.0.6/src/actions/set_rsc.cc0000664000175000017500000000225114146026157021605 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "src/actions/set_rsc.h" #include #include #include "modsecurity/transaction.h" #include "modsecurity/rule.h" namespace modsecurity { namespace actions { bool SetRSC::init(std::string *error) { return true; } bool SetRSC::evaluate(RuleWithActions *rule, Transaction *t) { std::string colNameExpanded(m_string->evaluate(t)); ms_dbg_a(t, 8, "RESOURCE initiated with value: \'" + colNameExpanded + "\'."); t->m_collections.m_resource_collection_key = colNameExpanded; t->m_variableResource.set(colNameExpanded, t->m_variableOffset); return true; } } // namespace actions } // namespace modsecurity modsecurity-v3.0.6/src/actions/phase.cc0000664000175000017500000000463114146026157021247 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "src/actions/phase.h" #include #include #include "modsecurity/transaction.h" #include "modsecurity/rule.h" #include "modsecurity/modsecurity.h" #include "src/utils/string.h" namespace modsecurity { namespace actions { bool Phase::init(std::string *error) { std::string a = utils::string::tolower(m_parser_payload); m_phase = -1; try { m_phase = std::stoi(m_parser_payload); if (m_phase == 0) { m_phase = modsecurity::Phases::ConnectionPhase; m_secRulesPhase = 0; } else if (m_phase == 1) { m_phase = modsecurity::Phases::RequestHeadersPhase; m_secRulesPhase = 1; } else if (m_phase == 2) { m_phase = modsecurity::Phases::RequestBodyPhase; m_secRulesPhase = 2; } else if (m_phase == 3) { m_phase = modsecurity::Phases::ResponseHeadersPhase; m_secRulesPhase = 3; } else if (m_phase == 4) { m_phase = modsecurity::Phases::ResponseBodyPhase; m_secRulesPhase = 4; } else if (m_phase == 5) { m_phase = modsecurity::Phases::LoggingPhase; m_secRulesPhase = 5; } else { error->assign("Unknown phase: " + m_parser_payload); return false; } } catch (...) { if (a == "request") { m_phase = modsecurity::Phases::RequestBodyPhase; m_secRulesPhase = 2; } else if (a == "response") { m_phase = modsecurity::Phases::ResponseBodyPhase; m_secRulesPhase = 4; } else if (a == "logging") { m_phase = modsecurity::Phases::LoggingPhase; m_secRulesPhase = 5; } } return true; } bool Phase::evaluate(RuleWithActions *rule, Transaction *transaction) { rule->setPhase(m_phase); return true; } } // namespace actions } // namespace modsecurity modsecurity-v3.0.6/src/actions/set_sid.cc0000664000175000017500000000225314146026157021577 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "src/actions/set_sid.h" #include #include #include "modsecurity/transaction.h" #include "modsecurity/rule.h" namespace modsecurity { namespace actions { bool SetSID::init(std::string *error) { return true; } bool SetSID::evaluate(RuleWithActions *rule, Transaction *t) { std::string colNameExpanded(m_string->evaluate(t)); ms_dbg_a(t, 8, "Session ID initiated with value: \'" + colNameExpanded + "\'."); t->m_collections.m_session_collection_key = colNameExpanded; t->m_variableSessionID.set(colNameExpanded, t->m_variableOffset); return true; } } // namespace actions } // namespace modsecurity modsecurity-v3.0.6/src/actions/rule_id.h0000664000175000017500000000224214146026157021430 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include "modsecurity/actions/action.h" #ifndef SRC_ACTIONS_RULE_ID_H_ #define SRC_ACTIONS_RULE_ID_H_ #ifdef __cplusplus class Transaction; namespace modsecurity { class Transaction; class RuleWithOperator; namespace actions { class RuleId : public Action { public: explicit RuleId(const std::string &action) : Action(action, ConfigurationKind), m_ruleId(0) { } bool init(std::string *error) override; bool evaluate(RuleWithActions *rule, Transaction *transaction) override; private: double m_ruleId; }; } // namespace actions } // namespace modsecurity #endif #endif // SRC_ACTIONS_RULE_ID_H_ modsecurity-v3.0.6/src/actions/xmlns.cc0000664000175000017500000000316114146026157021305 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "src/actions/xmlns.h" #include #include #include "modsecurity/actions/action.h" #include "modsecurity/transaction.h" namespace modsecurity { namespace actions { bool XmlNS::init(std::string *error) { size_t pos; std::string http = "http://"; pos = m_parser_payload.find("="); if (pos == std::string::npos) { error->assign("XMLS: Bad format, missing equals sign."); return false; } m_scope = std::string(m_parser_payload, 0, pos); m_href = std::string(m_parser_payload, pos+1, m_parser_payload.size()); if (m_href.empty() || m_scope.empty()) { error->assign("XMLS: XMLNS is invalid. Expecting a " \ "name=value format."); return false; } if (m_href.at(0) == '\'' && m_href.size() > 3) { m_href.erase(0, 1); m_href.pop_back(); } if (m_href.compare(0, http.length(), http) != 0) { error->assign("XMLS: Missing xmlns href for prefix: " \ "`" + m_href + "'."); return false; } return true; } } // namespace actions } // namespace modsecurity modsecurity-v3.0.6/src/actions/msg.cc0000664000175000017500000000337214146026157020736 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "src/actions/msg.h" #include #include #include #include "modsecurity/actions/action.h" #include "modsecurity/transaction.h" #include "modsecurity/rule.h" #include "modsecurity/rule_message.h" /* * Description: Assigns a custom message to the rule or chain in which it * appears. The message will be logged along with every alert. * * Action Group: Meta-data * * Example: * SecRule &REQUEST_HEADERS:Host "@eq 0" "log,id:60008,severity:2,msg:'Request Missing a Host Header'" * * Note : The msg information appears in the error and/or audit log files * and is not sent back to the client in response headers. * * Note 2: The msg action can appear multiple times in the SecRule, however * just the last one will be take into consideration. * */ namespace modsecurity { namespace actions { bool Msg::evaluate(RuleWithActions *rule, Transaction *transaction, std::shared_ptr rm) { std::string msg = data(transaction); rm->m_message = msg; ms_dbg_a(transaction, 9, "Saving msg: " + msg); return true; } std::string Msg::data(Transaction *t) { std::string a(m_string->evaluate(t)); return a; } } // namespace actions } // namespace modsecurity modsecurity-v3.0.6/src/actions/accuracy.h0000664000175000017500000000217014146026157021577 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include "modsecurity/actions/action.h" #ifndef SRC_ACTIONS_ACCURACY_H_ #define SRC_ACTIONS_ACCURACY_H_ class Transaction; namespace modsecurity { class Transaction; namespace actions { class Accuracy : public Action { public: explicit Accuracy(const std::string &action) : Action(action, ConfigurationKind), m_accuracy(0) { } bool evaluate(RuleWithActions *rule, Transaction *transaction) override; bool init(std::string *error) override; private: int m_accuracy; }; } // namespace actions } // namespace modsecurity #endif // SRC_ACTIONS_ACCURACY_H_ modsecurity-v3.0.6/src/actions/ver.h0000664000175000017500000000202614146026157020601 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include "modsecurity/actions/action.h" #ifndef SRC_ACTIONS_VER_H_ #define SRC_ACTIONS_VER_H_ class Transaction; namespace modsecurity { class Transaction; namespace actions { class Ver : public Action { public: explicit Ver(const std::string &action) : Action(action, ConfigurationKind) { } bool evaluate(RuleWithActions *rule, Transaction *transaction) override; private: std::string m_ver; }; } // namespace actions } // namespace modsecurity #endif // SRC_ACTIONS_VER_H_ modsecurity-v3.0.6/src/actions/set_uid.h0000664000175000017500000000247114146026157021445 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include #include #include "modsecurity/actions/action.h" #include "src/run_time_string.h" #ifndef SRC_ACTIONS_SET_UID_H_ #define SRC_ACTIONS_SET_UID_H_ class Transaction; namespace modsecurity { class Transaction; namespace actions { class SetUID : public Action { public: explicit SetUID(const std::string &_action) : Action(_action) { } explicit SetUID(std::unique_ptr z) : Action("setuid", RunTimeOnlyIfMatchKind), m_string(std::move(z)) { } bool evaluate(RuleWithActions *rule, Transaction *transaction) override; bool init(std::string *error) override; private: std::unique_ptr m_string; }; } // namespace actions } // namespace modsecurity #endif // SRC_ACTIONS_SET_UID_H_ modsecurity-v3.0.6/src/actions/multi_match.cc0000664000175000017500000000154214146026157022453 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "src/actions/multi_match.h" #include #include #include "modsecurity/transaction.h" #include "modsecurity/rule.h" namespace modsecurity { namespace actions { bool MultiMatch::evaluate(RuleWithActions *rule, Transaction *transaction) { return true; } } // namespace actions } // namespace modsecurity modsecurity-v3.0.6/src/actions/set_var.cc0000664000175000017500000001220114146026157021602 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "src/actions/set_var.h" #include #include #include #include "modsecurity/rules_set.h" #include "modsecurity/transaction.h" #include "modsecurity/rule.h" #include "src/utils/string.h" #include "src/variables/global.h" #include "src/variables/ip.h" #include "src/variables/resource.h" #include "src/variables/session.h" #include "src/variables/tx.h" #include "src/variables/user.h" #include "src/variables/variable.h" namespace modsecurity { namespace actions { bool SetVar::init(std::string *error) { return true; } bool SetVar::evaluate(RuleWithActions *rule, Transaction *t) { std::string targetValue; std::string resolvedPre; if (m_string) { resolvedPre = m_string->evaluate(t, rule); } std::string m_variableNameExpanded; auto *v = m_variable.get(); variables::Tx_DynamicElement *tx = dynamic_cast< variables::Tx_DynamicElement *> (v); variables::Session_DynamicElement *session = dynamic_cast< variables::Session_DynamicElement *> (v); variables::Ip_DynamicElement *ip = dynamic_cast< variables::Ip_DynamicElement *> (v); variables::Resource_DynamicElement *resource = dynamic_cast< variables::Resource_DynamicElement *> (v); variables::Global_DynamicElement *global = dynamic_cast< variables::Global_DynamicElement *> (v); variables::User_DynamicElement *user = dynamic_cast< variables::User_DynamicElement *> (v); if (tx) { m_variableNameExpanded = tx->m_string->evaluate(t, rule); } else if (session) { m_variableNameExpanded = session->m_string->evaluate(t, rule); } else if (ip) { m_variableNameExpanded = ip->m_string->evaluate(t, rule); } else if (resource) { m_variableNameExpanded = resource->m_string->evaluate(t, rule); } else if (global) { m_variableNameExpanded = global->m_string->evaluate(t, rule); } else if (user) { m_variableNameExpanded = user->m_string->evaluate(t, rule); } else { m_variableNameExpanded = m_variable->m_name; } if (m_operation == setOperation) { targetValue = resolvedPre; } else if (m_operation == setToOneOperation) { targetValue = std::string("1"); } else if (m_operation == unsetOperation) { if (tx) { tx->del(t, m_variableNameExpanded); } else if (session) { session->del(t, m_variableNameExpanded); } else if (ip) { ip->del(t, m_variableNameExpanded); } else if (resource) { resource->del(t, m_variableNameExpanded); } else if (global) { global->del(t, m_variableNameExpanded); } else if (user) { user->del(t, m_variableNameExpanded); } else { // ? } goto end; } else { int pre = 0; int value = 0; try { pre = stoi(resolvedPre); } catch (...) { pre = 0; } try { std::vector l; RuleWithOperator *rr = dynamic_cast(rule); m_variable->evaluate(t, rr, &l); if (l.size() == 0) { value = 0; } else { value = stoi(l[0]->getValue()); for (auto &i : l) { delete i; } } } catch (...) { value = 0; } if (m_operation == sumAndSetOperation) { targetValue = std::to_string(value + pre); } else if (m_operation == substractAndSetOperation) { targetValue = std::to_string(value - pre); } } ms_dbg_a(t, 8, "Saving variable: " + m_variable->m_collectionName \ + ":" + m_variableNameExpanded + " with value: " + targetValue); if (tx) { tx->storeOrUpdateFirst(t, m_variableNameExpanded, targetValue); } else if (session) { session->storeOrUpdateFirst(t, m_variableNameExpanded, targetValue); } else if (ip) { ip->storeOrUpdateFirst(t, m_variableNameExpanded, targetValue); } else if (resource) { resource->storeOrUpdateFirst(t, m_variableNameExpanded, targetValue); } else if (global) { global->storeOrUpdateFirst(t, m_variableNameExpanded, targetValue); } else if (user) { user->storeOrUpdateFirst(t, m_variableNameExpanded, targetValue); } else { // ? } /* t->m_collections.storeOrUpdateFirst(m_variable->m_collectionName, m_variableNameExpanded, t->m_rules->m_secWebAppId.m_value, targetValue); */ end: return true; } } // namespace actions } // namespace modsecurity modsecurity-v3.0.6/src/actions/skip_after.cc0000664000175000017500000000177514146026157022304 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "src/actions/skip_after.h" #include #include #include "modsecurity/rules_set.h" #include "modsecurity/actions/action.h" #include "modsecurity/transaction.h" namespace modsecurity { namespace actions { bool SkipAfter::evaluate(RuleWithActions *rule, Transaction *transaction) { ms_dbg_a(transaction, 5, "Setting skipAfter for: " + *m_skipName); transaction->addMarker(m_skipName); return true; } } // namespace actions } // namespace modsecurity modsecurity-v3.0.6/src/actions/no_audit_log.h0000664000175000017500000000220014146026157022442 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include #include "modsecurity/actions/action.h" #ifndef SRC_ACTIONS_NO_AUDIT_LOG_H_ #define SRC_ACTIONS_NO_AUDIT_LOG_H_ #ifdef __cplusplus class Transaction; namespace modsecurity { class Transaction; namespace actions { class NoAuditLog : public Action { public: explicit NoAuditLog(const std::string &action) : Action(action, RunTimeOnlyIfMatchKind) { } bool evaluate(RuleWithActions *rule, Transaction *transaction, std::shared_ptr rm) override; }; } // namespace actions } // namespace modsecurity #endif #endif // SRC_ACTIONS_NO_AUDIT_LOG_H_ modsecurity-v3.0.6/src/actions/ver.cc0000664000175000017500000000164014146026157020740 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "src/actions/ver.h" #include #include #include "modsecurity/actions/action.h" #include "modsecurity/transaction.h" #include "modsecurity/rule.h" namespace modsecurity { namespace actions { bool Ver::evaluate(RuleWithActions *rule, Transaction *transaction) { rule->m_ver = m_parser_payload; return true; } } // namespace actions } // namespace modsecurity modsecurity-v3.0.6/src/actions/block.cc0000664000175000017500000000241114146026157021233 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "src/actions/block.h" #include #include #include #include "modsecurity/rules_set.h" #include "modsecurity/transaction.h" #include "modsecurity/rule.h" #include "modsecurity/intervention.h" #include "src/actions/data/status.h" namespace modsecurity { namespace actions { bool Block::evaluate(RuleWithActions *rule, Transaction *transaction, std::shared_ptr rm) { ms_dbg_a(transaction, 8, "Marking request as disruptive."); for (auto &a : transaction->m_rules->m_defaultActions[rule->getPhase()]) { if (a->isDisruptive() == false) { continue; } a->evaluate(rule, transaction, rm); } return true; } } // namespace actions } // namespace modsecurity modsecurity-v3.0.6/src/actions/severity.h0000664000175000017500000000223614146026157021662 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include #include "modsecurity/actions/action.h" #ifndef SRC_ACTIONS_SEVERITY_H_ #define SRC_ACTIONS_SEVERITY_H_ #ifdef __cplusplus namespace modsecurity { class Transaction; namespace actions { class Severity : public Action { public: explicit Severity(const std::string &action) : Action(action), m_severity(0) { } bool evaluate(RuleWithActions *rule, Transaction *transaction, std::shared_ptr rm) override; bool init(std::string *error) override; int m_severity; }; } // namespace actions } // namespace modsecurity #endif #endif // SRC_ACTIONS_SEVERITY_H_ modsecurity-v3.0.6/src/actions/rev.h0000664000175000017500000000210214146026157020574 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include "modsecurity/actions/action.h" #ifndef SRC_ACTIONS_REV_H_ #define SRC_ACTIONS_REV_H_ class Transaction; namespace modsecurity { class Transaction; namespace actions { class Rev : public Action { public: explicit Rev(const std::string &action) : Action(action, ConfigurationKind) { } bool evaluate(RuleWithActions *rule, Transaction *transaction) override; bool init(std::string *error) override; private: std::string m_rev; }; } // namespace actions } // namespace modsecurity #endif // SRC_ACTIONS_REV_H_ modsecurity-v3.0.6/src/actions/rule_id.cc0000664000175000017500000000266114146026157021573 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "src/actions/rule_id.h" #include #include #include "modsecurity/transaction.h" #include "modsecurity/rule.h" namespace modsecurity { namespace actions { bool RuleId::init(std::string *error) { std::string a = m_parser_payload; try { m_ruleId = std::stod(a); } catch (...) { m_ruleId = 0; error->assign("The input \"" + a + "\" does not " \ "seems to be a valid rule id."); return false; } std::ostringstream oss; oss << std::setprecision(40) << m_ruleId; if (a != oss.str() || m_ruleId < 0) { error->assign("The input \"" + a + "\" does not seems " \ "to be a valid rule id."); return false; } return true; } bool RuleId::evaluate(RuleWithActions *rule, Transaction *transaction) { rule->m_ruleId = m_ruleId; return true; } } // namespace actions } // namespace modsecurity modsecurity-v3.0.6/src/actions/skip.h0000664000175000017500000000214114146026157020751 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include "modsecurity/actions/action.h" #ifndef SRC_ACTIONS_SKIP_H_ #define SRC_ACTIONS_SKIP_H_ class Transaction; namespace modsecurity { class Transaction; namespace actions { class Skip : public Action { public: explicit Skip(const std::string &action) : Action(action, RunTimeOnlyIfMatchKind), m_skip_next(0) { } bool init(std::string *error) override; bool evaluate(RuleWithActions *rule, Transaction *transaction) override; int m_skip_next; }; } // namespace actions } // namespace modsecurity #endif // SRC_ACTIONS_SKIP_H_ modsecurity-v3.0.6/src/actions/no_audit_log.cc0000664000175000017500000000175314146026157022614 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "src/actions/no_audit_log.h" #include #include #include "modsecurity/transaction.h" #include "modsecurity/rule.h" #include "modsecurity/rule_message.h" namespace modsecurity { namespace actions { bool NoAuditLog::evaluate(RuleWithActions *rule, Transaction *transaction, std::shared_ptr rm) { rm->m_noAuditLog = true; rm->m_saveMessage = false; return true; } } // namespace actions } // namespace modsecurity modsecurity-v3.0.6/src/actions/severity.cc0000664000175000017500000000454214146026157022022 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "src/actions/severity.h" #include #include #include #include "modsecurity/rules_set.h" #include "modsecurity/actions/action.h" #include "modsecurity/transaction.h" #include "modsecurity/rule.h" #include "src/utils/string.h" #include "modsecurity/rule_message.h" namespace modsecurity { namespace actions { bool Severity::init(std::string *error) { std::string a = utils::string::tolower(m_parser_payload); if (a == "emergency") { m_severity = 0; return true; } else if (a == "alert") { m_severity = 1; return true; } else if (a == "critical") { m_severity = 2; return true; } else if (a == "error") { m_severity = 3; return true; } else if (a == "warning") { m_severity = 4; return true; } else if (a == "notice") { m_severity = 5; return true; } else if (a == "info") { m_severity = 6; return true; } else if (a == "debug") { m_severity = 7; return true; } else { try { m_severity = std::stoi(a); return true; } catch (...) { error->assign("Severity: The input \"" + a + "\" is " \ "not a number."); } } return false; } bool Severity::evaluate(RuleWithActions *rule, Transaction *transaction, std::shared_ptr rm) { ms_dbg_a(transaction, 9, "This rule severity is: " + \ std::to_string(this->m_severity) + " current transaction is: " + \ std::to_string(transaction->m_highestSeverityAction)); rm->m_severity = m_severity; if (transaction->m_highestSeverityAction > this->m_severity) { transaction->m_highestSeverityAction = this->m_severity; } return true; } } // namespace actions } // namespace modsecurity modsecurity-v3.0.6/src/actions/accuracy.cc0000664000175000017500000000230214146026157021732 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "src/actions/accuracy.h" #include #include #include "modsecurity/actions/action.h" #include "modsecurity/transaction.h" #include "modsecurity/rule.h" namespace modsecurity { namespace actions { bool Accuracy::init(std::string *error) { try { m_accuracy = std::stoi(m_parser_payload); } catch (...) { error->assign("Accuracy: The input \"" + m_parser_payload + "\" is " \ "not a number."); return false; } return true; } bool Accuracy::evaluate(RuleWithActions *rule, Transaction *transaction) { rule->m_accuracy = m_accuracy; return true; } } // namespace actions } // namespace modsecurity modsecurity-v3.0.6/src/actions/phase.h0000664000175000017500000000226714146026157021114 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include "modsecurity/actions/action.h" #ifndef SRC_ACTIONS_PHASE_H_ #define SRC_ACTIONS_PHASE_H_ #ifdef __cplusplus class Transaction; namespace modsecurity { class Transaction; class RuleWithOperator; namespace actions { class Phase : public Action { public: explicit Phase(const std::string &action) : Action(action, ConfigurationKind), m_phase(0), m_secRulesPhase(0) { } bool init(std::string *error) override; bool evaluate(RuleWithActions *rule, Transaction *transaction) override; int m_phase; int m_secRulesPhase; }; } // namespace actions } // namespace modsecurity #endif #endif // SRC_ACTIONS_PHASE_H_ modsecurity-v3.0.6/src/actions/multi_match.h0000664000175000017500000000213214146026157022311 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include "modsecurity/actions/action.h" #ifndef SRC_ACTIONS_MULTI_MATCH_H_ #define SRC_ACTIONS_MULTI_MATCH_H_ #ifdef __cplusplus class Transaction; namespace modsecurity { class Transaction; class RuleWithOperator; namespace actions { class MultiMatch : public Action { public: explicit MultiMatch(const std::string &action) : Action(action, RunTimeOnlyIfMatchKind) { } bool evaluate(RuleWithActions *rule, Transaction *transaction) override; }; } // namespace actions } // namespace modsecurity #endif #endif // SRC_ACTIONS_MULTI_MATCH_H_ modsecurity-v3.0.6/src/actions/action.cc0000664000175000017500000000304314146026157021420 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "modsecurity/actions/action.h" #include #include #include "modsecurity/transaction.h" #include "modsecurity/rule.h" #include "src/utils/string.h" #include "src/actions/block.h" #include "src/actions/chain.h" #include "src/actions/disruptive/deny.h" #include "src/actions/disruptive/redirect.h" #include "src/actions/data/status.h" #include "src/actions/rule_id.h" #include "src/actions/phase.h" #include "src/actions/severity.h" #include "src/actions/capture.h" #include "src/actions/disruptive/pass.h" #include "src/actions/log.h" #include "src/actions/no_log.h" #include "src/actions/no_audit_log.h" #include "src/actions/multi_match.h" #define IF_MATCH(a) \ if (op.compare(1, std::strlen(#a), #a) == 0) namespace modsecurity { namespace actions { std::string Action::evaluate(const std::string &value, Transaction *transaction) { return value; } bool Action::evaluate(RuleWithActions *rule, Transaction *transaction) { return true; } } // namespace actions } // namespace modsecurity modsecurity-v3.0.6/src/actions/exec.h0000664000175000017500000000223214146026157020730 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include "modsecurity/actions/action.h" #include "src/engine/lua.h" #ifndef SRC_ACTIONS_EXEC_H_ #define SRC_ACTIONS_EXEC_H_ class Transaction; namespace modsecurity { class Transaction; namespace actions { class Exec : public Action { public: explicit Exec(const std::string &action) : Action(action), m_script("") { } ~Exec() { } bool evaluate(RuleWithActions *rule, Transaction *transaction) override; bool init(std::string *error) override; private: std::string m_script; engine::Lua m_lua; }; } // namespace actions } // namespace modsecurity #endif // SRC_ACTIONS_EXEC_H_ modsecurity-v3.0.6/src/actions/set_var.h0000664000175000017500000000401314146026157021446 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include #include #include "modsecurity/actions/action.h" #include "src/run_time_string.h" #ifndef SRC_ACTIONS_SET_VAR_H_ #define SRC_ACTIONS_SET_VAR_H_ namespace modsecurity { class Transaction; class RuleWithOperator; namespace actions { enum SetVarOperation { /* Set variable to something */ setOperation, /* read variable, sum predicate and set */ sumAndSetOperation, /* read variable, substract predicate and set */ substractAndSetOperation, /* set variable to 1 */ setToOneOperation, /* unset operation */ unsetOperation, }; class SetVar : public Action { public: SetVar(SetVarOperation operation, std::unique_ptr variable, std::unique_ptr predicate) : Action("setvar"), m_operation(operation), m_variable(std::move(variable)), m_string(std::move(predicate)) { } SetVar(SetVarOperation operation, std::unique_ptr variable) : Action("setvar"), m_operation(operation), m_variable(std::move(variable)) { } bool evaluate(RuleWithActions *rule, Transaction *transaction) override; bool init(std::string *error) override; private: SetVarOperation m_operation; std::unique_ptr m_variable; std::unique_ptr m_string; }; } // namespace actions } // namespace modsecurity #endif // SRC_ACTIONS_SET_VAR_H_ modsecurity-v3.0.6/src/actions/capture.h0000664000175000017500000000201014146026157021441 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include "modsecurity/actions/action.h" #ifndef SRC_ACTIONS_CAPTURE_H_ #define SRC_ACTIONS_CAPTURE_H_ namespace modsecurity { class RuleWithOperator; namespace actions { class Capture : public Action { public: explicit Capture(const std::string &action) : Action(action, RunTimeOnlyIfMatchKind) { } bool evaluate(RuleWithActions *rule, Transaction *transaction) override; }; } // namespace actions } // namespace modsecurity #endif // SRC_ACTIONS_CAPTURE_H_ modsecurity-v3.0.6/src/actions/log.h0000664000175000017500000000207514146026157020572 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include #include "modsecurity/actions/action.h" #ifndef SRC_ACTIONS_LOG_H_ #define SRC_ACTIONS_LOG_H_ class Transaction; namespace modsecurity { class Transaction; namespace actions { class Log : public Action { public: explicit Log(const std::string &action) : Action(action, RunTimeOnlyIfMatchKind) { } bool evaluate(RuleWithActions *rule, Transaction *transaction, std::shared_ptr rm) override; }; } // namespace actions } // namespace modsecurity #endif // SRC_ACTIONS_LOG_H_ modsecurity-v3.0.6/src/actions/transformations/0000775000175000017500000000000014146026763023070 5ustar mhsvierulamhsvierulamodsecurity-v3.0.6/src/actions/transformations/base64_decode.cc0000664000175000017500000000217414146026157025767 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "src/actions/transformations/base64_decode.h" #include #include #include #include #include #include #include "modsecurity/transaction.h" #include "src/actions/transformations/transformation.h" #include "src/utils/base64.h" namespace modsecurity { namespace actions { namespace transformations { std::string Base64Decode::evaluate(const std::string &value, Transaction *transaction) { std::string ret = Utils::Base64::decode(value); return ret; } } // namespace transformations } // namespace actions } // namespace modsecurity modsecurity-v3.0.6/src/actions/transformations/trim_left.cc0000664000175000017500000000240114146026157025356 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "src/actions/transformations/trim_left.h" #include #include #include #include #include #include #include "modsecurity/transaction.h" #include "src/actions/transformations/transformation.h" #include "src/actions/transformations/trim.h" #include "modsecurity/actions/action.h" namespace modsecurity { namespace actions { namespace transformations { TrimLeft::TrimLeft(const std::string &action) : Trim(action) { this->action_kind = 1; } std::string TrimLeft::evaluate(const std::string &val, Transaction *transaction) { std::string value(val); return *ltrim(&value); } } // namespace transformations } // namespace actions } // namespace modsecurity modsecurity-v3.0.6/src/actions/transformations/none.cc0000664000175000017500000000203214146026157024330 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "src/actions/transformations/none.h" #include #include #include #include #include #include #include "modsecurity/transaction.h" #include "src/actions/transformations/transformation.h" namespace modsecurity { namespace actions { namespace transformations { std::string None::evaluate(const std::string &value, Transaction *transaction) { return value; } } // namespace transformations } // namespace actions } // namespace modsecurity modsecurity-v3.0.6/src/actions/transformations/base64_decode_ext.h0000664000175000017500000000235614146026157026513 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include "modsecurity/actions/action.h" #include "src/actions/transformations/transformation.h" #ifndef SRC_ACTIONS_TRANSFORMATIONS_BASE64_DECODE_EXT_H_ #define SRC_ACTIONS_TRANSFORMATIONS_BASE64_DECODE_EXT_H_ #ifdef __cplusplus namespace modsecurity { class Transaction; namespace actions { namespace transformations { class Base64DecodeExt : public Transformation { public: explicit Base64DecodeExt(const std::string &action) : Transformation(action) { } std::string evaluate(const std::string &exp, Transaction *transaction) override; }; } // namespace transformations } // namespace actions } // namespace modsecurity #endif #endif // SRC_ACTIONS_TRANSFORMATIONS_BASE64_DECODE_EXT_H_ modsecurity-v3.0.6/src/actions/transformations/parity_odd_7bit.h0000664000175000017500000000243714146026157026327 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include "modsecurity/actions/action.h" #include "src/actions/transformations/transformation.h" #ifndef SRC_ACTIONS_TRANSFORMATIONS_PARITY_ODD_7BIT_H_ #define SRC_ACTIONS_TRANSFORMATIONS_PARITY_ODD_7BIT_H_ #ifdef __cplusplus namespace modsecurity { class Transaction; namespace actions { namespace transformations { class ParityOdd7bit : public Transformation { public: explicit ParityOdd7bit(const std::string &action) : Transformation(action) { } std::string evaluate(const std::string &exp, Transaction *transaction) override; static bool inplace(unsigned char *input, uint64_t input_len); }; } // namespace transformations } // namespace actions } // namespace modsecurity #endif #endif // SRC_ACTIONS_TRANSFORMATIONS_PARITY_ODD_7BIT_H_ modsecurity-v3.0.6/src/actions/transformations/cmd_line.h0000664000175000017500000000231414146026157025010 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include "modsecurity/actions/action.h" #include "src/actions/transformations/transformation.h" #ifndef SRC_ACTIONS_TRANSFORMATIONS_CMD_LINE_H_ #define SRC_ACTIONS_TRANSFORMATIONS_CMD_LINE_H_ #ifdef __cplusplus namespace modsecurity { class Transaction; namespace actions { namespace transformations { class CmdLine : public Transformation { public: explicit CmdLine(const std::string &action) : Transformation(action) { } std::string evaluate(const std::string &exp, Transaction *transaction) override; }; } // namespace transformations } // namespace actions } // namespace modsecurity #endif #endif // SRC_ACTIONS_TRANSFORMATIONS_CMD_LINE_H_ modsecurity-v3.0.6/src/actions/transformations/url_decode_uni.h0000664000175000017500000000255114146026157026221 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include "modsecurity/rules_set_properties.h" #include "modsecurity/actions/action.h" #include "src/actions/transformations/transformation.h" #ifndef SRC_ACTIONS_TRANSFORMATIONS_URL_DECODE_UNI_H_ #define SRC_ACTIONS_TRANSFORMATIONS_URL_DECODE_UNI_H_ #ifdef __cplusplus namespace modsecurity { class Transaction; namespace actions { namespace transformations { class UrlDecodeUni : public Transformation { public: explicit UrlDecodeUni(const std::string &action) : Transformation(action) { } std::string evaluate(const std::string &exp, Transaction *transaction) override; static int inplace(unsigned char *input, uint64_t input_len, Transaction *transaction); }; } // namespace transformations } // namespace actions } // namespace modsecurity #endif #endif // SRC_ACTIONS_TRANSFORMATIONS_URL_DECODE_UNI_H_ modsecurity-v3.0.6/src/actions/transformations/remove_nulls.h0000664000175000017500000000233714146026157025755 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include "modsecurity/actions/action.h" #include "src/actions/transformations/transformation.h" #ifndef SRC_ACTIONS_TRANSFORMATIONS_REMOVE_NULLS_H_ #define SRC_ACTIONS_TRANSFORMATIONS_REMOVE_NULLS_H_ #ifdef __cplusplus namespace modsecurity { class Transaction; namespace actions { namespace transformations { class RemoveNulls : public Transformation { public: explicit RemoveNulls(const std::string &action) : Transformation(action) { } std::string evaluate(const std::string &exp, Transaction *transaction) override; }; } // namespace transformations } // namespace actions } // namespace modsecurity #endif #endif // SRC_ACTIONS_TRANSFORMATIONS_REMOVE_NULLS_H_ modsecurity-v3.0.6/src/actions/transformations/hex_decode.cc0000664000175000017500000000342214146026157025464 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "src/actions/transformations/hex_decode.h" #include #include #include #include #include #include #include #include "modsecurity/transaction.h" #include "src/actions/transformations/transformation.h" #include "src/utils/string.h" namespace modsecurity { namespace actions { namespace transformations { std::string HexDecode::evaluate(const std::string &value, Transaction *transaction) { std::string ret; unsigned char *input; int size = 0; input = reinterpret_cast (malloc(sizeof(char) * value.length()+1)); if (input == NULL) { return ""; } memcpy(input, value.c_str(), value.length()+1); size = inplace(input, value.length()); ret.assign(reinterpret_cast(input), size); free(input); return ret; } int HexDecode::inplace(unsigned char *data, int len) { unsigned char *d = data; int i, count = 0; if ((data == NULL) || (len == 0)) { return 0; } for (i = 0; i <= len - 2; i += 2) { *d++ = utils::string::x2c(&data[i]); count++; } *d = '\0'; return count; } } // namespace transformations } // namespace actions } // namespace modsecurity modsecurity-v3.0.6/src/actions/transformations/replace_comments.cc0000664000175000017500000000427114146026157026720 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "src/actions/transformations/replace_comments.h" #include #include #include #include #include #include #include #include "modsecurity/transaction.h" #include "src/actions/transformations/transformation.h" namespace modsecurity { namespace actions { namespace transformations { ReplaceComments::ReplaceComments(const std::string &action) : Transformation(action) { this->action_kind = 1; } std::string ReplaceComments::evaluate(const std::string &value, Transaction *transaction) { uint64_t i, j, incomment; char *input = reinterpret_cast( malloc(sizeof(char) * value.size() + 1)); memcpy(input, value.c_str(), value.size() + 1); input[value.size()] = '\0'; i = j = incomment = 0; while (i < value.size()) { if (incomment == 0) { if ((input[i] == '/') && (i + 1 < value.size()) && (input[i + 1] == '*')) { incomment = 1; i += 2; } else { input[j] = input[i]; i++; j++; } } else { if ((input[i] == '*') && (i + 1 < value.size()) && (input[i + 1] == '/')) { incomment = 0; i += 2; input[j] = ' '; j++; } else { i++; } } } if (incomment) { input[j++] = ' '; } std::string resp; resp.append(reinterpret_cast(input), j); free(input); return resp; } } // namespace transformations } // namespace actions } // namespace modsecurity modsecurity-v3.0.6/src/actions/transformations/normalise_path.cc0000664000175000017500000001430014146026157026377 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "src/actions/transformations/normalise_path.h" #include #include #include #include #include #include #include #include "modsecurity/transaction.h" #include "src/actions/transformations/transformation.h" namespace modsecurity { namespace actions { namespace transformations { NormalisePath::NormalisePath(const std::string &action) : Transformation(action) { this->action_kind = 1; } std::string NormalisePath::evaluate(const std::string &value, Transaction *transaction) { int changed = 0; char *tmp = reinterpret_cast( malloc(sizeof(char) * value.size() + 1)); memcpy(tmp, value.c_str(), value.size() + 1); tmp[value.size()] = '\0'; int i = normalize_path_inplace((unsigned char *)tmp, value.size(), 0, &changed); std::string ret(""); ret.assign(tmp, i); free(tmp); return ret; } /** * * IMP1 Assumes NUL-terminated */ int NormalisePath::normalize_path_inplace(unsigned char *input, int input_len, int win, int *changed) { unsigned char *src; unsigned char *dst; unsigned char *end; int ldst = 0; int hitroot = 0; int done = 0; int relative; int trailing; *changed = 0; /* Need at least one byte to normalize */ if (input_len <= 0) return 0; /* * ENH: Deal with UNC and drive letters? */ src = dst = input; end = input + (input_len - 1); ldst = 1; relative = ((*input == '/') || (win && (*input == '\\'))) ? 0 : 1; trailing = ((*end == '/') || (win && (*end == '\\'))) ? 1 : 0; while (!done && (src <= end) && (dst <= end)) { /* Convert backslash to forward slash on Windows only. */ if (win) { if (*src == '\\') { *src = '/'; *changed = 1; } if ((src < end) && (*(src + 1) == '\\')) { *(src + 1) = '/'; *changed = 1; } } /* Always normalize at the end of the input. */ if (src == end) { done = 1; } else if (*(src + 1) != '/') { /* Skip normalization if this is NOT the *end of the path segment. */ goto copy; /* Skip normalization. */ } /*** Normalize the path segment. ***/ /* Could it be an empty path segment? */ if ((src != end) && *src == '/') { /* Ignore */ *changed = 1; goto copy; /* Copy will take care of this. */ } else if (*src == '.') { /* Could it be a back or self reference? */ /* Back-reference? */ if ((dst > input) && (*(dst - 1) == '.')) { /* If a relative path and either our normalization has * already hit the rootdir, or this is a backref with no * previous path segment, then mark that the rootdir was hit * and just copy the backref as no normilization is possible. */ if (relative && (hitroot || ((dst - 2) <= input))) { hitroot = 1; goto copy; /* Skip normalization. */ } /* Remove backreference and the previous path segment. */ dst -= 3; while ((dst > input) && (*dst != '/')) { dst--; } /* But do not allow going above rootdir. */ if (dst <= input) { hitroot = 1; dst = input; /* Need to leave the root slash if this * is not a relative path and the end was reached * on a backreference. */ if (!relative && (src == end)) { dst++; } } if (done) goto length; /* Skip the copy. */ src++; *changed = 1; } else if (dst == input) { /* Relative Self-reference? */ *changed = 1; /* Ignore. */ if (done) goto length; /* Skip the copy. */ src++; } else if (*(dst - 1) == '/') { /* Self-reference? */ *changed = 1; /* Ignore. */ if (done) goto length; /* Skip the copy. */ dst--; src++; } } else if (dst > input) { /* Found a regular path segment. */ hitroot = 0; } copy: /*** Copy the byte if required. ***/ /* Skip to the last forward slash when multiple are used. */ if (*src == '/') { unsigned char *oldsrc = src; while ((src < end) && ((*(src + 1) == '/') || (win && (*(src + 1) == '\\'))) ) { src++; } if (oldsrc != src) *changed = 1; /* Do not copy the forward slash to the root * if it is not a relative path. Instead * move over the slash to the next segment. */ if (relative && (dst == input)) { src++; goto length; /* Skip the copy */ } } *(dst++) = *(src++); length: ldst = (dst - input); } /* Make sure that there is not a trailing slash in the * normalized form if there was not one in the original form. */ if (!trailing && (dst > input) && *(dst - 1) == '/') { ldst--; dst--; } /* Always NUL terminate */ *dst = '\0'; return ldst; } } // namespace transformations } // namespace actions } // namespace modsecurity modsecurity-v3.0.6/src/actions/transformations/sql_hex_decode.h0000664000175000017500000000265514146026157026214 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include "modsecurity/actions/action.h" #include "src/actions/transformations/transformation.h" #ifndef SRC_ACTIONS_TRANSFORMATIONS_SQL_HEX_DECODE_H_ #define SRC_ACTIONS_TRANSFORMATIONS_SQL_HEX_DECODE_H_ #ifdef __cplusplus namespace modsecurity { class Transaction; namespace actions { namespace transformations { class SqlHexDecode : public Transformation { public: explicit SqlHexDecode(const std::string &action) : Transformation(action) { } std::string evaluate(const std::string &exp, Transaction *transaction) override; static int inplace(unsigned char *data, int len); static int mytolower(int ch) { if (ch >= 'A' && ch <= 'Z') return ('a' + ch - 'A'); else return ch; } }; } // namespace transformations } // namespace actions } // namespace modsecurity #endif #endif // SRC_ACTIONS_TRANSFORMATIONS_SQL_HEX_DECODE_H_ modsecurity-v3.0.6/src/actions/transformations/normalise_path.h0000664000175000017500000000246114146026157026246 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include "modsecurity/actions/action.h" #include "src/actions/transformations/transformation.h" #ifndef SRC_ACTIONS_TRANSFORMATIONS_NORMALISE_PATH_H_ #define SRC_ACTIONS_TRANSFORMATIONS_NORMALISE_PATH_H_ #ifdef __cplusplus namespace modsecurity { class Transaction; namespace actions { namespace transformations { class NormalisePath : public Transformation { public: explicit NormalisePath(const std::string &action); std::string evaluate(const std::string &exp, Transaction *transaction) override; static int normalize_path_inplace(unsigned char *input, int input_len, int win, int *changed); }; } // namespace transformations } // namespace actions } // namespace modsecurity #endif #endif // SRC_ACTIONS_TRANSFORMATIONS_NORMALISE_PATH_H_ modsecurity-v3.0.6/src/actions/transformations/remove_comments.h0000664000175000017500000000235014146026157026440 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include "modsecurity/actions/action.h" #include "src/actions/transformations/transformation.h" #ifndef SRC_ACTIONS_TRANSFORMATIONS_REMOVE_COMMENTS_H_ #define SRC_ACTIONS_TRANSFORMATIONS_REMOVE_COMMENTS_H_ #ifdef __cplusplus namespace modsecurity { class Transaction; namespace actions { namespace transformations { class RemoveComments : public Transformation { public: explicit RemoveComments(const std::string &action) : Transformation(action) { } std::string evaluate(const std::string &exp, Transaction *transaction) override; }; } // namespace transformations } // namespace actions } // namespace modsecurity #endif #endif // SRC_ACTIONS_TRANSFORMATIONS_REMOVE_COMMENTS_H_ modsecurity-v3.0.6/src/actions/transformations/url_decode.cc0000664000175000017500000000313214146026157025500 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "src/actions/transformations/url_decode.h" #include #include #include #include #include #include #include #include "modsecurity/transaction.h" #include "src/actions/transformations/transformation.h" #include "src/utils/decode.h" namespace modsecurity { namespace actions { namespace transformations { UrlDecode::UrlDecode(const std::string &action) : Transformation(action) { this->action_kind = 1; } std::string UrlDecode::evaluate(const std::string &value, Transaction *transaction) { unsigned char *val(NULL); int invalid_count = 0; int changed; val = (unsigned char *) malloc(sizeof(char) * value.size() + 1); memcpy(val, value.c_str(), value.size() + 1); val[value.size()] = '\0'; int size = utils::urldecode_nonstrict_inplace(val, value.size(), &invalid_count, &changed); std::string out; out.append((const char *)val, size); free(val); return out; } } // namespace transformations } // namespace actions } // namespace modsecurity modsecurity-v3.0.6/src/actions/transformations/replace_nulls.cc0000664000175000017500000000261314146026157026226 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "src/actions/transformations/replace_nulls.h" #include #include #include #include #include #include #include "modsecurity/transaction.h" #include "src/actions/transformations/transformation.h" namespace modsecurity { namespace actions { namespace transformations { ReplaceNulls::ReplaceNulls(const std::string &action) : Transformation(action) { this->action_kind = 1; } std::string ReplaceNulls::evaluate(const std::string &val, Transaction *transaction) { int64_t i; std::string value(val); i = 0; while (i < value.size()) { if (value.at(i) == '\0') { value.erase(i, 1); value.insert(i, " ", 1); } else { i++; } } return value; } } // namespace transformations } // namespace actions } // namespace modsecurity modsecurity-v3.0.6/src/actions/transformations/sql_hex_decode.cc0000664000175000017500000000511014146026157026337 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "src/actions/transformations/sql_hex_decode.h" #include #include #include #include #include #include #include #include "modsecurity/transaction.h" #include "src/actions/transformations/transformation.h" #include "src/utils/string.h" namespace modsecurity { namespace actions { namespace transformations { #ifndef VALID_HEX #define VALID_HEX(X) (((X >= '0') && (X <= '9')) \ || ((X >= 'a') && (X <= 'f')) \ || ((X >= 'A') && (X <= 'F'))) #endif #ifndef ISODIGIT #define ISODIGIT(X) ((X >= '0') && (X <= '7')) #endif std::string SqlHexDecode::evaluate(const std::string &value, Transaction *transaction) { std::string ret; unsigned char *input; int size = 0; input = reinterpret_cast (malloc(sizeof(char) * value.length()+1)); if (input == NULL) { return ""; } memcpy(input, value.c_str(), value.length()+1); size = inplace(input, value.length()); ret.assign(reinterpret_cast(input), size); free(input); return ret; } int SqlHexDecode::inplace(unsigned char *data, int len) { unsigned char *d, *begin = data; int count = 0; if ((data == NULL) || (len == 0)) { return 0; } for (d = data; (++count < len) && *data; *d++ = *data++) { if (*data != '0') { continue; } ++data; ++count; if (mytolower(*data) != 'x') { data--; count--; continue; } data++; ++count; // Do we need to keep "0x" if no hexa after? if (!VALID_HEX(data[0]) || !VALID_HEX(data[1])) { data -= 2; count -= 2; continue; } while (VALID_HEX(data[0]) && VALID_HEX(data[1])) { *d++ = utils::string::x2c(data); data += 2; count += 2; } } *d = '\0'; return strlen(reinterpret_cast(begin)); } } // namespace transformations } // namespace actions } // namespace modsecurity modsecurity-v3.0.6/src/actions/transformations/css_decode.cc0000664000175000017500000001466214146026157025500 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "src/actions/transformations/css_decode.h" #include #include #include #include #include #include #include #include "modsecurity/transaction.h" #include "src/actions/transformations/transformation.h" #include "src/utils/string.h" namespace modsecurity { namespace actions { namespace transformations { std::string CssDecode::evaluate(const std::string &value, Transaction *transaction) { char *tmp = reinterpret_cast( malloc(sizeof(char) * value.size() + 1)); memcpy(tmp, value.c_str(), value.size() + 1); tmp[value.size()] = '\0'; CssDecode::css_decode_inplace(reinterpret_cast(tmp), value.size()); std::string ret(tmp, 0, value.size()); free(tmp); return ret; } /** * Decode a string that contains CSS-escaped characters. * * References: * http://www.w3.org/TR/REC-CSS2/syndata.html#q4 * http://www.unicode.org/roadmaps/ */ int CssDecode::css_decode_inplace(unsigned char *input, int64_t input_len) { unsigned char *d = (unsigned char *)input; int64_t i, j, count; if (input == NULL) { return -1; } i = count = 0; while (i < input_len) { /* Is the character a backslash? */ if (input[i] == '\\') { /* Is there at least one more byte? */ if (i + 1 < input_len) { i++; /* We are not going to need the backslash. */ /* Check for 1-6 hex characters following the backslash */ j = 0; while ((j < 6) && (i + j < input_len) && (VALID_HEX(input[i + j]))) { j++; } if (j > 0) { /* We have at least one valid hexadecimal character. */ int fullcheck = 0; /* For now just use the last two bytes. */ switch (j) { /* Number of hex characters */ case 1: *d++ = utils::string::xsingle2c(&input[i]); break; case 2: case 3: /* Use the last two from the end. */ *d++ = utils::string::x2c(&input[i + j - 2]); break; case 4: /* Use the last two from the end, but request * a full width check. */ *d = utils::string::x2c(&input[i + j - 2]); fullcheck = 1; break; case 5: /* Use the last two from the end, but request * a full width check if the number is greater * or equal to 0xFFFF. */ *d = utils::string::x2c(&input[i + j - 2]); /* Do full check if first byte is 0 */ if (input[i] == '0') { fullcheck = 1; } else { d++; } break; case 6: /* Use the last two from the end, but request * a full width check if the number is greater * or equal to 0xFFFF. */ *d = utils::string::x2c(&input[i + j - 2]); /* Do full check if first/second bytes are 0 */ if ((input[i] == '0') && (input[i + 1] == '0')) { fullcheck = 1; } else { d++; } break; } /* Full width ASCII (0xff01 - 0xff5e) needs 0x20 added */ if (fullcheck) { if ((*d > 0x00) && (*d < 0x5f) && ((input[i + j - 3] == 'f') || (input[i + j - 3] == 'F')) && ((input[i + j - 4] == 'f') || (input[i + j - 4] == 'F'))) { (*d) += 0x20; } d++; } /* We must ignore a single whitespace after a hex escape */ if ((i + j < input_len) && isspace(input[i + j])) { j++; } /* Move over. */ count++; i += j; } else if (input[i] == '\n') { /* No hexadecimal digits after backslash */ /* A newline character following backslash is ignored. */ i++; } else { /* The character after backslash is not a hexadecimal digit, * nor a newline. */ /* Use one character after backslash as is. */ *d++ = input[i++]; count++; } } else { /* No characters after backslash. */ /* Do not include backslash in output *(continuation to nothing) */ i++; } } else { /* Character is not a backslash. */ /* Copy one normal character to output. */ *d++ = input[i++]; count++; } } /* Terminate output string. */ *d = '\0'; return count; } } // namespace transformations } // namespace actions } // namespace modsecurity modsecurity-v3.0.6/src/actions/transformations/hex_encode.cc0000664000175000017500000000260314146026157025476 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "src/actions/transformations/hex_encode.h" #include #include #include #include #include #include #include #include "modsecurity/transaction.h" #include "src/actions/transformations/transformation.h" namespace modsecurity { namespace actions { namespace transformations { HexEncode::HexEncode(const std::string &action) : Transformation(action) { this->action_kind = 1; } std::string HexEncode::evaluate(const std::string &value, Transaction *transaction) { std::stringstream result; for (std::size_t i=0; i < value.length(); i++) { unsigned int ii = (unsigned char)(value[i]); result << std::setw(2) << std::setfill('0') << std::hex << ii; } return result.str(); } } // namespace transformations } // namespace actions } // namespace modsecurity modsecurity-v3.0.6/src/actions/transformations/base64_encode.h0000664000175000017500000000233414146026157025641 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include "modsecurity/actions/action.h" #include "src/actions/transformations/transformation.h" #ifndef SRC_ACTIONS_TRANSFORMATIONS_BASE64_ENCODE_H_ #define SRC_ACTIONS_TRANSFORMATIONS_BASE64_ENCODE_H_ #ifdef __cplusplus namespace modsecurity { class Transaction; namespace actions { namespace transformations { class Base64Encode : public Transformation { public: explicit Base64Encode(const std::string &action) : Transformation(action) { } std::string evaluate(const std::string &exp, Transaction *transaction) override; }; } // namespace transformations } // namespace actions } // namespace modsecurity #endif #endif // SRC_ACTIONS_TRANSFORMATIONS_BASE64_ENCODE_H_ modsecurity-v3.0.6/src/actions/transformations/parity_zero_7bit.h0000664000175000017500000000244414146026157026536 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include "modsecurity/actions/action.h" #include "src/actions/transformations/transformation.h" #ifndef SRC_ACTIONS_TRANSFORMATIONS_PARITY_ZERO_7BIT_H_ #define SRC_ACTIONS_TRANSFORMATIONS_PARITY_ZERO_7BIT_H_ #ifdef __cplusplus namespace modsecurity { class Transaction; namespace actions { namespace transformations { class ParityZero7bit : public Transformation { public: explicit ParityZero7bit(const std::string &action) : Transformation(action) { } std::string evaluate(const std::string &exp, Transaction *transaction) override; static bool inplace(unsigned char *input, uint64_t input_len); }; } // namespace transformations } // namespace actions } // namespace modsecurity #endif #endif // SRC_ACTIONS_TRANSFORMATIONS_PARITY_ZERO_7BIT_H_ modsecurity-v3.0.6/src/actions/transformations/normalise_path_win.cc0000664000175000017500000000300714146026157027256 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "src/actions/transformations/normalise_path_win.h" #include #include #include #include #include #include #include #include "modsecurity/transaction.h" #include "src/actions/transformations/transformation.h" #include "src/actions/transformations/normalise_path.h" namespace modsecurity { namespace actions { namespace transformations { std::string NormalisePathWin::evaluate(const std::string &value, Transaction *transaction) { int changed; char *tmp = reinterpret_cast( malloc(sizeof(char) * value.size() + 1)); memcpy(tmp, value.c_str(), value.size() + 1); tmp[value.size()] = '\0'; int i = NormalisePath::normalize_path_inplace( reinterpret_cast(tmp), value.size(), 1, &changed); std::string ret(""); ret.assign(tmp, i); free(tmp); return ret; } } // namespace transformations } // namespace actions } // namespace modsecurity modsecurity-v3.0.6/src/actions/transformations/md5.cc0000664000175000017500000000214214146026157024060 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "src/actions/transformations/md5.h" #include #include #include #include #include #include #include "modsecurity/transaction.h" #include "src/actions/transformations/transformation.h" #include "src/utils/md5.h" namespace modsecurity { namespace actions { namespace transformations { std::string Md5::evaluate(const std::string &value, Transaction *transaction) { std::string ret = Utils::Md5::digest(value); return ret; } } // namespace transformations } // namespace actions } // namespace modsecurity modsecurity-v3.0.6/src/actions/transformations/remove_comments_char.h0000664000175000017500000000234014146026157027434 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include "modsecurity/actions/action.h" #include "src/actions/transformations/transformation.h" #ifndef SRC_ACTIONS_TRANSFORMATIONS_REMOVE_COMMENTS_CHAR_H_ #define SRC_ACTIONS_TRANSFORMATIONS_REMOVE_COMMENTS_CHAR_H_ #ifdef __cplusplus namespace modsecurity { class Transaction; namespace actions { namespace transformations { class RemoveCommentsChar : public Transformation { public: explicit RemoveCommentsChar(const std::string &action); std::string evaluate(const std::string &exp, Transaction *transaction) override; }; } // namespace transformations } // namespace actions } // namespace modsecurity #endif #endif // SRC_ACTIONS_TRANSFORMATIONS_REMOVE_COMMENTS_CHAR_H_ modsecurity-v3.0.6/src/actions/transformations/trim_right.cc0000664000175000017500000000233014146026157025542 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "src/actions/transformations/trim_right.h" #include #include #include #include #include #include #include "modsecurity/transaction.h" #include "src/actions/transformations/transformation.h" #include "modsecurity/actions/action.h" namespace modsecurity { namespace actions { namespace transformations { TrimRight::TrimRight(const std::string &action) : Trim(action) { this->action_kind = 1; } std::string TrimRight::evaluate(const std::string &val, Transaction *transaction) { std::string value(val); return *this->rtrim(&value); } } // namespace transformations } // namespace actions } // namespace modsecurity modsecurity-v3.0.6/src/actions/transformations/normalise_path_win.h0000664000175000017500000000234214146026157027121 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include "modsecurity/actions/action.h" #include "src/actions/transformations/transformation.h" #ifndef SRC_ACTIONS_TRANSFORMATIONS_NORMALISE_PATH_WIN_H_ #define SRC_ACTIONS_TRANSFORMATIONS_NORMALISE_PATH_WIN_H_ namespace modsecurity { class Transaction; namespace actions { namespace transformations { class NormalisePathWin : public Transformation { public: explicit NormalisePathWin(const std::string &action) : Transformation(action) { } std::string evaluate(const std::string &exp, Transaction *transaction) override; }; } // namespace transformations } // namespace actions } // namespace modsecurity #endif // SRC_ACTIONS_TRANSFORMATIONS_NORMALISE_PATH_WIN_H_ modsecurity-v3.0.6/src/actions/transformations/base64_decode_ext.cc0000664000175000017500000000221414146026157026642 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "src/actions/transformations/base64_decode_ext.h" #include #include #include #include #include #include #include "modsecurity/transaction.h" #include "src/actions/transformations/transformation.h" #include "src/utils/base64.h" namespace modsecurity { namespace actions { namespace transformations { std::string Base64DecodeExt::evaluate(const std::string &value, Transaction *transaction) { std::string ret = Utils::Base64::decode_forgiven(value); return ret; } } // namespace transformations } // namespace actions } // namespace modsecurity modsecurity-v3.0.6/src/actions/transformations/hex_encode.h0000664000175000017500000000226114146026157025340 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include "modsecurity/actions/action.h" #include "src/actions/transformations/transformation.h" #ifndef SRC_ACTIONS_TRANSFORMATIONS_HEX_ENCODE_H_ #define SRC_ACTIONS_TRANSFORMATIONS_HEX_ENCODE_H_ #ifdef __cplusplus namespace modsecurity { class Transaction; namespace actions { namespace transformations { class HexEncode : public Transformation { public: explicit HexEncode(const std::string &action); std::string evaluate(const std::string &exp, Transaction *transaction) override; }; } // namespace transformations } // namespace actions } // namespace modsecurity #endif #endif // SRC_ACTIONS_TRANSFORMATIONS_HEX_ENCODE_H_ modsecurity-v3.0.6/src/actions/transformations/trim_left.h0000664000175000017500000000232014146026157025220 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include "modsecurity/actions/action.h" #include "src/actions/transformations/transformation.h" #include "src/actions/transformations/trim.h" #ifndef SRC_ACTIONS_TRANSFORMATIONS_TRIM_LEFT_H_ #define SRC_ACTIONS_TRANSFORMATIONS_TRIM_LEFT_H_ #ifdef __cplusplus namespace modsecurity { class Transaction; namespace actions { namespace transformations { class TrimLeft : public Trim { public: explicit TrimLeft(const std::string &action) ; std::string evaluate(const std::string &exp, Transaction *transaction) override; }; } // namespace transformations } // namespace actions } // namespace modsecurity #endif #endif // SRC_ACTIONS_TRANSFORMATIONS_TRIM_LEFT_H_ modsecurity-v3.0.6/src/actions/transformations/sha1.cc0000664000175000017500000000225614146026157024235 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "src/actions/transformations/sha1.h" #include #include #include #include #include #include #include "modsecurity/transaction.h" #include "src/actions/transformations/transformation.h" #include "src/utils/sha1.h" namespace modsecurity { namespace actions { namespace transformations { Sha1::Sha1(const std::string &action) : Transformation(action) { this->action_kind = 1; } std::string Sha1::evaluate(const std::string &value, Transaction *transaction) { return Utils::Sha1::digest(value); } } // namespace transformations } // namespace actions } // namespace modsecurity modsecurity-v3.0.6/src/actions/transformations/css_decode.h0000664000175000017500000000244314146026157025334 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include "modsecurity/actions/action.h" #include "src/actions/transformations/transformation.h" #ifndef SRC_ACTIONS_TRANSFORMATIONS_CSS_DECODE_H_ #define SRC_ACTIONS_TRANSFORMATIONS_CSS_DECODE_H_ #ifdef __cplusplus namespace modsecurity { class Transaction; namespace actions { namespace transformations { class CssDecode : public Transformation { public: explicit CssDecode(const std::string &action) : Transformation(action) { } std::string evaluate(const std::string &exp, Transaction *transaction) override; static int css_decode_inplace(unsigned char *input, int64_t input_len); }; } // namespace transformations } // namespace actions } // namespace modsecurity #endif #endif // SRC_ACTIONS_TRANSFORMATIONS_CSS_DECODE_H_ modsecurity-v3.0.6/src/actions/transformations/escape_seq_decode.cc0000664000175000017500000001073114146026157027011 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "src/actions/transformations/escape_seq_decode.h" #include #include #include #include #include #include #include #include "modsecurity/transaction.h" #include "src/actions/transformations/transformation.h" #include "src/utils/string.h" namespace modsecurity { namespace actions { namespace transformations { EscapeSeqDecode::EscapeSeqDecode(const std::string &action) : Transformation(action) { this->action_kind = 1; } int EscapeSeqDecode::ansi_c_sequences_decode_inplace(unsigned char *input, int input_len) { unsigned char *d = input; int i, count; i = count = 0; while (i < input_len) { if ((input[i] == '\\') && (i + 1 < input_len)) { int c = -1; switch (input[i + 1]) { case 'a' : c = '\a'; break; case 'b' : c = '\b'; break; case 'f' : c = '\f'; break; case 'n' : c = '\n'; break; case 'r' : c = '\r'; break; case 't' : c = '\t'; break; case 'v' : c = '\v'; break; case '\\' : c = '\\'; break; case '?' : c = '?'; break; case '\'' : c = '\''; break; case '"' : c = '"'; break; } if (c != -1) i += 2; /* Hexadecimal or octal? */ if (c == -1) { if ((input[i + 1] == 'x') || (input[i + 1] == 'X')) { /* Hexadecimal. */ if ((i + 3 < input_len) && (isxdigit(input[i + 2])) && (isxdigit(input[i + 3]))) { /* Two digits. */ c = utils::string::x2c(&input[i + 2]); i += 4; } else { /* Invalid encoding, do nothing. */ } } else { if (ISODIGIT(input[i + 1])) { /* Octal. */ char buf[4]; int j = 0; while ((i + 1 + j < input_len) && (j < 3)) { buf[j] = input[i + 1 + j]; j++; if (!ISODIGIT(input[i + 1 + j])) break; } buf[j] = '\0'; if (j > 0) { c = strtol(buf, NULL, 8); i += 1 + j; } } } } if (c == -1) { /* Didn't recognise encoding, copy raw bytes. */ *d++ = input[i + 1]; count++; i += 2; } else { /* Converted the encoding. */ *d++ = c; count++; } } else { /* Input character not a backslash, copy it. */ *d++ = input[i++]; count++; } } *d = '\0'; return count; } std::string EscapeSeqDecode::evaluate(const std::string &value, Transaction *transaction) { unsigned char *tmp = (unsigned char *) malloc(sizeof(char) * value.size() + 1); memcpy(tmp, value.c_str(), value.size() + 1); tmp[value.size()] = '\0'; int size = ansi_c_sequences_decode_inplace(tmp, value.size()); std::string ret(""); ret.assign(reinterpret_cast(tmp), size); free(tmp); return ret; } } // namespace transformations } // namespace actions } // namespace modsecurity modsecurity-v3.0.6/src/actions/transformations/url_decode_uni.cc0000664000175000017500000001436514146026157026365 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "src/actions/transformations/url_decode_uni.h" #include #include #include #include #include #include #include #include #include "modsecurity/rules_set_properties.h" #include "modsecurity/rules_set.h" #include "modsecurity/transaction.h" #include "src/actions/transformations/transformation.h" #include "src/utils/string.h" #include "src/utils/system.h" namespace modsecurity { namespace actions { namespace transformations { std::string UrlDecodeUni::evaluate(const std::string &value, Transaction *t) { std::string ret; unsigned char *input; input = reinterpret_cast (malloc(sizeof(char) * value.length()+1)); if (input == NULL) { return ""; } memcpy(input, value.c_str(), value.length()+1); size_t i = inplace(input, value.length(), t); ret.assign(reinterpret_cast(input), i); free(input); return ret; } /** * * IMP1 Assumes NUL-terminated */ int UrlDecodeUni::inplace(unsigned char *input, uint64_t input_len, Transaction *t) { unsigned char *d = input; int64_t i, count, fact, j, xv; int Code, hmap = -1; if (input == NULL) return -1; i = count = 0; while (i < input_len) { if (input[i] == '%') { if ((i + 1 < input_len) && ((input[i + 1] == 'u') || (input[i + 1] == 'U'))) { /* Character is a percent sign. */ /* IIS-specific %u encoding. */ if (i + 5 < input_len) { /* We have at least 4 data bytes. */ if ((VALID_HEX(input[i + 2])) && (VALID_HEX(input[i + 3])) && (VALID_HEX(input[i + 4])) && (VALID_HEX(input[i + 5]))) { Code = 0; fact = 1; if (t && t->m_rules->m_unicodeMapTable.m_set == true && t->m_rules->m_unicodeMapTable.m_unicodeMapTable != NULL && t->m_rules->m_unicodeMapTable.m_unicodeCodePage > 0) { for (j = 5; j >= 2; j--) { if (isxdigit((input[i+j]))) { if (input[i+j] >= 97) { xv = (input[i+j] - 97) + 10; } else if (input[i+j] >= 65) { xv = (input[i+j] - 65) + 10; } else { xv = (input[i+j]) - 48; } Code += (xv * fact); fact *= 16; } } if (Code >= 0 && Code <= 65535) { RulesSet *r = t->m_rules; hmap = r->m_unicodeMapTable.m_unicodeMapTable->at(Code); } } if (hmap != -1) { *d = hmap; } else { /* We first make use of the lower byte here, * ignoring the higher byte. */ *d = utils::string::x2c(&input[i + 4]); /* Full width ASCII (ff01 - ff5e) * needs 0x20 added */ if ((*d > 0x00) && (*d < 0x5f) && ((input[i + 2] == 'f') || (input[i + 2] == 'F')) && ((input[i + 3] == 'f') || (input[i + 3] == 'F'))) { (*d) += 0x20; } } d++; count++; i += 6; } else { /* Invalid data, skip %u. */ *d++ = input[i++]; *d++ = input[i++]; count += 2; } } else { /* Not enough bytes (4 data bytes), skip %u. */ *d++ = input[i++]; *d++ = input[i++]; count += 2; } } else { /* Standard URL encoding. */ /* Are there enough bytes available? */ if (i + 2 < input_len) { /* Yes. */ /* Decode a %xx combo only if it is valid. */ char c1 = input[i + 1]; char c2 = input[i + 2]; if (VALID_HEX(c1) && VALID_HEX(c2)) { *d++ = utils::string::x2c(&input[i + 1]); count++; i += 3; } else { /* Not a valid encoding, skip this % */ *d++ = input[i++]; count++; } } else { /* Not enough bytes available, skip this % */ *d++ = input[i++]; count++; } } } else { /* Character is not a percent sign. */ if (input[i] == '+') { *d++ = ' '; } else { *d++ = input[i]; } count++; i++; } } *d = '\0'; return count; } } // namespace transformations } // namespace actions } // namespace modsecurity modsecurity-v3.0.6/src/actions/transformations/compress_whitespace.h0000664000175000017500000000233714146026157027312 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include "modsecurity/actions/action.h" #include "src/actions/transformations/transformation.h" #ifndef SRC_ACTIONS_TRANSFORMATIONS_COMPRESS_WHITESPACE_H_ #define SRC_ACTIONS_TRANSFORMATIONS_COMPRESS_WHITESPACE_H_ #ifdef __cplusplus namespace modsecurity { class Transaction; namespace actions { namespace transformations { class CompressWhitespace : public Transformation { public: explicit CompressWhitespace(const std::string &action) ; std::string evaluate(const std::string &exp, Transaction *transaction) override; }; } // namespace transformations } // namespace actions } // namespace modsecurity #endif #endif // SRC_ACTIONS_TRANSFORMATIONS_COMPRESS_WHITESPACE_H_ modsecurity-v3.0.6/src/actions/transformations/trim_right.h0000664000175000017500000000232514146026157025410 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include "modsecurity/actions/action.h" #include "src/actions/transformations/transformation.h" #include "src/actions/transformations/trim.h" #ifndef SRC_ACTIONS_TRANSFORMATIONS_TRIM_RIGHT_H_ #define SRC_ACTIONS_TRANSFORMATIONS_TRIM_RIGHT_H_ #ifdef __cplusplus namespace modsecurity { class Transaction; namespace actions { namespace transformations { class TrimRight : public Trim { public: explicit TrimRight(const std::string &action) ; std::string evaluate(const std::string &exp, Transaction *transaction) override; }; } // namespace transformations } // namespace actions } // namespace modsecurity #endif #endif // SRC_ACTIONS_TRANSFORMATIONS_TRIM_RIGHT_H_ modsecurity-v3.0.6/src/actions/transformations/remove_whitespace.h0000664000175000017500000000232314146026157026747 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include "modsecurity/actions/action.h" #include "src/actions/transformations/transformation.h" #ifndef SRC_ACTIONS_TRANSFORMATIONS_REMOVE_WHITESPACE_H_ #define SRC_ACTIONS_TRANSFORMATIONS_REMOVE_WHITESPACE_H_ #ifdef __cplusplus namespace modsecurity { class Transaction; namespace actions { namespace transformations { class RemoveWhitespace : public Transformation { public: explicit RemoveWhitespace(const std::string &action); std::string evaluate(const std::string &exp, Transaction *transaction) override; }; } // namespace transformations } // namespace actions } // namespace modsecurity #endif #endif // SRC_ACTIONS_TRANSFORMATIONS_REMOVE_WHITESPACE_H_ modsecurity-v3.0.6/src/actions/transformations/length.h0000664000175000017500000000223714146026157024523 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include "modsecurity/actions/action.h" #include "src/actions/transformations/transformation.h" #ifndef SRC_ACTIONS_TRANSFORMATIONS_LENGTH_H_ #define SRC_ACTIONS_TRANSFORMATIONS_LENGTH_H_ #ifdef __cplusplus namespace modsecurity { class Transaction; namespace actions { namespace transformations { class Length : public Transformation { public: explicit Length(const std::string &action); std::string evaluate(const std::string &exp, Transaction *transaction) override; }; } // namespace transformations } // namespace actions } // namespace modsecurity #endif #endif // SRC_ACTIONS_TRANSFORMATIONS_LENGTH_H_ modsecurity-v3.0.6/src/actions/transformations/parity_odd_7bit.cc0000664000175000017500000000347714146026157026472 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "src/actions/transformations/parity_odd_7bit.h" #include #include #include #include #include #include #include #include "modsecurity/transaction.h" #include "src/actions/transformations/transformation.h" namespace modsecurity { namespace actions { namespace transformations { std::string ParityOdd7bit::evaluate(const std::string &value, Transaction *transaction) { std::string ret; unsigned char *input; input = reinterpret_cast (malloc(sizeof(char) * value.length()+1)); if (input == NULL) { return ""; } memcpy(input, value.c_str(), value.length()+1); inplace(input, value.length()); ret.assign(reinterpret_cast(input), value.length()); free(input); return ret; } bool ParityOdd7bit::inplace(unsigned char *input, uint64_t input_len) { uint64_t i; i = 0; while (i < input_len) { unsigned int x = input[i]; input[i] ^= input[i] >> 4; input[i] &= 0xf; if ((0x6996 >> input[i]) & 1) { input[i] = x & 0x7f; } else { input[i] = x | 0x80; } i++; } return true; } } // namespace transformations } // namespace actions } // namespace modsecurity modsecurity-v3.0.6/src/actions/transformations/upper_case.h0000664000175000017500000000231314146026157025363 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include #include "modsecurity/actions/action.h" #include "src/actions/transformations/transformation.h" #ifndef SRC_ACTIONS_TRANSFORMATIONS_UPPER_CASE_H_ #define SRC_ACTIONS_TRANSFORMATIONS_UPPER_CASE_H_ #ifdef __cplusplus namespace modsecurity { class Transaction; namespace actions { namespace transformations { class UpperCase : public Transformation { public: explicit UpperCase(const std::string &action) ; std::string evaluate(const std::string &exp, Transaction *transaction) override; }; } // namespace transformations } // namespace actions } // namespace modsecurity #endif #endif // SRC_ACTIONS_TRANSFORMATIONS_UPPER_CASE_H_ modsecurity-v3.0.6/src/actions/transformations/utf8_to_unicode.cc0000664000175000017500000002463014146026157026477 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "src/actions/transformations/utf8_to_unicode.h" #include #include #include #include #include #include #include #include "modsecurity/transaction.h" #include "src/actions/transformations/transformation.h" #include "src/utils/string.h" namespace modsecurity { namespace actions { namespace transformations { std::string Utf8ToUnicode::evaluate(const std::string &value, Transaction *transaction) { std::string ret; unsigned char *input; int changed = 0; char *out; input = reinterpret_cast (malloc(sizeof(char) * value.length()+1)); if (input == NULL) { return ""; } memcpy(input, value.c_str(), value.length()+1); out = inplace(input, value.size() + 1, &changed); free(input); if (out != NULL) { ret.assign(reinterpret_cast(out), strlen(reinterpret_cast(out))); free(out); } return ret; } char *Utf8ToUnicode::inplace(unsigned char *input, uint64_t input_len, int *changed) { unsigned int count = 0; char *data; char *data_orig; unsigned int i, len, j; unsigned int bytes_left = input_len; unsigned char unicode[8]; *changed = 0; /* RFC3629 states that UTF-8 are encoded using sequences of 1 to 4 octets. */ /* Max size per character should fit in 4 bytes */ len = input_len * 4 + 1; data = reinterpret_cast(malloc(sizeof(char) * len)); if (data == NULL) { return NULL; } data_orig = data; if (input == NULL) { free(data); return NULL; } for (i = 0; i < bytes_left;) { int unicode_len = 0; unsigned int d = 0; unsigned char c; unsigned char *utf = (unsigned char *)&input[i]; c = *utf; /* If first byte begins with binary 0 it is single byte encoding */ if ((c & 0x80) == 0) { /* single byte unicode (7 bit ASCII equivilent) has no validation */ count++; if (count <= len) { if (c == 0 && input_len > i + 1) { unsigned char z[2]; z[0] = *utf; z[1] = *(utf + 1); *data = utils::string::x2c((unsigned char*) &z); } else { *data++ = c; } } } else if ((c & 0xE0) == 0xC0) { /* If first byte begins with binary 110 it is two byte encoding*/ /* check we have at least two bytes */ if (bytes_left < 2) { /* check second byte starts with binary 10 */ unicode_len = UNICODE_ERROR_CHARACTERS_MISSING; } else if (((*(utf + 1)) & 0xC0) != 0x80) { unicode_len = UNICODE_ERROR_INVALID_ENCODING; } else { unicode_len = 2; count+=6; if (count <= len) { int length = 0; /* compute character number */ d = ((c & 0x1F) << 6) | (*(utf + 1) & 0x3F); *data++ = '%'; *data++ = 'u'; snprintf(reinterpret_cast(unicode), sizeof(reinterpret_cast(unicode)), "%x", d); length = strlen(reinterpret_cast(unicode)); switch (length) { case 1: *data++ = '0'; *data++ = '0'; *data++ = '0'; break; case 2: *data++ = '0'; *data++ = '0'; break; case 3: *data++ = '0'; break; case 4: case 5: break; } for (j = 0; j < length; j++) { *data++ = unicode[j]; } *changed = 1; } } } else if ((c & 0xF0) == 0xE0) { /* If first byte begins with binary 1110 it is three byte encoding */ /* check we have at least three bytes */ if (bytes_left < 3) { /* check second byte starts with binary 10 */ unicode_len = UNICODE_ERROR_CHARACTERS_MISSING; } else if (((*(utf + 1)) & 0xC0) != 0x80) { /* check third byte starts with binary 10 */ unicode_len = UNICODE_ERROR_INVALID_ENCODING; } else if (((*(utf + 2)) & 0xC0) != 0x80) { unicode_len = UNICODE_ERROR_INVALID_ENCODING; } else { unicode_len = 3; count+=6; if (count <= len) { int length = 0; /* compute character number */ d = ((c & 0x0F) << 12) | ((*(utf + 1) & 0x3F) << 6) | (*(utf + 2) & 0x3F); *data++ = '%'; *data++ = 'u'; snprintf(reinterpret_cast(unicode), sizeof(reinterpret_cast(unicode)), "%x", d); length = strlen(reinterpret_cast(unicode)); switch (length) { case 1: *data++ = '0'; *data++ = '0'; *data++ = '0'; break; case 2: *data++ = '0'; *data++ = '0'; break; case 3: *data++ = '0'; break; case 4: case 5: break; } for (j = 0; j < length; j++) { *data++ = unicode[j]; } *changed = 1; } } } else if ((c & 0xF8) == 0xF0) { /* If first byte begins with binary 11110 it * is four byte encoding */ /* restrict characters to UTF-8 range (U+0000 - U+10FFFF) */ if (c >= 0xF5) { *data++ = c; } /* check we have at least four bytes */ if (bytes_left < 4) { /* check second byte starts with binary 10 */ unicode_len = UNICODE_ERROR_CHARACTERS_MISSING; } else if (((*(utf + 1)) & 0xC0) != 0x80) { /* check third byte starts with binary 10 */ unicode_len = UNICODE_ERROR_INVALID_ENCODING; } else if (((*(utf + 2)) & 0xC0) != 0x80) { /* check forth byte starts with binary 10 */ unicode_len = UNICODE_ERROR_INVALID_ENCODING; } else if (((*(utf + 3)) & 0xC0) != 0x80) { unicode_len = UNICODE_ERROR_INVALID_ENCODING; } else { unicode_len = 4; count+=7; if (count <= len) { int length = 0; /* compute character number */ d = ((c & 0x07) << 18) | ((*(utf + 1) & 0x3F) << 12) | ((*(utf + 2) & 0x3F) << 6) | (*(utf + 3) & 0x3F); *data++ = '%'; *data++ = 'u'; snprintf(reinterpret_cast(unicode), sizeof(reinterpret_cast(unicode)), "%x", d); length = strlen(reinterpret_cast(unicode)); switch (length) { case 1: *data++ = '0'; *data++ = '0'; *data++ = '0'; break; case 2: *data++ = '0'; *data++ = '0'; break; case 3: *data++ = '0'; break; case 4: case 5: break; } for (j = 0; j < length; j++) { *data++ = unicode[j]; } *changed = 1; } } } else { /* any other first byte is invalid (RFC 3629) */ count++; if (count <= len) *data++ = c; } /* invalid UTF-8 character number range (RFC 3629) */ if ((d >= 0xD800) && (d <= 0xDFFF)) { count++; if (count <= len) *data++ = c; } /* check for overlong */ if ((unicode_len == 4) && (d < 0x010000)) { /* four byte could be represented with less bytes */ count++; if (count <= len) *data++ = c; } else if ((unicode_len == 3) && (d < 0x0800)) { /* three byte could be represented with less bytes */ count++; if (count <= len) *data++ = c; } else if ((unicode_len == 2) && (d < 0x80)) { /* two byte could be represented with less bytes */ count++; if (count <= len) *data++ = c; } if (unicode_len > 0) { i += unicode_len; } else { i++; } } *data ='\0'; return data_orig; } } // namespace transformations } // namespace actions } // namespace modsecurity modsecurity-v3.0.6/src/actions/transformations/utf8_to_unicode.h0000664000175000017500000000302114146026157026330 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include "modsecurity/actions/action.h" #include "src/actions/transformations/transformation.h" #ifndef SRC_ACTIONS_TRANSFORMATIONS_UTF8_TO_UNICODE_H_ #define SRC_ACTIONS_TRANSFORMATIONS_UTF8_TO_UNICODE_H_ #define UNICODE_ERROR_CHARACTERS_MISSING -1 #define UNICODE_ERROR_INVALID_ENCODING -2 #define UNICODE_ERROR_OVERLONG_CHARACTER -3 #define UNICODE_ERROR_RESTRICTED_CHARACTER -4 #define UNICODE_ERROR_DECODING_ERROR -5 namespace modsecurity { class Transaction; namespace actions { namespace transformations { class Utf8ToUnicode : public Transformation { public: explicit Utf8ToUnicode(const std::string &action) : Transformation(action) { } std::string evaluate(const std::string &exp, Transaction *transaction) override; static char *inplace(unsigned char *input, uint64_t input_len, int *changed); }; } // namespace transformations } // namespace actions } // namespace modsecurity #endif // SRC_ACTIONS_TRANSFORMATIONS_UTF8_TO_UNICODE_H_ modsecurity-v3.0.6/src/actions/transformations/base64_encode.cc0000664000175000017500000000217414146026157026001 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "src/actions/transformations/base64_encode.h" #include #include #include #include #include #include #include "modsecurity/transaction.h" #include "src/actions/transformations/transformation.h" #include "src/utils/base64.h" namespace modsecurity { namespace actions { namespace transformations { std::string Base64Encode::evaluate(const std::string &value, Transaction *transaction) { std::string ret = Utils::Base64::encode(value); return ret; } } // namespace transformations } // namespace actions } // namespace modsecurity modsecurity-v3.0.6/src/actions/transformations/trim.cc0000664000175000017500000000331714146026157024353 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "src/actions/transformations/trim.h" #include #include #include #include #include #include #include "modsecurity/transaction.h" #include "src/actions/transformations/transformation.h" #include "modsecurity/actions/action.h" namespace modsecurity { namespace actions { namespace transformations { std::string *Trim::ltrim(std::string *s) { s->erase( s->begin(), std::find_if(s->begin(), s->end(), [](unsigned char c) { return !std::isspace(c); }) ); return s; } std::string *Trim::rtrim(std::string *s) { s->erase( std::find_if(s->rbegin(), s->rend(), [](unsigned char c) { return !std::isspace(c); }).base(), s->end() ); return s; } std::string *Trim::trim(std::string *s) { return ltrim(rtrim(s)); } Trim::Trim(const std::string &action) : Transformation(action) { this->action_kind = 1; } std::string Trim::evaluate(const std::string &val, Transaction *transaction) { std::string value(val); return *this->trim(&value); } } // namespace transformations } // namespace actions } // namespace modsecurity modsecurity-v3.0.6/src/actions/transformations/url_encode.cc0000664000175000017500000000460214146026157025515 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "src/actions/transformations/url_encode.h" #include #include #include #include #include #include #include "modsecurity/transaction.h" #include "src/actions/transformations/transformation.h" #include "src/utils/string.h" namespace modsecurity { namespace actions { namespace transformations { UrlEncode::UrlEncode(const std::string &action) : Transformation(action) { this->action_kind = 1; } std::string UrlEncode::url_enc(const char *input, unsigned int input_len, int *changed) { char *rval, *d; unsigned int i, len; int count = 0; *changed = 0; len = input_len * 3 + 1; d = rval = reinterpret_cast(malloc(len)); if (rval == NULL) { return NULL; } /* ENH Only encode the characters that really need to be encoded. */ for (i = 0; i < input_len; i++) { unsigned char c = input[i]; if (c == ' ') { *d++ = '+'; *changed = 1; count++; } else { if ( (c == 42) || ((c >= 48) && (c <= 57)) || ((c >= 65) && (c <= 90)) || ((c >= 97) && (c <= 122))) { *d++ = c; count++; } else { *d++ = '%'; count++; utils::string::c2x(c, (unsigned char *)d); d += 2; count++; count++; *changed = 1; } } } *d = '\0'; std::string ret(""); ret.append(rval, count); free(rval); return ret; } std::string UrlEncode::evaluate(const std::string &value, Transaction *transaction) { int changed; std::string ret = url_enc(value.c_str(), value.size(), &changed); return ret; } } // namespace transformations } // namespace actions } // namespace modsecurity modsecurity-v3.0.6/src/actions/transformations/replace_nulls.h0000664000175000017500000000230114146026157026062 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include "modsecurity/actions/action.h" #include "src/actions/transformations/transformation.h" #ifndef SRC_ACTIONS_TRANSFORMATIONS_REPLACE_NULLS_H_ #define SRC_ACTIONS_TRANSFORMATIONS_REPLACE_NULLS_H_ #ifdef __cplusplus namespace modsecurity { class Transaction; namespace actions { namespace transformations { class ReplaceNulls : public Transformation { public: explicit ReplaceNulls(const std::string &action) ; std::string evaluate(const std::string &exp, Transaction *transaction) override; }; } // namespace transformations } // namespace actions } // namespace modsecurity #endif #endif // SRC_ACTIONS_TRANSFORMATIONS_REPLACE_NULLS_H_ modsecurity-v3.0.6/src/actions/transformations/trim.h0000664000175000017500000000241614146026157024214 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include "modsecurity/actions/action.h" #include "src/actions/transformations/transformation.h" #ifndef SRC_ACTIONS_TRANSFORMATIONS_TRIM_H_ #define SRC_ACTIONS_TRANSFORMATIONS_TRIM_H_ #ifdef __cplusplus namespace modsecurity { class Transaction; namespace actions { namespace transformations { class Trim : public Transformation { public: explicit Trim(const std::string &action) ; std::string evaluate(const std::string &exp, Transaction *transaction) override; std::string *ltrim(std::string *s); std::string *rtrim(std::string *s); std::string *trim(std::string *s); }; } // namespace transformations } // namespace actions } // namespace modsecurity #endif #endif // SRC_ACTIONS_TRANSFORMATIONS_TRIM_H_ modsecurity-v3.0.6/src/actions/transformations/upper_case.cc0000664000175000017500000000235414146026157025526 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "src/actions/transformations/upper_case.h" #include #include #include "modsecurity/transaction.h" #include "src/actions/transformations/transformation.h" #include "modsecurity/actions/action.h" namespace modsecurity { namespace actions { namespace transformations { UpperCase::UpperCase(const std::string &a) : Transformation(a) { } std::string UpperCase::evaluate(const std::string &val, Transaction *transaction) { std::string value(val); std::locale loc; for (std::string::size_type i=0; i < value.length(); ++i) { value[i] = std::toupper(value[i], loc); } return value; } } // namespace transformations } // namespace actions } // namespace modsecurity modsecurity-v3.0.6/src/actions/transformations/lower_case.cc0000664000175000017500000000235414146026157025523 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "src/actions/transformations/lower_case.h" #include #include #include "modsecurity/transaction.h" #include "src/actions/transformations/transformation.h" #include "modsecurity/actions/action.h" namespace modsecurity { namespace actions { namespace transformations { LowerCase::LowerCase(const std::string &a) : Transformation(a) { } std::string LowerCase::evaluate(const std::string &val, Transaction *transaction) { std::locale loc; std::string value(val); for (std::string::size_type i=0; i < value.length(); ++i) { value[i] = std::tolower(value[i], loc); } return value; } } // namespace transformations } // namespace actions } // namespace modsecurity modsecurity-v3.0.6/src/actions/transformations/compress_whitespace.cc0000664000175000017500000000313114146026157027441 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "src/actions/transformations/compress_whitespace.h" #include #include #include #include #include #include #include "modsecurity/transaction.h" #include "src/actions/transformations/transformation.h" namespace modsecurity { namespace actions { namespace transformations { CompressWhitespace::CompressWhitespace(const std::string &action) : Transformation(action) { this->action_kind = 1; } std::string CompressWhitespace::evaluate(const std::string &value, Transaction *transaction) { std::string a; int inWhiteSpace = 0; int i = 0; while (i < value.size()) { if (isspace(value[i])) { if (inWhiteSpace) { i++; continue; } else { inWhiteSpace = 1; a.append(" ", 1); } } else { inWhiteSpace = 0; a.append(&value.at(i), 1); } i++; } return a; } } // namespace transformations } // namespace actions } // namespace modsecurity modsecurity-v3.0.6/src/actions/transformations/length.cc0000664000175000017500000000223414146026157024656 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "src/actions/transformations/length.h" #include #include #include #include #include #include #include "modsecurity/transaction.h" #include "src/actions/transformations/transformation.h" namespace modsecurity { namespace actions { namespace transformations { Length::Length(const std::string &action) : Transformation(action) { this->action_kind = 1; } std::string Length::evaluate(const std::string &value, Transaction *transaction) { return std::to_string(value.size()); } } // namespace transformations } // namespace actions } // namespace modsecurity modsecurity-v3.0.6/src/actions/transformations/parity_even_7bit.cc0000664000175000017500000000351014146026157026645 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "src/actions/transformations/parity_even_7bit.h" #include #include #include #include #include #include #include #include "modsecurity/transaction.h" #include "src/actions/transformations/transformation.h" namespace modsecurity { namespace actions { namespace transformations { std::string ParityEven7bit::evaluate(const std::string &value, Transaction *transaction) { std::string ret; unsigned char *input; input = reinterpret_cast (malloc(sizeof(char) * value.length()+1)); if (input == NULL) { return ""; } std::memcpy(input, value.c_str(), value.length()+1); inplace(input, value.length()); ret.assign(reinterpret_cast(input), value.length()); free(input); return ret; } bool ParityEven7bit::inplace(unsigned char *input, uint64_t input_len) { uint64_t i; i = 0; while (i < input_len) { unsigned int x = input[i]; input[i] ^= input[i] >> 4; input[i] &= 0xf; if ((0x6996 >> input[i]) & 1) { input[i] = x | 0x80; } else { input[i] = x & 0x7f; } i++; } return true; } } // namespace transformations } // namespace actions } // namespace modsecurity modsecurity-v3.0.6/src/actions/transformations/escape_seq_decode.h0000664000175000017500000000244114146026157026652 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include "modsecurity/actions/action.h" #include "src/actions/transformations/transformation.h" #ifndef SRC_ACTIONS_TRANSFORMATIONS_ESCAPE_SEQ_DECODE_H_ #define SRC_ACTIONS_TRANSFORMATIONS_ESCAPE_SEQ_DECODE_H_ #ifdef __cplusplus namespace modsecurity { class Transaction; namespace actions { namespace transformations { class EscapeSeqDecode : public Transformation { public: explicit EscapeSeqDecode(const std::string &action) ; std::string evaluate(const std::string &exp, Transaction *transaction) override; int ansi_c_sequences_decode_inplace(unsigned char *input, int input_len); }; } // namespace transformations } // namespace actions } // namespace modsecurity #endif #endif // SRC_ACTIONS_TRANSFORMATIONS_ESCAPE_SEQ_DECODE_H_ modsecurity-v3.0.6/src/actions/transformations/js_decode.h0000664000175000017500000000242214146026157025155 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include "modsecurity/actions/action.h" #include "src/actions/transformations/transformation.h" #ifndef SRC_ACTIONS_TRANSFORMATIONS_JS_DECODE_H_ #define SRC_ACTIONS_TRANSFORMATIONS_JS_DECODE_H_ #ifdef __cplusplus namespace modsecurity { class Transaction; namespace actions { namespace transformations { class JsDecode : public Transformation { public: explicit JsDecode(const std::string &action) : Transformation(action) { } std::string evaluate(const std::string &exp, Transaction *transaction) override; static int inplace(unsigned char *input, uint64_t input_len); }; } // namespace transformations } // namespace actions } // namespace modsecurity #endif #endif // SRC_ACTIONS_TRANSFORMATIONS_JS_DECODE_H_ modsecurity-v3.0.6/src/actions/transformations/html_entity_decode.cc0000664000175000017500000001463014146026157027243 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "src/actions/transformations/html_entity_decode.h" #include #include #include #include #include #include #include #include "modsecurity/transaction.h" #include "src/actions/transformations/transformation.h" namespace modsecurity { namespace actions { namespace transformations { std::string HtmlEntityDecode::evaluate(const std::string &value, Transaction *transaction) { std::string ret; unsigned char *input; input = reinterpret_cast (malloc(sizeof(char) * value.length()+1)); if (input == NULL) { return ""; } memcpy(input, value.c_str(), value.length()+1); size_t i = inplace(input, value.length()); ret.assign(reinterpret_cast(input), i); free(input); return ret; } int HtmlEntityDecode::inplace(unsigned char *input, uint64_t input_len) { unsigned char *d = input; int i, count; if ((input == NULL) || (input_len == 0)) { return 0; } i = count = 0; while ((i < input_len) && (count < input_len)) { int z, copy = 1; /* Require an ampersand and at least one character to * start looking into the entity. */ if ((input[i] == '&') && (i + 1 < input_len)) { int k, j = i + 1; if (input[j] == '#') { /* Numerical entity. */ copy++; if (!(j + 1 < input_len)) { goto HTML_ENT_OUT; /* Not enough bytes. */ } j++; if ((input[j] == 'x') || (input[j] == 'X')) { /* Hexadecimal entity. */ copy++; if (!(j + 1 < input_len)) { goto HTML_ENT_OUT; /* Not enough bytes. */ } j++; /* j is the position of the first digit now. */ k = j; while ((j < input_len) && (isxdigit(input[j]))) { j++; } if (j > k) { /* Do we have at least one digit? */ /* Decode the entity. */ char *x; x = reinterpret_cast(calloc(sizeof(char), ((j - k) + 1))); memcpy(x, (const char *)&input[k], j - k); *d++ = (unsigned char)strtol(x, NULL, 16); free(x); count++; /* Skip over the semicolon if it's there. */ if ((j < input_len) && (input[j] == ';')) { i = j + 1; } else { i = j; } continue; } else { goto HTML_ENT_OUT; } } else { /* Decimal entity. */ k = j; while ((j < input_len) && (isdigit(input[j]))) { j++; } if (j > k) { /* Do we have at least one digit? */ /* Decode the entity. */ char *x; x = reinterpret_cast(calloc(sizeof(char), ((j - k) + 1))); memcpy(x, (const char *)&input[k], j - k); *d++ = (unsigned char)strtol(x, NULL, 10); free(x); count++; /* Skip over the semicolon if it's there. */ if ((j < input_len) && (input[j] == ';')) { i = j + 1; } else { i = j; } continue; } else { goto HTML_ENT_OUT; } } } else { /* Text entity. */ k = j; while ((j < input_len) && (isalnum(input[j]))) { j++; } if (j > k) { /* Do we have at least one digit? */ char *x; x = reinterpret_cast(calloc(sizeof(char), ((j - k) + 1))); memcpy(x, (const char *)&input[k], j - k); /* Decode the entity. */ /* ENH What about others? */ if (strcasecmp(x, "quot") == 0) { *d++ = '"'; } else if (strcasecmp(x, "amp") == 0) { *d++ = '&'; } else if (strcasecmp(x, "lt") == 0) { *d++ = '<'; } else if (strcasecmp(x, "gt") == 0) { *d++ = '>'; } else if (strcasecmp(x, "nbsp") == 0) { *d++ = NBSP; } else { /* We do no want to convert this entity, * copy the raw data over. */ copy = j - k + 1; free(x); goto HTML_ENT_OUT; } free(x); count++; /* Skip over the semicolon if it's there. */ if ((j < input_len) && (input[j] == ';')) { i = j + 1; } else { i = j; } continue; } } } HTML_ENT_OUT: for (z = 0; ((z < copy) && (count < input_len)); z++) { *d++ = input[i++]; count++; } } *d = '\0'; return count; } } // namespace transformations } // namespace actions } // namespace modsecurity modsecurity-v3.0.6/src/actions/transformations/base64_decode.h0000664000175000017500000000233414146026157025627 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include "modsecurity/actions/action.h" #include "src/actions/transformations/transformation.h" #ifndef SRC_ACTIONS_TRANSFORMATIONS_BASE64_DECODE_H_ #define SRC_ACTIONS_TRANSFORMATIONS_BASE64_DECODE_H_ #ifdef __cplusplus namespace modsecurity { class Transaction; namespace actions { namespace transformations { class Base64Decode : public Transformation { public: explicit Base64Decode(const std::string &action) : Transformation(action) { } std::string evaluate(const std::string &exp, Transaction *transaction) override; }; } // namespace transformations } // namespace actions } // namespace modsecurity #endif #endif // SRC_ACTIONS_TRANSFORMATIONS_BASE64_DECODE_H_ modsecurity-v3.0.6/src/actions/transformations/remove_comments.cc0000664000175000017500000000577314146026157026612 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "src/actions/transformations/remove_comments.h" #include #include #include #include #include #include #include #include "modsecurity/transaction.h" #include "src/actions/transformations/transformation.h" namespace modsecurity { namespace actions { namespace transformations { std::string RemoveComments::evaluate(const std::string &value, Transaction *transaction) { std::string ret; unsigned char *input; input = reinterpret_cast (malloc(sizeof(char) * value.length()+1)); if (input == NULL) { return ""; } memcpy(input, value.c_str(), value.length()+1); uint64_t input_len = value.size(); uint64_t i, j, incomment; i = j = incomment = 0; while (i < input_len) { if (incomment == 0) { if ((input[i] == '/') && (i + 1 < input_len) && (input[i + 1] == '*')) { incomment = 1; i += 2; } else if ((input[i] == '<') && (i + 1 < input_len) && (input[i + 1] == '!') && (i + 2 < input_len) && (input[i+2] == '-') && (i + 3 < input_len) && (input[i + 3] == '-')) { incomment = 1; i += 4; } else if ((input[i] == '-') && (i + 1 < input_len) && (input[i + 1] == '-')) { input[i] = ' '; break; } else if (input[i] == '#') { input[i] = ' '; break; } else { input[j] = input[i]; i++; j++; } } else { if ((input[i] == '*') && (i + 1 < input_len) && (input[i + 1] == '/')) { incomment = 0; i += 2; input[j] = input[i]; i++; j++; } else if ((input[i] == '-') && (i + 1 < input_len) && (input[i + 1] == '-') && (i + 2 < input_len) && (input[i+2] == '>')) { incomment = 0; i += 3; input[j] = input[i]; i++; j++; } else { i++; } } } if (incomment) { input[j++] = ' '; } ret.assign(reinterpret_cast(input), j); free(input); return ret; } } // namespace transformations } // namespace actions } // namespace modsecurity modsecurity-v3.0.6/src/actions/transformations/html_entity_decode.h0000664000175000017500000000256714146026157027113 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include #include "modsecurity/actions/action.h" #include "src/actions/transformations/transformation.h" #include "src/utils/string.h" #ifndef SRC_ACTIONS_TRANSFORMATIONS_HTML_ENTITY_DECODE_H_ #define SRC_ACTIONS_TRANSFORMATIONS_HTML_ENTITY_DECODE_H_ #ifdef __cplusplus namespace modsecurity { class Transaction; namespace actions { namespace transformations { class HtmlEntityDecode : public Transformation { public: explicit HtmlEntityDecode(const std::string &action) : Transformation(action) { } std::string evaluate(const std::string &exp, Transaction *transaction) override; static int inplace(unsigned char *input, uint64_t input_len); }; } // namespace transformations } // namespace actions } // namespace modsecurity #endif #endif // SRC_ACTIONS_TRANSFORMATIONS_HTML_ENTITY_DECODE_H_ modsecurity-v3.0.6/src/actions/transformations/parity_zero_7bit.cc0000664000175000017500000000316714146026157026677 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "src/actions/transformations/parity_zero_7bit.h" #include #include #include #include #include #include #include #include "modsecurity/transaction.h" #include "src/actions/transformations/transformation.h" namespace modsecurity { namespace actions { namespace transformations { std::string ParityZero7bit::evaluate(const std::string &value, Transaction *transaction) { std::string ret; unsigned char *input; input = reinterpret_cast (malloc(sizeof(char) * value.length()+1)); if (input == NULL) { return ""; } memcpy(input, value.c_str(), value.length()+1); inplace(input, value.length()); ret.assign(reinterpret_cast(input), value.length()); free(input); return ret; } bool ParityZero7bit::inplace(unsigned char *input, uint64_t input_len) { uint64_t i; i = 0; while (i < input_len) { input[i] &= 0x7f; i++; } return true; } } // namespace transformations } // namespace actions } // namespace modsecurity modsecurity-v3.0.6/src/actions/transformations/remove_whitespace.cc0000664000175000017500000000357414146026157027116 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "src/actions/transformations/remove_whitespace.h" #include #include #include #include #include #include #include "modsecurity/transaction.h" #include "src/actions/transformations/transformation.h" namespace modsecurity { namespace actions { namespace transformations { RemoveWhitespace::RemoveWhitespace(const std::string &action) : Transformation(action) { this->action_kind = 1; } std::string RemoveWhitespace::evaluate(const std::string &val, Transaction *transaction) { std::string value(val); int64_t i = 0; const char nonBreakingSpaces = 0xa0; const char nonBreakingSpaces2 = 0xc2; // loop through all the chars while (i < value.size()) { // remove whitespaces and non breaking spaces (NBSP) if (std::isspace(static_cast(value[i])) || (value[i] == nonBreakingSpaces) || value[i] == nonBreakingSpaces2) { value.erase(i, 1); } else { /* if the space is not a whitespace char, increment counter counter should not be incremented if a character is erased because the index erased will be replaced by the following character */ i++; } } return value; } } // namespace transformations } // namespace actions } // namespace modsecurity modsecurity-v3.0.6/src/actions/transformations/url_encode.h0000664000175000017500000000241514146026157025357 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include "modsecurity/actions/action.h" #include "src/actions/transformations/transformation.h" #ifndef SRC_ACTIONS_TRANSFORMATIONS_URL_ENCODE_H_ #define SRC_ACTIONS_TRANSFORMATIONS_URL_ENCODE_H_ #ifdef __cplusplus namespace modsecurity { class Transaction; namespace actions { namespace transformations { class UrlEncode : public Transformation { public: explicit UrlEncode(const std::string &action) ; std::string evaluate(const std::string &exp, Transaction *transaction) override; std::string url_enc(const char *input, unsigned int input_len, int *changed); }; } // namespace transformations } // namespace actions } // namespace modsecurity #endif #endif // SRC_ACTIONS_TRANSFORMATIONS_URL_ENCODE_H_ modsecurity-v3.0.6/src/actions/transformations/remove_comments_char.cc0000664000175000017500000000435214146026157027577 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "src/actions/transformations/remove_comments_char.h" #include #include #include #include #include #include #include "modsecurity/transaction.h" #include "src/actions/transformations/transformation.h" namespace modsecurity { namespace actions { namespace transformations { RemoveCommentsChar::RemoveCommentsChar(const std::string &action) : Transformation(action) { this->action_kind = 1; } std::string RemoveCommentsChar::evaluate(const std::string &val, Transaction *transaction) { int64_t i; std::string value(val); i = 0; while (i < value.size()) { if (value.at(i) == '/' && (i+1 < value.size()) && value.at(i+1) == '*') { value.erase(i, 2); } else if (value.at(i) == '*' && (i+1 < value.size()) && value.at(i+1) == '/') { value.erase(i, 2); } else if (value.at(i) == '<' && (i+1 < value.size()) && value.at(i+1) == '!' && (i+2 < value.size()) && value.at(i+2) == '-' && (i+3 < value.size()) && value.at(i+3) == '-') { value.erase(i, 4); } else if (value.at(i) == '-' && (i+1 < value.size()) && value.at(i+1) == '-' && (i+2 < value.size()) && value.at(i+2) == '>') { value.erase(i, 3); } else if (value.at(i) == '-' && (i+1 < value.size()) && value.at(i+1) == '-') { value.erase(i, 2); } else if (value.at(i) == '#') { value.erase(i, 1); } else { i++; } } return value; } } // namespace transformations } // namespace actions } // namespace modsecurity modsecurity-v3.0.6/src/actions/transformations/lower_case.h0000664000175000017500000000231114146026157025356 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include #include "modsecurity/actions/action.h" #include "src/actions/transformations/transformation.h" #ifndef SRC_ACTIONS_TRANSFORMATIONS_LOWER_CASE_H_ #define SRC_ACTIONS_TRANSFORMATIONS_LOWER_CASE_H_ #ifdef __cplusplus namespace modsecurity { class Transaction; namespace actions { namespace transformations { class LowerCase : public Transformation { public: explicit LowerCase(const std::string &action); std::string evaluate(const std::string &exp, Transaction *transaction) override; }; } // namespace transformations } // namespace actions } // namespace modsecurity #endif #endif // SRC_ACTIONS_TRANSFORMATIONS_LOWER_CASE_H_ modsecurity-v3.0.6/src/actions/transformations/cmd_line.cc0000664000175000017500000000407114146026157025150 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "src/actions/transformations/cmd_line.h" #include #include #include #include #include #include #include "modsecurity/transaction.h" #include "src/actions/transformations/transformation.h" namespace modsecurity { namespace actions { namespace transformations { std::string CmdLine::evaluate(const std::string &value, Transaction *transaction) { std::string ret; int space = 0; for (auto& a : value) { switch (a) { /* remove some characters */ case '"': case '\'': case '\\': case '^': break; /* replace some characters to space (only one) */ case ' ': case ',': case ';': case '\t': case '\r': case '\n': if (space == 0) { ret.append(" "); space++; } break; /* remove space before / or ( */ case '/': case '(': if (space) { ret.pop_back(); } space = 0; ret.append(&a, 1); break; /* copy normal characters */ default : char b = std::tolower(a); ret.append(&b, 1); space = 0; break; } } return ret; } } // namespace transformations } // namespace actions } // namespace modsecurity modsecurity-v3.0.6/src/actions/transformations/transformation.h0000664000175000017500000000251114146026157026303 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include "modsecurity/actions/action.h" #ifndef SRC_ACTIONS_TRANSFORMATIONS_TRANSFORMATION_H_ #define SRC_ACTIONS_TRANSFORMATIONS_TRANSFORMATION_H_ namespace modsecurity { class Transaction; namespace actions { namespace transformations { class Transformation : public Action { public: explicit Transformation(const std::string& _action) : Action(_action, RunTimeBeforeMatchAttemptKind) { } explicit Transformation(const std::string& _action, int kind) : Action(_action, kind) { } std::string evaluate(const std::string &exp, Transaction *transaction) override; static Transformation* instantiate(std::string a); }; } // namespace transformations } // namespace actions } // namespace modsecurity #endif // SRC_ACTIONS_TRANSFORMATIONS_TRANSFORMATION_H_ modsecurity-v3.0.6/src/actions/transformations/parity_even_7bit.h0000664000175000017500000000244414146026157026514 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include "modsecurity/actions/action.h" #include "src/actions/transformations/transformation.h" #ifndef SRC_ACTIONS_TRANSFORMATIONS_PARITY_EVEN_7BIT_H_ #define SRC_ACTIONS_TRANSFORMATIONS_PARITY_EVEN_7BIT_H_ #ifdef __cplusplus namespace modsecurity { class Transaction; namespace actions { namespace transformations { class ParityEven7bit : public Transformation { public: explicit ParityEven7bit(const std::string &action) : Transformation(action) { } std::string evaluate(const std::string &exp, Transaction *transaction) override; static bool inplace(unsigned char *input, uint64_t input_len); }; } // namespace transformations } // namespace actions } // namespace modsecurity #endif #endif // SRC_ACTIONS_TRANSFORMATIONS_PARITY_EVEN_7BIT_H_ modsecurity-v3.0.6/src/actions/transformations/hex_decode.h0000664000175000017500000000240414146026157025325 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include "modsecurity/actions/action.h" #include "src/actions/transformations/transformation.h" #ifndef SRC_ACTIONS_TRANSFORMATIONS_HEX_DECODE_H_ #define SRC_ACTIONS_TRANSFORMATIONS_HEX_DECODE_H_ #ifdef __cplusplus namespace modsecurity { class Transaction; namespace actions { namespace transformations { class HexDecode : public Transformation { public: explicit HexDecode(const std::string &action) : Transformation(action) { } std::string evaluate(const std::string &exp, Transaction *transaction) override; static int inplace(unsigned char *data, int len); }; } // namespace transformations } // namespace actions } // namespace modsecurity #endif #endif // SRC_ACTIONS_TRANSFORMATIONS_HEX_DECODE_H_ modsecurity-v3.0.6/src/actions/transformations/url_decode.h0000664000175000017500000000231414146026157025343 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include #include "modsecurity/actions/action.h" #include "src/actions/transformations/transformation.h" #ifndef SRC_ACTIONS_TRANSFORMATIONS_URL_DECODE_H_ #define SRC_ACTIONS_TRANSFORMATIONS_URL_DECODE_H_ #ifdef __cplusplus namespace modsecurity { class Transaction; namespace actions { namespace transformations { class UrlDecode : public Transformation { public: explicit UrlDecode(const std::string &action) ; std::string evaluate(const std::string &exp, Transaction *transaction) override; }; } // namespace transformations } // namespace actions } // namespace modsecurity #endif #endif // SRC_ACTIONS_TRANSFORMATIONS_URL_DECODE_H_ modsecurity-v3.0.6/src/actions/transformations/sha1.h0000664000175000017500000000222414146026157024072 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include "modsecurity/actions/action.h" #include "src/actions/transformations/transformation.h" #ifndef SRC_ACTIONS_TRANSFORMATIONS_SHA1_H_ #define SRC_ACTIONS_TRANSFORMATIONS_SHA1_H_ #ifdef __cplusplus namespace modsecurity { class Transaction; namespace actions { namespace transformations { class Sha1 : public Transformation { public: explicit Sha1(const std::string &action) ; std::string evaluate(const std::string &exp, Transaction *transaction) override; }; } // namespace transformations } // namespace actions } // namespace modsecurity #endif #endif // SRC_ACTIONS_TRANSFORMATIONS_SHA1_H_ modsecurity-v3.0.6/src/actions/transformations/md5.h0000664000175000017500000000225414146026157023726 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include "modsecurity/actions/action.h" #include "src/actions/transformations/transformation.h" #ifndef SRC_ACTIONS_TRANSFORMATIONS_MD5_H_ #define SRC_ACTIONS_TRANSFORMATIONS_MD5_H_ #ifdef __cplusplus namespace modsecurity { class Transaction; namespace actions { namespace transformations { class Md5 : public Transformation { public: explicit Md5(const std::string &action) : Transformation(action) { } std::string evaluate(const std::string &exp, Transaction *transaction) override; }; } // namespace transformations } // namespace actions } // namespace modsecurity #endif #endif // SRC_ACTIONS_TRANSFORMATIONS_MD5_H_ modsecurity-v3.0.6/src/actions/transformations/js_decode.cc0000664000175000017500000001156114146026157025317 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "src/actions/transformations/js_decode.h" #include #include #include #include #include #include #include #include "modsecurity/transaction.h" #include "src/actions/transformations/transformation.h" #include "src/utils/string.h" namespace modsecurity { namespace actions { namespace transformations { std::string JsDecode::evaluate(const std::string &value, Transaction *transaction) { std::string ret; unsigned char *input; input = reinterpret_cast (malloc(sizeof(char) * value.length()+1)); if (input == NULL) { return ""; } memcpy(input, value.c_str(), value.length()+1); size_t i = inplace(input, value.length()); ret.assign(reinterpret_cast(input), i); free(input); return ret; } int JsDecode::inplace(unsigned char *input, uint64_t input_len) { unsigned char *d = (unsigned char *)input; int64_t i, count; i = count = 0; while (i < input_len) { if (input[i] == '\\') { /* Character is an escape. */ if ((i + 5 < input_len) && (input[i + 1] == 'u') && (VALID_HEX(input[i + 2])) && (VALID_HEX(input[i + 3])) && (VALID_HEX(input[i + 4])) && (VALID_HEX(input[i + 5]))) { /* \uHHHH */ /* Use only the lower byte. */ *d = utils::string::x2c(&input[i + 4]); /* Full width ASCII (ff01 - ff5e) needs 0x20 added */ if ((*d > 0x00) && (*d < 0x5f) && ((input[i + 2] == 'f') || (input[i + 2] == 'F')) && ((input[i + 3] == 'f') || (input[i + 3] == 'F'))) { (*d) += 0x20; } d++; count++; i += 6; } else if ((i + 3 < input_len) && (input[i + 1] == 'x') && VALID_HEX(input[i + 2]) && VALID_HEX(input[i + 3])) { /* \xHH */ *d++ = utils::string::x2c(&input[i + 2]); count++; i += 4; } else if ((i + 1 < input_len) && ISODIGIT(input[i + 1])) { /* \OOO (only one byte, \000 - \377) */ char buf[4]; int j = 0; while ((i + 1 + j < input_len) && (j < 3)) { buf[j] = input[i + 1 + j]; j++; if (!ISODIGIT(input[i + 1 + j])) break; } buf[j] = '\0'; if (j > 0) { /* Do not use 3 characters if we will be > 1 byte */ if ((j == 3) && (buf[0] > '3')) { j = 2; buf[j] = '\0'; } *d++ = (unsigned char)strtol(buf, NULL, 8); i += 1 + j; count++; } } else if (i + 1 < input_len) { /* \C */ unsigned char c = input[i + 1]; switch (input[i + 1]) { case 'a' : c = '\a'; break; case 'b' : c = '\b'; break; case 'f' : c = '\f'; break; case 'n' : c = '\n'; break; case 'r' : c = '\r'; break; case 't' : c = '\t'; break; case 'v' : c = '\v'; break; /* The remaining (\?,\\,\',\") are just a removal * of the escape char which is default. */ } *d++ = c; i += 2; count++; } else { /* Not enough bytes */ while (i < input_len) { *d++ = input[i++]; count++; } } } else { *d++ = input[i++]; count++; } } *d = '\0'; return count; } } // namespace transformations } // namespace actions } // namespace modsecurity modsecurity-v3.0.6/src/actions/transformations/remove_nulls.cc0000664000175000017500000000240714146026157026111 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "src/actions/transformations/remove_nulls.h" #include #include #include #include #include #include #include #include "modsecurity/transaction.h" #include "src/actions/transformations/transformation.h" namespace modsecurity { namespace actions { namespace transformations { std::string RemoveNulls::evaluate(const std::string &val, Transaction *transaction) { int64_t i; std::string value(val); i = 0; while (i < value.size()) { if (value.at(i) == '\0') { value.erase(i, 1); } else { i++; } } return value; } } // namespace transformations } // namespace actions } // namespace modsecurity modsecurity-v3.0.6/src/actions/transformations/transformation.cc0000664000175000017500000001247214146026157026450 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "src/actions/transformations/transformation.h" #include #include #include #include "modsecurity/transaction.h" #include "modsecurity/actions/action.h" #include "src/actions/transformations/base64_decode_ext.h" #include "src/actions/transformations/base64_decode.h" #include "src/actions/transformations/base64_encode.h" #include "src/actions/transformations/cmd_line.h" #include "src/actions/transformations/compress_whitespace.h" #include "src/actions/transformations/css_decode.h" #include "src/actions/transformations/escape_seq_decode.h" #include "src/actions/transformations/hex_decode.h" #include "src/actions/transformations/hex_encode.h" #include "src/actions/transformations/html_entity_decode.h" #include "src/actions/transformations/js_decode.h" #include "src/actions/transformations/length.h" #include "src/actions/transformations/lower_case.h" #include "src/actions/transformations/md5.h" #include "src/actions/transformations/none.h" #include "src/actions/transformations/normalise_path.h" #include "src/actions/transformations/normalise_path_win.h" #include "src/actions/transformations/parity_even_7bit.h" #include "src/actions/transformations/parity_odd_7bit.h" #include "src/actions/transformations/parity_zero_7bit.h" #include "src/actions/transformations/remove_comments_char.h" #include "src/actions/transformations/remove_comments.h" #include "src/actions/transformations/remove_nulls.h" #include "src/actions/transformations/remove_whitespace.h" #include "src/actions/transformations/replace_comments.h" #include "src/actions/transformations/replace_nulls.h" #include "src/actions/transformations/sha1.h" #include "src/actions/transformations/sql_hex_decode.h" #include "src/actions/transformations/trim.h" #include "src/actions/transformations/trim_left.h" #include "src/actions/transformations/trim_right.h" #include "src/actions/transformations/upper_case.h" #include "src/actions/transformations/url_decode.h" #include "src/actions/transformations/url_decode_uni.h" #include "src/actions/transformations/url_encode.h" #include "src/actions/transformations/utf8_to_unicode.h" #define IF_MATCH(b) \ if (a.compare(2, std::strlen(#b), #b) == 0) namespace modsecurity { namespace actions { namespace transformations { std::string Transformation::evaluate(const std::string &value, Transaction *transaction) { return value; } Transformation* Transformation::instantiate(std::string a) { IF_MATCH(base64DecodeExt) { return new Base64DecodeExt(a); } IF_MATCH(base64Decode) { return new Base64Decode(a); } IF_MATCH(base64Encode) { return new Base64Encode(a); } IF_MATCH(cmd_line) { return new CmdLine(a); } IF_MATCH(compress_whitespace) { return new CompressWhitespace(a); } IF_MATCH(cssDecode) { return new CssDecode(a); } IF_MATCH(escapeSeqDecode) { return new EscapeSeqDecode(a); } IF_MATCH(hexDecode) { return new HexDecode(a); } IF_MATCH(hexEncode) { return new HexEncode(a); } IF_MATCH(htmlEntityDecode) { return new HtmlEntityDecode(a); } IF_MATCH(jsDecode) { return new JsDecode(a); } IF_MATCH(length) { return new Length(a); } IF_MATCH(lowercase) { return new LowerCase(a); } IF_MATCH(md5) { return new Md5(a); } IF_MATCH(none) { return new None(a); } IF_MATCH(normalizePathWin) { return new NormalisePathWin(a); } IF_MATCH(normalisePathWin) { return new NormalisePathWin(a); } IF_MATCH(normalizePath) { return new NormalisePath(a); } IF_MATCH(normalisePath) { return new NormalisePath(a); } IF_MATCH(parityEven7bit) { return new ParityEven7bit(a); } IF_MATCH(parityOdd7bit) { return new ParityOdd7bit(a); } IF_MATCH(parityZero7bit) { return new ParityZero7bit(a); } IF_MATCH(removeCommentsChar) { return new RemoveCommentsChar(a); } IF_MATCH(removeComments) { return new RemoveComments(a); } IF_MATCH(removeNulls) { return new RemoveNulls(a); } IF_MATCH(removeWhitespace) { return new RemoveWhitespace(a); } IF_MATCH(compressWhitespace) { return new CompressWhitespace(a); } IF_MATCH(replaceComments) { return new ReplaceComments(a); } IF_MATCH(replaceNulls) { return new ReplaceNulls(a); } IF_MATCH(sha1) { return new Sha1(a); } IF_MATCH(sqlHexDecode) { return new SqlHexDecode(a); } IF_MATCH(transformation) { return new Transformation(a); } IF_MATCH(trimLeft) { return new TrimLeft(a); } IF_MATCH(trimRight) { return new TrimRight(a); } IF_MATCH(trim) { return new Trim(a); } IF_MATCH(uppercase) { return new UpperCase(a); } IF_MATCH(urlDecodeUni) { return new UrlDecodeUni(a); } IF_MATCH(urlDecode) { return new UrlDecode(a); } IF_MATCH(urlEncode) { return new UrlEncode(a); } IF_MATCH(utf8toUnicode) { return new Utf8ToUnicode(a); } return new Transformation(a); } } // namespace transformations } // namespace actions } // namespace modsecurity modsecurity-v3.0.6/src/actions/transformations/replace_comments.h0000664000175000017500000000232014146026157026553 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include "modsecurity/actions/action.h" #include "src/actions/transformations/transformation.h" #ifndef SRC_ACTIONS_TRANSFORMATIONS_REPLACE_COMMENTS_H_ #define SRC_ACTIONS_TRANSFORMATIONS_REPLACE_COMMENTS_H_ #ifdef __cplusplus namespace modsecurity { class Transaction; namespace actions { namespace transformations { class ReplaceComments : public Transformation { public: explicit ReplaceComments(const std::string &action) ; std::string evaluate(const std::string &exp, Transaction *transaction) override; }; } // namespace transformations } // namespace actions } // namespace modsecurity #endif #endif // SRC_ACTIONS_TRANSFORMATIONS_REPLACE_COMMENTS_H_ modsecurity-v3.0.6/src/actions/transformations/none.h0000664000175000017500000000232214146026157024174 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include "modsecurity/actions/action.h" #include "src/actions/transformations/transformation.h" #ifndef SRC_ACTIONS_TRANSFORMATIONS_NONE_H_ #define SRC_ACTIONS_TRANSFORMATIONS_NONE_H_ #ifdef __cplusplus namespace modsecurity { class Transaction; namespace actions { namespace transformations { class None : public Transformation { public: explicit None(const std::string &action) : Transformation(action) { m_isNone = true; } std::string evaluate(const std::string &exp, Transaction *transaction) override; }; } // namespace transformations } // namespace actions } // namespace modsecurity #endif #endif // SRC_ACTIONS_TRANSFORMATIONS_NONE_H_ modsecurity-v3.0.6/src/actions/disruptive/0000775000175000017500000000000014146026763022035 5ustar mhsvierulamhsvierulamodsecurity-v3.0.6/src/actions/disruptive/deny.cc0000664000175000017500000000251314146026157023301 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "src/actions/disruptive/deny.h" #include #include #include #include #include #include "modsecurity/transaction.h" namespace modsecurity { namespace actions { namespace disruptive { bool Deny::evaluate(RuleWithActions *rule, Transaction *transaction, std::shared_ptr rm) { ms_dbg_a(transaction, 8, "Running action deny"); if (transaction->m_it.status == 200) { transaction->m_it.status = 403; } transaction->m_it.disruptive = true; intervention::freeLog(&transaction->m_it); rm->m_isDisruptive = true; transaction->m_it.log = strdup( rm->log(RuleMessage::LogMessageInfo::ClientLogMessageInfo).c_str()); return true; } } // namespace disruptive } // namespace actions } // namespace modsecurity modsecurity-v3.0.6/src/actions/disruptive/allow.cc0000664000175000017500000000325014146026157023457 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "src/actions/disruptive/allow.h" #include #include #include "modsecurity/rules_set.h" #include "modsecurity/transaction.h" #include "modsecurity/rule.h" #include "src/utils/string.h" #include "modsecurity/modsecurity.h" namespace modsecurity { namespace actions { namespace disruptive { bool Allow::init(std::string *error) { std::string a = utils::string::tolower(m_parser_payload); if (a == "phase") { m_allowType = PhaseAllowType; } else if (a == "request") { m_allowType = RequestAllowType; } else if (a == "") { m_allowType = FromNowOnAllowType; } else { error->assign("Allow: if specified, the parameter " \ "most be: phase, request"); return false; } return true; } bool Allow::evaluate(RuleWithActions *rule, Transaction *transaction) { ms_dbg_a(transaction, 4, "Dropping the evaluation of upcoming rules " \ "in favor of an `allow' action of type: " \ + allowTypeToName(m_allowType)); transaction->m_allowType = m_allowType; return true; } } // namespace disruptive } // namespace actions } // namespace modsecurity modsecurity-v3.0.6/src/actions/disruptive/pass.h0000664000175000017500000000224514146026157023154 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include #include "modsecurity/actions/action.h" #include "modsecurity/transaction.h" #ifndef SRC_ACTIONS_DISRUPTIVE_PASS_H_ #define SRC_ACTIONS_DISRUPTIVE_PASS_H_ namespace modsecurity { namespace actions { namespace disruptive { class Pass : public Action { public: explicit Pass(const std::string &action) : Action(action) { } bool evaluate(RuleWithActions *rule, Transaction *transaction, std::shared_ptr rm) override; bool isDisruptive() override { return true; } }; } // namespace disruptive } // namespace actions } // namespace modsecurity #endif // SRC_ACTIONS_DISRUPTIVE_PASS_H_ modsecurity-v3.0.6/src/actions/disruptive/redirect.cc0000664000175000017500000000325714146026157024151 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "src/actions/disruptive/redirect.h" #include #include #include #include #include "modsecurity/transaction.h" #include "src/utils/string.h" namespace modsecurity { namespace actions { namespace disruptive { bool Redirect::init(std::string *error) { m_status = 302; return true; } bool Redirect::evaluate(RuleWithActions *rule, Transaction *transaction, std::shared_ptr rm) { std::string m_urlExpanded(m_string->evaluate(transaction)); /* if it was changed before, lets keep it. */ if (transaction->m_it.status == 200 || (!(transaction->m_it.status <= 307 && transaction->m_it.status >= 301))) { transaction->m_it.status = m_status; } intervention::freeUrl(&transaction->m_it); transaction->m_it.url = strdup(m_urlExpanded.c_str()); transaction->m_it.disruptive = true; intervention::freeLog(&transaction->m_it); rm->m_isDisruptive = true; transaction->m_it.log = strdup( rm->log(RuleMessage::LogMessageInfo::ClientLogMessageInfo).c_str()); return true; } } // namespace disruptive } // namespace actions } // namespace modsecurity modsecurity-v3.0.6/src/actions/disruptive/allow.h0000664000175000017500000000355714146026157023333 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include "modsecurity/actions/action.h" #ifndef SRC_ACTIONS_DISRUPTIVE_ALLOW_H_ #define SRC_ACTIONS_DISRUPTIVE_ALLOW_H_ #ifdef __cplusplus class Transaction; namespace modsecurity { class Transaction; class RuleWithOperator; namespace actions { namespace disruptive { enum AllowType : int { /** * */ NoneAllowType, /** * */ RequestAllowType, /** * */ PhaseAllowType, /** * */ FromNowOnAllowType, }; class Allow : public Action { public: explicit Allow(const std::string &action) : Action(action, RunTimeOnlyIfMatchKind), m_allowType(NoneAllowType) { } bool init(std::string *error) override; bool evaluate(RuleWithActions *rule, Transaction *transaction) override; bool isDisruptive() override { return true; } AllowType m_allowType; static std::string allowTypeToName(AllowType a) { if (a == NoneAllowType) { return "None"; } else if (a == RequestAllowType) { return "Request"; } else if (a == PhaseAllowType) { return "Phase"; } else if (a == FromNowOnAllowType) { return "FromNowOn"; } else { return "Unknown"; } } }; } // namespace disruptive } // namespace actions } // namespace modsecurity #endif #endif // SRC_ACTIONS_DISRUPTIVE_ALLOW_H_ modsecurity-v3.0.6/src/actions/disruptive/pass.cc0000664000175000017500000000224214146026157023307 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "src/actions/disruptive/pass.h" #include #include #include #include "modsecurity/rules_set.h" #include "modsecurity/transaction.h" #include "modsecurity/rule.h" #include "modsecurity/rule_message.h" namespace modsecurity { namespace actions { namespace disruptive { bool Pass::evaluate(RuleWithActions *rule, Transaction *transaction, std::shared_ptr rm) { intervention::free(&transaction->m_it); intervention::reset(&transaction->m_it); ms_dbg_a(transaction, 8, "Running action pass"); return true; } } // namespace disruptive } // namespace actions } // namespace modsecurity modsecurity-v3.0.6/src/actions/disruptive/redirect.h0000664000175000017500000000324414146026157024007 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include #include #include "modsecurity/actions/action.h" #include "modsecurity/rule_message.h" #include "src/run_time_string.h" #ifndef SRC_ACTIONS_DISRUPTIVE_REDIRECT_H_ #define SRC_ACTIONS_DISRUPTIVE_REDIRECT_H_ #ifdef __cplusplus class Transaction; namespace modsecurity { class Transaction; namespace actions { namespace disruptive { class Redirect : public Action { public: explicit Redirect(const std::string &action) : Action(action, RunTimeOnlyIfMatchKind), m_status(0), m_string(nullptr) { } explicit Redirect(std::unique_ptr z) : Action("redirert", RunTimeOnlyIfMatchKind), m_status(0), m_string(std::move(z)) { } bool evaluate(RuleWithActions *rule, Transaction *transaction, std::shared_ptr rm) override; bool init(std::string *error) override; bool isDisruptive() override { return true; } private: int m_status; std::unique_ptr m_string; }; } // namespace disruptive } // namespace actions } // namespace modsecurity #endif #endif // SRC_ACTIONS_DISRUPTIVE_REDIRECT_H_ modsecurity-v3.0.6/src/actions/disruptive/drop.h0000664000175000017500000000231214146026157023145 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include #include "modsecurity/actions/action.h" #include "modsecurity/transaction.h" #include "modsecurity/rule_message.h" #ifndef SRC_ACTIONS_DISRUPTIVE_DROP_H_ #define SRC_ACTIONS_DISRUPTIVE_DROP_H_ namespace modsecurity { namespace actions { namespace disruptive { class Drop : public Action { public: explicit Drop(const std::string &action) : Action(action) { } bool evaluate(RuleWithActions *rule, Transaction *transaction, std::shared_ptr rm) override; bool isDisruptive() override { return true; } }; } // namespace disruptive } // namespace actions } // namespace modsecurity #endif // SRC_ACTIONS_DISRUPTIVE_DROP_H_ modsecurity-v3.0.6/src/actions/disruptive/drop.cc0000664000175000017500000000277614146026157023321 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "src/actions/disruptive/drop.h" #include #include #include #include #include #include "modsecurity/rules_set.h" #include "modsecurity/transaction.h" #include "modsecurity/rule.h" #include "src/utils/string.h" #include "modsecurity/modsecurity.h" namespace modsecurity { namespace actions { namespace disruptive { bool Drop::evaluate(RuleWithActions *rule, Transaction *transaction, std::shared_ptr rm) { ms_dbg_a(transaction, 8, "Running action drop " \ "[executing deny instead of drop.]"); if (transaction->m_it.status == 200) { transaction->m_it.status = 403; } transaction->m_it.disruptive = true; intervention::freeLog(&transaction->m_it); rm->m_isDisruptive = true; transaction->m_it.log = strdup( rm->log(RuleMessage::LogMessageInfo::ClientLogMessageInfo).c_str()); return true; } } // namespace disruptive } // namespace actions } // namespace modsecurity modsecurity-v3.0.6/src/actions/disruptive/deny.h0000664000175000017500000000235514146026157023147 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include #include "modsecurity/rules_set.h" #include "modsecurity/actions/action.h" #include "modsecurity/transaction.h" #include "modsecurity/rule_message.h" #ifndef SRC_ACTIONS_DISRUPTIVE_DENY_H_ #define SRC_ACTIONS_DISRUPTIVE_DENY_H_ namespace modsecurity { namespace actions { namespace disruptive { class Deny : public Action { public: explicit Deny(const std::string &action) : Action(action) { } bool evaluate(RuleWithActions *rule, Transaction *transaction, std::shared_ptr rm) override; bool isDisruptive() override { return true; } }; } // namespace disruptive } // namespace actions } // namespace modsecurity #endif // SRC_ACTIONS_DISRUPTIVE_DENY_H_ modsecurity-v3.0.6/src/actions/no_log.h0000664000175000017500000000211214146026157021256 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include #include "modsecurity/actions/action.h" #ifndef SRC_ACTIONS_NO_LOG_H_ #define SRC_ACTIONS_NO_LOG_H_ class Transaction; namespace modsecurity { class Transaction; namespace actions { class NoLog : public Action { public: explicit NoLog(const std::string &action) : Action(action, RunTimeOnlyIfMatchKind) { } bool evaluate(RuleWithActions *rule, Transaction *transaction, std::shared_ptr rm) override; }; } // namespace actions } // namespace modsecurity #endif // SRC_ACTIONS_NO_LOG_H_ modsecurity-v3.0.6/src/actions/xmlns.h0000664000175000017500000000214614146026157021151 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include "modsecurity/actions/action.h" #ifndef SRC_ACTIONS_XMLNS_H_ #define SRC_ACTIONS_XMLNS_H_ class Transaction; namespace modsecurity { class Transaction; namespace actions { class XmlNS : public Action { public: explicit XmlNS(const std::string &action) : Action(action) { } bool evaluate(RuleWithActions *rule, Transaction *transaction) override { return true; } bool init(std::string *error) override; std::string m_scope; std::string m_href; }; } // namespace actions } // namespace modsecurity #endif // SRC_ACTIONS_XMLNS_H_ modsecurity-v3.0.6/src/actions/set_sid.h0000664000175000017500000000247114146026157021443 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include #include #include "modsecurity/actions/action.h" #include "src/run_time_string.h" #ifndef SRC_ACTIONS_SET_SID_H_ #define SRC_ACTIONS_SET_SID_H_ class Transaction; namespace modsecurity { class Transaction; namespace actions { class SetSID : public Action { public: explicit SetSID(const std::string &_action) : Action(_action) { } explicit SetSID(std::unique_ptr z) : Action("setsid", RunTimeOnlyIfMatchKind), m_string(std::move(z)) { } bool evaluate(RuleWithActions *rule, Transaction *transaction) override; bool init(std::string *error) override; private: std::unique_ptr m_string; }; } // namespace actions } // namespace modsecurity #endif // SRC_ACTIONS_SET_SID_H_ modsecurity-v3.0.6/src/actions/init_col.h0000664000175000017500000000254614146026157021614 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include #include #include "modsecurity/actions/action.h" #include "src/run_time_string.h" #ifndef SRC_ACTIONS_INIT_COL_H_ #define SRC_ACTIONS_INIT_COL_H_ class Transaction; namespace modsecurity { class Transaction; namespace actions { class InitCol : public Action { public: explicit InitCol(const std::string &action) : Action(action) { } InitCol(const std::string &action, std::unique_ptr z) : Action(action, RunTimeOnlyIfMatchKind), m_string(std::move(z)) { } bool evaluate(RuleWithActions *rule, Transaction *transaction) override; bool init(std::string *error) override; private: std::string m_collection_key; std::unique_ptr m_string; }; } // namespace actions } // namespace modsecurity #endif // SRC_ACTIONS_INIT_COL_H_ modsecurity-v3.0.6/src/actions/maturity.cc0000664000175000017500000000230214146026157022016 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "src/actions/maturity.h" #include #include #include "modsecurity/actions/action.h" #include "modsecurity/transaction.h" #include "modsecurity/rule.h" namespace modsecurity { namespace actions { bool Maturity::init(std::string *error) { try { m_maturity = std::stoi(m_parser_payload); } catch (...) { error->assign("Maturity: The input \"" + m_parser_payload + "\" is " \ "not a number."); return false; } return true; } bool Maturity::evaluate(RuleWithActions *rule, Transaction *transaction) { rule->m_maturity = m_maturity; return true; } } // namespace actions } // namespace modsecurity modsecurity-v3.0.6/src/actions/exec.cc0000664000175000017500000000265314146026157021075 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "src/actions/exec.h" #include #include #include "modsecurity/rules_set.h" #include "modsecurity/actions/action.h" #include "modsecurity/transaction.h" #include "modsecurity/rule.h" #include "src/utils/system.h" #include "src/engine/lua.h" namespace modsecurity { namespace actions { bool Exec::init(std::string *error) { std::string err; m_script = utils::find_resource(m_parser_payload, "", &err); if (m_script.size() == 0) { error->assign("exec: Script not found: " + err); return false; } if (engine::Lua::isCompatible(m_script, &m_lua, &err) == false) { error->assign("exec: " + err); return false; } return true; } bool Exec::evaluate(RuleWithActions *rule, Transaction *t) { ms_dbg_a(t, 8, "Running script... " + m_script); m_lua.run(t); return true; } } // namespace actions } // namespace modsecurity modsecurity-v3.0.6/src/actions/no_log.cc0000664000175000017500000000200314146026157021413 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "src/actions/no_log.h" #include #include #include #include "modsecurity/actions/action.h" #include "modsecurity/transaction.h" #include "src/operators/operator.h" #include "modsecurity/rule_message.h" namespace modsecurity { namespace actions { bool NoLog::evaluate(RuleWithActions *rule, Transaction *transaction, std::shared_ptr rm) { rm->m_saveMessage = false; return true; } } // namespace actions } // namespace modsecurity modsecurity-v3.0.6/src/actions/skip.cc0000664000175000017500000000245214146026157021114 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "src/actions/skip.h" #include #include #include "modsecurity/rules_set.h" #include "modsecurity/actions/action.h" #include "modsecurity/transaction.h" namespace modsecurity { namespace actions { bool Skip::init(std::string *error) { try { m_skip_next = std::stoi(m_parser_payload); } catch (...) { error->assign("Skip: The input \"" + m_parser_payload + "\" is " \ "not a number."); return false; } return true; } bool Skip::evaluate(RuleWithActions *rule, Transaction *transaction) { ms_dbg_a(transaction, 5, "Skipping the next " + \ std::to_string(m_skip_next) + " rules."); transaction->m_skip_next = m_skip_next; return true; } } // namespace actions } // namespace modsecurity modsecurity-v3.0.6/src/actions/tag.cc0000664000175000017500000000447514146026157020730 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "src/actions/tag.h" #include #include #include #include "modsecurity/actions/action.h" #include "modsecurity/transaction.h" #include "modsecurity/rule.h" #include "modsecurity/rule_message.h" #ifdef MSC_DOCUMENTATION /** * Description: Assigns a tag (category) to a rule or a chain. * * Action Group: Meta-data * * Example: * * SecRule REQUEST_FILENAME|ARGS_NAMES|ARGS|XML:/* "\bgetparentfolder\b" \ * "phase:2,rev:'2.1.3',capture,t:none,t:htmlEntityDecode,t:compressWhiteSpace,t:lowercase,ctl:auditLogParts=+E,block,msg:'Cross-site Scripting (XSS) Attack',id:'958016',tag:'WEB_ATTACK/XSS',tag:'WASCTC/WASC-8',tag:'WASCTC/WASC-22',tag:'OWASP_TOP_10/A2',tag:'OWASP_AppSensor/IE1',tag:'PCI/6.5.1',logdata:'% \ * {TX.0}',severity:'2',setvar:'tx.msg=%{rule.msg}',setvar:tx.xss_score=+%{tx.critical_anomaly_score},setvar:tx.anomaly_score=+%{tx.critical_anomaly_score},setvar:tx.%{rule.id}-WEB_ATTACK/XSS-%{matched_var_name}=%{tx.0}" * * * The tag information appears along with other rule metadata. The * purpose of the tagging mechanism to allow easy automated categorization * of events. Multiple tags can be specified on the same rule. Use forward * slashes to create a hierarchy of categories (as in the example). Since * ModSecurity 2.6.0 tag supports macro expansion. * * */ #endif namespace modsecurity { namespace actions { std::string Tag::getName(Transaction *transaction) { std::string tag(m_string->evaluate(transaction)); return tag; } bool Tag::evaluate(RuleWithActions *rule, Transaction *transaction, std::shared_ptr rm) { std::string tag = getName(transaction); ms_dbg_a(transaction, 9, "Rule tag: " + tag); rm->m_tags.push_back(tag); return true; } } // namespace actions } // namespace modsecurity modsecurity-v3.0.6/src/actions/set_rsc.h0000664000175000017500000000247114146026157021453 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include #include #include "modsecurity/actions/action.h" #include "src/run_time_string.h" #ifndef SRC_ACTIONS_SET_RSC_H_ #define SRC_ACTIONS_SET_RSC_H_ class Transaction; namespace modsecurity { class Transaction; namespace actions { class SetRSC : public Action { public: explicit SetRSC(const std::string &_action) : Action(_action) { } explicit SetRSC(std::unique_ptr z) : Action("setsrc", RunTimeOnlyIfMatchKind), m_string(std::move(z)) { } bool evaluate(RuleWithActions *rule, Transaction *transaction) override; bool init(std::string *error) override; private: std::unique_ptr m_string; }; } // namespace actions } // namespace modsecurity #endif // SRC_ACTIONS_SET_RSC_H_ modsecurity-v3.0.6/src/actions/init_col.cc0000664000175000017500000000421414146026157021744 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "src/actions/init_col.h" #include #include #include "modsecurity/actions/action.h" #include "modsecurity/transaction.h" #include "modsecurity/rule.h" namespace modsecurity { namespace actions { bool InitCol::init(std::string *error) { int posEquals = m_parser_payload.find("="); if (m_parser_payload.size() < 2) { error->assign("Something wrong with initcol format: too small"); return false; } if (posEquals == std::string::npos) { error->assign("Something wrong with initcol format: missing " \ "equals sign"); return false; } m_collection_key = std::string(m_parser_payload, 0, posEquals); if (m_collection_key != "ip" && m_collection_key != "global" && m_collection_key != "resource") { error->assign("Something wrong with initcol: collection must be " \ "`ip' or `global'"); return false; } return true; } bool InitCol::evaluate(RuleWithActions *rule, Transaction *t) { std::string collectionName(m_string->evaluate(t)); if (m_collection_key == "ip") { t->m_collections.m_ip_collection_key = collectionName; } else if (m_collection_key == "global") { t->m_collections.m_global_collection_key = collectionName; } else if (m_collection_key == "resource") { t->m_collections.m_resource_collection_key = collectionName; } else { return false; } ms_dbg_a(t, 5, "Collection `" + m_collection_key + "' initialized with " \ "value: " + collectionName); return true; } } // namespace actions } // namespace modsecurity modsecurity-v3.0.6/src/actions/chain.cc0000664000175000017500000000156314146026157021232 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "src/actions/chain.h" #include #include #include "modsecurity/transaction.h" #include "modsecurity/rule.h" namespace modsecurity { namespace actions { bool Chain::evaluate(RuleWithActions *rule, Transaction *transaction) { rule->setChained(true); return true; } } // namespace actions } // namespace modsecurity modsecurity-v3.0.6/src/actions/log.cc0000664000175000017500000000207014146026157020723 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "src/actions/log.h" #include #include #include #include "modsecurity/actions/action.h" #include "modsecurity/transaction.h" #include "src/operators/operator.h" #include "modsecurity/rule_message.h" namespace modsecurity { namespace actions { bool Log::evaluate(RuleWithActions *rule, Transaction *transaction, std::shared_ptr rm) { ms_dbg_a(transaction, 9, "Saving transaction to logs"); rm->m_saveMessage = true; return true; } } // namespace actions } // namespace modsecurity modsecurity-v3.0.6/src/actions/chain.h0000664000175000017500000000207114146026157021067 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include "modsecurity/actions/action.h" #ifndef SRC_ACTIONS_CHAIN_H_ #define SRC_ACTIONS_CHAIN_H_ #ifdef __cplusplus class Transaction; namespace modsecurity { class Transaction; class RuleWithOperator; namespace actions { class Chain : public Action { public: explicit Chain(const std::string &action) : Action(action, ConfigurationKind) { } bool evaluate(RuleWithActions *rule, Transaction *transaction) override; }; } // namespace actions } // namespace modsecurity #endif #endif // SRC_ACTIONS_CHAIN_H_ modsecurity-v3.0.6/src/actions/audit_log.cc0000664000175000017500000000207114146026157022112 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "src/actions/audit_log.h" #include #include #include #include "modsecurity/transaction.h" #include "modsecurity/rule_message.h" #include "modsecurity/rules_set.h" namespace modsecurity { namespace actions { bool AuditLog::evaluate(RuleWithActions *rule, Transaction *transaction, std::shared_ptr rm) { rm->m_noAuditLog = false; ms_dbg_a(transaction, 9, "Saving transaction to logs"); rm->m_saveMessage = true; return true; } } // namespace actions } // namespace modsecurity modsecurity-v3.0.6/src/actions/set_env.cc0000664000175000017500000000231514146026157021607 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "src/actions/set_env.h" #include #include #include "modsecurity/transaction.h" #include "modsecurity/rule.h" #include "src/utils/string.h" namespace modsecurity { namespace actions { bool SetENV::init(std::string *error) { return true; } bool SetENV::evaluate(RuleWithActions *rule, Transaction *t) { std::string colNameExpanded(m_string->evaluate(t)); auto pair = utils::string::ssplit_pair(colNameExpanded, '='); ms_dbg_a(t, 8, "Setting envoriment variable: " + pair.first + " to " + pair.second); setenv(pair.first.c_str(), pair.second.c_str(), /*overwrite*/ 1); return true; } } // namespace actions } // namespace modsecurity modsecurity-v3.0.6/src/actions/tag.h0000664000175000017500000000240414146026157020560 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include #include #include "modsecurity/actions/action.h" #include "src/run_time_string.h" #ifndef SRC_ACTIONS_TAG_H_ #define SRC_ACTIONS_TAG_H_ class Transaction; namespace modsecurity { class Transaction; namespace actions { class Tag : public Action { public: explicit Tag(std::unique_ptr z) : Action("tag", RunTimeOnlyIfMatchKind), m_string(std::move(z)) { } std::string getName(Transaction *transaction); bool evaluate(RuleWithActions *rule, Transaction *transaction, std::shared_ptr rm) override; protected: std::unique_ptr m_string; }; } // namespace actions } // namespace modsecurity #endif // SRC_ACTIONS_TAG_H_ modsecurity-v3.0.6/src/actions/capture.cc0000664000175000017500000000202714146026157021607 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "src/actions/capture.h" #include #include #include #include "modsecurity/transaction.h" #include "modsecurity/rule.h" #include "src/operators/operator.h" #include "src/operators/pm.h" #include "src/operators/rx.h" #include "src/operators/contains.h" #include "src/operators/detect_sqli.h" namespace modsecurity { namespace actions { bool Capture::evaluate(RuleWithActions *rule, Transaction *transaction) { return true; } } // namespace actions } // namespace modsecurity modsecurity-v3.0.6/src/actions/maturity.h0000664000175000017500000000217014146026157021663 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include "modsecurity/actions/action.h" #ifndef SRC_ACTIONS_MATURITY_H_ #define SRC_ACTIONS_MATURITY_H_ class Transaction; namespace modsecurity { class Transaction; namespace actions { class Maturity : public Action { public: explicit Maturity(const std::string &action) : Action(action, ConfigurationKind), m_maturity(0) { } bool evaluate(RuleWithActions *rule, Transaction *transaction) override; bool init(std::string *error) override; private: int m_maturity; }; } // namespace actions } // namespace modsecurity #endif // SRC_ACTIONS_MATURITY_H_ modsecurity-v3.0.6/src/actions/skip_after.h0000664000175000017500000000226214146026157022136 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include #include "modsecurity/actions/action.h" #ifndef SRC_ACTIONS_SKIP_AFTER_H_ #define SRC_ACTIONS_SKIP_AFTER_H_ class Transaction; namespace modsecurity { class Transaction; namespace actions { class SkipAfter : public Action { public: explicit SkipAfter(const std::string &action) : Action(action, RunTimeOnlyIfMatchKind), m_skipName(std::make_shared(m_parser_payload)) { } bool evaluate(RuleWithActions *rule, Transaction *transaction) override; private: std::shared_ptr m_skipName; }; } // namespace actions } // namespace modsecurity #endif // SRC_ACTIONS_SKIP_AFTER_H_ modsecurity-v3.0.6/src/actions/set_uid.cc0000664000175000017500000000225214146026157021600 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "src/actions/set_uid.h" #include #include #include "modsecurity/transaction.h" #include "modsecurity/rule.h" namespace modsecurity { namespace actions { bool SetUID::init(std::string *error) { return true; } bool SetUID::evaluate(RuleWithActions *rule, Transaction *t) { std::string colNameExpanded(m_string->evaluate(t)); ms_dbg_a(t, 8, "User collection initiated with value: \'" + colNameExpanded + "\'."); t->m_collections.m_user_collection_key = colNameExpanded; t->m_variableUserID.set(colNameExpanded, t->m_variableOffset); return true; } } // namespace actions } // namespace modsecurity modsecurity-v3.0.6/src/actions/log_data.cc0000664000175000017500000000220214146026157021711 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "src/actions/log_data.h" #include #include #include #include "modsecurity/actions/action.h" #include "modsecurity/transaction.h" #include "modsecurity/rule.h" #include "modsecurity/rule_message.h" namespace modsecurity { namespace actions { bool LogData::evaluate(RuleWithActions *rule, Transaction *transaction, std::shared_ptr rm) { rm->m_data = data(transaction); return true; } std::string LogData::data(Transaction *transaction) { std::string a(m_string->evaluate(transaction)); return a; } } // namespace actions } // namespace modsecurity modsecurity-v3.0.6/src/actions/ctl/0000775000175000017500000000000014146026763020421 5ustar mhsvierulamhsvierulamodsecurity-v3.0.6/src/actions/ctl/rule_engine.h0000664000175000017500000000244714146026157023072 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include "modsecurity/rules_set_properties.h" #include "modsecurity/actions/action.h" #include "modsecurity/transaction.h" #ifndef SRC_ACTIONS_CTL_RULE_ENGINE_H_ #define SRC_ACTIONS_CTL_RULE_ENGINE_H_ namespace modsecurity { namespace actions { namespace ctl { class RuleEngine : public Action { public: explicit RuleEngine(const std::string &action) : Action(action, RunTimeOnlyIfMatchKind), m_ruleEngine(RulesSetProperties::PropertyNotSetRuleEngine) { } bool init(std::string *error) override; bool evaluate(RuleWithActions *rule, Transaction *transaction) override; RulesSetProperties::RuleEngine m_ruleEngine; }; } // namespace ctl } // namespace actions } // namespace modsecurity #endif // SRC_ACTIONS_CTL_RULE_ENGINE_H_ modsecurity-v3.0.6/src/actions/ctl/request_body_processor_urlencoded.cc0000664000175000017500000000210614146026157027734 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "src/actions/ctl/request_body_processor_urlencoded.h" #include #include #include "modsecurity/transaction.h" namespace modsecurity { namespace actions { namespace ctl { bool RequestBodyProcessorURLENCODED::evaluate(RuleWithActions *rule, Transaction *transaction) { transaction->m_requestBodyType = Transaction::WWWFormUrlEncoded; transaction->m_variableReqbodyProcessor.set("URLENCODED", transaction->m_variableOffset); return true; } } // namespace ctl } // namespace actions } // namespace modsecurity modsecurity-v3.0.6/src/actions/ctl/rule_remove_target_by_tag.h0000664000175000017500000000236514146026157026014 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include "modsecurity/actions/action.h" #include "modsecurity/transaction.h" #ifndef SRC_ACTIONS_CTL_RULE_REMOVE_TARGET_BY_TAG_H_ #define SRC_ACTIONS_CTL_RULE_REMOVE_TARGET_BY_TAG_H_ namespace modsecurity { namespace actions { namespace ctl { class RuleRemoveTargetByTag : public Action { public: explicit RuleRemoveTargetByTag(const std::string &action) : Action(action, RunTimeOnlyIfMatchKind) { } bool init(std::string *error) override; bool evaluate(RuleWithActions *rule, Transaction *transaction) override; std::string m_tag; std::string m_target; }; } // namespace ctl } // namespace actions } // namespace modsecurity #endif // SRC_ACTIONS_CTL_RULE_REMOVE_TARGET_BY_TAG_H_ modsecurity-v3.0.6/src/actions/ctl/rule_remove_target_by_id.cc0000664000175000017500000000311114146026157025761 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "src/actions/ctl/rule_remove_target_by_id.h" #include #include #include #include #include "modsecurity/transaction.h" #include "src/utils/string.h" namespace modsecurity { namespace actions { namespace ctl { bool RuleRemoveTargetById::init(std::string *error) { std::string what(m_parser_payload, 21, m_parser_payload.size() - 21); std::vector param = utils::string::split(what, ';'); if (param.size() < 2) { error->assign(what + " is not a valid `ID;VARIABLE'"); return false; } try { m_id = std::stoi(param[0]); } catch(...) { error->assign("Not able to convert '" + param[0] + "' into a number"); return false; } m_target = param[1]; return true; } bool RuleRemoveTargetById::evaluate(RuleWithActions *rule, Transaction *transaction) { transaction->m_ruleRemoveTargetById.push_back( std::make_pair(m_id, m_target)); return true; } } // namespace ctl } // namespace actions } // namespace modsecurity modsecurity-v3.0.6/src/actions/ctl/rule_remove_by_id.h0000664000175000017500000000234614146026157024266 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include "modsecurity/actions/action.h" #include "modsecurity/transaction.h" #ifndef SRC_ACTIONS_CTL_RULE_REMOVE_BY_ID_H_ #define SRC_ACTIONS_CTL_RULE_REMOVE_BY_ID_H_ namespace modsecurity { namespace actions { namespace ctl { class RuleRemoveById : public Action { public: explicit RuleRemoveById(const std::string &action) : Action(action, RunTimeOnlyIfMatchKind) { } bool init(std::string *error) override; bool evaluate(RuleWithActions *rule, Transaction *transaction) override; std::list > m_ranges; std::list m_ids; }; } // namespace ctl } // namespace actions } // namespace modsecurity #endif // SRC_ACTIONS_CTL_RULE_REMOVE_BY_ID_H_ modsecurity-v3.0.6/src/actions/ctl/rule_remove_by_tag.h0000664000175000017500000000231514146026157024441 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include "modsecurity/actions/action.h" #include "modsecurity/transaction.h" #ifndef SRC_ACTIONS_CTL_RULE_REMOVE_BY_TAG_H_ #define SRC_ACTIONS_CTL_RULE_REMOVE_BY_TAG_H_ namespace modsecurity { namespace actions { namespace ctl { class RuleRemoveByTag : public Action { public: explicit RuleRemoveByTag(const std::string &action) : Action(action, RunTimeOnlyIfMatchKind), m_tag("") { } bool init(std::string *error) override; bool evaluate(RuleWithActions *rule, Transaction *transaction) override; std::string m_tag; }; } // namespace ctl } // namespace actions } // namespace modsecurity #endif // SRC_ACTIONS_CTL_RULE_REMOVE_BY_TAG_H_ modsecurity-v3.0.6/src/actions/ctl/request_body_processor_json.h0000664000175000017500000000224214146026157026424 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include "modsecurity/actions/action.h" #include "modsecurity/transaction.h" #ifndef SRC_ACTIONS_CTL_REQUEST_BODY_PROCESSOR_JSON_H_ #define SRC_ACTIONS_CTL_REQUEST_BODY_PROCESSOR_JSON_H_ namespace modsecurity { namespace actions { namespace ctl { class RequestBodyProcessorJSON : public Action { public: explicit RequestBodyProcessorJSON(const std::string &action) : Action(action, RunTimeOnlyIfMatchKind) { } bool evaluate(RuleWithActions *rule, Transaction *transaction) override; }; } // namespace ctl } // namespace actions } // namespace modsecurity #endif // SRC_ACTIONS_CTL_REQUEST_BODY_PROCESSOR_JSON_H_ modsecurity-v3.0.6/src/actions/ctl/request_body_processor_urlencoded.h0000664000175000017500000000230014146026157027572 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include "modsecurity/actions/action.h" #include "modsecurity/transaction.h" #ifndef SRC_ACTIONS_CTL_REQUEST_BODY_PROCESSOR_URLENCODED_H_ #define SRC_ACTIONS_CTL_REQUEST_BODY_PROCESSOR_URLENCODED_H_ namespace modsecurity { namespace actions { namespace ctl { class RequestBodyProcessorURLENCODED : public Action { public: explicit RequestBodyProcessorURLENCODED(const std::string &action) : Action(action, RunTimeOnlyIfMatchKind) { } bool evaluate(RuleWithActions *rule, Transaction *transaction) override; }; } // namespace ctl } // namespace actions } // namespace modsecurity #endif // SRC_ACTIONS_CTL_REQUEST_BODY_PROCESSOR_URLENCODED_H_ modsecurity-v3.0.6/src/actions/ctl/request_body_processor_xml.h0000664000175000017500000000223514146026157026255 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include "modsecurity/actions/action.h" #include "modsecurity/transaction.h" #ifndef SRC_ACTIONS_CTL_REQUEST_BODY_PROCESSOR_XML_H_ #define SRC_ACTIONS_CTL_REQUEST_BODY_PROCESSOR_XML_H_ namespace modsecurity { namespace actions { namespace ctl { class RequestBodyProcessorXML : public Action { public: explicit RequestBodyProcessorXML(const std::string &action) : Action(action, RunTimeOnlyIfMatchKind) { } bool evaluate(RuleWithActions *rule, Transaction *transaction) override; }; } // namespace ctl } // namespace actions } // namespace modsecurity #endif // SRC_ACTIONS_CTL_REQUEST_BODY_PROCESSOR_XML_H_ modsecurity-v3.0.6/src/actions/ctl/request_body_processor_json.cc0000664000175000017500000000206714146026157026567 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "src/actions/ctl/request_body_processor_json.h" #include #include #include "modsecurity/transaction.h" namespace modsecurity { namespace actions { namespace ctl { bool RequestBodyProcessorJSON::evaluate(RuleWithActions *rule, Transaction *transaction) { transaction->m_requestBodyProcessor = Transaction::JSONRequestBody; transaction->m_variableReqbodyProcessor.set("JSON", transaction->m_variableOffset); return true; } } // namespace ctl } // namespace actions } // namespace modsecurity modsecurity-v3.0.6/src/actions/ctl/request_body_access.cc0000664000175000017500000000306214146026157024754 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "src/actions/ctl/request_body_access.h" #include #include #include "modsecurity/rules_set_properties.h" #include "modsecurity/transaction.h" namespace modsecurity { namespace actions { namespace ctl { bool RequestBodyAccess::init(std::string *error) { std::string what(m_parser_payload, 18, m_parser_payload.size() - 18); if (what == "true") { m_request_body_access = true; } else if (what == "false") { m_request_body_access = false; } else { error->assign("Internal error. Expected: true or false, got: " \ + m_parser_payload); return false; } return true; } bool RequestBodyAccess::evaluate(RuleWithActions *rule, Transaction *transaction) { if (m_request_body_access) { transaction->m_requestBodyAccess = RulesSetProperties::TrueConfigBoolean; } else { transaction->m_requestBodyAccess = RulesSetProperties::FalseConfigBoolean; } return true; } } // namespace ctl } // namespace actions } // namespace modsecurity modsecurity-v3.0.6/src/actions/ctl/rule_remove_target_by_tag.cc0000664000175000017500000000265414146026157026153 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "src/actions/ctl/rule_remove_target_by_tag.h" #include #include #include #include #include "modsecurity/transaction.h" #include "src/utils/string.h" namespace modsecurity { namespace actions { namespace ctl { bool RuleRemoveTargetByTag::init(std::string *error) { std::string what(m_parser_payload, 22, m_parser_payload.size() - 22); std::vector param = utils::string::split(what, ';'); if (param.size() < 2) { error->assign(what + " is not a valid `TAG;VARIABLE'"); return false; } m_tag = param[0]; m_target = param[1]; return true; } bool RuleRemoveTargetByTag::evaluate(RuleWithActions *rule, Transaction *transaction) { transaction->m_ruleRemoveTargetByTag.push_back( std::make_pair(m_tag, m_target)); return true; } } // namespace ctl } // namespace actions } // namespace modsecurity modsecurity-v3.0.6/src/actions/ctl/audit_log_parts.h0000664000175000017500000000237414146026157023755 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include "modsecurity/actions/action.h" #include "modsecurity/transaction.h" #ifndef SRC_ACTIONS_CTL_AUDIT_LOG_PARTS_H_ #define SRC_ACTIONS_CTL_AUDIT_LOG_PARTS_H_ namespace modsecurity { namespace actions { namespace ctl { class AuditLogParts : public Action { public: explicit AuditLogParts(const std::string &action) : Action(action, RunTimeOnlyIfMatchKind), mPartsAction(0), mParts("") { } bool evaluate(RuleWithActions *rule, Transaction *transaction) override; bool init(std::string *error) override; protected: int mPartsAction; std::string mParts; }; } // namespace ctl } // namespace actions } // namespace modsecurity #endif // SRC_ACTIONS_CTL_AUDIT_LOG_PARTS_H_ modsecurity-v3.0.6/src/actions/ctl/rule_engine.cc0000664000175000017500000000345214146026157023225 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "src/actions/ctl/rule_engine.h" #include #include #include "modsecurity/rules_set_properties.h" #include "modsecurity/rules_set.h" #include "modsecurity/transaction.h" namespace modsecurity { namespace actions { namespace ctl { bool RuleEngine::init(std::string *error) { std::string what(m_parser_payload, 11, m_parser_payload.size() - 11); if (what == "on") { m_ruleEngine = RulesSetProperties::EnabledRuleEngine; } else if (what == "off") { m_ruleEngine = RulesSetProperties::DisabledRuleEngine; } else if (what == "detectiononly") { m_ruleEngine = RulesSetProperties::DetectionOnlyRuleEngine; } else { error->assign("Internal error. Expected: On, Off or DetectionOnly; " \ "got: " + m_parser_payload); return false; } return true; } bool RuleEngine::evaluate(RuleWithActions *rule, Transaction *transaction) { std::stringstream a; a << "Setting SecRuleEngine to "; a << modsecurity::RulesSetProperties::ruleEngineStateString(m_ruleEngine); a << " as requested by a ctl:ruleEngine action"; ms_dbg_a(transaction, 8, a.str()); transaction->m_secRuleEngine = m_ruleEngine; return true; } } // namespace ctl } // namespace actions } // namespace modsecurity modsecurity-v3.0.6/src/actions/ctl/rule_remove_by_tag.cc0000664000175000017500000000211714146026157024577 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "src/actions/ctl/rule_remove_by_tag.h" #include #include #include "modsecurity/transaction.h" namespace modsecurity { namespace actions { namespace ctl { bool RuleRemoveByTag::init(std::string *error) { std::string what(m_parser_payload, 16, m_parser_payload.size() - 16); m_tag = what; return true; } bool RuleRemoveByTag::evaluate(RuleWithActions *rule, Transaction *transaction) { transaction->m_ruleRemoveByTag.push_back(m_tag); return true; } } // namespace ctl } // namespace actions } // namespace modsecurity modsecurity-v3.0.6/src/actions/ctl/audit_log_parts.cc0000664000175000017500000000240314146026157024104 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "src/actions/ctl/audit_log_parts.h" #include #include #include #include "modsecurity/transaction.h" namespace modsecurity { namespace actions { namespace ctl { bool AuditLogParts::init(std::string *error) { std::string what(m_parser_payload, 14, 1); mParts = std::string(m_parser_payload, 15, m_parser_payload.length()-15); if (what == "+") { mPartsAction = 0; } else { mPartsAction = 1; } return true; } bool AuditLogParts::evaluate(RuleWithActions *rule, Transaction *transaction) { transaction->m_auditLogModifier.push_back( std::make_pair(mPartsAction, mParts)); return true; } } // namespace ctl } // namespace actions } // namespace modsecurity modsecurity-v3.0.6/src/actions/ctl/request_body_access.h0000664000175000017500000000236014146026157024616 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include "modsecurity/actions/action.h" #include "modsecurity/transaction.h" #ifndef SRC_ACTIONS_CTL_REQUEST_BODY_ACCESS_H_ #define SRC_ACTIONS_CTL_REQUEST_BODY_ACCESS_H_ namespace modsecurity { namespace actions { namespace ctl { class RequestBodyAccess : public Action { public: explicit RequestBodyAccess(const std::string &action) : Action(action, RunTimeOnlyIfMatchKind), m_request_body_access(false) { } bool init(std::string *error) override; bool evaluate(RuleWithActions *rule, Transaction *transaction) override; bool m_request_body_access; }; } // namespace ctl } // namespace actions } // namespace modsecurity #endif // SRC_ACTIONS_CTL_REQUEST_BODY_ACCESS_H_ modsecurity-v3.0.6/src/actions/ctl/request_body_processor_xml.cc0000664000175000017500000000206314146026157026412 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "src/actions/ctl/request_body_processor_xml.h" #include #include #include "modsecurity/transaction.h" namespace modsecurity { namespace actions { namespace ctl { bool RequestBodyProcessorXML::evaluate(RuleWithActions *rule, Transaction *transaction) { transaction->m_requestBodyProcessor = Transaction::XMLRequestBody; transaction->m_variableReqbodyProcessor.set("XML", transaction->m_variableOffset); return true; } } // namespace ctl } // namespace actions } // namespace modsecurity modsecurity-v3.0.6/src/actions/ctl/rule_remove_target_by_id.h0000664000175000017500000000241614146026157025632 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include "modsecurity/actions/action.h" #include "modsecurity/transaction.h" #ifndef SRC_ACTIONS_CTL_RULE_REMOVE_TARGET_BY_ID_H_ #define SRC_ACTIONS_CTL_RULE_REMOVE_TARGET_BY_ID_H_ namespace modsecurity { namespace actions { namespace ctl { class RuleRemoveTargetById : public Action { public: explicit RuleRemoveTargetById(const std::string &action) : Action(action, RunTimeOnlyIfMatchKind), m_id(0), m_target("") { } bool init(std::string *error) override; bool evaluate(RuleWithActions *rule, Transaction *transaction) override; int m_id; std::string m_target; }; } // namespace ctl } // namespace actions } // namespace modsecurity #endif // SRC_ACTIONS_CTL_RULE_REMOVE_TARGET_BY_ID_H_ modsecurity-v3.0.6/src/actions/ctl/rule_remove_by_id.cc0000664000175000017500000000536014146026157024423 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "src/actions/ctl/rule_remove_by_id.h" #include #include #include "modsecurity/transaction.h" #include "src/utils/string.h" namespace modsecurity { namespace actions { namespace ctl { bool RuleRemoveById::init(std::string *error) { std::string what(m_parser_payload, 15, m_parser_payload.size() - 15); bool added = false; std::vector toRemove = utils::string::ssplit(what, ' '); for (std::string &a : toRemove) { std::string b = modsecurity::utils::string::parserSanitizer(a); if (b.size() == 0) { continue; } size_t dash = b.find('-'); if (dash != std::string::npos) { std::string n1s = std::string(b, 0, dash); std::string n2s = std::string(b, dash + 1, b.size() - (dash + 1)); int n1n = 0; int n2n = 0; try { n1n = std::stoi(n1s); added = true; } catch (...) { error->assign("Not a number: " + n1s); return false; } try { n2n = std::stoi(n2s); added = true; } catch (...) { error->assign("Not a number: " + n2s); return false; } if (n1n > n2n) { error->assign("Invalid range: " + b); return false; } m_ranges.push_back(std::make_pair(n1n, n2n)); added = true; } else { try { int num = std::stoi(b); m_ids.push_back(num); added = true; } catch (...) { error->assign("Not a number or range: " + b); return false; } } } if (added) { return true; } error->assign("Not a number or range: " + what); return false; } bool RuleRemoveById::evaluate(RuleWithActions *rule, Transaction *transaction) { for (auto &i : m_ids) { transaction->m_ruleRemoveById.push_back(i); } for (auto &i : m_ranges) { transaction->m_ruleRemoveByIdRange.push_back(i); } return true; } } // namespace ctl } // namespace actions } // namespace modsecurity modsecurity-v3.0.6/src/actions/msg.h0000664000175000017500000000260114146026157020572 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include #include #include "modsecurity/actions/action.h" #include "modsecurity/rule_message.h" #include "src/run_time_string.h" #ifndef SRC_ACTIONS_MSG_H_ #define SRC_ACTIONS_MSG_H_ class Transaction; namespace modsecurity { class Transaction; namespace actions { class Msg : public Action { public: explicit Msg(const std::string &action) : Action(action, RunTimeOnlyIfMatchKind) { } explicit Msg(std::unique_ptr z) : Action("msg", RunTimeOnlyIfMatchKind), m_string(std::move(z)) { } bool evaluate(RuleWithActions *rule, Transaction *transaction, std::shared_ptr rm) override; std::string data(Transaction *Transaction); std::unique_ptr m_string; }; } // namespace actions } // namespace modsecurity #endif // SRC_ACTIONS_MSG_H_ modsecurity-v3.0.6/src/actions/rev.cc0000664000175000017500000000175514146026157020747 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "src/actions/rev.h" #include #include #include "modsecurity/actions/action.h" #include "modsecurity/transaction.h" #include "modsecurity/rule.h" namespace modsecurity { namespace actions { bool Rev::init(std::string *error) { m_rev = m_parser_payload; return true; } bool Rev::evaluate(RuleWithActions *rule, Transaction *transaction) { rule->m_rev = m_rev; return true; } } // namespace actions } // namespace modsecurity modsecurity-v3.0.6/src/actions/block.h0000664000175000017500000000221014146026157021072 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include #include "modsecurity/actions/action.h" #include "modsecurity/rule_message.h" #ifndef SRC_ACTIONS_DISRUPTIVE_BLOCK_H_ #define SRC_ACTIONS_DISRUPTIVE_BLOCK_H_ #ifdef __cplusplus class Transaction; namespace modsecurity { class Transaction; namespace actions { class Block : public Action { public: explicit Block(const std::string &action) : Action(action) { } bool evaluate(RuleWithActions *rule, Transaction *transaction, std::shared_ptr rm) override; }; } // namespace actions } // namespace modsecurity #endif #endif // SRC_ACTIONS_DISRUPTIVE_BLOCK_H_ modsecurity-v3.0.6/src/actions/log_data.h0000664000175000017500000000257214146026157021565 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include #include #include "modsecurity/actions/action.h" #include "src/run_time_string.h" #ifndef SRC_ACTIONS_LOG_DATA_H_ #define SRC_ACTIONS_LOG_DATA_H_ class Transaction; namespace modsecurity { class Transaction; namespace actions { class LogData : public Action { public: explicit LogData(const std::string &action) : Action(action, RunTimeOnlyIfMatchKind) { } explicit LogData(std::unique_ptr z) : Action("logdata", RunTimeOnlyIfMatchKind), m_string(std::move(z)) { } bool evaluate(RuleWithActions *rule, Transaction *transaction, std::shared_ptr rm) override; std::string data(Transaction *Transaction); std::unique_ptr m_string; }; } // namespace actions } // namespace modsecurity #endif // SRC_ACTIONS_LOG_DATA_H_ modsecurity-v3.0.6/src/rule_script.cc0000664000175000017500000000216314146026157021040 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "src/rule_script.h" namespace modsecurity { bool RuleScript::init(std::string *err) { return m_lua.load(m_name, err); } bool RuleScript::evaluate(Transaction *trans, std::shared_ptr ruleMessage) { ms_dbg_a(trans, 4, " Executing script: " + m_name + "."); bool containsDisruptive = false; executeActionsIndependentOfChainedRuleResult(trans, &containsDisruptive, ruleMessage); bool ret = m_lua.run(trans); if (ret) { executeActionsAfterFullMatch(trans, containsDisruptive, ruleMessage); } return ret; } } // namespace modsecurity modsecurity-v3.0.6/src/variables/0000775000175000017500000000000014146026763020147 5ustar mhsvierulamhsvierulamodsecurity-v3.0.6/src/variables/variable.cc0000664000175000017500000000456314146026157022250 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "src/variables/variable.h" #include #include #include #include #include "modsecurity/transaction.h" #include "src/utils/string.h" namespace modsecurity { namespace variables { Variable::Variable(const std::string &name) : m_name(name), m_collectionName("") { size_t a = m_name.find(":"); if (a == std::string::npos) { a = m_name.find("."); } if (a != std::string::npos) { m_collectionName = utils::string::toupper(std::string(m_name, 0, a)); m_name = std::string(m_name, a + 1, m_name.size()); m_fullName = std::make_shared(m_collectionName + ":" + m_name); } else { m_fullName = std::make_shared(m_name); m_collectionName = m_name; m_name = ""; } } Variable::Variable(Variable *var) : m_name(var->m_name), m_collectionName(var->m_collectionName), m_fullName(var->m_fullName) { } void Variable::addsKeyExclusion(Variable *v) { std::unique_ptr r; VariableModificatorExclusion *ve = \ dynamic_cast(v); VariableRegex *vr; if (!ve) { return; } vr = dynamic_cast(ve->m_base.get()); if (vr == NULL) { r.reset(new KeyExclusionString(v->m_name)); } else { r.reset(new KeyExclusionRegex(vr->m_regex)); } m_keyExclusion.push_back(std::move(r)); } std::string operator+(const std::string &a, Variable *v) { return a + *v->m_fullName.get(); } std::string operator+(const std::string &a, Variables *v) { std::string test; for (auto &b : *v) { if (test.empty()) { test = std::string("") + b; } else { test = test + "|" + b; } } return a + test; } } // namespace variables } // namespace modsecurity modsecurity-v3.0.6/src/variables/request_cookies.h0000664000175000017500000000173314146026157023525 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include #include #include #include #ifndef SRC_VARIABLES_REQUEST_COOKIES_H_ #define SRC_VARIABLES_REQUEST_COOKIES_H_ #include "src/variables/variable.h" namespace modsecurity { class Transaction; namespace variables { DEFINE_VARIABLE_DICT(RequestCookies, REQUEST_COOKIES, m_variableRequestCookies) } // namespace variables } // namespace modsecurity #endif // SRC_VARIABLES_REQUEST_COOKIES_H_ modsecurity-v3.0.6/src/variables/inbound_data_error.h0000664000175000017500000000175114146026157024161 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include #include #include #include #ifndef SRC_VARIABLES_INBOUND_DATA_ERROR_H_ #define SRC_VARIABLES_INBOUND_DATA_ERROR_H_ #include "src/variables/variable.h" namespace modsecurity { class Transaction; namespace variables { DEFINE_VARIABLE(InboundDataError, INBOUND_DATA_ERROR, m_variableInboundDataError) } // namespace variables } // namespace modsecurity #endif // SRC_VARIABLES_INBOUND_DATA_ERROR_H_ modsecurity-v3.0.6/src/variables/duration.cc0000664000175000017500000000223114146026157022276 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "src/variables/duration.h" #include #include #include #include #include #include "modsecurity/transaction.h" #include "src/utils/system.h" namespace modsecurity { namespace variables { void Duration::evaluate(Transaction *transaction, RuleWithActions *rule, std::vector *l) { double e = utils::cpu_seconds() - transaction->m_creationTimeStamp; transaction->m_variableDuration.assign(std::to_string(e)); l->push_back(new VariableValue(&m_retName, &transaction->m_variableDuration)); } } // namespace variables } // namespace modsecurity modsecurity-v3.0.6/src/variables/env.cc0000664000175000017500000000333614146026157021250 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "src/variables/env.h" #include #include #include #include #include #include #include #include #include "modsecurity/transaction.h" extern char **environ; namespace modsecurity { namespace variables { void Env::evaluate(Transaction *transaction, RuleWithActions *rule, std::vector *l) { for (char **current = environ; *current; current++) { std::string env = std::string(*current); size_t pos = env.find_first_of("="); if (pos == std::string::npos) { continue; } std::string key = std::string(env, 0, pos); std::string value = std::string(env, pos+1, env.length() - (pos + 1)); std::pair a(key, value); transaction->m_variableEnvs.insert(a); } for (auto& x : transaction->m_variableEnvs) { if (x.first != m_name && m_name.length() > 0) { continue; } if (!m_keyExclusion.toOmit(x.first)) { l->push_back(new VariableValue(&m_collectionName, &x.first, &x.second)); } } } } // namespace variables } // namespace modsecurity modsecurity-v3.0.6/src/variables/request_headers_names.h0000664000175000017500000000200014146026157024653 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include #include #include #include #ifndef SRC_VARIABLES_REQUEST_HEADERS_NAMES_H_ #define SRC_VARIABLES_REQUEST_HEADERS_NAMES_H_ #include "src/variables/variable.h" namespace modsecurity { class Transaction; namespace variables { DEFINE_VARIABLE_DICT(RequestHeadersNames, REQUEST_HEADERS_NAMES, m_variableRequestHeadersNames) } // namespace variables } // namespace modsecurity #endif // SRC_VARIABLES_REQUEST_HEADERS_NAMES_H_ modsecurity-v3.0.6/src/variables/multipart_invalid_quoting.h0000664000175000017500000000202314146026157025607 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include #include #include #include #ifndef SRC_VARIABLES_MULTIPART_INVALID_QUOTING_H_ #define SRC_VARIABLES_MULTIPART_INVALID_QUOTING_H_ #include "src/variables/variable.h" namespace modsecurity { class Transaction; namespace variables { DEFINE_VARIABLE(MultipartInvalidQuoting, MULTIPART_INVALID_QUOTING, m_variableMultipartInvalidQuoting) } // namespace variables } // namespace modsecurity #endif // SRC_VARIABLES_MULTIPART_INVALID_QUOTING_H_ modsecurity-v3.0.6/src/variables/time_sec.cc0000664000175000017500000000253214146026157022245 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "src/variables/time_sec.h" #include #include #include #include #include #include #include #include #include #include #include #include "modsecurity/transaction.h" namespace modsecurity { namespace variables { void TimeSec::evaluate(Transaction *transaction, RuleWithActions *rule, std::vector *l) { char tstr[200]; struct tm timeinfo; time_t timer; time(&timer); memset(tstr, '\0', 200); localtime_r(&timer, &timeinfo); strftime(tstr, 200, "%S", &timeinfo); transaction->m_variableTimeSec.assign(tstr); l->push_back(new VariableValue(&m_retName, &transaction->m_variableTimeSec)); } } // namespace variables } // namespace modsecurity modsecurity-v3.0.6/src/variables/files_tmp_names.h0000664000175000017500000000172714146026157023471 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include #include #include #include #ifndef SRC_VARIABLES_FILES_TMP_NAMES_H_ #define SRC_VARIABLES_FILES_TMP_NAMES_H_ #include "src/variables/variable.h" namespace modsecurity { class Transaction; namespace variables { DEFINE_VARIABLE_DICT(FilesTmpNames, FILES_TMPNAMES, m_variableFilesTmpNames) } // namespace variables } // namespace modsecurity #endif // SRC_VARIABLES_FILES_TMP_NAMES_H_ modsecurity-v3.0.6/src/variables/tx.h0000664000175000017500000000576114146026157020761 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include #include #include #include #include #ifndef SRC_VARIABLES_TX_H_ #define SRC_VARIABLES_TX_H_ #include "src/variables/variable.h" #include "src/run_time_string.h" namespace modsecurity { class Transaction; namespace variables { class Tx_DictElement : public Variable { public: explicit Tx_DictElement(const std::string &dictElement) : Variable("TX:" + dictElement), m_dictElement("TX:" + dictElement) { } void evaluate(Transaction *t, RuleWithActions *rule, std::vector *l) override { t->m_collections.m_tx_collection->resolveMultiMatches( m_name, l, m_keyExclusion); } std::string m_dictElement; }; class Tx_NoDictElement : public Variable { public: Tx_NoDictElement() : Variable("TX") { } void evaluate(Transaction *t, RuleWithActions *rule, std::vector *l) override { t->m_collections.m_tx_collection->resolveMultiMatches("", l, m_keyExclusion); } }; class Tx_DictElementRegexp : public VariableRegex { public: explicit Tx_DictElementRegexp(const std::string &dictElement) : VariableRegex("TX", dictElement), m_dictElement(dictElement) { } void evaluate(Transaction *t, RuleWithActions *rule, std::vector *l) override { t->m_collections.m_tx_collection->resolveRegularExpression( m_dictElement, l, m_keyExclusion); } std::string m_dictElement; }; class Tx_DynamicElement : public Variable { public: explicit Tx_DynamicElement(std::unique_ptr dictElement) : Variable("TX:dynamic"), m_string(std::move(dictElement)) { } void evaluate(Transaction *t, RuleWithActions *rule, std::vector *l) override { std::string string = m_string->evaluate(t); t->m_collections.m_tx_collection->resolveMultiMatches(string, l, m_keyExclusion); } static void del(Transaction *t, const std::string &k) { t->m_collections.m_tx_collection->del(k); } static void storeOrUpdateFirst(Transaction *t, const std::string &var, std::string value) { t->m_collections.m_tx_collection->storeOrUpdateFirst(var, value); } std::unique_ptr m_string; }; } // namespace variables } // namespace modsecurity #endif // SRC_VARIABLES_TX_H_ modsecurity-v3.0.6/src/variables/request_method.h0000664000175000017500000000171714146026157023353 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include #include #include #include #ifndef SRC_VARIABLES_REQUEST_METHOD_H_ #define SRC_VARIABLES_REQUEST_METHOD_H_ #include "src/variables/variable.h" namespace modsecurity { class Transaction; namespace variables { DEFINE_VARIABLE(RequestMethod, REQUEST_METHOD, m_variableRequestMethod) } // namespace variables } // namespace modsecurity #endif // SRC_VARIABLES_REQUEST_METHOD_H_ modsecurity-v3.0.6/src/variables/time_wday.cc0000664000175000017500000000253614146026157022443 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "src/variables/time_wday.h" #include #include #include #include #include #include #include #include #include #include #include #include "modsecurity/transaction.h" namespace modsecurity { namespace variables { void TimeWDay::evaluate(Transaction *transaction, RuleWithActions *rule, std::vector *l) { char tstr[200]; struct tm timeinfo; time_t timer; time(&timer); memset(tstr, '\0', 200); localtime_r(&timer, &timeinfo); strftime(tstr, 200, "%u", &timeinfo); transaction->m_variableTimeWDay.assign(tstr); l->push_back(new VariableValue(&m_retName, &transaction->m_variableTimeWDay)); } } // namespace variables } // namespace modsecurity modsecurity-v3.0.6/src/variables/ip.h0000664000175000017500000000705014146026157020727 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include #include #include #include #include #ifndef SRC_VARIABLES_IP_H_ #define SRC_VARIABLES_IP_H_ #include "src/variables/variable.h" #include "src/run_time_string.h" namespace modsecurity { class Transaction; namespace variables { class Ip_DictElement : public Variable { public: explicit Ip_DictElement(const std::string &dictElement) : Variable("IP:" + dictElement), m_dictElement("IP:" + dictElement) { } void evaluate(Transaction *t, RuleWithActions *rule, std::vector *l) override { t->m_collections.m_ip_collection->resolveMultiMatches( m_name, t->m_collections.m_ip_collection_key, t->m_rules->m_secWebAppId.m_value, l, m_keyExclusion); } std::string m_dictElement; }; class Ip_NoDictElement : public Variable { public: Ip_NoDictElement() : Variable("IP") { } void evaluate(Transaction *t, RuleWithActions *rule, std::vector *l) override { t->m_collections.m_ip_collection->resolveMultiMatches("", t->m_collections.m_ip_collection_key, t->m_rules->m_secWebAppId.m_value, l, m_keyExclusion); } }; class Ip_DictElementRegexp : public VariableRegex { public: explicit Ip_DictElementRegexp(const std::string &dictElement) : VariableRegex("IP", dictElement), m_dictElement(dictElement) { } void evaluate(Transaction *t, RuleWithActions *rule, std::vector *l) override { t->m_collections.m_ip_collection->resolveRegularExpression( m_dictElement, t->m_collections.m_ip_collection_key, t->m_rules->m_secWebAppId.m_value, l, m_keyExclusion); } std::string m_dictElement; }; class Ip_DynamicElement : public Variable { public: explicit Ip_DynamicElement(std::unique_ptr dictElement) : Variable("IP:dynamic"), m_string(std::move(dictElement)) { } void evaluate(Transaction *t, RuleWithActions *rule, std::vector *l) override { std::string string = m_string->evaluate(t); t->m_collections.m_ip_collection->resolveMultiMatches( string, t->m_collections.m_ip_collection_key, t->m_rules->m_secWebAppId.m_value, l, m_keyExclusion); } static void del(Transaction *t, const std::string &k) { t->m_collections.m_ip_collection->del(k, t->m_collections.m_ip_collection_key, t->m_rules->m_secWebAppId.m_value); } static void storeOrUpdateFirst(Transaction *t, const std::string &var, const std::string &value) { t->m_collections.m_ip_collection->storeOrUpdateFirst( var, t->m_collections.m_ip_collection_key, t->m_rules->m_secWebAppId.m_value, value); } std::unique_ptr m_string; }; } // namespace variables } // namespace modsecurity #endif // SRC_VARIABLES_IP_H_ modsecurity-v3.0.6/src/variables/unique_id.h0000664000175000017500000000166014146026157022302 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include #include #include #include #ifndef SRC_VARIABLES_UNIQUE_ID_H_ #define SRC_VARIABLES_UNIQUE_ID_H_ #include "src/variables/variable.h" namespace modsecurity { class Transaction; namespace variables { DEFINE_VARIABLE(UniqueID, UNIQUEID, m_variableUniqueID) } // namespace variables } // namespace modsecurity #endif // SRC_VARIABLES_UNIQUE_ID_H_ modsecurity-v3.0.6/src/variables/response_headers_names.h0000664000175000017500000000200614146026157025027 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include #include #include #include #ifndef SRC_VARIABLES_RESPONSE_HEADERS_NAMES_H_ #define SRC_VARIABLES_RESPONSE_HEADERS_NAMES_H_ #include "src/variables/variable.h" namespace modsecurity { class Transaction; namespace variables { DEFINE_VARIABLE_DICT(ResponseHeadersNames, RESPONSE_HEADERS_NAMES, m_variableResponseHeadersNames) } // namespace variables } // namespace modsecurity #endif // SRC_VARIABLES_RESPONSE_HEADERS_NAMES_H_ modsecurity-v3.0.6/src/variables/multipart_crlf_lf_lines.h0000664000175000017500000000200514146026157025214 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include #include #include #include #ifndef SRC_VARIABLES_MULTIPART_CRLF_LF_LINES_H_ #define SRC_VARIABLES_MULTIPART_CRLF_LF_LINES_H_ #include "src/variables/variable.h" namespace modsecurity { class Transaction; namespace variables { DEFINE_VARIABLE(MultipartCrlfLFLines, MULTIPART_CRLF_LF_LINES, m_variableMultipartCrlfLFLines) } // namespace variables } // namespace modsecurity #endif // SRC_VARIABLES_MULTIPART_CRLF_LF_LINES_H_ modsecurity-v3.0.6/src/variables/response_content_type.h0000664000175000017500000000177314146026157024756 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include #include #include #include #ifndef SRC_VARIABLES_RESPONSE_CONTENT_TYPE_H_ #define SRC_VARIABLES_RESPONSE_CONTENT_TYPE_H_ #include "src/variables/variable.h" namespace modsecurity { class Transaction; namespace variables { DEFINE_VARIABLE(ResponseContentType, RESPONSE_CONTENT_TYPE, m_variableResponseContentType) } // namespace variables } // namespace modsecurity #endif // SRC_VARIABLES_RESPONSE_CONTENT_TYPE_H_ modsecurity-v3.0.6/src/variables/request_uri.h0000664000175000017500000000167514146026157022675 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include #include #include #include #ifndef SRC_VARIABLES_REQUEST_URI_H_ #define SRC_VARIABLES_REQUEST_URI_H_ #include "src/variables/variable.h" namespace modsecurity { class Transaction; namespace variables { DEFINE_VARIABLE(RequestURI, REQUEST_URI, m_variableRequestURI) } // namespace variables } // namespace modsecurity #endif // SRC_VARIABLES_REQUEST_URI_H_ modsecurity-v3.0.6/src/variables/web_app_id.h0000664000175000017500000000241514146026157022410 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include #include #include #include #ifndef SRC_VARIABLES_WEB_APP_ID_H_ #define SRC_VARIABLES_WEB_APP_ID_H_ #include "src/variables/variable.h" #include "modsecurity/rule.h" namespace modsecurity { class Transaction; namespace variables { class WebAppId : public Variable { public: WebAppId() : Variable("WEBAPPID") { } void evaluate(Transaction *transaction, RuleWithActions *rule, std::vector *l) override { const std::string rname = transaction->m_rules->m_secWebAppId.m_value; l->push_back(new VariableValue(&m_name, &rname)); } }; } // namespace variables } // namespace modsecurity #endif // SRC_VARIABLES_WEB_APP_ID_H_ modsecurity-v3.0.6/src/variables/remote_user.cc0000664000175000017500000000430014146026157023001 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "src/variables/remote_user.h" #include #include #include #include #include #include #include #include #include #include #include #include #include "modsecurity/transaction.h" #include "src/utils/base64.h" namespace modsecurity { namespace variables { void RemoteUser::evaluate(Transaction *transaction, RuleWithActions *rule, std::vector *l) { size_t pos; std::string base64; VariableValue *var; std::string header; std::vector *l2 = \ new std::vector(); transaction->m_variableRequestHeaders.resolve("authorization", l2); if (l2->size() < 1) { goto clear; } header = std::string(l2->at(0)->getValue()); if (header.compare(0, 6, "Basic ") == 0) { base64 = std::string(header, 6, header.length()); } base64 = Utils::Base64::decode(base64); pos = base64.find(":"); if (pos == std::string::npos) { goto clear; } transaction->m_variableRemoteUser.assign(std::string(base64, 0, pos)); var = new VariableValue(&l2->at(0)->getKeyWithCollection(), &transaction->m_variableRemoteUser); for (auto &i : l2->at(0)->getOrigin()) { std::unique_ptr origin(new VariableOrigin()); origin->m_offset = i->m_offset; origin->m_length = i->m_length; var->addOrigin(std::move(origin)); } l->push_back(var); clear: for (auto &a : *l2) { delete a; } l2->clear(); delete l2; } } // namespace variables } // namespace modsecurity modsecurity-v3.0.6/src/variables/args_get.h0000664000175000017500000000166114146026157022114 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include #include #include #include #ifndef SRC_VARIABLES_ARGS_GET_H_ #define SRC_VARIABLES_ARGS_GET_H_ #include "src/variables/variable.h" namespace modsecurity { class Transaction; namespace variables { DEFINE_VARIABLE_DICT(ArgsGet, ARGS_GET, m_variableArgsGet) } // namespace variables } // namespace modsecurity #endif // SRC_VARIABLES_ARGS_GET_H_ modsecurity-v3.0.6/src/variables/time_day.cc0000664000175000017500000000253214146026157022250 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "src/variables/time_day.h" #include #include #include #include #include #include #include #include #include #include #include #include "modsecurity/transaction.h" namespace modsecurity { namespace variables { void TimeDay::evaluate(Transaction *transaction, RuleWithActions *rule, std::vector *l) { char tstr[200]; struct tm timeinfo; time_t timer; time(&timer); memset(tstr, '\0', 200); localtime_r(&timer, &timeinfo); strftime(tstr, 200, "%d", &timeinfo); transaction->m_variableTimeDay.assign(tstr); l->push_back(new VariableValue(&m_retName, &transaction->m_variableTimeDay)); } } // namespace variables } // namespace modsecurity modsecurity-v3.0.6/src/variables/time_min.h0000664000175000017500000000223114146026157022114 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include #include #include #ifndef SRC_VARIABLES_TIME_MIN_H_ #define SRC_VARIABLES_TIME_MIN_H_ #include "src/variables/variable.h" namespace modsecurity { class Transaction; namespace variables { class TimeMin : public Variable { public: explicit TimeMin(const std::string &_name) : Variable(_name), m_retName("TIME_MIN") { } void evaluate(Transaction *transaction, RuleWithActions *rule, std::vector *l) override; std::string m_retName; }; } // namespace variables } // namespace modsecurity #endif // SRC_VARIABLES_TIME_MIN_H_ modsecurity-v3.0.6/src/variables/response_content_length.h0000664000175000017500000000200714146026157025245 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include #include #include #include #ifndef SRC_VARIABLES_RESPONSE_CONTENT_LENGTH_H_ #define SRC_VARIABLES_RESPONSE_CONTENT_LENGTH_H_ #include "src/variables/variable.h" namespace modsecurity { class Transaction; namespace variables { DEFINE_VARIABLE(ResponseContentLength, RESPONSE_CONTENT_LENGTH, m_variableResponseContentLength) } // namespace variables } // namespace modsecurity #endif // SRC_VARIABLES_RESPONSE_CONTENT_LENGTH_H_ modsecurity-v3.0.6/src/variables/remote_user.h0000664000175000017500000000230214146026157022643 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include #include #include #include #ifndef SRC_VARIABLES_REMOTE_USER_H_ #define SRC_VARIABLES_REMOTE_USER_H_ #include "src/variables/variable.h" namespace modsecurity { class Transaction; namespace variables { class RemoteUser : public Variable { public: explicit RemoteUser(const std::string &_name) : Variable(_name), m_retName("REMOTE_USER") { } void evaluate(Transaction *transaction, RuleWithActions *rule, std::vector *l) override; std::string m_retName; }; } // namespace variables } // namespace modsecurity #endif // SRC_VARIABLES_REMOTE_USER_H_ modsecurity-v3.0.6/src/variables/outbound_data_error.h0000664000175000017500000000175714146026157024370 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include #include #include #include #ifndef SRC_VARIABLES_OUTBOUND_DATA_ERROR_H_ #define SRC_VARIABLES_OUTBOUND_DATA_ERROR_H_ #include "src/variables/variable.h" namespace modsecurity { class Transaction; namespace variables { DEFINE_VARIABLE(OutboundDataError, OUTBOUND_DATA_ERROR, m_variableOutboundDataError) } // namespace variables } // namespace modsecurity #endif // SRC_VARIABLES_OUTBOUND_DATA_ERROR_H_ modsecurity-v3.0.6/src/variables/args_names.h0000664000175000017500000000167414146026157022444 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include #include #include #include #ifndef SRC_VARIABLES_ARGS_NAMES_H_ #define SRC_VARIABLES_ARGS_NAMES_H_ #include "src/variables/variable.h" namespace modsecurity { class Transaction; namespace variables { DEFINE_VARIABLE_DICT(ArgsNames, ARGS_NAMES, m_variableArgsNames) } // namespace variables } // namespace modsecurity #endif // SRC_VARIABLES_ARGS_NAMES_H_ modsecurity-v3.0.6/src/variables/request_uri_raw.h0000664000175000017500000000172314146026157023540 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include #include #include #include #ifndef SRC_VARIABLES_REQUEST_URI_RAW_H_ #define SRC_VARIABLES_REQUEST_URI_RAW_H_ #include "src/variables/variable.h" namespace modsecurity { class Transaction; namespace variables { DEFINE_VARIABLE(RequestURIRaw, REQUEST_URI_RAW, m_variableRequestURIRaw) } // namespace variables } // namespace modsecurity #endif // SRC_VARIABLES_REQUEST_URI_RAW_H_ modsecurity-v3.0.6/src/variables/time_hour.h0000664000175000017500000000223714146026157022314 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include #include #include #ifndef SRC_VARIABLES_TIME_HOUR_H_ #define SRC_VARIABLES_TIME_HOUR_H_ #include "src/variables/variable.h" namespace modsecurity { class Transaction; namespace variables { class TimeHour : public Variable { public: explicit TimeHour(const std::string &_name) : Variable(_name), m_retName("TIME_HOUR") { } void evaluate(Transaction *transaction, RuleWithActions *rule, std::vector *l) override; std::string m_retName; }; } // namespace variables } // namespace modsecurity #endif // SRC_VARIABLES_TIME_HOUR_H_ modsecurity-v3.0.6/src/variables/matched_vars.h0000664000175000017500000000171114146026157022755 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include #include #include #include #ifndef SRC_VARIABLES_MATCHED_VARS_H_ #define SRC_VARIABLES_MATCHED_VARS_H_ #include "src/variables/variable.h" namespace modsecurity { class Transaction; namespace variables { DEFINE_VARIABLE_DICT(MatchedVars, MATCHED_VARS, m_variableMatchedVars) } // namespace variables } // namespace modsecurity #endif // SRC_VARIABLES_MATCHED_VARS_H_ modsecurity-v3.0.6/src/variables/resource.h0000664000175000017500000000731114146026157022146 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include #include #include #include #include #ifndef SRC_VARIABLES_RESOURCE_H_ #define SRC_VARIABLES_RESOURCE_H_ #include "src/variables/variable.h" #include "src/run_time_string.h" namespace modsecurity { class Transaction; namespace variables { class Resource_DictElement : public Variable { public: explicit Resource_DictElement(const std::string &dictElement) : Variable("RESOURCE:" + dictElement), m_dictElement("RESOURCE:" + dictElement) { } void evaluate(Transaction *t, RuleWithActions *rule, std::vector *l) override { t->m_collections.m_resource_collection->resolveMultiMatches( m_name, t->m_collections.m_resource_collection_key, t->m_rules->m_secWebAppId.m_value, l, m_keyExclusion); } std::string m_dictElement; }; class Resource_NoDictElement : public Variable { public: Resource_NoDictElement() : Variable("RESOURCE") { } void evaluate(Transaction *t, RuleWithActions *rule, std::vector *l) override { t->m_collections.m_resource_collection->resolveMultiMatches(m_name, t->m_collections.m_resource_collection_key, t->m_rules->m_secWebAppId.m_value, l, m_keyExclusion); } }; class Resource_DictElementRegexp : public VariableRegex { public: explicit Resource_DictElementRegexp(const std::string &dictElement) : VariableRegex("RESOURCE:", dictElement), m_dictElement(dictElement) { } void evaluate(Transaction *t, RuleWithActions *rule, std::vector *l) override { t->m_collections.m_resource_collection->resolveRegularExpression( m_dictElement, t->m_collections.m_resource_collection_key, t->m_rules->m_secWebAppId.m_value, l, m_keyExclusion); } std::string m_dictElement; }; class Resource_DynamicElement : public Variable { public: explicit Resource_DynamicElement(std::unique_ptr dictElement) : Variable("RESOURCE:dynamic"), m_string(std::move(dictElement)) { } void evaluate(Transaction *t, RuleWithActions *rule, std::vector *l) override { std::string string = m_string->evaluate(t); t->m_collections.m_resource_collection->resolveMultiMatches( string, t->m_collections.m_resource_collection_key, t->m_rules->m_secWebAppId.m_value, l, m_keyExclusion); } static void del(Transaction *t, const std::string &k) { t->m_collections.m_resource_collection->del(k, t->m_collections.m_resource_collection_key, t->m_rules->m_secWebAppId.m_value); } static void storeOrUpdateFirst(Transaction *t, const std::string &var, const std::string &value) { t->m_collections.m_resource_collection->storeOrUpdateFirst( var, t->m_collections.m_resource_collection_key, t->m_rules->m_secWebAppId.m_value, value); } std::unique_ptr m_string; }; } // namespace variables } // namespace modsecurity #endif // SRC_VARIABLES_RESOURCE_H_ modsecurity-v3.0.6/src/variables/time_epoch.h0000664000175000017500000000224514146026157022434 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include #include #include #ifndef SRC_VARIABLES_TIME_EPOCH_H_ #define SRC_VARIABLES_TIME_EPOCH_H_ #include "src/variables/variable.h" namespace modsecurity { class Transaction; namespace variables { class TimeEpoch : public Variable { public: explicit TimeEpoch(const std::string &_name) : Variable(_name), m_retName("TIME_EPOCH") { } void evaluate(Transaction *transaction, RuleWithActions *rule, std::vector *l) override; std::string m_retName; }; } // namespace variables } // namespace modsecurity #endif // SRC_VARIABLES_TIME_EPOCH_H_ modsecurity-v3.0.6/src/variables/response_status.h0000664000175000017500000000172514146026157023563 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include #include #include #include #ifndef SRC_VARIABLES_RESPONSE_STATUS_H_ #define SRC_VARIABLES_RESPONSE_STATUS_H_ #include "src/variables/variable.h" namespace modsecurity { class Transaction; namespace variables { DEFINE_VARIABLE(ResponseStatus, RESPONSE_STATUS, m_variableResponseStatus) } // namespace variables } // namespace modsecurity #endif // SRC_VARIABLES_RESPONSE_STATUS_H_ modsecurity-v3.0.6/src/variables/remote_host.h0000664000175000017500000000167514146026157022656 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include #include #include #include #ifndef SRC_VARIABLES_REMOTE_HOST_H_ #define SRC_VARIABLES_REMOTE_HOST_H_ #include "src/variables/variable.h" namespace modsecurity { class Transaction; namespace variables { DEFINE_VARIABLE(RemoteHost, REMOTE_HOST, m_variableRemoteHost) } // namespace variables } // namespace modsecurity #endif // SRC_VARIABLES_REMOTE_HOST_H_ modsecurity-v3.0.6/src/variables/global.h0000664000175000017500000000722614146026157021564 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include #include #include #include #include #ifndef SRC_VARIABLES_GLOBAL_H_ #define SRC_VARIABLES_GLOBAL_H_ #include "src/variables/variable.h" #include "src/run_time_string.h" namespace modsecurity { class Transaction; namespace variables { class Global_DictElement : public Variable { public: explicit Global_DictElement(const std::string &dictElement) : Variable("GLOBAL:" + dictElement), m_dictElement("GLOBAL:" + dictElement) { } void evaluate(Transaction *t, RuleWithActions *rule, std::vector *l) override { t->m_collections.m_global_collection->resolveMultiMatches( m_name, t->m_collections.m_global_collection_key, t->m_rules->m_secWebAppId.m_value, l, m_keyExclusion); } std::string m_dictElement; }; class Global_NoDictElement : public Variable { public: Global_NoDictElement() : Variable("GLOBAL") { } void evaluate(Transaction *t, RuleWithActions *rule, std::vector *l) override { t->m_collections.m_global_collection->resolveMultiMatches("", t->m_collections.m_global_collection_key, t->m_rules->m_secWebAppId.m_value, l, m_keyExclusion); } }; class Global_DictElementRegexp : public VariableRegex { public: explicit Global_DictElementRegexp(const std::string &dictElement) : VariableRegex("GLOBAL", dictElement), m_dictElement(dictElement) { } void evaluate(Transaction *t, RuleWithActions *rule, std::vector *l) override { t->m_collections.m_global_collection->resolveRegularExpression( m_dictElement, t->m_collections.m_global_collection_key, t->m_rules->m_secWebAppId.m_value, l, m_keyExclusion); } std::string m_dictElement; }; class Global_DynamicElement : public Variable { public: explicit Global_DynamicElement(std::unique_ptr dictElement) : Variable("GLOBAL:dynamic"), m_string(std::move(dictElement)) { } void evaluate(Transaction *t, RuleWithActions *rule, std::vector *l) override { std::string string = m_string->evaluate(t); t->m_collections.m_global_collection->resolveMultiMatches( string, t->m_collections.m_global_collection_key, t->m_rules->m_secWebAppId.m_value, l, m_keyExclusion); } static void del(Transaction *t, const std::string &k) { t->m_collections.m_global_collection->del(k, t->m_collections.m_global_collection_key, t->m_rules->m_secWebAppId.m_value); } static void storeOrUpdateFirst(Transaction *t, std::string var, std::string value) { t->m_collections.m_global_collection->storeOrUpdateFirst( var, t->m_collections.m_global_collection_key, t->m_rules->m_secWebAppId.m_value, value); } std::unique_ptr m_string; }; } // namespace variables } // namespace modsecurity #endif // SRC_VARIABLES_GLOBAL_H_ modsecurity-v3.0.6/src/variables/modsec_build.h0000664000175000017500000000314314146026157022747 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include #include #include #include #ifndef SRC_VARIABLES_MODSEC_BUILD_H_ #define SRC_VARIABLES_MODSEC_BUILD_H_ #include "src/variables/variable.h" #include "modsecurity/modsecurity.h" namespace modsecurity { class Transaction; namespace variables { class ModsecBuild : public Variable { public: explicit ModsecBuild(const std::string &_name) : Variable(_name), m_retName("MODSEC_BUILD") { std::ostringstream ss; ss << std::setw(2) << std::setfill('0') << MODSECURITY_MAJOR; ss << std::setw(2) << std::setfill('0') << MODSECURITY_MINOR; ss << std::setw(2) << std::setfill('0') << MODSECURITY_PATCHLEVEL; ss << std::setw(2) << std::setfill('0') << MODSECURITY_TAG_NUM; m_build = ss.str(); } void evaluate(Transaction *transaction, RuleWithActions *rule, std::vector *l) override; std::string m_build; std::string m_retName; }; } // namespace variables } // namespace modsecurity #endif // SRC_VARIABLES_MODSEC_BUILD_H_ modsecurity-v3.0.6/src/variables/variable.h0000664000175000017500000007166714146026157022123 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include #include #include #include #include #include #include "modsecurity/rules_set.h" #include "modsecurity/transaction.h" #include "modsecurity/rule.h" #include "src/utils/string.h" #include "src/utils/regex.h" #ifndef SRC_VARIABLES_VARIABLE_H_ #define SRC_VARIABLES_VARIABLE_H_ #define DEFINE_VARIABLE(n, N, e) \ VAR_DIRECT(n, N, e) #define DEFINE_VARIABLE_DICT(n, N, e) \ VAR_WITH_DICT_ELEMENT(n, N, e) \ \ VAR_WITHOUT_DICT_ELEMENT(n, N, e) \ \ VAR_WITH_REGEX(n, N, e) \ #define VAR_WITH_REGEX(n, N, e) \ class n ## _DictElementRegexp : public VariableRegex { \ public: \ explicit n ## _DictElementRegexp(const std::string ®ex) \ : VariableRegex(#N, regex) { } \ \ void evaluate(Transaction *transaction, \ RuleWithActions *rule, \ std::vector *l) override { \ transaction-> e .resolveRegularExpression(&m_r, l, \ m_keyExclusion); \ } \ }; #define VAR_WITH_DICT_ELEMENT(n, N, e) \ class n ## _DictElement : public VariableDictElement { \ public: \ explicit n ## _DictElement(const std::string &dictElement) \ : VariableDictElement(#N, dictElement) { } \ \ void evaluate(Transaction *transaction, \ RuleWithActions *rule, \ std::vector *l) override { \ transaction-> e .resolve(m_dictElement, l); \ } \ }; #define VAR_WITHOUT_DICT_ELEMENT(n, N, e) \ class n ## _NoDictElement : public Variable { \ public: \ explicit n ## _NoDictElement() \ : Variable(#N) { } \ \ void evaluate(Transaction *transaction, \ RuleWithActions *rule, \ std::vector *l) override { \ transaction-> e .resolve(l, m_keyExclusion); \ } \ }; #define VAR_DIRECT(n, N, e) \ class n : public Variable { \ public: \ n() \ : Variable(#N) { } \ \ void evaluate(Transaction *transaction, \ RuleWithActions *rule, \ std::vector *l) override { \ transaction-> e .evaluate(l); \ } \ }; namespace modsecurity { class Transaction; namespace variables { class KeyExclusion { public: KeyExclusion() { } virtual bool match(const std::string &a) = 0; virtual ~KeyExclusion() { } }; // FIXME: use pre built regex. class KeyExclusionRegex : public KeyExclusion { public: explicit KeyExclusionRegex(const Utils::Regex &re) : m_re(re.pattern, true) { } explicit KeyExclusionRegex(const std::string &re) : m_re(re, true) { } ~KeyExclusionRegex() override { } bool match(const std::string &a) override { return m_re.searchAll(a).size() > 0; } Utils::Regex m_re; }; class KeyExclusionString : public KeyExclusion { public: explicit KeyExclusionString(std::string &a) : m_key(utils::string::toupper(a)) { } ~KeyExclusionString() override { } bool match(const std::string &a) override { return a.size() == m_key.size() && std::equal(a.begin(), a.end(), m_key.begin(), [](char aa, char bb) { return static_cast(toupper(aa)) == static_cast(bb); }); } std::string m_key; }; class KeyExclusions : public std::deque> { public: KeyExclusions() { } bool toOmit(std::string a) { for (auto &z : *this) { if (z->match(a)) { return true; } } return false; } }; class VariableMonkeyResolution { public: VariableMonkeyResolution () { } static inline bool comp(const std::string &a, const std::string &b) { return a.size() == b.size() && std::equal(a.begin(), a.end(), b.begin(), [](char aa, char bb) { return toupper(aa) == bb; }); } static void stringMatchResolveMulti(Transaction *t, const std::string &variable, std::vector *l) { size_t collection = variable.find("."); if (collection == std::string::npos) { collection = variable.find(":"); } if (collection == std::string::npos) { if (comp(variable, "RESPONSE_CONTENT_TYPE")) { t->m_variableResponseContentType.evaluate(l); } else if (comp(variable, "ARGS_COMBINED_SIZE")) { t->m_variableARGScombinedSize.evaluate(l); } else if (comp(variable, "AUTH_TYPE")) { t->m_variableAuthType.evaluate(l); } else if (comp(variable, "FILES_COMBINED_SIZE")) { t->m_variableFilesCombinedSize.evaluate(l); } else if (comp(variable, "FULL_REQUEST")) { t->m_variableFullRequest.evaluate(l); } else if (comp(variable, "FULL_REQUEST_LENGTH")) { t->m_variableFullRequestLength.evaluate(l); } else if (comp(variable, "INBOUND_DATA_ERROR")) { t->m_variableInboundDataError.evaluate(l); } else if (comp(variable, "MATCHED_VAR")) { t->m_variableMatchedVar.evaluate(l); } else if (comp(variable, "MATCHED_VAR_NAME")) { t->m_variableMatchedVarName.evaluate(l); } else if (comp(variable, "MULTIPART_CRLF_LF_LINES")) { t->m_variableMultipartCrlfLFLines.evaluate(l); } else if (comp(variable, "MULTIPART_DATA_AFTER")) { t->m_variableMultipartDataAfter.evaluate(l); } else if (comp(variable, "MULTIPART_FILE_LIMIT_EXCEEDED")) { t->m_variableMultipartFileLimitExceeded.evaluate(l); } else if (comp(variable, "MULTIPART_STRICT_ERROR")) { t->m_variableMultipartStrictError.evaluate(l); } else if (comp(variable, "MULTIPART_HEADER_FOLDING")) { t->m_variableMultipartHeaderFolding.evaluate(l); } else if (comp(variable, "MULTIPART_INVALID_QUOTING")) { t->m_variableMultipartInvalidQuoting.evaluate(l); } else if (comp(variable, "MULTIPART_INVALID_HEADER_FOLDING")) { t->m_variableMultipartInvalidHeaderFolding.evaluate(l); } else if (comp(variable, "MULTIPART_UNMATCHED_BOUNDARY")) { t->m_variableMultipartUnmatchedBoundary.evaluate(l); } else if (comp(variable, "OUTBOUND_DATA_ERROR")) { t->m_variableOutboundDataError.evaluate(l); } else if (comp(variable, "PATH_INFO")) { t->m_variablePathInfo.evaluate(l); } else if (comp(variable, "QUERY_STRING")) { t->m_variableQueryString.evaluate(l); } else if (comp(variable, "REMOTE_ADDR")) { t->m_variableRemoteAddr.evaluate(l); } else if (comp(variable, "REMOTE_HOST")) { t->m_variableRemoteHost.evaluate(l); } else if (comp(variable, "REMOTE_PORT")) { t->m_variableRemotePort.evaluate(l); } else if (comp(variable, "REQBODY_ERROR")) { t->m_variableReqbodyError.evaluate(l); } else if (comp(variable, "REQBODY_ERROR_MSG")) { t->m_variableReqbodyErrorMsg.evaluate(l); } else if (comp(variable, "REQBODY_PROCESSOR_ERROR_MSG")) { t->m_variableReqbodyProcessorErrorMsg.evaluate(l); } else if (comp(variable, "REQBODY_PROCESSOR_ERROR")) { t->m_variableReqbodyProcessorError.evaluate(l); } else if (comp(variable, "REQBODY_PROCESSOR")) { t->m_variableReqbodyProcessor.evaluate(l); } else if (comp(variable, "REQUEST_BASENAME")) { t->m_variableRequestBasename.evaluate(l); } else if (comp(variable, "REQUEST_BODY")) { t->m_variableRequestBody.evaluate(l); } else if (comp(variable, "REQUEST_BODY_LENGTH")) { t->m_variableRequestBodyLength.evaluate(l); } else if (comp(variable, "REQUEST_FILENAME")) { t->m_variableRequestFilename.evaluate(l); } else if (comp(variable, "REQUEST_LINE")) { t->m_variableRequestLine.evaluate(l); } else if (comp(variable, "REQUEST_METHOD")) { t->m_variableRequestMethod.evaluate(l); } else if (comp(variable, "REQUEST_PROTOCOL")) { t->m_variableRequestProtocol.evaluate(l); } else if (comp(variable, "REQUEST_URI")) { t->m_variableRequestURI.evaluate(l); } else if (comp(variable, "REQUEST_URI_RAW")) { t->m_variableRequestURIRaw.evaluate(l); } else if (comp(variable, "RESOURCE")) { t->m_variableResource.evaluate(l); } else if (comp(variable, "RESPONSE_BODY")) { t->m_variableResponseBody.evaluate(l); } else if (comp(variable, "RESPONSE_CONTENT_LENGTH")) { t->m_variableResponseContentLength.evaluate(l); } else if (comp(variable, "RESPONSE_PROTOCOL")) { t->m_variableResponseProtocol.evaluate(l); } else if (comp(variable, "RESPONSE_STATUS")) { t->m_variableResponseStatus.evaluate(l); } else if (comp(variable, "SERVER_ADDR")) { t->m_variableServerAddr.evaluate(l); } else if (comp(variable, "SERVER_NAME")) { t->m_variableServerName.evaluate(l); } else if (comp(variable, "SERVER_PORT")) { t->m_variableServerPort.evaluate(l); } else if (comp(variable, "SESSIONID")) { t->m_variableSessionID.evaluate(l); } else if (comp(variable, "UNIQUE_ID")) { t->m_variableUniqueID.evaluate(l); } else if (comp(variable, "URLENCODED_ERROR")) { t->m_variableUrlEncodedError.evaluate(l); } else if (comp(variable, "USERID")) { t->m_variableUserID.evaluate(l); } else { throw std::invalid_argument("Variable not found."); } } else { std::string col = std::string(variable, 0, collection); std::string var = std::string(variable, collection + 1, variable.length() - (collection + 1)); if (comp(col, "ARGS")) { t->m_variableArgs.resolve(var, l); } else if (comp(variable, "ARGS_NAMES")) { t->m_variableArgsNames.resolve(var, l); } else if (comp(variable, "ARGS_GET_NAMES")) { t->m_variableArgsGetNames.resolve(var, l); } else if (comp(variable, "ARGS_POST_NAMES")) { t->m_variableArgsPostNames.resolve(var, l); } else if (comp(col, "ARGS_GET")) { t->m_variableArgsGet.resolve(var, l); } else if (comp(col, "ARGS_POST")) { t->m_variableArgsPost.resolve(var, l); } else if (comp(col, "FILES_SIZES")) { t->m_variableFilesSizes.resolve(var, l); } else if (comp(col, "FILES_NAMES")) { t->m_variableFilesNames.resolve(var, l); } else if (comp(col, "FILES_TMP_CONTENT")) { t->m_variableFilesTmpContent.resolve(var, l); } else if (comp(col, "MULTIPART_FILENAME")) { t->m_variableMultipartFileName.resolve(var, l); } else if (comp(col, "MULTIPART_NAME")) { t->m_variableMultipartName.resolve(var, l); } else if (comp(col, "MATCHED_VARS_NAMES")) { t->m_variableMatchedVarsNames.resolve(var, l); } else if (comp(col, "MATCHED_VARS")) { t->m_variableMatchedVars.resolve(var, l); } else if (comp(col, "FILES")) { t->m_variableFiles.resolve(var, l); } else if (comp(col, "REQUEST_COOKIES")) { t->m_variableRequestCookies.resolve(var, l); } else if (comp(col, "REQUEST_HEADERS")) { t->m_variableRequestHeaders.resolve(var, l); } else if (comp(variable, "REQUEST_HEADERS_NAMES")) { t->m_variableRequestHeadersNames.resolve(var, l); } else if (comp(col, "RESPONSE_HEADERS")) { t->m_variableResponseHeaders.resolve(var, l); } else if (comp(variable, "RESPONSE_HEADERS_NAMES")) { t->m_variableResponseHeadersNames.resolve(var, l); } else if (comp(col, "GEO")) { t->m_variableGeo.resolve(var, l); } else if (comp(col, "REQUEST_COOKIES_NAMES")) { t->m_variableRequestCookiesNames.resolve(var, l); } else if (comp(col, "FILES_TMPNAMES")) { t->m_variableFilesTmpNames.resolve(var, l); } else { throw std::invalid_argument("Variable not found."); } } } static std::string stringMatchResolve(Transaction *t, const std::string &variable) { std::unique_ptr vv = nullptr; size_t collection = variable.find("."); if (collection == std::string::npos) { collection = variable.find(":"); } if (collection == std::string::npos) { if (comp(variable, "RESPONSE_CONTENT_TYPE")) { vv = t->m_variableResponseContentType.resolveFirst(); } else if (comp(variable, "ARGS_COMBINED_SIZE")) { vv = t->m_variableARGScombinedSize.resolveFirst(); } else if (comp(variable, "AUTH_TYPE")) { vv = t->m_variableAuthType.resolveFirst(); } else if (comp(variable, "FILES_COMBINED_SIZE")) { vv = t->m_variableFilesCombinedSize.resolveFirst(); } else if (comp(variable, "FULL_REQUEST")) { vv = t->m_variableFullRequest.resolveFirst(); } else if (comp(variable, "FULL_REQUEST_LENGTH")) { vv = t->m_variableFullRequestLength.resolveFirst(); } else if (comp(variable, "INBOUND_DATA_ERROR")) { vv = t->m_variableInboundDataError.resolveFirst(); } else if (comp(variable, "MATCHED_VAR")) { vv = t->m_variableMatchedVar.resolveFirst(); } else if (comp(variable, "MATCHED_VAR_NAME")) { vv = t->m_variableMatchedVarName.resolveFirst(); } else if (comp(variable, "MULTIPART_CRLF_LF_LINES")) { vv = t->m_variableMultipartCrlfLFLines.resolveFirst(); } else if (comp(variable, "MULTIPART_DATA_AFTER")) { vv = t->m_variableMultipartDataAfter.resolveFirst(); } else if (comp(variable, "MULTIPART_FILE_LIMIT_EXCEEDED")) { vv = t->m_variableMultipartFileLimitExceeded.resolveFirst(); } else if (comp(variable, "MULTIPART_STRICT_ERROR")) { vv = t->m_variableMultipartStrictError.resolveFirst(); } else if (comp(variable, "MULTIPART_HEADER_FOLDING")) { vv = t->m_variableMultipartHeaderFolding.resolveFirst(); } else if (comp(variable, "MULTIPART_INVALID_QUOTING")) { vv = t->m_variableMultipartInvalidQuoting.resolveFirst(); } else if (comp(variable, "MULTIPART_INVALID_HEADER_FOLDING")) { vv = t->m_variableMultipartInvalidHeaderFolding.resolveFirst(); } else if (comp(variable, "MULTIPART_UNMATCHED_BOUNDARY")) { vv = t->m_variableMultipartUnmatchedBoundary.resolveFirst(); } else if (comp(variable, "OUTBOUND_DATA_ERROR")) { vv = t->m_variableOutboundDataError.resolveFirst(); } else if (comp(variable, "PATH_INFO")) { vv = t->m_variablePathInfo.resolveFirst(); } else if (comp(variable, "QUERY_STRING")) { vv = t->m_variableQueryString.resolveFirst(); } else if (comp(variable, "REMOTE_ADDR")) { vv = t->m_variableRemoteAddr.resolveFirst(); } else if (comp(variable, "REMOTE_HOST")) { vv = t->m_variableRemoteHost.resolveFirst(); } else if (comp(variable, "REMOTE_PORT")) { vv = t->m_variableRemotePort.resolveFirst(); } else if (comp(variable, "REQBODY_ERROR")) { vv = t->m_variableReqbodyError.resolveFirst(); } else if (comp(variable, "REQBODY_ERROR_MSG")) { vv = t->m_variableReqbodyErrorMsg.resolveFirst(); } else if (comp(variable, "REQBODY_PROCESSOR_ERROR_MSG")) { vv = t->m_variableReqbodyProcessorErrorMsg.resolveFirst(); } else if (comp(variable, "REQBODY_PROCESSOR_ERROR")) { vv = t->m_variableReqbodyProcessorError.resolveFirst(); } else if (comp(variable, "REQBODY_PROCESSOR")) { vv = t->m_variableReqbodyProcessor.resolveFirst(); } else if (comp(variable, "REQUEST_BASENAME")) { vv = t->m_variableRequestBasename.resolveFirst(); } else if (comp(variable, "REQUEST_BODY")) { vv = t->m_variableRequestBody.resolveFirst(); } else if (comp(variable, "REQUEST_BODY_LENGTH")) { vv = t->m_variableRequestBodyLength.resolveFirst(); } else if (comp(variable, "REQUEST_FILENAME")) { vv = t->m_variableRequestFilename.resolveFirst(); } else if (comp(variable, "REQUEST_LINE")) { vv = t->m_variableRequestLine.resolveFirst(); } else if (comp(variable, "REQUEST_METHOD")) { vv = t->m_variableRequestMethod.resolveFirst(); } else if (comp(variable, "REQUEST_PROTOCOL")) { vv = t->m_variableRequestProtocol.resolveFirst(); } else if (comp(variable, "REQUEST_URI")) { vv = t->m_variableRequestURI.resolveFirst(); } else if (comp(variable, "REQUEST_URI_RAW")) { vv = t->m_variableRequestURIRaw.resolveFirst(); } else if (comp(variable, "RESOURCE")) { vv = t->m_variableResource.resolveFirst(); } else if (comp(variable, "RESPONSE_BODY")) { vv = t->m_variableResponseBody.resolveFirst(); } else if (comp(variable, "RESPONSE_CONTENT_LENGTH")) { vv = t->m_variableResponseContentLength.resolveFirst(); } else if (comp(variable, "RESPONSE_PROTOCOL")) { vv = t->m_variableResponseProtocol.resolveFirst(); } else if (comp(variable, "RESPONSE_STATUS")) { vv = t->m_variableResponseStatus.resolveFirst(); } else if (comp(variable, "SERVER_ADDR")) { vv = t->m_variableServerAddr.resolveFirst(); } else if (comp(variable, "SERVER_NAME")) { vv = t->m_variableServerName.resolveFirst(); } else if (comp(variable, "SERVER_PORT")) { vv = t->m_variableServerPort.resolveFirst(); } else if (comp(variable, "SESSIONID")) { vv = t->m_variableSessionID.resolveFirst(); } else if (comp(variable, "UNIQUE_ID")) { vv = t->m_variableUniqueID.resolveFirst(); } else if (comp(variable, "URLENCODED_ERROR")) { vv = t->m_variableUrlEncodedError.resolveFirst(); } else if (comp(variable, "USERID")) { vv = t->m_variableUserID.resolveFirst(); } else if (comp(variable, "TX")) { vv = t->m_collections.m_tx_collection->resolveFirst(""); } else if (comp(variable, "RESOURCE")) { vv = t->m_collections.m_resource_collection->resolveFirst("", t->m_collections.m_resource_collection_key, t->m_rules->m_secWebAppId.m_value); } else if (comp(variable, "USER")) { vv = t->m_collections.m_user_collection->resolveFirst("", t->m_collections.m_user_collection_key, t->m_rules->m_secWebAppId.m_value); } else if (comp(variable, "SESSION")) { vv = t->m_collections.m_session_collection->resolveFirst("", t->m_collections.m_session_collection_key, t->m_rules->m_secWebAppId.m_value); } else if (comp(variable, "IP")) { vv = t->m_collections.m_ip_collection->resolveFirst("", t->m_collections.m_ip_collection_key, t->m_rules->m_secWebAppId.m_value); } else if (comp(variable, "GLOBAL")) { vv = t->m_collections.m_global_collection->resolveFirst("", t->m_collections.m_global_collection_key, t->m_rules->m_secWebAppId.m_value); } else { throw std::invalid_argument("Variable not found."); } } else { std::string col = std::string(variable, 0, collection); std::string var = std::string(variable, collection + 1, variable.length() - (collection + 1)); if (comp(col, "ARGS")) { vv = t->m_variableArgs.resolveFirst(var); } else if (comp(variable, "ARGS_NAMES")) { vv = t->m_variableArgsNames.resolveFirst(var); } else if (comp(variable, "ARGS_GET_NAMES")) { vv = t->m_variableArgsGetNames.resolveFirst(var); } else if (comp(variable, "ARGS_POST_NAMES")) { vv = t->m_variableArgsPostNames.resolveFirst(var); } else if (comp(col, "ARGS_GET")) { vv = t->m_variableArgsGet.resolveFirst(var); } else if (comp(col, "ARGS_POST")) { vv = t->m_variableArgsPost.resolveFirst(var); } else if (comp(col, "FILES_SIZES")) { vv = t->m_variableFilesSizes.resolveFirst(var); } else if (comp(col, "FILES_NAMES")) { vv = t->m_variableFilesNames.resolveFirst(var); } else if (comp(col, "FILES_TMP_CONTENT")) { vv = t->m_variableFilesTmpContent.resolveFirst(var); } else if (comp(col, "MULTIPART_FILENAME")) { vv = t->m_variableMultipartFileName.resolveFirst(var); } else if (comp(col, "MULTIPART_NAME")) { vv = t->m_variableMultipartName.resolveFirst(var); } else if (comp(col, "MATCHED_VARS_NAMES")) { vv = t->m_variableMatchedVarsNames.resolveFirst(var); } else if (comp(col, "MATCHED_VARS")) { vv = t->m_variableMatchedVars.resolveFirst(var); } else if (comp(col, "FILES")) { vv = t->m_variableFiles.resolveFirst(var); } else if (comp(col, "REQUEST_COOKIES")) { vv = t->m_variableRequestCookies.resolveFirst(var); } else if (comp(col, "REQUEST_HEADERS")) { vv = t->m_variableRequestHeaders.resolveFirst(var); } else if (comp(variable, "REQUEST_HEADERS_NAMES")) { vv = t->m_variableRequestHeadersNames.resolveFirst(var); } else if (comp(col, "RESPONSE_HEADERS")) { vv = t->m_variableResponseHeaders.resolveFirst(var); } else if (comp(variable, "RESPONSE_HEADERS_NAMES")) { vv = t->m_variableResponseHeadersNames.resolveFirst(var); } else if (comp(col, "GEO")) { vv = t->m_variableGeo.resolveFirst(var); } else if (comp(col, "REQUEST_COOKIES_NAMES")) { vv = t->m_variableRequestCookiesNames.resolveFirst(var); } else if (comp(col, "FILES_TMPNAMES")) { vv = t->m_variableFilesTmpNames.resolveFirst(var); } else if (comp(col, "TX")) { vv = t->m_collections.m_tx_collection->resolveFirst(var); } else if (comp(col, "RESOURCE")) { vv = t->m_collections.m_resource_collection->resolveFirst(var, t->m_collections.m_resource_collection_key, t->m_rules->m_secWebAppId.m_value); } else if (comp(col, "USER")) { vv = t->m_collections.m_user_collection->resolveFirst(var, t->m_collections.m_user_collection_key, t->m_rules->m_secWebAppId.m_value); } else if (comp(col, "SESSION")) { vv = t->m_collections.m_session_collection->resolveFirst(var, t->m_collections.m_session_collection_key, t->m_rules->m_secWebAppId.m_value); } else if (comp(col, "IP")) { vv = t->m_collections.m_ip_collection->resolveFirst(var, t->m_collections.m_ip_collection_key, t->m_rules->m_secWebAppId.m_value); } else if (comp(col, "GLOBAL")) { vv = t->m_collections.m_global_collection->resolveFirst(var, t->m_collections.m_global_collection_key, t->m_rules->m_secWebAppId.m_value); } else { throw std::invalid_argument("Variable not found."); } } if (vv == nullptr) { return std::string(""); } return std::string(*vv.get()); } }; class Variable : public VariableMonkeyResolution { public: explicit Variable(const std::string &name); explicit Variable(Variable *_name); virtual ~Variable() { } virtual void evaluate(Transaction *t, RuleWithActions *rule, std::vector *l) = 0; bool inline belongsToCollection(Variable *var) { return m_collectionName.size() == var->m_collectionName.size() && std::equal(m_collectionName.begin(), m_collectionName.end(), var->m_collectionName.begin(), [](char aa, char bb) { return toupper(aa) == bb; }); } void addsKeyExclusion(Variable *v); bool operator==(const Variable& b) const { return m_collectionName == b.m_collectionName && m_name == b.m_name && *m_fullName == *b.m_fullName; } std::string& operator+=(const char * p) { return m_name; } std::string m_name; std::string m_collectionName; std::shared_ptr m_fullName; KeyExclusions m_keyExclusion; }; class VariableDictElement : public Variable { public: VariableDictElement(const std::string &name, const std::string &dict_element) : m_dictElement(dict_element), Variable(name + ":" + dict_element) { } std::string m_dictElement; }; class VariableRegex : public Variable { public: VariableRegex(const std::string &name, const std::string ®ex) : m_r(regex, true), m_regex(regex), Variable(name + ":" + "regex(" + regex + ")") { } Utils::Regex m_r; // FIXME: no need for that. std::string m_regex; }; class Variables : public std::vector { public: bool contains(Variable *v) { return std::find_if(begin(), end(), [v](Variable *m) -> bool { return *v == *m; }) != end(); }; bool contains(const VariableValue *v) { return std::find_if(begin(), end(), [v](Variable *m) -> bool { VariableRegex *r = dynamic_cast(m); if (r) { return r->m_r.searchAll(v->getKey()).size() > 0; } return v->getKeyWithCollection() == *m->m_fullName.get(); }) != end(); }; }; class VariableModificatorExclusion : public Variable { public: explicit VariableModificatorExclusion(std::unique_ptr var) : Variable(var.get()), m_base(std::move(var)) { } void evaluate(Transaction *t, RuleWithActions *rule, std::vector *l) override { m_base->evaluate(t, rule, l); } std::unique_ptr m_base; }; class VariableModificatorCount : public Variable { public: explicit VariableModificatorCount(std::unique_ptr var) : Variable(var.get()), m_base(nullptr) { m_base.reset(var.release()); } void evaluate(Transaction *t, RuleWithActions *rule, std::vector *l) override { std::vector reslIn; VariableValue *val = NULL; int count = 0; m_base->evaluate(t, rule, &reslIn); for (const VariableValue *a : reslIn) { count++; delete a; a = NULL; } reslIn.clear(); std::string *res = new std::string(std::to_string(count)); val = new VariableValue(m_fullName.get(), res); delete res; l->push_back(val); return; } std::unique_ptr m_base; }; std::string operator+(const std::string &a, modsecurity::variables::Variable *v); std::string operator+(const std::string &a, modsecurity::variables::Variables *v); } // namespace variables } // namespace modsecurity #endif // SRC_VARIABLES_VARIABLE_H_ modsecurity-v3.0.6/src/variables/server_name.h0000664000175000017500000000167514146026157022634 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include #include #include #include #ifndef SRC_VARIABLES_SERVER_NAME_H_ #define SRC_VARIABLES_SERVER_NAME_H_ #include "src/variables/variable.h" namespace modsecurity { class Transaction; namespace variables { DEFINE_VARIABLE(ServerName, SERVER_NAME, m_variableServerName) } // namespace variables } // namespace modsecurity #endif // SRC_VARIABLES_SERVER_NAME_H_ modsecurity-v3.0.6/src/variables/time_year.h0000664000175000017500000000223714146026157022277 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include #include #include #ifndef SRC_VARIABLES_TIME_YEAR_H_ #define SRC_VARIABLES_TIME_YEAR_H_ #include "src/variables/variable.h" namespace modsecurity { class Transaction; namespace variables { class TimeYear : public Variable { public: explicit TimeYear(const std::string &_name) : Variable(_name), m_retName("TIME_YEAR") { } void evaluate(Transaction *transaction, RuleWithActions *rule, std::vector *l) override; std::string m_retName; }; } // namespace variables } // namespace modsecurity #endif // SRC_VARIABLES_TIME_YEAR_H_ modsecurity-v3.0.6/src/variables/request_body_length.h0000664000175000017500000000175714146026157024375 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include #include #include #include #ifndef SRC_VARIABLES_REQUEST_BODY_LENGTH_H_ #define SRC_VARIABLES_REQUEST_BODY_LENGTH_H_ #include "src/variables/variable.h" namespace modsecurity { class Transaction; namespace variables { DEFINE_VARIABLE(RequestBodyLength, REQUEST_BODY_LENGTH, m_variableRequestBodyLength) } // namespace variables } // namespace modsecurity #endif // SRC_VARIABLES_REQUEST_BODY_LENGTH_H_ modsecurity-v3.0.6/src/variables/multipart_invalid_part.h0000664000175000017500000000201214146026157025065 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include #include #include #include #ifndef SRC_VARIABLES_MULTIPART_INVALID_PART_H_ #define SRC_VARIABLES_MULTIPART_INVALID_PART_H_ #include "src/variables/variable.h" namespace modsecurity { class Transaction; namespace variables { DEFINE_VARIABLE(MultipartInvalidPart, MULTIPART_INVALID_PART, m_variableMultipartInvalidHeaderFolding) } // namespace variables } // namespace modsecurity #endif // SRC_VARIABLES_MULTIPART_INVALID_PART_H_ modsecurity-v3.0.6/src/variables/query_string.h0000664000175000017500000000170314146026157023051 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include #include #include #include #ifndef SRC_VARIABLES_QUERY_STRING_H_ #define SRC_VARIABLES_QUERY_STRING_H_ #include "src/variables/variable.h" namespace modsecurity { class Transaction; namespace variables { DEFINE_VARIABLE(QueryString, QUERY_STRING, m_variableQueryString) } // namespace variables } // namespace modsecurity #endif // SRC_VARIABLES_QUERY_STRING_H_ modsecurity-v3.0.6/src/variables/xml.cc0000664000175000017500000001014514146026157021254 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "src/variables/xml.h" #include #include #include #include #include #include #ifdef WITH_LIBXML2 #include #include #include #include #include #endif #include #include #include #include #include #include "modsecurity/transaction.h" #include "modsecurity/rules_set_properties.h" #include "modsecurity/rules_set.h" #include "src/request_body_processor/xml.h" #include "modsecurity/actions/action.h" #include "src/actions/xmlns.h" namespace modsecurity { namespace variables { #ifndef WITH_LIBXML2 void XML::evaluate(Transaction *t, RuleWithActions *rule, std::vector *l) { } #else void XML::evaluate(Transaction *t, RuleWithActions *rule, std::vector *l) { xmlXPathContextPtr xpathCtx; xmlXPathObjectPtr xpathObj; xmlNodeSetPtr nodes; std::string param; const xmlChar* xpathExpr = NULL; int i; //size_t pos; param = m_name; /* pos = m_name.find_first_of(":"); if (pos == std::string::npos) { param = ""; } else { param = std::string(m_name, pos+1, m_name.length() - (pos + 1)); } */ /* Is there an XML document tree at all? */ if (t->m_xml->m_data.doc == NULL) { /* Sorry, we've got nothing to give! */ return; } /* Process the XPath expression. */ xpathExpr = (const xmlChar*)param.c_str(); xpathCtx = xmlXPathNewContext(t->m_xml->m_data.doc); if (xpathCtx == NULL) { ms_dbg_a(t, 1, "XML: Unable to create new XPath context. : "); return; } if (rule == NULL) { ms_dbg_a(t, 2, "XML: Can't look for xmlns, internal error."); } else { std::vector acts = rule->getActionsByName("xmlns", t); for (auto &x : acts) { actions::XmlNS *z = (actions::XmlNS *)x; if (xmlXPathRegisterNs(xpathCtx, (const xmlChar*)z->m_scope.c_str(), (const xmlChar*)z->m_href.c_str()) != 0) { ms_dbg_a(t, 1, "Failed to register XML namespace href \"" + \ z->m_href + "\" prefix \"" + z->m_scope + "\"."); return; } ms_dbg_a(t, 4, "Registered XML namespace href \"" + z->m_href + \ "\" prefix \"" + z->m_scope + "\""); } } /* Initialise XPath expression. */ xpathObj = xmlXPathEvalExpression(xpathExpr, xpathCtx); if (xpathObj == NULL) { ms_dbg_a(t, 1, "XML: Unable to evaluate xpath expression."); xmlXPathFreeContext(xpathCtx); return; } /* Evaluate XPath expression. */ nodes = xpathObj->nodesetval; if (nodes == NULL) { xmlXPathFreeObject(xpathObj); xmlXPathFreeContext(xpathCtx); return; } /* Create one variable for each node in the result. */ for (i = 0; i < nodes->nodeNr; i++) { char *content; content = reinterpret_cast( xmlNodeGetContent(nodes->nodeTab[i])); if (content != NULL) { std::string *a = new std::string(content); VariableValue *var = new VariableValue(m_fullName.get(), a); if (!m_keyExclusion.toOmit(*m_fullName)) { l->push_back(var); } delete a; xmlFree(content); } } xmlXPathFreeObject(xpathObj); xmlXPathFreeContext(xpathCtx); } #endif } // namespace variables } // namespace modsecurity modsecurity-v3.0.6/src/variables/user.h0000664000175000017500000000714414146026157021301 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include #include #include #include #include #ifndef SRC_VARIABLES_USER_H_ #define SRC_VARIABLES_USER_H_ #include "src/variables/variable.h" #include "src/run_time_string.h" namespace modsecurity { class Transaction; namespace variables { class User_DictElement : public Variable { public: explicit User_DictElement(const std::string &dictElement) : Variable("USER:" + dictElement), m_dictElement("USER:" + dictElement) { } void evaluate(Transaction *t, RuleWithActions *rule, std::vector *l) override { t->m_collections.m_user_collection->resolveMultiMatches( m_name, t->m_collections.m_user_collection_key, t->m_rules->m_secWebAppId.m_value, l, m_keyExclusion); } std::string m_dictElement; }; class User_NoDictElement : public Variable { public: User_NoDictElement() : Variable("USER") { } void evaluate(Transaction *t, RuleWithActions *rule, std::vector *l) override { t->m_collections.m_user_collection->resolveMultiMatches(m_name, t->m_collections.m_user_collection_key, t->m_rules->m_secWebAppId.m_value, l, m_keyExclusion); } }; class User_DictElementRegexp : public VariableRegex { public: explicit User_DictElementRegexp(const std::string &dictElement) : VariableRegex("USER", dictElement), m_dictElement(dictElement) { } void evaluate(Transaction *t, RuleWithActions *rule, std::vector *l) override { t->m_collections.m_user_collection->resolveRegularExpression( m_dictElement, t->m_collections.m_user_collection_key, t->m_rules->m_secWebAppId.m_value, l, m_keyExclusion); } std::string m_dictElement; }; class User_DynamicElement : public Variable { public: explicit User_DynamicElement(std::unique_ptr dictElement) : Variable("USER:dynamic"), m_string(std::move(dictElement)) { } void evaluate(Transaction *t, RuleWithActions *rule, std::vector *l) override { std::string string = m_string->evaluate(t); t->m_collections.m_user_collection->resolveMultiMatches( string, t->m_collections.m_user_collection_key, t->m_rules->m_secWebAppId.m_value, l, m_keyExclusion); } static void del(Transaction *t, const std::string &k) { t->m_collections.m_user_collection->del(k, t->m_collections.m_user_collection_key, t->m_rules->m_secWebAppId.m_value); } static void storeOrUpdateFirst(Transaction *t, const std::string &var, const std::string &value) { t->m_collections.m_user_collection->storeOrUpdateFirst( var, t->m_collections.m_user_collection_key, t->m_rules->m_secWebAppId.m_value, value); } std::unique_ptr m_string; }; } // namespace variables } // namespace modsecurity #endif // SRC_VARIABLES_USER_H_ modsecurity-v3.0.6/src/variables/server_addr.h0000664000175000017500000000167514146026157022626 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include #include #include #include #ifndef SRC_VARIABLES_SERVER_ADDR_H_ #define SRC_VARIABLES_SERVER_ADDR_H_ #include "src/variables/variable.h" namespace modsecurity { class Transaction; namespace variables { DEFINE_VARIABLE(ServerAddr, SERVER_ADDR, m_variableServerAddr) } // namespace variables } // namespace modsecurity #endif // SRC_VARIABLES_SERVER_ADDR_H_ modsecurity-v3.0.6/src/variables/matched_var_name.h0000664000175000017500000000173114146026157023574 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include #include #include #include #ifndef SRC_VARIABLES_MATCHED_VAR_NAME_H_ #define SRC_VARIABLES_MATCHED_VAR_NAME_H_ #include "src/variables/variable.h" namespace modsecurity { class Transaction; namespace variables { DEFINE_VARIABLE(MatchedVarName, MATCHED_VAR_NAME, m_variableMatchedVarName) } // namespace variables } // namespace modsecurity #endif // SRC_VARIABLES_MATCHED_VAR_NAME_H_ modsecurity-v3.0.6/src/variables/request_file_name.h0000664000175000017500000000173614146026157024013 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include #include #include #include #ifndef SRC_VARIABLES_REQUEST_FILE_NAME_H_ #define SRC_VARIABLES_REQUEST_FILE_NAME_H_ #include "src/variables/variable.h" namespace modsecurity { class Transaction; namespace variables { DEFINE_VARIABLE(RequestFilename, REQUEST_FILENAME, m_variableRequestFilename) } // namespace variables } // namespace modsecurity #endif // SRC_VARIABLES_REQUEST_FILE_NAME_H_ modsecurity-v3.0.6/src/variables/multipart_boundary_whitespace.h0000664000175000017500000000205314146026157026455 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include #include #include #include #ifndef SRC_VARIABLES_MULTIPART_BOUNDARY_WHITESPACE_H_ #define SRC_VARIABLES_MULTIPART_BOUNDARY_WHITESPACE_H_ #include "src/variables/variable.h" namespace modsecurity { class Transaction; namespace variables { DEFINE_VARIABLE(MultipartBoundaryWhiteSpace, MULTIPART_BOUNDARY_WHITESPACE, m_variableMultipartBoundaryWhiteSpace) } // namespace variables } // namespace modsecurity #endif // SRC_VARIABLES_MULTIPART_BOUNDARY_WHITESPACE_H_ modsecurity-v3.0.6/src/variables/multipart_data_after.h0000664000175000017500000000176514146026157024521 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include #include #include #include #ifndef SRC_VARIABLES_MULTIPART_DATA_AFTER_H_ #define SRC_VARIABLES_MULTIPART_DATA_AFTER_H_ #include "src/variables/variable.h" namespace modsecurity { class Transaction; namespace variables { DEFINE_VARIABLE(MultipartDateAfter, MULTIPART_DATA_AFTER, m_variableMultipartDataAfter) } // namespace variables } // namespace modsecurity #endif // SRC_VARIABLES_MULTIPART_DATA_AFTER_H_ modsecurity-v3.0.6/src/variables/args_post_names.h0000664000175000017500000000173014146026157023502 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include #include #include #include #ifndef SRC_VARIABLES_ARGS_POST_NAMES_H_ #define SRC_VARIABLES_ARGS_POST_NAMES_H_ #include "src/variables/variable.h" namespace modsecurity { class Transaction; namespace variables { DEFINE_VARIABLE_DICT(ArgsPostNames, ARGS_POST_NAMES, m_variableArgsPostNames) } // namespace variables } // namespace modsecurity #endif // SRC_VARIABLES_ARGS_POST_NAMES_H_ modsecurity-v3.0.6/src/variables/args_combined_size.h0000664000175000017500000000175114146026157024147 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include #include #include #include #ifndef SRC_VARIABLES_ARGS_COMBINED_SIZE_H_ #define SRC_VARIABLES_ARGS_COMBINED_SIZE_H_ #include "src/variables/variable.h" namespace modsecurity { class Transaction; namespace variables { DEFINE_VARIABLE(ArgsCombinedSize, ARGS_COMBINED_SIZE, m_variableARGScombinedSize) } // namespace variables } // namespace modsecurity #endif // SRC_VARIABLES_ARGS_COMBINED_SIZE_H_ modsecurity-v3.0.6/src/variables/session.h0000664000175000017500000000726714146026157022014 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include #include #include #include #include #ifndef SRC_VARIABLES_SESSION_H_ #define SRC_VARIABLES_SESSION_H_ #include "src/variables/variable.h" #include "src/run_time_string.h" namespace modsecurity { class Transaction; namespace variables { class Session_DictElement : public Variable { public: explicit Session_DictElement(const std::string &dictElement) : Variable("SESSION:" + dictElement), m_dictElement("SESSION:" + dictElement) { } void evaluate(Transaction *t, RuleWithActions *rule, std::vector *l) override { t->m_collections.m_session_collection->resolveMultiMatches( m_name, t->m_collections.m_session_collection_key, t->m_rules->m_secWebAppId.m_value, l, m_keyExclusion); } std::string m_dictElement; }; class Session_NoDictElement : public Variable { public: Session_NoDictElement() : Variable("SESSION") { } void evaluate(Transaction *t, RuleWithActions *rule, std::vector *l) override { t->m_collections.m_session_collection->resolveMultiMatches("", t->m_collections.m_session_collection_key, t->m_rules->m_secWebAppId.m_value, l, m_keyExclusion); } }; class Session_DictElementRegexp : public VariableRegex { public: explicit Session_DictElementRegexp(const std::string &dictElement) : VariableRegex("SESSION", dictElement), m_dictElement(dictElement) { } void evaluate(Transaction *t, RuleWithActions *rule, std::vector *l) override { t->m_collections.m_session_collection->resolveRegularExpression( m_dictElement, t->m_collections.m_session_collection_key, t->m_rules->m_secWebAppId.m_value, l, m_keyExclusion); } std::string m_dictElement; }; class Session_DynamicElement : public Variable { public: explicit Session_DynamicElement(std::unique_ptr dictElement) : Variable("SESSION:dynamic"), m_string(std::move(dictElement)) { } void evaluate(Transaction *t, RuleWithActions *rule, std::vector *l) override { std::string string = m_string->evaluate(t); t->m_collections.m_session_collection->resolveMultiMatches( string, t->m_collections.m_session_collection_key, t->m_rules->m_secWebAppId.m_value, l, m_keyExclusion); } static void del(Transaction *t, const std::string &k) { t->m_collections.m_session_collection->del(k, t->m_collections.m_session_collection_key, t->m_collections.m_ip_collection_key); } static void storeOrUpdateFirst(Transaction *t, const std::string &var, const std::string &value) { t->m_collections.m_session_collection->storeOrUpdateFirst( var, t->m_collections.m_session_collection_key, t->m_rules->m_secWebAppId.m_value, value); } std::unique_ptr m_string; }; } // namespace variables } // namespace modsecurity #endif // SRC_VARIABLES_SESSION_H_ modsecurity-v3.0.6/src/variables/user_id.h0000664000175000017500000000164414146026157021754 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include #include #include #include #ifndef SRC_VARIABLES_USER_ID_H_ #define SRC_VARIABLES_USER_ID_H_ #include "src/variables/variable.h" namespace modsecurity { class Transaction; namespace variables { DEFINE_VARIABLE(UserID, USERID, m_variableUserID) } // namespace variables } // namespace modsecurity #endif // SRC_VARIABLES_USER_ID_H_ modsecurity-v3.0.6/src/variables/session_id.h0000664000175000017500000000166514146026157022464 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include #include #include #include #ifndef SRC_VARIABLES_SESSION_ID_H_ #define SRC_VARIABLES_SESSION_ID_H_ #include "src/variables/variable.h" namespace modsecurity { class Transaction; namespace variables { DEFINE_VARIABLE(SessionID, SESSIONID, m_variableSessionID) } // namespace variables } // namespace modsecurity #endif // SRC_VARIABLES_SESSION_ID_H_ modsecurity-v3.0.6/src/variables/auth_type.h0000664000175000017500000000166114146026157022323 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include #include #include #include #ifndef SRC_VARIABLES_AUTH_TYPE_H_ #define SRC_VARIABLES_AUTH_TYPE_H_ #include "src/variables/variable.h" namespace modsecurity { class Transaction; namespace variables { DEFINE_VARIABLE(AuthType, AUTH_TYPE, m_variableAuthType) } // namespace variables } // namespace modsecurity #endif // SRC_VARIABLES_AUTH_TYPE_H_ modsecurity-v3.0.6/src/variables/modsec_build.cc0000664000175000017500000000166414146026157023113 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "src/variables/modsec_build.h" #include #include #include #include "modsecurity/transaction.h" namespace modsecurity { namespace variables { void ModsecBuild::evaluate(Transaction *transaction, RuleWithActions *rule, std::vector *l) { l->push_back(new VariableValue(&m_retName, &m_build)); } } // namespace variables } // namespace modsecurity modsecurity-v3.0.6/src/variables/multipart_name.h0000664000175000017500000000172514146026157023343 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include #include #include #include #ifndef SRC_VARIABLES_MULTIPART_NAME_H_ #define SRC_VARIABLES_MULTIPART_NAME_H_ #include "src/variables/variable.h" namespace modsecurity { class Transaction; namespace variables { DEFINE_VARIABLE_DICT(MultiPartName, MULTIPART_NAME, m_variableMultipartName) } // namespace variables } // namespace modsecurity #endif // SRC_VARIABLES_MULTIPART_NAME_H_ modsecurity-v3.0.6/src/variables/time.h0000664000175000017500000000222714146026157021256 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include #include #include #include #ifndef SRC_VARIABLES_TIME_H_ #define SRC_VARIABLES_TIME_H_ #include "src/variables/variable.h" namespace modsecurity { class Transaction; namespace variables { class Time : public Variable { public: explicit Time(const std::string &_name) : Variable(_name), m_retName("TIME") { } void evaluate(Transaction *transaction, RuleWithActions *rule, std::vector *l) override; std::string m_retName; }; } // namespace variables } // namespace modsecurity #endif // SRC_VARIABLES_TIME_H_ modsecurity-v3.0.6/src/variables/tx.cc0000664000175000017500000000161714146026157021113 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "src/variables/tx.h" #include #include #include #include #include #include #include #include #include #include #include #include "modsecurity/transaction.h" namespace modsecurity { namespace variables { } // namespace variables } // namespace modsecurity modsecurity-v3.0.6/src/variables/multipart_header_folding.h0000664000175000017500000000201514146026157025346 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include #include #include #include #ifndef SRC_VARIABLES_MULTIPART_HEADER_FOLDING_H_ #define SRC_VARIABLES_MULTIPART_HEADER_FOLDING_H_ #include "src/variables/variable.h" namespace modsecurity { class Transaction; namespace variables { DEFINE_VARIABLE(MultipartHeaderFolding, MULTIPART_HEADER_FOLDING, m_variableMultipartHeaderFolding) } // namespace variables } // namespace modsecurity #endif // SRC_VARIABLES_MULTIPART_HEADER_FOLDING_H_ modsecurity-v3.0.6/src/variables/response_body.h0000664000175000017500000000171114146026157023170 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include #include #include #include #ifndef SRC_VARIABLES_RESPONSE_BODY_H_ #define SRC_VARIABLES_RESPONSE_BODY_H_ #include "src/variables/variable.h" namespace modsecurity { class Transaction; namespace variables { DEFINE_VARIABLE(ResponseBody, RESPONSE_BODY, m_variableResponseBody) } // namespace variables } // namespace modsecurity #endif // SRC_VARIABLES_RESPONSE_BODY_H_ modsecurity-v3.0.6/src/variables/multipart_missing_semicolon.h0000664000175000017500000000203714146026157026141 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include #include #include #include #ifndef SRC_VARIABLES_MULTIPART_MISSING_SEMICOLON_H_ #define SRC_VARIABLES_MULTIPART_MISSING_SEMICOLON_H_ #include "src/variables/variable.h" namespace modsecurity { class Transaction; namespace variables { DEFINE_VARIABLE(MultipartMissingSemicolon, MULTIPART_MISSING_SEMICOLON, m_variableMultipartMissingSemicolon) } // namespace variables } // namespace modsecurity #endif // SRC_VARIABLES_MULTIPART_MISSING_SEMICOLON_H_ modsecurity-v3.0.6/src/variables/args.h0000664000175000017500000000163214146026157021253 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include #include #include #include #ifndef SRC_VARIABLES_ARGS_H_ #define SRC_VARIABLES_ARGS_H_ #include "src/variables/variable.h" namespace modsecurity { class Transaction; namespace variables { DEFINE_VARIABLE_DICT(Args, ARGS, m_variableArgs) } // namespace variables } // namespace modsecurity #endif // SRC_VARIABLES_ARGS_H_ modsecurity-v3.0.6/src/variables/url_encoded_error.h0000664000175000017500000000173614146026157024020 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include #include #include #include #ifndef SRC_VARIABLES_URL_ENCODED_ERROR_H_ #define SRC_VARIABLES_URL_ENCODED_ERROR_H_ #include "src/variables/variable.h" namespace modsecurity { class Transaction; namespace variables { DEFINE_VARIABLE(UrlEncodedError, URLENCODED_ERROR, m_variableUrlEncodedError) } // namespace variables } // namespace modsecurity #endif // SRC_VARIABLES_URL_ENCODED_ERROR_H_ modsecurity-v3.0.6/src/variables/multipart_lf_line.h0000664000175000017500000000173714146026157024036 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include #include #include #include #ifndef SRC_VARIABLES_MULTIPART_LF_LINE_H_ #define SRC_VARIABLES_MULTIPART_LF_LINE_H_ #include "src/variables/variable.h" namespace modsecurity { class Transaction; namespace variables { DEFINE_VARIABLE(MultipartLFLine, MULTIPART_LF_LINE, m_variableMultipartLFLine) } // namespace variables } // namespace modsecurity #endif // SRC_VARIABLES_MULTIPART_LF_LINE_H_ modsecurity-v3.0.6/src/variables/multipart_file_name.h0000664000175000017500000000176414146026157024345 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include #include #include #include #ifndef SRC_VARIABLES_MULTIPART_FILE_NAME_H_ #define SRC_VARIABLES_MULTIPART_FILE_NAME_H_ #include "src/variables/variable.h" namespace modsecurity { class Transaction; namespace variables { DEFINE_VARIABLE_DICT(MultiPartFileName, MULTIPART_FILENAME, m_variableMultipartFileName) } // namespace variables } // namespace modsecurity #endif // SRC_VARIABLES_MULTIPART_FILE_NAME_H_ modsecurity-v3.0.6/src/variables/multipart_boundary_quoted.h0000664000175000017500000000202314146026157025617 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include #include #include #include #ifndef SRC_VARIABLES_MULTIPART_BOUNDARY_QUOTED_H_ #define SRC_VARIABLES_MULTIPART_BOUNDARY_QUOTED_H_ #include "src/variables/variable.h" namespace modsecurity { class Transaction; namespace variables { DEFINE_VARIABLE(MultipartBoundaryQuoted, MULTIPART_BOUNDARY_QUOTED, m_variableMultipartBoundaryQuoted) } // namespace variables } // namespace modsecurity #endif // SRC_VARIABLES_MULTIPART_BOUNDARY_QUOTED_H_ modsecurity-v3.0.6/src/variables/time_year.cc0000664000175000017500000000253614146026157022437 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "src/variables/time_year.h" #include #include #include #include #include #include #include #include #include #include #include #include "modsecurity/transaction.h" namespace modsecurity { namespace variables { void TimeYear::evaluate(Transaction *transaction, RuleWithActions *rule, std::vector *l) { char tstr[200]; struct tm timeinfo; time_t timer; time(&timer); memset(tstr, '\0', 200); localtime_r(&timer, &timeinfo); strftime(tstr, 200, "%Y", &timeinfo); transaction->m_variableTimeYear.assign(tstr); l->push_back(new VariableValue(&m_retName, &transaction->m_variableTimeYear)); } } // namespace variables } // namespace modsecurity modsecurity-v3.0.6/src/variables/reqbody_processor.h0000664000175000017500000000174114146026157024064 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include #include #include #include #ifndef SRC_VARIABLES_REQBODY_PROCESSOR_H_ #define SRC_VARIABLES_REQBODY_PROCESSOR_H_ #include "src/variables/variable.h" namespace modsecurity { class Transaction; namespace variables { DEFINE_VARIABLE(ReqbodyProcessor, REQBODY_PROCESSOR, m_variableReqbodyProcessor) } // namespace variables } // namespace modsecurity #endif // SRC_VARIABLES_REQBODY_PROCESSOR_H_ modsecurity-v3.0.6/src/variables/args_post.h0000664000175000017500000000166714146026157022330 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include #include #include #include #ifndef SRC_VARIABLES_ARGS_POST_H_ #define SRC_VARIABLES_ARGS_POST_H_ #include "src/variables/variable.h" namespace modsecurity { class Transaction; namespace variables { DEFINE_VARIABLE_DICT(ArgsPost, ARGS_POST, m_variableArgsPost) } // namespace variables } // namespace modsecurity #endif // SRC_VARIABLES_ARGS_POST_H_ modsecurity-v3.0.6/src/variables/time_mon.cc0000664000175000017500000000261014146026157022261 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "src/variables/time_mon.h" #include #include #include #include #include #include #include #include #include #include #include #include "modsecurity/transaction.h" namespace modsecurity { namespace variables { void TimeMon::evaluate(Transaction *transaction, RuleWithActions *rule, std::vector *l) { char tstr[200]; struct tm timeinfo; time_t timer; time(&timer); memset(tstr, '\0', 200); localtime_r(&timer, &timeinfo); strftime(tstr, 200, "%m", &timeinfo); int a = atoi(tstr); a--; transaction->m_variableTimeMin.assign(std::to_string(a)); l->push_back(new VariableValue(&m_retName, &transaction->m_variableTimeMin)); } } // namespace variables } // namespace modsecurity modsecurity-v3.0.6/src/variables/request_protocol.h0000664000175000017500000000173314146026157023732 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include #include #include #include #ifndef SRC_VARIABLES_REQUEST_PROTOCOL_H_ #define SRC_VARIABLES_REQUEST_PROTOCOL_H_ #include "src/variables/variable.h" namespace modsecurity { class Transaction; namespace variables { DEFINE_VARIABLE(RequestProtocol, REQUEST_PROTOCOL, m_variableRequestProtocol) } // namespace variables } // namespace modsecurity #endif // SRC_VARIABLES_REQUEST_PROTOCOL_H_ modsecurity-v3.0.6/src/variables/duration.h0000664000175000017500000000223414146026157022143 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include #include #include #ifndef SRC_VARIABLES_DURATION_H_ #define SRC_VARIABLES_DURATION_H_ #include "src/variables/variable.h" namespace modsecurity { class Transaction; namespace variables { class Duration : public Variable { public: explicit Duration(const std::string &_name) : Variable(_name), m_retName("DURATION") { } void evaluate(Transaction *transaction, RuleWithActions *rule, std::vector *l) override; std::string m_retName; }; } // namespace variables } // namespace modsecurity #endif // SRC_VARIABLES_DURATION_H_ modsecurity-v3.0.6/src/variables/full_request.h0000664000175000017500000000170314146026157023030 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include #include #include #include #ifndef SRC_VARIABLES_FULL_REQUEST_H_ #define SRC_VARIABLES_FULL_REQUEST_H_ #include "src/variables/variable.h" namespace modsecurity { class Transaction; namespace variables { DEFINE_VARIABLE(FullRequest, FULL_REQUEST, m_variableFullRequest) } // namespace variables } // namespace modsecurity #endif // SRC_VARIABLES_FULL_REQUEST_H_ modsecurity-v3.0.6/src/variables/time_sec.h0000664000175000017500000000223114146026157022103 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include #include #include #ifndef SRC_VARIABLES_TIME_SEC_H_ #define SRC_VARIABLES_TIME_SEC_H_ #include "src/variables/variable.h" namespace modsecurity { class Transaction; namespace variables { class TimeSec : public Variable { public: explicit TimeSec(const std::string &_name) : Variable(_name), m_retName("TIME_SEC") { } void evaluate(Transaction *transaction, RuleWithActions *rule, std::vector *l) override; std::string m_retName; }; } // namespace variables } // namespace modsecurity #endif // SRC_VARIABLES_TIME_SEC_H_ modsecurity-v3.0.6/src/variables/env.h0000664000175000017500000000211014146026157021077 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include #include #include #ifndef SRC_VARIABLES_ENV_H_ #define SRC_VARIABLES_ENV_H_ #include "src/variables/variable.h" namespace modsecurity { class Transaction; namespace variables { class Env : public Variable { public: explicit Env(const std::string &_name) : Variable(_name) { } void evaluate(Transaction *transaction, RuleWithActions *rule, std::vector *l) override; }; } // namespace variables } // namespace modsecurity #endif // SRC_VARIABLES_ENV_H_ modsecurity-v3.0.6/src/variables/status.h0000664000175000017500000000165114146026157021643 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include #include #include #include #ifndef SRC_VARIABLES_STATUS_H_ #define SRC_VARIABLES_STATUS_H_ #include "src/variables/variable.h" namespace modsecurity { class Transaction; namespace variables { DEFINE_VARIABLE(Status, STATUS, m_variableResponseStatus) } // namespace variables } // namespace modsecurity #endif // SRC_VARIABLES_STATUS_H_ modsecurity-v3.0.6/src/variables/highest_severity.h0000664000175000017500000000221414146026157023701 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include #include #include #ifndef SRC_VARIABLES_HIGHEST_SEVERITY_H_ #define SRC_VARIABLES_HIGHEST_SEVERITY_H_ #include "src/variables/variable.h" namespace modsecurity { class Transaction; namespace variables { class HighestSeverity : public Variable { public: explicit HighestSeverity(const std::string &_name) : Variable(_name) { } void evaluate(Transaction *transaction, RuleWithActions *rule, std::vector *l) override; }; } // namespace variables } // namespace modsecurity #endif // SRC_VARIABLES_HIGHEST_SEVERITY_H_ modsecurity-v3.0.6/src/variables/reqbody_processor_error_msg.h0000664000175000017500000000202514146026157026137 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include #include #include #include #ifndef SRC_VARIABLES_REQBODY_PROCESSOR_ERROR_MSG_H_ #define SRC_VARIABLES_REQBODY_PROCESSOR_ERROR_MSG_H_ #include "src/variables/variable.h" namespace modsecurity { class Transaction; namespace variables { DEFINE_VARIABLE(ReqbodyProcessorErrorMsg, PROCESSOR_ERROR_MSG, m_variableReqbodyProcessorErrorMsg) } // namespace variables } // namespace modsecurity #endif // SRC_VARIABLES_REQBODY_PROCESSOR_ERROR_MSG_H_ modsecurity-v3.0.6/src/variables/remote_port.h0000664000175000017500000000167514146026157022665 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include #include #include #include #ifndef SRC_VARIABLES_REMOTE_PORT_H_ #define SRC_VARIABLES_REMOTE_PORT_H_ #include "src/variables/variable.h" namespace modsecurity { class Transaction; namespace variables { DEFINE_VARIABLE(RemotePort, REMOTE_PORT, m_variableRemotePort) } // namespace variables } // namespace modsecurity #endif // SRC_VARIABLES_REMOTE_PORT_H_ modsecurity-v3.0.6/src/variables/reqbody_processor_error.h0000664000175000017500000000200714146026157025271 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include #include #include #include #ifndef SRC_VARIABLES_REQBODY_PROCESSOR_ERROR_H_ #define SRC_VARIABLES_REQBODY_PROCESSOR_ERROR_H_ #include "src/variables/variable.h" namespace modsecurity { class Transaction; namespace variables { DEFINE_VARIABLE(ReqbodyProcessorError, REQBODY_PROCESSOR_ERROR, m_variableReqbodyProcessorError) } // namespace variables } // namespace modsecurity #endif // SRC_VARIABLES_REQBODY_PROCESSOR_ERROR_H_ modsecurity-v3.0.6/src/variables/geo.h0000664000175000017500000000162514146026157021073 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include #include #include #include #ifndef SRC_VARIABLES_GEO_H_ #define SRC_VARIABLES_GEO_H_ #include "src/variables/variable.h" namespace modsecurity { class Transaction; namespace variables { DEFINE_VARIABLE_DICT(Geo, GEO, m_variableGeo) } // namespace variables } // namespace modsecurity #endif // SRC_VARIABLES_GEO_H_ modsecurity-v3.0.6/src/variables/request_line.h0000664000175000017500000000170314146026157023015 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include #include #include #include #ifndef SRC_VARIABLES_REQUEST_LINE_H_ #define SRC_VARIABLES_REQUEST_LINE_H_ #include "src/variables/variable.h" namespace modsecurity { class Transaction; namespace variables { DEFINE_VARIABLE(RequestLine, REQUEST_LINE, m_variableRequestLine) } // namespace variables } // namespace modsecurity #endif // SRC_VARIABLES_REQUEST_LINE_H_ modsecurity-v3.0.6/src/variables/files_sizes.h0000664000175000017500000000170314146026157022635 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include #include #include #include #ifndef SRC_VARIABLES_FILES_SIZES_H_ #define SRC_VARIABLES_FILES_SIZES_H_ #include "src/variables/variable.h" namespace modsecurity { class Transaction; namespace variables { DEFINE_VARIABLE_DICT(FilesSizes, FILES_SIZES, m_variableFilesSizes) } // namespace variables } // namespace modsecurity #endif // SRC_VARIABLES_FILES_SIZES_H_ modsecurity-v3.0.6/src/variables/time_min.cc0000664000175000017500000000253214146026157022256 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "src/variables/time_min.h" #include #include #include #include #include #include #include #include #include #include #include #include "modsecurity/transaction.h" namespace modsecurity { namespace variables { void TimeMin::evaluate(Transaction *transaction, RuleWithActions *rule, std::vector *l) { char tstr[200]; struct tm timeinfo; time_t timer; time(&timer); memset(tstr, '\0', 200); localtime_r(&timer, &timeinfo); strftime(tstr, 200, "%M", &timeinfo); transaction->m_variableTimeMin.assign(tstr); l->push_back(new VariableValue(&m_retName, &transaction->m_variableTimeMin)); } } // namespace variables } // namespace modsecurity modsecurity-v3.0.6/src/variables/files.h0000664000175000017500000000164114146026157021421 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include #include #include #include #ifndef SRC_VARIABLES_FILES_H_ #define SRC_VARIABLES_FILES_H_ #include "src/variables/variable.h" namespace modsecurity { class Transaction; namespace variables { DEFINE_VARIABLE_DICT(Files, FILES, m_variableFiles) } // namespace variables } // namespace modsecurity #endif // SRC_VARIABLES_FILES_H_ modsecurity-v3.0.6/src/variables/files_names.h0000664000175000017500000000170314146026157022603 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include #include #include #include #ifndef SRC_VARIABLES_FILES_NAMES_H_ #define SRC_VARIABLES_FILES_NAMES_H_ #include "src/variables/variable.h" namespace modsecurity { class Transaction; namespace variables { DEFINE_VARIABLE_DICT(FilesNames, FILES_NAMES, m_variableFilesNames) } // namespace variables } // namespace modsecurity #endif // SRC_VARIABLES_FILES_NAMES_H_ modsecurity-v3.0.6/src/variables/rule.cc0000664000175000017500000000175614146026157021433 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "src/variables/rule.h" namespace modsecurity { namespace variables { const std::string Rule_DictElement::m_rule("RULE"); const std::string Rule_DictElement::m_rule_id("id"); const std::string Rule_DictElement::m_rule_rev("rev"); const std::string Rule_DictElement::m_rule_severity("severity"); const std::string Rule_DictElement::m_rule_logdata("logdata"); const std::string Rule_DictElement::m_rule_msg("msg"); } // namespace variables } // namespace modsecurity modsecurity-v3.0.6/src/variables/time_wday.h0000664000175000017500000000223714146026157022303 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include #include #include #ifndef SRC_VARIABLES_TIME_WDAY_H_ #define SRC_VARIABLES_TIME_WDAY_H_ #include "src/variables/variable.h" namespace modsecurity { class Transaction; namespace variables { class TimeWDay : public Variable { public: explicit TimeWDay(const std::string &_name) : Variable(_name), m_retName("TIME_WDAY") { } void evaluate(Transaction *transaction, RuleWithActions *rule, std::vector *l) override; std::string m_retName; }; } // namespace variables } // namespace modsecurity #endif // SRC_VARIABLES_TIME_WDAY_H_ modsecurity-v3.0.6/src/variables/matched_vars_names.h0000664000175000017500000000175614146026157024151 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include #include #include #include #ifndef SRC_VARIABLES_MATCHED_VARS_NAMES_H_ #define SRC_VARIABLES_MATCHED_VARS_NAMES_H_ #include "src/variables/variable.h" namespace modsecurity { class Transaction; namespace variables { DEFINE_VARIABLE_DICT(MatchedVarsNames, MATCHED_VARS_NAMES, m_variableMatchedVarsNames) } // namespace variables } // namespace modsecurity #endif // SRC_VARIABLES_MATCHED_VARS_NAMES_H_ modsecurity-v3.0.6/src/variables/multipart_file_limit_exceeded.h0000664000175000017500000000205114146026157026357 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include #include #include #include #ifndef SRC_VARIABLES_MULTIPART_FILE_LIMIT_EXCEEDED_H_ #define SRC_VARIABLES_MULTIPART_FILE_LIMIT_EXCEEDED_H_ #include "src/variables/variable.h" namespace modsecurity { class Transaction; namespace variables { DEFINE_VARIABLE(MultipartFileLimitExceeded, MULTIPART_FILE_LIMIT_EXCEEDED, m_variableMultipartFileLimitExceeded) } // namespace variables } // namespace modsecurity #endif // SRC_VARIABLES_MULTIPART_FILE_LIMIT_EXCEEDED_H_ modsecurity-v3.0.6/src/variables/response_protocol.h0000664000175000017500000000174114146026157024077 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include #include #include #include #ifndef SRC_VARIABLES_RESPONSE_PROTOCOL_H_ #define SRC_VARIABLES_RESPONSE_PROTOCOL_H_ #include "src/variables/variable.h" namespace modsecurity { class Transaction; namespace variables { DEFINE_VARIABLE(ResponseProtocol, RESPONSE_PROTOCOL, m_variableResponseProtocol) } // namespace variables } // namespace modsecurity #endif // SRC_VARIABLES_RESPONSE_PROTOCOL_H_ modsecurity-v3.0.6/src/variables/matched_var.h0000664000175000017500000000167514146026157022603 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include #include #include #include #ifndef SRC_VARIABLES_MATCHED_VAR_H_ #define SRC_VARIABLES_MATCHED_VAR_H_ #include "src/variables/variable.h" namespace modsecurity { class Transaction; namespace variables { DEFINE_VARIABLE(MatchedVar, MATCHED_VAR, m_variableMatchedVar) } // namespace variables } // namespace modsecurity #endif // SRC_VARIABLES_MATCHED_VAR_H_ modsecurity-v3.0.6/src/variables/xml.h0000664000175000017500000000323614146026157021121 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include #include #include #include #ifndef SRC_VARIABLES_XML_H_ #define SRC_VARIABLES_XML_H_ #include "src/variables/variable.h" #include "src/variables/xml.h" namespace modsecurity { class Transaction; namespace variables { /* Invocation without an XPath expression makes sense * with functions that manipulate the document tree. */ class XML_NoDictElement : public Variable { public: XML_NoDictElement() : Variable("XML"), m_plain("[XML document tree]"), m_var(&m_name, &m_plain) { } void evaluate(Transaction *transaction, RuleWithActions *rule, std::vector *l) override { l->push_back(new VariableValue(&m_var)); } std::string m_plain; VariableValue m_var; }; class XML : public Variable { public: explicit XML(const std::string &_name) : Variable(_name) { } void evaluate(Transaction *transaction, RuleWithActions *rule, std::vector *l) override; }; } // namespace variables } // namespace modsecurity #endif // SRC_VARIABLES_XML_H_ modsecurity-v3.0.6/src/variables/time.cc0000664000175000017500000000252314146026157021413 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "src/variables/time.h" #include #include #include #include #include #include #include #include #include #include #include #include "modsecurity/transaction.h" namespace modsecurity { namespace variables { void Time::evaluate(Transaction *transaction, RuleWithActions *rule, std::vector *l) { char tstr[200]; struct tm timeinfo; time_t timer; time(&timer); memset(tstr, '\0', 200); localtime_r(&timer, &timeinfo); strftime(tstr, 200, "%H:%M:%S", &timeinfo); transaction->m_variableTime.assign(tstr); l->push_back(new VariableValue(&m_retName, &transaction->m_variableTime)); } } // namespace variables } // namespace modsecurity modsecurity-v3.0.6/src/variables/files_tmp_content.h0000664000175000017500000000175114146026157024035 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include #include #include #include #ifndef SRC_VARIABLES_FILES_TMP_CONTENT_H_ #define SRC_VARIABLES_FILES_TMP_CONTENT_H_ #include "src/variables/variable.h" namespace modsecurity { class Transaction; namespace variables { DEFINE_VARIABLE_DICT(FilesTmpContent, FILES_TMP_CONTENT, m_variableFilesTmpContent) } // namespace variables } // namespace modsecurity #endif // SRC_VARIABLES_FILES_TMP_CONTENT_H_ modsecurity-v3.0.6/src/variables/time_day.h0000664000175000017500000000223114146026157022106 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include #include #include #ifndef SRC_VARIABLES_TIME_DAY_H_ #define SRC_VARIABLES_TIME_DAY_H_ #include "src/variables/variable.h" namespace modsecurity { class Transaction; namespace variables { class TimeDay : public Variable { public: explicit TimeDay(const std::string &_name) : Variable(_name), m_retName("TIME_DAY") { } void evaluate(Transaction *transaction, RuleWithActions *rule, std::vector *l) override; std::string m_retName; }; } // namespace variables } // namespace modsecurity #endif // SRC_VARIABLES_TIME_DAY_H_ modsecurity-v3.0.6/src/variables/time_mon.h0000664000175000017500000000223114146026157022122 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include #include #include #ifndef SRC_VARIABLES_TIME_MON_H_ #define SRC_VARIABLES_TIME_MON_H_ #include "src/variables/variable.h" namespace modsecurity { class Transaction; namespace variables { class TimeMon : public Variable { public: explicit TimeMon(const std::string &_name) : Variable(_name), m_retName("TIME_MON") { } void evaluate(Transaction *transaction, RuleWithActions *rule, std::vector *l) override; std::string m_retName; }; } // namespace variables } // namespace modsecurity #endif // SRC_VARIABLES_TIME_MON_H_ modsecurity-v3.0.6/src/variables/reqbody_error_msg.h0000664000175000017500000000173714146026157024051 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include #include #include #include #ifndef SRC_VARIABLES_REQBODY_ERROR_MSG_H_ #define SRC_VARIABLES_REQBODY_ERROR_MSG_H_ #include "src/variables/variable.h" namespace modsecurity { class Transaction; namespace variables { DEFINE_VARIABLE(ReqbodyErrorMsg, REQBODY_ERROR_MSG, m_variableReqbodyErrorMsg) } // namespace variables } // namespace modsecurity #endif // SRC_VARIABLES_REQBODY_ERROR_MSG_H_ modsecurity-v3.0.6/src/variables/multipart_data_before.h0000664000175000017500000000177314146026157024661 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include #include #include #include #ifndef SRC_VARIABLES_MULTIPART_DATA_BEFORE_H_ #define SRC_VARIABLES_MULTIPART_DATA_BEFORE_H_ #include "src/variables/variable.h" namespace modsecurity { class Transaction; namespace variables { DEFINE_VARIABLE(MultipartDateBefore, MULTIPART_DATA_BEFORE, m_variableMultipartDataBefore) } // namespace variables } // namespace modsecurity #endif // SRC_VARIABLES_MULTIPART_DATA_BEFORE_H_ modsecurity-v3.0.6/src/variables/multipart_unmatched_boundary.h0000664000175000017500000000204514146026157026272 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include #include #include #include #ifndef SRC_VARIABLES_MULTIPART_UNMATCHED_BOUNDARY_H_ #define SRC_VARIABLES_MULTIPART_UNMATCHED_BOUNDARY_H_ #include "src/variables/variable.h" namespace modsecurity { class Transaction; namespace variables { DEFINE_VARIABLE(MultipartUnmatchedBoundary, MULTIPART_UNMATCHED_BOUNDARY, m_variableMultipartUnmatchedBoundary) } // namespace variables } // namespace modsecurity #endif // SRC_VARIABLES_MULTIPART_UNMATCHED_BOUNDARY_H_ modsecurity-v3.0.6/src/variables/response_headers.h0000664000175000017500000000174514146026157023655 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include #include #include #include #ifndef SRC_VARIABLES_RESPONSE_HEADERS_H_ #define SRC_VARIABLES_RESPONSE_HEADERS_H_ #include "src/variables/variable.h" namespace modsecurity { class Transaction; namespace variables { DEFINE_VARIABLE_DICT(ResponseHeaders, RESPONSE_HEADERS, m_variableResponseHeaders) } // namespace variables } // namespace modsecurity #endif // SRC_VARIABLES_RESPONSE_HEADERS_H_ modsecurity-v3.0.6/src/variables/args_get_names.h0000664000175000017500000000172214146026157023275 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include #include #include #include #ifndef SRC_VARIABLES_ARGS_GET_NAMES_H_ #define SRC_VARIABLES_ARGS_GET_NAMES_H_ #include "src/variables/variable.h" namespace modsecurity { class Transaction; namespace variables { DEFINE_VARIABLE_DICT(ArgsGetNames, ARGS_GET_NAMES, m_variableArgsGetNames) } // namespace variables } // namespace modsecurity #endif // SRC_VARIABLES_ARGS_GET_NAMES_H_ modsecurity-v3.0.6/src/variables/files_combined_size.h0000664000175000017500000000175714146026157024323 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include #include #include #include #ifndef SRC_VARIABLES_FILES_COMBINED_SIZE_H_ #define SRC_VARIABLES_FILES_COMBINED_SIZE_H_ #include "src/variables/variable.h" namespace modsecurity { class Transaction; namespace variables { DEFINE_VARIABLE(FilesCombinedSize, FILES_COMBINED_SIZE, m_variableFilesCombinedSize) } // namespace variables } // namespace modsecurity #endif // SRC_VARIABLES_FILES_COMBINED_SIZE_H_ modsecurity-v3.0.6/src/variables/multipart_strict_error.h0000664000175000017500000000200114146026157025130 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include #include #include #include #ifndef SRC_VARIABLES_MULTIPART_STRICT_ERROR_H_ #define SRC_VARIABLES_MULTIPART_STRICT_ERROR_H_ #include "src/variables/variable.h" namespace modsecurity { class Transaction; namespace variables { DEFINE_VARIABLE(MultipartStrictError, MULTIPART_STRICT_ERROR, m_variableMultipartStrictError) } // namespace variables } // namespace modsecurity #endif // SRC_VARIABLES_MULTIPART_STRICT_ERROR_H_ modsecurity-v3.0.6/src/variables/highest_severity.cc0000664000175000017500000000221314146026157024036 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "src/variables/highest_severity.h" #include #include #include #include #include #include "modsecurity/transaction.h" namespace modsecurity { namespace variables { void HighestSeverity::evaluate(Transaction *transaction, RuleWithActions *rule, std::vector *l) { transaction->m_variableHighestSeverityAction.assign( std::to_string(transaction->m_highestSeverityAction)); l->push_back(new VariableValue(m_fullName.get(), &transaction->m_variableHighestSeverityAction)); } } // namespace variables } // namespace modsecurity modsecurity-v3.0.6/src/variables/request_headers.h0000664000175000017500000000173314146026157023504 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include #include #include #include #ifndef SRC_VARIABLES_REQUEST_HEADERS_H_ #define SRC_VARIABLES_REQUEST_HEADERS_H_ #include "src/variables/variable.h" namespace modsecurity { class Transaction; namespace variables { DEFINE_VARIABLE_DICT(RequestHeaders, REQUEST_HEADERS, m_variableRequestHeaders) } // namespace variables } // namespace modsecurity #endif // SRC_VARIABLES_REQUEST_HEADERS_H_ modsecurity-v3.0.6/src/variables/path_info.h0000664000175000017500000000166114146026157022270 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include #include #include #include #ifndef SRC_VARIABLES_PATH_INFO_H_ #define SRC_VARIABLES_PATH_INFO_H_ #include "src/variables/variable.h" namespace modsecurity { class Transaction; namespace variables { DEFINE_VARIABLE(PathInfo, PATH_INFO, m_variablePathInfo) } // namespace variables } // namespace modsecurity #endif // SRC_VARIABLES_PATH_INFO_H_ modsecurity-v3.0.6/src/variables/reqbody_error.h0000664000175000017500000000171114146026157023173 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include #include #include #include #ifndef SRC_VARIABLES_REQBODY_ERROR_H_ #define SRC_VARIABLES_REQBODY_ERROR_H_ #include "src/variables/variable.h" namespace modsecurity { class Transaction; namespace variables { DEFINE_VARIABLE(ReqbodyError, REQBODY_ERROR, m_variableReqbodyError) } // namespace variables } // namespace modsecurity #endif // SRC_VARIABLES_REQBODY_ERROR_H_ modsecurity-v3.0.6/src/variables/request_base_name.h0000664000175000017500000000173614146026157024006 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include #include #include #include #ifndef SRC_VARIABLES_REQUEST_BASE_NAME_H_ #define SRC_VARIABLES_REQUEST_BASE_NAME_H_ #include "src/variables/variable.h" namespace modsecurity { class Transaction; namespace variables { DEFINE_VARIABLE(RequestBasename, REQUEST_BASENAME, m_variableRequestBasename) } // namespace variables } // namespace modsecurity #endif // SRC_VARIABLES_REQUEST_BASE_NAME_H_ modsecurity-v3.0.6/src/variables/time_hour.cc0000664000175000017500000000253614146026157022454 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "src/variables/time_hour.h" #include #include #include #include #include #include #include #include #include #include #include #include "modsecurity/transaction.h" namespace modsecurity { namespace variables { void TimeHour::evaluate(Transaction *transaction, RuleWithActions *rule, std::vector *l) { char tstr[200]; struct tm timeinfo; time_t timer; time(&timer); memset(tstr, '\0', 200); localtime_r(&timer, &timeinfo); strftime(tstr, 200, "%H", &timeinfo); transaction->m_variableTimeHour.assign(tstr); l->push_back(new VariableValue(&m_retName, &transaction->m_variableTimeHour)); } } // namespace variables } // namespace modsecurity modsecurity-v3.0.6/src/variables/request_cookies_names.h0000664000175000017500000000200114146026157024675 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include #include #include #include #ifndef SRC_VARIABLES_REQUEST_COOKIES_NAMES_H_ #define SRC_VARIABLES_REQUEST_COOKIES_NAMES_H_ #include "src/variables/variable.h" namespace modsecurity { class Transaction; namespace variables { DEFINE_VARIABLE_DICT(RequestCookiesNames, REQUEST_COOKIES_NAMES, m_variableRequestCookiesNames) } // namespace variables } // namespace modsecurity #endif // SRC_VARIABLES_REQUEST_COOKIES_NAMES_H_ modsecurity-v3.0.6/src/variables/multipart_invalid_header_folding.h0000664000175000017500000000206714146026157027063 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include #include #include #include #ifndef SRC_VARIABLES_MULTIPART_INVALID_HEADER_FOLDING_H_ #define SRC_VARIABLES_MULTIPART_INVALID_HEADER_FOLDING_H_ #include "src/variables/variable.h" namespace modsecurity { class Transaction; namespace variables { DEFINE_VARIABLE(MultipartInvalidHeaderFolding, MULTIPART_INVALID_HEADER_FOLDING, m_variableMultipartInvalidHeaderFolding) } // namespace variables } // namespace modsecurity #endif // SRC_VARIABLES_MULTIPART_INVALID_HEADER_FOLDING_H_ modsecurity-v3.0.6/src/variables/server_port.h0000664000175000017500000000167514146026157022700 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include #include #include #include #ifndef SRC_VARIABLES_SERVER_PORT_H_ #define SRC_VARIABLES_SERVER_PORT_H_ #include "src/variables/variable.h" namespace modsecurity { class Transaction; namespace variables { DEFINE_VARIABLE(ServerPort, SERVER_PORT, m_variableServerPort) } // namespace variables } // namespace modsecurity #endif // SRC_VARIABLES_SERVER_PORT_H_ modsecurity-v3.0.6/src/variables/remote_addr.h0000664000175000017500000000167514146026157022613 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include #include #include #include #ifndef SRC_VARIABLES_REMOTE_ADDR_H_ #define SRC_VARIABLES_REMOTE_ADDR_H_ #include "src/variables/variable.h" namespace modsecurity { class Transaction; namespace variables { DEFINE_VARIABLE(RemoteAddr, REMOTE_ADDR, m_variableRemoteAddr) } // namespace variables } // namespace modsecurity #endif // SRC_VARIABLES_REMOTE_ADDR_H_ modsecurity-v3.0.6/src/variables/time_epoch.cc0000664000175000017500000000231214146026157022565 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "src/variables/time_epoch.h" #include #include #include #include #include #include #include #include #include #include #include #include "modsecurity/transaction.h" namespace modsecurity { namespace variables { void TimeEpoch::evaluate(Transaction *transaction, RuleWithActions *rule, std::vector *l) { transaction->m_variableTimeEpoch.assign( std::to_string(std::time(nullptr))); l->push_back(new VariableValue(&m_retName, &transaction->m_variableTimeEpoch)); } } // namespace variables } // namespace modsecurity modsecurity-v3.0.6/src/variables/request_body.h0000664000175000017500000000170314146026157023023 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include #include #include #include #ifndef SRC_VARIABLES_REQUEST_BODY_H_ #define SRC_VARIABLES_REQUEST_BODY_H_ #include "src/variables/variable.h" namespace modsecurity { class Transaction; namespace variables { DEFINE_VARIABLE(RequestBody, REQUEST_BODY, m_variableRequestBody) } // namespace variables } // namespace modsecurity #endif // SRC_VARIABLES_REQUEST_BODY_H_ modsecurity-v3.0.6/src/variables/full_request_length.h0000664000175000017500000000175714146026157024402 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include #include #include #include #ifndef SRC_VARIABLES_FULL_REQUEST_LENGTH_H_ #define SRC_VARIABLES_FULL_REQUEST_LENGTH_H_ #include "src/variables/variable.h" namespace modsecurity { class Transaction; namespace variables { DEFINE_VARIABLE(FullRequestLength, FULL_REQUEST_LENGTH, m_variableFullRequestLength) } // namespace variables } // namespace modsecurity #endif // SRC_VARIABLES_FULL_REQUEST_LENGTH_H_ modsecurity-v3.0.6/src/variables/rule.h0000664000175000017500000001555514146026157021277 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include #include #ifndef SRC_VARIABLES_RULE_H_ #define SRC_VARIABLES_RULE_H_ #include "src/variables/variable.h" #include "src/actions/severity.h" #include "src/actions/log_data.h" #include "src/actions/msg.h" namespace modsecurity { class Transaction; namespace variables { class Rule_DictElement : public VariableDictElement { \ public: explicit Rule_DictElement(const std::string &dictElement) : VariableDictElement(std::string("RULE"), dictElement) { } static void id(Transaction *t, RuleWithActions *rule, std::vector *l) { RuleWithActions *r = rule; while (r && r->m_ruleId == 0) { r = r->m_chainedRuleParent; } if (!r || r->m_ruleId == 0) { return; } std::unique_ptr origin(new VariableOrigin()); std::string *a = new std::string(std::to_string(r->m_ruleId)); VariableValue *var = new VariableValue(&m_rule, &m_rule_id, a ); delete a; origin->m_offset = 0; origin->m_length = 0; var->addOrigin(std::move(origin)); l->push_back(var); } static void rev(Transaction *t, RuleWithActions *rule, std::vector *l) { RuleWithActions *r = rule; while (r && r->m_rev.empty()) { r = r->m_chainedRuleParent; } if (!r) { return; } std::unique_ptr origin(new VariableOrigin()); std::string *a = new std::string(r->m_rev); VariableValue *var = new VariableValue(&m_rule, &m_rule_rev, a ); delete a; origin->m_offset = 0; origin->m_length = 0; var->addOrigin(std::move(origin)); l->push_back(var); } static void severity(Transaction *t, RuleWithActions *rule, std::vector *l) { RuleWithActions *r = rule; while (r && !r->hasSeverity()) { r = r->m_chainedRuleParent; } if (r && r->hasSeverity()) { std::unique_ptr origin(new VariableOrigin()); std::string *a = new std::string(std::to_string(r->severity())); VariableValue *var = new VariableValue(&m_rule, &m_rule_severity, a ); delete a; origin->m_offset = 0; origin->m_length = 0; var->addOrigin(std::move(origin)); l->push_back(var); } } static void logData(Transaction *t, RuleWithActions *rule, std::vector *l) { RuleWithActions *r = rule; while (r && !r->hasLogData()) { r = r->m_chainedRuleParent; } if (r && r->hasLogData()) { std::unique_ptr origin(new VariableOrigin()); std::string *a = new std::string(r->logData(t)); VariableValue *var = new VariableValue(&m_rule, &m_rule_logdata, a ); delete a; origin->m_offset = 0; origin->m_length = 0; var->addOrigin(std::move(origin)); l->push_back(var); } } static void msg(Transaction *t, RuleWithActions *rule, std::vector *l) { RuleWithActions *r = rule; while (r && !r->hasMsg()) { r = r->m_chainedRuleParent; } if (r && r->hasMsg()) { std::unique_ptr origin(new VariableOrigin()); std::string *a = new std::string(r->msg(t)); VariableValue *var = new VariableValue(&m_rule, &m_rule_msg, a ); delete a; origin->m_offset = 0; origin->m_length = 0; var->addOrigin(std::move(origin)); l->push_back(var); } } void evaluate(Transaction *t, RuleWithActions *rule, std::vector *l) override { if (m_dictElement == "id") { id(t, rule, l); return; } if (rule && m_dictElement == "rev") { rev(t, rule, l); return; } if (rule && m_dictElement == "severity") { severity(t, rule, l); return; } if (m_dictElement == "logdata") { logData(t, rule, l); return; } if (m_dictElement == "msg") { msg(t, rule, l); return; } } static const std::string m_rule; static const std::string m_rule_id; static const std::string m_rule_rev; static const std::string m_rule_severity; static const std::string m_rule_logdata; static const std::string m_rule_msg; }; class Rule_DictElementRegexp : public VariableRegex { public: explicit Rule_DictElementRegexp(const std::string ®ex) : VariableRegex("RULE", regex) { } void evaluate(Transaction *t, RuleWithActions *rule, std::vector *l) override { if (Utils::regex_search("id", m_r) > 0) { Rule_DictElement::id(t, rule, l); return; } if (Utils::regex_search("rev", m_r) > 0) { Rule_DictElement::rev(t, rule, l); return; } if (Utils::regex_search("severity", m_r) > 0) { Rule_DictElement::severity(t, rule, l); return; } if (Utils::regex_search("logdata", m_r) > 0) { Rule_DictElement::logData(t, rule, l); return; } if (Utils::regex_search("msg", m_r) > 0) { Rule_DictElement::msg(t, rule, l); return; } } }; class Rule_NoDictElement : public Variable { public: explicit Rule_NoDictElement() : Variable("RULE") { } void evaluate(Transaction *t, RuleWithActions *rule, std::vector *l) override { Rule_DictElement::id(t, rule, l); Rule_DictElement::rev(t, rule, l); Rule_DictElement::severity(t, rule, l); Rule_DictElement::logData(t, rule, l); Rule_DictElement::msg(t, rule, l); } }; // DEFINE_VARIABLE_DICT(Rule, RULE, m_variableRule) } // namespace variables } // namespace modsecurity #endif // SRC_VARIABLES_RULE_H_ modsecurity-v3.0.6/src/anchored_set_variable.cc0000664000175000017500000001003514146026157023005 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include #include #include #include #include "modsecurity/anchored_set_variable.h" #include "modsecurity/modsecurity.h" #include "modsecurity/transaction.h" #include "src/utils/regex.h" #include "src/variables/variable.h" namespace modsecurity { AnchoredSetVariable::AnchoredSetVariable(Transaction *t, const std::string &name) : m_transaction(t), m_name(name) { reserve(10); } AnchoredSetVariable::~AnchoredSetVariable() { unset(); } void AnchoredSetVariable::unset() { for (const auto& x : *this) { VariableValue *var = x.second; delete var; } clear(); } void AnchoredSetVariable::set(const std::string &key, const std::string &value, size_t offset, size_t len) { std::unique_ptr origin(new VariableOrigin()); std::string *v = new std::string(value); VariableValue *var = new VariableValue(&m_name, &key, v); delete v; origin->m_offset = offset; origin->m_length = len; var->addOrigin(std::move(origin)); emplace(key, var); } void AnchoredSetVariable::set(const std::string &key, const std::string &value, size_t offset) { std::unique_ptr origin(new VariableOrigin()); std::string *v = new std::string(value); VariableValue *var = new VariableValue(&m_name, &key, v); delete v; origin->m_offset = offset; origin->m_length = value.size(); var->addOrigin(std::move(origin)); emplace(key, var); } void AnchoredSetVariable::resolve( std::vector *l) { for (const auto& x : *this) { l->insert(l->begin(), new VariableValue(x.second)); } } void AnchoredSetVariable::resolve( std::vector *l, variables::KeyExclusions &ke) { for (const auto& x : *this) { if (!ke.toOmit(x.first)) { l->insert(l->begin(), new VariableValue(x.second)); } else { ms_dbg_a(m_transaction, 7, "Excluding key: " + x.first + " from target value."); } } } void AnchoredSetVariable::resolve(const std::string &key, std::vector *l) { auto range = this->equal_range(key); for (auto it = range.first; it != range.second; ++it) { l->push_back(new VariableValue(it->second)); } } std::unique_ptr AnchoredSetVariable::resolveFirst( const std::string &key) { auto range = equal_range(key); for (auto it = range.first; it != range.second; ++it) { std::unique_ptr b(new std::string()); b->assign(it->second->getValue()); return b; } return nullptr; } void AnchoredSetVariable::resolveRegularExpression(Utils::Regex *r, std::vector *l) { for (const auto& x : *this) { int ret = Utils::regex_search(x.first, *r); if (ret <= 0) { continue; } l->insert(l->begin(), new VariableValue(x.second)); } } void AnchoredSetVariable::resolveRegularExpression(Utils::Regex *r, std::vector *l, variables::KeyExclusions &ke) { for (const auto& x : *this) { int ret = Utils::regex_search(x.first, *r); if (ret <= 0) { continue; } if (!ke.toOmit(x.first)) { l->insert(l->begin(), new VariableValue(x.second)); } else { ms_dbg_a(m_transaction, 7, "Excluding key: " + x.first + " from target value."); } } } } // namespace modsecurity modsecurity-v3.0.6/src/unique_id.cc0000664000175000017500000001434614146026157020475 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 "src/unique_id.h" #include "src/config.h" #ifdef WIN32 #include #include #endif #if (defined(__linux__) || defined(__gnu_linux__)) || DARWIN #include #include #include #endif #ifdef DARWIN #include #include #include #include #ifndef IFT_ETHER #define IFT_ETHER 0x6 /* Ethernet CSMACD */ #endif #endif #if (defined(__linux__) || defined(__gnu_linux__)) #include #include #include #endif #ifdef HAVE_SYS_UTSNAME_H #include #endif #include #include #include #include "src/utils/sha1.h" namespace modsecurity { std::once_flag UniqueId::onceFlag; void UniqueId::fillUniqueId() { std::string macAddress; std::string name; std::string data; macAddress = ethernetMacAddress(); name = machineName(); data = macAddress + name; this->uniqueId_str = Utils::Sha1::hexdigest(data); } // Based on: // http://stackoverflow.com/questions/16858782/how-to-obtain-almost-unique-system-identifier-in-a-cross-platform-way std::string UniqueId::machineName() { char machine_name[MAX_MACHINE_NAME_SIZE]; size_t len = MAX_MACHINE_NAME_SIZE; #ifdef WIN32 DWORD lenComputerName = len; #endif memset(machine_name, '\0', sizeof(char) * len); #ifdef WIN32 if (GetComputerName(machine_name, &lenComputerName) == 0) { goto failed; } #endif #ifdef HAVE_SYS_UTSNAME_H static struct utsname u; if (uname(&u) < 0) { goto failed; } snprintf(machine_name, len-1, "%s", u.nodename); #endif return std::string(machine_name); #if defined(HAVE_SYS_UTSNAME_H) || defined(WIN32) failed: return std::string(""); #endif } std::string UniqueId::ethernetMacAddress() { char mac[MAC_ADDRESS_SIZE]; memset(mac, '\0', sizeof(char)*(MAC_ADDRESS_SIZE)); #ifdef DARWIN struct ifaddrs* ifaphead; struct ifaddrs* ifap; int i = 0; if (getifaddrs(&ifaphead) != 0) { goto failed; } // iterate over the net interfaces for (ifap = ifaphead; ifap; ifap = ifap->ifa_next) { struct sockaddr_dl* sdl = (struct sockaddr_dl*)ifap->ifa_addr; if (sdl && (sdl->sdl_family == AF_LINK) && (sdl->sdl_type == IFT_ETHER) && mac[0] && mac[1] && mac[2] && i < 6) { snprintf(mac, MAC_ADDRESS_SIZE, "%02x:%02x:%02x:%02x:%02x:%02x", (unsigned char)LLADDR(sdl)[0], (unsigned char)LLADDR(sdl)[1], (unsigned char)LLADDR(sdl)[2], (unsigned char)LLADDR(sdl)[3], (unsigned char)LLADDR(sdl)[4], (unsigned char)LLADDR(sdl)[5]); goto end; } } freeifaddrs(ifaphead); #endif #if (defined(__linux__) || defined(__gnu_linux__)) struct ifconf conf; int sock = socket(AF_INET, SOCK_DGRAM, IPPROTO_IP); struct ifreq* ifr; if ( sock < 0 ) { goto failed; } char ifconfbuf[128 * sizeof(struct ifreq)]; memset(ifconfbuf, 0, sizeof(ifconfbuf)); conf.ifc_buf = ifconfbuf; conf.ifc_len = sizeof(ifconfbuf); if (ioctl(sock, SIOCGIFCONF, &conf)) { close(sock); goto failed; } for (ifr = conf.ifc_req; ifr < conf.ifc_req + conf.ifc_len; ifr++) { if (ioctl(sock, SIOCGIFFLAGS, ifr)) { continue; // failed to get flags, skip it } if (ioctl(sock, SIOCGIFHWADDR, ifr) == 0) { if (!ifr->ifr_addr.sa_data[0] && !ifr->ifr_addr.sa_data[1] && !ifr->ifr_addr.sa_data[2]) { continue; } snprintf(mac, MAC_ADDRESS_SIZE, "%02x:%02x:%02x:%02x:%02x:%02x", (unsigned char)ifr->ifr_addr.sa_data[0], (unsigned char)ifr->ifr_addr.sa_data[1], (unsigned char)ifr->ifr_addr.sa_data[2], (unsigned char)ifr->ifr_addr.sa_data[3], (unsigned char)ifr->ifr_addr.sa_data[4], (unsigned char)ifr->ifr_addr.sa_data[5]); goto end; } } close(sock); #endif #if WIN32 PIP_ADAPTER_INFO pAdapterInfo; PIP_ADAPTER_INFO pAdapter = NULL; DWORD dwRetVal = 0; ULONG ulOutBufLen = sizeof (IP_ADAPTER_INFO); pAdapterInfo = reinterpret_cast(malloc( \ sizeof (IP_ADAPTER_INFO))); if (!pAdapterInfo) { goto failed; } if (GetAdaptersInfo(pAdapterInfo, &ulOutBufLen) == ERROR_BUFFER_OVERFLOW) { free(pAdapterInfo); pAdapterInfo = reinterpret_cast(malloc(ulOutBufLen)); if (!pAdapterInfo) { goto failed; } } dwRetVal = GetAdaptersInfo(pAdapterInfo, &ulOutBufLen); if (dwRetVal != NO_ERROR) { free(pAdapterInfo); goto failed; } pAdapter = pAdapterInfo; while (pAdapter && !mac[0] && !mac[1] && !mac[2]) { if (pAdapter->AddressLength > 4) { apr_snprintf(mac, MAC_ADDRESS_SIZE, "%02x:%02x:%02x:%02x:%02x:%02x", (unsigned char)pAdapter->Address[0], (unsigned char)pAdapter->Address[1], (unsigned char)pAdapter->Address[2], (unsigned char)pAdapter->Address[3], (unsigned char)pAdapter->Address[4], (unsigned char)pAdapter->Address[5]); goto end; } pAdapter = pAdapter->Next; } free(pAdapterInfo); #endif #if defined(__linux__) || defined(__gnu_linux__) || defined(DARWIN) || defined(WIN32) end: #endif return std::string(reinterpret_cast(mac)); #if defined(__linux__) || defined(__gnu_linux__) || defined(DARWIN) || defined(WIN32) failed: return std::string(""); #endif } } // namespace modsecurity modsecurity-v3.0.6/ar-lib0000755000175000017500000001330214146027124016471 0ustar mhsvierulamhsvierula#! /bin/sh # Wrapper for Microsoft lib.exe me=ar-lib scriptversion=2012-03-01.08; # UTC # Copyright (C) 2010-2017 Free Software Foundation, Inc. # Written by Peter Rosin . # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # This file is maintained in Automake, please report # bugs to or send patches to # . # func_error message func_error () { echo "$me: $1" 1>&2 exit 1 } file_conv= # func_file_conv build_file # Convert a $build file to $host form and store it in $file # Currently only supports Windows hosts. func_file_conv () { file=$1 case $file in / | /[!/]*) # absolute file, and not a UNC file if test -z "$file_conv"; then # lazily determine how to convert abs files case `uname -s` in MINGW*) file_conv=mingw ;; CYGWIN*) file_conv=cygwin ;; *) file_conv=wine ;; esac fi case $file_conv in mingw) file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` ;; cygwin) file=`cygpath -m "$file" || echo "$file"` ;; wine) file=`winepath -w "$file" || echo "$file"` ;; esac ;; esac } # func_at_file at_file operation archive # Iterate over all members in AT_FILE performing OPERATION on ARCHIVE # for each of them. # When interpreting the content of the @FILE, do NOT use func_file_conv, # since the user would need to supply preconverted file names to # binutils ar, at least for MinGW. func_at_file () { operation=$2 archive=$3 at_file_contents=`cat "$1"` eval set x "$at_file_contents" shift for member do $AR -NOLOGO $operation:"$member" "$archive" || exit $? done } case $1 in '') func_error "no command. Try '$0 --help' for more information." ;; -h | --h*) cat < ()) T (t)/return *new (yyas_ ()) T (std::move((T\&)t))/g" > src/parser/seclang-parser.hh.fix && mv src/parser/seclang-parser.hh.fix src/parser/seclang-parser.hh cppcheck: @cppcheck -U YYSTYPE -U MBEDTLS_MD5_ALT -U MBEDTLS_SHA1_ALT \ -D MS_CPPCHECK_DISABLED_FOR_PARSER -U YY_USER_INIT \ --suppressions-list=./test/cppcheck_suppressions.txt \ --enable=warning,style,performance,portability,unusedFunction,missingInclude \ --inconclusive \ --template="warning: {file},{line},{severity},{id},{message}" \ -I headers -I . -I others -I src -I others/mbedtls -I src/parser \ --error-exitcode=1 \ -i "src/parser/seclang-parser.cc" -i "src/parser/seclang-scanner.cc" \ --force --verbose . check-static: cppcheck check-style: check-coding-style check-coding-style: @cpplint.py \ $$(find . -name "*.h" -o -name "*.cc" | xargs) 2>&1 \ | egrep -v $$(echo -n "catchall" ; \ for i in $$(cat test/coding_style_suppressions.txt); do echo -n "|"$$i; done) \ | sed 's/^\./warning: ./g' > coding-style.txt -cat coding-style.txt @VALGRIND_CHECK_RULES@ VALGRIND_SUPPRESSIONS_FILES = valgrind_suppressions.txt LOG_DRIVER = env $(SHELL) $(top_srcdir)/test/custom-test-driver AM_TESTS_ENVIRONMENT=AUTOMAKE_TESTS=true; export AUTOMAKE_TESTS; LOG_COMPILER=test/test-suite.sh # for i in `find test/test-cases -iname *.json`; do echo TESTS+=$i; done TESTS= TESTS+=test/test-cases/regression/action-allow.json TESTS+=test/test-cases/regression/action-block.json TESTS+=test/test-cases/regression/action-ctl_request_body_access.json TESTS+=test/test-cases/regression/action-ctl_request_body_processor.json TESTS+=test/test-cases/regression/action-ctl_request_body_processor_urlencoded.json TESTS+=test/test-cases/regression/action-ctl_rule_engine.json TESTS+=test/test-cases/regression/action-ctl_rule_remove_by_id.json TESTS+=test/test-cases/regression/action-ctl_rule_remove_by_tag.json TESTS+=test/test-cases/regression/action-ctl_rule_remove_target_by_id.json TESTS+=test/test-cases/regression/action-ctl_rule_remove_target_by_tag.json TESTS+=test/test-cases/regression/action-disruptive.json TESTS+=test/test-cases/regression/action-exec.json TESTS+=test/test-cases/regression/action-id.json TESTS+=test/test-cases/regression/action-initcol.json TESTS+=test/test-cases/regression/action-msg.json TESTS+=test/test-cases/regression/action-setenv.json TESTS+=test/test-cases/regression/action-setrsc.json TESTS+=test/test-cases/regression/action-setsid.json TESTS+=test/test-cases/regression/action-setuid.json TESTS+=test/test-cases/regression/actions.json TESTS+=test/test-cases/regression/action-skip.json TESTS+=test/test-cases/regression/action-tag.json TESTS+=test/test-cases/regression/action-tnf-base64.json TESTS+=test/test-cases/regression/action-xmlns.json TESTS+=test/test-cases/regression/auditlog.json TESTS+=test/test-cases/regression/collection-case-insensitive.json TESTS+=test/test-cases/regression/collection-lua.json TESTS+=test/test-cases/regression/collection-regular_expression_selection.json TESTS+=test/test-cases/regression/collection-resource.json TESTS+=test/test-cases/regression/collection-tx.json TESTS+=test/test-cases/regression/collection-tx-with-macro.json TESTS+=test/test-cases/regression/config-body_limits.json TESTS+=test/test-cases/regression/config-calling_phases_by_name.json TESTS+=test/test-cases/regression/config-include-bad.json TESTS+=test/test-cases/regression/config-include.json TESTS+=test/test-cases/regression/config-remove_by_id.json TESTS+=test/test-cases/regression/config-remove_by_msg.json TESTS+=test/test-cases/regression/config-remove_by_tag.json TESTS+=test/test-cases/regression/config-response_type.json TESTS+=test/test-cases/regression/config-secdefaultaction.json TESTS+=test/test-cases/regression/config-secremoterules.json TESTS+=test/test-cases/regression/config-update-action-by-id.json TESTS+=test/test-cases/regression/config-update-target-by-id.json TESTS+=test/test-cases/regression/config-update-target-by-msg.json TESTS+=test/test-cases/regression/config-update-target-by-tag.json TESTS+=test/test-cases/regression/config-xml_external_entity.json TESTS+=test/test-cases/regression/debug_log.json TESTS+=test/test-cases/regression/directive-sec_rule_script.json TESTS+=test/test-cases/regression/issue-1152.json TESTS+=test/test-cases/regression/issue-1528.json TESTS+=test/test-cases/regression/issue-1565.json TESTS+=test/test-cases/regression/issue-1576.json TESTS+=test/test-cases/regression/issue-1591.json TESTS+=test/test-cases/regression/issue-1725.json TESTS+=test/test-cases/regression/issue-1743.json TESTS+=test/test-cases/regression/issue-1785.json TESTS+=test/test-cases/regression/issue-1812.json TESTS+=test/test-cases/regression/issue-1831.json TESTS+=test/test-cases/regression/issue-1844.json TESTS+=test/test-cases/regression/issue-1850.json TESTS+=test/test-cases/regression/issue-1941.json TESTS+=test/test-cases/regression/issue-1943.json TESTS+=test/test-cases/regression/issue-1956.json TESTS+=test/test-cases/regression/issue-1960.json TESTS+=test/test-cases/regression/issue-2099.json TESTS+=test/test-cases/regression/issue-2000.json TESTS+=test/test-cases/regression/issue-2111.json TESTS+=test/test-cases/regression/issue-2196.json TESTS+=test/test-cases/regression/issue-2423-msg-in-chain.json TESTS+=test/test-cases/regression/issue-2427.json TESTS+=test/test-cases/regression/issue-2296.json TESTS+=test/test-cases/regression/issue-394.json TESTS+=test/test-cases/regression/issue-849.json TESTS+=test/test-cases/regression/issue-960.json TESTS+=test/test-cases/regression/misc.json TESTS+=test/test-cases/regression/misc-variable-under-quotes.json TESTS+=test/test-cases/regression/offset-variable.json TESTS+=test/test-cases/regression/operator-detectsqli.json TESTS+=test/test-cases/regression/operator-detectxss.json TESTS+=test/test-cases/regression/operator-fuzzyhash.json TESTS+=test/test-cases/regression/operator-inpectFile.json TESTS+=test/test-cases/regression/operator-ipMatchFromFile.json TESTS+=test/test-cases/regression/operator-pm.json TESTS+=test/test-cases/regression/operator-rx.json TESTS+=test/test-cases/regression/operator-rxGlobal.json TESTS+=test/test-cases/regression/operator-UnconditionalMatch.json TESTS+=test/test-cases/regression/operator-validate-byte-range.json TESTS+=test/test-cases/regression/operator-verifycc.json TESTS+=test/test-cases/regression/operator-verifycpf.json TESTS+=test/test-cases/regression/operator-verifyssn.json TESTS+=test/test-cases/regression/operator-verifysvnr.json TESTS+=test/test-cases/regression/request-body-parser-json.json TESTS+=test/test-cases/regression/request-body-parser-multipart-crlf.json TESTS+=test/test-cases/regression/request-body-parser-multipart.json TESTS+=test/test-cases/regression/request-body-parser-xml.json TESTS+=test/test-cases/regression/request-body-parser-xml-validade-dtd.json TESTS+=test/test-cases/regression/rule-920120.json TESTS+=test/test-cases/regression/rule-920200.json TESTS+=test/test-cases/regression/rule-920274.json TESTS+=test/test-cases/regression/secaction.json TESTS+=test/test-cases/regression/secargumentslimit.json TESTS+=test/test-cases/regression/sec_component_signature.json TESTS+=test/test-cases/regression/secmarker.json TESTS+=test/test-cases/regression/secruleengine.json TESTS+=test/test-cases/regression/transformation-none.json TESTS+=test/test-cases/regression/transformations.json TESTS+=test/test-cases/regression/variable-ARGS_COMBINED_SIZE.json TESTS+=test/test-cases/regression/variable-ARGS_GET.json TESTS+=test/test-cases/regression/variable-ARGS_GET_NAMES.json TESTS+=test/test-cases/regression/variable-ARGS.json TESTS+=test/test-cases/regression/variable-ARGS_NAMES.json TESTS+=test/test-cases/regression/variable-ARGS_POST.json TESTS+=test/test-cases/regression/variable-ARGS_POST_NAMES.json TESTS+=test/test-cases/regression/variable-AUTH_TYPE.json TESTS+=test/test-cases/regression/variable-DURATION.json TESTS+=test/test-cases/regression/variable-ENV.json TESTS+=test/test-cases/regression/variable-FILES_COMBINED_SIZE.json TESTS+=test/test-cases/regression/variable-FILES.json TESTS+=test/test-cases/regression/variable-FILES_NAMES.json TESTS+=test/test-cases/regression/variable-FILES_SIZES.json TESTS+=test/test-cases/regression/variable-FULL_REQUEST.json TESTS+=test/test-cases/regression/variable-FULL_REQUEST_LENGTH.json TESTS+=test/test-cases/regression/variable-GEO.json TESTS+=test/test-cases/regression/variable-HIGHEST_SEVERITY.json TESTS+=test/test-cases/regression/variable-INBOUND_DATA_ERROR.json TESTS+=test/test-cases/regression/variable-MATCHED_VAR.json TESTS+=test/test-cases/regression/variable-MATCHED_VAR_NAME.json TESTS+=test/test-cases/regression/variable-MATCHED_VARS.json TESTS+=test/test-cases/regression/variable-MATCHED_VARS_NAMES.json TESTS+=test/test-cases/regression/variable-MODSEC_BUILD.json TESTS+=test/test-cases/regression/variable-MULTIPART_CRLF_LF_LINES.json TESTS+=test/test-cases/regression/variable-MULTIPART_FILENAME.json TESTS+=test/test-cases/regression/variable-MULTIPART_INVALID_HEADER_FOLDING.json TESTS+=test/test-cases/regression/variable-MULTIPART_NAME.json TESTS+=test/test-cases/regression/variable-MULTIPART_STRICT_ERROR.json TESTS+=test/test-cases/regression/variable-MULTIPART_UNMATCHED_BOUNDARY.json TESTS+=test/test-cases/regression/variable-OUTBOUND_DATA_ERROR.json TESTS+=test/test-cases/regression/variable-PATH_INFO.json TESTS+=test/test-cases/regression/variable-QUERY_STRING.json TESTS+=test/test-cases/regression/variable-REMOTE_ADDR.json TESTS+=test/test-cases/regression/variable-REMOTE_HOST.json TESTS+=test/test-cases/regression/variable-REMOTE_PORT.json TESTS+=test/test-cases/regression/variable-REMOTE_USER.json TESTS+=test/test-cases/regression/variable-REQBODY_PROCESSOR_ERROR.json TESTS+=test/test-cases/regression/variable-REQBODY_PROCESSOR.json TESTS+=test/test-cases/regression/variable-REQUEST_BASENAME.json TESTS+=test/test-cases/regression/variable-REQUEST_BODY.json TESTS+=test/test-cases/regression/variable-REQUEST_BODY_LENGTH.json TESTS+=test/test-cases/regression/variable-REQUEST_COOKIES.json TESTS+=test/test-cases/regression/variable-REQUEST_COOKIES_NAMES.json TESTS+=test/test-cases/regression/variable-REQUEST_FILENAME.json TESTS+=test/test-cases/regression/variable-REQUEST_HEADERS.json TESTS+=test/test-cases/regression/variable-REQUEST_HEADERS_NAMES.json TESTS+=test/test-cases/regression/variable-REQUEST_LINE.json TESTS+=test/test-cases/regression/variable-REQUEST_METHOD.json TESTS+=test/test-cases/regression/variable-REQUEST_PROTOCOL.json TESTS+=test/test-cases/regression/variable-REQUEST_URI.json TESTS+=test/test-cases/regression/variable-REQUEST_URI_RAW.json TESTS+=test/test-cases/regression/variable-RESPONSE_BODY.json TESTS+=test/test-cases/regression/variable-RESPONSE_CONTENT_LENGTH.json TESTS+=test/test-cases/regression/variable-RESPONSE_CONTENT_TYPE.json TESTS+=test/test-cases/regression/variable-RESPONSE_HEADERS.json TESTS+=test/test-cases/regression/variable-RESPONSE_HEADERS_NAMES.json TESTS+=test/test-cases/regression/variable-RESPONSE_PROTOCOL.json TESTS+=test/test-cases/regression/variable-RULE.json TESTS+=test/test-cases/regression/variable-SERVER_ADDR.json TESTS+=test/test-cases/regression/variable-SERVER_NAME.json TESTS+=test/test-cases/regression/variable-SERVER_PORT.json TESTS+=test/test-cases/regression/variable-SESSIONID.json TESTS+=test/test-cases/regression/variable-STATUS.json TESTS+=test/test-cases/regression/variable-TIME_DAY.json TESTS+=test/test-cases/regression/variable-TIME_EPOCH.json TESTS+=test/test-cases/regression/variable-TIME_HOUR.json TESTS+=test/test-cases/regression/variable-TIME.json TESTS+=test/test-cases/regression/variable-TIME_MIN.json TESTS+=test/test-cases/regression/variable-TIME_MON.json TESTS+=test/test-cases/regression/variable-TIME_SEC.json TESTS+=test/test-cases/regression/variable-TIME_WDAY.json TESTS+=test/test-cases/regression/variable-TIME_YEAR.json TESTS+=test/test-cases/regression/variable-TX.json TESTS+=test/test-cases/regression/variable-UNIQUE_ID.json TESTS+=test/test-cases/regression/variable-URLENCODED_ERROR.json TESTS+=test/test-cases/regression/variable-USERID.json TESTS+=test/test-cases/regression/variable-variation-count.json TESTS+=test/test-cases/regression/variable-variation-exclusion.json TESTS+=test/test-cases/regression/variable-WEBAPPID.json TESTS+=test/test-cases/regression/variable-WEBSERVER_ERROR_LOG.json TESTS+=test/test-cases/secrules-language-tests/operators/beginsWith.json TESTS+=test/test-cases/secrules-language-tests/operators/contains.json TESTS+=test/test-cases/secrules-language-tests/operators/containsWord.json TESTS+=test/test-cases/secrules-language-tests/operators/detectSQLi.json TESTS+=test/test-cases/secrules-language-tests/operators/detectXSS.json TESTS+=test/test-cases/secrules-language-tests/operators/endsWith.json TESTS+=test/test-cases/secrules-language-tests/operators/eq.json TESTS+=test/test-cases/secrules-language-tests/operators/ge.json TESTS+=test/test-cases/secrules-language-tests/operators/geoLookup.json TESTS+=test/test-cases/secrules-language-tests/operators/gt.json TESTS+=test/test-cases/secrules-language-tests/operators/ipMatch.json TESTS+=test/test-cases/secrules-language-tests/operators/le.json TESTS+=test/test-cases/secrules-language-tests/operators/lt.json TESTS+=test/test-cases/secrules-language-tests/operators/noMatch.json TESTS+=test/test-cases/secrules-language-tests/operators/pmFromFile.json TESTS+=test/test-cases/secrules-language-tests/operators/pm.json TESTS+=test/test-cases/secrules-language-tests/operators/rx.json TESTS+=test/test-cases/secrules-language-tests/operators/rxGlobal.json TESTS+=test/test-cases/secrules-language-tests/operators/streq.json TESTS+=test/test-cases/secrules-language-tests/operators/strmatch.json TESTS+=test/test-cases/secrules-language-tests/operators/unconditionalMatch.json TESTS+=test/test-cases/secrules-language-tests/operators/validateByteRange.json TESTS+=test/test-cases/secrules-language-tests/operators/validateUrlEncoding.json TESTS+=test/test-cases/secrules-language-tests/operators/validateUtf8Encoding.json TESTS+=test/test-cases/secrules-language-tests/operators/verifyCC.json TESTS+=test/test-cases/secrules-language-tests/operators/verifycpf.json TESTS+=test/test-cases/secrules-language-tests/operators/verifyssn.json TESTS+=test/test-cases/secrules-language-tests/operators/verifysvnr.json TESTS+=test/test-cases/secrules-language-tests/operators/within.json TESTS+=test/test-cases/secrules-language-tests/transformations/base64DecodeExt.json TESTS+=test/test-cases/secrules-language-tests/transformations/base64Decode.json TESTS+=test/test-cases/secrules-language-tests/transformations/base64Encode.json TESTS+=test/test-cases/secrules-language-tests/transformations/cmdLine.json TESTS+=test/test-cases/secrules-language-tests/transformations/compressWhitespace.json TESTS+=test/test-cases/secrules-language-tests/transformations/cssDecode.json TESTS+=test/test-cases/secrules-language-tests/transformations/escapeSeqDecode.json TESTS+=test/test-cases/secrules-language-tests/transformations/hexDecode.json TESTS+=test/test-cases/secrules-language-tests/transformations/hexEncode.json TESTS+=test/test-cases/secrules-language-tests/transformations/htmlEntityDecode.json TESTS+=test/test-cases/secrules-language-tests/transformations/jsDecode.json TESTS+=test/test-cases/secrules-language-tests/transformations/length.json TESTS+=test/test-cases/secrules-language-tests/transformations/lowercase.json TESTS+=test/test-cases/secrules-language-tests/transformations/md5.json TESTS+=test/test-cases/secrules-language-tests/transformations/normalisePath.json TESTS+=test/test-cases/secrules-language-tests/transformations/normalisePathWin.json TESTS+=test/test-cases/secrules-language-tests/transformations/parityEven7bit.json TESTS+=test/test-cases/secrules-language-tests/transformations/parityOdd7bit.json TESTS+=test/test-cases/secrules-language-tests/transformations/parityZero7bit.json TESTS+=test/test-cases/secrules-language-tests/transformations/removeCommentsChar.json TESTS+=test/test-cases/secrules-language-tests/transformations/removeComments.json TESTS+=test/test-cases/secrules-language-tests/transformations/removeNulls.json TESTS+=test/test-cases/secrules-language-tests/transformations/removeWhitespace.json TESTS+=test/test-cases/secrules-language-tests/transformations/replaceComments.json TESTS+=test/test-cases/secrules-language-tests/transformations/replaceNulls.json TESTS+=test/test-cases/secrules-language-tests/transformations/sha1.json TESTS+=test/test-cases/secrules-language-tests/transformations/sqlHexDecode.json TESTS+=test/test-cases/secrules-language-tests/transformations/trim.json TESTS+=test/test-cases/secrules-language-tests/transformations/trimLeft.json TESTS+=test/test-cases/secrules-language-tests/transformations/trimRight.json TESTS+=test/test-cases/secrules-language-tests/transformations/urlDecode.json TESTS+=test/test-cases/secrules-language-tests/transformations/urlDecodeUni.json TESTS+=test/test-cases/secrules-language-tests/transformations/urlEncode.json TESTS+=test/test-cases/secrules-language-tests/transformations/utf8toUnicode.json pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = modsecurity.pc EXTRA_DIST = modsecurity.pc.in \ modsecurity.conf-recommended \ unicode.mapping modsecurity-v3.0.6/.github/0000775000175000017500000000000014146026157016745 5ustar mhsvierulamhsvierulamodsecurity-v3.0.6/.github/workflows/0000775000175000017500000000000014146026157021002 5ustar mhsvierulamhsvierulamodsecurity-v3.0.6/.github/workflows/ci.yml0000664000175000017500000000522014146026157022117 0ustar mhsvierulamhsvierulaname: Quality Assurance on: push: pull_request: jobs: build-linux: runs-on: ${{ matrix.os }} strategy: matrix: os: [ubuntu-20.04] platform: [x32, x64] compiler: [gcc, clang] configure: - {label: "with parser generation", opt: "--enable-parser-generation" } - {label: "wo curl", opt: "--without-curl" } - {label: "wo yajl", opt: "--without-yajl" } - {label: "wo geoip", opt: "--without-geoip" } - {label: "wo lmdb", opt: "--without-lmdb" } - {label: "wo ssdeep", opt: "--without-ssdeep" } - {label: "wo lua", opt: "--without-lua" } - {label: "without maxmind", opt: "--without-maxmind" } steps: - name: Setup Dependencies run: | sudo add-apt-repository --yes ppa:maxmind/ppa sudo apt-get update -y -qq sudo apt-get install -y libfuzzy-dev libyajl-dev libgeoip-dev liblua5.2-dev liblmdb-dev cppcheck libmaxminddb-dev libcurl4-openssl-dev - uses: actions/checkout@v2 with: submodules: true - name: build.sh run: ./build.sh - name: configure ${{ matrix.configure.label }} run: ./configure ${{ matrix.configure.opt }} - uses: ammaraskar/gcc-problem-matcher@master - name: make run: make -j `nproc` - name: check run: make check - name: check-static run: make check-static build-macos: runs-on: ${{ matrix.os }} strategy: matrix: os: [macos-10.15] compiler: [clang] configure: - {label: "with parser generation", opt: "--enable-parser-generation" } - {label: "wo curl", opt: "--without-curl" } - {label: "wo yajl", opt: "--without-yajl" } - {label: "wo geoip", opt: "--without-geoip" } - {label: "wo lmdb", opt: "--without-lmdb" } - {label: "wo ssdeep", opt: "--without-ssdeep" } - {label: "wo lua", opt: "--without-lua" } - {label: "wo maxmind", opt: "--without-maxmind" } steps: - name: Setup Dependencies run: | brew install autoconf automake cppcheck lmdb libyaml lua ssdeep libmaxminddb bison - uses: actions/checkout@v2 with: submodules: true - name: build.sh run: ./build.sh - name: configure ${{ matrix.configure.label }} run: ./configure ${{ matrix.configure.opt }} - uses: ammaraskar/gcc-problem-matcher@master - name: make run: make -j `sysctl -n hw.logicalcpu` - name: check run: make check - name: check-static run: make check-static modsecurity-v3.0.6/.github/ISSUE_TEMPLATE/0000775000175000017500000000000014146026157021130 5ustar mhsvierulamhsvierulamodsecurity-v3.0.6/.github/ISSUE_TEMPLATE/bug-report-for-version-2-x.md0000664000175000017500000000241514146026157026415 0ustar mhsvierulamhsvierula--- name: Bug report for version 2.x about: Create a report to help us improve --- **Describe the bug** A clear and concise description of what the bug is. **Logs and dumps** Output of: 1. DebugLogs (level 9) 2. AuditLogs 3. Error logs 4. If there is a crash, the core dump file. _Notice:_ Be carefully to not leak any confidential information. **To Reproduce** Steps to reproduce the behavior: A **curl** command line that mimics the original request and reproduces the problem. Or a ModSecurity v3 test case. [e.g: curl "modsec-full/ca/..\\..\\..\\..\\..\\..\\/\\etc/\\passwd" or [issue-394.json](https://github.com/SpiderLabs/ModSecurity/blob/v3/master/test/test-cases/regression/issue-394.json)] **Expected behavior** A clear and concise description of what you expected to happen. **Server (please complete the following information):** - ModSecurity version (and connector): [e.g. ModSecurity v3.0.1 with nginx-connector v1.0.0] - WebServer: [e.g. nginx-1.15.5] - OS (and distro): [e.g. Linux, archlinux] **Rule Set (please complete the following information):** - Running any public or commercial rule set? [e.g. SpiderLabs commercial rules] - What is the version number? [e.g. 2018-08-11] **Additional context** Add any other context about the problem here. modsecurity-v3.0.6/.github/ISSUE_TEMPLATE/bug-report-for-version-3-x.md0000664000175000017500000000261114146026157026414 0ustar mhsvierulamhsvierula--- name: Bug report for version 3.x about: Create a report to help us improve. If you don't know a specific detail or piece of information leave it blank, if necessary we will help you to figure out. --- **Describe the bug** A clear and concise description of what the bug is. **Logs and dumps** Output of: 1. DebugLogs (level 9) 2. AuditLogs 3. Error logs 4. If there is a crash, the core dump file. _Notice:_ Be carefully to not leak any confidential information. **To Reproduce** Steps to reproduce the behavior: A **curl** command line that mimics the original request and reproduces the problem. Or a ModSecurity v3 test case. [e.g: curl "modsec-full/ca/..\\..\\..\\..\\..\\..\\/\\etc/\\passwd" or [issue-394.json](https://github.com/SpiderLabs/ModSecurity/blob/v3/master/test/test-cases/regression/issue-394.json)] **Expected behavior** A clear and concise description of what you expected to happen. **Server (please complete the following information):** - ModSecurity version (and connector): [e.g. ModSecurity v3.0.1 with nginx-connector v1.0.0] - WebServer: [e.g. nginx-1.15.5] - OS (and distro): [e.g. Linux, archlinux] **Rule Set (please complete the following information):** - Running any public or commercial rule set? [e.g. SpiderLabs commercial rules] - What is the version number? [e.g. 2018-08-11] **Additional context** Add any other context about the problem here. modsecurity-v3.0.6/build/0000775000175000017500000000000014146027111016473 5ustar mhsvierulamhsvierulamodsecurity-v3.0.6/build/curl.m40000664000175000017500000000741114146026157017716 0ustar mhsvierulamhsvieruladnl Check for CURL Libraries dnl CHECK_CURL(ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]) dnl Sets: dnl CURL_CFLAGS dnl CURL_LIBS CURL_CONFIG="" CURL_VERSION="" CURL_CPPFLAGS="" CURL_CFLAGS="" CURL_LDFLAGS="" CURL_LDADD="" CURL_MIN_VERSION="7.15.1" AC_DEFUN([CHECK_CURL], [ AC_ARG_WITH( curl, [AC_HELP_STRING([--with-curl=PATH],[Path to curl prefix or config script])], [test_paths="${with_curl}"], [test_paths="/usr/local/libcurl /usr/local/curl /usr/local /opt/libcurl /opt/curl /opt /usr"]) AC_MSG_CHECKING([for libcurl config script]) for x in ${test_paths}; do dnl # Determine if the script was specified and use it directly if test ! -d "$x" -a -e "$x"; then CURL_CONFIG=$x curl_path="no" break fi dnl # Try known config script names/locations for CURL_CONFIG in curl-config; do if test -e "${x}/bin/${CURL_CONFIG}"; then curl_path="${x}/bin" break elif test -e "${x}/${CURL_CONFIG}"; then curl_path="${x}" break else curl_path="" fi done if test -n "$curl_path"; then break fi done if test -n "${curl_path}"; then if test "${curl_path}" != "no"; then CURL_CONFIG="${curl_path}/${CURL_CONFIG}" fi AC_MSG_RESULT([${CURL_CONFIG}]) CURL_VERSION=`${CURL_CONFIG} --version | sed 's/^[[^0-9]][[^[:space:]]][[^[:space:]]]*[[[:space:]]]*//' | tr '\r\n' ' '` if test ! -z "${CURL_VERSION}"; then AC_MSG_NOTICE(curl VERSION: $CURL_VERSION); fi CURL_CFLAGS="`${CURL_CONFIG} --cflags`" if test ! -z "${CURL_CFLAGS}"; then AC_MSG_NOTICE(curl CFLAGS: $CURL_CFLAGS); fi CURL_LDADD="`${CURL_CONFIG} --libs`" if test ! -z "${CURL_CONFIG}"; then AC_MSG_NOTICE(curl LDADD: $CURL_LIBS); fi dnl # Check version is ok AC_MSG_CHECKING([if libcurl is at least v${CURL_MIN_VERSION}]) curl_min_ver=`echo ${CURL_MIN_VERSION} | awk -F. '{print (\$ 1 * 1000000) + (\$ 2 * 1000) + \$ 3}'` curl_ver=`echo ${CURL_VERSION} | awk -F. '{print (\$ 1 * 1000000) + (\$ 2 * 1000) + \$ 3}'` if test "$curl_min_ver" -le "$curl_ver"; then AC_MSG_RESULT([yes, $CURL_VERSION]) curl_tlsv2_ver=`echo 7.34.0 | awk -F. '{print (\$ 1 * 1000000) + (\$ 2 * 1000) + \$ 3}'` if test "$curl_tlsv2_ver" -le "$curl_ver"; then CURL_CFLAGS="${CURL_CFLAGS} -DWITH_CURL_SSLVERSION_TLSv1_2" fi CURL_CFLAGS="${CURL_CFLAGS} -DWITH_CURL" else AC_MSG_RESULT([no, $CURL_VERSION]) AC_MSG_NOTICE([NOTE: curl library may be too old]) fi dnl # Check/warn if GnuTLS is used AC_MSG_CHECKING([if libcurl is linked with gnutls]) curl_uses_gnutls=`echo ${CURL_LIBS} | grep gnutls | wc -l` if test "$curl_uses_gnutls" -ne 0; then AC_MSG_RESULT([yes]) AC_MSG_NOTICE([NOTE: curl linked with gnutls may be buggy, openssl recommended]) CURL_USES_GNUTLS=yes else AC_MSG_RESULT([no]) CURL_USES_GNUTLS=no fi else AC_MSG_RESULT([no]) fi AC_SUBST(CURL_CONFIG) AC_SUBST(CURL_VERSION) AC_SUBST(CURL_CPPFLAGS) AC_SUBST(CURL_CFLAGS) AC_SUBST(CURL_LDFLAGS) AC_SUBST(CURL_LDADD) AC_SUBST(CURL_USES_GNUTLS) if test "x${with_curl}" == "xno"; then CURL_DISABLED=yes else if test "x${with_curl}" != "x"; then CURL_MANDATORY=yes fi fi if test -z "${CURL_VERSION}"; then AC_MSG_NOTICE([*** curl library not found.]) if test -z "${CURL_MANDATORY}"; then if test -z "${CURL_DISABLED}"; then CURL_FOUND=0 else CURL_FOUND=2 fi else AC_MSG_ERROR([Curl was explicitly referenced but it was not found]) CURL_FOUND=-1 fi else CURL_FOUND=1 AC_MSG_NOTICE([using curl v${CURL_VERSION}]) CURL_DISPLAY="${CURL_LDADD}, ${CURL_CFLAGS}" fi AC_SUBST(CURL_FOUND) AC_SUBST(CURL_DISPLAY) ]) modsecurity-v3.0.6/build/libgeoip.m40000664000175000017500000001434214146026157020544 0ustar mhsvierulamhsvieruladnl Check for GEOIP Libraries dnl CHECK_GEOIP(ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]) dnl Sets: dnl GEOIP_CFLAGS dnl GEOIP_LDADD dnl GEOIP_LDFLAGS dnl GEOIP_LIBS dnl GEOIP_VERSION AC_DEFUN([PROG_GEOIP], [ # Possible names for the geoip library/package (pkg-config) GEOIP_POSSIBLE_LIB_NAMES="geoip2 geoip GeoIP" # Possible extensions for the library GEOIP_POSSIBLE_EXTENSIONS="so la sl dll dylib" # Possible paths (if pkg-config was not found, proceed with the file lookup) GEOIP_POSSIBLE_PATHS="/usr/local/libgeoip /usr/local/geoip /usr/local /opt/libgeoip /opt/geoip /opt /usr /opt/local/include /opt/local /usr/lib /usr/local/lib /usr/lib64 /usr" # Variables to be set by this very own script. GEOIP_VERSION="" GEOIP_CFLAGS="" GEOIP_CPPFLAGS="" GEOIP_LDADD="" GEOIP_LDFLAGS="" AC_ARG_WITH( geoip, AS_HELP_STRING( [--with-geoip=PATH], [Path to GeoIP (including headers). Use 'no' to disable GeoIP support.] ) ) # AS_HELP_STRING( # [--without-geoip], # [Complete dsiables GeoIP support] # ) if test "x${with_geoip}" == "xno"; then AC_DEFINE(HAVE_GEOIP, 0, [Support for GeoIP was disabled by the utilization of --without-geoip or --with-geoip=no]) AC_MSG_NOTICE([Support for GeoIP was disabled by the utilization of --without-geoip or --with-geoip=no]) GEOIP_DISABLED=yes else if test "x${with_geoip}" == "xyes"; then GEOIP_MANDATORY=yes AC_MSG_NOTICE([GeoIP support was marked as mandatory by the utilization of --with-geoip=yes]) fi # for x in ${GEOIP_POSSIBLE_LIB_NAMES}; do # CHECK_FOR_GEOIP_AT(${x}) # if test -n "${GEOIP_VERSION}"; then # break # fi # done # if test "x${with_geoip}" != "xyes" or test "x${with_geoip}" == "xyes"; then if test "x${with_geoip}" == "x" || test "x${with_geoip}" == "xyes"; then # Nothing about GeoIP was informed, using the pkg-config to figure things out. if test -n "${PKG_CONFIG}"; then GEOIP_PKG_NAME="" for x in ${GEOIP_POSSIBLE_LIB_NAMES}; do if ${PKG_CONFIG} --exists ${x}; then GEOIP_PKG_NAME="$x" break fi done fi AC_MSG_NOTICE([Nothing about GeoIP was informed during the configure phase. Trying to detect it on the platform...]) if test -n "${GEOIP_PKG_NAME}"; then # Package was found using the pkg-config scripts GEOIP_VERSION="`${PKG_CONFIG} ${GEOIP_PKG_NAME} --modversion`" GEOIP_CFLAGS="`${PKG_CONFIG} ${GEOIP_PKG_NAME} --cflags`" GEOIP_LDADD="`${PKG_CONFIG} ${GEOIP_PKG_NAME} --libs-only-l`" GEOIP_LDFLAGS="`${PKG_CONFIG} ${GEOIP_PKG_NAME} --libs-only-L --libs-only-other`" GEOIP_DISPLAY="${GEOIP_LDADD}, ${GEOIP_CFLAGS}" else # If pkg-config did not find anything useful, go over file lookup. for x in ${GEOIP_POSSIBLE_PATHS}; do CHECK_FOR_GEOIP_AT(${x}) if test -n "${GEOIP_VERSION}"; then break fi done fi fi if test "x${with_geoip}" != "x"; then # An specific path was informed, lets check. GEOIP_MANDATORY=yes CHECK_FOR_GEOIP_AT(${with_geoip}) fi # fi fi if test -z "${GEOIP_CFLAGS}"; then if test -z "${GEOIP_MANDATORY}"; then if test -z "${GEOIP_DISABLED}"; then AC_MSG_NOTICE([GeoIP library was not found]) GEOIP_FOUND=0 else GEOIP_FOUND=2 fi else AC_MSG_ERROR([GeoIP was explicit requested but it was not found]) GEOIP_FOUND=-1 fi else GEOIP_FOUND=1 AC_MSG_NOTICE([using GeoIP v${GEOIP_VERSION}]) GEOIP_CFLAGS="-DWITH_GEOIP ${GEOIP_CFLAGS}" AC_SUBST(GEOIP_VERSION) AC_SUBST(GEOIP_LDADD) AC_SUBST(GEOIP_LIBS) AC_SUBST(GEOIP_LDFLAGS) AC_SUBST(GEOIP_CFLAGS) AC_SUBST(GEOIP_DISPLAY) fi AC_SUBST(GEOIP_FOUND) ]) # AC_DEFUN [PROG_GEOIP] AC_DEFUN([CHECK_FOR_GEOIP_AT], [ path=$1 for y in ${GEOIP_POSSIBLE_EXTENSIONS}; do for z in ${GEOIP_POSSIBLE_LIB_NAMES}; do if test -e "${path}/${z}.${y}"; then geoip_lib_path="${path}/" geoip_lib_name="${z}" geoip_lib_file="${geoip_lib_path}/${z}.${y}" break fi if test -e "${path}/lib${z}.${y}"; then geoip_lib_path="${path}/" geoip_lib_name="${z}" geoip_lib_file="${geoip_lib_path}/lib${z}.${y}" break fi if test -e "${path}/lib/lib${z}.${y}"; then geoip_lib_path="${path}/lib/" geoip_lib_name="${z}" geoip_lib_file="${geoip_lib_path}/lib${z}.${y}" break fi if test -e "${path}/lib64/lib${z}.${y}"; then geoip_lib_path="${path}/lib64/" geoip_lib_name="${z}" geoip_lib_file="${geoip_lib_path}/lib${z}.${y}" break fi if test -e "${path}/lib/x86_64-linux-gnu/lib${z}.${y}"; then geoip_lib_path="${path}/lib/x86_64-linux-gnu/" geoip_lib_name="${z}" geoip_lib_file="${geoip_lib_path}/lib${z}.${y}" break fi done if test -n "$geoip_lib_path"; then break fi done if test -e "${path}/include/GeoIPCity.h"; then geoip_inc_path="${path}/include" elif test -e "${path}/GeoIPCity.h"; then geoip_inc_path="${path}" fi if test -n "${geoip_inc_path}" -a -n "${geoip_lib_path}"; then AC_MSG_NOTICE([GeoIP headers found at: ${geoip_inc_path}]) AC_MSG_NOTICE([GeoIP library found at: ${geoip_lib_file}]) fi if test -n "${geoip_lib_path}" -a -n "${geoip_inc_path}"; then # TODO: Compile a piece of code to check the version. GEOIP_CFLAGS="-I${geoip_inc_path}" GEOIP_LDADD="-l${geoip_lib_name}" GEOIP_LDFLAGS="-L${geoip_lib_path}" GEOIP_DISPLAY="${geoip_lib_file}, ${geoip_inc_path}" fi ]) # AC_DEFUN [CHECK_FOR_GEOIP_AT] modsecurity-v3.0.6/build/ltversion.m40000644000175000017500000000127314146027111020763 0ustar mhsvierulamhsvierula# ltversion.m4 -- version numbers -*- Autoconf -*- # # Copyright (C) 2004, 2011-2015 Free Software Foundation, Inc. # Written by Scott James Remnant, 2004 # # This file 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. # @configure_input@ # serial 4179 ltversion.m4 # This file is part of GNU Libtool m4_define([LT_PACKAGE_VERSION], [2.4.6]) m4_define([LT_PACKAGE_REVISION], [2.4.6]) AC_DEFUN([LTVERSION_VERSION], [macro_version='2.4.6' macro_revision='2.4.6' _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) _LT_DECL(, macro_revision, 0) ]) modsecurity-v3.0.6/build/lmdb.m40000664000175000017500000001435514146026157017674 0ustar mhsvierulamhsvieruladnl Check for LMDB Libraries dnl CHECK_LMDB(ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]) AC_DEFUN([PROG_LMDB], [ # Possible names for the lmdb library/package (pkg-config) LMDB_POSSIBLE_LIB_NAMES="lmdb" # Possible extensions for the library LMDB_POSSIBLE_EXTENSIONS="so so0 la sl dll dylib so.0.0.0" # Possible paths (if pkg-config was not found, proceed with the file lookup) LMDB_POSSIBLE_PATHS="/usr/lib /usr/local/lib /usr/local/liblmdb /usr/local/lmdb /usr/local /opt/liblmdb /opt/lmdb /opt /usr /usr/lib64 /opt/local" # Variables to be set by this very own script. LMDB_VERSION="" LMDB_CFLAGS="" LMDB_CPPFLAGS="" LMDB_LDADD="" LMDB_LDFLAGS="" AC_ARG_WITH( lmdb, AC_HELP_STRING( [--with-lmdb=PATH], [Path to lmdb prefix or config script] ) ) if test "x${with_lmdb}" == "xno"; then AC_DEFINE(HAVE_LMDB, 0, [Support for LMDB was disabled by the utilization of --without-lmdb or --with-lmdb=no]) AC_MSG_NOTICE([Support for LMDB was disabled by the utilization of --without-lmdb or --with-lmdb=no]) LMDB_DISABLED=yes else if test "x${with_lmdb}" == "xyes"; then LMDB_MANDATORY=yes AC_MSG_NOTICE([LMDB support was marked as mandatory by the utilization of --with-lmdb=yes]) fi # for x in ${LMDB_POSSIBLE_LIB_NAMES}; do # CHECK_FOR_LMDB_AT(${x}) # if test -n "${LMDB_VERSION}"; then # break # fi # done # if test "x${with_lmdb}" != "xyes" or test "x${with_lmdb}" == "xyes"; then if test "x${with_lmdb}" == "x" || test "x${with_lmdb}" == "xyes"; then # Nothing about LMDB was informed, using the pkg-config to figure things out. if test -n "${PKG_CONFIG}"; then LMDB_PKG_NAME="" for x in ${LMDB_POSSIBLE_LIB_NAMES}; do if ${PKG_CONFIG} --exists ${x}; then LMDB_PKG_NAME="$x" break fi done fi AC_MSG_NOTICE([Nothing about LMDB was informed during the configure phase. Trying to detect it on the platform...]) if test -n "${LMDB_PKG_NAME}"; then # Package was found using the pkg-config scripts LMDB_VERSION="`${PKG_CONFIG} ${LMDB_PKG_NAME} --modversion`" LMDB_CFLAGS="`${PKG_CONFIG} ${LMDB_PKG_NAME} --cflags`" LMDB_LDADD="`${PKG_CONFIG} ${LMDB_PKG_NAME} --libs-only-l`" LMDB_LDFLAGS="`${PKG_CONFIG} ${LMDB_PKG_NAME} --libs-only-L --libs-only-other`" LMDB_DISPLAY="${LMDB_LDADD}, ${LMDB_CFLAGS}" else # If pkg-config did not find anything useful, go over file lookup. for x in ${LMDB_POSSIBLE_PATHS}; do CHECK_FOR_LMDB_AT(${x}) if test -n "${LMDB_VERSION}"; then break fi done fi fi if test "x${with_lmdb}" != "x"; then # An specific path was informed, lets check. LMDB_MANDATORY=yes CHECK_FOR_LMDB_AT(${with_lmdb}) fi # fi fi if test -z "${LMDB_LDADD}"; then if test -z "${LMDB_MANDATORY}"; then if test -z "${LMDB_DISABLED}"; then AC_MSG_NOTICE([LMDB library was not found]) LMDB_FOUND=0 else LMDB_FOUND=2 fi else AC_MSG_ERROR([LMDB was explicitly referenced but it was not found]) LMDB_FOUND=-1 fi else if test -z "${LMDB_MANDATORY}"; then LMDB_FOUND=2 AC_MSG_NOTICE([LMDB is disabled by default.]) else LMDB_FOUND=1 AC_MSG_NOTICE([using LMDB v${LMDB_VERSION}]) LMDB_CFLAGS="-DWITH_LMDB ${LMDB_CFLAGS}" LMDB_DISPLAY="${LMDB_LDADD}, ${LMDB_CFLAGS}" AC_SUBST(LMDB_VERSION) AC_SUBST(LMDB_LDADD) AC_SUBST(LMDB_LIBS) AC_SUBST(LMDB_LDFLAGS) AC_SUBST(LMDB_CFLAGS) AC_SUBST(LMDB_DISPLAY) fi fi AC_SUBST(LMDB_FOUND) ]) # AC_DEFUN [PROG_LMDB] AC_DEFUN([CHECK_FOR_LMDB_AT], [ path=$1 echo "*** LOOKING AT PATH: " ${path} for y in ${LMDB_POSSIBLE_EXTENSIONS}; do for z in ${LMDB_POSSIBLE_LIB_NAMES}; do if test -e "${path}/${z}.${y}"; then lmdb_lib_path="${path}/" lmdb_lib_name="${z}" lmdb_lib_file="${lmdb_lib_path}/${z}.${y}" break fi if test -e "${path}/lib${z}.${y}"; then lmdb_lib_path="${path}/" lmdb_lib_name="${z}" lmdb_lib_file="${lmdb_lib_path}/lib${z}.${y}" break fi if test -e "${path}/lib/lib${z}.${y}"; then lmdb_lib_path="${path}/lib/" lmdb_lib_name="${z}" lmdb_lib_file="${lmdb_lib_path}/lib${z}.${y}" break fi if test -e "${path}/lib/x86_64-linux-gnu/lib${z}.${y}"; then lmdb_lib_path="${path}/lib/x86_64-linux-gnu/" lmdb_lib_name="${z}" lmdb_lib_file="${lmdb_lib_path}/lib${z}.${y}" break fi if test -e "${path}/lib/i386-linux-gnu/lib${z}.${y}"; then lmdb_lib_path="${path}/lib/i386-linux-gnu/" lmdb_lib_name="${z}" lmdb_lib_file="${lmdb_lib_path}/lib${z}.${y}" break fi done if test -n "$lmdb_lib_path"; then break fi done if test -e "${path}/include/lmdb.h"; then lmdb_inc_path="${path}/include" elif test -e "${path}/lmdb.h"; then lmdb_inc_path="${path}" elif test -e "${path}/include/lmdb/lmdb.h"; then lmdb_inc_path="${path}/include" fi if test -n "${lmdb_lib_path}"; then AC_MSG_NOTICE([LMDB library found at: ${lmdb_lib_file}]) fi if test -n "${lmdb_inc_path}"; then AC_MSG_NOTICE([LMDB headers found at: ${lmdb_inc_path}]) fi if test -n "${lmdb_lib_path}" -a -n "${lmdb_inc_path}"; then # TODO: Compile a piece of code to check the version. LMDB_CFLAGS="-I${lmdb_inc_path}" LMDB_LDADD="-l${lmdb_lib_name}" LMDB_LDFLAGS="-L${lmdb_lib_path}" LMDB_DISPLAY="${lmdb_lib_file}, ${lmdb_inc_path}" fi ]) # AC_DEFUN [CHECK_FOR_LMDB_AT] modsecurity-v3.0.6/build/libxml.m40000664000175000017500000000643314146026157020243 0ustar mhsvierulamhsvieruladnl Check for LIBXML2 Libraries dnl CHECK_LIBXML2(ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]) dnl Sets: dnl LIBXML2_CFLAGS dnl LIBXML2_LIBS LIBXML2_CONFIG="" LIBXML2_VERSION="" LIBXML2_CFLAGS="" LIBXML2_CPPFLAGS="" LIBXML2_LDADD="" LIBXML2_LDFLAGS="" AC_DEFUN([CHECK_LIBXML2], [ AC_ARG_WITH( libxml, [AC_HELP_STRING([--with-libxml=PATH],[Path to libxml2 prefix or config script])], [test_paths="${with_libxml}"], [test_paths="/usr/local/libxml2 /usr/local/xml2 /usr/local/xml /usr/local /opt/libxml2 /opt/libxml /opt/xml2 /opt/xml /opt /usr"]) AC_MSG_CHECKING([for libxml2 config script]) for x in ${test_paths}; do dnl # Determine if the script was specified and use it directly if test ! -d "$x" -a -e "$x"; then LIBXML2_CONFIG=$x libxml2_path="no" break fi dnl # Try known config script names/locations for LIBXML2_CONFIG in xml2-config xml-2-config xml-config; do if test -e "${x}/bin/${LIBXML2_CONFIG}"; then libxml2_path="${x}/bin" break elif test -e "${x}/${LIBXML2_CONFIG}"; then libxml2_path="${x}" break else libxml2_path="" fi done if test -n "$libxml2_path"; then break fi done if test -n "${libxml2_path}"; then if test "${libxml2_path}" != "no"; then LIBXML2_CONFIG="${libxml2_path}/${LIBXML2_CONFIG}" fi AC_MSG_RESULT([${LIBXML2_CONFIG}]) LIBXML2_VERSION=`${LIBXML2_CONFIG} --version | sed 's/^[[^0-9]][[^[:space:]]][[^[:space:]]]*[[[:space:]]]*//'` if test ! -z "${LIBXML2_VERSION}"; then AC_MSG_NOTICE(xml VERSION: $LIBXML2_VERSION); fi LIBXML2_CFLAGS="`${LIBXML2_CONFIG} --cflags` -DWITH_LIBXML2" if test ! -z "${LIBXML2_CFLAGS}"; then AC_MSG_NOTICE(xml CFLAGS: $LIBXML2_CFLAGS); fi LIBXML2_LDADD="`${LIBXML2_CONFIG} --libs`" if test ! -z "${LIBXML2_LDADD}"; then AC_MSG_NOTICE(xml LDADD: $LIBXML2_LDADD); fi AC_MSG_CHECKING([if libxml2 is at least v2.6.29]) libxml2_min_ver=`echo 2.6.29 | awk -F. '{print (\$ 1 * 1000000) + (\$ 2 * 1000) + \$ 3}'` libxml2_ver=`echo ${LIBXML2_VERSION} | awk -F. '{print (\$ 1 * 1000000) + (\$ 2 * 1000) + \$ 3}'` if test "$libxml2_ver" -ge "$libxml2_min_ver"; then AC_MSG_RESULT([yes, $LIBXML2_VERSION]) else AC_MSG_RESULT([no, $LIBXML2_VERSION]) AC_MSG_ERROR([NOTE: libxml2 library must be at least 2.6.29]) fi else AC_MSG_RESULT([no]) fi AC_SUBST(LIBXML2_CONFIG) AC_SUBST(LIBXML2_VERSION) AC_SUBST(LIBXML2_CFLAGS) AC_SUBST(LIBXML2_CPPFLAGS) AC_SUBST(LIBXML2_LDADD) AC_SUBST(LIBXML2_LDFLAGS) if test "x${with_libxml}" == "xno"; then LIBXML2_DISABLED=yes else if test "x${with_libxml}" != "x"; then LIBXML2_MANDATORY=yes fi fi if test -z "${LIBXML2_VERSION}"; then AC_MSG_NOTICE([*** libxml2 library not found.]) if test -z "${LIBXML2_MANDATORY}"; then if test -z "${LIBXML2_DISABLED}"; then LIBXML2_FOUND=0 else LIBXML2_FOUND=2 fi else AC_MSG_ERROR([Libxml2 was explicitly referenced but it was not found]) LIBXML2_FOUND=-1 fi else LIBXML2_FOUND=1 AC_MSG_NOTICE([using libxml2 v${LIBXML2_VERSION}]) LIBXML2_DISPLAY="${LIBXML2_LDADD}, ${LIBXML2_CFLAGS}" fi AC_SUBST(LIBXML2_FOUND) AC_SUBST(LIBXML2_DISPLAY) ]) modsecurity-v3.0.6/build/lt~obsolete.m40000644000175000017500000001377414146027111021321 0ustar mhsvierulamhsvierula# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- # # Copyright (C) 2004-2005, 2007, 2009, 2011-2015 Free Software # Foundation, Inc. # Written by Scott James Remnant, 2004. # # This file 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. # serial 5 lt~obsolete.m4 # These exist entirely to fool aclocal when bootstrapping libtool. # # In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN), # which have later been changed to m4_define as they aren't part of the # exported API, or moved to Autoconf or Automake where they belong. # # The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN # in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us # using a macro with the same name in our local m4/libtool.m4 it'll # pull the old libtool.m4 in (it doesn't see our shiny new m4_define # and doesn't know about Autoconf macros at all.) # # So we provide this file, which has a silly filename so it's always # included after everything else. This provides aclocal with the # AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything # because those macros already exist, or will be overwritten later. # We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. # # Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. # Yes, that means every name once taken will need to remain here until # we give up compatibility with versions before 1.7, at which point # we need to keep only those names which we still refer to. # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) modsecurity-v3.0.6/build/libtool.m40000644000175000017500000112617114146027111020410 0ustar mhsvierulamhsvierula# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- # # Copyright (C) 1996-2001, 2003-2015 Free Software Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file 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. m4_define([_LT_COPYING], [dnl # Copyright (C) 2014 Free Software Foundation, Inc. # This is free software; see the source for copying conditions. There is NO # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # GNU Libtool is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of of the License, or # (at your option) any later version. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program or library that is built # using GNU Libtool, you may include this file under the same # distribution terms that you use for the rest of that program. # # GNU Libtool is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . ]) # serial 58 LT_INIT # LT_PREREQ(VERSION) # ------------------ # Complain and exit if this libtool version is less that VERSION. m4_defun([LT_PREREQ], [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, [m4_default([$3], [m4_fatal([Libtool version $1 or higher is required], 63)])], [$2])]) # _LT_CHECK_BUILDDIR # ------------------ # Complain if the absolute build directory name contains unusual characters m4_defun([_LT_CHECK_BUILDDIR], [case `pwd` in *\ * | *\ *) AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; esac ]) # LT_INIT([OPTIONS]) # ------------------ AC_DEFUN([LT_INIT], [AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl AC_BEFORE([$0], [LT_LANG])dnl AC_BEFORE([$0], [LT_OUTPUT])dnl AC_BEFORE([$0], [LTDL_INIT])dnl m4_require([_LT_CHECK_BUILDDIR])dnl dnl Autoconf doesn't catch unexpanded LT_ macros by default: m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 dnl unless we require an AC_DEFUNed macro: AC_REQUIRE([LTOPTIONS_VERSION])dnl AC_REQUIRE([LTSUGAR_VERSION])dnl AC_REQUIRE([LTVERSION_VERSION])dnl AC_REQUIRE([LTOBSOLETE_VERSION])dnl m4_require([_LT_PROG_LTMAIN])dnl _LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) dnl Parse OPTIONS _LT_SET_OPTIONS([$0], [$1]) # This can be used to rebuild libtool when needed LIBTOOL_DEPS=$ltmain # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' AC_SUBST(LIBTOOL)dnl _LT_SETUP # Only expand once: m4_define([LT_INIT]) ])# LT_INIT # Old names: AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_PROG_LIBTOOL], []) dnl AC_DEFUN([AM_PROG_LIBTOOL], []) # _LT_PREPARE_CC_BASENAME # ----------------------- m4_defun([_LT_PREPARE_CC_BASENAME], [ # Calculate cc_basename. Skip known compiler wrappers and cross-prefix. func_cc_basename () { for cc_temp in @S|@*""; do case $cc_temp in compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; \-*) ;; *) break;; esac done func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` } ])# _LT_PREPARE_CC_BASENAME # _LT_CC_BASENAME(CC) # ------------------- # It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME, # but that macro is also expanded into generated libtool script, which # arranges for $SED and $ECHO to be set by different means. m4_defun([_LT_CC_BASENAME], [m4_require([_LT_PREPARE_CC_BASENAME])dnl AC_REQUIRE([_LT_DECL_SED])dnl AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl func_cc_basename $1 cc_basename=$func_cc_basename_result ]) # _LT_FILEUTILS_DEFAULTS # ---------------------- # It is okay to use these file commands and assume they have been set # sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'. m4_defun([_LT_FILEUTILS_DEFAULTS], [: ${CP="cp -f"} : ${MV="mv -f"} : ${RM="rm -f"} ])# _LT_FILEUTILS_DEFAULTS # _LT_SETUP # --------- m4_defun([_LT_SETUP], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl _LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl dnl _LT_DECL([], [host_alias], [0], [The host system])dnl _LT_DECL([], [host], [0])dnl _LT_DECL([], [host_os], [0])dnl dnl _LT_DECL([], [build_alias], [0], [The build system])dnl _LT_DECL([], [build], [0])dnl _LT_DECL([], [build_os], [0])dnl dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([LT_PATH_LD])dnl AC_REQUIRE([LT_PATH_NM])dnl dnl AC_REQUIRE([AC_PROG_LN_S])dnl test -z "$LN_S" && LN_S="ln -s" _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl dnl AC_REQUIRE([LT_CMD_MAX_LEN])dnl _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_CHECK_SHELL_FEATURES])dnl m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl m4_require([_LT_CMD_RELOAD])dnl m4_require([_LT_CHECK_MAGIC_METHOD])dnl m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl m4_require([_LT_CMD_OLD_ARCHIVE])dnl m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl m4_require([_LT_WITH_SYSROOT])dnl m4_require([_LT_CMD_TRUNCATE])dnl _LT_CONFIG_LIBTOOL_INIT([ # See if we are running on zsh, and set the options that allow our # commands through without removal of \ escapes INIT. if test -n "\${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi ]) if test -n "${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi _LT_CHECK_OBJDIR m4_require([_LT_TAG_COMPILER])dnl case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test set != "${COLLECT_NAMES+set}"; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Global variables: ofile=libtool can_build_shared=yes # All known linkers require a '.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a with_gnu_ld=$lt_cv_prog_gnu_ld old_CC=$CC old_CFLAGS=$CFLAGS # Set sane defaults for various variables test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$LD" && LD=ld test -z "$ac_objext" && ac_objext=o _LT_CC_BASENAME([$compiler]) # Only perform the check for file, if the check method requires it test -z "$MAGIC_CMD" && MAGIC_CMD=file case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then _LT_PATH_MAGIC fi ;; esac # Use C for the default configuration in the libtool script LT_SUPPORTED_TAG([CC]) _LT_LANG_C_CONFIG _LT_LANG_DEFAULT_CONFIG _LT_CONFIG_COMMANDS ])# _LT_SETUP # _LT_PREPARE_SED_QUOTE_VARS # -------------------------- # Define a few sed substitution that help us do robust quoting. m4_defun([_LT_PREPARE_SED_QUOTE_VARS], [# Backslashify metacharacters that are still active within # double-quoted strings. sed_quote_subst='s/\([["`$\\]]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\([["`\\]]\)/\\\1/g' # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to delay expansion of an escaped single quote. delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' ]) # _LT_PROG_LTMAIN # --------------- # Note that this code is called both from 'configure', and 'config.status' # now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, # 'config.status' has no value for ac_aux_dir unless we are using Automake, # so we pass a copy along to make sure it has a sensible value anyway. m4_defun([_LT_PROG_LTMAIN], [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) ltmain=$ac_aux_dir/ltmain.sh ])# _LT_PROG_LTMAIN ## ------------------------------------- ## ## Accumulate code for creating libtool. ## ## ------------------------------------- ## # So that we can recreate a full libtool script including additional # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS # in macros and then make a single call at the end using the 'libtool' # label. # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) # ---------------------------------------- # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. m4_define([_LT_CONFIG_LIBTOOL_INIT], [m4_ifval([$1], [m4_append([_LT_OUTPUT_LIBTOOL_INIT], [$1 ])])]) # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_INIT]) # _LT_CONFIG_LIBTOOL([COMMANDS]) # ------------------------------ # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. m4_define([_LT_CONFIG_LIBTOOL], [m4_ifval([$1], [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], [$1 ])])]) # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) # ----------------------------------------------------- m4_defun([_LT_CONFIG_SAVE_COMMANDS], [_LT_CONFIG_LIBTOOL([$1]) _LT_CONFIG_LIBTOOL_INIT([$2]) ]) # _LT_FORMAT_COMMENT([COMMENT]) # ----------------------------- # Add leading comment marks to the start of each line, and a trailing # full-stop to the whole comment if one is not present already. m4_define([_LT_FORMAT_COMMENT], [m4_ifval([$1], [ m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) )]) ## ------------------------ ## ## FIXME: Eliminate VARNAME ## ## ------------------------ ## # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) # ------------------------------------------------------------------- # CONFIGNAME is the name given to the value in the libtool script. # VARNAME is the (base) name used in the configure script. # VALUE may be 0, 1 or 2 for a computed quote escaped value based on # VARNAME. Any other value will be used directly. m4_define([_LT_DECL], [lt_if_append_uniq([lt_decl_varnames], [$2], [, ], [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], [m4_ifval([$1], [$1], [$2])]) lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) m4_ifval([$4], [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) lt_dict_add_subkey([lt_decl_dict], [$2], [tagged?], [m4_ifval([$5], [yes], [no])])]) ]) # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) # -------------------------------------------------------- m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) # ------------------------------------------------ m4_define([lt_decl_tag_varnames], [_lt_decl_filter([tagged?], [yes], $@)]) # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) # --------------------------------------------------------- m4_define([_lt_decl_filter], [m4_case([$#], [0], [m4_fatal([$0: too few arguments: $#])], [1], [m4_fatal([$0: too few arguments: $#: $1])], [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], [lt_dict_filter([lt_decl_dict], $@)])[]dnl ]) # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) # -------------------------------------------------- m4_define([lt_decl_quote_varnames], [_lt_decl_filter([value], [1], $@)]) # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) # --------------------------------------------------- m4_define([lt_decl_dquote_varnames], [_lt_decl_filter([value], [2], $@)]) # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) # --------------------------------------------------- m4_define([lt_decl_varnames_tagged], [m4_assert([$# <= 2])dnl _$0(m4_quote(m4_default([$1], [[, ]])), m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) m4_define([_lt_decl_varnames_tagged], [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) # lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) # ------------------------------------------------ m4_define([lt_decl_all_varnames], [_$0(m4_quote(m4_default([$1], [[, ]])), m4_if([$2], [], m4_quote(lt_decl_varnames), m4_quote(m4_shift($@))))[]dnl ]) m4_define([_lt_decl_all_varnames], [lt_join($@, lt_decl_varnames_tagged([$1], lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl ]) # _LT_CONFIG_STATUS_DECLARE([VARNAME]) # ------------------------------------ # Quote a variable value, and forward it to 'config.status' so that its # declaration there will have the same value as in 'configure'. VARNAME # must have a single quote delimited value for this to work. m4_define([_LT_CONFIG_STATUS_DECLARE], [$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) # _LT_CONFIG_STATUS_DECLARATIONS # ------------------------------ # We delimit libtool config variables with single quotes, so when # we write them to config.status, we have to be sure to quote all # embedded single quotes properly. In configure, this macro expands # each variable declared with _LT_DECL (and _LT_TAGDECL) into: # # ='`$ECHO "$" | $SED "$delay_single_quote_subst"`' m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) # _LT_LIBTOOL_TAGS # ---------------- # Output comment and list of tags supported by the script m4_defun([_LT_LIBTOOL_TAGS], [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl available_tags='_LT_TAGS'dnl ]) # _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) # ----------------------------------- # Extract the dictionary values for VARNAME (optionally with TAG) and # expand to a commented shell variable setting: # # # Some comment about what VAR is for. # visible_name=$lt_internal_name m4_define([_LT_LIBTOOL_DECLARE], [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [description])))[]dnl m4_pushdef([_libtool_name], m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), [0], [_libtool_name=[$]$1], [1], [_libtool_name=$lt_[]$1], [2], [_libtool_name=$lt_[]$1], [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl ]) # _LT_LIBTOOL_CONFIG_VARS # ----------------------- # Produce commented declarations of non-tagged libtool config variables # suitable for insertion in the LIBTOOL CONFIG section of the 'libtool' # script. Tagged libtool config variables (even for the LIBTOOL CONFIG # section) are produced by _LT_LIBTOOL_TAG_VARS. m4_defun([_LT_LIBTOOL_CONFIG_VARS], [m4_foreach([_lt_var], m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) # _LT_LIBTOOL_TAG_VARS(TAG) # ------------------------- m4_define([_LT_LIBTOOL_TAG_VARS], [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) # _LT_TAGVAR(VARNAME, [TAGNAME]) # ------------------------------ m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) # _LT_CONFIG_COMMANDS # ------------------- # Send accumulated output to $CONFIG_STATUS. Thanks to the lists of # variables for single and double quote escaping we saved from calls # to _LT_DECL, we can put quote escaped variables declarations # into 'config.status', and then the shell code to quote escape them in # for loops in 'config.status'. Finally, any additional code accumulated # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. m4_defun([_LT_CONFIG_COMMANDS], [AC_PROVIDE_IFELSE([LT_OUTPUT], dnl If the libtool generation code has been placed in $CONFIG_LT, dnl instead of duplicating it all over again into config.status, dnl then we will have config.status run $CONFIG_LT later, so it dnl needs to know what name is stored there: [AC_CONFIG_COMMANDS([libtool], [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], dnl If the libtool generation code is destined for config.status, dnl expand the accumulated commands and init code now: [AC_CONFIG_COMMANDS([libtool], [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) ])#_LT_CONFIG_COMMANDS # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], [ # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH sed_quote_subst='$sed_quote_subst' double_quote_subst='$double_quote_subst' delay_variable_subst='$delay_variable_subst' _LT_CONFIG_STATUS_DECLARATIONS LTCC='$LTCC' LTCFLAGS='$LTCFLAGS' compiler='$compiler_DEFAULT' # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF \$[]1 _LTECHO_EOF' } # Quote evaled strings. for var in lt_decl_all_varnames([[ \ ]], lt_decl_quote_varnames); do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[[\\\\\\\`\\"\\\$]]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done # Double-quote double-evaled strings. for var in lt_decl_all_varnames([[ \ ]], lt_decl_dquote_varnames); do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[[\\\\\\\`\\"\\\$]]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done _LT_OUTPUT_LIBTOOL_INIT ]) # _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) # ------------------------------------ # Generate a child script FILE with all initialization necessary to # reuse the environment learned by the parent script, and make the # file executable. If COMMENT is supplied, it is inserted after the # '#!' sequence but before initialization text begins. After this # macro, additional text can be appended to FILE to form the body of # the child script. The macro ends with non-zero status if the # file could not be fully written (such as if the disk is full). m4_ifdef([AS_INIT_GENERATED], [m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], [m4_defun([_LT_GENERATED_FILE_INIT], [m4_require([AS_PREPARE])]dnl [m4_pushdef([AS_MESSAGE_LOG_FD])]dnl [lt_write_fail=0 cat >$1 <<_ASEOF || lt_write_fail=1 #! $SHELL # Generated by $as_me. $2 SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$1 <<\_ASEOF || lt_write_fail=1 AS_SHELL_SANITIZE _AS_PREPARE exec AS_MESSAGE_FD>&1 _ASEOF test 0 = "$lt_write_fail" && chmod +x $1[]dnl m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT # LT_OUTPUT # --------- # This macro allows early generation of the libtool script (before # AC_OUTPUT is called), incase it is used in configure for compilation # tests. AC_DEFUN([LT_OUTPUT], [: ${CONFIG_LT=./config.lt} AC_MSG_NOTICE([creating $CONFIG_LT]) _LT_GENERATED_FILE_INIT(["$CONFIG_LT"], [# Run this file to recreate a libtool stub with the current configuration.]) cat >>"$CONFIG_LT" <<\_LTEOF lt_cl_silent=false exec AS_MESSAGE_LOG_FD>>config.log { echo AS_BOX([Running $as_me.]) } >&AS_MESSAGE_LOG_FD lt_cl_help="\ '$as_me' creates a local libtool stub from the current configuration, for use in further configure time tests before the real libtool is generated. Usage: $[0] [[OPTIONS]] -h, --help print this help, then exit -V, --version print version number, then exit -q, --quiet do not print progress messages -d, --debug don't remove temporary files Report bugs to ." lt_cl_version="\ m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) configured by $[0], generated by m4_PACKAGE_STRING. Copyright (C) 2011 Free Software Foundation, Inc. This config.lt script is free software; the Free Software Foundation gives unlimited permision to copy, distribute and modify it." while test 0 != $[#] do case $[1] in --version | --v* | -V ) echo "$lt_cl_version"; exit 0 ;; --help | --h* | -h ) echo "$lt_cl_help"; exit 0 ;; --debug | --d* | -d ) debug=: ;; --quiet | --q* | --silent | --s* | -q ) lt_cl_silent=: ;; -*) AC_MSG_ERROR([unrecognized option: $[1] Try '$[0] --help' for more information.]) ;; *) AC_MSG_ERROR([unrecognized argument: $[1] Try '$[0] --help' for more information.]) ;; esac shift done if $lt_cl_silent; then exec AS_MESSAGE_FD>/dev/null fi _LTEOF cat >>"$CONFIG_LT" <<_LTEOF _LT_OUTPUT_LIBTOOL_COMMANDS_INIT _LTEOF cat >>"$CONFIG_LT" <<\_LTEOF AC_MSG_NOTICE([creating $ofile]) _LT_OUTPUT_LIBTOOL_COMMANDS AS_EXIT(0) _LTEOF chmod +x "$CONFIG_LT" # configure is writing to config.log, but config.lt does its own redirection, # appending to config.log, which fails on DOS, as config.log is still kept # open by configure. Here we exec the FD to /dev/null, effectively closing # config.log, so it can be properly (re)opened and appended to by config.lt. lt_cl_success=: test yes = "$silent" && lt_config_lt_args="$lt_config_lt_args --quiet" exec AS_MESSAGE_LOG_FD>/dev/null $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false exec AS_MESSAGE_LOG_FD>>config.log $lt_cl_success || AS_EXIT(1) ])# LT_OUTPUT # _LT_CONFIG(TAG) # --------------- # If TAG is the built-in tag, create an initial libtool script with a # default configuration from the untagged config vars. Otherwise add code # to config.status for appending the configuration named by TAG from the # matching tagged config vars. m4_defun([_LT_CONFIG], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl _LT_CONFIG_SAVE_COMMANDS([ m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl m4_if(_LT_TAG, [C], [ # See if we are running on zsh, and set the options that allow our # commands through without removal of \ escapes. if test -n "${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi cfgfile=${ofile}T trap "$RM \"$cfgfile\"; exit 1" 1 2 15 $RM "$cfgfile" cat <<_LT_EOF >> "$cfgfile" #! $SHELL # Generated automatically by $as_me ($PACKAGE) $VERSION # NOTE: Changes made to this file will be lost: look at ltmain.sh. # Provide generalized library-building support services. # Written by Gordon Matzigkeit, 1996 _LT_COPYING _LT_LIBTOOL_TAGS # Configured defaults for sys_lib_dlsearch_path munging. : \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"} # ### BEGIN LIBTOOL CONFIG _LT_LIBTOOL_CONFIG_VARS _LT_LIBTOOL_TAG_VARS # ### END LIBTOOL CONFIG _LT_EOF cat <<'_LT_EOF' >> "$cfgfile" # ### BEGIN FUNCTIONS SHARED WITH CONFIGURE _LT_PREPARE_MUNGE_PATH_LIST _LT_PREPARE_CC_BASENAME # ### END FUNCTIONS SHARED WITH CONFIGURE _LT_EOF case $host_os in aix3*) cat <<\_LT_EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test set != "${COLLECT_NAMES+set}"; then COLLECT_NAMES= export COLLECT_NAMES fi _LT_EOF ;; esac _LT_PROG_LTMAIN # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '$q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" ], [cat <<_LT_EOF >> "$ofile" dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded dnl in a comment (ie after a #). # ### BEGIN LIBTOOL TAG CONFIG: $1 _LT_LIBTOOL_TAG_VARS(_LT_TAG) # ### END LIBTOOL TAG CONFIG: $1 _LT_EOF ])dnl /m4_if ], [m4_if([$1], [], [ PACKAGE='$PACKAGE' VERSION='$VERSION' RM='$RM' ofile='$ofile'], []) ])dnl /_LT_CONFIG_SAVE_COMMANDS ])# _LT_CONFIG # LT_SUPPORTED_TAG(TAG) # --------------------- # Trace this macro to discover what tags are supported by the libtool # --tag option, using: # autoconf --trace 'LT_SUPPORTED_TAG:$1' AC_DEFUN([LT_SUPPORTED_TAG], []) # C support is built-in for now m4_define([_LT_LANG_C_enabled], []) m4_define([_LT_TAGS], []) # LT_LANG(LANG) # ------------- # Enable libtool support for the given language if not already enabled. AC_DEFUN([LT_LANG], [AC_BEFORE([$0], [LT_OUTPUT])dnl m4_case([$1], [C], [_LT_LANG(C)], [C++], [_LT_LANG(CXX)], [Go], [_LT_LANG(GO)], [Java], [_LT_LANG(GCJ)], [Fortran 77], [_LT_LANG(F77)], [Fortran], [_LT_LANG(FC)], [Windows Resource], [_LT_LANG(RC)], [m4_ifdef([_LT_LANG_]$1[_CONFIG], [_LT_LANG($1)], [m4_fatal([$0: unsupported language: "$1"])])])dnl ])# LT_LANG # _LT_LANG(LANGNAME) # ------------------ m4_defun([_LT_LANG], [m4_ifdef([_LT_LANG_]$1[_enabled], [], [LT_SUPPORTED_TAG([$1])dnl m4_append([_LT_TAGS], [$1 ])dnl m4_define([_LT_LANG_]$1[_enabled], [])dnl _LT_LANG_$1_CONFIG($1)])dnl ])# _LT_LANG m4_ifndef([AC_PROG_GO], [ ############################################################ # NOTE: This macro has been submitted for inclusion into # # GNU Autoconf as AC_PROG_GO. When it is available in # # a released version of Autoconf we should remove this # # macro and use it instead. # ############################################################ m4_defun([AC_PROG_GO], [AC_LANG_PUSH(Go)dnl AC_ARG_VAR([GOC], [Go compiler command])dnl AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl _AC_ARG_VAR_LDFLAGS()dnl AC_CHECK_TOOL(GOC, gccgo) if test -z "$GOC"; then if test -n "$ac_tool_prefix"; then AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) fi fi if test -z "$GOC"; then AC_CHECK_PROG(GOC, gccgo, gccgo, false) fi ])#m4_defun ])#m4_ifndef # _LT_LANG_DEFAULT_CONFIG # ----------------------- m4_defun([_LT_LANG_DEFAULT_CONFIG], [AC_PROVIDE_IFELSE([AC_PROG_CXX], [LT_LANG(CXX)], [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) AC_PROVIDE_IFELSE([AC_PROG_F77], [LT_LANG(F77)], [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) AC_PROVIDE_IFELSE([AC_PROG_FC], [LT_LANG(FC)], [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal dnl pulling things in needlessly. AC_PROVIDE_IFELSE([AC_PROG_GCJ], [LT_LANG(GCJ)], [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], [LT_LANG(GCJ)], [AC_PROVIDE_IFELSE([LT_PROG_GCJ], [LT_LANG(GCJ)], [m4_ifdef([AC_PROG_GCJ], [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) m4_ifdef([A][M_PROG_GCJ], [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) m4_ifdef([LT_PROG_GCJ], [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) AC_PROVIDE_IFELSE([AC_PROG_GO], [LT_LANG(GO)], [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) AC_PROVIDE_IFELSE([LT_PROG_RC], [LT_LANG(RC)], [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) ])# _LT_LANG_DEFAULT_CONFIG # Obsolete macros: AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_CXX], []) dnl AC_DEFUN([AC_LIBTOOL_F77], []) dnl AC_DEFUN([AC_LIBTOOL_FC], []) dnl AC_DEFUN([AC_LIBTOOL_GCJ], []) dnl AC_DEFUN([AC_LIBTOOL_RC], []) # _LT_TAG_COMPILER # ---------------- m4_defun([_LT_TAG_COMPILER], [AC_REQUIRE([AC_PROG_CC])dnl _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC ])# _LT_TAG_COMPILER # _LT_COMPILER_BOILERPLATE # ------------------------ # Check for compiler boilerplate output or warnings with # the simple compiler test code. m4_defun([_LT_COMPILER_BOILERPLATE], [m4_require([_LT_DECL_SED])dnl ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $RM conftest* ])# _LT_COMPILER_BOILERPLATE # _LT_LINKER_BOILERPLATE # ---------------------- # Check for linker boilerplate output or warnings with # the simple link test code. m4_defun([_LT_LINKER_BOILERPLATE], [m4_require([_LT_DECL_SED])dnl ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* ])# _LT_LINKER_BOILERPLATE # _LT_REQUIRED_DARWIN_CHECKS # ------------------------- m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ case $host_os in rhapsody* | darwin*) AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) AC_CHECK_TOOL([LIPO], [lipo], [:]) AC_CHECK_TOOL([OTOOL], [otool], [:]) AC_CHECK_TOOL([OTOOL64], [otool64], [:]) _LT_DECL([], [DSYMUTIL], [1], [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) _LT_DECL([], [NMEDIT], [1], [Tool to change global to local symbols on Mac OS X]) _LT_DECL([], [LIPO], [1], [Tool to manipulate fat objects and archives on Mac OS X]) _LT_DECL([], [OTOOL], [1], [ldd/readelf like tool for Mach-O binaries on Mac OS X]) _LT_DECL([], [OTOOL64], [1], [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], [lt_cv_apple_cc_single_mod=no if test -z "$LT_MULTI_MODULE"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the # link flags. rm -rf libconftest.dylib* echo "int foo(void){return 1;}" > conftest.c echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err _lt_result=$? # If there is a non-empty error log, and "single_module" # appears in it, assume the flag caused a linker warning if test -s conftest.err && $GREP single_module conftest.err; then cat conftest.err >&AS_MESSAGE_LOG_FD # Otherwise, if the output was created with a 0 exit code from # the compiler, it worked. elif test -f libconftest.dylib && test 0 = "$_lt_result"; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&AS_MESSAGE_LOG_FD fi rm -rf libconftest.dylib* rm -f conftest.* fi]) AC_CACHE_CHECK([for -exported_symbols_list linker flag], [lt_cv_ld_exported_symbols_list], [lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], [lt_cv_ld_exported_symbols_list=yes], [lt_cv_ld_exported_symbols_list=no]) LDFLAGS=$save_LDFLAGS ]) AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], [lt_cv_ld_force_load=no cat > conftest.c << _LT_EOF int forced_loaded() { return 2;} _LT_EOF echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD cat > conftest.c << _LT_EOF int main() { return 0;} _LT_EOF echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err _lt_result=$? if test -s conftest.err && $GREP force_load conftest.err; then cat conftest.err >&AS_MESSAGE_LOG_FD elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then lt_cv_ld_force_load=yes else cat conftest.err >&AS_MESSAGE_LOG_FD fi rm -f conftest.err libconftest.a conftest conftest.c rm -rf conftest.dSYM ]) case $host_os in rhapsody* | darwin1.[[012]]) _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; darwin*) # darwin 5.x on # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; 10.[[012]][[,.]]*) _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 10.*) _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; esac ;; esac if test yes = "$lt_cv_apple_cc_single_mod"; then _lt_dar_single_mod='$single_module' fi if test yes = "$lt_cv_ld_exported_symbols_list"; then _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym' else _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib' fi if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= fi ;; esac ]) # _LT_DARWIN_LINKER_FEATURES([TAG]) # --------------------------------- # Checks for linker and compiler features on darwin m4_defun([_LT_DARWIN_LINKER_FEATURES], [ m4_require([_LT_REQUIRED_DARWIN_CHECKS]) _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported if test yes = "$lt_cv_ld_force_load"; then _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) else _LT_TAGVAR(whole_archive_flag_spec, $1)='' fi _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined case $cc_basename in ifort*|nagfor*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test yes = "$_lt_dar_can_shared"; then output_verbose_link_cmd=func_echo_all _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil" _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" m4_if([$1], [CXX], [ if test yes != "$lt_cv_apple_cc_single_mod"; then _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dsymutil" _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dar_export_syms$_lt_dsymutil" fi ],[]) else _LT_TAGVAR(ld_shlibs, $1)=no fi ]) # _LT_SYS_MODULE_PATH_AIX([TAGNAME]) # ---------------------------------- # Links a minimal program and checks the executable # for the system default hardcoded library path. In most cases, # this is /usr/lib:/lib, but when the MPI compilers are used # the location of the communication and MPI libs are included too. # If we don't find anything, use the default library path according # to the aix ld manual. # Store the results from the different compilers for each TAGNAME. # Allow to override them for all tags through lt_cv_aix_libpath. m4_defun([_LT_SYS_MODULE_PATH_AIX], [m4_require([_LT_DECL_SED])dnl if test set = "${lt_cv_aix_libpath+set}"; then aix_libpath=$lt_cv_aix_libpath else AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ lt_aix_libpath_sed='[ /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }]' _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi],[]) if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib fi ]) aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) fi ])# _LT_SYS_MODULE_PATH_AIX # _LT_SHELL_INIT(ARG) # ------------------- m4_define([_LT_SHELL_INIT], [m4_divert_text([M4SH-INIT], [$1 ])])# _LT_SHELL_INIT # _LT_PROG_ECHO_BACKSLASH # ----------------------- # Find how we can fake an echo command that does not interpret backslash. # In particular, with Autoconf 2.60 or later we add some code to the start # of the generated configure script that will find a shell with a builtin # printf (that we can use as an echo command). m4_defun([_LT_PROG_ECHO_BACKSLASH], [ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO AC_MSG_CHECKING([how to print strings]) # Test print first, because it will be a builtin if present. if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='print -r --' elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='printf %s\n' else # Use this function as a fallback that always works. func_fallback_echo () { eval 'cat <<_LTECHO_EOF $[]1 _LTECHO_EOF' } ECHO='func_fallback_echo' fi # func_echo_all arg... # Invoke $ECHO with all args, space-separated. func_echo_all () { $ECHO "$*" } case $ECHO in printf*) AC_MSG_RESULT([printf]) ;; print*) AC_MSG_RESULT([print -r]) ;; *) AC_MSG_RESULT([cat]) ;; esac m4_ifdef([_AS_DETECT_SUGGESTED], [_AS_DETECT_SUGGESTED([ test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO PATH=/empty FPATH=/empty; export PATH FPATH test "X`printf %s $ECHO`" = "X$ECHO" \ || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) ])# _LT_PROG_ECHO_BACKSLASH # _LT_WITH_SYSROOT # ---------------- AC_DEFUN([_LT_WITH_SYSROOT], [AC_MSG_CHECKING([for sysroot]) AC_ARG_WITH([sysroot], [AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@], [Search for dependent libraries within DIR (or the compiler's sysroot if not specified).])], [], [with_sysroot=no]) dnl lt_sysroot will always be passed unquoted. We quote it here dnl in case the user passed a directory name. lt_sysroot= case $with_sysroot in #( yes) if test yes = "$GCC"; then lt_sysroot=`$CC --print-sysroot 2>/dev/null` fi ;; #( /*) lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` ;; #( no|'') ;; #( *) AC_MSG_RESULT([$with_sysroot]) AC_MSG_ERROR([The sysroot must be an absolute path.]) ;; esac AC_MSG_RESULT([${lt_sysroot:-no}]) _LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl [dependent libraries, and where our libraries should be installed.])]) # _LT_ENABLE_LOCK # --------------- m4_defun([_LT_ENABLE_LOCK], [AC_ARG_ENABLE([libtool-lock], [AS_HELP_STRING([--disable-libtool-lock], [avoid locking (might break parallel builds)])]) test no = "$enable_libtool_lock" || enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out what ABI is being produced by ac_compile, and set mode # options accordingly. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE=32 ;; *ELF-64*) HPUX_IA64_MODE=64 ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then if test yes = "$lt_cv_prog_gnu_ld"; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; mips64*-*linux*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then emul=elf case `/usr/bin/file conftest.$ac_objext` in *32-bit*) emul="${emul}32" ;; *64-bit*) emul="${emul}64" ;; esac case `/usr/bin/file conftest.$ac_objext` in *MSB*) emul="${emul}btsmip" ;; *LSB*) emul="${emul}ltsmip" ;; esac case `/usr/bin/file conftest.$ac_objext` in *N32*) emul="${emul}n32" ;; esac LD="${LD-ld} -m $emul" fi rm -rf conftest* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. Note that the listed cases only cover the # situations where additional linker options are needed (such as when # doing 32-bit compilation for a host where ld defaults to 64-bit, or # vice versa); the common cases where no linker options are needed do # not appear in the list. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) case `/usr/bin/file conftest.o` in *x86-64*) LD="${LD-ld} -m elf32_x86_64" ;; *) LD="${LD-ld} -m elf_i386" ;; esac ;; powerpc64le-*linux*) LD="${LD-ld} -m elf32lppclinux" ;; powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; powerpcle-*linux*) LD="${LD-ld} -m elf64lppc" ;; powerpc-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS=$CFLAGS CFLAGS="$CFLAGS -belf" AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, [AC_LANG_PUSH(C) AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) AC_LANG_POP]) if test yes != "$lt_cv_cc_needs_belf"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS=$SAVE_CFLAGS fi ;; *-*solaris*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) case $host in i?86-*-solaris*|x86_64-*-solaris*) LD="${LD-ld} -m elf_x86_64" ;; sparc*-*-solaris*) LD="${LD-ld} -m elf64_sparc" ;; esac # GNU ld 2.21 introduced _sol2 emulations. Use them if available. if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then LD=${LD-ld}_sol2 fi ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" fi ;; esac ;; esac fi rm -rf conftest* ;; esac need_locks=$enable_libtool_lock ])# _LT_ENABLE_LOCK # _LT_PROG_AR # ----------- m4_defun([_LT_PROG_AR], [AC_CHECK_TOOLS(AR, [ar], false) : ${AR=ar} : ${AR_FLAGS=cru} _LT_DECL([], [AR], [1], [The archiver]) _LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], [lt_cv_ar_at_file=no AC_COMPILE_IFELSE([AC_LANG_PROGRAM], [echo conftest.$ac_objext > conftest.lst lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' AC_TRY_EVAL([lt_ar_try]) if test 0 -eq "$ac_status"; then # Ensure the archiver fails upon bogus file names. rm -f conftest.$ac_objext libconftest.a AC_TRY_EVAL([lt_ar_try]) if test 0 -ne "$ac_status"; then lt_cv_ar_at_file=@ fi fi rm -f conftest.* libconftest.a ]) ]) if test no = "$lt_cv_ar_at_file"; then archiver_list_spec= else archiver_list_spec=$lt_cv_ar_at_file fi _LT_DECL([], [archiver_list_spec], [1], [How to feed a file listing to the archiver]) ])# _LT_PROG_AR # _LT_CMD_OLD_ARCHIVE # ------------------- m4_defun([_LT_CMD_OLD_ARCHIVE], [_LT_PROG_AR AC_CHECK_TOOL(STRIP, strip, :) test -z "$STRIP" && STRIP=: _LT_DECL([], [STRIP], [1], [A symbol stripping program]) AC_CHECK_TOOL(RANLIB, ranlib, :) test -z "$RANLIB" && RANLIB=: _LT_DECL([], [RANLIB], [1], [Commands used to install an old-style archive]) # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in bitrig* | openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" fi case $host_os in darwin*) lock_old_archive_extraction=yes ;; *) lock_old_archive_extraction=no ;; esac _LT_DECL([], [old_postinstall_cmds], [2]) _LT_DECL([], [old_postuninstall_cmds], [2]) _LT_TAGDECL([], [old_archive_cmds], [2], [Commands used to build an old-style archive]) _LT_DECL([], [lock_old_archive_extraction], [0], [Whether to use a lock for old archive extraction]) ])# _LT_CMD_OLD_ARCHIVE # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) # ---------------------------------------------------------------- # Check whether the given compiler option works AC_DEFUN([_LT_COMPILER_OPTION], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$3" ## exclude from sc_useless_quotes_in_assignment # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi fi $RM conftest* ]) if test yes = "[$]$2"; then m4_if([$5], , :, [$5]) else m4_if([$6], , :, [$6]) fi ])# _LT_COMPILER_OPTION # Old name: AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [ACTION-SUCCESS], [ACTION-FAILURE]) # ---------------------------------------------------- # Check whether the given linker option works AC_DEFUN([_LT_LINKER_OPTION], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS $3" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&AS_MESSAGE_LOG_FD $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi else $2=yes fi fi $RM -r conftest* LDFLAGS=$save_LDFLAGS ]) if test yes = "[$]$2"; then m4_if([$4], , :, [$4]) else m4_if([$5], , :, [$5]) fi ])# _LT_LINKER_OPTION # Old name: AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) # LT_CMD_MAX_LEN #--------------- AC_DEFUN([LT_CMD_MAX_LEN], [AC_REQUIRE([AC_CANONICAL_HOST])dnl # find the maximum length of command line arguments AC_MSG_CHECKING([the maximum length of command line arguments]) AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl i=0 teststring=ABCD case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw* | cegcc*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; mint*) # On MiNT this can take a long time and run out of memory. lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; interix*) # We know the value 262144 and hardcode it with a safety zone (like BSD) lt_cv_sys_max_cmd_len=196608 ;; os2*) # The test takes a long time on OS/2. lt_cv_sys_max_cmd_len=8192 ;; osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; sco3.2v5*) lt_cv_sys_max_cmd_len=102400 ;; sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` else lt_cv_sys_max_cmd_len=32768 fi ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` if test -n "$lt_cv_sys_max_cmd_len" && \ test undefined != "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else # Make teststring a little bigger before we do anything with it. # a 1K string should be a reasonable start. for i in 1 2 3 4 5 6 7 8; do teststring=$teststring$teststring done SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. while { test X`env echo "$teststring$teststring" 2>/dev/null` \ = "X$teststring$teststring"; } >/dev/null 2>&1 && test 17 != "$i" # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done # Only check the string length outside the loop. lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` teststring= # Add a significant safety factor because C++ compilers can tack on # massive amounts of additional arguments before passing them to the # linker. It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` fi ;; esac ]) if test -n "$lt_cv_sys_max_cmd_len"; then AC_MSG_RESULT($lt_cv_sys_max_cmd_len) else AC_MSG_RESULT(none) fi max_cmd_len=$lt_cv_sys_max_cmd_len _LT_DECL([], [max_cmd_len], [0], [What is the maximum length of a command?]) ])# LT_CMD_MAX_LEN # Old name: AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) # _LT_HEADER_DLFCN # ---------------- m4_defun([_LT_HEADER_DLFCN], [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl ])# _LT_HEADER_DLFCN # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) # ---------------------------------------------------------------- m4_defun([_LT_TRY_DLOPEN_SELF], [m4_require([_LT_HEADER_DLFCN])dnl if test yes = "$cross_compiling"; then : [$4] else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF [#line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif /* When -fvisibility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else { if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; else puts (dlerror ()); } /* dlclose (self); */ } else puts (dlerror ()); return status; }] _LT_EOF if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) $1 ;; x$lt_dlneed_uscore) $2 ;; x$lt_dlunknown|x*) $3 ;; esac else : # compilation failed $3 fi fi rm -fr conftest* ])# _LT_TRY_DLOPEN_SELF # LT_SYS_DLOPEN_SELF # ------------------ AC_DEFUN([LT_SYS_DLOPEN_SELF], [m4_require([_LT_HEADER_DLFCN])dnl if test yes != "$enable_dlopen"; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen=load_add_on lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32* | cegcc*) lt_cv_dlopen=LoadLibrary lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen=dlopen lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[ lt_cv_dlopen=dyld lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ]) ;; tpf*) # Don't try to run any link tests for TPF. We know it's impossible # because TPF is a cross-compiler, and we know how we open DSOs. lt_cv_dlopen=dlopen lt_cv_dlopen_libs= lt_cv_dlopen_self=no ;; *) AC_CHECK_FUNC([shl_load], [lt_cv_dlopen=shl_load], [AC_CHECK_LIB([dld], [shl_load], [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld], [AC_CHECK_FUNC([dlopen], [lt_cv_dlopen=dlopen], [AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl], [AC_CHECK_LIB([svld], [dlopen], [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld], [AC_CHECK_LIB([dld], [dld_link], [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld]) ]) ]) ]) ]) ]) ;; esac if test no = "$lt_cv_dlopen"; then enable_dlopen=no else enable_dlopen=yes fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS=$CPPFLAGS test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS=$LDFLAGS wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS=$LIBS LIBS="$lt_cv_dlopen_libs $LIBS" AC_CACHE_CHECK([whether a program can dlopen itself], lt_cv_dlopen_self, [dnl _LT_TRY_DLOPEN_SELF( lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) ]) if test yes = "$lt_cv_dlopen_self"; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" AC_CACHE_CHECK([whether a statically linked program can dlopen itself], lt_cv_dlopen_self_static, [dnl _LT_TRY_DLOPEN_SELF( lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) ]) fi CPPFLAGS=$save_CPPFLAGS LDFLAGS=$save_LDFLAGS LIBS=$save_LIBS ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi _LT_DECL([dlopen_support], [enable_dlopen], [0], [Whether dlopen is supported]) _LT_DECL([dlopen_self], [enable_dlopen_self], [0], [Whether dlopen of programs is supported]) _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], [Whether dlopen of statically linked programs is supported]) ])# LT_SYS_DLOPEN_SELF # Old name: AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) # _LT_COMPILER_C_O([TAGNAME]) # --------------------------- # Check to see if options -c and -o are simultaneously supported by compiler. # This macro does not hard code the compiler like AC_PROG_CC_C_O. m4_defun([_LT_COMPILER_C_O], [m4_require([_LT_DECL_SED])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_TAG_COMPILER])dnl AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes fi fi chmod u+w . 2>&AS_MESSAGE_LOG_FD $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* ]) _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], [Does compiler simultaneously support -c and -o options?]) ])# _LT_COMPILER_C_O # _LT_COMPILER_FILE_LOCKS([TAGNAME]) # ---------------------------------- # Check to see if we can do hard links to lock some files if needed m4_defun([_LT_COMPILER_FILE_LOCKS], [m4_require([_LT_ENABLE_LOCK])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl _LT_COMPILER_C_O([$1]) hard_links=nottested if test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then # do not overwrite the value of need_locks provided by the user AC_MSG_CHECKING([if we can lock with hard links]) hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no AC_MSG_RESULT([$hard_links]) if test no = "$hard_links"; then AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe]) need_locks=warn fi else need_locks=no fi _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) ])# _LT_COMPILER_FILE_LOCKS # _LT_CHECK_OBJDIR # ---------------- m4_defun([_LT_CHECK_OBJDIR], [AC_CACHE_CHECK([for objdir], [lt_cv_objdir], [rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null]) objdir=$lt_cv_objdir _LT_DECL([], [objdir], [0], [The name of the directory that contains temporary libtool files])dnl m4_pattern_allow([LT_OBJDIR])dnl AC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/", [Define to the sub-directory where libtool stores uninstalled libraries.]) ])# _LT_CHECK_OBJDIR # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) # -------------------------------------- # Check hardcoding attributes. m4_defun([_LT_LINKER_HARDCODE_LIBPATH], [AC_MSG_CHECKING([how to hardcode library paths into programs]) _LT_TAGVAR(hardcode_action, $1)= if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || test -n "$_LT_TAGVAR(runpath_var, $1)" || test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then # We can hardcode non-existent directories. if test no != "$_LT_TAGVAR(hardcode_direct, $1)" && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" && test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then # Linking always hardcodes the temporary library directory. _LT_TAGVAR(hardcode_action, $1)=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. _LT_TAGVAR(hardcode_action, $1)=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. _LT_TAGVAR(hardcode_action, $1)=unsupported fi AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) if test relink = "$_LT_TAGVAR(hardcode_action, $1)" || test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then # Fast installation is not supported enable_fast_install=no elif test yes = "$shlibpath_overrides_runpath" || test no = "$enable_shared"; then # Fast installation is not necessary enable_fast_install=needless fi _LT_TAGDECL([], [hardcode_action], [0], [How to hardcode a shared library path into an executable]) ])# _LT_LINKER_HARDCODE_LIBPATH # _LT_CMD_STRIPLIB # ---------------- m4_defun([_LT_CMD_STRIPLIB], [m4_require([_LT_DECL_EGREP]) striplib= old_striplib= AC_MSG_CHECKING([whether stripping libraries is possible]) if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" AC_MSG_RESULT([yes]) else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP"; then striplib="$STRIP -x" old_striplib="$STRIP -S" AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) fi ;; *) AC_MSG_RESULT([no]) ;; esac fi _LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) _LT_DECL([], [striplib], [1]) ])# _LT_CMD_STRIPLIB # _LT_PREPARE_MUNGE_PATH_LIST # --------------------------- # Make sure func_munge_path_list() is defined correctly. m4_defun([_LT_PREPARE_MUNGE_PATH_LIST], [[# func_munge_path_list VARIABLE PATH # ----------------------------------- # VARIABLE is name of variable containing _space_ separated list of # directories to be munged by the contents of PATH, which is string # having a format: # "DIR[:DIR]:" # string "DIR[ DIR]" will be prepended to VARIABLE # ":DIR[:DIR]" # string "DIR[ DIR]" will be appended to VARIABLE # "DIRP[:DIRP]::[DIRA:]DIRA" # string "DIRP[ DIRP]" will be prepended to VARIABLE and string # "DIRA[ DIRA]" will be appended to VARIABLE # "DIR[:DIR]" # VARIABLE will be replaced by "DIR[ DIR]" func_munge_path_list () { case x@S|@2 in x) ;; *:) eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\" ;; x:*) eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\" ;; *::*) eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\" ;; *) eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\" ;; esac } ]])# _LT_PREPARE_PATH_LIST # _LT_SYS_DYNAMIC_LINKER([TAG]) # ----------------------------- # PORTME Fill in your ld.so characteristics m4_defun([_LT_SYS_DYNAMIC_LINKER], [AC_REQUIRE([AC_CANONICAL_HOST])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_OBJDUMP])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_CHECK_SHELL_FEATURES])dnl m4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl AC_MSG_CHECKING([dynamic linker characteristics]) m4_if([$1], [], [ if test yes = "$GCC"; then case $host_os in darwin*) lt_awk_arg='/^libraries:/,/LR/' ;; *) lt_awk_arg='/^libraries:/' ;; esac case $host_os in mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;; *) lt_sed_strip_eq='s|=/|/|g' ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` case $lt_search_path_spec in *\;*) # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` ;; *) lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` ;; esac # Ok, now we have the path, separated by spaces, we can step through it # and add multilib dir if necessary... lt_tmp_lt_search_path_spec= lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` # ...but if some path component already ends with the multilib dir we assume # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer). case "$lt_multi_os_dir; $lt_search_path_spec " in "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*) lt_multi_os_dir= ;; esac for lt_sys_path in $lt_search_path_spec; do if test -d "$lt_sys_path$lt_multi_os_dir"; then lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir" elif test -n "$lt_multi_os_dir"; then test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' BEGIN {RS = " "; FS = "/|\n";} { lt_foo = ""; lt_count = 0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { lt_foo = "/" $lt_i lt_foo; } else { lt_count--; } } } } if (lt_foo != "") { lt_freq[[lt_foo]]++; } if (lt_freq[[lt_foo]] == 1) { print lt_foo; } }'` # AWK program above erroneously prepends '/' to C:/dos/paths # for these hosts. case $host_os in mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;; esac sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi]) library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=.so postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown AC_ARG_VAR([LT_SYS_LIBRARY_PATH], [User-defined run-time library search path.]) case $host_os in aix3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='$libname$release$shared_ext$major' ;; aix[[4-9]]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no hardcode_into_libs=yes if test ia64 = "$host_cpu"; then # AIX 5 supports IA64 library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line '#! .'. This would cause the generated library to # depend on '.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[[01]] | aix4.[[01]].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac # Using Import Files as archive members, it is possible to support # filename-based versioning of shared library archives on AIX. While # this would work for both with and without runtime linking, it will # prevent static linking of such archives. So we do filename-based # shared library versioning with .so extension only, which is used # when both runtime linking and shared linking is enabled. # Unfortunately, runtime linking may impact performance, so we do # not want this to be the default eventually. Also, we use the # versioned .so libs for executables only if there is the -brtl # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. # To allow for filename-based versioning support, we need to create # libNAME.so.V as an archive file, containing: # *) an Import File, referring to the versioned filename of the # archive as well as the shared archive member, telling the # bitwidth (32 or 64) of that shared object, and providing the # list of exported symbols of that shared object, eventually # decorated with the 'weak' keyword # *) the shared object with the F_LOADONLY flag set, to really avoid # it being seen by the linker. # At run time we better use the real file rather than another symlink, # but for link time we create the symlink libNAME.so -> libNAME.so.V case $with_aix_soname,$aix_use_runtimelinking in # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. aix,yes) # traditional libtool dynamic_linker='AIX unversionable lib.so' # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' ;; aix,no) # traditional AIX only dynamic_linker='AIX lib.a[(]lib.so.V[)]' # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='$libname$release.a $libname.a' soname_spec='$libname$release$shared_ext$major' ;; svr4,*) # full svr4 only dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]" library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' # We do not specify a path in Import Files, so LIBPATH fires. shlibpath_overrides_runpath=yes ;; *,yes) # both, prefer svr4 dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]" library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' # unpreferred sharedlib libNAME.a needs extra handling postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"' postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"' # We do not specify a path in Import Files, so LIBPATH fires. shlibpath_overrides_runpath=yes ;; *,no) # both, prefer aix dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]" library_names_spec='$libname$release.a $libname.a' soname_spec='$libname$release$shared_ext$major' # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)' postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"' ;; esac shlibpath_var=LIBPATH fi ;; amigaos*) case $host_cpu in powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) library_names_spec='$libname$shared_ext' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[[45]]*) version_type=linux # correct to gnu/linux during the next big refactor need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=.dll need_version=no need_lib_prefix=no case $GCC,$cc_basename in yes,*) # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \$file`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' m4_if([$1], [],[ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' ;; esac dynamic_linker='Win32 ld.exe' ;; *,cl*) # Native MSVC libname_spec='$name' soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' library_names_spec='$libname.dll.lib' case $build_os in mingw*) sys_lib_search_path_spec= lt_save_ifs=$IFS IFS=';' for lt_path in $LIB do IFS=$lt_save_ifs # Let DOS variable expansion print the short 8.3 style file name. lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" done IFS=$lt_save_ifs # Convert to MSYS style. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` ;; cygwin*) # Convert to unix form, then to dos form, then back to unix form # but this time dos style (no spaces!) so that the unix form looks # like /cygdrive/c/PROGRA~1:/cygdr... sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ;; *) sys_lib_search_path_spec=$LIB if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then # It is most probably a Windows format PATH. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # FIXME: find the short name or the path components, as spaces are # common. (e.g. "Program Files" -> "PROGRA~1") ;; esac # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \$file`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes dynamic_linker='Win32 link.exe' ;; *) # Assume MSVC wrapper library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib' dynamic_linker='Win32 ld.exe' ;; esac # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' soname_spec='$libname$release$major$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' m4_if([$1], [],[ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[[23]].*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2.*) shlibpath_overrides_runpath=yes ;; freebsd3.[[01]]* | freebsdelf3.[[01]]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; haiku*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LIBRARY_PATH shlibpath_overrides_runpath=no sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' if test 32 = "$HPUX_IA64_MODE"; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" sys_lib_dlsearch_path_spec=/usr/lib/hpux32 else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" sys_lib_dlsearch_path_spec=/usr/lib/hpux64 fi ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555, ... postinstall_cmds='chmod 555 $lib' # or fails outright, so override atomically: install_override_mode=555 ;; interix[[3-9]]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test yes = "$lt_cv_prog_gnu_ld"; then version_type=linux # correct to gnu/linux during the next big refactor else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='$libname$release$shared_ext$major' library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; linux*android*) version_type=none # Android doesn't support versioned libraries. need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext' soname_spec='$libname$release$shared_ext' finish_cmds= shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes dynamic_linker='Android linker' # Don't embed -rpath directories since the linker doesn't support them. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], [lt_cv_shlibpath_overrides_runpath=no save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], [lt_cv_shlibpath_overrides_runpath=yes])]) LDFLAGS=$save_LDFLAGS libdir=$save_libdir ]) shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Ideally, we could use ldconfig to report *all* directores which are # searched for libraries, however this is still not possible. Aside from not # being certain /sbin/ldconfig is available, command # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, # even though it is searched at run-time. Try to do the best guess by # appending ld.so.conf contents (and includes) to the search path. if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsdelf*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='NetBSD ld.elf_so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; *nto* | *qnx*) version_type=qnx need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; openbsd* | bitrig*) version_type=sunos sys_lib_dlsearch_path_spec=/usr/lib need_lib_prefix=no if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then need_version=no else need_version=yes fi library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; os2*) libname_spec='$name' version_type=windows shrext_cmds=.dll need_version=no need_lib_prefix=no # OS/2 can only load a DLL with a base name of 8 characters or less. soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; v=$($ECHO $release$versuffix | tr -d .-); n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); $ECHO $n$v`$shared_ext' library_names_spec='${libname}_dll.$libext' dynamic_linker='OS/2 ld.exe' shlibpath_var=BEGINLIBPATH sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec postinstall_cmds='base_file=`basename \$file`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='$libname$release$shared_ext$major' library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test yes = "$with_gnu_ld"; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec; then version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' soname_spec='$libname$shared_ext.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=sco need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test yes = "$with_gnu_ld"; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; uts4*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac AC_MSG_RESULT([$dynamic_linker]) test no = "$dynamic_linker" && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test yes = "$GCC"; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec fi if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec fi # remember unaugmented sys_lib_dlsearch_path content for libtool script decls... configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec # ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" # to be used as default LT_SYS_LIBRARY_PATH value in generated libtool configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH _LT_DECL([], [variables_saved_for_relink], [1], [Variables whose values should be saved in libtool wrapper scripts and restored at link time]) _LT_DECL([], [need_lib_prefix], [0], [Do we need the "lib" prefix for modules?]) _LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) _LT_DECL([], [version_type], [0], [Library versioning type]) _LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) _LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) _LT_DECL([], [shlibpath_overrides_runpath], [0], [Is shlibpath searched before the hard-coded library search path?]) _LT_DECL([], [libname_spec], [1], [Format of library name prefix]) _LT_DECL([], [library_names_spec], [1], [[List of archive names. First name is the real one, the rest are links. The last name is the one that the linker finds with -lNAME]]) _LT_DECL([], [soname_spec], [1], [[The coded name of the library, if different from the real name]]) _LT_DECL([], [install_override_mode], [1], [Permission mode override for installation of shared libraries]) _LT_DECL([], [postinstall_cmds], [2], [Command to use after installation of a shared archive]) _LT_DECL([], [postuninstall_cmds], [2], [Command to use after uninstallation of a shared archive]) _LT_DECL([], [finish_cmds], [2], [Commands used to finish a libtool library installation in a directory]) _LT_DECL([], [finish_eval], [1], [[As "finish_cmds", except a single script fragment to be evaled but not shown]]) _LT_DECL([], [hardcode_into_libs], [0], [Whether we should hardcode library paths into libraries]) _LT_DECL([], [sys_lib_search_path_spec], [2], [Compile-time system search path for libraries]) _LT_DECL([sys_lib_dlsearch_path_spec], [configure_time_dlsearch_path], [2], [Detected run-time system search path for libraries]) _LT_DECL([], [configure_time_lt_sys_library_path], [2], [Explicit LT_SYS_LIBRARY_PATH set during ./configure time]) ])# _LT_SYS_DYNAMIC_LINKER # _LT_PATH_TOOL_PREFIX(TOOL) # -------------------------- # find a file program that can recognize shared library AC_DEFUN([_LT_PATH_TOOL_PREFIX], [m4_require([_LT_DECL_EGREP])dnl AC_MSG_CHECKING([for $1]) AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, [case $MAGIC_CMD in [[\\/*] | ?:[\\/]*]) lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD=$MAGIC_CMD lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR dnl $ac_dummy forces splitting on constant user-supplied paths. dnl POSIX.2 word splitting is done only on the output of word expansions, dnl not every word. This closes a longstanding sh security hole. ac_dummy="m4_if([$2], , $PATH, [$2])" for ac_dir in $ac_dummy; do IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$1"; then lt_cv_path_MAGIC_CMD=$ac_dir/"$1" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD=$lt_cv_path_MAGIC_CMD if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS=$lt_save_ifs MAGIC_CMD=$lt_save_MAGIC_CMD ;; esac]) MAGIC_CMD=$lt_cv_path_MAGIC_CMD if test -n "$MAGIC_CMD"; then AC_MSG_RESULT($MAGIC_CMD) else AC_MSG_RESULT(no) fi _LT_DECL([], [MAGIC_CMD], [0], [Used to examine libraries when file_magic_cmd begins with "file"])dnl ])# _LT_PATH_TOOL_PREFIX # Old name: AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) # _LT_PATH_MAGIC # -------------- # find a file program that can recognize a shared library m4_defun([_LT_PATH_MAGIC], [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) else MAGIC_CMD=: fi fi ])# _LT_PATH_MAGIC # LT_PATH_LD # ---------- # find the pathname to the GNU or non-GNU linker AC_DEFUN([LT_PATH_LD], [AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_PROG_ECHO_BACKSLASH])dnl AC_ARG_WITH([gnu-ld], [AS_HELP_STRING([--with-gnu-ld], [assume the C compiler uses GNU ld @<:@default=no@:>@])], [test no = "$withval" || with_gnu_ld=yes], [with_gnu_ld=no])dnl ac_prog=ld if test yes = "$GCC"; then # Check if gcc -print-prog-name=ld gives a path. AC_MSG_CHECKING([for ld used by $CC]) case $host in *-*-mingw*) # gcc leaves a trailing carriage return, which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [[\\/]]* | ?:[[\\/]]*) re_direlt='/[[^/]][[^/]]*/\.\./' # Canonicalize the pathname of ld ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD=$ac_prog ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test yes = "$with_gnu_ld"; then AC_MSG_CHECKING([for GNU ld]) else AC_MSG_CHECKING([for non-GNU ld]) fi AC_CACHE_VAL(lt_cv_path_LD, [if test -z "$LD"; then lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD=$ac_dir/$ac_prog # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &1 conftest.i cat conftest.i conftest.i >conftest2.i : ${lt_DD:=$DD} AC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd], [if "$ac_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then cmp -s conftest.i conftest.out \ && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=: fi]) rm -f conftest.i conftest2.i conftest.out]) ])# _LT_PATH_DD # _LT_CMD_TRUNCATE # ---------------- # find command to truncate a binary pipe m4_defun([_LT_CMD_TRUNCATE], [m4_require([_LT_PATH_DD]) AC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin], [printf 0123456789abcdef0123456789abcdef >conftest.i cat conftest.i conftest.i >conftest2.i lt_cv_truncate_bin= if "$ac_cv_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then cmp -s conftest.i conftest.out \ && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1" fi rm -f conftest.i conftest2.i conftest.out test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"]) _LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1], [Command to truncate a binary pipe]) ])# _LT_CMD_TRUNCATE # _LT_CHECK_MAGIC_METHOD # ---------------------- # how to check for library dependencies # -- PORTME fill in with the dynamic library characteristics m4_defun([_LT_CHECK_MAGIC_METHOD], [m4_require([_LT_DECL_EGREP]) m4_require([_LT_DECL_OBJDUMP]) AC_CACHE_CHECK([how to recognize dependent libraries], lt_cv_deplibs_check_method, [lt_cv_file_magic_cmd='$MAGIC_CMD' lt_cv_file_magic_test_file= lt_cv_deplibs_check_method='unknown' # Need to set the preceding variable on all platforms that support # interlibrary dependencies. # 'none' -- dependencies not supported. # 'unknown' -- same as none, but documents that we really don't know. # 'pass_all' -- all dependencies passed with no checks. # 'test_compile' -- check by making test program. # 'file_magic [[regex]]' -- check by looking for files in library path # that responds to the $file_magic_cmd with a given extended regex. # If you have 'file' or equivalent on your system and you're not sure # whether 'pass_all' will *always* work, you probably want this one. case $host_os in aix[[4-9]]*) lt_cv_deplibs_check_method=pass_all ;; beos*) lt_cv_deplibs_check_method=pass_all ;; bsdi[[45]]*) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' lt_cv_file_magic_cmd='/usr/bin/file -L' lt_cv_file_magic_test_file=/shlib/libc.so ;; cygwin*) # func_win32_libid is a shell function defined in ltmain.sh lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' ;; mingw* | pw32*) # Base MSYS/MinGW do not provide the 'file' command needed by # func_win32_libid shell function, so use a weaker test based on 'objdump', # unless we find 'file', for example because we are cross-compiling. if ( file / ) >/dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else # Keep this pattern in sync with the one in func_win32_libid. lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; cegcc*) # use the weaker test based on 'objdump'. See mingw*. lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' lt_cv_file_magic_cmd='$OBJDUMP -f' ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | dragonfly*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; haiku*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]'] lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; interix[[3-9]]*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) lt_cv_deplibs_check_method=pass_all ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; *nto* | *qnx*) lt_cv_deplibs_check_method=pass_all ;; openbsd* | bitrig*) if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; rdos*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; tpf*) lt_cv_deplibs_check_method=pass_all ;; os2*) lt_cv_deplibs_check_method=pass_all ;; esac ]) file_magic_glob= want_nocaseglob=no if test "$build" = "$host"; then case $host_os in mingw* | pw32*) if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then want_nocaseglob=yes else file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` fi ;; esac fi file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown _LT_DECL([], [deplibs_check_method], [1], [Method to check whether dependent libraries are shared objects]) _LT_DECL([], [file_magic_cmd], [1], [Command to use when deplibs_check_method = "file_magic"]) _LT_DECL([], [file_magic_glob], [1], [How to find potential files when deplibs_check_method = "file_magic"]) _LT_DECL([], [want_nocaseglob], [1], [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) ])# _LT_CHECK_MAGIC_METHOD # LT_PATH_NM # ---------- # find the pathname to a BSD- or MS-compatible name lister AC_DEFUN([LT_PATH_NM], [AC_REQUIRE([AC_PROG_CC])dnl AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, [if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM=$NM else lt_nm_to_check=${ac_tool_prefix}nm if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. tmp_nm=$ac_dir/$lt_tmp_nm if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then # Check to see if the nm accepts a BSD-compat flag. # Adding the 'sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty case $build_os in mingw*) lt_bad_file=conftest.nm/nofile ;; *) lt_bad_file=/dev/null ;; esac case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in *$lt_bad_file* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break 2 ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break 2 ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac ;; esac fi done IFS=$lt_save_ifs done : ${lt_cv_path_NM=no} fi]) if test no != "$lt_cv_path_NM"; then NM=$lt_cv_path_NM else # Didn't find any BSD compatible name lister, look for dumpbin. if test -n "$DUMPBIN"; then : # Let the user override the test. else AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in *COFF*) DUMPBIN="$DUMPBIN -symbols -headers" ;; *) DUMPBIN=: ;; esac fi AC_SUBST([DUMPBIN]) if test : != "$DUMPBIN"; then NM=$DUMPBIN fi fi test -z "$NM" && NM=nm AC_SUBST([NM]) _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], [lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&AS_MESSAGE_LOG_FD (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&AS_MESSAGE_LOG_FD (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) cat conftest.out >&AS_MESSAGE_LOG_FD if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" fi rm -f conftest*]) ])# LT_PATH_NM # Old names: AU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) AU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_PROG_NM], []) dnl AC_DEFUN([AC_PROG_NM], []) # _LT_CHECK_SHAREDLIB_FROM_LINKLIB # -------------------------------- # how to determine the name of the shared library # associated with a specific link library. # -- PORTME fill in with the dynamic library characteristics m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], [m4_require([_LT_DECL_EGREP]) m4_require([_LT_DECL_OBJDUMP]) m4_require([_LT_DECL_DLLTOOL]) AC_CACHE_CHECK([how to associate runtime and link libraries], lt_cv_sharedlib_from_linklib_cmd, [lt_cv_sharedlib_from_linklib_cmd='unknown' case $host_os in cygwin* | mingw* | pw32* | cegcc*) # two different shell functions defined in ltmain.sh; # decide which one to use based on capabilities of $DLLTOOL case `$DLLTOOL --help 2>&1` in *--identify-strict*) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib ;; *) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback ;; esac ;; *) # fallback: assume linklib IS sharedlib lt_cv_sharedlib_from_linklib_cmd=$ECHO ;; esac ]) sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO _LT_DECL([], [sharedlib_from_linklib_cmd], [1], [Command to associate shared and link libraries]) ])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB # _LT_PATH_MANIFEST_TOOL # ---------------------- # locate the manifest tool m4_defun([_LT_PATH_MANIFEST_TOOL], [AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], [lt_cv_path_mainfest_tool=no echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out cat conftest.err >&AS_MESSAGE_LOG_FD if $GREP 'Manifest Tool' conftest.out > /dev/null; then lt_cv_path_mainfest_tool=yes fi rm -f conftest*]) if test yes != "$lt_cv_path_mainfest_tool"; then MANIFEST_TOOL=: fi _LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl ])# _LT_PATH_MANIFEST_TOOL # _LT_DLL_DEF_P([FILE]) # --------------------- # True iff FILE is a Windows DLL '.def' file. # Keep in sync with func_dll_def_p in the libtool script AC_DEFUN([_LT_DLL_DEF_P], [dnl test DEF = "`$SED -n dnl -e '\''s/^[[ ]]*//'\'' dnl Strip leading whitespace -e '\''/^\(;.*\)*$/d'\'' dnl Delete empty lines and comments -e '\''s/^\(EXPORTS\|LIBRARY\)\([[ ]].*\)*$/DEF/p'\'' dnl -e q dnl Only consider the first "real" line $1`" dnl ])# _LT_DLL_DEF_P # LT_LIB_M # -------- # check for math library AC_DEFUN([LT_LIB_M], [AC_REQUIRE([AC_CANONICAL_HOST])dnl LIBM= case $host in *-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) # These system don't have libm, or don't need it ;; *-ncr-sysv4.3*) AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw) AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") ;; *) AC_CHECK_LIB(m, cos, LIBM=-lm) ;; esac AC_SUBST([LIBM]) ])# LT_LIB_M # Old name: AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_CHECK_LIBM], []) # _LT_COMPILER_NO_RTTI([TAGNAME]) # ------------------------------- m4_defun([_LT_COMPILER_NO_RTTI], [m4_require([_LT_TAG_COMPILER])dnl _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= if test yes = "$GCC"; then case $cc_basename in nvcc*) _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; *) _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; esac _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], lt_cv_prog_compiler_rtti_exceptions, [-fno-rtti -fno-exceptions], [], [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) fi _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], [Compiler flag to turn off builtin functions]) ])# _LT_COMPILER_NO_RTTI # _LT_CMD_GLOBAL_SYMBOLS # ---------------------- m4_defun([_LT_CMD_GLOBAL_SYMBOLS], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([LT_PATH_NM])dnl AC_REQUIRE([LT_PATH_LD])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_TAG_COMPILER])dnl # Check for command to grab the raw symbol name followed by C symbol from nm. AC_MSG_CHECKING([command to parse $NM output from $compiler object]) AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], [ # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[[BCDEGRST]]' # Regexp to match symbols that can be accessed directly from C. sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' # Define system-specific variables. case $host_os in aix*) symcode='[[BCDT]]' ;; cygwin* | mingw* | pw32* | cegcc*) symcode='[[ABCDGISTW]]' ;; hpux*) if test ia64 = "$host_cpu"; then symcode='[[ABCDEGRST]]' fi ;; irix* | nonstopux*) symcode='[[BCDEGRST]]' ;; osf*) symcode='[[BCDEGQRST]]' ;; solaris*) symcode='[[BDRT]]' ;; sco3.2v5*) symcode='[[DT]]' ;; sysv4.2uw2*) symcode='[[DT]]' ;; sysv5* | sco5v6* | unixware* | OpenUNIX*) symcode='[[ABDT]]' ;; sysv4) symcode='[[DFNSTU]]' ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[[ABCDGIRSTW]]' ;; esac if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Gets list of data symbols to import. lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'" # Adjust the below global symbol transforms to fixup imported variables. lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" lt_c_name_lib_hook="\ -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\ -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'" else # Disable hooks by default. lt_cv_sys_global_symbol_to_import= lt_cdecl_hook= lt_c_name_hook= lt_c_name_lib_hook= fi # Transform an extracted symbol line into a proper C declaration. # Some systems (esp. on ia64) link data and code symbols differently, # so use this general approach. lt_cv_sys_global_symbol_to_cdecl="sed -n"\ $lt_cdecl_hook\ " -e 's/^T .* \(.*\)$/extern int \1();/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n"\ $lt_c_name_hook\ " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" # Transform an extracted symbol line into symbol name with lib prefix and # symbol address. lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\ $lt_c_name_lib_hook\ " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ " -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'" # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # Try without a prefix underscore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Fake it for dumpbin and say T for any non-static function, # D for any global variable and I for any imported variable. # Also find C++ and __fastcall symbols from MSVC++, # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK ['"\ " {last_section=section; section=\$ 3};"\ " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ " /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\ " /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\ " /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ " {if(hide[section]) next};"\ " {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\ " {split(\$ 0,a,/\||\r/); split(a[2],s)};"\ " s[1]~/^[@?]/{print f,s[1],s[1]; next};"\ " s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ " ' prfx=^$ac_symprfx]" else lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext <<_LT_EOF #ifdef __cplusplus extern "C" { #endif char nm_test_var; void nm_test_func(void); void nm_test_func(void){} #ifdef __cplusplus } #endif int main(){nm_test_var='a';nm_test_func();return(0);} _LT_EOF if AC_TRY_EVAL(ac_compile); then # Now try to grab the symbols. nlist=conftest.nm if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if $GREP ' nm_test_var$' "$nlist" >/dev/null; then if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ #if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE /* DATA imports from DLLs on WIN32 can't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT@&t@_DLSYM_CONST #elif defined __osf__ /* This system does not cope well with relocations in const data. */ # define LT@&t@_DLSYM_CONST #else # define LT@&t@_DLSYM_CONST const #endif #ifdef __cplusplus extern "C" { #endif _LT_EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' cat <<_LT_EOF >> conftest.$ac_ext /* The mapping between symbol names and symbols. */ LT@&t@_DLSYM_CONST struct { const char *name; void *address; } lt__PROGRAM__LTX_preloaded_symbols[[]] = { { "@PROGRAM@", (void *) 0 }, _LT_EOF $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext cat <<\_LT_EOF >> conftest.$ac_ext {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt__PROGRAM__LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif _LT_EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_globsym_save_LIBS=$LIBS lt_globsym_save_CFLAGS=$CFLAGS LIBS=conftstm.$ac_objext CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then pipe_works=yes fi LIBS=$lt_globsym_save_LIBS CFLAGS=$lt_globsym_save_CFLAGS else echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD fi else echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD cat conftest.$ac_ext >&5 fi rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test yes = "$pipe_works"; then break else lt_cv_sys_global_symbol_pipe= fi done ]) if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then AC_MSG_RESULT(failed) else AC_MSG_RESULT(ok) fi # Response file support. if test "$lt_cv_nm_interface" = "MS dumpbin"; then nm_file_list_spec='@' elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then nm_file_list_spec='@' fi _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], [Take the output of nm and produce a listing of raw symbols and C names]) _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], [Transform the output of nm in a proper C declaration]) _LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1], [Transform the output of nm into a list of symbols to manually relocate]) _LT_DECL([global_symbol_to_c_name_address], [lt_cv_sys_global_symbol_to_c_name_address], [1], [Transform the output of nm in a C name address pair]) _LT_DECL([global_symbol_to_c_name_address_lib_prefix], [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], [Transform the output of nm in a C name address pair when lib prefix is needed]) _LT_DECL([nm_interface], [lt_cv_nm_interface], [1], [The name lister interface]) _LT_DECL([], [nm_file_list_spec], [1], [Specify filename containing input files for $NM]) ]) # _LT_CMD_GLOBAL_SYMBOLS # _LT_COMPILER_PIC([TAGNAME]) # --------------------------- m4_defun([_LT_COMPILER_PIC], [m4_require([_LT_TAG_COMPILER])dnl _LT_TAGVAR(lt_prog_compiler_wl, $1)= _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)= m4_if([$1], [CXX], [ # C++ specific cases for pic, static, wl, etc. if test yes = "$GXX"; then _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the '-m68020' flag to GCC prevents building anything better, # like '-m68040'. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) case $host_os in os2*) _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' ;; esac ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; *djgpp*) # DJGPP does not support shared libraries at all _LT_TAGVAR(lt_prog_compiler_pic, $1)= ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. _LT_TAGVAR(lt_prog_compiler_static, $1)= ;; interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac else case $host_os in aix[[4-9]]*) # All AIX code is PIC. if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; chorus*) case $cc_basename in cxch68*) # Green Hills C++ Compiler # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" ;; esac ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; dgux*) case $cc_basename in ec++*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; ghcx*) # Green Hills C++ Compiler _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; freebsd* | dragonfly*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' if test ia64 != "$host_cpu"; then _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' fi ;; aCC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac ;; *) ;; esac ;; interix*) # This is c89, which is MS Visual C++ (no shared libs) # Anyone wants to do a port? ;; irix5* | irix6* | nonstopux*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' # CC pic flag -KPIC is the default. ;; *) ;; esac ;; linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in KCC*) # KAI C++ Compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; ecpc* ) # old Intel C++ for x86_64, which still supported -KPIC. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; icpc* ) # Intel C++, used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; pgCC* | pgcpp*) # Portland Group C++ compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; cxx*) # Compaq C++ # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL 8.0, 9.0 on PPC and BlueGene _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; esac ;; esac ;; lynxos*) ;; m88k*) ;; mvs*) case $cc_basename in cxx*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' ;; *) ;; esac ;; netbsd* | netbsdelf*-gnu) ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' ;; RCC*) # Rational C++ 2.4.1 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; cxx*) # Digital/Compaq C++ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; *) ;; esac ;; psos*) ;; solaris*) case $cc_basename in CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; gcx*) # Green Hills C++ Compiler _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' ;; *) ;; esac ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; lcc*) # Lucid _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; *) ;; esac ;; vxworks*) ;; *) _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ], [ if test yes = "$GCC"; then _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the '-m68020' flag to GCC prevents building anything better, # like '-m68040'. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) case $host_os in os2*) _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' ;; esac ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. _LT_TAGVAR(lt_prog_compiler_static, $1)= ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no enable_shared=no ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac case $cc_basename in nvcc*) # Cuda Compiler Driver 2.2 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" fi ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' case $cc_basename in nagfor*) # NAG Fortran compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; esac ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) case $host_os in os2*) _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' ;; esac ;; hpux9* | hpux10* | hpux11*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC (with -KPIC) is the default. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in # old Intel for x86_64, which still supported -KPIC. ecc*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. icc* | ifort*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; # Lahey Fortran 8.1. lf95*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' ;; nagfor*) # NAG Fortran compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; tcc*) # Fabrice Bellard et al's Tiny C Compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; ccc*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All Alpha code is PIC. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; xl* | bgxl* | bgf* | mpixl*) # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) # Sun Fortran 8.3 passes all unrecognized flags to the linker _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='' ;; *Sun\ F* | *Sun*Fortran*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; *Sun\ C*) # Sun C 5.9 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' ;; *Intel*\ [[CF]]*Compiler*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; *Portland\ Group*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; esac ;; esac ;; newsos6) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; osf3* | osf4* | osf5*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All OSF/1 code is PIC. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; rdos*) _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; solaris*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' case $cc_basename in f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; *) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; esac ;; sunos4*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; unicos*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; uts4*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; *) _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ]) case $host_os in # For platforms that do not support PIC, -DPIC is meaningless: *djgpp*) _LT_TAGVAR(lt_prog_compiler_pic, $1)= ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" ;; esac AC_CACHE_CHECK([for $compiler option to produce PIC], [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) _LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) # # Check to make sure the PIC flag actually works. # if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in "" | " "*) ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; esac], [_LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) fi _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], [Additional compiler flags for building library objects]) _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], [How to pass a linker flag through the compiler]) # # Check to make sure the static flag actually works. # wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), $lt_tmp_static_flag, [], [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], [Compiler flag to prevent dynamic linking]) ])# _LT_COMPILER_PIC # _LT_LINKER_SHLIBS([TAGNAME]) # ---------------------------- # See if the linker supports building shared libraries. m4_defun([_LT_LINKER_SHLIBS], [AC_REQUIRE([LT_PATH_LD])dnl AC_REQUIRE([LT_PATH_NM])dnl m4_require([_LT_PATH_MANIFEST_TOOL])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl m4_require([_LT_TAG_COMPILER])dnl AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) m4_if([$1], [CXX], [ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] case $host_os in aix[[4-9]]*) # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to GNU nm, but means don't demangle to AIX nm. # Without the "-l" option, or with the "-B" option, AIX nm treats # weak defined symbols like other global defined symbols, whereas # GNU nm marks them as "W". # While the 'weak' keyword is ignored in the Export File, we need # it in the Import File for the 'aix-soname' feature, so we have # to replace the "-B" option with "-P" for AIX nm. if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' else _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' fi ;; pw32*) _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds ;; cygwin* | mingw* | cegcc*) case $cc_basename in cl*) _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' ;; *) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] ;; esac ;; linux* | k*bsd*-gnu | gnu*) _LT_TAGVAR(link_all_deplibs, $1)=no ;; *) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; esac ], [ runpath_var= _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_cmds, $1)= _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(compiler_needs_object, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(old_archive_from_new_cmds, $1)= _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= _LT_TAGVAR(thread_safe_flag_spec, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list _LT_TAGVAR(include_expsyms, $1)= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ' (' and ')$', so one must not match beginning or # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc', # as well as any symbol that contains 'd'. _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. # Exclude shared library initialization/finalization symbols. dnl Note also adjust exclude_expsyms for C++ above. extract_expsyms_cmds= case $host_os in cygwin* | mingw* | pw32* | cegcc*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test yes != "$GCC"; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd* | bitrig*) with_gnu_ld=no ;; linux* | k*bsd*-gnu | gnu*) _LT_TAGVAR(link_all_deplibs, $1)=no ;; esac _LT_TAGVAR(ld_shlibs, $1)=yes # On some targets, GNU ld is compatible enough with the native linker # that we're better off using the native interface for both. lt_use_gnu_ld_interface=no if test yes = "$with_gnu_ld"; then case $host_os in aix*) # The AIX port of GNU ld has always aspired to compatibility # with the native linker. However, as the warning in the GNU ld # block says, versions before 2.19.5* couldn't really create working # shared libraries, regardless of the interface used. case `$LD -v 2>&1` in *\ \(GNU\ Binutils\)\ 2.19.5*) ;; *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; *) lt_use_gnu_ld_interface=yes ;; esac ;; *) lt_use_gnu_ld_interface=yes ;; esac fi if test yes = "$lt_use_gnu_ld_interface"; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='$wl' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' else _LT_TAGVAR(whole_archive_flag_spec, $1)= fi supports_anon_versioning=no case `$LD -v | $SED -e 's/([^)]\+)\s\+//' 2>&1` in *GNU\ gold*) supports_anon_versioning=yes ;; *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix[[3-9]]*) # On AIX/PPC, the GNU linker is very broken if test ia64 != "$host_cpu"; then _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: the GNU linker, at least up to release 2.19, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to install binutils *** 2.20 or above, or modify your PATH so that a non-GNU linker is found. *** You will then need to restart the configuration process. _LT_EOF fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='' ;; m68k) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; cygwin* | mingw* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file, use it as # is; otherwise, prepend EXPORTS... _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; haiku*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(link_all_deplibs, $1)=yes ;; os2*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)=unsupported shrext_cmds=.dll _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ prefix_cmds="$SED"~ if test EXPORTS = "`$SED 1q $export_symbols`"; then prefix_cmds="$prefix_cmds -e 1d"; fi~ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; interix[[3-9]]*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) tmp_diet=no if test linux-dietlibc = "$host_os"; then case $cc_basename in diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) esac fi if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test no = "$tmp_diet" then tmp_addflag=' $pic_flag' tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group f77 and f90 compilers _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; lf95*) # Lahey Fortran 8.1 _LT_TAGVAR(whole_archive_flag_spec, $1)= tmp_sharedflag='--shared' ;; nagfor*) # NAGFOR 5.3 tmp_sharedflag='-Wl,-shared' ;; xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; nvcc*) # Cuda Compiler Driver 2.2 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; esac _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' if test yes = "$supports_anon_versioning"; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' fi case $cc_basename in tcc*) _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic' ;; xlf* | bgf* | bgxlf* | mpixlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test yes = "$supports_anon_versioning"; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; sunos4*) _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then runpath_var= _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. _LT_TAGVAR(hardcode_minus_L, $1)=yes if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. _LT_TAGVAR(hardcode_direct, $1)=unsupported fi ;; aix[[4-9]]*) if test ia64 = "$host_cpu"; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag= else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to GNU nm, but means don't demangle to AIX nm. # Without the "-l" option, or with the "-B" option, AIX nm treats # weak defined symbols like other global defined symbols, whereas # GNU nm marks them as "W". # While the 'weak' keyword is ignored in the Export File, we need # it in the Import File for the 'aix-soname' feature, so we have # to replace the "-B" option with "-P" for AIX nm. if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' else _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # have runtime linking enabled, and use it for executables. # For shared libraries, we enable/disable runtime linking # depending on the kind of the shared library created - # when "with_aix_soname,aix_use_runtimelinking" is: # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables # "aix,yes" lib.so shared, rtl:yes, for executables # lib.a static archive # "both,no" lib.so.V(shr.o) shared, rtl:yes # lib.a(lib.so.V) shared, rtl:no, for executables # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a(lib.so.V) shared, rtl:no # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a static archive case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) for ld_flag in $LDFLAGS; do if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then aix_use_runtimelinking=yes break fi done if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then # With aix-soname=svr4, we create the lib.so.V shared archives only, # so we don't have lib.a shared libs to link our executables. # We have to force runtime linking in this case. aix_use_runtimelinking=yes LDFLAGS="$LDFLAGS -Wl,-brtl" fi ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_TAGVAR(archive_cmds, $1)='' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(file_list_spec, $1)='$wl-f,' case $with_aix_soname,$aix_use_runtimelinking in aix,*) ;; # traditional, no import file svr4,* | *,yes) # use import file # The Import File defines what to hardcode. _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no ;; esac if test yes = "$GCC"; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`$CC -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 _LT_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)= fi ;; esac shared_flag='-shared' if test yes = "$aix_use_runtimelinking"; then shared_flag="$shared_flag "'$wl-G' fi # Need to ensure runtime linking is disabled for the traditional # shared library, or the linker may eventually find shared libraries # /with/ Import File - we do not want to mix them. shared_flag_aix='-shared' shared_flag_svr4='-shared $wl-G' else # not using gcc if test ia64 = "$host_cpu"; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test yes = "$aix_use_runtimelinking"; then shared_flag='$wl-G' else shared_flag='$wl-bM:SRE' fi shared_flag_aix='$wl-bM:SRE' shared_flag_svr4='$wl-G' fi fi _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. _LT_TAGVAR(always_export_symbols, $1)=yes if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag else if test ia64 = "$host_cpu"; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' if test yes = "$with_gnu_ld"; then # We only use this code for GNU lds that support --whole-archive. _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' fi _LT_TAGVAR(archive_cmds_need_lc, $1)=yes _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' # -brtl affects multiple linker settings, -berok does not and is overridden later compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' if test svr4 != "$with_aix_soname"; then # This is similar to how AIX traditionally builds its shared libraries. _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' fi if test aix != "$with_aix_soname"; then _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' else # used by -dlpreopen to get the symbols _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' fi _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' fi fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='' ;; m68k) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac ;; bsdi[[45]]*) _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic ;; cygwin* | mingw* | pw32* | cegcc*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. case $cc_basename in cl*) # Native MSVC _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(file_list_spec, $1)='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=.dll # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then cp "$export_symbols" "$output_objdir/$soname.def"; echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; else $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' # Don't use ranlib _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile=$lt_outputfile.exe lt_tool_outputfile=$lt_tool_outputfile.exe ;; esac~ if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # Assume MSVC wrapper _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=.dll # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' # FIXME: Should let the user specify the lib program. _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; esac ;; darwin* | rhapsody*) _LT_DARWIN_LINKER_FEATURES($1) ;; dgux*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2.*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; hpux9*) if test yes = "$GCC"; then _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' else _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_direct, $1)=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' ;; hpux10*) if test yes,no = "$GCC,$with_gnu_ld"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test no = "$with_gnu_ld"; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes fi ;; hpux11*) if test yes,no = "$GCC,$with_gnu_ld"; then case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) m4_if($1, [], [ # Older versions of the 11.00 compiler do not understand -b yet # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) _LT_LINKER_OPTION([if $CC understands -b], _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) ;; esac fi if test no = "$with_gnu_ld"; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test yes = "$GCC"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. # This should be the same for all languages, so no per-tag cache variable. AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], [lt_cv_irix_exported_symbol], [save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" AC_LINK_IFELSE( [AC_LANG_SOURCE( [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], [C++], [[int foo (void) { return 0; }]], [Fortran 77], [[ subroutine foo end]], [Fortran], [[ subroutine foo end]])])], [lt_cv_irix_exported_symbol=yes], [lt_cv_irix_exported_symbol=no]) LDFLAGS=$save_LDFLAGS]) if test yes = "$lt_cv_irix_exported_symbol"; then _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib' fi _LT_TAGVAR(link_all_deplibs, $1)=no else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(inherit_rpath, $1)=yes _LT_TAGVAR(link_all_deplibs, $1)=yes ;; linux*) case $cc_basename in tcc*) # Fabrice Bellard et al's Tiny C Compiler _LT_TAGVAR(ld_shlibs, $1)=yes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; newsos6) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *nto* | *qnx*) ;; openbsd* | bitrig*) if test -f /usr/libexec/ld.so; then _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=yes if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' fi else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; os2*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)=unsupported shrext_cmds=.dll _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ prefix_cmds="$SED"~ if test EXPORTS = "`$SED 1q $export_symbols`"; then prefix_cmds="$prefix_cmds -e 1d"; fi~ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; osf3*) if test yes = "$GCC"; then _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' else _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test yes = "$GCC"; then _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $pic_flag $libobjs $deplibs $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' else _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $wl-input $wl$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~$RM $lib.exp' # Both c and cxx compiler support -rpath directly _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_separator, $1)=: ;; solaris*) _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' if test yes = "$GCC"; then wlarc='$wl' _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) wlarc='' _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' ;; *) wlarc='$wl' _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ;; esac fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands '-z linker_flag'. GCC discards it without '$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test yes = "$GCC"; then _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' else _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' fi ;; esac _LT_TAGVAR(link_all_deplibs, $1)=yes ;; sunos4*) if test sequent = "$host_vendor"; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4) case $host_vendor in sni) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' _LT_TAGVAR(hardcode_direct, $1)=no ;; motorola) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4.3*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes _LT_TAGVAR(ld_shlibs, $1)=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' if test yes = "$GCC"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We CANNOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' runpath_var='LD_RUN_PATH' if test yes = "$GCC"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(ld_shlibs, $1)=no ;; esac if test sni = "$host_vendor"; then case $host in sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym' ;; esac fi fi ]) AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl _LT_DECL([], [extract_expsyms_cmds], [2], [The commands to extract the exported symbol list from a shared archive]) # # Do we need to explicitly link libc? # case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in x|xyes) # Assume -lc should be added _LT_TAGVAR(archive_cmds_need_lc, $1)=yes if test yes,yes = "$GCC,$enable_shared"; then case $_LT_TAGVAR(archive_cmds, $1) in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. AC_CACHE_CHECK([whether -lc should be explicitly linked in], [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), [$RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if AC_TRY_EVAL(ac_compile) 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) _LT_TAGVAR(allow_undefined_flag, $1)= if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) then lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no else lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes fi _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* ]) _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) ;; esac fi ;; esac _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], [Whether or not to add -lc for building shared libraries]) _LT_TAGDECL([allow_libtool_libs_with_static_runtimes], [enable_shared_with_static_runtimes], [0], [Whether or not to disallow shared libs when runtime libs are static]) _LT_TAGDECL([], [export_dynamic_flag_spec], [1], [Compiler flag to allow reflexive dlopens]) _LT_TAGDECL([], [whole_archive_flag_spec], [1], [Compiler flag to generate shared objects directly from archives]) _LT_TAGDECL([], [compiler_needs_object], [1], [Whether the compiler copes with passing no objects directly]) _LT_TAGDECL([], [old_archive_from_new_cmds], [2], [Create an old-style archive from a shared archive]) _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], [Create a temporary old-style archive to link instead of a shared archive]) _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) _LT_TAGDECL([], [archive_expsym_cmds], [2]) _LT_TAGDECL([], [module_cmds], [2], [Commands used to build a loadable module if different from building a shared archive.]) _LT_TAGDECL([], [module_expsym_cmds], [2]) _LT_TAGDECL([], [with_gnu_ld], [1], [Whether we are building with GNU ld or not]) _LT_TAGDECL([], [allow_undefined_flag], [1], [Flag that allows shared libraries with undefined symbols to be built]) _LT_TAGDECL([], [no_undefined_flag], [1], [Flag that enforces no undefined symbols]) _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], [Flag to hardcode $libdir into a binary during linking. This must work even if $libdir does not exist]) _LT_TAGDECL([], [hardcode_libdir_separator], [1], [Whether we need a single "-rpath" flag with a separated argument]) _LT_TAGDECL([], [hardcode_direct], [0], [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_direct_absolute], [0], [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes DIR into the resulting binary and the resulting library dependency is "absolute", i.e impossible to change by setting $shlibpath_var if the library is relocated]) _LT_TAGDECL([], [hardcode_minus_L], [0], [Set to "yes" if using the -LDIR flag during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_shlibpath_var], [0], [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_automatic], [0], [Set to "yes" if building a shared library automatically hardcodes DIR into the library and all subsequent libraries and executables linked against it]) _LT_TAGDECL([], [inherit_rpath], [0], [Set to yes if linker adds runtime paths of dependent libraries to runtime path list]) _LT_TAGDECL([], [link_all_deplibs], [0], [Whether libtool must link a program against all its dependency libraries]) _LT_TAGDECL([], [always_export_symbols], [0], [Set to "yes" if exported symbols are required]) _LT_TAGDECL([], [export_symbols_cmds], [2], [The commands to list exported symbols]) _LT_TAGDECL([], [exclude_expsyms], [1], [Symbols that should not be listed in the preloaded symbols]) _LT_TAGDECL([], [include_expsyms], [1], [Symbols that must always be exported]) _LT_TAGDECL([], [prelink_cmds], [2], [Commands necessary for linking programs (against libraries) with templates]) _LT_TAGDECL([], [postlink_cmds], [2], [Commands necessary for finishing linking programs]) _LT_TAGDECL([], [file_list_spec], [1], [Specify filename containing input files]) dnl FIXME: Not yet implemented dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], dnl [Compiler flag to generate thread safe objects]) ])# _LT_LINKER_SHLIBS # _LT_LANG_C_CONFIG([TAG]) # ------------------------ # Ensure that the configuration variables for a C compiler are suitably # defined. These variables are subsequently used by _LT_CONFIG to write # the compiler configuration to 'libtool'. m4_defun([_LT_LANG_C_CONFIG], [m4_require([_LT_DECL_EGREP])dnl lt_save_CC=$CC AC_LANG_PUSH(C) # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}' _LT_TAG_COMPILER # Save the default compiler, since it gets overwritten when the other # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. compiler_DEFAULT=$CC # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) LT_SYS_DLOPEN_SELF _LT_CMD_STRIPLIB # Report what library types will actually be built AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test no = "$can_build_shared" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test yes = "$enable_shared" && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test ia64 != "$host_cpu"; then case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in yes,aix,yes) ;; # shared object as lib.so file only yes,svr4,*) ;; # shared object as lib.so archive member only yes,*) enable_static=no ;; # shared object in lib.a archive as well esac fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test yes = "$enable_shared" || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_CONFIG($1) fi AC_LANG_POP CC=$lt_save_CC ])# _LT_LANG_C_CONFIG # _LT_LANG_CXX_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for a C++ compiler are suitably # defined. These variables are subsequently used by _LT_CONFIG to write # the compiler configuration to 'libtool'. m4_defun([_LT_LANG_CXX_CONFIG], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_PATH_MANIFEST_TOOL])dnl if test -n "$CXX" && ( test no != "$CXX" && ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) || (test g++ != "$CXX"))); then AC_PROG_CXXCPP else _lt_caught_CXX_error=yes fi AC_LANG_PUSH(C++) _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(compiler_needs_object, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for C++ test sources. ac_ext=cpp # Object file extension for compiled C++ test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the CXX compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test yes != "$_lt_caught_CXX_error"; then # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_LD=$LD lt_save_GCC=$GCC GCC=$GXX lt_save_with_gnu_ld=$with_gnu_ld lt_save_path_LD=$lt_cv_path_LD if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx else $as_unset lt_cv_prog_gnu_ld fi if test -n "${lt_cv_path_LDCXX+set}"; then lt_cv_path_LD=$lt_cv_path_LDCXX else $as_unset lt_cv_path_LD fi test -z "${LDCXX+set}" || LD=$LDCXX CC=${CXX-"c++"} CFLAGS=$CXXFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) if test -n "$compiler"; then # We don't want -fno-exception when compiling C++ code, so set the # no_builtin_flag separately if test yes = "$GXX"; then _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' else _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= fi if test yes = "$GXX"; then # Set up default GNU C++ configuration LT_PATH_LD # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. if test yes = "$with_gnu_ld"; then _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' # If archive_cmds runs LD, not CC, wlarc should be empty # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to # investigate it a little bit more. (MM) wlarc='$wl' # ancient GNU ld didn't support --whole-archive et. al. if eval "`$CC -print-prog-name=ld` --help 2>&1" | $GREP 'no-whole-archive' > /dev/null; then _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' else _LT_TAGVAR(whole_archive_flag_spec, $1)= fi else with_gnu_ld=no wlarc= # A generic and very simple default shared library creation # command for GNU C++ for the case where it uses the native # linker, instead of GNU ld. If possible, this setting should # overridden to take advantage of the native linker features on # the platform it is being used on. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else GXX=no with_gnu_ld=no wlarc= fi # PORTME: fill in a description of your system's C++ link characteristics AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) _LT_TAGVAR(ld_shlibs, $1)=yes case $host_os in aix3*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aix[[4-9]]*) if test ia64 = "$host_cpu"; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag= else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # have runtime linking enabled, and use it for executables. # For shared libraries, we enable/disable runtime linking # depending on the kind of the shared library created - # when "with_aix_soname,aix_use_runtimelinking" is: # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables # "aix,yes" lib.so shared, rtl:yes, for executables # lib.a static archive # "both,no" lib.so.V(shr.o) shared, rtl:yes # lib.a(lib.so.V) shared, rtl:no, for executables # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a(lib.so.V) shared, rtl:no # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a static archive case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) for ld_flag in $LDFLAGS; do case $ld_flag in *-brtl*) aix_use_runtimelinking=yes break ;; esac done if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then # With aix-soname=svr4, we create the lib.so.V shared archives only, # so we don't have lib.a shared libs to link our executables. # We have to force runtime linking in this case. aix_use_runtimelinking=yes LDFLAGS="$LDFLAGS -Wl,-brtl" fi ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_TAGVAR(archive_cmds, $1)='' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(file_list_spec, $1)='$wl-f,' case $with_aix_soname,$aix_use_runtimelinking in aix,*) ;; # no import file svr4,* | *,yes) # use import file # The Import File defines what to hardcode. _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no ;; esac if test yes = "$GXX"; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`$CC -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 _LT_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)= fi esac shared_flag='-shared' if test yes = "$aix_use_runtimelinking"; then shared_flag=$shared_flag' $wl-G' fi # Need to ensure runtime linking is disabled for the traditional # shared library, or the linker may eventually find shared libraries # /with/ Import File - we do not want to mix them. shared_flag_aix='-shared' shared_flag_svr4='-shared $wl-G' else # not using gcc if test ia64 = "$host_cpu"; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test yes = "$aix_use_runtimelinking"; then shared_flag='$wl-G' else shared_flag='$wl-bM:SRE' fi shared_flag_aix='$wl-bM:SRE' shared_flag_svr4='$wl-G' fi fi _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to # export. _LT_TAGVAR(always_export_symbols, $1)=yes if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. # The "-G" linker flag allows undefined symbols. _LT_TAGVAR(no_undefined_flag, $1)='-bernotok' # Determine the default libpath from the value encoded in an empty # executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag else if test ia64 = "$host_cpu"; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' if test yes = "$with_gnu_ld"; then # We only use this code for GNU lds that support --whole-archive. _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' fi _LT_TAGVAR(archive_cmds_need_lc, $1)=yes _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' # -brtl affects multiple linker settings, -berok does not and is overridden later compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' if test svr4 != "$with_aix_soname"; then # This is similar to how AIX traditionally builds its shared # libraries. Need -bnortl late, we may have -brtl in LDFLAGS. _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' fi if test aix != "$with_aix_soname"; then _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' else # used by -dlpreopen to get the symbols _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' fi _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' fi fi ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; chorus*) case $cc_basename in *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; cygwin* | mingw* | pw32* | cegcc*) case $GXX,$cc_basename in ,cl* | no,cl*) # Native MSVC # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(file_list_spec, $1)='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=.dll # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then cp "$export_symbols" "$output_objdir/$soname.def"; echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; else $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes # Don't use ranlib _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile=$lt_outputfile.exe lt_tool_outputfile=$lt_tool_outputfile.exe ;; esac~ func_to_tool_file "$lt_outputfile"~ if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # g++ # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file, use it as # is; otherwise, prepend EXPORTS... _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; darwin* | rhapsody*) _LT_DARWIN_LINKER_FEATURES($1) ;; os2*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)=unsupported shrext_cmds=.dll _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ prefix_cmds="$SED"~ if test EXPORTS = "`$SED 1q $export_symbols`"; then prefix_cmds="$prefix_cmds -e 1d"; fi~ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; dgux*) case $cc_basename in ec++*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; ghcx*) # Green Hills C++ Compiler # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; freebsd2.*) # C++ shared libraries reported to be fairly broken before # switch to ELF _LT_TAGVAR(ld_shlibs, $1)=no ;; freebsd-elf*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; freebsd* | dragonfly*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions _LT_TAGVAR(ld_shlibs, $1)=yes ;; haiku*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(link_all_deplibs, $1)=yes ;; hpux9*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aCC*) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test yes = "$GXX"; then _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; hpux10*|hpux11*) if test no = "$with_gnu_ld"; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) ;; *) _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' ;; esac fi case $host_cpu in hppa*64*|ia64*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. ;; esac case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aCC*) case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test yes = "$GXX"; then if test no = "$with_gnu_ld"; then case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac fi else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; interix[[3-9]]*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; irix5* | irix6*) case $cc_basename in CC*) # SGI C++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' # Archives containing C++ object files must be created using # "CC -ar", where "CC" is the IRIX C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' ;; *) if test yes = "$GXX"; then if test no = "$with_gnu_ld"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` -o $lib' fi fi _LT_TAGVAR(link_all_deplibs, $1)=yes ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(inherit_rpath, $1)=yes ;; linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib $wl-retain-symbols-file,$export_symbols; mv \$templib $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; icpc* | ecpc* ) # Intel C++ with_gnu_ld=yes # version 8.0 and above of icpc choke on multiply defined symbols # if we add $predep_objects and $postdep_objects, however 7.1 and # earlier do not add the objects themselves. case `$CC -V 2>&1` in *"Version 7."*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 8.0 or newer tmp_idyn= case $host_cpu in ia64*) tmp_idyn=' -i_dynamic';; esac _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' ;; esac _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' ;; pgCC* | pgcpp*) # Portland Group C++ compiler case `$CC -V` in *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ $RANLIB $oldlib' _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 6 and above use weak symbols _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' ;; cxx*) # Compaq C++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib $wl-retain-symbols-file $wl$export_symbols' runpath_var=LD_RUN_PATH _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed' ;; xl* | mpixl* | bgxl*) # IBM XL 8.0 on PPC, with GNU ld _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' if test yes = "$supports_anon_versioning"; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' fi ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file $wl$export_symbols' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes # Not sure whether something based on # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 # would be better. output_verbose_link_cmd='func_echo_all' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; esac ;; esac ;; lynxos*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; m88k*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; mvs*) case $cc_basename in cxx*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' wlarc= _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no fi # Workaround some broken pre-1.5 toolchains output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' ;; *nto* | *qnx*) _LT_TAGVAR(ld_shlibs, $1)=yes ;; openbsd* | bitrig*) if test -f /usr/libexec/ld.so; then _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file,$export_symbols -o $lib' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' fi output_verbose_link_cmd=func_echo_all else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Archives containing C++ object files must be created using # the KAI C++ compiler. case $host in osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; esac ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; cxx*) case $host in osf3*) _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $soname `test -n "$verstring" && func_echo_all "$wl-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' ;; *) _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ echo "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname $wl-input $wl$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~ $RM $lib.exp' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' ;; esac _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test yes,no = "$GXX,$with_gnu_ld"; then _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' case $host in osf3*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; psos*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; lcc*) # Lucid # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; solaris*) case $cc_basename in CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_TAGVAR(archive_cmds_need_lc,$1)=yes _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G$allow_undefined_flag $wl-M $wl$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands '-z linker_flag'. # Supported since Solaris 2.6 (maybe 2.5.1?) _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; esac _LT_TAGVAR(link_all_deplibs, $1)=yes output_verbose_link_cmd='func_echo_all' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; gcx*) # Green Hills C++ Compiler _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' # The C++ compiler must be used to create the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' ;; *) # GNU C++ compiler with Solaris linker if test yes,no = "$GXX,$with_gnu_ld"; then _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs' if $CC --version | $GREP -v '^2\.7' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else # g++ 2.7 appears to require '-G' NOT '-shared' on this # platform. _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir' case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' ;; esac fi ;; esac ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We CANNOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ '"$_LT_TAGVAR(old_archive_cmds, $1)" _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ '"$_LT_TAGVAR(reload_cmds, $1)" ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; vxworks*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no _LT_TAGVAR(GCC, $1)=$GXX _LT_TAGVAR(LD, $1)=$LD ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_SYS_HIDDEN_LIBDEPS($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS LDCXX=$LD LD=$lt_save_LD GCC=$lt_save_GCC with_gnu_ld=$lt_save_with_gnu_ld lt_cv_path_LDCXX=$lt_cv_path_LD lt_cv_path_LD=$lt_save_path_LD lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld fi # test yes != "$_lt_caught_CXX_error" AC_LANG_POP ])# _LT_LANG_CXX_CONFIG # _LT_FUNC_STRIPNAME_CNF # ---------------------- # func_stripname_cnf prefix suffix name # strip PREFIX and SUFFIX off of NAME. # PREFIX and SUFFIX must not contain globbing or regex special # characters, hashes, percent signs, but SUFFIX may contain a leading # dot (in which case that matches only a dot). # # This function is identical to the (non-XSI) version of func_stripname, # except this one can be used by m4 code that may be executed by configure, # rather than the libtool script. m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl AC_REQUIRE([_LT_DECL_SED]) AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) func_stripname_cnf () { case @S|@2 in .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;; *) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;; esac } # func_stripname_cnf ])# _LT_FUNC_STRIPNAME_CNF # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) # --------------------------------- # Figure out "hidden" library dependencies from verbose # compiler output when linking a shared library. # Parse the compiler output and extract the necessary # objects, libraries and library flags. m4_defun([_LT_SYS_HIDDEN_LIBDEPS], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl # Dependencies to place before and after the object being linked: _LT_TAGVAR(predep_objects, $1)= _LT_TAGVAR(postdep_objects, $1)= _LT_TAGVAR(predeps, $1)= _LT_TAGVAR(postdeps, $1)= _LT_TAGVAR(compiler_lib_search_path, $1)= dnl we can't use the lt_simple_compile_test_code here, dnl because it contains code intended for an executable, dnl not a library. It's possible we should let each dnl tag define a new lt_????_link_test_code variable, dnl but it's only used here... m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF int a; void foo (void) { a = 0; } _LT_EOF ], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF class Foo { public: Foo (void) { a = 0; } private: int a; }; _LT_EOF ], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF subroutine foo implicit none integer*4 a a=0 return end _LT_EOF ], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF subroutine foo implicit none integer a a=0 return end _LT_EOF ], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF public class foo { private int a; public void bar (void) { a = 0; } }; _LT_EOF ], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF package foo func foo() { } _LT_EOF ]) _lt_libdeps_save_CFLAGS=$CFLAGS case "$CC $CFLAGS " in #( *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; *\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; esac dnl Parse the compiler output and extract the necessary dnl objects, libraries and library flags. if AC_TRY_EVAL(ac_compile); then # Parse the compiler output and extract the necessary # objects, libraries and library flags. # Sentinel used to keep track of whether or not we are before # the conftest object file. pre_test_object_deps_done=no for p in `eval "$output_verbose_link_cmd"`; do case $prev$p in -L* | -R* | -l*) # Some compilers place space between "-{L,R}" and the path. # Remove the space. if test x-L = "$p" || test x-R = "$p"; then prev=$p continue fi # Expand the sysroot to ease extracting the directories later. if test -z "$prev"; then case $p in -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; esac fi case $p in =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; esac if test no = "$pre_test_object_deps_done"; then case $prev in -L | -R) # Internal compiler library paths should come after those # provided the user. The postdeps already come after the # user supplied libs so there is no need to process them. if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p else _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p" fi ;; # The "-l" case would never come before the object being # linked, so don't bother handling this case. esac else if test -z "$_LT_TAGVAR(postdeps, $1)"; then _LT_TAGVAR(postdeps, $1)=$prev$p else _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p" fi fi prev= ;; *.lto.$objext) ;; # Ignore GCC LTO objects *.$objext) # This assumes that the test object file only shows up # once in the compiler output. if test "$p" = "conftest.$objext"; then pre_test_object_deps_done=yes continue fi if test no = "$pre_test_object_deps_done"; then if test -z "$_LT_TAGVAR(predep_objects, $1)"; then _LT_TAGVAR(predep_objects, $1)=$p else _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" fi else if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then _LT_TAGVAR(postdep_objects, $1)=$p else _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" fi fi ;; *) ;; # Ignore the rest. esac done # Clean up. rm -f a.out a.exe else echo "libtool.m4: error: problem compiling $1 test program" fi $RM -f confest.$objext CFLAGS=$_lt_libdeps_save_CFLAGS # PORTME: override above test on systems where it is broken m4_if([$1], [CXX], [case $host_os in interix[[3-9]]*) # Interix 3.5 installs completely hosed .la files for C++, so rather than # hack all around it, let's just trust "g++" to DTRT. _LT_TAGVAR(predep_objects,$1)= _LT_TAGVAR(postdep_objects,$1)= _LT_TAGVAR(postdeps,$1)= ;; esac ]) case " $_LT_TAGVAR(postdeps, $1) " in *" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; esac _LT_TAGVAR(compiler_lib_search_dirs, $1)= if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | $SED -e 's! -L! !g' -e 's!^ !!'` fi _LT_TAGDECL([], [compiler_lib_search_dirs], [1], [The directories searched by this compiler when creating a shared library]) _LT_TAGDECL([], [predep_objects], [1], [Dependencies to place before and after the objects being linked to create a shared library]) _LT_TAGDECL([], [postdep_objects], [1]) _LT_TAGDECL([], [predeps], [1]) _LT_TAGDECL([], [postdeps], [1]) _LT_TAGDECL([], [compiler_lib_search_path], [1], [The library search path used internally by the compiler when linking a shared library]) ])# _LT_SYS_HIDDEN_LIBDEPS # _LT_LANG_F77_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for a Fortran 77 compiler are # suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to 'libtool'. m4_defun([_LT_LANG_F77_CONFIG], [AC_LANG_PUSH(Fortran 77) if test -z "$F77" || test no = "$F77"; then _lt_disable_F77=yes fi _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for f77 test sources. ac_ext=f # Object file extension for compiled f77 test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the F77 compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test yes != "$_lt_disable_F77"; then # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t return end " # Code to be used in simple link tests lt_simple_link_test_code="\ program t end " # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_GCC=$GCC lt_save_CFLAGS=$CFLAGS CC=${F77-"f77"} CFLAGS=$FFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) GCC=$G77 if test -n "$compiler"; then AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test no = "$can_build_shared" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test yes = "$enable_shared" && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test ia64 != "$host_cpu"; then case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in yes,aix,yes) ;; # shared object as lib.so file only yes,svr4,*) ;; # shared object as lib.so archive member only yes,*) enable_static=no ;; # shared object in lib.a archive as well esac fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test yes = "$enable_shared" || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_TAGVAR(GCC, $1)=$G77 _LT_TAGVAR(LD, $1)=$LD ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS fi # test yes != "$_lt_disable_F77" AC_LANG_POP ])# _LT_LANG_F77_CONFIG # _LT_LANG_FC_CONFIG([TAG]) # ------------------------- # Ensure that the configuration variables for a Fortran compiler are # suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to 'libtool'. m4_defun([_LT_LANG_FC_CONFIG], [AC_LANG_PUSH(Fortran) if test -z "$FC" || test no = "$FC"; then _lt_disable_FC=yes fi _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for fc test sources. ac_ext=${ac_fc_srcext-f} # Object file extension for compiled fc test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the FC compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test yes != "$_lt_disable_FC"; then # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t return end " # Code to be used in simple link tests lt_simple_link_test_code="\ program t end " # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_GCC=$GCC lt_save_CFLAGS=$CFLAGS CC=${FC-"f95"} CFLAGS=$FCFLAGS compiler=$CC GCC=$ac_cv_fc_compiler_gnu _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) if test -n "$compiler"; then AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test no = "$can_build_shared" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test yes = "$enable_shared" && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test ia64 != "$host_cpu"; then case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in yes,aix,yes) ;; # shared object as lib.so file only yes,svr4,*) ;; # shared object as lib.so archive member only yes,*) enable_static=no ;; # shared object in lib.a archive as well esac fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test yes = "$enable_shared" || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu _LT_TAGVAR(LD, $1)=$LD ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_SYS_HIDDEN_LIBDEPS($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS fi # test yes != "$_lt_disable_FC" AC_LANG_POP ])# _LT_LANG_FC_CONFIG # _LT_LANG_GCJ_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for the GNU Java Compiler compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to 'libtool'. m4_defun([_LT_LANG_GCJ_CONFIG], [AC_REQUIRE([LT_PROG_GCJ])dnl AC_LANG_SAVE # Source file extension for Java test sources. ac_ext=java # Object file extension for compiled Java test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="class foo {}" # Code to be used in simple link tests lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC=yes CC=${GCJ-"gcj"} CFLAGS=$GCJFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_TAGVAR(LD, $1)=$LD _LT_CC_BASENAME([$compiler]) # GCJ did not exist at the time GCC didn't implicitly link libc in. _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi AC_LANG_RESTORE GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_GCJ_CONFIG # _LT_LANG_GO_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for the GNU Go compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to 'libtool'. m4_defun([_LT_LANG_GO_CONFIG], [AC_REQUIRE([LT_PROG_GO])dnl AC_LANG_SAVE # Source file extension for Go test sources. ac_ext=go # Object file extension for compiled Go test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="package main; func main() { }" # Code to be used in simple link tests lt_simple_link_test_code='package main; func main() { }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC=yes CC=${GOC-"gccgo"} CFLAGS=$GOFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_TAGVAR(LD, $1)=$LD _LT_CC_BASENAME([$compiler]) # Go did not exist at the time GCC didn't implicitly link libc in. _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi AC_LANG_RESTORE GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_GO_CONFIG # _LT_LANG_RC_CONFIG([TAG]) # ------------------------- # Ensure that the configuration variables for the Windows resource compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to 'libtool'. m4_defun([_LT_LANG_RC_CONFIG], [AC_REQUIRE([LT_PROG_RC])dnl AC_LANG_SAVE # Source file extension for RC test sources. ac_ext=rc # Object file extension for compiled RC test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' # Code to be used in simple link tests lt_simple_link_test_code=$lt_simple_compile_test_code # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC= CC=${RC-"windres"} CFLAGS= compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes if test -n "$compiler"; then : _LT_CONFIG($1) fi GCC=$lt_save_GCC AC_LANG_RESTORE CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_RC_CONFIG # LT_PROG_GCJ # ----------- AC_DEFUN([LT_PROG_GCJ], [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], [AC_CHECK_TOOL(GCJ, gcj,) test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2" AC_SUBST(GCJFLAGS)])])[]dnl ]) # Old name: AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_GCJ], []) # LT_PROG_GO # ---------- AC_DEFUN([LT_PROG_GO], [AC_CHECK_TOOL(GOC, gccgo,) ]) # LT_PROG_RC # ---------- AC_DEFUN([LT_PROG_RC], [AC_CHECK_TOOL(RC, windres,) ]) # Old name: AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_RC], []) # _LT_DECL_EGREP # -------------- # If we don't have a new enough Autoconf to choose the best grep # available, choose the one first in the user's PATH. m4_defun([_LT_DECL_EGREP], [AC_REQUIRE([AC_PROG_EGREP])dnl AC_REQUIRE([AC_PROG_FGREP])dnl test -z "$GREP" && GREP=grep _LT_DECL([], [GREP], [1], [A grep program that handles long lines]) _LT_DECL([], [EGREP], [1], [An ERE matcher]) _LT_DECL([], [FGREP], [1], [A literal string matcher]) dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too AC_SUBST([GREP]) ]) # _LT_DECL_OBJDUMP # -------------- # If we don't have a new enough Autoconf to choose the best objdump # available, choose the one first in the user's PATH. m4_defun([_LT_DECL_OBJDUMP], [AC_CHECK_TOOL(OBJDUMP, objdump, false) test -z "$OBJDUMP" && OBJDUMP=objdump _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) AC_SUBST([OBJDUMP]) ]) # _LT_DECL_DLLTOOL # ---------------- # Ensure DLLTOOL variable is set. m4_defun([_LT_DECL_DLLTOOL], [AC_CHECK_TOOL(DLLTOOL, dlltool, false) test -z "$DLLTOOL" && DLLTOOL=dlltool _LT_DECL([], [DLLTOOL], [1], [DLL creation program]) AC_SUBST([DLLTOOL]) ]) # _LT_DECL_SED # ------------ # Check for a fully-functional sed program, that truncates # as few characters as possible. Prefer GNU sed if found. m4_defun([_LT_DECL_SED], [AC_PROG_SED test -z "$SED" && SED=sed Xsed="$SED -e 1s/^X//" _LT_DECL([], [SED], [1], [A sed program that does not truncate output]) _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], [Sed that helps us avoid accidentally triggering echo(1) options like -n]) ])# _LT_DECL_SED m4_ifndef([AC_PROG_SED], [ ############################################################ # NOTE: This macro has been submitted for inclusion into # # GNU Autoconf as AC_PROG_SED. When it is available in # # a released version of Autoconf we should remove this # # macro and use it instead. # ############################################################ m4_defun([AC_PROG_SED], [AC_MSG_CHECKING([for a sed that does not truncate output]) AC_CACHE_VAL(lt_cv_path_SED, [# Loop through the user's path and test for sed and gsed. # Then use that list of sed's as ones to test for truncation. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for lt_ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" fi done done done IFS=$as_save_IFS lt_ac_max=0 lt_ac_count=0 # Add /usr/xpg4/bin/sed as it is typically found on Solaris # along with /bin/sed that truncates output. for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do test ! -f "$lt_ac_sed" && continue cat /dev/null > conftest.in lt_ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >conftest.in # Check for GNU sed and select it if it is found. if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then lt_cv_path_SED=$lt_ac_sed break fi while true; do cat conftest.in conftest.in >conftest.tmp mv conftest.tmp conftest.in cp conftest.in conftest.nl echo >>conftest.nl $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break cmp -s conftest.out conftest.nl || break # 10000 chars as input seems more than enough test 10 -lt "$lt_ac_count" && break lt_ac_count=`expr $lt_ac_count + 1` if test "$lt_ac_count" -gt "$lt_ac_max"; then lt_ac_max=$lt_ac_count lt_cv_path_SED=$lt_ac_sed fi done done ]) SED=$lt_cv_path_SED AC_SUBST([SED]) AC_MSG_RESULT([$SED]) ])#AC_PROG_SED ])#m4_ifndef # Old name: AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_SED], []) # _LT_CHECK_SHELL_FEATURES # ------------------------ # Find out whether the shell is Bourne or XSI compatible, # or has some other useful features. m4_defun([_LT_CHECK_SHELL_FEATURES], [if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then lt_unset=unset else lt_unset=false fi _LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl # test EBCDIC or ASCII case `echo X|tr X '\101'` in A) # ASCII based system # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr lt_SP2NL='tr \040 \012' lt_NL2SP='tr \015\012 \040\040' ;; *) # EBCDIC based system lt_SP2NL='tr \100 \n' lt_NL2SP='tr \r\n \100\100' ;; esac _LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl ])# _LT_CHECK_SHELL_FEATURES # _LT_PATH_CONVERSION_FUNCTIONS # ----------------------------- # Determine what file name conversion functions should be used by # func_to_host_file (and, implicitly, by func_to_host_path). These are needed # for certain cross-compile configurations and native mingw. m4_defun([_LT_PATH_CONVERSION_FUNCTIONS], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl AC_MSG_CHECKING([how to convert $build file names to $host format]) AC_CACHE_VAL(lt_cv_to_host_file_cmd, [case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 ;; esac ;; *-*-cygwin* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_noop ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin ;; esac ;; * ) # unhandled hosts (and "normal" native builds) lt_cv_to_host_file_cmd=func_convert_file_noop ;; esac ]) to_host_file_cmd=$lt_cv_to_host_file_cmd AC_MSG_RESULT([$lt_cv_to_host_file_cmd]) _LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], [0], [convert $build file names to $host format])dnl AC_MSG_CHECKING([how to convert $build file names to toolchain format]) AC_CACHE_VAL(lt_cv_to_tool_file_cmd, [#assume ordinary cross tools, or native build. lt_cv_to_tool_file_cmd=func_convert_file_noop case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 ;; esac ;; esac ]) to_tool_file_cmd=$lt_cv_to_tool_file_cmd AC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) _LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], [0], [convert $build files to toolchain format])dnl ])# _LT_PATH_CONVERSION_FUNCTIONS modsecurity-v3.0.6/build/libmaxmind.m40000664000175000017500000001516414146026157021101 0ustar mhsvierulamhsvieruladnl Check for MAXMIND Libraries dnl CHECK_MAXMIND(ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]) dnl Sets: dnl MAXMIND_CFLAGS dnl MAXMIND_LDADD dnl MAXMIND_LDFLAGS dnl MAXMIND_LIBS dnl MAXMIND_VERSION AC_DEFUN([PROG_MAXMIND], [ # Possible names for the maxmind library/package (pkg-config) MAXMIND_POSSIBLE_LIB_NAMES="maxminddb maxmind" # Possible extensions for the library MAXMIND_POSSIBLE_EXTENSIONS="so la sl dll dylib" # Possible paths (if pkg-config was not found, proceed with the file lookup) MAXMIND_POSSIBLE_PATHS="/usr/local/libmaxmind /usr/local/maxmind /usr/local /opt/libmaxmind /opt/maxmind /opt /usr /opt/local/include /opt/local /usr/lib /usr/local/lib /usr/lib64 /usr /usr/include/x86_64-linux-gnu/" # Variables to be set by this very own script. MAXMIND_VERSION="" MAXMIND_CFLAGS="" MAXMIND_CPPFLAGS="" MAXMIND_LDADD="" MAXMIND_LDFLAGS="" AC_ARG_WITH( maxmind, AS_HELP_STRING( [--with-maxmind=PATH], [Path to MaxMind (including headers). Use 'no' to disable MaxMind support.] ) ) # AS_HELP_STRING( # [--without-maxmind], # [Complete dsiables MaxMind support] # ) if test "x${with_maxmind}" == "xno"; then AC_DEFINE(HAVE_MAXMIND, 0, [Support for MaxMind was disabled by the utilization of --without-maxmind or --with-maxmind=no]) AC_MSG_NOTICE([Support for MaxMind was disabled by the utilization of --without-maxmind or --with-maxmind=no]) MAXMIND_DISABLED=yes else if test "x${with_maxmind}" == "xyes"; then MAXMIND_MANDATORY=yes AC_MSG_NOTICE([MaxMind support was marked as mandatory by the utilization of --with-maxmind=yes]) fi # for x in ${MAXMIND_POSSIBLE_LIB_NAMES}; do # CHECK_FOR_MAXMIND_AT(${x}) # if test -n "${MAXMIND_VERSION}"; then # break # fi # done # if test "x${with_maxmind}" != "xyes" or test "x${with_maxmind}" == "xyes"; then if test "x${with_maxmind}" == "x" || test "x${with_maxmind}" == "xyes"; then # Nothing about MaxMind was informed, using the pkg-config to figure things out. if test -n "${PKG_CONFIG}"; then MAXMIND_PKG_NAME="" for x in ${MAXMIND_POSSIBLE_LIB_NAMES}; do if ${PKG_CONFIG} --exists ${x}; then MAXMIND_PKG_NAME="$x" break fi done fi AC_MSG_NOTICE([Nothing about MaxMind was informed during the configure phase. Trying to detect it on the platform...]) if test -n "${MAXMIND_PKG_NAME}"; then # Package was found using the pkg-config scripts MAXMIND_VERSION="`${PKG_CONFIG} ${MAXMIND_PKG_NAME} --modversion`" MAXMIND_CFLAGS="`${PKG_CONFIG} ${MAXMIND_PKG_NAME} --cflags`" MAXMIND_LDADD="`${PKG_CONFIG} ${MAXMIND_PKG_NAME} --libs-only-l`" MAXMIND_LDFLAGS="`${PKG_CONFIG} ${MAXMIND_PKG_NAME} --libs-only-L --libs-only-other`" MAXMIND_DISPLAY="${MAXMIND_LDADD}" else # If pkg-config did not find anything useful, go over file lookup. for x in ${MAXMIND_POSSIBLE_PATHS}; do CHECK_FOR_MAXMIND_AT(${x}) if test -n "${MAXMIND_VERSION}"; then break fi done fi fi if test "x${with_maxmind}" != "x"; then # An specific path was informed, lets check. MAXMIND_MANDATORY=yes CHECK_FOR_MAXMIND_AT(${with_maxmind}) fi # fi fi if test -z "${MAXMIND_DISPLAY}"; then if test -z "${MAXMIND_MANDATORY}"; then if test -z "${MAXMIND_DISABLED}"; then AC_MSG_NOTICE([MaxMind library was not found]) MAXMIND_FOUND=0 else MAXMIND_FOUND=2 fi else AC_MSG_ERROR([MaxMind was explicit requested but it was not found]) MAXMIND_FOUND=-1 fi else MAXMIND_FOUND=1 AC_MSG_NOTICE([using MaxMind v${MAXMIND_VERSION}]) MAXMIND_CFLAGS="-DWITH_MAXMIND ${MAXMIND_CFLAGS}" if ! test "x$MAXMIND_CFLAGS" = "x"; then MAXMIND_DISPLAY="${MAXMIND_DISPLAY}, ${MAXMIND_CFLAGS}" fi AC_SUBST(MAXMIND_VERSION) AC_SUBST(MAXMIND_LDADD) AC_SUBST(MAXMIND_LIBS) AC_SUBST(MAXMIND_LDFLAGS) AC_SUBST(MAXMIND_CFLAGS) AC_SUBST(MAXMIND_DISPLAY) fi AC_SUBST(MAXMIND_FOUND) ]) # AC_DEFUN [PROG_MAXMIND] AC_DEFUN([CHECK_FOR_MAXMIND_AT], [ path=$1 for y in ${MAXMIND_POSSIBLE_EXTENSIONS}; do for z in ${MAXMIND_POSSIBLE_LIB_NAMES}; do if test -e "${path}/${z}.${y}"; then maxmind_lib_path="${path}/" maxmind_lib_name="${z}" maxmind_lib_file="${maxmind_lib_path}/${z}.${y}" break fi if test -e "${path}/lib${z}.${y}"; then maxmind_lib_path="${path}/" maxmind_lib_name="${z}" maxmind_lib_file="${maxmind_lib_path}/lib${z}.${y}" break fi if test -e "${path}/lib/lib${z}.${y}"; then maxmind_lib_path="${path}/lib/" maxmind_lib_name="${z}" maxmind_lib_file="${maxmind_lib_path}/lib${z}.${y}" break fi if test -e "${path}/lib64/lib${z}.${y}"; then maxmind_lib_path="${path}/lib64/" maxmind_lib_name="${z}" maxmind_lib_file="${maxmind_lib_path}/lib${z}.${y}" break fi if test -e "${path}/lib/x86_64-linux-gnu/lib${z}.${y}"; then maxmind_lib_path="${path}/lib/x86_64-linux-gnu/" maxmind_lib_name="${z}" maxmind_lib_file="${maxmind_lib_path}/lib${z}.${y}" break fi done if test -n "$maxmind_lib_path"; then break fi done if test -e "${path}/include/maxminddb.h"; then maxmind_inc_path="${path}/include" elif test -e "${path}/maxminddb.h"; then maxmind_inc_path="${path}" fi if test -n "${maxmind_inc_path}" -a -n "${maxmind_lib_path}"; then AC_MSG_NOTICE([MaxMind headers found at: ${maxmind_inc_path}]) AC_MSG_NOTICE([MaxMind library found at: ${maxmind_lib_file}]) fi if test -n "${maxmind_lib_path}" -a -n "${maxmind_inc_path}"; then # TODO: Compile a piece of code to check the version. MAXMIND_CFLAGS="-I${maxmind_inc_path}" MAXMIND_LDADD="-l${maxmind_lib_name}" MAXMIND_LDFLAGS="-L${maxmind_lib_path}" MAXMIND_DISPLAY="${maxmind_lib_file}, ${maxmind_inc_path}" fi ]) # AC_DEFUN [CHECK_FOR_MAXMIND_AT] modsecurity-v3.0.6/build/pcre.m40000664000175000017500000000571014146026157017702 0ustar mhsvierulamhsvieruladnl Check for PCRE Libraries dnl CHECK_PCRE(ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]) dnl Sets: dnl PCRE_CFLAGS dnl PCRE_LIBS PCRE_CONFIG="" PCRE_VERSION="" PCRE_CPPFLAGS="" PCRE_CFLAGS="" PCRE_LDFLAGS="" PCRE_LDADD="" PCRE_LD_PATH="" AC_DEFUN([CHECK_PCRE], [dnl AC_ARG_WITH( pcre, [AC_HELP_STRING([--with-pcre=PATH],[Path to pcre prefix or config script])], [test_paths="${with_pcre}"], [test_paths="/usr/local/libpcre /usr/local/pcre /usr/local /opt/libpcre /opt/pcre /opt /usr /opt/local"]) AC_MSG_CHECKING([for libpcre config script]) for x in ${test_paths}; do dnl # Determine if the script was specified and use it directly if test ! -d "$x" -a -e "$x"; then PCRE_CONFIG=$x pcre_path="no" break fi dnl # Try known config script names/locations for PCRE_CONFIG in pcre-config; do if test -e "${x}/bin/${PCRE_CONFIG}"; then pcre_path="${x}/bin" break elif test -e "${x}/${PCRE_CONFIG}"; then pcre_path="${x}" break else pcre_path="" fi done if test -n "$pcre_path"; then break fi done if test -n "${pcre_path}"; then if test "${pcre_path}" != "no"; then PCRE_CONFIG="${pcre_path}/${PCRE_CONFIG}" fi AC_MSG_RESULT([${PCRE_CONFIG}]) PCRE_VERSION="`${PCRE_CONFIG} --version`" if test ! -z "${PCRE_VERSION}"; then AC_MSG_NOTICE(pcre VERSION: $PCRE_VERSION); fi PCRE_CFLAGS="`${PCRE_CONFIG} --cflags`" if test ! -z "${PCRE_CFLAGS}"; then AC_MSG_NOTICE(pcre CFLAGS: $PCRE_CFLAGS); fi PCRE_LDADD="`${PCRE_CONFIG} --libs`" if test ! -z "${PCRE_LDADD}"; then AC_MSG_NOTICE(pcre LDADD: $PCRE_LDADD); fi PCRE_LD_PATH="/`${PCRE_CONFIG} --libs | cut -d'/' -f2,3,4,5,6 | cut -d ' ' -f1`" if test ! -z "${PCRE_LD_PATH}"; then AC_MSG_NOTICE(pcre PCRE_LD_PATH: $PCRE_LD_PATH); fi else AC_MSG_RESULT([no]) fi if test -n "${PCRE_VERSION}"; then AC_MSG_CHECKING(for PCRE JIT) save_CFLAGS=$CFLAGS save_LDFLAGS=$LDFLAGS save_LIBS=$LIBS CFLAGS="${PCRE_CFLAGS} ${CFLAGS}" LDFLAGS="${PCRE_LDADD} ${LDFLAGS}" LIBS="${PCRE_LDADD} ${LIBS}" AC_TRY_LINK([ #include ], [ pcre_jit_exec(NULL, NULL, NULL, 0, 0, 0, NULL, 0, NULL); ], [ pcre_jit_available=yes ], [:] ) if test "x$pcre_jit_available" = "xyes"; then AC_MSG_RESULT(yes) PCRE_CFLAGS="${PCRE_CFLAGS} -DPCRE_HAVE_JIT" else AC_MSG_RESULT(no) fi CFLAGS=$save_CFLAGS LDFLAGS=$save_LDFLAGS LIBS=$save_LIBS fi AC_SUBST(PCRE_CONFIG) AC_SUBST(PCRE_VERSION) AC_SUBST(PCRE_CPPFLAGS) AC_SUBST(PCRE_CFLAGS) AC_SUBST(PCRE_LDFLAGS) AC_SUBST(PCRE_LDADD) AC_SUBST(PCRE_LD_PATH) if test -z "${PCRE_VERSION}"; then AC_MSG_NOTICE([*** pcre library not found.]) ifelse([$2], , AC_MSG_ERROR([pcre library is required]), $2) else AC_MSG_NOTICE([using pcre v${PCRE_VERSION}]) ifelse([$1], , , $1) PCRE_LDADD="${PCRE_LDADD} -lpcre" fi ]) modsecurity-v3.0.6/build/lua.m40000664000175000017500000002155314146026157017535 0ustar mhsvierulamhsvieruladnl Check for LUA Libraries dnl CHECK_LUA(ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]) AC_DEFUN([CHECK_LUA], [dnl # Possible names for the lua library/package (pkg-config) LUA_POSSIBLE_LIB_NAMES="lua54 lua5.4 lua-5.4 lua53 lua5.3 lua-5.3 lua52 lua5.2 lua-5.2 lua51 lua5.1 lua-5.1 lua" # Possible extensions for the library LUA_POSSIBLE_EXTENSIONS="so la sl dll dylib" # Possible paths (if pkg-config was not found, proceed with the file lookup) LUA_POSSIBLE_PATHS="/usr/lib /usr/local/lib /usr/local/lib64 /usr/local/lua /usr/local/liblua /usr/local /opt /usr /usr/lib64 /opt/local /usr/lib/lua5.3/liblua /usr/lib/lua5.2/liblua" # Variables to be set by this very own script. LUA_CFLAGS="" LUA_LDFLAGS="" LUA_LDADD="" LUA_DISPLAY="" AC_ARG_WITH( lua, AC_HELP_STRING( [--with-lua=PATH], [Path to lua prefix] ) ) if test "x${with_lua}" == "xno"; then AC_DEFINE(HAVE_LUA, 0, [Support for LUA was disabled by the utilization of --without-lua or --with-lua=no]) AC_MSG_NOTICE([Support for LUA was disabled by the utilization of --without-lua or --with-lua=no]) LUA_DISABLED=yes else if test "x${with_lua}" == "xyes"; then LUA_MANDATORY=yes AC_MSG_NOTICE([LUA support was marked as mandatory by the utilization of --with-lua=yes]) else LUA_MANDATORY=no fi for x in ${LUA_POSSIBLE_PATHS}; do CHECK_FOR_LUA_AT(${x}) if test -n "${LUA_CFLAGS}"; then break fi done if test -z "${LUA_CFLAGS}"; then #Trying to figure out the version using pkg-config... if test -n "${PKG_CONFIG}"; then LUA_PKG_NAME="" for x in ${LUA_POSSIBLE_LIB_NAMES}; do if ${PKG_CONFIG} --exists ${x}; then LUA_PKG_NAME="$x" LUA_PKG_VERSION="`${PKG_CONFIG} ${LUA_PKG_NAME} --modversion`" break fi done fi if test -n "${LUA_PKG_NAME}"; then # Package was found using the pkg-config scripts LUA_PKG_VERSION="`${PKG_CONFIG} ${LUA_PKG_NAME} --modversion`" LUA_CFLAGS="`${PKG_CONFIG} ${LUA_PKG_NAME} --cflags`" LUA_LDADD="`${PKG_CONFIG} ${LUA_PKG_NAME} --libs-only-l`" LUA_LDFLAGS="`${PKG_CONFIG} ${LUA_PKG_NAME} --libs-only-L --libs-only-other`" LUA_DISPLAY="${LUA_LDADD}, ${LUA_CFLAGS}" case $LUA_PKG_VERSION in (5.1*) LUA_CFLAGS="-DWITH_LUA_5_1 ${LUA_CFLAGS}" ; lua_5_1=1 ;; (5.2*) LUA_CFLAGS="-DWITH_LUA_5_2 ${LUA_CFLAGS}" ; lua_5_2=1 ;; (5.3*) LUA_CFLAGS="-DWITH_LUA_5_3 ${LUA_CFLAGS}" ; lua_5_3=1 ;; (5.4*) LUA_CFLAGS="-DWITH_LUA_5_4 ${LUA_CFLAGS}" ; lua_5_4=1 ;; (2.0*) LUA_CFLAGS="-DWITH_LUA_5_1 ${LUA_CFLAGS}" ; lua_5_1=1 ;; (2.1*) LUA_CFLAGS="-DWITH_LUA_5_1 -DWITH_LUA_JIT_2_1 ${LUA_CFLAGS}" ; lua_5_1=1 ;; esac AC_MSG_NOTICE([LUA pkg-config version: ${LUA_PKG_VERSION}]) fi fi fi if test -z "${LUA_CFLAGS}"; then if test -z "${LUA_MANDATORY}" || test "x${LUA_MANDATORY}" == "xno"; then if test -z "${LUA_DISABLED}"; then AC_MSG_NOTICE([LUA library was not found]) LUA_FOUND=0 else LUA_FOUND=2 fi else AC_MSG_ERROR([LUA was explicitly referenced but it was not found]) LUA_FOUND=-1 fi else if test -z "${LUA_MANDATORY}" || test "x${LUA_MANDATORY}" == "xno"; then LUA_FOUND=1 AC_MSG_NOTICE([using LUA ${LUA_LDADD}]) LUA_CFLAGS="-DWITH_LUA ${LUA_CFLAGS}" LUA_DISPLAY="${LUA_LDADD} ${LUA_LDFLAGS}, ${LUA_CFLAGS}" AC_SUBST(LUA_LDFLAGS) AC_SUBST(LUA_LDADD) AC_SUBST(LUA_CFLAGS) AC_SUBST(LUA_DISPLAY) else LUA_FOUND=1 AC_MSG_NOTICE([using LUA ${LUA_LDADD}]) LUA_CFLAGS="-DWITH_LUA ${LUA_CFLAGS}" LUA_DISPLAY="${LUA_LDADD} ${LUA_LDFLAGS}, ${LUA_CFLAGS}" AC_SUBST(LUA_LDFLAGS) AC_SUBST(LUA_LDADD) AC_SUBST(LUA_CFLAGS) AC_SUBST(LUA_DISPLAY) fi fi AC_SUBST(LUA_FOUND) ]) # AC_DEFUN [CHECK_LUA] AC_DEFUN([CHECK_FOR_LUA_AT], [ path=$1 echo "*** LOOKING AT PATH: " ${path} for y in ${LUA_POSSIBLE_EXTENSIONS}; do for z in ${LUA_POSSIBLE_LIB_NAMES}; do if test -e "${path}/${z}.${y}"; then lua_lib_path="${path}/" lua_lib_name="${z}" lua_lib_file="${lua_lib_path}/${z}.${y}" break fi if test -e "${path}/lib${z}.${y}"; then lua_lib_path="${path}/" lua_lib_name="${z}" lua_lib_file="${lua_lib_path}/lib${z}.${y}" break fi if test -e "${path}/lib/lib${z}.${y}"; then lua_lib_path="${path}/lib/" lua_lib_name="${z}" lua_lib_file="${lua_lib_path}/lib${z}.${y}" break fi if test -e "${path}/lib/x86_64-linux-gnu/lib${z}.${y}"; then lua_lib_path="${path}/lib/x86_64-linux-gnu/" lua_lib_name="${z}" lua_lib_file="${lua_lib_path}/lib${z}.${y}" break fi if test -e "${path}/lib/i386-linux-gnu/lib${z}.${y}"; then lua_lib_path="${path}/lib/i386-linux-gnu/" lua_lib_name="${z}" lua_lib_file="${lua_lib_path}/lib${z}.${y}" break fi done if test -n "$lua_lib_path"; then break fi done if test -e "${path}/include/lua.h"; then lua_inc_path="${path}/include" elif test -e "${path}/lua.h"; then lua_inc_path="${path}" elif test -e "${path}/include/lua/lua.h"; then lua_inc_path="${path}/include/lua" elif test -e "${path}/include/lua5.4/lua.h"; then lua_inc_path="${path}/include/lua5.4" LUA_VERSION=504 elif test -e "${path}/include/lua5.3/lua.h"; then lua_inc_path="${path}/include/lua5.3" LUA_VERSION=503 elif test -e "${path}/include/lua5.2/lua.h"; then lua_inc_path="${path}/include/lua5.2" LUA_VERSION=502 elif test -e "${path}/include/lua5.1/lua.h"; then lua_inc_path="${path}/include/lua5.1" LUA_VERSION=501 elif test -e "${path}/include/luajit-2.0/lua.h"; then lua_inc_path="${path}/include/luajit-2.0" LUA_VERSION=501 fi if test -n "${lua_lib_path}"; then AC_MSG_NOTICE([LUA library found at: ${lua_lib_file}]) fi if test -n "${lua_inc_path}"; then AC_MSG_NOTICE([LUA headers found at: ${lua_inc_path}]) fi if test -n "${lua_lib_path}" -a -n "${lua_inc_path}"; then LUA_CFLAGS="-I${lua_inc_path}" LUA_LDADD="-l${lua_lib_name}" LUA_LDFLAGS="-L${lua_lib_path}" LUA_DISPLAY="${lua_lib_file}, ${lua_inc_path}" # Double checking version from lua.h... AC_TRY_COMPILE([ #include > ], [ #if (LUA_VERSION_NUM < 502) return 0; #else #error Lua 5.1 not detected #endif ], [ LUA_VERSION=501 ], [ lua_5_1=0 ] ) AC_TRY_COMPILE([ #include ], [ #if (LUA_VERSION_NUM == 502) return 0; #else #error Lua 5.2 not detected #endif ], [ LUA_VERSION=502 ], [ lua_5_2=0 ] ) AC_TRY_COMPILE([ #include ], [ #if (LUA_VERSION_NUM == 504) return 0; #else #error Lua 5.4 not detected #endif ], [ LUA_VERSION=504 ], [ lua_5_4=0 ] ) if test -z "${LUA_VERSION}" ; then # As a last resort, try to find LUA version from $lua_inc_path while read -r line do case "$line" in (\#define\ LUA_VERSION_NUM*501*) LUA_VERSION=501 ;; (\#define\ LUA_VERSION_NUM*502*) LUA_VERSION=502 ;; (\#define\ LUA_VERSION_NUM*503*) LUA_VERSION=503 ;; (\#define\ LUA_VERSION_NUM*504*) LUA_VERSION=504 esac done <"${lua_inc_path}/lua.h" AC_MSG_NOTICE([LUA_VERSION is ${LUA_VERSION} found at: ${lua_inc_path}]) else AC_MSG_NOTICE([LUA version from includes: ${LUA_VERSION}]) fi case $LUA_VERSION in (501) LUA_CFLAGS="-DWITH_LUA_5_1 ${LUA_CFLAGS}" ; lua_5_1=1 ;; (502) LUA_CFLAGS="-DWITH_LUA_5_2 ${LUA_CFLAGS}" ; lua_5_2=1 ;; (503) LUA_CFLAGS="-DWITH_LUA_5_3 ${LUA_CFLAGS}" ; lua_5_3=1 ;; (504) LUA_CFLAGS="-DWITH_LUA_5_4 ${LUA_CFLAGS}" ; lua_5_4=1 ;; esac fi ]) # AC_DEFUN [CHECK_FOR_LUA_AT] modsecurity-v3.0.6/build/ax_cxx_compile_stdcxx_11.m40000664000175000017500000001321414146026157023647 0ustar mhsvierulamhsvierula# ============================================================================ # http://www.gnu.org/software/autoconf-archive/ax_cxx_compile_stdcxx_11.html # ============================================================================ # # SYNOPSIS # # AX_CXX_COMPILE_STDCXX_11([ext|noext],[mandatory|optional]) # # DESCRIPTION # # Check for baseline language coverage in the compiler for the C++11 # standard; if necessary, add switches to CXXFLAGS to enable support. # # The first argument, if specified, indicates whether you insist on an # extended mode (e.g. -std=gnu++11) or a strict conformance mode (e.g. # -std=c++11). If neither is specified, you get whatever works, with # preference for an extended mode. # # The second argument, if specified 'mandatory' or if left unspecified, # indicates that baseline C++11 support is required and that the macro # should error out if no mode with that support is found. If specified # 'optional', then configuration proceeds regardless, after defining # HAVE_CXX11 if and only if a supporting mode is found. # # LICENSE # # Copyright (c) 2008 Benjamin Kosnik # Copyright (c) 2012 Zack Weinberg # Copyright (c) 2013 Roy Stogner # Copyright (c) 2014, 2015 Google Inc.; contributed by Alexey Sokolov # Copyright (c) 2015 Paul Norman # # Copying and distribution of this file, with or without modification, are # permitted in any medium without royalty provided the copyright notice # and this notice are preserved. This file is offered as-is, without any # warranty. #serial 12 m4_define([_AX_CXX_COMPILE_STDCXX_11_testbody], [[ template struct check { static_assert(sizeof(int) <= sizeof(T), "not big enough"); }; struct Base { virtual void f() {} }; struct Child : public Base { virtual void f() override {} }; typedef check> right_angle_brackets; int a; decltype(a) b; typedef check check_type; check_type c; check_type&& cr = static_cast(c); auto d = a; auto l = [](){}; // Prevent Clang error: unused variable 'l' [-Werror,-Wunused-variable] struct use_l { use_l() { l(); } }; // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function because of this namespace test_template_alias_sfinae { struct foo {}; template using member = typename T::member_type; template void func(...) {} template void func(member*) {} void test(); void test() { func(0); } } // Check for C++11 attribute support void noret [[noreturn]] () { throw 0; } ]]) AC_DEFUN([AX_CXX_COMPILE_STDCXX_11], [dnl m4_if([$1], [], [], [$1], [ext], [], [$1], [noext], [], [m4_fatal([invalid argument `$1' to AX_CXX_COMPILE_STDCXX_11])])dnl m4_if([$2], [], [ax_cxx_compile_cxx11_required=true], [$2], [mandatory], [ax_cxx_compile_cxx11_required=true], [$2], [optional], [ax_cxx_compile_cxx11_required=false], [m4_fatal([invalid second argument `$2' to AX_CXX_COMPILE_STDCXX_11])]) AC_LANG_PUSH([C++])dnl ac_success=no AC_CACHE_CHECK(whether $CXX supports C++11 features by default, ax_cv_cxx_compile_cxx11, [AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_11_testbody])], [ax_cv_cxx_compile_cxx11=yes], [ax_cv_cxx_compile_cxx11=no])]) if test x$ax_cv_cxx_compile_cxx11 = xyes; then ac_success=yes fi m4_if([$1], [noext], [], [dnl if test x$ac_success = xno; then for switch in -std=gnu++11 -std=gnu++0x; do cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx11_$switch]) AC_CACHE_CHECK(whether $CXX supports C++11 features with $switch, $cachevar, [ac_save_CXXFLAGS="$CXXFLAGS" CXXFLAGS="$CXXFLAGS $switch" AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_11_testbody])], [eval $cachevar=yes], [eval $cachevar=no]) CXXFLAGS="$ac_save_CXXFLAGS"]) if eval test x\$$cachevar = xyes; then CXXFLAGS="$CXXFLAGS $switch" ac_success=yes break fi done fi]) m4_if([$1], [ext], [], [dnl if test x$ac_success = xno; then dnl HP's aCC needs +std=c++11 according to: dnl http://h21007.www2.hp.com/portal/download/files/unprot/aCxx/PDF_Release_Notes/769149-001.pdf for switch in -std=c++11 -std=c++0x +std=c++11; do cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx11_$switch]) AC_CACHE_CHECK(whether $CXX supports C++11 features with $switch, $cachevar, [ac_save_CXXFLAGS="$CXXFLAGS" CXXFLAGS="$CXXFLAGS $switch" AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_11_testbody])], [eval $cachevar=yes], [eval $cachevar=no]) CXXFLAGS="$ac_save_CXXFLAGS"]) if eval test x\$$cachevar = xyes; then CXXFLAGS="$CXXFLAGS $switch" ac_success=yes break fi done fi]) AC_LANG_POP([C++]) if test x$ax_cxx_compile_cxx11_required = xtrue; then if test x$ac_success = xno; then AC_MSG_ERROR([*** A compiler with support for C++11 language features is required.]) fi else if test x$ac_success = xno; then HAVE_CXX11=0 AC_MSG_NOTICE([No compiler with C++11 support was found]) else HAVE_CXX11=1 AC_DEFINE(HAVE_CXX11,1, [define if the compiler supports basic C++11 syntax]) fi AC_SUBST(HAVE_CXX11) fi ]) modsecurity-v3.0.6/build/ltoptions.m40000644000175000017500000003426214146027111020775 0ustar mhsvierulamhsvierula# Helper functions for option handling. -*- Autoconf -*- # # Copyright (C) 2004-2005, 2007-2009, 2011-2015 Free Software # Foundation, Inc. # Written by Gary V. Vaughan, 2004 # # This file 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. # serial 8 ltoptions.m4 # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) # _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) # ------------------------------------------ m4_define([_LT_MANGLE_OPTION], [[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) # _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) # --------------------------------------- # Set option OPTION-NAME for macro MACRO-NAME, and if there is a # matching handler defined, dispatch to it. Other OPTION-NAMEs are # saved as a flag. m4_define([_LT_SET_OPTION], [m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), _LT_MANGLE_DEFUN([$1], [$2]), [m4_warning([Unknown $1 option '$2'])])[]dnl ]) # _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) # ------------------------------------------------------------ # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. m4_define([_LT_IF_OPTION], [m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) # _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) # ------------------------------------------------------- # Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME # are set. m4_define([_LT_UNLESS_OPTIONS], [m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), [m4_define([$0_found])])])[]dnl m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 ])[]dnl ]) # _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) # ---------------------------------------- # OPTION-LIST is a space-separated list of Libtool options associated # with MACRO-NAME. If any OPTION has a matching handler declared with # LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about # the unknown option and exit. m4_defun([_LT_SET_OPTIONS], [# Set options m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), [_LT_SET_OPTION([$1], _LT_Option)]) m4_if([$1],[LT_INIT],[ dnl dnl Simply set some default values (i.e off) if boolean options were not dnl specified: _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no ]) _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no ]) dnl dnl If no reference was made to various pairs of opposing options, then dnl we run the default mode handler for the pair. For example, if neither dnl 'shared' nor 'disable-shared' was passed, we enable building of shared dnl archives by default: _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], [_LT_ENABLE_FAST_INSTALL]) _LT_UNLESS_OPTIONS([LT_INIT], [aix-soname=aix aix-soname=both aix-soname=svr4], [_LT_WITH_AIX_SONAME([aix])]) ]) ])# _LT_SET_OPTIONS ## --------------------------------- ## ## Macros to handle LT_INIT options. ## ## --------------------------------- ## # _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) # ----------------------------------------- m4_define([_LT_MANGLE_DEFUN], [[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) # LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) # ----------------------------------------------- m4_define([LT_OPTION_DEFINE], [m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl ])# LT_OPTION_DEFINE # dlopen # ------ LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes ]) AU_DEFUN([AC_LIBTOOL_DLOPEN], [_LT_SET_OPTION([LT_INIT], [dlopen]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the 'dlopen' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) # win32-dll # --------- # Declare package support for building win32 dll's. LT_OPTION_DEFINE([LT_INIT], [win32-dll], [enable_win32_dll=yes case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) AC_CHECK_TOOL(AS, as, false) AC_CHECK_TOOL(DLLTOOL, dlltool, false) AC_CHECK_TOOL(OBJDUMP, objdump, false) ;; esac test -z "$AS" && AS=as _LT_DECL([], [AS], [1], [Assembler program])dnl test -z "$DLLTOOL" && DLLTOOL=dlltool _LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl test -z "$OBJDUMP" && OBJDUMP=objdump _LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl ])# win32-dll AU_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_REQUIRE([AC_CANONICAL_HOST])dnl _LT_SET_OPTION([LT_INIT], [win32-dll]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the 'win32-dll' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) # _LT_ENABLE_SHARED([DEFAULT]) # ---------------------------- # implement the --enable-shared flag, and supports the 'shared' and # 'disable-shared' LT_INIT options. # DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. m4_define([_LT_ENABLE_SHARED], [m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([shared], [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS=$lt_save_ifs ;; esac], [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) _LT_DECL([build_libtool_libs], [enable_shared], [0], [Whether or not to build shared libraries]) ])# _LT_ENABLE_SHARED LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) # Old names: AC_DEFUN([AC_ENABLE_SHARED], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) ]) AC_DEFUN([AC_DISABLE_SHARED], [_LT_SET_OPTION([LT_INIT], [disable-shared]) ]) AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_ENABLE_SHARED], []) dnl AC_DEFUN([AM_DISABLE_SHARED], []) # _LT_ENABLE_STATIC([DEFAULT]) # ---------------------------- # implement the --enable-static flag, and support the 'static' and # 'disable-static' LT_INIT options. # DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. m4_define([_LT_ENABLE_STATIC], [m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([static], [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS=$lt_save_ifs ;; esac], [enable_static=]_LT_ENABLE_STATIC_DEFAULT) _LT_DECL([build_old_libs], [enable_static], [0], [Whether or not to build static libraries]) ])# _LT_ENABLE_STATIC LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) # Old names: AC_DEFUN([AC_ENABLE_STATIC], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) ]) AC_DEFUN([AC_DISABLE_STATIC], [_LT_SET_OPTION([LT_INIT], [disable-static]) ]) AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_ENABLE_STATIC], []) dnl AC_DEFUN([AM_DISABLE_STATIC], []) # _LT_ENABLE_FAST_INSTALL([DEFAULT]) # ---------------------------------- # implement the --enable-fast-install flag, and support the 'fast-install' # and 'disable-fast-install' LT_INIT options. # DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. m4_define([_LT_ENABLE_FAST_INSTALL], [m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([fast-install], [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS=$lt_save_ifs ;; esac], [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) _LT_DECL([fast_install], [enable_fast_install], [0], [Whether or not to optimize for fast installation])dnl ])# _LT_ENABLE_FAST_INSTALL LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) # Old names: AU_DEFUN([AC_ENABLE_FAST_INSTALL], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the 'fast-install' option into LT_INIT's first parameter.]) ]) AU_DEFUN([AC_DISABLE_FAST_INSTALL], [_LT_SET_OPTION([LT_INIT], [disable-fast-install]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the 'disable-fast-install' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) # _LT_WITH_AIX_SONAME([DEFAULT]) # ---------------------------------- # implement the --with-aix-soname flag, and support the `aix-soname=aix' # and `aix-soname=both' and `aix-soname=svr4' LT_INIT options. DEFAULT # is either `aix', `both' or `svr4'. If omitted, it defaults to `aix'. m4_define([_LT_WITH_AIX_SONAME], [m4_define([_LT_WITH_AIX_SONAME_DEFAULT], [m4_if($1, svr4, svr4, m4_if($1, both, both, aix))])dnl shared_archive_member_spec= case $host,$enable_shared in power*-*-aix[[5-9]]*,yes) AC_MSG_CHECKING([which variant of shared library versioning to provide]) AC_ARG_WITH([aix-soname], [AS_HELP_STRING([--with-aix-soname=aix|svr4|both], [shared library versioning (aka "SONAME") variant to provide on AIX, @<:@default=]_LT_WITH_AIX_SONAME_DEFAULT[@:>@.])], [case $withval in aix|svr4|both) ;; *) AC_MSG_ERROR([Unknown argument to --with-aix-soname]) ;; esac lt_cv_with_aix_soname=$with_aix_soname], [AC_CACHE_VAL([lt_cv_with_aix_soname], [lt_cv_with_aix_soname=]_LT_WITH_AIX_SONAME_DEFAULT) with_aix_soname=$lt_cv_with_aix_soname]) AC_MSG_RESULT([$with_aix_soname]) if test aix != "$with_aix_soname"; then # For the AIX way of multilib, we name the shared archive member # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o', # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File. # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag, # the AIX toolchain works better with OBJECT_MODE set (default 32). if test 64 = "${OBJECT_MODE-32}"; then shared_archive_member_spec=shr_64 else shared_archive_member_spec=shr fi fi ;; *) with_aix_soname=aix ;; esac _LT_DECL([], [shared_archive_member_spec], [0], [Shared archive member basename, for filename based shared library versioning on AIX])dnl ])# _LT_WITH_AIX_SONAME LT_OPTION_DEFINE([LT_INIT], [aix-soname=aix], [_LT_WITH_AIX_SONAME([aix])]) LT_OPTION_DEFINE([LT_INIT], [aix-soname=both], [_LT_WITH_AIX_SONAME([both])]) LT_OPTION_DEFINE([LT_INIT], [aix-soname=svr4], [_LT_WITH_AIX_SONAME([svr4])]) # _LT_WITH_PIC([MODE]) # -------------------- # implement the --with-pic flag, and support the 'pic-only' and 'no-pic' # LT_INIT options. # MODE is either 'yes' or 'no'. If omitted, it defaults to 'both'. m4_define([_LT_WITH_PIC], [AC_ARG_WITH([pic], [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], [lt_p=${PACKAGE-default} case $withval in yes|no) pic_mode=$withval ;; *) pic_mode=default # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for lt_pkg in $withval; do IFS=$lt_save_ifs if test "X$lt_pkg" = "X$lt_p"; then pic_mode=yes fi done IFS=$lt_save_ifs ;; esac], [pic_mode=m4_default([$1], [default])]) _LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl ])# _LT_WITH_PIC LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) # Old name: AU_DEFUN([AC_LIBTOOL_PICMODE], [_LT_SET_OPTION([LT_INIT], [pic-only]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the 'pic-only' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) ## ----------------- ## ## LTDL_INIT Options ## ## ----------------- ## m4_define([_LTDL_MODE], []) LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], [m4_define([_LTDL_MODE], [nonrecursive])]) LT_OPTION_DEFINE([LTDL_INIT], [recursive], [m4_define([_LTDL_MODE], [recursive])]) LT_OPTION_DEFINE([LTDL_INIT], [subproject], [m4_define([_LTDL_MODE], [subproject])]) m4_define([_LTDL_TYPE], []) LT_OPTION_DEFINE([LTDL_INIT], [installable], [m4_define([_LTDL_TYPE], [installable])]) LT_OPTION_DEFINE([LTDL_INIT], [convenience], [m4_define([_LTDL_TYPE], [convenience])]) modsecurity-v3.0.6/build/ssdeep.m40000664000175000017500000001102614146026157020231 0ustar mhsvierulamhsvieruladnl Check for SSDEEP Libraries dnl CHECK_SSDEEP(ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]) AC_DEFUN([CHECK_SSDEEP], [dnl # Possible names for the ssdeep library/package (pkg-config) SSDEEP_POSSIBLE_LIB_NAMES="fuzzy" # Possible extensions for the library SSDEEP_POSSIBLE_EXTENSIONS="so so0 la sl dll dylib so.0.0.0" # Possible paths (if pkg-config was not found, proceed with the file lookup) SSDEEP_POSSIBLE_PATHS="/usr/lib /usr/local/lib /usr/local/fuzzy /usr/local/libfuzzy /usr/local /opt /usr /usr/lib64 /opt/local" # Variables to be set by this very own script. SSDEEP_CFLAGS="" SSDEEP_LDFLAGS="" SSDEEP_LDADD="" SSDEEP_DISPLAY="" AC_ARG_WITH( ssdeep, AC_HELP_STRING( [--with-ssdeep=PATH], [Path to ssdeep prefix] ) ) if test "x${with_ssdeep}" == "xno"; then AC_DEFINE(HAVE_SSDEEP, 0, [Support for SSDEEP was disabled by the utilization of --without-ssdeep or --with-ssdeep=no]) AC_MSG_NOTICE([Support for SSDEEP was disabled by the utilization of --without-ssdeep or --with-ssdeep=no]) SSDEEP_DISABLED=yes else if test "x${with_ssdeep}" == "xyes"; then SSDEEP_MANDATORY=yes AC_MSG_NOTICE([SSDEEP support was marked as mandatory by the utilization of --with-ssdeep=yes]) else SSDEEP_MANDATORY=no fi for x in ${SSDEEP_POSSIBLE_PATHS}; do CHECK_FOR_SSDEEP_AT(${x}) if test -n "${SSDEEP_CFLAGS}"; then break fi done fi if test -z "${SSDEEP_CFLAGS}"; then if test -z "${SSDEEP_MANDATORY}" || test "x${SSDEEP_MANDATORY}" == "xno"; then if test -z "${SSDEEP_DISABLED}"; then AC_MSG_NOTICE([SSDEEP library was not found]) SSDEEP_FOUND=0 else SSDEEP_FOUND=2 fi else AC_MSG_ERROR([SSDEEP was explicitly referenced but it was not found]) SSDEEP_FOUND=-1 fi else SSDEEP_FOUND=1 AC_MSG_NOTICE([using SSDEEP v${SSDEEP_VERSION}]) SSDEEP_CFLAGS="-DWITH_SSDEEP ${SSDEEP_CFLAGS}" SSDEEP_DISPLAY="${SSDEEP_LDADD} ${SSDEEP_LDFLAGS}, ${SSDEEP_CFLAGS}" AC_SUBST(SSDEEP_LDFLAGS) AC_SUBST(SSDEEP_LDADD) AC_SUBST(SSDEEP_CFLAGS) AC_SUBST(SSDEEP_DISPLAY) fi AC_SUBST(SSDEEP_FOUND) ]) # AC_DEFUN [CHECK_SSDEEP] AC_DEFUN([CHECK_FOR_SSDEEP_AT], [ path=$1 echo "*** LOOKING AT PATH: " ${path} for y in ${SSDEEP_POSSIBLE_EXTENSIONS}; do for z in ${SSDEEP_POSSIBLE_LIB_NAMES}; do if test -e "${path}/${z}.${y}"; then ssdeep_lib_path="${path}/" ssdeep_lib_name="${z}" ssdeep_lib_file="${ssdeep_lib_path}/${z}.${y}" break fi if test -e "${path}/lib${z}.${y}"; then ssdeep_lib_path="${path}/" ssdeep_lib_name="${z}" ssdeep_lib_file="${ssdeep_lib_path}/lib${z}.${y}" break fi if test -e "${path}/lib/lib${z}.${y}"; then ssdeep_lib_path="${path}/lib/" ssdeep_lib_name="${z}" ssdeep_lib_file="${ssdeep_lib_path}/lib${z}.${y}" break fi if test -e "${path}/lib/x86_64-linux-gnu/lib${z}.${y}"; then ssdeep_lib_path="${path}/lib/x86_64-linux-gnu/" ssdeep_lib_name="${z}" ssdeep_lib_file="${ssdeep_lib_path}/lib${z}.${y}" break fi if test -e "${path}/lib/i386-linux-gnu/lib${z}.${y}"; then ssdeep_lib_path="${path}/lib/i386-linux-gnu/" ssdeep_lib_name="${z}" ssdeep_lib_file="${ssdeep_lib_path}/lib${z}.${y}" break fi done if test -n "$ssdeep_lib_path"; then break fi done if test -e "${path}/include/fuzzy.h"; then ssdeep_inc_path="${path}/include" elif test -e "${path}/fuzzy.h"; then ssdeep_inc_path="${path}" elif test -e "${path}/include/fuzzy/fuzzy.h"; then ssdeep_inc_path="${path}/include" fi if test -n "${ssdeep_lib_path}"; then AC_MSG_NOTICE([SSDEEP library found at: ${ssdeep_lib_file}]) fi if test -n "${ssdeep_inc_path}"; then AC_MSG_NOTICE([SSDEEP headers found at: ${ssdeep_inc_path}]) fi if test -n "${ssdeep_lib_path}" -a -n "${ssdeep_inc_path}"; then # TODO: Compile a piece of code to check the version. SSDEEP_CFLAGS="-I${ssdeep_inc_path}" SSDEEP_LDADD="-l${ssdeep_lib_name}" SSDEEP_LDFLAGS="-L${ssdeep_lib_path}" SSDEEP_DISPLAY="${ssdeep_lib_file}, ${ssdeep_inc_path}" fi ]) # AC_DEFUN [CHECK_FOR_SSDEEP_AT] modsecurity-v3.0.6/build/yajl.m40000664000175000017500000001343014146026157017706 0ustar mhsvierulamhsvieruladnl Check for YAJL Libraries dnl CHECK_YAJL(ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]) AC_DEFUN([PROG_YAJL], [ # Possible names for the yajl library/package (pkg-config) YAJL_POSSIBLE_LIB_NAMES="yajl2 yajl" # Possible extensions for the library YAJL_POSSIBLE_EXTENSIONS="so la sl dll dylib" # Possible paths (if pkg-config was not found, proceed with the file lookup) YAJL_POSSIBLE_PATHS="/usr/lib /usr/local/lib /usr/local/libyajl /usr/local/yajl /usr/local /opt/libyajl /opt/yajl /opt /usr /usr/lib64" # Variables to be set by this very own script. YAJL_VERSION="" YAJL_CFLAGS="" YAJL_CPPFLAGS="" YAJL_LDADD="" YAJL_LDFLAGS="" AC_ARG_WITH( yajl, AC_HELP_STRING( [--with-yajl=PATH], [Path to yajl prefix or config script] ) ) if test "x${with_yajl}" == "xno"; then AC_DEFINE(HAVE_YAJL, 0, [Support for YAJL was disabled by the utilization of --without-yajl or --with-yajl=no]) AC_MSG_NOTICE([Support for YAJL was disabled by the utilization of --without-yajl or --with-yajl=no]) YAJL_DISABLED=yes else if test "x${with_yajl}" == "xyes"; then YAJL_MANDATORY=yes AC_MSG_NOTICE([YAJL support was marked as mandatory by the utilization of --with-yajl=yes]) fi # for x in ${YAJL_POSSIBLE_LIB_NAMES}; do # CHECK_FOR_YAJL_AT(${x}) # if test -n "${YAJL_VERSION}"; then # break # fi # done # if test "x${with_yajl}" != "xyes" or test "x${with_yajl}" == "xyes"; then if test "x${with_yajl}" == "x" || test "x${with_yajl}" == "xyes"; then # Nothing about YAJL was informed, using the pkg-config to figure things out. if test -n "${PKG_CONFIG}"; then YAJL_PKG_NAME="" for x in ${YAJL_POSSIBLE_LIB_NAMES}; do if ${PKG_CONFIG} --exists ${x}; then YAJL_PKG_NAME="$x" break fi done fi AC_MSG_NOTICE([Nothing about YAJL was informed during the configure phase. Trying to detect it on the platform...]) if test -n "${YAJL_PKG_NAME}"; then # Package was found using the pkg-config scripts YAJL_VERSION="`${PKG_CONFIG} ${YAJL_PKG_NAME} --modversion`" YAJL_CFLAGS="`${PKG_CONFIG} ${YAJL_PKG_NAME} --cflags`" YAJL_LDADD="`${PKG_CONFIG} ${YAJL_PKG_NAME} --libs-only-l`" YAJL_LDFLAGS="`${PKG_CONFIG} ${YAJL_PKG_NAME} --libs-only-L --libs-only-other`" YAJL_DISPLAY="${YAJL_LDADD}, ${YAJL_CFLAGS}" else # If pkg-config did not find anything useful, go over file lookup. for x in ${YAJL_POSSIBLE_LIB_NAMES}; do CHECK_FOR_YAJL_AT(${x}) if test -n "${YAJL_VERSION}"; then break fi done fi fi if test "x${with_yajl}" != "x"; then # An specific path was informed, lets check. YAJL_MANDATORY=yes CHECK_FOR_YAJL_AT(${with_yajl}) fi # fi fi if test -z "${YAJL_LDADD}"; then if test -z "${YAJL_MANDATORY}"; then if test -z "${YAJL_DISABLED}"; then AC_MSG_NOTICE([YAJL library was not found]) YAJL_FOUND=0 else YAJL_FOUND=2 fi else AC_MSG_ERROR([YAJL was explicitly referenced but it was not found]) YAJL_FOUND=-1 fi else YAJL_FOUND=1 AC_MSG_NOTICE([using YAJL v${YAJL_VERSION}]) YAJL_CFLAGS="-DWITH_YAJL ${YAJL_CFLAGS}" YAJL_DISPLAY="${YAJL_LDADD}, ${YAJL_CFLAGS}" AC_SUBST(YAJL_VERSION) AC_SUBST(YAJL_LDADD) AC_SUBST(YAJL_LIBS) AC_SUBST(YAJL_LDFLAGS) AC_SUBST(YAJL_CFLAGS) AC_SUBST(YAJL_DISPLAY) fi AC_SUBST(YAJL_FOUND) ]) # AC_DEFUN [PROG_YAJL] AC_DEFUN([CHECK_FOR_YAJL_AT], [ path=$1 for y in ${YAJL_POSSIBLE_EXTENSIONS}; do for z in ${YAJL_POSSIBLE_LIB_NAMES}; do if test -e "${path}/${z}.${y}"; then yajl_lib_path="${path}/" yajl_lib_name="${z}" yajl_lib_file="${yajl_lib_path}/${z}.${y}" break fi if test -e "${path}/lib${z}.${y}"; then yajl_lib_path="${path}/" yajl_lib_name="${z}" yajl_lib_file="${yajl_lib_path}/lib${z}.${y}" break fi if test -e "${path}/lib/lib${z}.${y}"; then yajl_lib_path="${path}/lib/" yajl_lib_name="${z}" yajl_lib_file="${yajl_lib_path}/lib${z}.${y}" break fi if test -e "${path}/lib/x86_64-linux-gnu/lib${z}.${y}"; then yajl_lib_path="${path}/lib/x86_64-linux-gnu/" yajl_lib_name="${z}" yajl_lib_file="${yajl_lib_path}/lib${z}.${y}" break fi done if test -n "$yajl_lib_path"; then break fi done if test -e "${path}/include/yajl_parse.h"; then yajl_inc_path="${path}/include" elif test -e "${path}/yajl_parse.h"; then yajl_inc_path="${path}" elif test -e "${path}/include/yajl/yajl_parse.h"; then yajl_inc_path="${path}/include" fi if test -n "${yajl_lib_path}"; then AC_MSG_NOTICE([YAJL library found at: ${yajl_lib_file}]) fi if test -n "${yajl_inc_path}"; then AC_MSG_NOTICE([YAJL headers found at: ${yajl_inc_path}]) fi if test -n "${yajl_lib_path}" -a -n "${yajl_inc_path}"; then # TODO: Compile a piece of code to check the version. YAJL_CFLAGS="-I${yajl_inc_path}" YAJL_LDADD="-l${yajl_lib_name}" YAJL_LDFLAGS="-L${yajl_lib_path}" YAJL_DISPLAY="${yajl_lib_file}, ${yajl_inc_path}" fi ]) # AC_DEFUN [CHECK_FOR_YAJL_AT] modsecurity-v3.0.6/build/ax_valgrind_check.m40000664000175000017500000002132714146026157022406 0ustar mhsvierulamhsvierula# =========================================================================== # http://www.gnu.org/software/autoconf-archive/ax_valgrind_check.html # =========================================================================== # # SYNOPSIS # # AX_VALGRIND_DFLT(memcheck|helgrind|drd|sgcheck, on|off) # AX_VALGRIND_CHECK() # # DESCRIPTION # # AX_VALGRIND_CHECK checks whether Valgrind is present and, if so, allows # running `make check` under a variety of Valgrind tools to check for # memory and threading errors. # # Defines VALGRIND_CHECK_RULES which should be substituted in your # Makefile; and $enable_valgrind which can be used in subsequent configure # output. VALGRIND_ENABLED is defined and substituted, and corresponds to # the value of the --enable-valgrind option, which defaults to being # enabled if Valgrind is installed and disabled otherwise. Individual # Valgrind tools can be disabled via --disable-valgrind-, the # default is configurable via the AX_VALGRIND_DFLT command or is to use # all commands not disabled via AX_VALGRIND_DFLT. All AX_VALGRIND_DFLT # calls must be made before the call to AX_VALGRIND_CHECK. # # If unit tests are written using a shell script and automake's # LOG_COMPILER system, the $(VALGRIND) variable can be used within the # shell scripts to enable Valgrind, as described here: # # https://www.gnu.org/software/gnulib/manual/html_node/Running-self_002dtests-under-valgrind.html # # Usage example: # # configure.ac: # # AX_VALGRIND_DFLT([sgcheck], [off]) # AX_VALGRIND_CHECK # # Makefile.am: # # @VALGRIND_CHECK_RULES@ # VALGRIND_SUPPRESSIONS_FILES = my-project.supp # EXTRA_DIST = my-project.supp # # This results in a "check-valgrind" rule being added to any Makefile.am # which includes "@VALGRIND_CHECK_RULES@" (assuming the module has been # configured with --enable-valgrind). Running `make check-valgrind` in # that directory will run the module's test suite (`make check`) once for # each of the available Valgrind tools (out of memcheck, helgrind and drd) # while the sgcheck will be skipped unless enabled again on the # commandline with --enable-valgrind-sgcheck. The results for each check # will be output to test-suite-$toolname.log. The target will succeed if # there are zero errors and fail otherwise. # # Alternatively, a "check-valgrind-$TOOL" rule will be added, for $TOOL in # memcheck, helgrind, drd and sgcheck. These are useful because often only # some of those tools can be ran cleanly on a codebase. # # The macro supports running with and without libtool. # # LICENSE # # Copyright (c) 2014, 2015, 2016 Philip Withnall # # Copying and distribution of this file, with or without modification, are # permitted in any medium without royalty provided the copyright notice # and this notice are preserved. This file is offered as-is, without any # warranty. #serial 13 dnl Configured tools m4_define([valgrind_tool_list], [[memcheck], [helgrind], [drd], [sgcheck]]) m4_set_add_all([valgrind_exp_tool_set], [sgcheck]) m4_foreach([vgtool], [valgrind_tool_list], [m4_define([en_dflt_valgrind_]vgtool, [on])]) AC_DEFUN([AX_VALGRIND_DFLT],[ m4_define([en_dflt_valgrind_$1], [$2]) ])dnl AC_DEFUN([AX_VALGRIND_CHECK],[ dnl Check for --enable-valgrind AC_ARG_ENABLE([valgrind], [AS_HELP_STRING([--enable-valgrind], [Whether to enable Valgrind on the unit tests])], [enable_valgrind=$enableval],[enable_valgrind=]) AS_IF([test "$enable_valgrind" != "no"],[ # Check for Valgrind. AC_CHECK_PROG([VALGRIND],[valgrind],[valgrind]) AS_IF([test "$VALGRIND" = ""],[ AS_IF([test "$enable_valgrind" = "yes"],[ AC_MSG_ERROR([Could not find valgrind; either install it or reconfigure with --disable-valgrind]) ],[ enable_valgrind=no ]) ],[ enable_valgrind=yes ]) ]) AM_CONDITIONAL([VALGRIND_ENABLED],[test "$enable_valgrind" = "yes"]) AC_SUBST([VALGRIND_ENABLED],[$enable_valgrind]) # Check for Valgrind tools we care about. [valgrind_enabled_tools=] m4_foreach([vgtool],[valgrind_tool_list],[ AC_ARG_ENABLE([valgrind-]vgtool, m4_if(m4_defn([en_dflt_valgrind_]vgtool),[off],dnl [AS_HELP_STRING([--enable-valgrind-]vgtool, [Whether to use ]vgtool[ during the Valgrind tests])],dnl [AS_HELP_STRING([--disable-valgrind-]vgtool, [Whether to skip ]vgtool[ during the Valgrind tests])]), [enable_valgrind_]vgtool[=$enableval], [enable_valgrind_]vgtool[=]) AS_IF([test "$enable_valgrind" = "no"],[ enable_valgrind_]vgtool[=no], [test "$enable_valgrind_]vgtool[" ]dnl m4_if(m4_defn([en_dflt_valgrind_]vgtool), [off], [= "yes"], [!= "no"]),[ AC_CACHE_CHECK([for Valgrind tool ]vgtool, [ax_cv_valgrind_tool_]vgtool,[ ax_cv_valgrind_tool_]vgtool[=no m4_set_contains([valgrind_exp_tool_set],vgtool, [m4_define([vgtoolx],[exp-]vgtool)], [m4_define([vgtoolx],vgtool)]) AS_IF([`$VALGRIND --tool=]vgtoolx[ --help >/dev/null 2>&1`],[ ax_cv_valgrind_tool_]vgtool[=yes ]) ]) AS_IF([test "$ax_cv_valgrind_tool_]vgtool[" = "no"],[ AS_IF([test "$enable_valgrind_]vgtool[" = "yes"],[ AC_MSG_ERROR([Valgrind does not support ]vgtool[; reconfigure with --disable-valgrind-]vgtool) ],[ enable_valgrind_]vgtool[=no ]) ],[ enable_valgrind_]vgtool[=yes ]) ]) AS_IF([test "$enable_valgrind_]vgtool[" = "yes"],[ valgrind_enabled_tools="$valgrind_enabled_tools ]m4_bpatsubst(vgtool,[^exp-])[" ]) AC_SUBST([ENABLE_VALGRIND_]vgtool,[$enable_valgrind_]vgtool) ]) AC_SUBST([valgrind_tools],["]m4_join([ ], valgrind_tool_list)["]) AC_SUBST([valgrind_enabled_tools],[$valgrind_enabled_tools]) [VALGRIND_CHECK_RULES=' # Valgrind check # # Optional: # - VALGRIND_SUPPRESSIONS_FILES: Space-separated list of Valgrind suppressions # files to load. (Default: empty) # - VALGRIND_FLAGS: General flags to pass to all Valgrind tools. # (Default: --num-callers=30) # - VALGRIND_$toolname_FLAGS: Flags to pass to Valgrind $toolname (one of: # memcheck, helgrind, drd, sgcheck). (Default: various) # Optional variables VALGRIND_SUPPRESSIONS ?= $(addprefix --suppressions=,$(VALGRIND_SUPPRESSIONS_FILES)) VALGRIND_FLAGS ?= --num-callers=30 VALGRIND_memcheck_FLAGS ?= --leak-check=full --show-reachable=no VALGRIND_helgrind_FLAGS ?= --history-level=approx VALGRIND_drd_FLAGS ?= VALGRIND_sgcheck_FLAGS ?= # Internal use valgrind_log_files = $(addprefix test-suite-,$(addsuffix .log,$(valgrind_tools))) valgrind_memcheck_flags = --tool=memcheck $(VALGRIND_memcheck_FLAGS) valgrind_helgrind_flags = --tool=helgrind $(VALGRIND_helgrind_FLAGS) valgrind_drd_flags = --tool=drd $(VALGRIND_drd_FLAGS) valgrind_sgcheck_flags = --tool=exp-sgcheck $(VALGRIND_sgcheck_FLAGS) valgrind_quiet = $(valgrind_quiet_$(V)) valgrind_quiet_ = $(valgrind_quiet_$(AM_DEFAULT_VERBOSITY)) valgrind_quiet_0 = --quiet valgrind_v_use = $(valgrind_v_use_$(V)) valgrind_v_use_ = $(valgrind_v_use_$(AM_DEFAULT_VERBOSITY)) valgrind_v_use_0 = @echo " USE " $(patsubst check-valgrind-%,%,$''@):; # Support running with and without libtool. ifneq ($(LIBTOOL),) valgrind_lt = $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=execute else valgrind_lt = endif # Use recursive makes in order to ignore errors during check check-valgrind: ifeq ($(VALGRIND_ENABLED),yes) -$(A''M_V_at)$(foreach tool,$(valgrind_enabled_tools), \ $(MAKE) $(AM_MAKEFLAGS) -k check-valgrind-$(tool); \ ) else @echo "Need to reconfigure with --enable-valgrind" endif # Valgrind running VALGRIND_TESTS_ENVIRONMENT = \ $(TESTS_ENVIRONMENT) \ env VALGRIND=$(VALGRIND) \ G_SLICE=always-malloc,debug-blocks \ G_DEBUG=fatal-warnings,fatal-criticals,gc-friendly VALGRIND_LOG_COMPILER = test/test-suite.sh $(VALGRIND_SUPPRESSIONS) $(VALGRIND_FLAGS) # $(valgrind_lt) \ # $(VALGRIND) $(VALGRIND_SUPPRESSIONS) --error-exitcode=1 $(VALGRIND_FLAGS) define valgrind_tool_rule = check-valgrind-$(1): ifeq ($$(VALGRIND_ENABLED)-$$(ENABLE_VALGRIND_$(1)),yes-yes) $$(valgrind_v_use)$$(MAKE) check-TESTS \ TESTS_ENVIRONMENT="$$(VALGRIND_TESTS_ENVIRONMENT)" \ LOG_COMPILER="$$(VALGRIND_LOG_COMPILER)" \ LOG_FLAGS="$$(valgrind_$(1)_flags)" \ TEST_SUITE_LOG=test-suite-$(1).log else ifeq ($$(VALGRIND_ENABLED),yes) @echo "Need to reconfigure with --enable-valgrind-$(1)" else @echo "Need to reconfigure with --enable-valgrind" endif endef $(foreach tool,$(valgrind_tools),$(eval $(call valgrind_tool_rule,$(tool)))) A''M_DISTCHECK_CONFIGURE_FLAGS ?= A''M_DISTCHECK_CONFIGURE_FLAGS += --disable-valgrind MOSTLYCLEANFILES ?= MOSTLYCLEANFILES += $(valgrind_log_files) .PHONY: check-valgrind $(add-prefix check-valgrind-,$(valgrind_tools)) '] AC_SUBST([VALGRIND_CHECK_RULES]) m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([VALGRIND_CHECK_RULES])]) ]) modsecurity-v3.0.6/build/release.sh0000775000175000017500000000062014146026157020461 0ustar mhsvierulamhsvierula#!/bin/bash git clean -xfdi git submodule foreach --recursive git clean -xfdi VERSION=`git describe --tags` DIR_NAME="modsecurity-$VERSION" TAR_NAME="modsecurity-$VERSION.tar.gz" MY_DIR=${PWD##*/} ./build.sh cd .. tar --transform "s/^$MY_DIR/$DIR_NAME/" -cvzf $TAR_NAME --exclude .git $MY_DIR sha256sum $TAR_NAME > $TAR_NAME.sha256 gpg --detach-sign -a $TAR_NAME cd - echo $TAR_NAME ": done." modsecurity-v3.0.6/build/.empty0000664000175000017500000000000014146026157017631 0ustar mhsvierulamhsvierulamodsecurity-v3.0.6/build/ax_prog_doxygen.m40000664000175000017500000004276214146026157022155 0ustar mhsvierulamhsvierula# =========================================================================== # http://www.gnu.org/software/autoconf-archive/ax_prog_doxygen.html # =========================================================================== # # SYNOPSIS # # DX_INIT_DOXYGEN(PROJECT-NAME, DOXYFILE-PATH, [OUTPUT-DIR]) # DX_DOXYGEN_FEATURE(ON|OFF) # DX_DOT_FEATURE(ON|OFF) # DX_HTML_FEATURE(ON|OFF) # DX_CHM_FEATURE(ON|OFF) # DX_CHI_FEATURE(ON|OFF) # DX_MAN_FEATURE(ON|OFF) # DX_RTF_FEATURE(ON|OFF) # DX_XML_FEATURE(ON|OFF) # DX_PDF_FEATURE(ON|OFF) # DX_PS_FEATURE(ON|OFF) # # DESCRIPTION # # The DX_*_FEATURE macros control the default setting for the given # Doxygen feature. Supported features are 'DOXYGEN' itself, 'DOT' for # generating graphics, 'HTML' for plain HTML, 'CHM' for compressed HTML # help (for MS users), 'CHI' for generating a seperate .chi file by the # .chm file, and 'MAN', 'RTF', 'XML', 'PDF' and 'PS' for the appropriate # output formats. The environment variable DOXYGEN_PAPER_SIZE may be # specified to override the default 'a4wide' paper size. # # By default, HTML, PDF and PS documentation is generated as this seems to # be the most popular and portable combination. MAN pages created by # Doxygen are usually problematic, though by picking an appropriate subset # and doing some massaging they might be better than nothing. CHM and RTF # are specific for MS (note that you can't generate both HTML and CHM at # the same time). The XML is rather useless unless you apply specialized # post-processing to it. # # The macros mainly control the default state of the feature. The use can # override the default by specifying --enable or --disable. The macros # ensure that contradictory flags are not given (e.g., # --enable-doxygen-html and --enable-doxygen-chm, # --enable-doxygen-anything with --disable-doxygen, etc.) Finally, each # feature will be automatically disabled (with a warning) if the required # programs are missing. # # Once all the feature defaults have been specified, call DX_INIT_DOXYGEN # with the following parameters: a one-word name for the project for use # as a filename base etc., an optional configuration file name (the # default is 'Doxyfile', the same as Doxygen's default), and an optional # output directory name (the default is 'doxygen-doc'). # # Automake Support # # The following is a template aminclude.am file for use with Automake. # Make targets and variables values are controlled by the various # DX_COND_* conditionals set by autoconf. # # The provided targets are: # # doxygen-doc: Generate all doxygen documentation. # # doxygen-run: Run doxygen, which will generate some of the # documentation (HTML, CHM, CHI, MAN, RTF, XML) # but will not do the post processing required # for the rest of it (PS, PDF, and some MAN). # # doxygen-man: Rename some doxygen generated man pages. # # doxygen-ps: Generate doxygen PostScript documentation. # # doxygen-pdf: Generate doxygen PDF documentation. # # Note that by default these are not integrated into the automake targets. # If doxygen is used to generate man pages, you can achieve this # integration by setting man3_MANS to the list of man pages generated and # then adding the dependency: # # $(man3_MANS): doxygen-doc # # This will cause make to run doxygen and generate all the documentation. # # The following variable is intended for use in Makefile.am: # # DX_CLEANFILES = everything to clean. # # Then add this variable to MOSTLYCLEANFILES. # # ----- begin aminclude.am ------------------------------------- # # ## --------------------------------- ## # ## Format-independent Doxygen rules. ## # ## --------------------------------- ## # # if DX_COND_doc # # ## ------------------------------- ## # ## Rules specific for HTML output. ## # ## ------------------------------- ## # # if DX_COND_html # # DX_CLEAN_HTML = @DX_DOCDIR@/html # # endif DX_COND_html # # ## ------------------------------ ## # ## Rules specific for CHM output. ## # ## ------------------------------ ## # # if DX_COND_chm # # DX_CLEAN_CHM = @DX_DOCDIR@/chm # # if DX_COND_chi # # DX_CLEAN_CHI = @DX_DOCDIR@/@PACKAGE@.chi # # endif DX_COND_chi # # endif DX_COND_chm # # ## ------------------------------ ## # ## Rules specific for MAN output. ## # ## ------------------------------ ## # # if DX_COND_man # # DX_CLEAN_MAN = @DX_DOCDIR@/man # # endif DX_COND_man # # ## ------------------------------ ## # ## Rules specific for RTF output. ## # ## ------------------------------ ## # # if DX_COND_rtf # # DX_CLEAN_RTF = @DX_DOCDIR@/rtf # # endif DX_COND_rtf # # ## ------------------------------ ## # ## Rules specific for XML output. ## # ## ------------------------------ ## # # if DX_COND_xml # # DX_CLEAN_XML = @DX_DOCDIR@/xml # # endif DX_COND_xml # # ## ----------------------------- ## # ## Rules specific for PS output. ## # ## ----------------------------- ## # # if DX_COND_ps # # DX_CLEAN_PS = @DX_DOCDIR@/@PACKAGE@.ps # # DX_PS_GOAL = doxygen-ps # # doxygen-ps: @DX_DOCDIR@/@PACKAGE@.ps # # @DX_DOCDIR@/@PACKAGE@.ps: @DX_DOCDIR@/@PACKAGE@.tag # cd @DX_DOCDIR@/latex; \ # rm -f *.aux *.toc *.idx *.ind *.ilg *.log *.out; \ # $(DX_LATEX) refman.tex; \ # $(MAKEINDEX_PATH) refman.idx; \ # $(DX_LATEX) refman.tex; \ # countdown=5; \ # while $(DX_EGREP) 'Rerun (LaTeX|to get cross-references right)' \ # refman.log > /dev/null 2>&1 \ # && test $$countdown -gt 0; do \ # $(DX_LATEX) refman.tex; \ # countdown=`expr $$countdown - 1`; \ # done; \ # $(DX_DVIPS) -o ../@PACKAGE@.ps refman.dvi # # endif DX_COND_ps # # ## ------------------------------ ## # ## Rules specific for PDF output. ## # ## ------------------------------ ## # # if DX_COND_pdf # # DX_CLEAN_PDF = @DX_DOCDIR@/@PACKAGE@.pdf # # DX_PDF_GOAL = doxygen-pdf # # doxygen-pdf: @DX_DOCDIR@/@PACKAGE@.pdf # # @DX_DOCDIR@/@PACKAGE@.pdf: @DX_DOCDIR@/@PACKAGE@.tag # cd @DX_DOCDIR@/latex; \ # rm -f *.aux *.toc *.idx *.ind *.ilg *.log *.out; \ # $(DX_PDFLATEX) refman.tex; \ # $(DX_MAKEINDEX) refman.idx; \ # $(DX_PDFLATEX) refman.tex; \ # countdown=5; \ # while $(DX_EGREP) 'Rerun (LaTeX|to get cross-references right)' \ # refman.log > /dev/null 2>&1 \ # && test $$countdown -gt 0; do \ # $(DX_PDFLATEX) refman.tex; \ # countdown=`expr $$countdown - 1`; \ # done; \ # mv refman.pdf ../@PACKAGE@.pdf # # endif DX_COND_pdf # # ## ------------------------------------------------- ## # ## Rules specific for LaTeX (shared for PS and PDF). ## # ## ------------------------------------------------- ## # # if DX_COND_latex # # DX_CLEAN_LATEX = @DX_DOCDIR@/latex # # endif DX_COND_latex # # .PHONY: doxygen-run doxygen-doc $(DX_PS_GOAL) $(DX_PDF_GOAL) # # .INTERMEDIATE: doxygen-run $(DX_PS_GOAL) $(DX_PDF_GOAL) # # doxygen-run: @DX_DOCDIR@/@PACKAGE@.tag # # doxygen-doc: doxygen-run $(DX_PS_GOAL) $(DX_PDF_GOAL) # # @DX_DOCDIR@/@PACKAGE@.tag: $(DX_CONFIG) $(pkginclude_HEADERS) # rm -rf @DX_DOCDIR@ # $(DX_ENV) $(DX_DOXYGEN) $(srcdir)/$(DX_CONFIG) # echo Timestamp >$@ # # DX_CLEANFILES = \ # @DX_DOCDIR@/@PACKAGE@.tag \ # -r \ # $(DX_CLEAN_HTML) \ # $(DX_CLEAN_CHM) \ # $(DX_CLEAN_CHI) \ # $(DX_CLEAN_MAN) \ # $(DX_CLEAN_RTF) \ # $(DX_CLEAN_XML) \ # $(DX_CLEAN_PS) \ # $(DX_CLEAN_PDF) \ # $(DX_CLEAN_LATEX) # # endif DX_COND_doc # # ----- end aminclude.am --------------------------------------- # # LICENSE # # Copyright (c) 2009 Oren Ben-Kiki # # Copying and distribution of this file, with or without modification, are # permitted in any medium without royalty provided the copyright notice # and this notice are preserved. This file is offered as-is, without any # warranty. #serial 13 ## ----------## ## Defaults. ## ## ----------## DX_ENV="" AC_DEFUN([DX_FEATURE_doc], ON) AC_DEFUN([DX_FEATURE_dot], OFF) AC_DEFUN([DX_FEATURE_man], OFF) AC_DEFUN([DX_FEATURE_html], ON) AC_DEFUN([DX_FEATURE_chm], OFF) AC_DEFUN([DX_FEATURE_chi], OFF) AC_DEFUN([DX_FEATURE_rtf], OFF) AC_DEFUN([DX_FEATURE_xml], OFF) AC_DEFUN([DX_FEATURE_pdf], ON) AC_DEFUN([DX_FEATURE_ps], ON) ## --------------- ## ## Private macros. ## ## --------------- ## # DX_ENV_APPEND(VARIABLE, VALUE) # ------------------------------ # Append VARIABLE="VALUE" to DX_ENV for invoking doxygen. AC_DEFUN([DX_ENV_APPEND], [AC_SUBST([DX_ENV], ["$DX_ENV $1='$2'"])]) # DX_DIRNAME_EXPR # --------------- # Expand into a shell expression prints the directory part of a path. AC_DEFUN([DX_DIRNAME_EXPR], [[expr ".$1" : '\(\.\)[^/]*$' \| "x$1" : 'x\(.*\)/[^/]*$']]) # DX_IF_FEATURE(FEATURE, IF-ON, IF-OFF) # ------------------------------------- # Expands according to the M4 (static) status of the feature. AC_DEFUN([DX_IF_FEATURE], [ifelse(DX_FEATURE_$1, ON, [$2], [$3])]) # DX_REQUIRE_PROG(VARIABLE, PROGRAM) # ---------------------------------- # Require the specified program to be found for the DX_CURRENT_FEATURE to work. AC_DEFUN([DX_REQUIRE_PROG], [ AC_PATH_TOOL([$1], [$2]) if test "$DX_FLAG_[]DX_CURRENT_FEATURE$$1" = 1; then AC_MSG_WARN([$2 not found - will not DX_CURRENT_DESCRIPTION]) AC_SUBST(DX_FLAG_[]DX_CURRENT_FEATURE, 0) fi ]) # DX_TEST_FEATURE(FEATURE) # ------------------------ # Expand to a shell expression testing whether the feature is active. AC_DEFUN([DX_TEST_FEATURE], [test "$DX_FLAG_$1" = 1]) # DX_CHECK_DEPEND(REQUIRED_FEATURE, REQUIRED_STATE) # ------------------------------------------------- # Verify that a required features has the right state before trying to turn on # the DX_CURRENT_FEATURE. AC_DEFUN([DX_CHECK_DEPEND], [ test "$DX_FLAG_$1" = "$2" \ || AC_MSG_ERROR([doxygen-DX_CURRENT_FEATURE ifelse([$2], 1, requires, contradicts) doxygen-DX_CURRENT_FEATURE]) ]) # DX_CLEAR_DEPEND(FEATURE, REQUIRED_FEATURE, REQUIRED_STATE) # ---------------------------------------------------------- # Turn off the DX_CURRENT_FEATURE if the required feature is off. AC_DEFUN([DX_CLEAR_DEPEND], [ test "$DX_FLAG_$1" = "$2" || AC_SUBST(DX_FLAG_[]DX_CURRENT_FEATURE, 0) ]) # DX_FEATURE_ARG(FEATURE, DESCRIPTION, # CHECK_DEPEND, CLEAR_DEPEND, # REQUIRE, DO-IF-ON, DO-IF-OFF) # -------------------------------------------- # Parse the command-line option controlling a feature. CHECK_DEPEND is called # if the user explicitly turns the feature on (and invokes DX_CHECK_DEPEND), # otherwise CLEAR_DEPEND is called to turn off the default state if a required # feature is disabled (using DX_CLEAR_DEPEND). REQUIRE performs additional # requirement tests (DX_REQUIRE_PROG). Finally, an automake flag is set and # DO-IF-ON or DO-IF-OFF are called according to the final state of the feature. AC_DEFUN([DX_ARG_ABLE], [ AC_DEFUN([DX_CURRENT_FEATURE], [$1]) AC_DEFUN([DX_CURRENT_DESCRIPTION], [$2]) AC_ARG_ENABLE(doxygen-$1, [AS_HELP_STRING(DX_IF_FEATURE([$1], [--disable-doxygen-$1], [--enable-doxygen-$1]), DX_IF_FEATURE([$1], [don't $2], [$2]))], [ case "$enableval" in #( y|Y|yes|Yes|YES) AC_SUBST([DX_FLAG_$1], 1) $3 ;; #( n|N|no|No|NO) AC_SUBST([DX_FLAG_$1], 0) ;; #( *) AC_MSG_ERROR([invalid value '$enableval' given to doxygen-$1]) ;; esac ], [ AC_SUBST([DX_FLAG_$1], [DX_IF_FEATURE([$1], 1, 0)]) $4 ]) if DX_TEST_FEATURE([$1]); then $5 : fi AM_CONDITIONAL(DX_COND_$1, DX_TEST_FEATURE([$1])) if DX_TEST_FEATURE([$1]); then $6 : else $7 : fi ]) ## -------------- ## ## Public macros. ## ## -------------- ## # DX_XXX_FEATURE(DEFAULT_STATE) # ----------------------------- AC_DEFUN([DX_DOXYGEN_FEATURE], [AC_DEFUN([DX_FEATURE_doc], [$1])]) AC_DEFUN([DX_DOT_FEATURE], [AC_DEFUN([DX_FEATURE_dot], [$1])]) AC_DEFUN([DX_MAN_FEATURE], [AC_DEFUN([DX_FEATURE_man], [$1])]) AC_DEFUN([DX_HTML_FEATURE], [AC_DEFUN([DX_FEATURE_html], [$1])]) AC_DEFUN([DX_CHM_FEATURE], [AC_DEFUN([DX_FEATURE_chm], [$1])]) AC_DEFUN([DX_CHI_FEATURE], [AC_DEFUN([DX_FEATURE_chi], [$1])]) AC_DEFUN([DX_RTF_FEATURE], [AC_DEFUN([DX_FEATURE_rtf], [$1])]) AC_DEFUN([DX_XML_FEATURE], [AC_DEFUN([DX_FEATURE_xml], [$1])]) AC_DEFUN([DX_XML_FEATURE], [AC_DEFUN([DX_FEATURE_xml], [$1])]) AC_DEFUN([DX_PDF_FEATURE], [AC_DEFUN([DX_FEATURE_pdf], [$1])]) AC_DEFUN([DX_PS_FEATURE], [AC_DEFUN([DX_FEATURE_ps], [$1])]) # DX_INIT_DOXYGEN(PROJECT, [CONFIG-FILE], [OUTPUT-DOC-DIR]) # --------------------------------------------------------- # PROJECT also serves as the base name for the documentation files. # The default CONFIG-FILE is "Doxyfile" and OUTPUT-DOC-DIR is "doxygen-doc". AC_DEFUN([DX_INIT_DOXYGEN], [ # Files: AC_SUBST([DX_PROJECT], [$1]) AC_SUBST([DX_CONFIG], [ifelse([$2], [], Doxyfile, [$2])]) AC_SUBST([DX_DOCDIR], [ifelse([$3], [], doxygen-doc, [$3])]) # Environment variables used inside doxygen.cfg: DX_ENV_APPEND(SRCDIR, $srcdir) DX_ENV_APPEND(PROJECT, $DX_PROJECT) DX_ENV_APPEND(DOCDIR, $DX_DOCDIR) DX_ENV_APPEND(VERSION, $PACKAGE_VERSION) # Doxygen itself: DX_ARG_ABLE(doc, [generate any doxygen documentation], [], [], [DX_REQUIRE_PROG([DX_DOXYGEN], doxygen) DX_REQUIRE_PROG([DX_PERL], perl)], [DX_ENV_APPEND(PERL_PATH, $DX_PERL)]) # Dot for graphics: DX_ARG_ABLE(dot, [generate graphics for doxygen documentation], [DX_CHECK_DEPEND(doc, 1)], [DX_CLEAR_DEPEND(doc, 1)], [DX_REQUIRE_PROG([DX_DOT], dot)], [DX_ENV_APPEND(HAVE_DOT, YES) DX_ENV_APPEND(DOT_PATH, [`DX_DIRNAME_EXPR($DX_DOT)`])], [DX_ENV_APPEND(HAVE_DOT, NO)]) # Man pages generation: DX_ARG_ABLE(man, [generate doxygen manual pages], [DX_CHECK_DEPEND(doc, 1)], [DX_CLEAR_DEPEND(doc, 1)], [], [DX_ENV_APPEND(GENERATE_MAN, YES)], [DX_ENV_APPEND(GENERATE_MAN, NO)]) # RTF file generation: DX_ARG_ABLE(rtf, [generate doxygen RTF documentation], [DX_CHECK_DEPEND(doc, 1)], [DX_CLEAR_DEPEND(doc, 1)], [], [DX_ENV_APPEND(GENERATE_RTF, YES)], [DX_ENV_APPEND(GENERATE_RTF, NO)]) # XML file generation: DX_ARG_ABLE(xml, [generate doxygen XML documentation], [DX_CHECK_DEPEND(doc, 1)], [DX_CLEAR_DEPEND(doc, 1)], [], [DX_ENV_APPEND(GENERATE_XML, YES)], [DX_ENV_APPEND(GENERATE_XML, NO)]) # (Compressed) HTML help generation: DX_ARG_ABLE(chm, [generate doxygen compressed HTML help documentation], [DX_CHECK_DEPEND(doc, 1)], [DX_CLEAR_DEPEND(doc, 1)], [DX_REQUIRE_PROG([DX_HHC], hhc)], [DX_ENV_APPEND(HHC_PATH, $DX_HHC) DX_ENV_APPEND(GENERATE_HTML, YES) DX_ENV_APPEND(GENERATE_HTMLHELP, YES)], [DX_ENV_APPEND(GENERATE_HTMLHELP, NO)]) # Seperate CHI file generation. DX_ARG_ABLE(chi, [generate doxygen seperate compressed HTML help index file], [DX_CHECK_DEPEND(chm, 1)], [DX_CLEAR_DEPEND(chm, 1)], [], [DX_ENV_APPEND(GENERATE_CHI, YES)], [DX_ENV_APPEND(GENERATE_CHI, NO)]) # Plain HTML pages generation: DX_ARG_ABLE(html, [generate doxygen plain HTML documentation], [DX_CHECK_DEPEND(doc, 1) DX_CHECK_DEPEND(chm, 0)], [DX_CLEAR_DEPEND(doc, 1) DX_CLEAR_DEPEND(chm, 0)], [], [DX_ENV_APPEND(GENERATE_HTML, YES)], [DX_TEST_FEATURE(chm) || DX_ENV_APPEND(GENERATE_HTML, NO)]) # PostScript file generation: DX_ARG_ABLE(ps, [generate doxygen PostScript documentation], [DX_CHECK_DEPEND(doc, 1)], [DX_CLEAR_DEPEND(doc, 1)], [DX_REQUIRE_PROG([DX_LATEX], latex) DX_REQUIRE_PROG([DX_MAKEINDEX], makeindex) DX_REQUIRE_PROG([DX_DVIPS], dvips) DX_REQUIRE_PROG([DX_EGREP], egrep)]) # PDF file generation: DX_ARG_ABLE(pdf, [generate doxygen PDF documentation], [DX_CHECK_DEPEND(doc, 1)], [DX_CLEAR_DEPEND(doc, 1)], [DX_REQUIRE_PROG([DX_PDFLATEX], pdflatex) DX_REQUIRE_PROG([DX_MAKEINDEX], makeindex) DX_REQUIRE_PROG([DX_EGREP], egrep)]) # LaTeX generation for PS and/or PDF: AM_CONDITIONAL(DX_COND_latex, DX_TEST_FEATURE(ps) || DX_TEST_FEATURE(pdf)) if DX_TEST_FEATURE(ps) || DX_TEST_FEATURE(pdf); then DX_ENV_APPEND(GENERATE_LATEX, YES) else DX_ENV_APPEND(GENERATE_LATEX, NO) fi # Paper size for PS and/or PDF: AC_ARG_VAR(DOXYGEN_PAPER_SIZE, [a4wide (default), a4, letter, legal or executive]) case "$DOXYGEN_PAPER_SIZE" in #( "") AC_SUBST(DOXYGEN_PAPER_SIZE, "") ;; #( a4wide|a4|letter|legal|executive) DX_ENV_APPEND(PAPER_SIZE, $DOXYGEN_PAPER_SIZE) ;; #( *) AC_MSG_ERROR([unknown DOXYGEN_PAPER_SIZE='$DOXYGEN_PAPER_SIZE']) ;; esac #For debugging: #echo DX_FLAG_doc=$DX_FLAG_doc #echo DX_FLAG_dot=$DX_FLAG_dot #echo DX_FLAG_man=$DX_FLAG_man #echo DX_FLAG_html=$DX_FLAG_html #echo DX_FLAG_chm=$DX_FLAG_chm #echo DX_FLAG_chi=$DX_FLAG_chi #echo DX_FLAG_rtf=$DX_FLAG_rtf #echo DX_FLAG_xml=$DX_FLAG_xml #echo DX_FLAG_pdf=$DX_FLAG_pdf #echo DX_FLAG_ps=$DX_FLAG_ps #echo DX_ENV=$DX_ENV ]) modsecurity-v3.0.6/build/ltsugar.m40000644000175000017500000001044014146027111020413 0ustar mhsvierulamhsvierula# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- # # Copyright (C) 2004-2005, 2007-2008, 2011-2015 Free Software # Foundation, Inc. # Written by Gary V. Vaughan, 2004 # # This file 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. # serial 6 ltsugar.m4 # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) # lt_join(SEP, ARG1, [ARG2...]) # ----------------------------- # Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their # associated separator. # Needed until we can rely on m4_join from Autoconf 2.62, since all earlier # versions in m4sugar had bugs. m4_define([lt_join], [m4_if([$#], [1], [], [$#], [2], [[$2]], [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) m4_define([_lt_join], [m4_if([$#$2], [2], [], [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) # lt_car(LIST) # lt_cdr(LIST) # ------------ # Manipulate m4 lists. # These macros are necessary as long as will still need to support # Autoconf-2.59, which quotes differently. m4_define([lt_car], [[$1]]) m4_define([lt_cdr], [m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], [$#], 1, [], [m4_dquote(m4_shift($@))])]) m4_define([lt_unquote], $1) # lt_append(MACRO-NAME, STRING, [SEPARATOR]) # ------------------------------------------ # Redefine MACRO-NAME to hold its former content plus 'SEPARATOR''STRING'. # Note that neither SEPARATOR nor STRING are expanded; they are appended # to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). # No SEPARATOR is output if MACRO-NAME was previously undefined (different # than defined and empty). # # This macro is needed until we can rely on Autoconf 2.62, since earlier # versions of m4sugar mistakenly expanded SEPARATOR but not STRING. m4_define([lt_append], [m4_define([$1], m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) # lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) # ---------------------------------------------------------- # Produce a SEP delimited list of all paired combinations of elements of # PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list # has the form PREFIXmINFIXSUFFIXn. # Needed until we can rely on m4_combine added in Autoconf 2.62. m4_define([lt_combine], [m4_if(m4_eval([$# > 3]), [1], [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl [[m4_foreach([_Lt_prefix], [$2], [m4_foreach([_Lt_suffix], ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) # lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) # ----------------------------------------------------------------------- # Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited # by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. m4_define([lt_if_append_uniq], [m4_ifdef([$1], [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], [lt_append([$1], [$2], [$3])$4], [$5])], [lt_append([$1], [$2], [$3])$4])]) # lt_dict_add(DICT, KEY, VALUE) # ----------------------------- m4_define([lt_dict_add], [m4_define([$1($2)], [$3])]) # lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) # -------------------------------------------- m4_define([lt_dict_add_subkey], [m4_define([$1($2:$3)], [$4])]) # lt_dict_fetch(DICT, KEY, [SUBKEY]) # ---------------------------------- m4_define([lt_dict_fetch], [m4_ifval([$3], m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) # lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) # ----------------------------------------------------------------- m4_define([lt_if_dict_fetch], [m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], [$5], [$6])]) # lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) # -------------------------------------------------------------- m4_define([lt_dict_filter], [m4_if([$5], [], [], [lt_join(m4_quote(m4_default([$4], [[, ]])), lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl ]) modsecurity-v3.0.6/ltmain.sh0000644000175000017500000117147414146027111017231 0ustar mhsvierulamhsvierula#! /bin/sh ## DO NOT EDIT - This file generated from ./build-aux/ltmain.in ## by inline-source v2014-01-03.01 # libtool (GNU libtool) 2.4.6 # Provide generalized library-building support services. # Written by Gordon Matzigkeit , 1996 # Copyright (C) 1996-2015 Free Software Foundation, Inc. # This is free software; see the source for copying conditions. There is NO # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # GNU Libtool is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # As a special exception to the GNU General Public License, # if you distribute this file as part of a program or library that # is built using GNU Libtool, you may include this file under the # same distribution terms that you use for the rest of that program. # # GNU Libtool is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . PROGRAM=libtool PACKAGE=libtool VERSION="2.4.6 Debian-2.4.6-2" package_revision=2.4.6 ## ------ ## ## Usage. ## ## ------ ## # Run './libtool --help' for help with using this script from the # command line. ## ------------------------------- ## ## User overridable command paths. ## ## ------------------------------- ## # After configure completes, it has a better idea of some of the # shell tools we need than the defaults used by the functions shared # with bootstrap, so set those here where they can still be over- # ridden by the user, but otherwise take precedence. : ${AUTOCONF="autoconf"} : ${AUTOMAKE="automake"} ## -------------------------- ## ## Source external libraries. ## ## -------------------------- ## # Much of our low-level functionality needs to be sourced from external # libraries, which are installed to $pkgauxdir. # Set a version string for this script. scriptversion=2015-01-20.17; # UTC # General shell script boiler plate, and helper functions. # Written by Gary V. Vaughan, 2004 # Copyright (C) 2004-2015 Free Software Foundation, Inc. # This is free software; see the source for copying conditions. There is NO # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # As a special exception to the GNU General Public License, if you distribute # this file as part of a program or library that is built using GNU Libtool, # you may include this file under the same distribution terms that you use # for the rest of that program. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNES FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see . # Please report bugs or propose patches to gary@gnu.org. ## ------ ## ## Usage. ## ## ------ ## # Evaluate this file near the top of your script to gain access to # the functions and variables defined here: # # . `echo "$0" | ${SED-sed} 's|[^/]*$||'`/build-aux/funclib.sh # # If you need to override any of the default environment variable # settings, do that before evaluating this file. ## -------------------- ## ## Shell normalisation. ## ## -------------------- ## # Some shells need a little help to be as Bourne compatible as possible. # Before doing anything else, make sure all that help has been provided! DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi # NLS nuisances: We save the old values in case they are required later. _G_user_locale= _G_safe_locale= for _G_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES do eval "if test set = \"\${$_G_var+set}\"; then save_$_G_var=\$$_G_var $_G_var=C export $_G_var _G_user_locale=\"$_G_var=\\\$save_\$_G_var; \$_G_user_locale\" _G_safe_locale=\"$_G_var=C; \$_G_safe_locale\" fi" done # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # Make sure IFS has a sensible default sp=' ' nl=' ' IFS="$sp $nl" # There are apparently some retarded systems that use ';' as a PATH separator! if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi ## ------------------------- ## ## Locate command utilities. ## ## ------------------------- ## # func_executable_p FILE # ---------------------- # Check that FILE is an executable regular file. func_executable_p () { test -f "$1" && test -x "$1" } # func_path_progs PROGS_LIST CHECK_FUNC [PATH] # -------------------------------------------- # Search for either a program that responds to --version with output # containing "GNU", or else returned by CHECK_FUNC otherwise, by # trying all the directories in PATH with each of the elements of # PROGS_LIST. # # CHECK_FUNC should accept the path to a candidate program, and # set $func_check_prog_result if it truncates its output less than # $_G_path_prog_max characters. func_path_progs () { _G_progs_list=$1 _G_check_func=$2 _G_PATH=${3-"$PATH"} _G_path_prog_max=0 _G_path_prog_found=false _G_save_IFS=$IFS; IFS=${PATH_SEPARATOR-:} for _G_dir in $_G_PATH; do IFS=$_G_save_IFS test -z "$_G_dir" && _G_dir=. for _G_prog_name in $_G_progs_list; do for _exeext in '' .EXE; do _G_path_prog=$_G_dir/$_G_prog_name$_exeext func_executable_p "$_G_path_prog" || continue case `"$_G_path_prog" --version 2>&1` in *GNU*) func_path_progs_result=$_G_path_prog _G_path_prog_found=: ;; *) $_G_check_func $_G_path_prog func_path_progs_result=$func_check_prog_result ;; esac $_G_path_prog_found && break 3 done done done IFS=$_G_save_IFS test -z "$func_path_progs_result" && { echo "no acceptable sed could be found in \$PATH" >&2 exit 1 } } # We want to be able to use the functions in this file before configure # has figured out where the best binaries are kept, which means we have # to search for them ourselves - except when the results are already set # where we skip the searches. # Unless the user overrides by setting SED, search the path for either GNU # sed, or the sed that truncates its output the least. test -z "$SED" && { _G_sed_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ for _G_i in 1 2 3 4 5 6 7; do _G_sed_script=$_G_sed_script$nl$_G_sed_script done echo "$_G_sed_script" 2>/dev/null | sed 99q >conftest.sed _G_sed_script= func_check_prog_sed () { _G_path_prog=$1 _G_count=0 printf 0123456789 >conftest.in while : do cat conftest.in conftest.in >conftest.tmp mv conftest.tmp conftest.in cp conftest.in conftest.nl echo '' >> conftest.nl "$_G_path_prog" -f conftest.sed conftest.out 2>/dev/null || break diff conftest.out conftest.nl >/dev/null 2>&1 || break _G_count=`expr $_G_count + 1` if test "$_G_count" -gt "$_G_path_prog_max"; then # Best one so far, save it but keep looking for a better one func_check_prog_result=$_G_path_prog _G_path_prog_max=$_G_count fi # 10*(2^10) chars as input seems more than enough test 10 -lt "$_G_count" && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out } func_path_progs "sed gsed" func_check_prog_sed $PATH:/usr/xpg4/bin rm -f conftest.sed SED=$func_path_progs_result } # Unless the user overrides by setting GREP, search the path for either GNU # grep, or the grep that truncates its output the least. test -z "$GREP" && { func_check_prog_grep () { _G_path_prog=$1 _G_count=0 _G_path_prog_max=0 printf 0123456789 >conftest.in while : do cat conftest.in conftest.in >conftest.tmp mv conftest.tmp conftest.in cp conftest.in conftest.nl echo 'GREP' >> conftest.nl "$_G_path_prog" -e 'GREP$' -e '-(cannot match)-' conftest.out 2>/dev/null || break diff conftest.out conftest.nl >/dev/null 2>&1 || break _G_count=`expr $_G_count + 1` if test "$_G_count" -gt "$_G_path_prog_max"; then # Best one so far, save it but keep looking for a better one func_check_prog_result=$_G_path_prog _G_path_prog_max=$_G_count fi # 10*(2^10) chars as input seems more than enough test 10 -lt "$_G_count" && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out } func_path_progs "grep ggrep" func_check_prog_grep $PATH:/usr/xpg4/bin GREP=$func_path_progs_result } ## ------------------------------- ## ## User overridable command paths. ## ## ------------------------------- ## # All uppercase variable names are used for environment variables. These # variables can be overridden by the user before calling a script that # uses them if a suitable command of that name is not already available # in the command search PATH. : ${CP="cp -f"} : ${ECHO="printf %s\n"} : ${EGREP="$GREP -E"} : ${FGREP="$GREP -F"} : ${LN_S="ln -s"} : ${MAKE="make"} : ${MKDIR="mkdir"} : ${MV="mv -f"} : ${RM="rm -f"} : ${SHELL="${CONFIG_SHELL-/bin/sh}"} ## -------------------- ## ## Useful sed snippets. ## ## -------------------- ## sed_dirname='s|/[^/]*$||' sed_basename='s|^.*/||' # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. sed_quote_subst='s|\([`"$\\]\)|\\\1|g' # Same as above, but do not quote variable references. sed_double_quote_subst='s/\(["`\\]\)/\\\1/g' # Sed substitution that turns a string into a regex matching for the # string literally. sed_make_literal_regex='s|[].[^$\\*\/]|\\&|g' # Sed substitution that converts a w32 file name or path # that contains forward slashes, into one that contains # (escaped) backslashes. A very naive implementation. sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' # Re-'\' parameter expansions in output of sed_double_quote_subst that # were '\'-ed in input to the same. If an odd number of '\' preceded a # '$' in input to sed_double_quote_subst, that '$' was protected from # expansion. Since each input '\' is now two '\'s, look for any number # of runs of four '\'s followed by two '\'s and then a '$'. '\' that '$'. _G_bs='\\' _G_bs2='\\\\' _G_bs4='\\\\\\\\' _G_dollar='\$' sed_double_backslash="\ s/$_G_bs4/&\\ /g s/^$_G_bs2$_G_dollar/$_G_bs&/ s/\\([^$_G_bs]\\)$_G_bs2$_G_dollar/\\1$_G_bs2$_G_bs$_G_dollar/g s/\n//g" ## ----------------- ## ## Global variables. ## ## ----------------- ## # Except for the global variables explicitly listed below, the following # functions in the '^func_' namespace, and the '^require_' namespace # variables initialised in the 'Resource management' section, sourcing # this file will not pollute your global namespace with anything # else. There's no portable way to scope variables in Bourne shell # though, so actually running these functions will sometimes place # results into a variable named after the function, and often use # temporary variables in the '^_G_' namespace. If you are careful to # avoid using those namespaces casually in your sourcing script, things # should continue to work as you expect. And, of course, you can freely # overwrite any of the functions or variables defined here before # calling anything to customize them. EXIT_SUCCESS=0 EXIT_FAILURE=1 EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing. EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake. # Allow overriding, eg assuming that you follow the convention of # putting '$debug_cmd' at the start of all your functions, you can get # bash to show function call trace with: # # debug_cmd='eval echo "${FUNCNAME[0]} $*" >&2' bash your-script-name debug_cmd=${debug_cmd-":"} exit_cmd=: # By convention, finish your script with: # # exit $exit_status # # so that you can set exit_status to non-zero if you want to indicate # something went wrong during execution without actually bailing out at # the point of failure. exit_status=$EXIT_SUCCESS # Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh # is ksh but when the shell is invoked as "sh" and the current value of # the _XPG environment variable is not equal to 1 (one), the special # positional parameter $0, within a function call, is the name of the # function. progpath=$0 # The name of this program. progname=`$ECHO "$progpath" |$SED "$sed_basename"` # Make sure we have an absolute progpath for reexecution: case $progpath in [\\/]*|[A-Za-z]:\\*) ;; *[\\/]*) progdir=`$ECHO "$progpath" |$SED "$sed_dirname"` progdir=`cd "$progdir" && pwd` progpath=$progdir/$progname ;; *) _G_IFS=$IFS IFS=${PATH_SEPARATOR-:} for progdir in $PATH; do IFS=$_G_IFS test -x "$progdir/$progname" && break done IFS=$_G_IFS test -n "$progdir" || progdir=`pwd` progpath=$progdir/$progname ;; esac ## ----------------- ## ## Standard options. ## ## ----------------- ## # The following options affect the operation of the functions defined # below, and should be set appropriately depending on run-time para- # meters passed on the command line. opt_dry_run=false opt_quiet=false opt_verbose=false # Categories 'all' and 'none' are always available. Append any others # you will pass as the first argument to func_warning from your own # code. warning_categories= # By default, display warnings according to 'opt_warning_types'. Set # 'warning_func' to ':' to elide all warnings, or func_fatal_error to # treat the next displayed warning as a fatal error. warning_func=func_warn_and_continue # Set to 'all' to display all warnings, 'none' to suppress all # warnings, or a space delimited list of some subset of # 'warning_categories' to display only the listed warnings. opt_warning_types=all ## -------------------- ## ## Resource management. ## ## -------------------- ## # This section contains definitions for functions that each ensure a # particular resource (a file, or a non-empty configuration variable for # example) is available, and if appropriate to extract default values # from pertinent package files. Call them using their associated # 'require_*' variable to ensure that they are executed, at most, once. # # It's entirely deliberate that calling these functions can set # variables that don't obey the namespace limitations obeyed by the rest # of this file, in order that that they be as useful as possible to # callers. # require_term_colors # ------------------- # Allow display of bold text on terminals that support it. require_term_colors=func_require_term_colors func_require_term_colors () { $debug_cmd test -t 1 && { # COLORTERM and USE_ANSI_COLORS environment variables take # precedence, because most terminfo databases neglect to describe # whether color sequences are supported. test -n "${COLORTERM+set}" && : ${USE_ANSI_COLORS="1"} if test 1 = "$USE_ANSI_COLORS"; then # Standard ANSI escape sequences tc_reset='' tc_bold=''; tc_standout='' tc_red=''; tc_green='' tc_blue=''; tc_cyan='' else # Otherwise trust the terminfo database after all. test -n "`tput sgr0 2>/dev/null`" && { tc_reset=`tput sgr0` test -n "`tput bold 2>/dev/null`" && tc_bold=`tput bold` tc_standout=$tc_bold test -n "`tput smso 2>/dev/null`" && tc_standout=`tput smso` test -n "`tput setaf 1 2>/dev/null`" && tc_red=`tput setaf 1` test -n "`tput setaf 2 2>/dev/null`" && tc_green=`tput setaf 2` test -n "`tput setaf 4 2>/dev/null`" && tc_blue=`tput setaf 4` test -n "`tput setaf 5 2>/dev/null`" && tc_cyan=`tput setaf 5` } fi } require_term_colors=: } ## ----------------- ## ## Function library. ## ## ----------------- ## # This section contains a variety of useful functions to call in your # scripts. Take note of the portable wrappers for features provided by # some modern shells, which will fall back to slower equivalents on # less featureful shells. # func_append VAR VALUE # --------------------- # Append VALUE onto the existing contents of VAR. # We should try to minimise forks, especially on Windows where they are # unreasonably slow, so skip the feature probes when bash or zsh are # being used: if test set = "${BASH_VERSION+set}${ZSH_VERSION+set}"; then : ${_G_HAVE_ARITH_OP="yes"} : ${_G_HAVE_XSI_OPS="yes"} # The += operator was introduced in bash 3.1 case $BASH_VERSION in [12].* | 3.0 | 3.0*) ;; *) : ${_G_HAVE_PLUSEQ_OP="yes"} ;; esac fi # _G_HAVE_PLUSEQ_OP # Can be empty, in which case the shell is probed, "yes" if += is # useable or anything else if it does not work. test -z "$_G_HAVE_PLUSEQ_OP" \ && (eval 'x=a; x+=" b"; test "a b" = "$x"') 2>/dev/null \ && _G_HAVE_PLUSEQ_OP=yes if test yes = "$_G_HAVE_PLUSEQ_OP" then # This is an XSI compatible shell, allowing a faster implementation... eval 'func_append () { $debug_cmd eval "$1+=\$2" }' else # ...otherwise fall back to using expr, which is often a shell builtin. func_append () { $debug_cmd eval "$1=\$$1\$2" } fi # func_append_quoted VAR VALUE # ---------------------------- # Quote VALUE and append to the end of shell variable VAR, separated # by a space. if test yes = "$_G_HAVE_PLUSEQ_OP"; then eval 'func_append_quoted () { $debug_cmd func_quote_for_eval "$2" eval "$1+=\\ \$func_quote_for_eval_result" }' else func_append_quoted () { $debug_cmd func_quote_for_eval "$2" eval "$1=\$$1\\ \$func_quote_for_eval_result" } fi # func_append_uniq VAR VALUE # -------------------------- # Append unique VALUE onto the existing contents of VAR, assuming # entries are delimited by the first character of VALUE. For example: # # func_append_uniq options " --another-option option-argument" # # will only append to $options if " --another-option option-argument " # is not already present somewhere in $options already (note spaces at # each end implied by leading space in second argument). func_append_uniq () { $debug_cmd eval _G_current_value='`$ECHO $'$1'`' _G_delim=`expr "$2" : '\(.\)'` case $_G_delim$_G_current_value$_G_delim in *"$2$_G_delim"*) ;; *) func_append "$@" ;; esac } # func_arith TERM... # ------------------ # Set func_arith_result to the result of evaluating TERMs. test -z "$_G_HAVE_ARITH_OP" \ && (eval 'test 2 = $(( 1 + 1 ))') 2>/dev/null \ && _G_HAVE_ARITH_OP=yes if test yes = "$_G_HAVE_ARITH_OP"; then eval 'func_arith () { $debug_cmd func_arith_result=$(( $* )) }' else func_arith () { $debug_cmd func_arith_result=`expr "$@"` } fi # func_basename FILE # ------------------ # Set func_basename_result to FILE with everything up to and including # the last / stripped. if test yes = "$_G_HAVE_XSI_OPS"; then # If this shell supports suffix pattern removal, then use it to avoid # forking. Hide the definitions single quotes in case the shell chokes # on unsupported syntax... _b='func_basename_result=${1##*/}' _d='case $1 in */*) func_dirname_result=${1%/*}$2 ;; * ) func_dirname_result=$3 ;; esac' else # ...otherwise fall back to using sed. _b='func_basename_result=`$ECHO "$1" |$SED "$sed_basename"`' _d='func_dirname_result=`$ECHO "$1" |$SED "$sed_dirname"` if test "X$func_dirname_result" = "X$1"; then func_dirname_result=$3 else func_append func_dirname_result "$2" fi' fi eval 'func_basename () { $debug_cmd '"$_b"' }' # func_dirname FILE APPEND NONDIR_REPLACEMENT # ------------------------------------------- # Compute the dirname of FILE. If nonempty, add APPEND to the result, # otherwise set result to NONDIR_REPLACEMENT. eval 'func_dirname () { $debug_cmd '"$_d"' }' # func_dirname_and_basename FILE APPEND NONDIR_REPLACEMENT # -------------------------------------------------------- # Perform func_basename and func_dirname in a single function # call: # dirname: Compute the dirname of FILE. If nonempty, # add APPEND to the result, otherwise set result # to NONDIR_REPLACEMENT. # value returned in "$func_dirname_result" # basename: Compute filename of FILE. # value retuned in "$func_basename_result" # For efficiency, we do not delegate to the functions above but instead # duplicate the functionality here. eval 'func_dirname_and_basename () { $debug_cmd '"$_b"' '"$_d"' }' # func_echo ARG... # ---------------- # Echo program name prefixed message. func_echo () { $debug_cmd _G_message=$* func_echo_IFS=$IFS IFS=$nl for _G_line in $_G_message; do IFS=$func_echo_IFS $ECHO "$progname: $_G_line" done IFS=$func_echo_IFS } # func_echo_all ARG... # -------------------- # Invoke $ECHO with all args, space-separated. func_echo_all () { $ECHO "$*" } # func_echo_infix_1 INFIX ARG... # ------------------------------ # Echo program name, followed by INFIX on the first line, with any # additional lines not showing INFIX. func_echo_infix_1 () { $debug_cmd $require_term_colors _G_infix=$1; shift _G_indent=$_G_infix _G_prefix="$progname: $_G_infix: " _G_message=$* # Strip color escape sequences before counting printable length for _G_tc in "$tc_reset" "$tc_bold" "$tc_standout" "$tc_red" "$tc_green" "$tc_blue" "$tc_cyan" do test -n "$_G_tc" && { _G_esc_tc=`$ECHO "$_G_tc" | $SED "$sed_make_literal_regex"` _G_indent=`$ECHO "$_G_indent" | $SED "s|$_G_esc_tc||g"` } done _G_indent="$progname: "`echo "$_G_indent" | $SED 's|.| |g'`" " ## exclude from sc_prohibit_nested_quotes func_echo_infix_1_IFS=$IFS IFS=$nl for _G_line in $_G_message; do IFS=$func_echo_infix_1_IFS $ECHO "$_G_prefix$tc_bold$_G_line$tc_reset" >&2 _G_prefix=$_G_indent done IFS=$func_echo_infix_1_IFS } # func_error ARG... # ----------------- # Echo program name prefixed message to standard error. func_error () { $debug_cmd $require_term_colors func_echo_infix_1 " $tc_standout${tc_red}error$tc_reset" "$*" >&2 } # func_fatal_error ARG... # ----------------------- # Echo program name prefixed message to standard error, and exit. func_fatal_error () { $debug_cmd func_error "$*" exit $EXIT_FAILURE } # func_grep EXPRESSION FILENAME # ----------------------------- # Check whether EXPRESSION matches any line of FILENAME, without output. func_grep () { $debug_cmd $GREP "$1" "$2" >/dev/null 2>&1 } # func_len STRING # --------------- # Set func_len_result to the length of STRING. STRING may not # start with a hyphen. test -z "$_G_HAVE_XSI_OPS" \ && (eval 'x=a/b/c; test 5aa/bb/cc = "${#x}${x%%/*}${x%/*}${x#*/}${x##*/}"') 2>/dev/null \ && _G_HAVE_XSI_OPS=yes if test yes = "$_G_HAVE_XSI_OPS"; then eval 'func_len () { $debug_cmd func_len_result=${#1} }' else func_len () { $debug_cmd func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len` } fi # func_mkdir_p DIRECTORY-PATH # --------------------------- # Make sure the entire path to DIRECTORY-PATH is available. func_mkdir_p () { $debug_cmd _G_directory_path=$1 _G_dir_list= if test -n "$_G_directory_path" && test : != "$opt_dry_run"; then # Protect directory names starting with '-' case $_G_directory_path in -*) _G_directory_path=./$_G_directory_path ;; esac # While some portion of DIR does not yet exist... while test ! -d "$_G_directory_path"; do # ...make a list in topmost first order. Use a colon delimited # list incase some portion of path contains whitespace. _G_dir_list=$_G_directory_path:$_G_dir_list # If the last portion added has no slash in it, the list is done case $_G_directory_path in */*) ;; *) break ;; esac # ...otherwise throw away the child directory and loop _G_directory_path=`$ECHO "$_G_directory_path" | $SED -e "$sed_dirname"` done _G_dir_list=`$ECHO "$_G_dir_list" | $SED 's|:*$||'` func_mkdir_p_IFS=$IFS; IFS=: for _G_dir in $_G_dir_list; do IFS=$func_mkdir_p_IFS # mkdir can fail with a 'File exist' error if two processes # try to create one of the directories concurrently. Don't # stop in that case! $MKDIR "$_G_dir" 2>/dev/null || : done IFS=$func_mkdir_p_IFS # Bail out if we (or some other process) failed to create a directory. test -d "$_G_directory_path" || \ func_fatal_error "Failed to create '$1'" fi } # func_mktempdir [BASENAME] # ------------------------- # Make a temporary directory that won't clash with other running # libtool processes, and avoids race conditions if possible. If # given, BASENAME is the basename for that directory. func_mktempdir () { $debug_cmd _G_template=${TMPDIR-/tmp}/${1-$progname} if test : = "$opt_dry_run"; then # Return a directory name, but don't create it in dry-run mode _G_tmpdir=$_G_template-$$ else # If mktemp works, use that first and foremost _G_tmpdir=`mktemp -d "$_G_template-XXXXXXXX" 2>/dev/null` if test ! -d "$_G_tmpdir"; then # Failing that, at least try and use $RANDOM to avoid a race _G_tmpdir=$_G_template-${RANDOM-0}$$ func_mktempdir_umask=`umask` umask 0077 $MKDIR "$_G_tmpdir" umask $func_mktempdir_umask fi # If we're not in dry-run mode, bomb out on failure test -d "$_G_tmpdir" || \ func_fatal_error "cannot create temporary directory '$_G_tmpdir'" fi $ECHO "$_G_tmpdir" } # func_normal_abspath PATH # ------------------------ # Remove doubled-up and trailing slashes, "." path components, # and cancel out any ".." path components in PATH after making # it an absolute path. func_normal_abspath () { $debug_cmd # These SED scripts presuppose an absolute path with a trailing slash. _G_pathcar='s|^/\([^/]*\).*$|\1|' _G_pathcdr='s|^/[^/]*||' _G_removedotparts=':dotsl s|/\./|/|g t dotsl s|/\.$|/|' _G_collapseslashes='s|/\{1,\}|/|g' _G_finalslash='s|/*$|/|' # Start from root dir and reassemble the path. func_normal_abspath_result= func_normal_abspath_tpath=$1 func_normal_abspath_altnamespace= case $func_normal_abspath_tpath in "") # Empty path, that just means $cwd. func_stripname '' '/' "`pwd`" func_normal_abspath_result=$func_stripname_result return ;; # The next three entries are used to spot a run of precisely # two leading slashes without using negated character classes; # we take advantage of case's first-match behaviour. ///*) # Unusual form of absolute path, do nothing. ;; //*) # Not necessarily an ordinary path; POSIX reserves leading '//' # and for example Cygwin uses it to access remote file shares # over CIFS/SMB, so we conserve a leading double slash if found. func_normal_abspath_altnamespace=/ ;; /*) # Absolute path, do nothing. ;; *) # Relative path, prepend $cwd. func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath ;; esac # Cancel out all the simple stuff to save iterations. We also want # the path to end with a slash for ease of parsing, so make sure # there is one (and only one) here. func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ -e "$_G_removedotparts" -e "$_G_collapseslashes" -e "$_G_finalslash"` while :; do # Processed it all yet? if test / = "$func_normal_abspath_tpath"; then # If we ascended to the root using ".." the result may be empty now. if test -z "$func_normal_abspath_result"; then func_normal_abspath_result=/ fi break fi func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \ -e "$_G_pathcar"` func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ -e "$_G_pathcdr"` # Figure out what to do with it case $func_normal_abspath_tcomponent in "") # Trailing empty path component, ignore it. ;; ..) # Parent dir; strip last assembled component from result. func_dirname "$func_normal_abspath_result" func_normal_abspath_result=$func_dirname_result ;; *) # Actual path component, append it. func_append func_normal_abspath_result "/$func_normal_abspath_tcomponent" ;; esac done # Restore leading double-slash if one was found on entry. func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result } # func_notquiet ARG... # -------------------- # Echo program name prefixed message only when not in quiet mode. func_notquiet () { $debug_cmd $opt_quiet || func_echo ${1+"$@"} # A bug in bash halts the script if the last line of a function # fails when set -e is in force, so we need another command to # work around that: : } # func_relative_path SRCDIR DSTDIR # -------------------------------- # Set func_relative_path_result to the relative path from SRCDIR to DSTDIR. func_relative_path () { $debug_cmd func_relative_path_result= func_normal_abspath "$1" func_relative_path_tlibdir=$func_normal_abspath_result func_normal_abspath "$2" func_relative_path_tbindir=$func_normal_abspath_result # Ascend the tree starting from libdir while :; do # check if we have found a prefix of bindir case $func_relative_path_tbindir in $func_relative_path_tlibdir) # found an exact match func_relative_path_tcancelled= break ;; $func_relative_path_tlibdir*) # found a matching prefix func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir" func_relative_path_tcancelled=$func_stripname_result if test -z "$func_relative_path_result"; then func_relative_path_result=. fi break ;; *) func_dirname $func_relative_path_tlibdir func_relative_path_tlibdir=$func_dirname_result if test -z "$func_relative_path_tlibdir"; then # Have to descend all the way to the root! func_relative_path_result=../$func_relative_path_result func_relative_path_tcancelled=$func_relative_path_tbindir break fi func_relative_path_result=../$func_relative_path_result ;; esac done # Now calculate path; take care to avoid doubling-up slashes. func_stripname '' '/' "$func_relative_path_result" func_relative_path_result=$func_stripname_result func_stripname '/' '/' "$func_relative_path_tcancelled" if test -n "$func_stripname_result"; then func_append func_relative_path_result "/$func_stripname_result" fi # Normalisation. If bindir is libdir, return '.' else relative path. if test -n "$func_relative_path_result"; then func_stripname './' '' "$func_relative_path_result" func_relative_path_result=$func_stripname_result fi test -n "$func_relative_path_result" || func_relative_path_result=. : } # func_quote_for_eval ARG... # -------------------------- # Aesthetically quote ARGs to be evaled later. # This function returns two values: # i) func_quote_for_eval_result # double-quoted, suitable for a subsequent eval # ii) func_quote_for_eval_unquoted_result # has all characters that are still active within double # quotes backslashified. func_quote_for_eval () { $debug_cmd func_quote_for_eval_unquoted_result= func_quote_for_eval_result= while test 0 -lt $#; do case $1 in *[\\\`\"\$]*) _G_unquoted_arg=`printf '%s\n' "$1" |$SED "$sed_quote_subst"` ;; *) _G_unquoted_arg=$1 ;; esac if test -n "$func_quote_for_eval_unquoted_result"; then func_append func_quote_for_eval_unquoted_result " $_G_unquoted_arg" else func_append func_quote_for_eval_unquoted_result "$_G_unquoted_arg" fi case $_G_unquoted_arg in # Double-quote args containing shell metacharacters to delay # word splitting, command substitution and variable expansion # for a subsequent eval. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") _G_quoted_arg=\"$_G_unquoted_arg\" ;; *) _G_quoted_arg=$_G_unquoted_arg ;; esac if test -n "$func_quote_for_eval_result"; then func_append func_quote_for_eval_result " $_G_quoted_arg" else func_append func_quote_for_eval_result "$_G_quoted_arg" fi shift done } # func_quote_for_expand ARG # ------------------------- # Aesthetically quote ARG to be evaled later; same as above, # but do not quote variable references. func_quote_for_expand () { $debug_cmd case $1 in *[\\\`\"]*) _G_arg=`$ECHO "$1" | $SED \ -e "$sed_double_quote_subst" -e "$sed_double_backslash"` ;; *) _G_arg=$1 ;; esac case $_G_arg in # Double-quote args containing shell metacharacters to delay # word splitting and command substitution for a subsequent eval. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") _G_arg=\"$_G_arg\" ;; esac func_quote_for_expand_result=$_G_arg } # func_stripname PREFIX SUFFIX NAME # --------------------------------- # strip PREFIX and SUFFIX from NAME, and store in func_stripname_result. # PREFIX and SUFFIX must not contain globbing or regex special # characters, hashes, percent signs, but SUFFIX may contain a leading # dot (in which case that matches only a dot). if test yes = "$_G_HAVE_XSI_OPS"; then eval 'func_stripname () { $debug_cmd # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are # positional parameters, so assign one to ordinary variable first. func_stripname_result=$3 func_stripname_result=${func_stripname_result#"$1"} func_stripname_result=${func_stripname_result%"$2"} }' else func_stripname () { $debug_cmd case $2 in .*) func_stripname_result=`$ECHO "$3" | $SED -e "s%^$1%%" -e "s%\\\\$2\$%%"`;; *) func_stripname_result=`$ECHO "$3" | $SED -e "s%^$1%%" -e "s%$2\$%%"`;; esac } fi # func_show_eval CMD [FAIL_EXP] # ----------------------------- # Unless opt_quiet is true, then output CMD. Then, if opt_dryrun is # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP # is given, then evaluate it. func_show_eval () { $debug_cmd _G_cmd=$1 _G_fail_exp=${2-':'} func_quote_for_expand "$_G_cmd" eval "func_notquiet $func_quote_for_expand_result" $opt_dry_run || { eval "$_G_cmd" _G_status=$? if test 0 -ne "$_G_status"; then eval "(exit $_G_status); $_G_fail_exp" fi } } # func_show_eval_locale CMD [FAIL_EXP] # ------------------------------------ # Unless opt_quiet is true, then output CMD. Then, if opt_dryrun is # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP # is given, then evaluate it. Use the saved locale for evaluation. func_show_eval_locale () { $debug_cmd _G_cmd=$1 _G_fail_exp=${2-':'} $opt_quiet || { func_quote_for_expand "$_G_cmd" eval "func_echo $func_quote_for_expand_result" } $opt_dry_run || { eval "$_G_user_locale $_G_cmd" _G_status=$? eval "$_G_safe_locale" if test 0 -ne "$_G_status"; then eval "(exit $_G_status); $_G_fail_exp" fi } } # func_tr_sh # ---------- # Turn $1 into a string suitable for a shell variable name. # Result is stored in $func_tr_sh_result. All characters # not in the set a-zA-Z0-9_ are replaced with '_'. Further, # if $1 begins with a digit, a '_' is prepended as well. func_tr_sh () { $debug_cmd case $1 in [0-9]* | *[!a-zA-Z0-9_]*) func_tr_sh_result=`$ECHO "$1" | $SED -e 's/^\([0-9]\)/_\1/' -e 's/[^a-zA-Z0-9_]/_/g'` ;; * ) func_tr_sh_result=$1 ;; esac } # func_verbose ARG... # ------------------- # Echo program name prefixed message in verbose mode only. func_verbose () { $debug_cmd $opt_verbose && func_echo "$*" : } # func_warn_and_continue ARG... # ----------------------------- # Echo program name prefixed warning message to standard error. func_warn_and_continue () { $debug_cmd $require_term_colors func_echo_infix_1 "${tc_red}warning$tc_reset" "$*" >&2 } # func_warning CATEGORY ARG... # ---------------------------- # Echo program name prefixed warning message to standard error. Warning # messages can be filtered according to CATEGORY, where this function # elides messages where CATEGORY is not listed in the global variable # 'opt_warning_types'. func_warning () { $debug_cmd # CATEGORY must be in the warning_categories list! case " $warning_categories " in *" $1 "*) ;; *) func_internal_error "invalid warning category '$1'" ;; esac _G_category=$1 shift case " $opt_warning_types " in *" $_G_category "*) $warning_func ${1+"$@"} ;; esac } # func_sort_ver VER1 VER2 # ----------------------- # 'sort -V' is not generally available. # Note this deviates from the version comparison in automake # in that it treats 1.5 < 1.5.0, and treats 1.4.4a < 1.4-p3a # but this should suffice as we won't be specifying old # version formats or redundant trailing .0 in bootstrap.conf. # If we did want full compatibility then we should probably # use m4_version_compare from autoconf. func_sort_ver () { $debug_cmd printf '%s\n%s\n' "$1" "$2" \ | sort -t. -k 1,1n -k 2,2n -k 3,3n -k 4,4n -k 5,5n -k 6,6n -k 7,7n -k 8,8n -k 9,9n } # func_lt_ver PREV CURR # --------------------- # Return true if PREV and CURR are in the correct order according to # func_sort_ver, otherwise false. Use it like this: # # func_lt_ver "$prev_ver" "$proposed_ver" || func_fatal_error "..." func_lt_ver () { $debug_cmd test "x$1" = x`func_sort_ver "$1" "$2" | $SED 1q` } # Local variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC" # time-stamp-time-zone: "UTC" # End: #! /bin/sh # Set a version string for this script. scriptversion=2014-01-07.03; # UTC # A portable, pluggable option parser for Bourne shell. # Written by Gary V. Vaughan, 2010 # Copyright (C) 2010-2015 Free Software Foundation, Inc. # This is free software; see the source for copying conditions. There is NO # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see . # Please report bugs or propose patches to gary@gnu.org. ## ------ ## ## Usage. ## ## ------ ## # This file is a library for parsing options in your shell scripts along # with assorted other useful supporting features that you can make use # of too. # # For the simplest scripts you might need only: # # #!/bin/sh # . relative/path/to/funclib.sh # . relative/path/to/options-parser # scriptversion=1.0 # func_options ${1+"$@"} # eval set dummy "$func_options_result"; shift # ...rest of your script... # # In order for the '--version' option to work, you will need to have a # suitably formatted comment like the one at the top of this file # starting with '# Written by ' and ending with '# warranty; '. # # For '-h' and '--help' to work, you will also need a one line # description of your script's purpose in a comment directly above the # '# Written by ' line, like the one at the top of this file. # # The default options also support '--debug', which will turn on shell # execution tracing (see the comment above debug_cmd below for another # use), and '--verbose' and the func_verbose function to allow your script # to display verbose messages only when your user has specified # '--verbose'. # # After sourcing this file, you can plug processing for additional # options by amending the variables from the 'Configuration' section # below, and following the instructions in the 'Option parsing' # section further down. ## -------------- ## ## Configuration. ## ## -------------- ## # You should override these variables in your script after sourcing this # file so that they reflect the customisations you have added to the # option parser. # The usage line for option parsing errors and the start of '-h' and # '--help' output messages. You can embed shell variables for delayed # expansion at the time the message is displayed, but you will need to # quote other shell meta-characters carefully to prevent them being # expanded when the contents are evaled. usage='$progpath [OPTION]...' # Short help message in response to '-h' and '--help'. Add to this or # override it after sourcing this library to reflect the full set of # options your script accepts. usage_message="\ --debug enable verbose shell tracing -W, --warnings=CATEGORY report the warnings falling in CATEGORY [all] -v, --verbose verbosely report processing --version print version information and exit -h, --help print short or long help message and exit " # Additional text appended to 'usage_message' in response to '--help'. long_help_message=" Warning categories include: 'all' show all warnings 'none' turn off all the warnings 'error' warnings are treated as fatal errors" # Help message printed before fatal option parsing errors. fatal_help="Try '\$progname --help' for more information." ## ------------------------- ## ## Hook function management. ## ## ------------------------- ## # This section contains functions for adding, removing, and running hooks # to the main code. A hook is just a named list of of function, that can # be run in order later on. # func_hookable FUNC_NAME # ----------------------- # Declare that FUNC_NAME will run hooks added with # 'func_add_hook FUNC_NAME ...'. func_hookable () { $debug_cmd func_append hookable_fns " $1" } # func_add_hook FUNC_NAME HOOK_FUNC # --------------------------------- # Request that FUNC_NAME call HOOK_FUNC before it returns. FUNC_NAME must # first have been declared "hookable" by a call to 'func_hookable'. func_add_hook () { $debug_cmd case " $hookable_fns " in *" $1 "*) ;; *) func_fatal_error "'$1' does not accept hook functions." ;; esac eval func_append ${1}_hooks '" $2"' } # func_remove_hook FUNC_NAME HOOK_FUNC # ------------------------------------ # Remove HOOK_FUNC from the list of functions called by FUNC_NAME. func_remove_hook () { $debug_cmd eval ${1}_hooks='`$ECHO "\$'$1'_hooks" |$SED "s| '$2'||"`' } # func_run_hooks FUNC_NAME [ARG]... # --------------------------------- # Run all hook functions registered to FUNC_NAME. # It is assumed that the list of hook functions contains nothing more # than a whitespace-delimited list of legal shell function names, and # no effort is wasted trying to catch shell meta-characters or preserve # whitespace. func_run_hooks () { $debug_cmd case " $hookable_fns " in *" $1 "*) ;; *) func_fatal_error "'$1' does not support hook funcions.n" ;; esac eval _G_hook_fns=\$$1_hooks; shift for _G_hook in $_G_hook_fns; do eval $_G_hook '"$@"' # store returned options list back into positional # parameters for next 'cmd' execution. eval _G_hook_result=\$${_G_hook}_result eval set dummy "$_G_hook_result"; shift done func_quote_for_eval ${1+"$@"} func_run_hooks_result=$func_quote_for_eval_result } ## --------------- ## ## Option parsing. ## ## --------------- ## # In order to add your own option parsing hooks, you must accept the # full positional parameter list in your hook function, remove any # options that you action, and then pass back the remaining unprocessed # options in '_result', escaped suitably for # 'eval'. Like this: # # my_options_prep () # { # $debug_cmd # # # Extend the existing usage message. # usage_message=$usage_message' # -s, --silent don'\''t print informational messages # ' # # func_quote_for_eval ${1+"$@"} # my_options_prep_result=$func_quote_for_eval_result # } # func_add_hook func_options_prep my_options_prep # # # my_silent_option () # { # $debug_cmd # # # Note that for efficiency, we parse as many options as we can # # recognise in a loop before passing the remainder back to the # # caller on the first unrecognised argument we encounter. # while test $# -gt 0; do # opt=$1; shift # case $opt in # --silent|-s) opt_silent=: ;; # # Separate non-argument short options: # -s*) func_split_short_opt "$_G_opt" # set dummy "$func_split_short_opt_name" \ # "-$func_split_short_opt_arg" ${1+"$@"} # shift # ;; # *) set dummy "$_G_opt" "$*"; shift; break ;; # esac # done # # func_quote_for_eval ${1+"$@"} # my_silent_option_result=$func_quote_for_eval_result # } # func_add_hook func_parse_options my_silent_option # # # my_option_validation () # { # $debug_cmd # # $opt_silent && $opt_verbose && func_fatal_help "\ # '--silent' and '--verbose' options are mutually exclusive." # # func_quote_for_eval ${1+"$@"} # my_option_validation_result=$func_quote_for_eval_result # } # func_add_hook func_validate_options my_option_validation # # You'll alse need to manually amend $usage_message to reflect the extra # options you parse. It's preferable to append if you can, so that # multiple option parsing hooks can be added safely. # func_options [ARG]... # --------------------- # All the functions called inside func_options are hookable. See the # individual implementations for details. func_hookable func_options func_options () { $debug_cmd func_options_prep ${1+"$@"} eval func_parse_options \ ${func_options_prep_result+"$func_options_prep_result"} eval func_validate_options \ ${func_parse_options_result+"$func_parse_options_result"} eval func_run_hooks func_options \ ${func_validate_options_result+"$func_validate_options_result"} # save modified positional parameters for caller func_options_result=$func_run_hooks_result } # func_options_prep [ARG]... # -------------------------- # All initialisations required before starting the option parse loop. # Note that when calling hook functions, we pass through the list of # positional parameters. If a hook function modifies that list, and # needs to propogate that back to rest of this script, then the complete # modified list must be put in 'func_run_hooks_result' before # returning. func_hookable func_options_prep func_options_prep () { $debug_cmd # Option defaults: opt_verbose=false opt_warning_types= func_run_hooks func_options_prep ${1+"$@"} # save modified positional parameters for caller func_options_prep_result=$func_run_hooks_result } # func_parse_options [ARG]... # --------------------------- # The main option parsing loop. func_hookable func_parse_options func_parse_options () { $debug_cmd func_parse_options_result= # this just eases exit handling while test $# -gt 0; do # Defer to hook functions for initial option parsing, so they # get priority in the event of reusing an option name. func_run_hooks func_parse_options ${1+"$@"} # Adjust func_parse_options positional parameters to match eval set dummy "$func_run_hooks_result"; shift # Break out of the loop if we already parsed every option. test $# -gt 0 || break _G_opt=$1 shift case $_G_opt in --debug|-x) debug_cmd='set -x' func_echo "enabling shell trace mode" $debug_cmd ;; --no-warnings|--no-warning|--no-warn) set dummy --warnings none ${1+"$@"} shift ;; --warnings|--warning|-W) test $# = 0 && func_missing_arg $_G_opt && break case " $warning_categories $1" in *" $1 "*) # trailing space prevents matching last $1 above func_append_uniq opt_warning_types " $1" ;; *all) opt_warning_types=$warning_categories ;; *none) opt_warning_types=none warning_func=: ;; *error) opt_warning_types=$warning_categories warning_func=func_fatal_error ;; *) func_fatal_error \ "unsupported warning category: '$1'" ;; esac shift ;; --verbose|-v) opt_verbose=: ;; --version) func_version ;; -\?|-h) func_usage ;; --help) func_help ;; # Separate optargs to long options (plugins may need this): --*=*) func_split_equals "$_G_opt" set dummy "$func_split_equals_lhs" \ "$func_split_equals_rhs" ${1+"$@"} shift ;; # Separate optargs to short options: -W*) func_split_short_opt "$_G_opt" set dummy "$func_split_short_opt_name" \ "$func_split_short_opt_arg" ${1+"$@"} shift ;; # Separate non-argument short options: -\?*|-h*|-v*|-x*) func_split_short_opt "$_G_opt" set dummy "$func_split_short_opt_name" \ "-$func_split_short_opt_arg" ${1+"$@"} shift ;; --) break ;; -*) func_fatal_help "unrecognised option: '$_G_opt'" ;; *) set dummy "$_G_opt" ${1+"$@"}; shift; break ;; esac done # save modified positional parameters for caller func_quote_for_eval ${1+"$@"} func_parse_options_result=$func_quote_for_eval_result } # func_validate_options [ARG]... # ------------------------------ # Perform any sanity checks on option settings and/or unconsumed # arguments. func_hookable func_validate_options func_validate_options () { $debug_cmd # Display all warnings if -W was not given. test -n "$opt_warning_types" || opt_warning_types=" $warning_categories" func_run_hooks func_validate_options ${1+"$@"} # Bail if the options were screwed! $exit_cmd $EXIT_FAILURE # save modified positional parameters for caller func_validate_options_result=$func_run_hooks_result } ## ----------------- ## ## Helper functions. ## ## ----------------- ## # This section contains the helper functions used by the rest of the # hookable option parser framework in ascii-betical order. # func_fatal_help ARG... # ---------------------- # Echo program name prefixed message to standard error, followed by # a help hint, and exit. func_fatal_help () { $debug_cmd eval \$ECHO \""Usage: $usage"\" eval \$ECHO \""$fatal_help"\" func_error ${1+"$@"} exit $EXIT_FAILURE } # func_help # --------- # Echo long help message to standard output and exit. func_help () { $debug_cmd func_usage_message $ECHO "$long_help_message" exit 0 } # func_missing_arg ARGNAME # ------------------------ # Echo program name prefixed message to standard error and set global # exit_cmd. func_missing_arg () { $debug_cmd func_error "Missing argument for '$1'." exit_cmd=exit } # func_split_equals STRING # ------------------------ # Set func_split_equals_lhs and func_split_equals_rhs shell variables after # splitting STRING at the '=' sign. test -z "$_G_HAVE_XSI_OPS" \ && (eval 'x=a/b/c; test 5aa/bb/cc = "${#x}${x%%/*}${x%/*}${x#*/}${x##*/}"') 2>/dev/null \ && _G_HAVE_XSI_OPS=yes if test yes = "$_G_HAVE_XSI_OPS" then # This is an XSI compatible shell, allowing a faster implementation... eval 'func_split_equals () { $debug_cmd func_split_equals_lhs=${1%%=*} func_split_equals_rhs=${1#*=} test "x$func_split_equals_lhs" = "x$1" \ && func_split_equals_rhs= }' else # ...otherwise fall back to using expr, which is often a shell builtin. func_split_equals () { $debug_cmd func_split_equals_lhs=`expr "x$1" : 'x\([^=]*\)'` func_split_equals_rhs= test "x$func_split_equals_lhs" = "x$1" \ || func_split_equals_rhs=`expr "x$1" : 'x[^=]*=\(.*\)$'` } fi #func_split_equals # func_split_short_opt SHORTOPT # ----------------------------- # Set func_split_short_opt_name and func_split_short_opt_arg shell # variables after splitting SHORTOPT after the 2nd character. if test yes = "$_G_HAVE_XSI_OPS" then # This is an XSI compatible shell, allowing a faster implementation... eval 'func_split_short_opt () { $debug_cmd func_split_short_opt_arg=${1#??} func_split_short_opt_name=${1%"$func_split_short_opt_arg"} }' else # ...otherwise fall back to using expr, which is often a shell builtin. func_split_short_opt () { $debug_cmd func_split_short_opt_name=`expr "x$1" : 'x-\(.\)'` func_split_short_opt_arg=`expr "x$1" : 'x-.\(.*\)$'` } fi #func_split_short_opt # func_usage # ---------- # Echo short help message to standard output and exit. func_usage () { $debug_cmd func_usage_message $ECHO "Run '$progname --help |${PAGER-more}' for full usage" exit 0 } # func_usage_message # ------------------ # Echo short help message to standard output. func_usage_message () { $debug_cmd eval \$ECHO \""Usage: $usage"\" echo $SED -n 's|^# || /^Written by/{ x;p;x } h /^Written by/q' < "$progpath" echo eval \$ECHO \""$usage_message"\" } # func_version # ------------ # Echo version message to standard output and exit. func_version () { $debug_cmd printf '%s\n' "$progname $scriptversion" $SED -n ' /(C)/!b go :more /\./!{ N s|\n# | | b more } :go /^# Written by /,/# warranty; / { s|^# || s|^# *$|| s|\((C)\)[ 0-9,-]*[ ,-]\([1-9][0-9]* \)|\1 \2| p } /^# Written by / { s|^# || p } /^warranty; /q' < "$progpath" exit $? } # Local variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC" # time-stamp-time-zone: "UTC" # End: # Set a version string. scriptversion='(GNU libtool) 2.4.6' # func_echo ARG... # ---------------- # Libtool also displays the current mode in messages, so override # funclib.sh func_echo with this custom definition. func_echo () { $debug_cmd _G_message=$* func_echo_IFS=$IFS IFS=$nl for _G_line in $_G_message; do IFS=$func_echo_IFS $ECHO "$progname${opt_mode+: $opt_mode}: $_G_line" done IFS=$func_echo_IFS } # func_warning ARG... # ------------------- # Libtool warnings are not categorized, so override funclib.sh # func_warning with this simpler definition. func_warning () { $debug_cmd $warning_func ${1+"$@"} } ## ---------------- ## ## Options parsing. ## ## ---------------- ## # Hook in the functions to make sure our own options are parsed during # the option parsing loop. usage='$progpath [OPTION]... [MODE-ARG]...' # Short help message in response to '-h'. usage_message="Options: --config show all configuration variables --debug enable verbose shell tracing -n, --dry-run display commands without modifying any files --features display basic configuration information and exit --mode=MODE use operation mode MODE --no-warnings equivalent to '-Wnone' --preserve-dup-deps don't remove duplicate dependency libraries --quiet, --silent don't print informational messages --tag=TAG use configuration variables from tag TAG -v, --verbose print more informational messages than default --version print version information -W, --warnings=CATEGORY report the warnings falling in CATEGORY [all] -h, --help, --help-all print short, long, or detailed help message " # Additional text appended to 'usage_message' in response to '--help'. func_help () { $debug_cmd func_usage_message $ECHO "$long_help_message MODE must be one of the following: clean remove files from the build directory compile compile a source file into a libtool object execute automatically set library path, then run a program finish complete the installation of libtool libraries install install libraries or executables link create a library or an executable uninstall remove libraries from an installed directory MODE-ARGS vary depending on the MODE. When passed as first option, '--mode=MODE' may be abbreviated as 'MODE' or a unique abbreviation of that. Try '$progname --help --mode=MODE' for a more detailed description of MODE. When reporting a bug, please describe a test case to reproduce it and include the following information: host-triplet: $host shell: $SHELL compiler: $LTCC compiler flags: $LTCFLAGS linker: $LD (gnu? $with_gnu_ld) version: $progname $scriptversion Debian-2.4.6-2 automake: `($AUTOMAKE --version) 2>/dev/null |$SED 1q` autoconf: `($AUTOCONF --version) 2>/dev/null |$SED 1q` Report bugs to . GNU libtool home page: . General help using GNU software: ." exit 0 } # func_lo2o OBJECT-NAME # --------------------- # Transform OBJECT-NAME from a '.lo' suffix to the platform specific # object suffix. lo2o=s/\\.lo\$/.$objext/ o2lo=s/\\.$objext\$/.lo/ if test yes = "$_G_HAVE_XSI_OPS"; then eval 'func_lo2o () { case $1 in *.lo) func_lo2o_result=${1%.lo}.$objext ;; * ) func_lo2o_result=$1 ;; esac }' # func_xform LIBOBJ-OR-SOURCE # --------------------------- # Transform LIBOBJ-OR-SOURCE from a '.o' or '.c' (or otherwise) # suffix to a '.lo' libtool-object suffix. eval 'func_xform () { func_xform_result=${1%.*}.lo }' else # ...otherwise fall back to using sed. func_lo2o () { func_lo2o_result=`$ECHO "$1" | $SED "$lo2o"` } func_xform () { func_xform_result=`$ECHO "$1" | $SED 's|\.[^.]*$|.lo|'` } fi # func_fatal_configuration ARG... # ------------------------------- # Echo program name prefixed message to standard error, followed by # a configuration failure hint, and exit. func_fatal_configuration () { func__fatal_error ${1+"$@"} \ "See the $PACKAGE documentation for more information." \ "Fatal configuration error." } # func_config # ----------- # Display the configuration for all the tags in this script. func_config () { re_begincf='^# ### BEGIN LIBTOOL' re_endcf='^# ### END LIBTOOL' # Default configuration. $SED "1,/$re_begincf CONFIG/d;/$re_endcf CONFIG/,\$d" < "$progpath" # Now print the configurations for the tags. for tagname in $taglist; do $SED -n "/$re_begincf TAG CONFIG: $tagname\$/,/$re_endcf TAG CONFIG: $tagname\$/p" < "$progpath" done exit $? } # func_features # ------------- # Display the features supported by this script. func_features () { echo "host: $host" if test yes = "$build_libtool_libs"; then echo "enable shared libraries" else echo "disable shared libraries" fi if test yes = "$build_old_libs"; then echo "enable static libraries" else echo "disable static libraries" fi exit $? } # func_enable_tag TAGNAME # ----------------------- # Verify that TAGNAME is valid, and either flag an error and exit, or # enable the TAGNAME tag. We also add TAGNAME to the global $taglist # variable here. func_enable_tag () { # Global variable: tagname=$1 re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$" re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$" sed_extractcf=/$re_begincf/,/$re_endcf/p # Validate tagname. case $tagname in *[!-_A-Za-z0-9,/]*) func_fatal_error "invalid tag name: $tagname" ;; esac # Don't test for the "default" C tag, as we know it's # there but not specially marked. case $tagname in CC) ;; *) if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then taglist="$taglist $tagname" # Evaluate the configuration. Be careful to quote the path # and the sed script, to avoid splitting on whitespace, but # also don't use non-portable quotes within backquotes within # quotes we have to do it in 2 steps: extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"` eval "$extractedcf" else func_error "ignoring unknown tag $tagname" fi ;; esac } # func_check_version_match # ------------------------ # Ensure that we are using m4 macros, and libtool script from the same # release of libtool. func_check_version_match () { if test "$package_revision" != "$macro_revision"; then if test "$VERSION" != "$macro_version"; then if test -z "$macro_version"; then cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, but the $progname: definition of this LT_INIT comes from an older release. $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION $progname: and run autoconf again. _LT_EOF else cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, but the $progname: definition of this LT_INIT comes from $PACKAGE $macro_version. $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION $progname: and run autoconf again. _LT_EOF fi else cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision, $progname: but the definition of this LT_INIT comes from revision $macro_revision. $progname: You should recreate aclocal.m4 with macros from revision $package_revision $progname: of $PACKAGE $VERSION and run autoconf again. _LT_EOF fi exit $EXIT_MISMATCH fi } # libtool_options_prep [ARG]... # ----------------------------- # Preparation for options parsed by libtool. libtool_options_prep () { $debug_mode # Option defaults: opt_config=false opt_dlopen= opt_dry_run=false opt_help=false opt_mode= opt_preserve_dup_deps=false opt_quiet=false nonopt= preserve_args= # Shorthand for --mode=foo, only valid as the first argument case $1 in clean|clea|cle|cl) shift; set dummy --mode clean ${1+"$@"}; shift ;; compile|compil|compi|comp|com|co|c) shift; set dummy --mode compile ${1+"$@"}; shift ;; execute|execut|execu|exec|exe|ex|e) shift; set dummy --mode execute ${1+"$@"}; shift ;; finish|finis|fini|fin|fi|f) shift; set dummy --mode finish ${1+"$@"}; shift ;; install|instal|insta|inst|ins|in|i) shift; set dummy --mode install ${1+"$@"}; shift ;; link|lin|li|l) shift; set dummy --mode link ${1+"$@"}; shift ;; uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) shift; set dummy --mode uninstall ${1+"$@"}; shift ;; esac # Pass back the list of options. func_quote_for_eval ${1+"$@"} libtool_options_prep_result=$func_quote_for_eval_result } func_add_hook func_options_prep libtool_options_prep # libtool_parse_options [ARG]... # --------------------------------- # Provide handling for libtool specific options. libtool_parse_options () { $debug_cmd # Perform our own loop to consume as many options as possible in # each iteration. while test $# -gt 0; do _G_opt=$1 shift case $_G_opt in --dry-run|--dryrun|-n) opt_dry_run=: ;; --config) func_config ;; --dlopen|-dlopen) opt_dlopen="${opt_dlopen+$opt_dlopen }$1" shift ;; --preserve-dup-deps) opt_preserve_dup_deps=: ;; --features) func_features ;; --finish) set dummy --mode finish ${1+"$@"}; shift ;; --help) opt_help=: ;; --help-all) opt_help=': help-all' ;; --mode) test $# = 0 && func_missing_arg $_G_opt && break opt_mode=$1 case $1 in # Valid mode arguments: clean|compile|execute|finish|install|link|relink|uninstall) ;; # Catch anything else as an error *) func_error "invalid argument for $_G_opt" exit_cmd=exit break ;; esac shift ;; --no-silent|--no-quiet) opt_quiet=false func_append preserve_args " $_G_opt" ;; --no-warnings|--no-warning|--no-warn) opt_warning=false func_append preserve_args " $_G_opt" ;; --no-verbose) opt_verbose=false func_append preserve_args " $_G_opt" ;; --silent|--quiet) opt_quiet=: opt_verbose=false func_append preserve_args " $_G_opt" ;; --tag) test $# = 0 && func_missing_arg $_G_opt && break opt_tag=$1 func_append preserve_args " $_G_opt $1" func_enable_tag "$1" shift ;; --verbose|-v) opt_quiet=false opt_verbose=: func_append preserve_args " $_G_opt" ;; # An option not handled by this hook function: *) set dummy "$_G_opt" ${1+"$@"}; shift; break ;; esac done # save modified positional parameters for caller func_quote_for_eval ${1+"$@"} libtool_parse_options_result=$func_quote_for_eval_result } func_add_hook func_parse_options libtool_parse_options # libtool_validate_options [ARG]... # --------------------------------- # Perform any sanity checks on option settings and/or unconsumed # arguments. libtool_validate_options () { # save first non-option argument if test 0 -lt $#; then nonopt=$1 shift fi # preserve --debug test : = "$debug_cmd" || func_append preserve_args " --debug" case $host in # Solaris2 added to fix http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16452 # see also: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59788 *cygwin* | *mingw* | *pw32* | *cegcc* | *solaris2* | *os2*) # don't eliminate duplications in $postdeps and $predeps opt_duplicate_compiler_generated_deps=: ;; *) opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps ;; esac $opt_help || { # Sanity checks first: func_check_version_match test yes != "$build_libtool_libs" \ && test yes != "$build_old_libs" \ && func_fatal_configuration "not configured to build any kind of library" # Darwin sucks eval std_shrext=\"$shrext_cmds\" # Only execute mode is allowed to have -dlopen flags. if test -n "$opt_dlopen" && test execute != "$opt_mode"; then func_error "unrecognized option '-dlopen'" $ECHO "$help" 1>&2 exit $EXIT_FAILURE fi # Change the help message to a mode-specific one. generic_help=$help help="Try '$progname --help --mode=$opt_mode' for more information." } # Pass back the unparsed argument list func_quote_for_eval ${1+"$@"} libtool_validate_options_result=$func_quote_for_eval_result } func_add_hook func_validate_options libtool_validate_options # Process options as early as possible so that --help and --version # can return quickly. func_options ${1+"$@"} eval set dummy "$func_options_result"; shift ## ----------- ## ## Main. ## ## ----------- ## magic='%%%MAGIC variable%%%' magic_exe='%%%MAGIC EXE variable%%%' # Global variables. extracted_archives= extracted_serial=0 # If this variable is set in any of the actions, the command in it # will be execed at the end. This prevents here-documents from being # left over by shells. exec_cmd= # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF $1 _LTECHO_EOF' } # func_generated_by_libtool # True iff stdin has been generated by Libtool. This function is only # a basic sanity check; it will hardly flush out determined imposters. func_generated_by_libtool_p () { $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1 } # func_lalib_p file # True iff FILE is a libtool '.la' library or '.lo' object file. # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_lalib_p () { test -f "$1" && $SED -e 4q "$1" 2>/dev/null | func_generated_by_libtool_p } # func_lalib_unsafe_p file # True iff FILE is a libtool '.la' library or '.lo' object file. # This function implements the same check as func_lalib_p without # resorting to external programs. To this end, it redirects stdin and # closes it afterwards, without saving the original file descriptor. # As a safety measure, use it only where a negative result would be # fatal anyway. Works if 'file' does not exist. func_lalib_unsafe_p () { lalib_p=no if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then for lalib_p_l in 1 2 3 4 do read lalib_p_line case $lalib_p_line in \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;; esac done exec 0<&5 5<&- fi test yes = "$lalib_p" } # func_ltwrapper_script_p file # True iff FILE is a libtool wrapper script # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_script_p () { test -f "$1" && $lt_truncate_bin < "$1" 2>/dev/null | func_generated_by_libtool_p } # func_ltwrapper_executable_p file # True iff FILE is a libtool wrapper executable # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_executable_p () { func_ltwrapper_exec_suffix= case $1 in *.exe) ;; *) func_ltwrapper_exec_suffix=.exe ;; esac $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1 } # func_ltwrapper_scriptname file # Assumes file is an ltwrapper_executable # uses $file to determine the appropriate filename for a # temporary ltwrapper_script. func_ltwrapper_scriptname () { func_dirname_and_basename "$1" "" "." func_stripname '' '.exe' "$func_basename_result" func_ltwrapper_scriptname_result=$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper } # func_ltwrapper_p file # True iff FILE is a libtool wrapper script or wrapper executable # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_p () { func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1" } # func_execute_cmds commands fail_cmd # Execute tilde-delimited COMMANDS. # If FAIL_CMD is given, eval that upon failure. # FAIL_CMD may read-access the current command in variable CMD! func_execute_cmds () { $debug_cmd save_ifs=$IFS; IFS='~' for cmd in $1; do IFS=$sp$nl eval cmd=\"$cmd\" IFS=$save_ifs func_show_eval "$cmd" "${2-:}" done IFS=$save_ifs } # func_source file # Source FILE, adding directory component if necessary. # Note that it is not necessary on cygwin/mingw to append a dot to # FILE even if both FILE and FILE.exe exist: automatic-append-.exe # behavior happens only for exec(3), not for open(2)! Also, sourcing # 'FILE.' does not work on cygwin managed mounts. func_source () { $debug_cmd case $1 in */* | *\\*) . "$1" ;; *) . "./$1" ;; esac } # func_resolve_sysroot PATH # Replace a leading = in PATH with a sysroot. Store the result into # func_resolve_sysroot_result func_resolve_sysroot () { func_resolve_sysroot_result=$1 case $func_resolve_sysroot_result in =*) func_stripname '=' '' "$func_resolve_sysroot_result" func_resolve_sysroot_result=$lt_sysroot$func_stripname_result ;; esac } # func_replace_sysroot PATH # If PATH begins with the sysroot, replace it with = and # store the result into func_replace_sysroot_result. func_replace_sysroot () { case $lt_sysroot:$1 in ?*:"$lt_sysroot"*) func_stripname "$lt_sysroot" '' "$1" func_replace_sysroot_result='='$func_stripname_result ;; *) # Including no sysroot. func_replace_sysroot_result=$1 ;; esac } # func_infer_tag arg # Infer tagged configuration to use if any are available and # if one wasn't chosen via the "--tag" command line option. # Only attempt this if the compiler in the base compile # command doesn't match the default compiler. # arg is usually of the form 'gcc ...' func_infer_tag () { $debug_cmd if test -n "$available_tags" && test -z "$tagname"; then CC_quoted= for arg in $CC; do func_append_quoted CC_quoted "$arg" done CC_expanded=`func_echo_all $CC` CC_quoted_expanded=`func_echo_all $CC_quoted` case $@ in # Blanks in the command may have been stripped by the calling shell, # but not from the CC environment variable when configure was run. " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) ;; # Blanks at the start of $base_compile will cause this to fail # if we don't check for them as well. *) for z in $available_tags; do if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then # Evaluate the configuration. eval "`$SED -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" CC_quoted= for arg in $CC; do # Double-quote args containing other shell metacharacters. func_append_quoted CC_quoted "$arg" done CC_expanded=`func_echo_all $CC` CC_quoted_expanded=`func_echo_all $CC_quoted` case "$@ " in " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) # The compiler in the base compile command matches # the one in the tagged configuration. # Assume this is the tagged configuration we want. tagname=$z break ;; esac fi done # If $tagname still isn't set, then no tagged configuration # was found and let the user know that the "--tag" command # line option must be used. if test -z "$tagname"; then func_echo "unable to infer tagged configuration" func_fatal_error "specify a tag with '--tag'" # else # func_verbose "using $tagname tagged configuration" fi ;; esac fi } # func_write_libtool_object output_name pic_name nonpic_name # Create a libtool object file (analogous to a ".la" file), # but don't create it if we're doing a dry run. func_write_libtool_object () { write_libobj=$1 if test yes = "$build_libtool_libs"; then write_lobj=\'$2\' else write_lobj=none fi if test yes = "$build_old_libs"; then write_oldobj=\'$3\' else write_oldobj=none fi $opt_dry_run || { cat >${write_libobj}T </dev/null` if test "$?" -eq 0 && test -n "$func_convert_core_file_wine_to_w32_tmp"; then func_convert_core_file_wine_to_w32_result=`$ECHO "$func_convert_core_file_wine_to_w32_tmp" | $SED -e "$sed_naive_backslashify"` else func_convert_core_file_wine_to_w32_result= fi fi } # end: func_convert_core_file_wine_to_w32 # func_convert_core_path_wine_to_w32 ARG # Helper function used by path conversion functions when $build is *nix, and # $host is mingw, cygwin, or some other w32 environment. Relies on a correctly # configured wine environment available, with the winepath program in $build's # $PATH. Assumes ARG has no leading or trailing path separator characters. # # ARG is path to be converted from $build format to win32. # Result is available in $func_convert_core_path_wine_to_w32_result. # Unconvertible file (directory) names in ARG are skipped; if no directory names # are convertible, then the result may be empty. func_convert_core_path_wine_to_w32 () { $debug_cmd # unfortunately, winepath doesn't convert paths, only file names func_convert_core_path_wine_to_w32_result= if test -n "$1"; then oldIFS=$IFS IFS=: for func_convert_core_path_wine_to_w32_f in $1; do IFS=$oldIFS func_convert_core_file_wine_to_w32 "$func_convert_core_path_wine_to_w32_f" if test -n "$func_convert_core_file_wine_to_w32_result"; then if test -z "$func_convert_core_path_wine_to_w32_result"; then func_convert_core_path_wine_to_w32_result=$func_convert_core_file_wine_to_w32_result else func_append func_convert_core_path_wine_to_w32_result ";$func_convert_core_file_wine_to_w32_result" fi fi done IFS=$oldIFS fi } # end: func_convert_core_path_wine_to_w32 # func_cygpath ARGS... # Wrapper around calling the cygpath program via LT_CYGPATH. This is used when # when (1) $build is *nix and Cygwin is hosted via a wine environment; or (2) # $build is MSYS and $host is Cygwin, or (3) $build is Cygwin. In case (1) or # (2), returns the Cygwin file name or path in func_cygpath_result (input # file name or path is assumed to be in w32 format, as previously converted # from $build's *nix or MSYS format). In case (3), returns the w32 file name # or path in func_cygpath_result (input file name or path is assumed to be in # Cygwin format). Returns an empty string on error. # # ARGS are passed to cygpath, with the last one being the file name or path to # be converted. # # Specify the absolute *nix (or w32) name to cygpath in the LT_CYGPATH # environment variable; do not put it in $PATH. func_cygpath () { $debug_cmd if test -n "$LT_CYGPATH" && test -f "$LT_CYGPATH"; then func_cygpath_result=`$LT_CYGPATH "$@" 2>/dev/null` if test "$?" -ne 0; then # on failure, ensure result is empty func_cygpath_result= fi else func_cygpath_result= func_error "LT_CYGPATH is empty or specifies non-existent file: '$LT_CYGPATH'" fi } #end: func_cygpath # func_convert_core_msys_to_w32 ARG # Convert file name or path ARG from MSYS format to w32 format. Return # result in func_convert_core_msys_to_w32_result. func_convert_core_msys_to_w32 () { $debug_cmd # awkward: cmd appends spaces to result func_convert_core_msys_to_w32_result=`( cmd //c echo "$1" ) 2>/dev/null | $SED -e 's/[ ]*$//' -e "$sed_naive_backslashify"` } #end: func_convert_core_msys_to_w32 # func_convert_file_check ARG1 ARG2 # Verify that ARG1 (a file name in $build format) was converted to $host # format in ARG2. Otherwise, emit an error message, but continue (resetting # func_to_host_file_result to ARG1). func_convert_file_check () { $debug_cmd if test -z "$2" && test -n "$1"; then func_error "Could not determine host file name corresponding to" func_error " '$1'" func_error "Continuing, but uninstalled executables may not work." # Fallback: func_to_host_file_result=$1 fi } # end func_convert_file_check # func_convert_path_check FROM_PATHSEP TO_PATHSEP FROM_PATH TO_PATH # Verify that FROM_PATH (a path in $build format) was converted to $host # format in TO_PATH. Otherwise, emit an error message, but continue, resetting # func_to_host_file_result to a simplistic fallback value (see below). func_convert_path_check () { $debug_cmd if test -z "$4" && test -n "$3"; then func_error "Could not determine the host path corresponding to" func_error " '$3'" func_error "Continuing, but uninstalled executables may not work." # Fallback. This is a deliberately simplistic "conversion" and # should not be "improved". See libtool.info. if test "x$1" != "x$2"; then lt_replace_pathsep_chars="s|$1|$2|g" func_to_host_path_result=`echo "$3" | $SED -e "$lt_replace_pathsep_chars"` else func_to_host_path_result=$3 fi fi } # end func_convert_path_check # func_convert_path_front_back_pathsep FRONTPAT BACKPAT REPL ORIG # Modifies func_to_host_path_result by prepending REPL if ORIG matches FRONTPAT # and appending REPL if ORIG matches BACKPAT. func_convert_path_front_back_pathsep () { $debug_cmd case $4 in $1 ) func_to_host_path_result=$3$func_to_host_path_result ;; esac case $4 in $2 ) func_append func_to_host_path_result "$3" ;; esac } # end func_convert_path_front_back_pathsep ################################################## # $build to $host FILE NAME CONVERSION FUNCTIONS # ################################################## # invoked via '$to_host_file_cmd ARG' # # In each case, ARG is the path to be converted from $build to $host format. # Result will be available in $func_to_host_file_result. # func_to_host_file ARG # Converts the file name ARG from $build format to $host format. Return result # in func_to_host_file_result. func_to_host_file () { $debug_cmd $to_host_file_cmd "$1" } # end func_to_host_file # func_to_tool_file ARG LAZY # converts the file name ARG from $build format to toolchain format. Return # result in func_to_tool_file_result. If the conversion in use is listed # in (the comma separated) LAZY, no conversion takes place. func_to_tool_file () { $debug_cmd case ,$2, in *,"$to_tool_file_cmd",*) func_to_tool_file_result=$1 ;; *) $to_tool_file_cmd "$1" func_to_tool_file_result=$func_to_host_file_result ;; esac } # end func_to_tool_file # func_convert_file_noop ARG # Copy ARG to func_to_host_file_result. func_convert_file_noop () { func_to_host_file_result=$1 } # end func_convert_file_noop # func_convert_file_msys_to_w32 ARG # Convert file name ARG from (mingw) MSYS to (mingw) w32 format; automatic # conversion to w32 is not available inside the cwrapper. Returns result in # func_to_host_file_result. func_convert_file_msys_to_w32 () { $debug_cmd func_to_host_file_result=$1 if test -n "$1"; then func_convert_core_msys_to_w32 "$1" func_to_host_file_result=$func_convert_core_msys_to_w32_result fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_msys_to_w32 # func_convert_file_cygwin_to_w32 ARG # Convert file name ARG from Cygwin to w32 format. Returns result in # func_to_host_file_result. func_convert_file_cygwin_to_w32 () { $debug_cmd func_to_host_file_result=$1 if test -n "$1"; then # because $build is cygwin, we call "the" cygpath in $PATH; no need to use # LT_CYGPATH in this case. func_to_host_file_result=`cygpath -m "$1"` fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_cygwin_to_w32 # func_convert_file_nix_to_w32 ARG # Convert file name ARG from *nix to w32 format. Requires a wine environment # and a working winepath. Returns result in func_to_host_file_result. func_convert_file_nix_to_w32 () { $debug_cmd func_to_host_file_result=$1 if test -n "$1"; then func_convert_core_file_wine_to_w32 "$1" func_to_host_file_result=$func_convert_core_file_wine_to_w32_result fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_nix_to_w32 # func_convert_file_msys_to_cygwin ARG # Convert file name ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. # Returns result in func_to_host_file_result. func_convert_file_msys_to_cygwin () { $debug_cmd func_to_host_file_result=$1 if test -n "$1"; then func_convert_core_msys_to_w32 "$1" func_cygpath -u "$func_convert_core_msys_to_w32_result" func_to_host_file_result=$func_cygpath_result fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_msys_to_cygwin # func_convert_file_nix_to_cygwin ARG # Convert file name ARG from *nix to Cygwin format. Requires Cygwin installed # in a wine environment, working winepath, and LT_CYGPATH set. Returns result # in func_to_host_file_result. func_convert_file_nix_to_cygwin () { $debug_cmd func_to_host_file_result=$1 if test -n "$1"; then # convert from *nix to w32, then use cygpath to convert from w32 to cygwin. func_convert_core_file_wine_to_w32 "$1" func_cygpath -u "$func_convert_core_file_wine_to_w32_result" func_to_host_file_result=$func_cygpath_result fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_nix_to_cygwin ############################################# # $build to $host PATH CONVERSION FUNCTIONS # ############################################# # invoked via '$to_host_path_cmd ARG' # # In each case, ARG is the path to be converted from $build to $host format. # The result will be available in $func_to_host_path_result. # # Path separators are also converted from $build format to $host format. If # ARG begins or ends with a path separator character, it is preserved (but # converted to $host format) on output. # # All path conversion functions are named using the following convention: # file name conversion function : func_convert_file_X_to_Y () # path conversion function : func_convert_path_X_to_Y () # where, for any given $build/$host combination the 'X_to_Y' value is the # same. If conversion functions are added for new $build/$host combinations, # the two new functions must follow this pattern, or func_init_to_host_path_cmd # will break. # func_init_to_host_path_cmd # Ensures that function "pointer" variable $to_host_path_cmd is set to the # appropriate value, based on the value of $to_host_file_cmd. to_host_path_cmd= func_init_to_host_path_cmd () { $debug_cmd if test -z "$to_host_path_cmd"; then func_stripname 'func_convert_file_' '' "$to_host_file_cmd" to_host_path_cmd=func_convert_path_$func_stripname_result fi } # func_to_host_path ARG # Converts the path ARG from $build format to $host format. Return result # in func_to_host_path_result. func_to_host_path () { $debug_cmd func_init_to_host_path_cmd $to_host_path_cmd "$1" } # end func_to_host_path # func_convert_path_noop ARG # Copy ARG to func_to_host_path_result. func_convert_path_noop () { func_to_host_path_result=$1 } # end func_convert_path_noop # func_convert_path_msys_to_w32 ARG # Convert path ARG from (mingw) MSYS to (mingw) w32 format; automatic # conversion to w32 is not available inside the cwrapper. Returns result in # func_to_host_path_result. func_convert_path_msys_to_w32 () { $debug_cmd func_to_host_path_result=$1 if test -n "$1"; then # Remove leading and trailing path separator characters from ARG. MSYS # behavior is inconsistent here; cygpath turns them into '.;' and ';.'; # and winepath ignores them completely. func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" func_to_host_path_result=$func_convert_core_msys_to_w32_result func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" fi } # end func_convert_path_msys_to_w32 # func_convert_path_cygwin_to_w32 ARG # Convert path ARG from Cygwin to w32 format. Returns result in # func_to_host_file_result. func_convert_path_cygwin_to_w32 () { $debug_cmd func_to_host_path_result=$1 if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_to_host_path_result=`cygpath -m -p "$func_to_host_path_tmp1"` func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" fi } # end func_convert_path_cygwin_to_w32 # func_convert_path_nix_to_w32 ARG # Convert path ARG from *nix to w32 format. Requires a wine environment and # a working winepath. Returns result in func_to_host_file_result. func_convert_path_nix_to_w32 () { $debug_cmd func_to_host_path_result=$1 if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" func_to_host_path_result=$func_convert_core_path_wine_to_w32_result func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" fi } # end func_convert_path_nix_to_w32 # func_convert_path_msys_to_cygwin ARG # Convert path ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. # Returns result in func_to_host_file_result. func_convert_path_msys_to_cygwin () { $debug_cmd func_to_host_path_result=$1 if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" func_cygpath -u -p "$func_convert_core_msys_to_w32_result" func_to_host_path_result=$func_cygpath_result func_convert_path_check : : \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" : "$1" fi } # end func_convert_path_msys_to_cygwin # func_convert_path_nix_to_cygwin ARG # Convert path ARG from *nix to Cygwin format. Requires Cygwin installed in a # a wine environment, working winepath, and LT_CYGPATH set. Returns result in # func_to_host_file_result. func_convert_path_nix_to_cygwin () { $debug_cmd func_to_host_path_result=$1 if test -n "$1"; then # Remove leading and trailing path separator characters from # ARG. msys behavior is inconsistent here, cygpath turns them # into '.;' and ';.', and winepath ignores them completely. func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" func_cygpath -u -p "$func_convert_core_path_wine_to_w32_result" func_to_host_path_result=$func_cygpath_result func_convert_path_check : : \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" : "$1" fi } # end func_convert_path_nix_to_cygwin # func_dll_def_p FILE # True iff FILE is a Windows DLL '.def' file. # Keep in sync with _LT_DLL_DEF_P in libtool.m4 func_dll_def_p () { $debug_cmd func_dll_def_p_tmp=`$SED -n \ -e 's/^[ ]*//' \ -e '/^\(;.*\)*$/d' \ -e 's/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p' \ -e q \ "$1"` test DEF = "$func_dll_def_p_tmp" } # func_mode_compile arg... func_mode_compile () { $debug_cmd # Get the compilation command and the source file. base_compile= srcfile=$nonopt # always keep a non-empty value in "srcfile" suppress_opt=yes suppress_output= arg_mode=normal libobj= later= pie_flag= for arg do case $arg_mode in arg ) # do not "continue". Instead, add this to base_compile lastarg=$arg arg_mode=normal ;; target ) libobj=$arg arg_mode=normal continue ;; normal ) # Accept any command-line options. case $arg in -o) test -n "$libobj" && \ func_fatal_error "you cannot specify '-o' more than once" arg_mode=target continue ;; -pie | -fpie | -fPIE) func_append pie_flag " $arg" continue ;; -shared | -static | -prefer-pic | -prefer-non-pic) func_append later " $arg" continue ;; -no-suppress) suppress_opt=no continue ;; -Xcompiler) arg_mode=arg # the next one goes into the "base_compile" arg list continue # The current "srcfile" will either be retained or ;; # replaced later. I would guess that would be a bug. -Wc,*) func_stripname '-Wc,' '' "$arg" args=$func_stripname_result lastarg= save_ifs=$IFS; IFS=, for arg in $args; do IFS=$save_ifs func_append_quoted lastarg "$arg" done IFS=$save_ifs func_stripname ' ' '' "$lastarg" lastarg=$func_stripname_result # Add the arguments to base_compile. func_append base_compile " $lastarg" continue ;; *) # Accept the current argument as the source file. # The previous "srcfile" becomes the current argument. # lastarg=$srcfile srcfile=$arg ;; esac # case $arg ;; esac # case $arg_mode # Aesthetically quote the previous argument. func_append_quoted base_compile "$lastarg" done # for arg case $arg_mode in arg) func_fatal_error "you must specify an argument for -Xcompile" ;; target) func_fatal_error "you must specify a target with '-o'" ;; *) # Get the name of the library object. test -z "$libobj" && { func_basename "$srcfile" libobj=$func_basename_result } ;; esac # Recognize several different file suffixes. # If the user specifies -o file.o, it is replaced with file.lo case $libobj in *.[cCFSifmso] | \ *.ada | *.adb | *.ads | *.asm | \ *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \ *.[fF][09]? | *.for | *.java | *.go | *.obj | *.sx | *.cu | *.cup) func_xform "$libobj" libobj=$func_xform_result ;; esac case $libobj in *.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;; *) func_fatal_error "cannot determine name of library object from '$libobj'" ;; esac func_infer_tag $base_compile for arg in $later; do case $arg in -shared) test yes = "$build_libtool_libs" \ || func_fatal_configuration "cannot build a shared library" build_old_libs=no continue ;; -static) build_libtool_libs=no build_old_libs=yes continue ;; -prefer-pic) pic_mode=yes continue ;; -prefer-non-pic) pic_mode=no continue ;; esac done func_quote_for_eval "$libobj" test "X$libobj" != "X$func_quote_for_eval_result" \ && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"' &()|`$[]' \ && func_warning "libobj name '$libobj' may not contain shell special characters." func_dirname_and_basename "$obj" "/" "" objname=$func_basename_result xdir=$func_dirname_result lobj=$xdir$objdir/$objname test -z "$base_compile" && \ func_fatal_help "you must specify a compilation command" # Delete any leftover library objects. if test yes = "$build_old_libs"; then removelist="$obj $lobj $libobj ${libobj}T" else removelist="$lobj $libobj ${libobj}T" fi # On Cygwin there's no "real" PIC flag so we must build both object types case $host_os in cygwin* | mingw* | pw32* | os2* | cegcc*) pic_mode=default ;; esac if test no = "$pic_mode" && test pass_all != "$deplibs_check_method"; then # non-PIC code in shared libraries is not supported pic_mode=default fi # Calculate the filename of the output object if compiler does # not support -o with -c if test no = "$compiler_c_o"; then output_obj=`$ECHO "$srcfile" | $SED 's%^.*/%%; s%\.[^.]*$%%'`.$objext lockfile=$output_obj.lock else output_obj= need_locks=no lockfile= fi # Lock this critical section if it is needed # We use this script file to make the link, it avoids creating a new file if test yes = "$need_locks"; then until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do func_echo "Waiting for $lockfile to be removed" sleep 2 done elif test warn = "$need_locks"; then if test -f "$lockfile"; then $ECHO "\ *** ERROR, $lockfile exists and contains: `cat $lockfile 2>/dev/null` This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support '-c' and '-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi func_append removelist " $output_obj" $ECHO "$srcfile" > "$lockfile" fi $opt_dry_run || $RM $removelist func_append removelist " $lockfile" trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15 func_to_tool_file "$srcfile" func_convert_file_msys_to_w32 srcfile=$func_to_tool_file_result func_quote_for_eval "$srcfile" qsrcfile=$func_quote_for_eval_result # Only build a PIC object if we are building libtool libraries. if test yes = "$build_libtool_libs"; then # Without this assignment, base_compile gets emptied. fbsd_hideous_sh_bug=$base_compile if test no != "$pic_mode"; then command="$base_compile $qsrcfile $pic_flag" else # Don't build PIC code command="$base_compile $qsrcfile" fi func_mkdir_p "$xdir$objdir" if test -z "$output_obj"; then # Place PIC objects in $objdir func_append command " -o $lobj" fi func_show_eval_locale "$command" \ 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE' if test warn = "$need_locks" && test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then $ECHO "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` but it should contain: $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support '-c' and '-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi # Just move the object if needed, then go on to compile the next one if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then func_show_eval '$MV "$output_obj" "$lobj"' \ 'error=$?; $opt_dry_run || $RM $removelist; exit $error' fi # Allow error messages only from the first compilation. if test yes = "$suppress_opt"; then suppress_output=' >/dev/null 2>&1' fi fi # Only build a position-dependent object if we build old libraries. if test yes = "$build_old_libs"; then if test yes != "$pic_mode"; then # Don't build PIC code command="$base_compile $qsrcfile$pie_flag" else command="$base_compile $qsrcfile $pic_flag" fi if test yes = "$compiler_c_o"; then func_append command " -o $obj" fi # Suppress compiler output if we already did a PIC compilation. func_append command "$suppress_output" func_show_eval_locale "$command" \ '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' if test warn = "$need_locks" && test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then $ECHO "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` but it should contain: $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support '-c' and '-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi # Just move the object if needed if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then func_show_eval '$MV "$output_obj" "$obj"' \ 'error=$?; $opt_dry_run || $RM $removelist; exit $error' fi fi $opt_dry_run || { func_write_libtool_object "$libobj" "$objdir/$objname" "$objname" # Unlock the critical section if it was locked if test no != "$need_locks"; then removelist=$lockfile $RM "$lockfile" fi } exit $EXIT_SUCCESS } $opt_help || { test compile = "$opt_mode" && func_mode_compile ${1+"$@"} } func_mode_help () { # We need to display help for each of the modes. case $opt_mode in "") # Generic help is extracted from the usage comments # at the start of this file. func_help ;; clean) $ECHO \ "Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE... Remove files from the build directory. RM is the name of the program to use to delete files associated with each FILE (typically '/bin/rm'). RM-OPTIONS are options (such as '-f') to be passed to RM. If FILE is a libtool library, object or program, all the files associated with it are deleted. Otherwise, only FILE itself is deleted using RM." ;; compile) $ECHO \ "Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE Compile a source file into a libtool library object. This mode accepts the following additional options: -o OUTPUT-FILE set the output file name to OUTPUT-FILE -no-suppress do not suppress compiler output for multiple passes -prefer-pic try to build PIC objects only -prefer-non-pic try to build non-PIC objects only -shared do not build a '.o' file suitable for static linking -static only build a '.o' file suitable for static linking -Wc,FLAG pass FLAG directly to the compiler COMPILE-COMMAND is a command to be used in creating a 'standard' object file from the given SOURCEFILE. The output file name is determined by removing the directory component from SOURCEFILE, then substituting the C source code suffix '.c' with the library object suffix, '.lo'." ;; execute) $ECHO \ "Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]... Automatically set library path, then run a program. This mode accepts the following additional options: -dlopen FILE add the directory containing FILE to the library path This mode sets the library path environment variable according to '-dlopen' flags. If any of the ARGS are libtool executable wrappers, then they are translated into their corresponding uninstalled binary, and any of their required library directories are added to the library path. Then, COMMAND is executed, with ARGS as arguments." ;; finish) $ECHO \ "Usage: $progname [OPTION]... --mode=finish [LIBDIR]... Complete the installation of libtool libraries. Each LIBDIR is a directory that contains libtool libraries. The commands that this mode executes may require superuser privileges. Use the '--dry-run' option if you just want to see what would be executed." ;; install) $ECHO \ "Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND... Install executables or libraries. INSTALL-COMMAND is the installation command. The first component should be either the 'install' or 'cp' program. The following components of INSTALL-COMMAND are treated specially: -inst-prefix-dir PREFIX-DIR Use PREFIX-DIR as a staging area for installation The rest of the components are interpreted as arguments to that command (only BSD-compatible install options are recognized)." ;; link) $ECHO \ "Usage: $progname [OPTION]... --mode=link LINK-COMMAND... Link object files or libraries together to form another library, or to create an executable program. LINK-COMMAND is a command using the C compiler that you would use to create a program from several object files. The following components of LINK-COMMAND are treated specially: -all-static do not do any dynamic linking at all -avoid-version do not add a version suffix if possible -bindir BINDIR specify path to binaries directory (for systems where libraries must be found in the PATH setting at runtime) -dlopen FILE '-dlpreopen' FILE if it cannot be dlopened at runtime -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) -export-symbols SYMFILE try to export only the symbols listed in SYMFILE -export-symbols-regex REGEX try to export only the symbols matching REGEX -LLIBDIR search LIBDIR for required installed libraries -lNAME OUTPUT-FILE requires the installed library libNAME -module build a library that can dlopened -no-fast-install disable the fast-install mode -no-install link a not-installable executable -no-undefined declare that a library does not refer to external symbols -o OUTPUT-FILE create OUTPUT-FILE from the specified objects -objectlist FILE use a list of object files found in FILE to specify objects -os2dllname NAME force a short DLL name on OS/2 (no effect on other OSes) -precious-files-regex REGEX don't remove output files matching REGEX -release RELEASE specify package release information -rpath LIBDIR the created library will eventually be installed in LIBDIR -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries -shared only do dynamic linking of libtool libraries -shrext SUFFIX override the standard shared library file extension -static do not do any dynamic linking of uninstalled libtool libraries -static-libtool-libs do not do any dynamic linking of libtool libraries -version-info CURRENT[:REVISION[:AGE]] specify library version info [each variable defaults to 0] -weak LIBNAME declare that the target provides the LIBNAME interface -Wc,FLAG -Xcompiler FLAG pass linker-specific FLAG directly to the compiler -Wl,FLAG -Xlinker FLAG pass linker-specific FLAG directly to the linker -XCClinker FLAG pass link-specific FLAG to the compiler driver (CC) All other options (arguments beginning with '-') are ignored. Every other argument is treated as a filename. Files ending in '.la' are treated as uninstalled libtool libraries, other files are standard or library object files. If the OUTPUT-FILE ends in '.la', then a libtool library is created, only library objects ('.lo' files) may be specified, and '-rpath' is required, except when creating a convenience library. If OUTPUT-FILE ends in '.a' or '.lib', then a standard library is created using 'ar' and 'ranlib', or on Windows using 'lib'. If OUTPUT-FILE ends in '.lo' or '.$objext', then a reloadable object file is created, otherwise an executable program is created." ;; uninstall) $ECHO \ "Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... Remove libraries from an installation directory. RM is the name of the program to use to delete files associated with each FILE (typically '/bin/rm'). RM-OPTIONS are options (such as '-f') to be passed to RM. If FILE is a libtool library, all the files associated with it are deleted. Otherwise, only FILE itself is deleted using RM." ;; *) func_fatal_help "invalid operation mode '$opt_mode'" ;; esac echo $ECHO "Try '$progname --help' for more information about other modes." } # Now that we've collected a possible --mode arg, show help if necessary if $opt_help; then if test : = "$opt_help"; then func_mode_help else { func_help noexit for opt_mode in compile link execute install finish uninstall clean; do func_mode_help done } | $SED -n '1p; 2,$s/^Usage:/ or: /p' { func_help noexit for opt_mode in compile link execute install finish uninstall clean; do echo func_mode_help done } | $SED '1d /^When reporting/,/^Report/{ H d } $x /information about other modes/d /more detailed .*MODE/d s/^Usage:.*--mode=\([^ ]*\) .*/Description of \1 mode:/' fi exit $? fi # func_mode_execute arg... func_mode_execute () { $debug_cmd # The first argument is the command name. cmd=$nonopt test -z "$cmd" && \ func_fatal_help "you must specify a COMMAND" # Handle -dlopen flags immediately. for file in $opt_dlopen; do test -f "$file" \ || func_fatal_help "'$file' is not a file" dir= case $file in *.la) func_resolve_sysroot "$file" file=$func_resolve_sysroot_result # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$file" \ || func_fatal_help "'$lib' is not a valid libtool archive" # Read the libtool library. dlname= library_names= func_source "$file" # Skip this library if it cannot be dlopened. if test -z "$dlname"; then # Warn if it was a shared library. test -n "$library_names" && \ func_warning "'$file' was not linked with '-export-dynamic'" continue fi func_dirname "$file" "" "." dir=$func_dirname_result if test -f "$dir/$objdir/$dlname"; then func_append dir "/$objdir" else if test ! -f "$dir/$dlname"; then func_fatal_error "cannot find '$dlname' in '$dir' or '$dir/$objdir'" fi fi ;; *.lo) # Just add the directory containing the .lo file. func_dirname "$file" "" "." dir=$func_dirname_result ;; *) func_warning "'-dlopen' is ignored for non-libtool libraries and objects" continue ;; esac # Get the absolute pathname. absdir=`cd "$dir" && pwd` test -n "$absdir" && dir=$absdir # Now add the directory to shlibpath_var. if eval "test -z \"\$$shlibpath_var\""; then eval "$shlibpath_var=\"\$dir\"" else eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" fi done # This variable tells wrapper scripts just to set shlibpath_var # rather than running their programs. libtool_execute_magic=$magic # Check if any of the arguments is a wrapper script. args= for file do case $file in -* | *.la | *.lo ) ;; *) # Do a test to see if this is really a libtool program. if func_ltwrapper_script_p "$file"; then func_source "$file" # Transform arg to wrapped name. file=$progdir/$program elif func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" func_source "$func_ltwrapper_scriptname_result" # Transform arg to wrapped name. file=$progdir/$program fi ;; esac # Quote arguments (to preserve shell metacharacters). func_append_quoted args "$file" done if $opt_dry_run; then # Display what would be done. if test -n "$shlibpath_var"; then eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\"" echo "export $shlibpath_var" fi $ECHO "$cmd$args" exit $EXIT_SUCCESS else if test -n "$shlibpath_var"; then # Export the shlibpath_var. eval "export $shlibpath_var" fi # Restore saved environment variables for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES do eval "if test \"\${save_$lt_var+set}\" = set; then $lt_var=\$save_$lt_var; export $lt_var else $lt_unset $lt_var fi" done # Now prepare to actually exec the command. exec_cmd=\$cmd$args fi } test execute = "$opt_mode" && func_mode_execute ${1+"$@"} # func_mode_finish arg... func_mode_finish () { $debug_cmd libs= libdirs= admincmds= for opt in "$nonopt" ${1+"$@"} do if test -d "$opt"; then func_append libdirs " $opt" elif test -f "$opt"; then if func_lalib_unsafe_p "$opt"; then func_append libs " $opt" else func_warning "'$opt' is not a valid libtool archive" fi else func_fatal_error "invalid argument '$opt'" fi done if test -n "$libs"; then if test -n "$lt_sysroot"; then sysroot_regex=`$ECHO "$lt_sysroot" | $SED "$sed_make_literal_regex"` sysroot_cmd="s/\([ ']\)$sysroot_regex/\1/g;" else sysroot_cmd= fi # Remove sysroot references if $opt_dry_run; then for lib in $libs; do echo "removing references to $lt_sysroot and '=' prefixes from $lib" done else tmpdir=`func_mktempdir` for lib in $libs; do $SED -e "$sysroot_cmd s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \ > $tmpdir/tmp-la mv -f $tmpdir/tmp-la $lib done ${RM}r "$tmpdir" fi fi if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then for libdir in $libdirs; do if test -n "$finish_cmds"; then # Do each command in the finish commands. func_execute_cmds "$finish_cmds" 'admincmds="$admincmds '"$cmd"'"' fi if test -n "$finish_eval"; then # Do the single finish_eval. eval cmds=\"$finish_eval\" $opt_dry_run || eval "$cmds" || func_append admincmds " $cmds" fi done fi # Exit here if they wanted silent mode. $opt_quiet && exit $EXIT_SUCCESS if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then echo "----------------------------------------------------------------------" echo "Libraries have been installed in:" for libdir in $libdirs; do $ECHO " $libdir" done echo echo "If you ever happen to want to link against installed libraries" echo "in a given directory, LIBDIR, you must either use libtool, and" echo "specify the full pathname of the library, or use the '-LLIBDIR'" echo "flag during linking and do at least one of the following:" if test -n "$shlibpath_var"; then echo " - add LIBDIR to the '$shlibpath_var' environment variable" echo " during execution" fi if test -n "$runpath_var"; then echo " - add LIBDIR to the '$runpath_var' environment variable" echo " during linking" fi if test -n "$hardcode_libdir_flag_spec"; then libdir=LIBDIR eval flag=\"$hardcode_libdir_flag_spec\" $ECHO " - use the '$flag' linker flag" fi if test -n "$admincmds"; then $ECHO " - have your system administrator run these commands:$admincmds" fi if test -f /etc/ld.so.conf; then echo " - have your system administrator add LIBDIR to '/etc/ld.so.conf'" fi echo echo "See any operating system documentation about shared libraries for" case $host in solaris2.[6789]|solaris2.1[0-9]) echo "more information, such as the ld(1), crle(1) and ld.so(8) manual" echo "pages." ;; *) echo "more information, such as the ld(1) and ld.so(8) manual pages." ;; esac echo "----------------------------------------------------------------------" fi exit $EXIT_SUCCESS } test finish = "$opt_mode" && func_mode_finish ${1+"$@"} # func_mode_install arg... func_mode_install () { $debug_cmd # There may be an optional sh(1) argument at the beginning of # install_prog (especially on Windows NT). if test "$SHELL" = "$nonopt" || test /bin/sh = "$nonopt" || # Allow the use of GNU shtool's install command. case $nonopt in *shtool*) :;; *) false;; esac then # Aesthetically quote it. func_quote_for_eval "$nonopt" install_prog="$func_quote_for_eval_result " arg=$1 shift else install_prog= arg=$nonopt fi # The real first argument should be the name of the installation program. # Aesthetically quote it. func_quote_for_eval "$arg" func_append install_prog "$func_quote_for_eval_result" install_shared_prog=$install_prog case " $install_prog " in *[\\\ /]cp\ *) install_cp=: ;; *) install_cp=false ;; esac # We need to accept at least all the BSD install flags. dest= files= opts= prev= install_type= isdir=false stripme= no_mode=: for arg do arg2= if test -n "$dest"; then func_append files " $dest" dest=$arg continue fi case $arg in -d) isdir=: ;; -f) if $install_cp; then :; else prev=$arg fi ;; -g | -m | -o) prev=$arg ;; -s) stripme=" -s" continue ;; -*) ;; *) # If the previous option needed an argument, then skip it. if test -n "$prev"; then if test X-m = "X$prev" && test -n "$install_override_mode"; then arg2=$install_override_mode no_mode=false fi prev= else dest=$arg continue fi ;; esac # Aesthetically quote the argument. func_quote_for_eval "$arg" func_append install_prog " $func_quote_for_eval_result" if test -n "$arg2"; then func_quote_for_eval "$arg2" fi func_append install_shared_prog " $func_quote_for_eval_result" done test -z "$install_prog" && \ func_fatal_help "you must specify an install program" test -n "$prev" && \ func_fatal_help "the '$prev' option requires an argument" if test -n "$install_override_mode" && $no_mode; then if $install_cp; then :; else func_quote_for_eval "$install_override_mode" func_append install_shared_prog " -m $func_quote_for_eval_result" fi fi if test -z "$files"; then if test -z "$dest"; then func_fatal_help "no file or destination specified" else func_fatal_help "you must specify a destination" fi fi # Strip any trailing slash from the destination. func_stripname '' '/' "$dest" dest=$func_stripname_result # Check to see that the destination is a directory. test -d "$dest" && isdir=: if $isdir; then destdir=$dest destname= else func_dirname_and_basename "$dest" "" "." destdir=$func_dirname_result destname=$func_basename_result # Not a directory, so check to see that there is only one file specified. set dummy $files; shift test "$#" -gt 1 && \ func_fatal_help "'$dest' is not a directory" fi case $destdir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) for file in $files; do case $file in *.lo) ;; *) func_fatal_help "'$destdir' must be an absolute directory name" ;; esac done ;; esac # This variable tells wrapper scripts just to set variables rather # than running their programs. libtool_install_magic=$magic staticlibs= future_libdirs= current_libdirs= for file in $files; do # Do each installation. case $file in *.$libext) # Do the static libraries later. func_append staticlibs " $file" ;; *.la) func_resolve_sysroot "$file" file=$func_resolve_sysroot_result # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$file" \ || func_fatal_help "'$file' is not a valid libtool archive" library_names= old_library= relink_command= func_source "$file" # Add the libdir to current_libdirs if it is the destination. if test "X$destdir" = "X$libdir"; then case "$current_libdirs " in *" $libdir "*) ;; *) func_append current_libdirs " $libdir" ;; esac else # Note the libdir as a future libdir. case "$future_libdirs " in *" $libdir "*) ;; *) func_append future_libdirs " $libdir" ;; esac fi func_dirname "$file" "/" "" dir=$func_dirname_result func_append dir "$objdir" if test -n "$relink_command"; then # Determine the prefix the user has applied to our future dir. inst_prefix_dir=`$ECHO "$destdir" | $SED -e "s%$libdir\$%%"` # Don't allow the user to place us outside of our expected # location b/c this prevents finding dependent libraries that # are installed to the same prefix. # At present, this check doesn't affect windows .dll's that # are installed into $libdir/../bin (currently, that works fine) # but it's something to keep an eye on. test "$inst_prefix_dir" = "$destdir" && \ func_fatal_error "error: cannot install '$file' to a directory not ending in $libdir" if test -n "$inst_prefix_dir"; then # Stick the inst_prefix_dir data into the link command. relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` else relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%%"` fi func_warning "relinking '$file'" func_show_eval "$relink_command" \ 'func_fatal_error "error: relink '\''$file'\'' with the above command before installing it"' fi # See the names of the shared library. set dummy $library_names; shift if test -n "$1"; then realname=$1 shift srcname=$realname test -n "$relink_command" && srcname=${realname}T # Install the shared library and build the symlinks. func_show_eval "$install_shared_prog $dir/$srcname $destdir/$realname" \ 'exit $?' tstripme=$stripme case $host_os in cygwin* | mingw* | pw32* | cegcc*) case $realname in *.dll.a) tstripme= ;; esac ;; os2*) case $realname in *_dll.a) tstripme= ;; esac ;; esac if test -n "$tstripme" && test -n "$striplib"; then func_show_eval "$striplib $destdir/$realname" 'exit $?' fi if test "$#" -gt 0; then # Delete the old symlinks, and create new ones. # Try 'ln -sf' first, because the 'ln' binary might depend on # the symlink we replace! Solaris /bin/ln does not understand -f, # so we also need to try rm && ln -s. for linkname do test "$linkname" != "$realname" \ && func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })" done fi # Do each command in the postinstall commands. lib=$destdir/$realname func_execute_cmds "$postinstall_cmds" 'exit $?' fi # Install the pseudo-library for information purposes. func_basename "$file" name=$func_basename_result instname=$dir/${name}i func_show_eval "$install_prog $instname $destdir/$name" 'exit $?' # Maybe install the static library, too. test -n "$old_library" && func_append staticlibs " $dir/$old_library" ;; *.lo) # Install (i.e. copy) a libtool object. # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then destfile=$destdir/$destname else func_basename "$file" destfile=$func_basename_result destfile=$destdir/$destfile fi # Deduce the name of the destination old-style object file. case $destfile in *.lo) func_lo2o "$destfile" staticdest=$func_lo2o_result ;; *.$objext) staticdest=$destfile destfile= ;; *) func_fatal_help "cannot copy a libtool object to '$destfile'" ;; esac # Install the libtool object if requested. test -n "$destfile" && \ func_show_eval "$install_prog $file $destfile" 'exit $?' # Install the old object if enabled. if test yes = "$build_old_libs"; then # Deduce the name of the old-style object file. func_lo2o "$file" staticobj=$func_lo2o_result func_show_eval "$install_prog \$staticobj \$staticdest" 'exit $?' fi exit $EXIT_SUCCESS ;; *) # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then destfile=$destdir/$destname else func_basename "$file" destfile=$func_basename_result destfile=$destdir/$destfile fi # If the file is missing, and there is a .exe on the end, strip it # because it is most likely a libtool script we actually want to # install stripped_ext= case $file in *.exe) if test ! -f "$file"; then func_stripname '' '.exe' "$file" file=$func_stripname_result stripped_ext=.exe fi ;; esac # Do a test to see if this is really a libtool program. case $host in *cygwin* | *mingw*) if func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" wrapper=$func_ltwrapper_scriptname_result else func_stripname '' '.exe' "$file" wrapper=$func_stripname_result fi ;; *) wrapper=$file ;; esac if func_ltwrapper_script_p "$wrapper"; then notinst_deplibs= relink_command= func_source "$wrapper" # Check the variables that should have been set. test -z "$generated_by_libtool_version" && \ func_fatal_error "invalid libtool wrapper script '$wrapper'" finalize=: for lib in $notinst_deplibs; do # Check to see that each library is installed. libdir= if test -f "$lib"; then func_source "$lib" fi libfile=$libdir/`$ECHO "$lib" | $SED 's%^.*/%%g'` if test -n "$libdir" && test ! -f "$libfile"; then func_warning "'$lib' has not been installed in '$libdir'" finalize=false fi done relink_command= func_source "$wrapper" outputname= if test no = "$fast_install" && test -n "$relink_command"; then $opt_dry_run || { if $finalize; then tmpdir=`func_mktempdir` func_basename "$file$stripped_ext" file=$func_basename_result outputname=$tmpdir/$file # Replace the output file specification. relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'` $opt_quiet || { func_quote_for_expand "$relink_command" eval "func_echo $func_quote_for_expand_result" } if eval "$relink_command"; then : else func_error "error: relink '$file' with the above command before installing it" $opt_dry_run || ${RM}r "$tmpdir" continue fi file=$outputname else func_warning "cannot relink '$file'" fi } else # Install the binary that we compiled earlier. file=`$ECHO "$file$stripped_ext" | $SED "s%\([^/]*\)$%$objdir/\1%"` fi fi # remove .exe since cygwin /usr/bin/install will append another # one anyway case $install_prog,$host in */usr/bin/install*,*cygwin*) case $file:$destfile in *.exe:*.exe) # this is ok ;; *.exe:*) destfile=$destfile.exe ;; *:*.exe) func_stripname '' '.exe' "$destfile" destfile=$func_stripname_result ;; esac ;; esac func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?' $opt_dry_run || if test -n "$outputname"; then ${RM}r "$tmpdir" fi ;; esac done for file in $staticlibs; do func_basename "$file" name=$func_basename_result # Set up the ranlib parameters. oldlib=$destdir/$name func_to_tool_file "$oldlib" func_convert_file_msys_to_w32 tool_oldlib=$func_to_tool_file_result func_show_eval "$install_prog \$file \$oldlib" 'exit $?' if test -n "$stripme" && test -n "$old_striplib"; then func_show_eval "$old_striplib $tool_oldlib" 'exit $?' fi # Do each command in the postinstall commands. func_execute_cmds "$old_postinstall_cmds" 'exit $?' done test -n "$future_libdirs" && \ func_warning "remember to run '$progname --finish$future_libdirs'" if test -n "$current_libdirs"; then # Maybe just do a dry run. $opt_dry_run && current_libdirs=" -n$current_libdirs" exec_cmd='$SHELL "$progpath" $preserve_args --finish$current_libdirs' else exit $EXIT_SUCCESS fi } test install = "$opt_mode" && func_mode_install ${1+"$@"} # func_generate_dlsyms outputname originator pic_p # Extract symbols from dlprefiles and create ${outputname}S.o with # a dlpreopen symbol table. func_generate_dlsyms () { $debug_cmd my_outputname=$1 my_originator=$2 my_pic_p=${3-false} my_prefix=`$ECHO "$my_originator" | $SED 's%[^a-zA-Z0-9]%_%g'` my_dlsyms= if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then if test -n "$NM" && test -n "$global_symbol_pipe"; then my_dlsyms=${my_outputname}S.c else func_error "not configured to extract global symbols from dlpreopened files" fi fi if test -n "$my_dlsyms"; then case $my_dlsyms in "") ;; *.c) # Discover the nlist of each of the dlfiles. nlist=$output_objdir/$my_outputname.nm func_show_eval "$RM $nlist ${nlist}S ${nlist}T" # Parse the name list into a source file. func_verbose "creating $output_objdir/$my_dlsyms" $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\ /* $my_dlsyms - symbol resolution table for '$my_outputname' dlsym emulation. */ /* Generated by $PROGRAM (GNU $PACKAGE) $VERSION */ #ifdef __cplusplus extern \"C\" { #endif #if defined __GNUC__ && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4)) #pragma GCC diagnostic ignored \"-Wstrict-prototypes\" #endif /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ #if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE /* DATA imports from DLLs on WIN32 can't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT_DLSYM_CONST #elif defined __osf__ /* This system does not cope well with relocations in const data. */ # define LT_DLSYM_CONST #else # define LT_DLSYM_CONST const #endif #define STREQ(s1, s2) (strcmp ((s1), (s2)) == 0) /* External symbol declarations for the compiler. */\ " if test yes = "$dlself"; then func_verbose "generating symbol list for '$output'" $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist" # Add our own program objects to the symbol list. progfiles=`$ECHO "$objs$old_deplibs" | $SP2NL | $SED "$lo2o" | $NL2SP` for progfile in $progfiles; do func_to_tool_file "$progfile" func_convert_file_msys_to_w32 func_verbose "extracting global C symbols from '$func_to_tool_file_result'" $opt_dry_run || eval "$NM $func_to_tool_file_result | $global_symbol_pipe >> '$nlist'" done if test -n "$exclude_expsyms"; then $opt_dry_run || { eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' } fi if test -n "$export_symbols_regex"; then $opt_dry_run || { eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' } fi # Prepare the list of exported symbols if test -z "$export_symbols"; then export_symbols=$output_objdir/$outputname.exp $opt_dry_run || { $RM $export_symbols eval "$SED -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' case $host in *cygwin* | *mingw* | *cegcc* ) eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' ;; esac } else $opt_dry_run || { eval "$SED -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' case $host in *cygwin* | *mingw* | *cegcc* ) eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' ;; esac } fi fi for dlprefile in $dlprefiles; do func_verbose "extracting global C symbols from '$dlprefile'" func_basename "$dlprefile" name=$func_basename_result case $host in *cygwin* | *mingw* | *cegcc* ) # if an import library, we need to obtain dlname if func_win32_import_lib_p "$dlprefile"; then func_tr_sh "$dlprefile" eval "curr_lafile=\$libfile_$func_tr_sh_result" dlprefile_dlbasename= if test -n "$curr_lafile" && func_lalib_p "$curr_lafile"; then # Use subshell, to avoid clobbering current variable values dlprefile_dlname=`source "$curr_lafile" && echo "$dlname"` if test -n "$dlprefile_dlname"; then func_basename "$dlprefile_dlname" dlprefile_dlbasename=$func_basename_result else # no lafile. user explicitly requested -dlpreopen . $sharedlib_from_linklib_cmd "$dlprefile" dlprefile_dlbasename=$sharedlib_from_linklib_result fi fi $opt_dry_run || { if test -n "$dlprefile_dlbasename"; then eval '$ECHO ": $dlprefile_dlbasename" >> "$nlist"' else func_warning "Could not compute DLL name from $name" eval '$ECHO ": $name " >> "$nlist"' fi func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe | $SED -e '/I __imp/d' -e 's/I __nm_/D /;s/_nm__//' >> '$nlist'" } else # not an import lib $opt_dry_run || { eval '$ECHO ": $name " >> "$nlist"' func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" } fi ;; *) $opt_dry_run || { eval '$ECHO ": $name " >> "$nlist"' func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" } ;; esac done $opt_dry_run || { # Make sure we have at least an empty file. test -f "$nlist" || : > "$nlist" if test -n "$exclude_expsyms"; then $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T $MV "$nlist"T "$nlist" fi # Try sorting and uniquifying the output. if $GREP -v "^: " < "$nlist" | if sort -k 3 /dev/null 2>&1; then sort -k 3 else sort +2 fi | uniq > "$nlist"S; then : else $GREP -v "^: " < "$nlist" > "$nlist"S fi if test -f "$nlist"S; then eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"' else echo '/* NONE */' >> "$output_objdir/$my_dlsyms" fi func_show_eval '$RM "${nlist}I"' if test -n "$global_symbol_to_import"; then eval "$global_symbol_to_import"' < "$nlist"S > "$nlist"I' fi echo >> "$output_objdir/$my_dlsyms" "\ /* The mapping between symbol names and symbols. */ typedef struct { const char *name; void *address; } lt_dlsymlist; extern LT_DLSYM_CONST lt_dlsymlist lt_${my_prefix}_LTX_preloaded_symbols[];\ " if test -s "$nlist"I; then echo >> "$output_objdir/$my_dlsyms" "\ static void lt_syminit(void) { LT_DLSYM_CONST lt_dlsymlist *symbol = lt_${my_prefix}_LTX_preloaded_symbols; for (; symbol->name; ++symbol) {" $SED 's/.*/ if (STREQ (symbol->name, \"&\")) symbol->address = (void *) \&&;/' < "$nlist"I >> "$output_objdir/$my_dlsyms" echo >> "$output_objdir/$my_dlsyms" "\ } }" fi echo >> "$output_objdir/$my_dlsyms" "\ LT_DLSYM_CONST lt_dlsymlist lt_${my_prefix}_LTX_preloaded_symbols[] = { {\"$my_originator\", (void *) 0}," if test -s "$nlist"I; then echo >> "$output_objdir/$my_dlsyms" "\ {\"@INIT@\", (void *) <_syminit}," fi case $need_lib_prefix in no) eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms" ;; *) eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms" ;; esac echo >> "$output_objdir/$my_dlsyms" "\ {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt_${my_prefix}_LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif\ " } # !$opt_dry_run pic_flag_for_symtable= case "$compile_command " in *" -static "*) ;; *) case $host in # compiling the symbol table file with pic_flag works around # a FreeBSD bug that causes programs to crash when -lm is # linked before any other PIC object. But we must not use # pic_flag when linking with -static. The problem exists in # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. *-*-freebsd2.*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;; *-*-hpux*) pic_flag_for_symtable=" $pic_flag" ;; *) $my_pic_p && pic_flag_for_symtable=" $pic_flag" ;; esac ;; esac symtab_cflags= for arg in $LTCFLAGS; do case $arg in -pie | -fpie | -fPIE) ;; *) func_append symtab_cflags " $arg" ;; esac done # Now compile the dynamic symbol file. func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?' # Clean up the generated files. func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T" "${nlist}I"' # Transform the symbol file into the correct name. symfileobj=$output_objdir/${my_outputname}S.$objext case $host in *cygwin* | *mingw* | *cegcc* ) if test -f "$output_objdir/$my_outputname.def"; then compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` else compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` fi ;; *) compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` ;; esac ;; *) func_fatal_error "unknown suffix for '$my_dlsyms'" ;; esac else # We keep going just in case the user didn't refer to # lt_preloaded_symbols. The linker will fail if global_symbol_pipe # really was required. # Nullify the symbol file. compile_command=`$ECHO "$compile_command" | $SED "s% @SYMFILE@%%"` finalize_command=`$ECHO "$finalize_command" | $SED "s% @SYMFILE@%%"` fi } # func_cygming_gnu_implib_p ARG # This predicate returns with zero status (TRUE) if # ARG is a GNU/binutils-style import library. Returns # with nonzero status (FALSE) otherwise. func_cygming_gnu_implib_p () { $debug_cmd func_to_tool_file "$1" func_convert_file_msys_to_w32 func_cygming_gnu_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $EGREP ' (_head_[A-Za-z0-9_]+_[ad]l*|[A-Za-z0-9_]+_[ad]l*_iname)$'` test -n "$func_cygming_gnu_implib_tmp" } # func_cygming_ms_implib_p ARG # This predicate returns with zero status (TRUE) if # ARG is an MS-style import library. Returns # with nonzero status (FALSE) otherwise. func_cygming_ms_implib_p () { $debug_cmd func_to_tool_file "$1" func_convert_file_msys_to_w32 func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'` test -n "$func_cygming_ms_implib_tmp" } # func_win32_libid arg # return the library type of file 'arg' # # Need a lot of goo to handle *both* DLLs and import libs # Has to be a shell function in order to 'eat' the argument # that is supplied when $file_magic_command is called. # Despite the name, also deal with 64 bit binaries. func_win32_libid () { $debug_cmd win32_libid_type=unknown win32_fileres=`file -L $1 2>/dev/null` case $win32_fileres in *ar\ archive\ import\ library*) # definitely import win32_libid_type="x86 archive import" ;; *ar\ archive*) # could be an import, or static # Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD. if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then case $nm_interface in "MS dumpbin") if func_cygming_ms_implib_p "$1" || func_cygming_gnu_implib_p "$1" then win32_nmres=import else win32_nmres= fi ;; *) func_to_tool_file "$1" func_convert_file_msys_to_w32 win32_nmres=`eval $NM -f posix -A \"$func_to_tool_file_result\" | $SED -n -e ' 1,100{ / I /{ s|.*|import| p q } }'` ;; esac case $win32_nmres in import*) win32_libid_type="x86 archive import";; *) win32_libid_type="x86 archive static";; esac fi ;; *DLL*) win32_libid_type="x86 DLL" ;; *executable*) # but shell scripts are "executable" too... case $win32_fileres in *MS\ Windows\ PE\ Intel*) win32_libid_type="x86 DLL" ;; esac ;; esac $ECHO "$win32_libid_type" } # func_cygming_dll_for_implib ARG # # Platform-specific function to extract the # name of the DLL associated with the specified # import library ARG. # Invoked by eval'ing the libtool variable # $sharedlib_from_linklib_cmd # Result is available in the variable # $sharedlib_from_linklib_result func_cygming_dll_for_implib () { $debug_cmd sharedlib_from_linklib_result=`$DLLTOOL --identify-strict --identify "$1"` } # func_cygming_dll_for_implib_fallback_core SECTION_NAME LIBNAMEs # # The is the core of a fallback implementation of a # platform-specific function to extract the name of the # DLL associated with the specified import library LIBNAME. # # SECTION_NAME is either .idata$6 or .idata$7, depending # on the platform and compiler that created the implib. # # Echos the name of the DLL associated with the # specified import library. func_cygming_dll_for_implib_fallback_core () { $debug_cmd match_literal=`$ECHO "$1" | $SED "$sed_make_literal_regex"` $OBJDUMP -s --section "$1" "$2" 2>/dev/null | $SED '/^Contents of section '"$match_literal"':/{ # Place marker at beginning of archive member dllname section s/.*/====MARK====/ p d } # These lines can sometimes be longer than 43 characters, but # are always uninteresting /:[ ]*file format pe[i]\{,1\}-/d /^In archive [^:]*:/d # Ensure marker is printed /^====MARK====/p # Remove all lines with less than 43 characters /^.\{43\}/!d # From remaining lines, remove first 43 characters s/^.\{43\}//' | $SED -n ' # Join marker and all lines until next marker into a single line /^====MARK====/ b para H $ b para b :para x s/\n//g # Remove the marker s/^====MARK====// # Remove trailing dots and whitespace s/[\. \t]*$// # Print /./p' | # we now have a list, one entry per line, of the stringified # contents of the appropriate section of all members of the # archive that possess that section. Heuristic: eliminate # all those that have a first or second character that is # a '.' (that is, objdump's representation of an unprintable # character.) This should work for all archives with less than # 0x302f exports -- but will fail for DLLs whose name actually # begins with a literal '.' or a single character followed by # a '.'. # # Of those that remain, print the first one. $SED -e '/^\./d;/^.\./d;q' } # func_cygming_dll_for_implib_fallback ARG # Platform-specific function to extract the # name of the DLL associated with the specified # import library ARG. # # This fallback implementation is for use when $DLLTOOL # does not support the --identify-strict option. # Invoked by eval'ing the libtool variable # $sharedlib_from_linklib_cmd # Result is available in the variable # $sharedlib_from_linklib_result func_cygming_dll_for_implib_fallback () { $debug_cmd if func_cygming_gnu_implib_p "$1"; then # binutils import library sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$7' "$1"` elif func_cygming_ms_implib_p "$1"; then # ms-generated import library sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$6' "$1"` else # unknown sharedlib_from_linklib_result= fi } # func_extract_an_archive dir oldlib func_extract_an_archive () { $debug_cmd f_ex_an_ar_dir=$1; shift f_ex_an_ar_oldlib=$1 if test yes = "$lock_old_archive_extraction"; then lockfile=$f_ex_an_ar_oldlib.lock until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do func_echo "Waiting for $lockfile to be removed" sleep 2 done fi func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" \ 'stat=$?; rm -f "$lockfile"; exit $stat' if test yes = "$lock_old_archive_extraction"; then $opt_dry_run || rm -f "$lockfile" fi if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then : else func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" fi } # func_extract_archives gentop oldlib ... func_extract_archives () { $debug_cmd my_gentop=$1; shift my_oldlibs=${1+"$@"} my_oldobjs= my_xlib= my_xabs= my_xdir= for my_xlib in $my_oldlibs; do # Extract the objects. case $my_xlib in [\\/]* | [A-Za-z]:[\\/]*) my_xabs=$my_xlib ;; *) my_xabs=`pwd`"/$my_xlib" ;; esac func_basename "$my_xlib" my_xlib=$func_basename_result my_xlib_u=$my_xlib while :; do case " $extracted_archives " in *" $my_xlib_u "*) func_arith $extracted_serial + 1 extracted_serial=$func_arith_result my_xlib_u=lt$extracted_serial-$my_xlib ;; *) break ;; esac done extracted_archives="$extracted_archives $my_xlib_u" my_xdir=$my_gentop/$my_xlib_u func_mkdir_p "$my_xdir" case $host in *-darwin*) func_verbose "Extracting $my_xabs" # Do not bother doing anything if just a dry run $opt_dry_run || { darwin_orig_dir=`pwd` cd $my_xdir || exit $? darwin_archive=$my_xabs darwin_curdir=`pwd` func_basename "$darwin_archive" darwin_base_archive=$func_basename_result darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true` if test -n "$darwin_arches"; then darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'` darwin_arch= func_verbose "$darwin_base_archive has multiple architectures $darwin_arches" for darwin_arch in $darwin_arches; do func_mkdir_p "unfat-$$/$darwin_base_archive-$darwin_arch" $LIPO -thin $darwin_arch -output "unfat-$$/$darwin_base_archive-$darwin_arch/$darwin_base_archive" "$darwin_archive" cd "unfat-$$/$darwin_base_archive-$darwin_arch" func_extract_an_archive "`pwd`" "$darwin_base_archive" cd "$darwin_curdir" $RM "unfat-$$/$darwin_base_archive-$darwin_arch/$darwin_base_archive" done # $darwin_arches ## Okay now we've a bunch of thin objects, gotta fatten them up :) darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$sed_basename" | sort -u` darwin_file= darwin_files= for darwin_file in $darwin_filelist; do darwin_files=`find unfat-$$ -name $darwin_file -print | sort | $NL2SP` $LIPO -create -output "$darwin_file" $darwin_files done # $darwin_filelist $RM -rf unfat-$$ cd "$darwin_orig_dir" else cd $darwin_orig_dir func_extract_an_archive "$my_xdir" "$my_xabs" fi # $darwin_arches } # !$opt_dry_run ;; *) func_extract_an_archive "$my_xdir" "$my_xabs" ;; esac my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | sort | $NL2SP` done func_extract_archives_result=$my_oldobjs } # func_emit_wrapper [arg=no] # # Emit a libtool wrapper script on stdout. # Don't directly open a file because we may want to # incorporate the script contents within a cygwin/mingw # wrapper executable. Must ONLY be called from within # func_mode_link because it depends on a number of variables # set therein. # # ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR # variable will take. If 'yes', then the emitted script # will assume that the directory where it is stored is # the $objdir directory. This is a cygwin/mingw-specific # behavior. func_emit_wrapper () { func_emit_wrapper_arg1=${1-no} $ECHO "\ #! $SHELL # $output - temporary wrapper script for $objdir/$outputname # Generated by $PROGRAM (GNU $PACKAGE) $VERSION # # The $output program cannot be directly executed until all the libtool # libraries that it depends on are installed. # # This wrapper script should never be moved out of the build directory. # If it is, it will not operate correctly. # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. sed_quote_subst='$sed_quote_subst' # Be Bourne compatible if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac fi BIN_SH=xpg4; export BIN_SH # for Tru64 DUALCASE=1; export DUALCASE # for MKS sh # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH relink_command=\"$relink_command\" # This environment variable determines our operation mode. if test \"\$libtool_install_magic\" = \"$magic\"; then # install mode needs the following variables: generated_by_libtool_version='$macro_version' notinst_deplibs='$notinst_deplibs' else # When we are sourced in execute mode, \$file and \$ECHO are already set. if test \"\$libtool_execute_magic\" != \"$magic\"; then file=\"\$0\"" qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"` $ECHO "\ # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF \$1 _LTECHO_EOF' } ECHO=\"$qECHO\" fi # Very basic option parsing. These options are (a) specific to # the libtool wrapper, (b) are identical between the wrapper # /script/ and the wrapper /executable/ that is used only on # windows platforms, and (c) all begin with the string "--lt-" # (application programs are unlikely to have options that match # this pattern). # # There are only two supported options: --lt-debug and # --lt-dump-script. There is, deliberately, no --lt-help. # # The first argument to this parsing function should be the # script's $0 value, followed by "$@". lt_option_debug= func_parse_lt_options () { lt_script_arg0=\$0 shift for lt_opt do case \"\$lt_opt\" in --lt-debug) lt_option_debug=1 ;; --lt-dump-script) lt_dump_D=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%/[^/]*$%%'\` test \"X\$lt_dump_D\" = \"X\$lt_script_arg0\" && lt_dump_D=. lt_dump_F=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%^.*/%%'\` cat \"\$lt_dump_D/\$lt_dump_F\" exit 0 ;; --lt-*) \$ECHO \"Unrecognized --lt- option: '\$lt_opt'\" 1>&2 exit 1 ;; esac done # Print the debug banner immediately: if test -n \"\$lt_option_debug\"; then echo \"$outputname:$output:\$LINENO: libtool wrapper (GNU $PACKAGE) $VERSION\" 1>&2 fi } # Used when --lt-debug. Prints its arguments to stdout # (redirection is the responsibility of the caller) func_lt_dump_args () { lt_dump_args_N=1; for lt_arg do \$ECHO \"$outputname:$output:\$LINENO: newargv[\$lt_dump_args_N]: \$lt_arg\" lt_dump_args_N=\`expr \$lt_dump_args_N + 1\` done } # Core function for launching the target application func_exec_program_core () { " case $host in # Backslashes separate directories on plain windows *-*-mingw | *-*-os2* | *-cegcc*) $ECHO "\ if test -n \"\$lt_option_debug\"; then \$ECHO \"$outputname:$output:\$LINENO: newargv[0]: \$progdir\\\\\$program\" 1>&2 func_lt_dump_args \${1+\"\$@\"} 1>&2 fi exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} " ;; *) $ECHO "\ if test -n \"\$lt_option_debug\"; then \$ECHO \"$outputname:$output:\$LINENO: newargv[0]: \$progdir/\$program\" 1>&2 func_lt_dump_args \${1+\"\$@\"} 1>&2 fi exec \"\$progdir/\$program\" \${1+\"\$@\"} " ;; esac $ECHO "\ \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2 exit 1 } # A function to encapsulate launching the target application # Strips options in the --lt-* namespace from \$@ and # launches target application with the remaining arguments. func_exec_program () { case \" \$* \" in *\\ --lt-*) for lt_wr_arg do case \$lt_wr_arg in --lt-*) ;; *) set x \"\$@\" \"\$lt_wr_arg\"; shift;; esac shift done ;; esac func_exec_program_core \${1+\"\$@\"} } # Parse options func_parse_lt_options \"\$0\" \${1+\"\$@\"} # Find the directory that this script lives in. thisdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*$%%'\` test \"x\$thisdir\" = \"x\$file\" && thisdir=. # Follow symbolic links until we get to the real thisdir. file=\`ls -ld \"\$file\" | $SED -n 's/.*-> //p'\` while test -n \"\$file\"; do destdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*\$%%'\` # If there was a directory component, then change thisdir. if test \"x\$destdir\" != \"x\$file\"; then case \"\$destdir\" in [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;; *) thisdir=\"\$thisdir/\$destdir\" ;; esac fi file=\`\$ECHO \"\$file\" | $SED 's%^.*/%%'\` file=\`ls -ld \"\$thisdir/\$file\" | $SED -n 's/.*-> //p'\` done # Usually 'no', except on cygwin/mingw when embedded into # the cwrapper. WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_arg1 if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then # special case for '.' if test \"\$thisdir\" = \".\"; then thisdir=\`pwd\` fi # remove .libs from thisdir case \"\$thisdir\" in *[\\\\/]$objdir ) thisdir=\`\$ECHO \"\$thisdir\" | $SED 's%[\\\\/][^\\\\/]*$%%'\` ;; $objdir ) thisdir=. ;; esac fi # Try to get the absolute directory name. absdir=\`cd \"\$thisdir\" && pwd\` test -n \"\$absdir\" && thisdir=\"\$absdir\" " if test yes = "$fast_install"; then $ECHO "\ program=lt-'$outputname'$exeext progdir=\"\$thisdir/$objdir\" if test ! -f \"\$progdir/\$program\" || { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | $SED 1q\`; \\ test \"X\$file\" != \"X\$progdir/\$program\"; }; then file=\"\$\$-\$program\" if test ! -d \"\$progdir\"; then $MKDIR \"\$progdir\" else $RM \"\$progdir/\$file\" fi" $ECHO "\ # relink executable if necessary if test -n \"\$relink_command\"; then if relink_command_output=\`eval \$relink_command 2>&1\`; then : else \$ECHO \"\$relink_command_output\" >&2 $RM \"\$progdir/\$file\" exit 1 fi fi $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || { $RM \"\$progdir/\$program\"; $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; } $RM \"\$progdir/\$file\" fi" else $ECHO "\ program='$outputname' progdir=\"\$thisdir/$objdir\" " fi $ECHO "\ if test -f \"\$progdir/\$program\"; then" # fixup the dll searchpath if we need to. # # Fix the DLL searchpath if we need to. Do this before prepending # to shlibpath, because on Windows, both are PATH and uninstalled # libraries must come first. if test -n "$dllsearchpath"; then $ECHO "\ # Add the dll search path components to the executable PATH PATH=$dllsearchpath:\$PATH " fi # Export our shlibpath_var if we have one. if test yes = "$shlibpath_overrides_runpath" && test -n "$shlibpath_var" && test -n "$temp_rpath"; then $ECHO "\ # Add our own library path to $shlibpath_var $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" # Some systems cannot cope with colon-terminated $shlibpath_var # The second colon is a workaround for a bug in BeOS R4 sed $shlibpath_var=\`\$ECHO \"\$$shlibpath_var\" | $SED 's/::*\$//'\` export $shlibpath_var " fi $ECHO "\ if test \"\$libtool_execute_magic\" != \"$magic\"; then # Run the actual program with our arguments. func_exec_program \${1+\"\$@\"} fi else # The program doesn't exist. \$ECHO \"\$0: error: '\$progdir/\$program' does not exist\" 1>&2 \$ECHO \"This script is just a wrapper for \$program.\" 1>&2 \$ECHO \"See the $PACKAGE documentation for more information.\" 1>&2 exit 1 fi fi\ " } # func_emit_cwrapperexe_src # emit the source code for a wrapper executable on stdout # Must ONLY be called from within func_mode_link because # it depends on a number of variable set therein. func_emit_cwrapperexe_src () { cat < #include #ifdef _MSC_VER # include # include # include #else # include # include # ifdef __CYGWIN__ # include # endif #endif #include #include #include #include #include #include #include #include #define STREQ(s1, s2) (strcmp ((s1), (s2)) == 0) /* declarations of non-ANSI functions */ #if defined __MINGW32__ # ifdef __STRICT_ANSI__ int _putenv (const char *); # endif #elif defined __CYGWIN__ # ifdef __STRICT_ANSI__ char *realpath (const char *, char *); int putenv (char *); int setenv (const char *, const char *, int); # endif /* #elif defined other_platform || defined ... */ #endif /* portability defines, excluding path handling macros */ #if defined _MSC_VER # define setmode _setmode # define stat _stat # define chmod _chmod # define getcwd _getcwd # define putenv _putenv # define S_IXUSR _S_IEXEC #elif defined __MINGW32__ # define setmode _setmode # define stat _stat # define chmod _chmod # define getcwd _getcwd # define putenv _putenv #elif defined __CYGWIN__ # define HAVE_SETENV # define FOPEN_WB "wb" /* #elif defined other platforms ... */ #endif #if defined PATH_MAX # define LT_PATHMAX PATH_MAX #elif defined MAXPATHLEN # define LT_PATHMAX MAXPATHLEN #else # define LT_PATHMAX 1024 #endif #ifndef S_IXOTH # define S_IXOTH 0 #endif #ifndef S_IXGRP # define S_IXGRP 0 #endif /* path handling portability macros */ #ifndef DIR_SEPARATOR # define DIR_SEPARATOR '/' # define PATH_SEPARATOR ':' #endif #if defined _WIN32 || defined __MSDOS__ || defined __DJGPP__ || \ defined __OS2__ # define HAVE_DOS_BASED_FILE_SYSTEM # define FOPEN_WB "wb" # ifndef DIR_SEPARATOR_2 # define DIR_SEPARATOR_2 '\\' # endif # ifndef PATH_SEPARATOR_2 # define PATH_SEPARATOR_2 ';' # endif #endif #ifndef DIR_SEPARATOR_2 # define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR) #else /* DIR_SEPARATOR_2 */ # define IS_DIR_SEPARATOR(ch) \ (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) #endif /* DIR_SEPARATOR_2 */ #ifndef PATH_SEPARATOR_2 # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR) #else /* PATH_SEPARATOR_2 */ # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2) #endif /* PATH_SEPARATOR_2 */ #ifndef FOPEN_WB # define FOPEN_WB "w" #endif #ifndef _O_BINARY # define _O_BINARY 0 #endif #define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) #define XFREE(stale) do { \ if (stale) { free (stale); stale = 0; } \ } while (0) #if defined LT_DEBUGWRAPPER static int lt_debug = 1; #else static int lt_debug = 0; #endif const char *program_name = "libtool-wrapper"; /* in case xstrdup fails */ void *xmalloc (size_t num); char *xstrdup (const char *string); const char *base_name (const char *name); char *find_executable (const char *wrapper); char *chase_symlinks (const char *pathspec); int make_executable (const char *path); int check_executable (const char *path); char *strendzap (char *str, const char *pat); void lt_debugprintf (const char *file, int line, const char *fmt, ...); void lt_fatal (const char *file, int line, const char *message, ...); static const char *nonnull (const char *s); static const char *nonempty (const char *s); void lt_setenv (const char *name, const char *value); char *lt_extend_str (const char *orig_value, const char *add, int to_end); void lt_update_exe_path (const char *name, const char *value); void lt_update_lib_path (const char *name, const char *value); char **prepare_spawn (char **argv); void lt_dump_script (FILE *f); EOF cat <= 0) && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH))) return 1; else return 0; } int make_executable (const char *path) { int rval = 0; struct stat st; lt_debugprintf (__FILE__, __LINE__, "(make_executable): %s\n", nonempty (path)); if ((!path) || (!*path)) return 0; if (stat (path, &st) >= 0) { rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR); } return rval; } /* Searches for the full path of the wrapper. Returns newly allocated full path name if found, NULL otherwise Does not chase symlinks, even on platforms that support them. */ char * find_executable (const char *wrapper) { int has_slash = 0; const char *p; const char *p_next; /* static buffer for getcwd */ char tmp[LT_PATHMAX + 1]; size_t tmp_len; char *concat_name; lt_debugprintf (__FILE__, __LINE__, "(find_executable): %s\n", nonempty (wrapper)); if ((wrapper == NULL) || (*wrapper == '\0')) return NULL; /* Absolute path? */ #if defined HAVE_DOS_BASED_FILE_SYSTEM if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':') { concat_name = xstrdup (wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } else { #endif if (IS_DIR_SEPARATOR (wrapper[0])) { concat_name = xstrdup (wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } #if defined HAVE_DOS_BASED_FILE_SYSTEM } #endif for (p = wrapper; *p; p++) if (*p == '/') { has_slash = 1; break; } if (!has_slash) { /* no slashes; search PATH */ const char *path = getenv ("PATH"); if (path != NULL) { for (p = path; *p; p = p_next) { const char *q; size_t p_len; for (q = p; *q; q++) if (IS_PATH_SEPARATOR (*q)) break; p_len = (size_t) (q - p); p_next = (*q == '\0' ? q : q + 1); if (p_len == 0) { /* empty path: current directory */ if (getcwd (tmp, LT_PATHMAX) == NULL) lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", nonnull (strerror (errno))); tmp_len = strlen (tmp); concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, tmp, tmp_len); concat_name[tmp_len] = '/'; strcpy (concat_name + tmp_len + 1, wrapper); } else { concat_name = XMALLOC (char, p_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, p, p_len); concat_name[p_len] = '/'; strcpy (concat_name + p_len + 1, wrapper); } if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } } /* not found in PATH; assume curdir */ } /* Relative path | not found in path: prepend cwd */ if (getcwd (tmp, LT_PATHMAX) == NULL) lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", nonnull (strerror (errno))); tmp_len = strlen (tmp); concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, tmp, tmp_len); concat_name[tmp_len] = '/'; strcpy (concat_name + tmp_len + 1, wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); return NULL; } char * chase_symlinks (const char *pathspec) { #ifndef S_ISLNK return xstrdup (pathspec); #else char buf[LT_PATHMAX]; struct stat s; char *tmp_pathspec = xstrdup (pathspec); char *p; int has_symlinks = 0; while (strlen (tmp_pathspec) && !has_symlinks) { lt_debugprintf (__FILE__, __LINE__, "checking path component for symlinks: %s\n", tmp_pathspec); if (lstat (tmp_pathspec, &s) == 0) { if (S_ISLNK (s.st_mode) != 0) { has_symlinks = 1; break; } /* search backwards for last DIR_SEPARATOR */ p = tmp_pathspec + strlen (tmp_pathspec) - 1; while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) p--; if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) { /* no more DIR_SEPARATORS left */ break; } *p = '\0'; } else { lt_fatal (__FILE__, __LINE__, "error accessing file \"%s\": %s", tmp_pathspec, nonnull (strerror (errno))); } } XFREE (tmp_pathspec); if (!has_symlinks) { return xstrdup (pathspec); } tmp_pathspec = realpath (pathspec, buf); if (tmp_pathspec == 0) { lt_fatal (__FILE__, __LINE__, "could not follow symlinks for %s", pathspec); } return xstrdup (tmp_pathspec); #endif } char * strendzap (char *str, const char *pat) { size_t len, patlen; assert (str != NULL); assert (pat != NULL); len = strlen (str); patlen = strlen (pat); if (patlen <= len) { str += len - patlen; if (STREQ (str, pat)) *str = '\0'; } return str; } void lt_debugprintf (const char *file, int line, const char *fmt, ...) { va_list args; if (lt_debug) { (void) fprintf (stderr, "%s:%s:%d: ", program_name, file, line); va_start (args, fmt); (void) vfprintf (stderr, fmt, args); va_end (args); } } static void lt_error_core (int exit_status, const char *file, int line, const char *mode, const char *message, va_list ap) { fprintf (stderr, "%s:%s:%d: %s: ", program_name, file, line, mode); vfprintf (stderr, message, ap); fprintf (stderr, ".\n"); if (exit_status >= 0) exit (exit_status); } void lt_fatal (const char *file, int line, const char *message, ...) { va_list ap; va_start (ap, message); lt_error_core (EXIT_FAILURE, file, line, "FATAL", message, ap); va_end (ap); } static const char * nonnull (const char *s) { return s ? s : "(null)"; } static const char * nonempty (const char *s) { return (s && !*s) ? "(empty)" : nonnull (s); } void lt_setenv (const char *name, const char *value) { lt_debugprintf (__FILE__, __LINE__, "(lt_setenv) setting '%s' to '%s'\n", nonnull (name), nonnull (value)); { #ifdef HAVE_SETENV /* always make a copy, for consistency with !HAVE_SETENV */ char *str = xstrdup (value); setenv (name, str, 1); #else size_t len = strlen (name) + 1 + strlen (value) + 1; char *str = XMALLOC (char, len); sprintf (str, "%s=%s", name, value); if (putenv (str) != EXIT_SUCCESS) { XFREE (str); } #endif } } char * lt_extend_str (const char *orig_value, const char *add, int to_end) { char *new_value; if (orig_value && *orig_value) { size_t orig_value_len = strlen (orig_value); size_t add_len = strlen (add); new_value = XMALLOC (char, add_len + orig_value_len + 1); if (to_end) { strcpy (new_value, orig_value); strcpy (new_value + orig_value_len, add); } else { strcpy (new_value, add); strcpy (new_value + add_len, orig_value); } } else { new_value = xstrdup (add); } return new_value; } void lt_update_exe_path (const char *name, const char *value) { lt_debugprintf (__FILE__, __LINE__, "(lt_update_exe_path) modifying '%s' by prepending '%s'\n", nonnull (name), nonnull (value)); if (name && *name && value && *value) { char *new_value = lt_extend_str (getenv (name), value, 0); /* some systems can't cope with a ':'-terminated path #' */ size_t len = strlen (new_value); while ((len > 0) && IS_PATH_SEPARATOR (new_value[len-1])) { new_value[--len] = '\0'; } lt_setenv (name, new_value); XFREE (new_value); } } void lt_update_lib_path (const char *name, const char *value) { lt_debugprintf (__FILE__, __LINE__, "(lt_update_lib_path) modifying '%s' by prepending '%s'\n", nonnull (name), nonnull (value)); if (name && *name && value && *value) { char *new_value = lt_extend_str (getenv (name), value, 0); lt_setenv (name, new_value); XFREE (new_value); } } EOF case $host_os in mingw*) cat <<"EOF" /* Prepares an argument vector before calling spawn(). Note that spawn() does not by itself call the command interpreter (getenv ("COMSPEC") != NULL ? getenv ("COMSPEC") : ({ OSVERSIONINFO v; v.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); GetVersionEx(&v); v.dwPlatformId == VER_PLATFORM_WIN32_NT; }) ? "cmd.exe" : "command.com"). Instead it simply concatenates the arguments, separated by ' ', and calls CreateProcess(). We must quote the arguments since Win32 CreateProcess() interprets characters like ' ', '\t', '\\', '"' (but not '<' and '>') in a special way: - Space and tab are interpreted as delimiters. They are not treated as delimiters if they are surrounded by double quotes: "...". - Unescaped double quotes are removed from the input. Their only effect is that within double quotes, space and tab are treated like normal characters. - Backslashes not followed by double quotes are not special. - But 2*n+1 backslashes followed by a double quote become n backslashes followed by a double quote (n >= 0): \" -> " \\\" -> \" \\\\\" -> \\" */ #define SHELL_SPECIAL_CHARS "\"\\ \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" #define SHELL_SPACE_CHARS " \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" char ** prepare_spawn (char **argv) { size_t argc; char **new_argv; size_t i; /* Count number of arguments. */ for (argc = 0; argv[argc] != NULL; argc++) ; /* Allocate new argument vector. */ new_argv = XMALLOC (char *, argc + 1); /* Put quoted arguments into the new argument vector. */ for (i = 0; i < argc; i++) { const char *string = argv[i]; if (string[0] == '\0') new_argv[i] = xstrdup ("\"\""); else if (strpbrk (string, SHELL_SPECIAL_CHARS) != NULL) { int quote_around = (strpbrk (string, SHELL_SPACE_CHARS) != NULL); size_t length; unsigned int backslashes; const char *s; char *quoted_string; char *p; length = 0; backslashes = 0; if (quote_around) length++; for (s = string; *s != '\0'; s++) { char c = *s; if (c == '"') length += backslashes + 1; length++; if (c == '\\') backslashes++; else backslashes = 0; } if (quote_around) length += backslashes + 1; quoted_string = XMALLOC (char, length + 1); p = quoted_string; backslashes = 0; if (quote_around) *p++ = '"'; for (s = string; *s != '\0'; s++) { char c = *s; if (c == '"') { unsigned int j; for (j = backslashes + 1; j > 0; j--) *p++ = '\\'; } *p++ = c; if (c == '\\') backslashes++; else backslashes = 0; } if (quote_around) { unsigned int j; for (j = backslashes; j > 0; j--) *p++ = '\\'; *p++ = '"'; } *p = '\0'; new_argv[i] = quoted_string; } else new_argv[i] = (char *) string; } new_argv[argc] = NULL; return new_argv; } EOF ;; esac cat <<"EOF" void lt_dump_script (FILE* f) { EOF func_emit_wrapper yes | $SED -n -e ' s/^\(.\{79\}\)\(..*\)/\1\ \2/ h s/\([\\"]\)/\\\1/g s/$/\\n/ s/\([^\n]*\).*/ fputs ("\1", f);/p g D' cat <<"EOF" } EOF } # end: func_emit_cwrapperexe_src # func_win32_import_lib_p ARG # True if ARG is an import lib, as indicated by $file_magic_cmd func_win32_import_lib_p () { $debug_cmd case `eval $file_magic_cmd \"\$1\" 2>/dev/null | $SED -e 10q` in *import*) : ;; *) false ;; esac } # func_suncc_cstd_abi # !!ONLY CALL THIS FOR SUN CC AFTER $compile_command IS FULLY EXPANDED!! # Several compiler flags select an ABI that is incompatible with the # Cstd library. Avoid specifying it if any are in CXXFLAGS. func_suncc_cstd_abi () { $debug_cmd case " $compile_command " in *" -compat=g "*|*\ -std=c++[0-9][0-9]\ *|*" -library=stdcxx4 "*|*" -library=stlport4 "*) suncc_use_cstd_abi=no ;; *) suncc_use_cstd_abi=yes ;; esac } # func_mode_link arg... func_mode_link () { $debug_cmd case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) # It is impossible to link a dll without this setting, and # we shouldn't force the makefile maintainer to figure out # what system we are compiling for in order to pass an extra # flag for every libtool invocation. # allow_undefined=no # FIXME: Unfortunately, there are problems with the above when trying # to make a dll that has undefined symbols, in which case not # even a static library is built. For now, we need to specify # -no-undefined on the libtool link line when we can be certain # that all symbols are satisfied, otherwise we get a static library. allow_undefined=yes ;; *) allow_undefined=yes ;; esac libtool_args=$nonopt base_compile="$nonopt $@" compile_command=$nonopt finalize_command=$nonopt compile_rpath= finalize_rpath= compile_shlibpath= finalize_shlibpath= convenience= old_convenience= deplibs= old_deplibs= compiler_flags= linker_flags= dllsearchpath= lib_search_path=`pwd` inst_prefix_dir= new_inherited_linker_flags= avoid_version=no bindir= dlfiles= dlprefiles= dlself=no export_dynamic=no export_symbols= export_symbols_regex= generated= libobjs= ltlibs= module=no no_install=no objs= os2dllname= non_pic_objects= precious_files_regex= prefer_static_libs=no preload=false prev= prevarg= release= rpath= xrpath= perm_rpath= temp_rpath= thread_safe=no vinfo= vinfo_number=no weak_libs= single_module=$wl-single_module func_infer_tag $base_compile # We need to know -static, to get the right output filenames. for arg do case $arg in -shared) test yes != "$build_libtool_libs" \ && func_fatal_configuration "cannot build a shared library" build_old_libs=no break ;; -all-static | -static | -static-libtool-libs) case $arg in -all-static) if test yes = "$build_libtool_libs" && test -z "$link_static_flag"; then func_warning "complete static linking is impossible in this configuration" fi if test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=yes ;; -static) if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=built ;; -static-libtool-libs) if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=yes ;; esac build_libtool_libs=no build_old_libs=yes break ;; esac done # See if our shared archives depend on static archives. test -n "$old_archive_from_new_cmds" && build_old_libs=yes # Go through the arguments, transforming them on the way. while test "$#" -gt 0; do arg=$1 shift func_quote_for_eval "$arg" qarg=$func_quote_for_eval_unquoted_result func_append libtool_args " $func_quote_for_eval_result" # If the previous option needs an argument, assign it. if test -n "$prev"; then case $prev in output) func_append compile_command " @OUTPUT@" func_append finalize_command " @OUTPUT@" ;; esac case $prev in bindir) bindir=$arg prev= continue ;; dlfiles|dlprefiles) $preload || { # Add the symbol object into the linking commands. func_append compile_command " @SYMFILE@" func_append finalize_command " @SYMFILE@" preload=: } case $arg in *.la | *.lo) ;; # We handle these cases below. force) if test no = "$dlself"; then dlself=needless export_dynamic=yes fi prev= continue ;; self) if test dlprefiles = "$prev"; then dlself=yes elif test dlfiles = "$prev" && test yes != "$dlopen_self"; then dlself=yes else dlself=needless export_dynamic=yes fi prev= continue ;; *) if test dlfiles = "$prev"; then func_append dlfiles " $arg" else func_append dlprefiles " $arg" fi prev= continue ;; esac ;; expsyms) export_symbols=$arg test -f "$arg" \ || func_fatal_error "symbol file '$arg' does not exist" prev= continue ;; expsyms_regex) export_symbols_regex=$arg prev= continue ;; framework) case $host in *-*-darwin*) case "$deplibs " in *" $qarg.ltframework "*) ;; *) func_append deplibs " $qarg.ltframework" # this is fixed later ;; esac ;; esac prev= continue ;; inst_prefix) inst_prefix_dir=$arg prev= continue ;; mllvm) # Clang does not use LLVM to link, so we can simply discard any # '-mllvm $arg' options when doing the link step. prev= continue ;; objectlist) if test -f "$arg"; then save_arg=$arg moreargs= for fil in `cat "$save_arg"` do # func_append moreargs " $fil" arg=$fil # A libtool-controlled object. # Check to see that this really is a libtool object. if func_lalib_unsafe_p "$arg"; then pic_object= non_pic_object= # Read the .lo file func_source "$arg" if test -z "$pic_object" || test -z "$non_pic_object" || test none = "$pic_object" && test none = "$non_pic_object"; then func_fatal_error "cannot find name of object for '$arg'" fi # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir=$func_dirname_result if test none != "$pic_object"; then # Prepend the subdirectory the object is found in. pic_object=$xdir$pic_object if test dlfiles = "$prev"; then if test yes = "$build_libtool_libs" && test yes = "$dlopen_support"; then func_append dlfiles " $pic_object" prev= continue else # If libtool objects are unsupported, then we need to preload. prev=dlprefiles fi fi # CHECK ME: I think I busted this. -Ossama if test dlprefiles = "$prev"; then # Preload the old-style object. func_append dlprefiles " $pic_object" prev= fi # A PIC object. func_append libobjs " $pic_object" arg=$pic_object fi # Non-PIC object. if test none != "$non_pic_object"; then # Prepend the subdirectory the object is found in. non_pic_object=$xdir$non_pic_object # A standard non-PIC object func_append non_pic_objects " $non_pic_object" if test -z "$pic_object" || test none = "$pic_object"; then arg=$non_pic_object fi else # If the PIC object exists, use it instead. # $xdir was prepended to $pic_object above. non_pic_object=$pic_object func_append non_pic_objects " $non_pic_object" fi else # Only an error if not doing a dry-run. if $opt_dry_run; then # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir=$func_dirname_result func_lo2o "$arg" pic_object=$xdir$objdir/$func_lo2o_result non_pic_object=$xdir$func_lo2o_result func_append libobjs " $pic_object" func_append non_pic_objects " $non_pic_object" else func_fatal_error "'$arg' is not a valid libtool object" fi fi done else func_fatal_error "link input file '$arg' does not exist" fi arg=$save_arg prev= continue ;; os2dllname) os2dllname=$arg prev= continue ;; precious_regex) precious_files_regex=$arg prev= continue ;; release) release=-$arg prev= continue ;; rpath | xrpath) # We need an absolute path. case $arg in [\\/]* | [A-Za-z]:[\\/]*) ;; *) func_fatal_error "only absolute run-paths are allowed" ;; esac if test rpath = "$prev"; then case "$rpath " in *" $arg "*) ;; *) func_append rpath " $arg" ;; esac else case "$xrpath " in *" $arg "*) ;; *) func_append xrpath " $arg" ;; esac fi prev= continue ;; shrext) shrext_cmds=$arg prev= continue ;; weak) func_append weak_libs " $arg" prev= continue ;; xcclinker) func_append linker_flags " $qarg" func_append compiler_flags " $qarg" prev= func_append compile_command " $qarg" func_append finalize_command " $qarg" continue ;; xcompiler) func_append compiler_flags " $qarg" prev= func_append compile_command " $qarg" func_append finalize_command " $qarg" continue ;; xlinker) func_append linker_flags " $qarg" func_append compiler_flags " $wl$qarg" prev= func_append compile_command " $wl$qarg" func_append finalize_command " $wl$qarg" continue ;; *) eval "$prev=\"\$arg\"" prev= continue ;; esac fi # test -n "$prev" prevarg=$arg case $arg in -all-static) if test -n "$link_static_flag"; then # See comment for -static flag below, for more details. func_append compile_command " $link_static_flag" func_append finalize_command " $link_static_flag" fi continue ;; -allow-undefined) # FIXME: remove this flag sometime in the future. func_fatal_error "'-allow-undefined' must not be used because it is the default" ;; -avoid-version) avoid_version=yes continue ;; -bindir) prev=bindir continue ;; -dlopen) prev=dlfiles continue ;; -dlpreopen) prev=dlprefiles continue ;; -export-dynamic) export_dynamic=yes continue ;; -export-symbols | -export-symbols-regex) if test -n "$export_symbols" || test -n "$export_symbols_regex"; then func_fatal_error "more than one -exported-symbols argument is not allowed" fi if test X-export-symbols = "X$arg"; then prev=expsyms else prev=expsyms_regex fi continue ;; -framework) prev=framework continue ;; -inst-prefix-dir) prev=inst_prefix continue ;; # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* # so, if we see these flags be careful not to treat them like -L -L[A-Z][A-Z]*:*) case $with_gcc/$host in no/*-*-irix* | /*-*-irix*) func_append compile_command " $arg" func_append finalize_command " $arg" ;; esac continue ;; -L*) func_stripname "-L" '' "$arg" if test -z "$func_stripname_result"; then if test "$#" -gt 0; then func_fatal_error "require no space between '-L' and '$1'" else func_fatal_error "need path for '-L' option" fi fi func_resolve_sysroot "$func_stripname_result" dir=$func_resolve_sysroot_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) absdir=`cd "$dir" && pwd` test -z "$absdir" && \ func_fatal_error "cannot determine absolute directory name of '$dir'" dir=$absdir ;; esac case "$deplibs " in *" -L$dir "* | *" $arg "*) # Will only happen for absolute or sysroot arguments ;; *) # Preserve sysroot, but never include relative directories case $dir in [\\/]* | [A-Za-z]:[\\/]* | =*) func_append deplibs " $arg" ;; *) func_append deplibs " -L$dir" ;; esac func_append lib_search_path " $dir" ;; esac case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) testbindir=`$ECHO "$dir" | $SED 's*/lib$*/bin*'` case :$dllsearchpath: in *":$dir:"*) ;; ::) dllsearchpath=$dir;; *) func_append dllsearchpath ":$dir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; ::) dllsearchpath=$testbindir;; *) func_append dllsearchpath ":$testbindir";; esac ;; esac continue ;; -l*) if test X-lc = "X$arg" || test X-lm = "X$arg"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*) # These systems don't actually have a C or math library (as such) continue ;; *-*-os2*) # These systems don't actually have a C library (as such) test X-lc = "X$arg" && continue ;; *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*) # Do not include libc due to us having libc/libc_r. test X-lc = "X$arg" && continue ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C and math libraries are in the System framework func_append deplibs " System.ltframework" continue ;; *-*-sco3.2v5* | *-*-sco5v6*) # Causes problems with __ctype test X-lc = "X$arg" && continue ;; *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) # Compiler inserts libc in the correct place for threads to work test X-lc = "X$arg" && continue ;; esac elif test X-lc_r = "X$arg"; then case $host in *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*) # Do not include libc_r directly, use -pthread flag. continue ;; esac fi func_append deplibs " $arg" continue ;; -mllvm) prev=mllvm continue ;; -module) module=yes continue ;; # Tru64 UNIX uses -model [arg] to determine the layout of C++ # classes, name mangling, and exception handling. # Darwin uses the -arch flag to determine output architecture. -model|-arch|-isysroot|--sysroot) func_append compiler_flags " $arg" func_append compile_command " $arg" func_append finalize_command " $arg" prev=xcompiler continue ;; -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) func_append compiler_flags " $arg" func_append compile_command " $arg" func_append finalize_command " $arg" case "$new_inherited_linker_flags " in *" $arg "*) ;; * ) func_append new_inherited_linker_flags " $arg" ;; esac continue ;; -multi_module) single_module=$wl-multi_module continue ;; -no-fast-install) fast_install=no continue ;; -no-install) case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*) # The PATH hackery in wrapper scripts is required on Windows # and Darwin in order for the loader to find any dlls it needs. func_warning "'-no-install' is ignored for $host" func_warning "assuming '-no-fast-install' instead" fast_install=no ;; *) no_install=yes ;; esac continue ;; -no-undefined) allow_undefined=no continue ;; -objectlist) prev=objectlist continue ;; -os2dllname) prev=os2dllname continue ;; -o) prev=output ;; -precious-files-regex) prev=precious_regex continue ;; -release) prev=release continue ;; -rpath) prev=rpath continue ;; -R) prev=xrpath continue ;; -R*) func_stripname '-R' '' "$arg" dir=$func_stripname_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; =*) func_stripname '=' '' "$dir" dir=$lt_sysroot$func_stripname_result ;; *) func_fatal_error "only absolute run-paths are allowed" ;; esac case "$xrpath " in *" $dir "*) ;; *) func_append xrpath " $dir" ;; esac continue ;; -shared) # The effects of -shared are defined in a previous loop. continue ;; -shrext) prev=shrext continue ;; -static | -static-libtool-libs) # The effects of -static are defined in a previous loop. # We used to do the same as -all-static on platforms that # didn't have a PIC flag, but the assumption that the effects # would be equivalent was wrong. It would break on at least # Digital Unix and AIX. continue ;; -thread-safe) thread_safe=yes continue ;; -version-info) prev=vinfo continue ;; -version-number) prev=vinfo vinfo_number=yes continue ;; -weak) prev=weak continue ;; -Wc,*) func_stripname '-Wc,' '' "$arg" args=$func_stripname_result arg= save_ifs=$IFS; IFS=, for flag in $args; do IFS=$save_ifs func_quote_for_eval "$flag" func_append arg " $func_quote_for_eval_result" func_append compiler_flags " $func_quote_for_eval_result" done IFS=$save_ifs func_stripname ' ' '' "$arg" arg=$func_stripname_result ;; -Wl,*) func_stripname '-Wl,' '' "$arg" args=$func_stripname_result arg= save_ifs=$IFS; IFS=, for flag in $args; do IFS=$save_ifs func_quote_for_eval "$flag" func_append arg " $wl$func_quote_for_eval_result" func_append compiler_flags " $wl$func_quote_for_eval_result" func_append linker_flags " $func_quote_for_eval_result" done IFS=$save_ifs func_stripname ' ' '' "$arg" arg=$func_stripname_result ;; -Xcompiler) prev=xcompiler continue ;; -Xlinker) prev=xlinker continue ;; -XCClinker) prev=xcclinker continue ;; # -msg_* for osf cc -msg_*) func_quote_for_eval "$arg" arg=$func_quote_for_eval_result ;; # Flags to be passed through unchanged, with rationale: # -64, -mips[0-9] enable 64-bit mode for the SGI compiler # -r[0-9][0-9]* specify processor for the SGI compiler # -xarch=*, -xtarget=* enable 64-bit mode for the Sun compiler # +DA*, +DD* enable 64-bit mode for the HP compiler # -q* compiler args for the IBM compiler # -m*, -t[45]*, -txscale* architecture-specific flags for GCC # -F/path path to uninstalled frameworks, gcc on darwin # -p, -pg, --coverage, -fprofile-* profiling flags for GCC # -fstack-protector* stack protector flags for GCC # @file GCC response files # -tp=* Portland pgcc target processor selection # --sysroot=* for sysroot support # -O*, -g*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization # -specs=* GCC specs files # -stdlib=* select c++ std lib with clang # -fsanitize=* Clang/GCC memory and address sanitizer -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \ -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \ -specs=*|-fsanitize=*) func_quote_for_eval "$arg" arg=$func_quote_for_eval_result func_append compile_command " $arg" func_append finalize_command " $arg" func_append compiler_flags " $arg" continue ;; -Z*) if test os2 = "`expr $host : '.*\(os2\)'`"; then # OS/2 uses -Zxxx to specify OS/2-specific options compiler_flags="$compiler_flags $arg" func_append compile_command " $arg" func_append finalize_command " $arg" case $arg in -Zlinker | -Zstack) prev=xcompiler ;; esac continue else # Otherwise treat like 'Some other compiler flag' below func_quote_for_eval "$arg" arg=$func_quote_for_eval_result fi ;; # Some other compiler flag. -* | +*) func_quote_for_eval "$arg" arg=$func_quote_for_eval_result ;; *.$objext) # A standard object. func_append objs " $arg" ;; *.lo) # A libtool-controlled object. # Check to see that this really is a libtool object. if func_lalib_unsafe_p "$arg"; then pic_object= non_pic_object= # Read the .lo file func_source "$arg" if test -z "$pic_object" || test -z "$non_pic_object" || test none = "$pic_object" && test none = "$non_pic_object"; then func_fatal_error "cannot find name of object for '$arg'" fi # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir=$func_dirname_result test none = "$pic_object" || { # Prepend the subdirectory the object is found in. pic_object=$xdir$pic_object if test dlfiles = "$prev"; then if test yes = "$build_libtool_libs" && test yes = "$dlopen_support"; then func_append dlfiles " $pic_object" prev= continue else # If libtool objects are unsupported, then we need to preload. prev=dlprefiles fi fi # CHECK ME: I think I busted this. -Ossama if test dlprefiles = "$prev"; then # Preload the old-style object. func_append dlprefiles " $pic_object" prev= fi # A PIC object. func_append libobjs " $pic_object" arg=$pic_object } # Non-PIC object. if test none != "$non_pic_object"; then # Prepend the subdirectory the object is found in. non_pic_object=$xdir$non_pic_object # A standard non-PIC object func_append non_pic_objects " $non_pic_object" if test -z "$pic_object" || test none = "$pic_object"; then arg=$non_pic_object fi else # If the PIC object exists, use it instead. # $xdir was prepended to $pic_object above. non_pic_object=$pic_object func_append non_pic_objects " $non_pic_object" fi else # Only an error if not doing a dry-run. if $opt_dry_run; then # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir=$func_dirname_result func_lo2o "$arg" pic_object=$xdir$objdir/$func_lo2o_result non_pic_object=$xdir$func_lo2o_result func_append libobjs " $pic_object" func_append non_pic_objects " $non_pic_object" else func_fatal_error "'$arg' is not a valid libtool object" fi fi ;; *.$libext) # An archive. func_append deplibs " $arg" func_append old_deplibs " $arg" continue ;; *.la) # A libtool-controlled library. func_resolve_sysroot "$arg" if test dlfiles = "$prev"; then # This library was specified with -dlopen. func_append dlfiles " $func_resolve_sysroot_result" prev= elif test dlprefiles = "$prev"; then # The library was specified with -dlpreopen. func_append dlprefiles " $func_resolve_sysroot_result" prev= else func_append deplibs " $func_resolve_sysroot_result" fi continue ;; # Some other compiler argument. *) # Unknown arguments in both finalize_command and compile_command need # to be aesthetically quoted because they are evaled later. func_quote_for_eval "$arg" arg=$func_quote_for_eval_result ;; esac # arg # Now actually substitute the argument into the commands. if test -n "$arg"; then func_append compile_command " $arg" func_append finalize_command " $arg" fi done # argument parsing loop test -n "$prev" && \ func_fatal_help "the '$prevarg' option requires an argument" if test yes = "$export_dynamic" && test -n "$export_dynamic_flag_spec"; then eval arg=\"$export_dynamic_flag_spec\" func_append compile_command " $arg" func_append finalize_command " $arg" fi oldlibs= # calculate the name of the file, without its directory func_basename "$output" outputname=$func_basename_result libobjs_save=$libobjs if test -n "$shlibpath_var"; then # get the directories listed in $shlibpath_var eval shlib_search_path=\`\$ECHO \"\$$shlibpath_var\" \| \$SED \'s/:/ /g\'\` else shlib_search_path= fi eval sys_lib_search_path=\"$sys_lib_search_path_spec\" eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" # Definition is injected by LT_CONFIG during libtool generation. func_munge_path_list sys_lib_dlsearch_path "$LT_SYS_LIBRARY_PATH" func_dirname "$output" "/" "" output_objdir=$func_dirname_result$objdir func_to_tool_file "$output_objdir/" tool_output_objdir=$func_to_tool_file_result # Create the object directory. func_mkdir_p "$output_objdir" # Determine the type of output case $output in "") func_fatal_help "you must specify an output file" ;; *.$libext) linkmode=oldlib ;; *.lo | *.$objext) linkmode=obj ;; *.la) linkmode=lib ;; *) linkmode=prog ;; # Anything else should be a program. esac specialdeplibs= libs= # Find all interdependent deplibs by searching for libraries # that are linked more than once (e.g. -la -lb -la) for deplib in $deplibs; do if $opt_preserve_dup_deps; then case "$libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi func_append libs " $deplib" done if test lib = "$linkmode"; then libs="$predeps $libs $compiler_lib_search_path $postdeps" # Compute libraries that are listed more than once in $predeps # $postdeps and mark them as special (i.e., whose duplicates are # not to be eliminated). pre_post_deps= if $opt_duplicate_compiler_generated_deps; then for pre_post_dep in $predeps $postdeps; do case "$pre_post_deps " in *" $pre_post_dep "*) func_append specialdeplibs " $pre_post_deps" ;; esac func_append pre_post_deps " $pre_post_dep" done fi pre_post_deps= fi deplibs= newdependency_libs= newlib_search_path= need_relink=no # whether we're linking any uninstalled libtool libraries notinst_deplibs= # not-installed libtool libraries notinst_path= # paths that contain not-installed libtool libraries case $linkmode in lib) passes="conv dlpreopen link" for file in $dlfiles $dlprefiles; do case $file in *.la) ;; *) func_fatal_help "libraries can '-dlopen' only libtool libraries: $file" ;; esac done ;; prog) compile_deplibs= finalize_deplibs= alldeplibs=false newdlfiles= newdlprefiles= passes="conv scan dlopen dlpreopen link" ;; *) passes="conv" ;; esac for pass in $passes; do # The preopen pass in lib mode reverses $deplibs; put it back here # so that -L comes before libs that need it for instance... if test lib,link = "$linkmode,$pass"; then ## FIXME: Find the place where the list is rebuilt in the wrong ## order, and fix it there properly tmp_deplibs= for deplib in $deplibs; do tmp_deplibs="$deplib $tmp_deplibs" done deplibs=$tmp_deplibs fi if test lib,link = "$linkmode,$pass" || test prog,scan = "$linkmode,$pass"; then libs=$deplibs deplibs= fi if test prog = "$linkmode"; then case $pass in dlopen) libs=$dlfiles ;; dlpreopen) libs=$dlprefiles ;; link) libs="$deplibs %DEPLIBS%" test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs" ;; esac fi if test lib,dlpreopen = "$linkmode,$pass"; then # Collect and forward deplibs of preopened libtool libs for lib in $dlprefiles; do # Ignore non-libtool-libs dependency_libs= func_resolve_sysroot "$lib" case $lib in *.la) func_source "$func_resolve_sysroot_result" ;; esac # Collect preopened libtool deplibs, except any this library # has declared as weak libs for deplib in $dependency_libs; do func_basename "$deplib" deplib_base=$func_basename_result case " $weak_libs " in *" $deplib_base "*) ;; *) func_append deplibs " $deplib" ;; esac done done libs=$dlprefiles fi if test dlopen = "$pass"; then # Collect dlpreopened libraries save_deplibs=$deplibs deplibs= fi for deplib in $libs; do lib= found=false case $deplib in -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) if test prog,link = "$linkmode,$pass"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else func_append compiler_flags " $deplib" if test lib = "$linkmode"; then case "$new_inherited_linker_flags " in *" $deplib "*) ;; * ) func_append new_inherited_linker_flags " $deplib" ;; esac fi fi continue ;; -l*) if test lib != "$linkmode" && test prog != "$linkmode"; then func_warning "'-l' is ignored for archives/objects" continue fi func_stripname '-l' '' "$deplib" name=$func_stripname_result if test lib = "$linkmode"; then searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path" else searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path" fi for searchdir in $searchdirs; do for search_ext in .la $std_shrext .so .a; do # Search the libtool library lib=$searchdir/lib$name$search_ext if test -f "$lib"; then if test .la = "$search_ext"; then found=: else found=false fi break 2 fi done done if $found; then # deplib is a libtool library # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, # We need to do some special things here, and not later. if test yes = "$allow_libtool_libs_with_static_runtimes"; then case " $predeps $postdeps " in *" $deplib "*) if func_lalib_p "$lib"; then library_names= old_library= func_source "$lib" for l in $old_library $library_names; do ll=$l done if test "X$ll" = "X$old_library"; then # only static version available found=false func_dirname "$lib" "" "." ladir=$func_dirname_result lib=$ladir/$old_library if test prog,link = "$linkmode,$pass"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test lib = "$linkmode" && newdependency_libs="$deplib $newdependency_libs" fi continue fi fi ;; *) ;; esac fi else # deplib doesn't seem to be a libtool library if test prog,link = "$linkmode,$pass"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test lib = "$linkmode" && newdependency_libs="$deplib $newdependency_libs" fi continue fi ;; # -l *.ltframework) if test prog,link = "$linkmode,$pass"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" if test lib = "$linkmode"; then case "$new_inherited_linker_flags " in *" $deplib "*) ;; * ) func_append new_inherited_linker_flags " $deplib" ;; esac fi fi continue ;; -L*) case $linkmode in lib) deplibs="$deplib $deplibs" test conv = "$pass" && continue newdependency_libs="$deplib $newdependency_libs" func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result" func_append newlib_search_path " $func_resolve_sysroot_result" ;; prog) if test conv = "$pass"; then deplibs="$deplib $deplibs" continue fi if test scan = "$pass"; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result" func_append newlib_search_path " $func_resolve_sysroot_result" ;; *) func_warning "'-L' is ignored for archives/objects" ;; esac # linkmode continue ;; # -L -R*) if test link = "$pass"; then func_stripname '-R' '' "$deplib" func_resolve_sysroot "$func_stripname_result" dir=$func_resolve_sysroot_result # Make sure the xrpath contains only unique directories. case "$xrpath " in *" $dir "*) ;; *) func_append xrpath " $dir" ;; esac fi deplibs="$deplib $deplibs" continue ;; *.la) func_resolve_sysroot "$deplib" lib=$func_resolve_sysroot_result ;; *.$libext) if test conv = "$pass"; then deplibs="$deplib $deplibs" continue fi case $linkmode in lib) # Linking convenience modules into shared libraries is allowed, # but linking other static libraries is non-portable. case " $dlpreconveniencelibs " in *" $deplib "*) ;; *) valid_a_lib=false case $deplibs_check_method in match_pattern*) set dummy $deplibs_check_method; shift match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` if eval "\$ECHO \"$deplib\"" 2>/dev/null | $SED 10q \ | $EGREP "$match_pattern_regex" > /dev/null; then valid_a_lib=: fi ;; pass_all) valid_a_lib=: ;; esac if $valid_a_lib; then echo $ECHO "*** Warning: Linking the shared library $output against the" $ECHO "*** static library $deplib is not portable!" deplibs="$deplib $deplibs" else echo $ECHO "*** Warning: Trying to link with static lib archive $deplib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have" echo "*** because the file extensions .$libext of this argument makes me believe" echo "*** that it is just a static archive that I should not use here." fi ;; esac continue ;; prog) if test link != "$pass"; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi continue ;; esac # linkmode ;; # *.$libext *.lo | *.$objext) if test conv = "$pass"; then deplibs="$deplib $deplibs" elif test prog = "$linkmode"; then if test dlpreopen = "$pass" || test yes != "$dlopen_support" || test no = "$build_libtool_libs"; then # If there is no dlopen support or we're linking statically, # we need to preload. func_append newdlprefiles " $deplib" compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else func_append newdlfiles " $deplib" fi fi continue ;; %DEPLIBS%) alldeplibs=: continue ;; esac # case $deplib $found || test -f "$lib" \ || func_fatal_error "cannot find the library '$lib' or unhandled argument '$deplib'" # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$lib" \ || func_fatal_error "'$lib' is not a valid libtool archive" func_dirname "$lib" "" "." ladir=$func_dirname_result dlname= dlopen= dlpreopen= libdir= library_names= old_library= inherited_linker_flags= # If the library was installed with an old release of libtool, # it will not redefine variables installed, or shouldnotlink installed=yes shouldnotlink=no avoidtemprpath= # Read the .la file func_source "$lib" # Convert "-framework foo" to "foo.ltframework" if test -n "$inherited_linker_flags"; then tmp_inherited_linker_flags=`$ECHO "$inherited_linker_flags" | $SED 's/-framework \([^ $]*\)/\1.ltframework/g'` for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do case " $new_inherited_linker_flags " in *" $tmp_inherited_linker_flag "*) ;; *) func_append new_inherited_linker_flags " $tmp_inherited_linker_flag";; esac done fi dependency_libs=`$ECHO " $dependency_libs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` if test lib,link = "$linkmode,$pass" || test prog,scan = "$linkmode,$pass" || { test prog != "$linkmode" && test lib != "$linkmode"; }; then test -n "$dlopen" && func_append dlfiles " $dlopen" test -n "$dlpreopen" && func_append dlprefiles " $dlpreopen" fi if test conv = "$pass"; then # Only check for convenience libraries deplibs="$lib $deplibs" if test -z "$libdir"; then if test -z "$old_library"; then func_fatal_error "cannot find name of link library for '$lib'" fi # It is a libtool convenience library, so add in its objects. func_append convenience " $ladir/$objdir/$old_library" func_append old_convenience " $ladir/$objdir/$old_library" tmp_libs= for deplib in $dependency_libs; do deplibs="$deplib $deplibs" if $opt_preserve_dup_deps; then case "$tmp_libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi func_append tmp_libs " $deplib" done elif test prog != "$linkmode" && test lib != "$linkmode"; then func_fatal_error "'$lib' is not a convenience library" fi continue fi # $pass = conv # Get the name of the library we link against. linklib= if test -n "$old_library" && { test yes = "$prefer_static_libs" || test built,no = "$prefer_static_libs,$installed"; }; then linklib=$old_library else for l in $old_library $library_names; do linklib=$l done fi if test -z "$linklib"; then func_fatal_error "cannot find name of link library for '$lib'" fi # This library was specified with -dlopen. if test dlopen = "$pass"; then test -z "$libdir" \ && func_fatal_error "cannot -dlopen a convenience library: '$lib'" if test -z "$dlname" || test yes != "$dlopen_support" || test no = "$build_libtool_libs" then # If there is no dlname, no dlopen support or we're linking # statically, we need to preload. We also need to preload any # dependent libraries so libltdl's deplib preloader doesn't # bomb out in the load deplibs phase. func_append dlprefiles " $lib $dependency_libs" else func_append newdlfiles " $lib" fi continue fi # $pass = dlopen # We need an absolute path. case $ladir in [\\/]* | [A-Za-z]:[\\/]*) abs_ladir=$ladir ;; *) abs_ladir=`cd "$ladir" && pwd` if test -z "$abs_ladir"; then func_warning "cannot determine absolute directory name of '$ladir'" func_warning "passing it literally to the linker, although it might fail" abs_ladir=$ladir fi ;; esac func_basename "$lib" laname=$func_basename_result # Find the relevant object directory and library name. if test yes = "$installed"; then if test ! -f "$lt_sysroot$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then func_warning "library '$lib' was moved." dir=$ladir absdir=$abs_ladir libdir=$abs_ladir else dir=$lt_sysroot$libdir absdir=$lt_sysroot$libdir fi test yes = "$hardcode_automatic" && avoidtemprpath=yes else if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then dir=$ladir absdir=$abs_ladir # Remove this search path later func_append notinst_path " $abs_ladir" else dir=$ladir/$objdir absdir=$abs_ladir/$objdir # Remove this search path later func_append notinst_path " $abs_ladir" fi fi # $installed = yes func_stripname 'lib' '.la' "$laname" name=$func_stripname_result # This library was specified with -dlpreopen. if test dlpreopen = "$pass"; then if test -z "$libdir" && test prog = "$linkmode"; then func_fatal_error "only libraries may -dlpreopen a convenience library: '$lib'" fi case $host in # special handling for platforms with PE-DLLs. *cygwin* | *mingw* | *cegcc* ) # Linker will automatically link against shared library if both # static and shared are present. Therefore, ensure we extract # symbols from the import library if a shared library is present # (otherwise, the dlopen module name will be incorrect). We do # this by putting the import library name into $newdlprefiles. # We recover the dlopen module name by 'saving' the la file # name in a special purpose variable, and (later) extracting the # dlname from the la file. if test -n "$dlname"; then func_tr_sh "$dir/$linklib" eval "libfile_$func_tr_sh_result=\$abs_ladir/\$laname" func_append newdlprefiles " $dir/$linklib" else func_append newdlprefiles " $dir/$old_library" # Keep a list of preopened convenience libraries to check # that they are being used correctly in the link pass. test -z "$libdir" && \ func_append dlpreconveniencelibs " $dir/$old_library" fi ;; * ) # Prefer using a static library (so that no silly _DYNAMIC symbols # are required to link). if test -n "$old_library"; then func_append newdlprefiles " $dir/$old_library" # Keep a list of preopened convenience libraries to check # that they are being used correctly in the link pass. test -z "$libdir" && \ func_append dlpreconveniencelibs " $dir/$old_library" # Otherwise, use the dlname, so that lt_dlopen finds it. elif test -n "$dlname"; then func_append newdlprefiles " $dir/$dlname" else func_append newdlprefiles " $dir/$linklib" fi ;; esac fi # $pass = dlpreopen if test -z "$libdir"; then # Link the convenience library if test lib = "$linkmode"; then deplibs="$dir/$old_library $deplibs" elif test prog,link = "$linkmode,$pass"; then compile_deplibs="$dir/$old_library $compile_deplibs" finalize_deplibs="$dir/$old_library $finalize_deplibs" else deplibs="$lib $deplibs" # used for prog,scan pass fi continue fi if test prog = "$linkmode" && test link != "$pass"; then func_append newlib_search_path " $ladir" deplibs="$lib $deplibs" linkalldeplibs=false if test no != "$link_all_deplibs" || test -z "$library_names" || test no = "$build_libtool_libs"; then linkalldeplibs=: fi tmp_libs= for deplib in $dependency_libs; do case $deplib in -L*) func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result" func_append newlib_search_path " $func_resolve_sysroot_result" ;; esac # Need to link against all dependency_libs? if $linkalldeplibs; then deplibs="$deplib $deplibs" else # Need to hardcode shared library paths # or/and link against static libraries newdependency_libs="$deplib $newdependency_libs" fi if $opt_preserve_dup_deps; then case "$tmp_libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi func_append tmp_libs " $deplib" done # for deplib continue fi # $linkmode = prog... if test prog,link = "$linkmode,$pass"; then if test -n "$library_names" && { { test no = "$prefer_static_libs" || test built,yes = "$prefer_static_libs,$installed"; } || test -z "$old_library"; }; then # We need to hardcode the library path if test -n "$shlibpath_var" && test -z "$avoidtemprpath"; then # Make sure the rpath contains only unique directories. case $temp_rpath: in *"$absdir:"*) ;; *) func_append temp_rpath "$absdir:" ;; esac fi # Hardcode the library path. # Skip directories that are in the system default run-time # search path. case " $sys_lib_dlsearch_path " in *" $absdir "*) ;; *) case "$compile_rpath " in *" $absdir "*) ;; *) func_append compile_rpath " $absdir" ;; esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac ;; esac fi # $linkmode,$pass = prog,link... if $alldeplibs && { test pass_all = "$deplibs_check_method" || { test yes = "$build_libtool_libs" && test -n "$library_names"; }; }; then # We only need to search for static libraries continue fi fi link_static=no # Whether the deplib will be linked statically use_static_libs=$prefer_static_libs if test built = "$use_static_libs" && test yes = "$installed"; then use_static_libs=no fi if test -n "$library_names" && { test no = "$use_static_libs" || test -z "$old_library"; }; then case $host in *cygwin* | *mingw* | *cegcc* | *os2*) # No point in relinking DLLs because paths are not encoded func_append notinst_deplibs " $lib" need_relink=no ;; *) if test no = "$installed"; then func_append notinst_deplibs " $lib" need_relink=yes fi ;; esac # This is a shared library # Warn about portability, can't link against -module's on some # systems (darwin). Don't bleat about dlopened modules though! dlopenmodule= for dlpremoduletest in $dlprefiles; do if test "X$dlpremoduletest" = "X$lib"; then dlopenmodule=$dlpremoduletest break fi done if test -z "$dlopenmodule" && test yes = "$shouldnotlink" && test link = "$pass"; then echo if test prog = "$linkmode"; then $ECHO "*** Warning: Linking the executable $output against the loadable module" else $ECHO "*** Warning: Linking the shared library $output against the loadable module" fi $ECHO "*** $linklib is not portable!" fi if test lib = "$linkmode" && test yes = "$hardcode_into_libs"; then # Hardcode the library path. # Skip directories that are in the system default run-time # search path. case " $sys_lib_dlsearch_path " in *" $absdir "*) ;; *) case "$compile_rpath " in *" $absdir "*) ;; *) func_append compile_rpath " $absdir" ;; esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac ;; esac fi if test -n "$old_archive_from_expsyms_cmds"; then # figure out the soname set dummy $library_names shift realname=$1 shift libname=`eval "\\$ECHO \"$libname_spec\""` # use dlname if we got it. it's perfectly good, no? if test -n "$dlname"; then soname=$dlname elif test -n "$soname_spec"; then # bleh windows case $host in *cygwin* | mingw* | *cegcc* | *os2*) func_arith $current - $age major=$func_arith_result versuffix=-$major ;; esac eval soname=\"$soname_spec\" else soname=$realname fi # Make a new name for the extract_expsyms_cmds to use soroot=$soname func_basename "$soroot" soname=$func_basename_result func_stripname 'lib' '.dll' "$soname" newlib=libimp-$func_stripname_result.a # If the library has no export list, then create one now if test -f "$output_objdir/$soname-def"; then : else func_verbose "extracting exported symbol list from '$soname'" func_execute_cmds "$extract_expsyms_cmds" 'exit $?' fi # Create $newlib if test -f "$output_objdir/$newlib"; then :; else func_verbose "generating import library for '$soname'" func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?' fi # make sure the library variables are pointing to the new library dir=$output_objdir linklib=$newlib fi # test -n "$old_archive_from_expsyms_cmds" if test prog = "$linkmode" || test relink != "$opt_mode"; then add_shlibpath= add_dir= add= lib_linked=yes case $hardcode_action in immediate | unsupported) if test no = "$hardcode_direct"; then add=$dir/$linklib case $host in *-*-sco3.2v5.0.[024]*) add_dir=-L$dir ;; *-*-sysv4*uw2*) add_dir=-L$dir ;; *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \ *-*-unixware7*) add_dir=-L$dir ;; *-*-darwin* ) # if the lib is a (non-dlopened) module then we cannot # link against it, someone is ignoring the earlier warnings if /usr/bin/file -L $add 2> /dev/null | $GREP ": [^:]* bundle" >/dev/null; then if test "X$dlopenmodule" != "X$lib"; then $ECHO "*** Warning: lib $linklib is a module, not a shared library" if test -z "$old_library"; then echo echo "*** And there doesn't seem to be a static archive available" echo "*** The link will probably fail, sorry" else add=$dir/$old_library fi elif test -n "$old_library"; then add=$dir/$old_library fi fi esac elif test no = "$hardcode_minus_L"; then case $host in *-*-sunos*) add_shlibpath=$dir ;; esac add_dir=-L$dir add=-l$name elif test no = "$hardcode_shlibpath_var"; then add_shlibpath=$dir add=-l$name else lib_linked=no fi ;; relink) if test yes = "$hardcode_direct" && test no = "$hardcode_direct_absolute"; then add=$dir/$linklib elif test yes = "$hardcode_minus_L"; then add_dir=-L$absdir # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in [\\/]*) func_append add_dir " -L$inst_prefix_dir$libdir" ;; esac fi add=-l$name elif test yes = "$hardcode_shlibpath_var"; then add_shlibpath=$dir add=-l$name else lib_linked=no fi ;; *) lib_linked=no ;; esac if test yes != "$lib_linked"; then func_fatal_configuration "unsupported hardcode properties" fi if test -n "$add_shlibpath"; then case :$compile_shlibpath: in *":$add_shlibpath:"*) ;; *) func_append compile_shlibpath "$add_shlibpath:" ;; esac fi if test prog = "$linkmode"; then test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" test -n "$add" && compile_deplibs="$add $compile_deplibs" else test -n "$add_dir" && deplibs="$add_dir $deplibs" test -n "$add" && deplibs="$add $deplibs" if test yes != "$hardcode_direct" && test yes != "$hardcode_minus_L" && test yes = "$hardcode_shlibpath_var"; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) func_append finalize_shlibpath "$libdir:" ;; esac fi fi fi if test prog = "$linkmode" || test relink = "$opt_mode"; then add_shlibpath= add_dir= add= # Finalize command for both is simple: just hardcode it. if test yes = "$hardcode_direct" && test no = "$hardcode_direct_absolute"; then add=$libdir/$linklib elif test yes = "$hardcode_minus_L"; then add_dir=-L$libdir add=-l$name elif test yes = "$hardcode_shlibpath_var"; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) func_append finalize_shlibpath "$libdir:" ;; esac add=-l$name elif test yes = "$hardcode_automatic"; then if test -n "$inst_prefix_dir" && test -f "$inst_prefix_dir$libdir/$linklib"; then add=$inst_prefix_dir$libdir/$linklib else add=$libdir/$linklib fi else # We cannot seem to hardcode it, guess we'll fake it. add_dir=-L$libdir # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in [\\/]*) func_append add_dir " -L$inst_prefix_dir$libdir" ;; esac fi add=-l$name fi if test prog = "$linkmode"; then test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" test -n "$add" && finalize_deplibs="$add $finalize_deplibs" else test -n "$add_dir" && deplibs="$add_dir $deplibs" test -n "$add" && deplibs="$add $deplibs" fi fi elif test prog = "$linkmode"; then # Here we assume that one of hardcode_direct or hardcode_minus_L # is not unsupported. This is valid on all known static and # shared platforms. if test unsupported != "$hardcode_direct"; then test -n "$old_library" && linklib=$old_library compile_deplibs="$dir/$linklib $compile_deplibs" finalize_deplibs="$dir/$linklib $finalize_deplibs" else compile_deplibs="-l$name -L$dir $compile_deplibs" finalize_deplibs="-l$name -L$dir $finalize_deplibs" fi elif test yes = "$build_libtool_libs"; then # Not a shared library if test pass_all != "$deplibs_check_method"; then # We're trying link a shared library against a static one # but the system doesn't support it. # Just print a warning and add the library to dependency_libs so # that the program can be linked against the static library. echo $ECHO "*** Warning: This system cannot link to static lib archive $lib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have." if test yes = "$module"; then echo "*** But as you try to build a module library, libtool will still create " echo "*** a static module, that should work as long as the dlopening application" echo "*** is linked with the -dlopen flag to resolve symbols at runtime." if test -z "$global_symbol_pipe"; then echo echo "*** However, this would only work if libtool was able to extract symbol" echo "*** lists from a program, using 'nm' or equivalent, but libtool could" echo "*** not find such a program. So, this module is probably useless." echo "*** 'nm' from GNU binutils and a full rebuild may help." fi if test no = "$build_old_libs"; then build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi fi else deplibs="$dir/$old_library $deplibs" link_static=yes fi fi # link shared/static library? if test lib = "$linkmode"; then if test -n "$dependency_libs" && { test yes != "$hardcode_into_libs" || test yes = "$build_old_libs" || test yes = "$link_static"; }; then # Extract -R from dependency_libs temp_deplibs= for libdir in $dependency_libs; do case $libdir in -R*) func_stripname '-R' '' "$libdir" temp_xrpath=$func_stripname_result case " $xrpath " in *" $temp_xrpath "*) ;; *) func_append xrpath " $temp_xrpath";; esac;; *) func_append temp_deplibs " $libdir";; esac done dependency_libs=$temp_deplibs fi func_append newlib_search_path " $absdir" # Link against this library test no = "$link_static" && newdependency_libs="$abs_ladir/$laname $newdependency_libs" # ... and its dependency_libs tmp_libs= for deplib in $dependency_libs; do newdependency_libs="$deplib $newdependency_libs" case $deplib in -L*) func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result";; *) func_resolve_sysroot "$deplib" ;; esac if $opt_preserve_dup_deps; then case "$tmp_libs " in *" $func_resolve_sysroot_result "*) func_append specialdeplibs " $func_resolve_sysroot_result" ;; esac fi func_append tmp_libs " $func_resolve_sysroot_result" done if test no != "$link_all_deplibs"; then # Add the search paths of all dependency libraries for deplib in $dependency_libs; do path= case $deplib in -L*) path=$deplib ;; *.la) func_resolve_sysroot "$deplib" deplib=$func_resolve_sysroot_result func_dirname "$deplib" "" "." dir=$func_dirname_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) absdir=$dir ;; *) absdir=`cd "$dir" && pwd` if test -z "$absdir"; then func_warning "cannot determine absolute directory name of '$dir'" absdir=$dir fi ;; esac if $GREP "^installed=no" $deplib > /dev/null; then case $host in *-*-darwin*) depdepl= eval deplibrary_names=`$SED -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` if test -n "$deplibrary_names"; then for tmp in $deplibrary_names; do depdepl=$tmp done if test -f "$absdir/$objdir/$depdepl"; then depdepl=$absdir/$objdir/$depdepl darwin_install_name=`$OTOOL -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` if test -z "$darwin_install_name"; then darwin_install_name=`$OTOOL64 -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` fi func_append compiler_flags " $wl-dylib_file $wl$darwin_install_name:$depdepl" func_append linker_flags " -dylib_file $darwin_install_name:$depdepl" path= fi fi ;; *) path=-L$absdir/$objdir ;; esac else eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` test -z "$libdir" && \ func_fatal_error "'$deplib' is not a valid libtool archive" test "$absdir" != "$libdir" && \ func_warning "'$deplib' seems to be moved" path=-L$absdir fi ;; esac case " $deplibs " in *" $path "*) ;; *) deplibs="$path $deplibs" ;; esac done fi # link_all_deplibs != no fi # linkmode = lib done # for deplib in $libs if test link = "$pass"; then if test prog = "$linkmode"; then compile_deplibs="$new_inherited_linker_flags $compile_deplibs" finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs" else compiler_flags="$compiler_flags "`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` fi fi dependency_libs=$newdependency_libs if test dlpreopen = "$pass"; then # Link the dlpreopened libraries before other libraries for deplib in $save_deplibs; do deplibs="$deplib $deplibs" done fi if test dlopen != "$pass"; then test conv = "$pass" || { # Make sure lib_search_path contains only unique directories. lib_search_path= for dir in $newlib_search_path; do case "$lib_search_path " in *" $dir "*) ;; *) func_append lib_search_path " $dir" ;; esac done newlib_search_path= } if test prog,link = "$linkmode,$pass"; then vars="compile_deplibs finalize_deplibs" else vars=deplibs fi for var in $vars dependency_libs; do # Add libraries to $var in reverse order eval tmp_libs=\"\$$var\" new_libs= for deplib in $tmp_libs; do # FIXME: Pedantically, this is the right thing to do, so # that some nasty dependency loop isn't accidentally # broken: #new_libs="$deplib $new_libs" # Pragmatically, this seems to cause very few problems in # practice: case $deplib in -L*) new_libs="$deplib $new_libs" ;; -R*) ;; *) # And here is the reason: when a library appears more # than once as an explicit dependence of a library, or # is implicitly linked in more than once by the # compiler, it is considered special, and multiple # occurrences thereof are not removed. Compare this # with having the same library being listed as a # dependency of multiple other libraries: in this case, # we know (pedantically, we assume) the library does not # need to be listed more than once, so we keep only the # last copy. This is not always right, but it is rare # enough that we require users that really mean to play # such unportable linking tricks to link the library # using -Wl,-lname, so that libtool does not consider it # for duplicate removal. case " $specialdeplibs " in *" $deplib "*) new_libs="$deplib $new_libs" ;; *) case " $new_libs " in *" $deplib "*) ;; *) new_libs="$deplib $new_libs" ;; esac ;; esac ;; esac done tmp_libs= for deplib in $new_libs; do case $deplib in -L*) case " $tmp_libs " in *" $deplib "*) ;; *) func_append tmp_libs " $deplib" ;; esac ;; *) func_append tmp_libs " $deplib" ;; esac done eval $var=\"$tmp_libs\" done # for var fi # Add Sun CC postdeps if required: test CXX = "$tagname" && { case $host_os in linux*) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 func_suncc_cstd_abi if test no != "$suncc_use_cstd_abi"; then func_append postdeps ' -library=Cstd -library=Crun' fi ;; esac ;; solaris*) func_cc_basename "$CC" case $func_cc_basename_result in CC* | sunCC*) func_suncc_cstd_abi if test no != "$suncc_use_cstd_abi"; then func_append postdeps ' -library=Cstd -library=Crun' fi ;; esac ;; esac } # Last step: remove runtime libs from dependency_libs # (they stay in deplibs) tmp_libs= for i in $dependency_libs; do case " $predeps $postdeps $compiler_lib_search_path " in *" $i "*) i= ;; esac if test -n "$i"; then func_append tmp_libs " $i" fi done dependency_libs=$tmp_libs done # for pass if test prog = "$linkmode"; then dlfiles=$newdlfiles fi if test prog = "$linkmode" || test lib = "$linkmode"; then dlprefiles=$newdlprefiles fi case $linkmode in oldlib) if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then func_warning "'-dlopen' is ignored for archives" fi case " $deplibs" in *\ -l* | *\ -L*) func_warning "'-l' and '-L' are ignored for archives" ;; esac test -n "$rpath" && \ func_warning "'-rpath' is ignored for archives" test -n "$xrpath" && \ func_warning "'-R' is ignored for archives" test -n "$vinfo" && \ func_warning "'-version-info/-version-number' is ignored for archives" test -n "$release" && \ func_warning "'-release' is ignored for archives" test -n "$export_symbols$export_symbols_regex" && \ func_warning "'-export-symbols' is ignored for archives" # Now set the variables for building old libraries. build_libtool_libs=no oldlibs=$output func_append objs "$old_deplibs" ;; lib) # Make sure we only generate libraries of the form 'libNAME.la'. case $outputname in lib*) func_stripname 'lib' '.la' "$outputname" name=$func_stripname_result eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" ;; *) test no = "$module" \ && func_fatal_help "libtool library '$output' must begin with 'lib'" if test no != "$need_lib_prefix"; then # Add the "lib" prefix for modules if required func_stripname '' '.la' "$outputname" name=$func_stripname_result eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" else func_stripname '' '.la' "$outputname" libname=$func_stripname_result fi ;; esac if test -n "$objs"; then if test pass_all != "$deplibs_check_method"; then func_fatal_error "cannot build libtool library '$output' from non-libtool objects on this host:$objs" else echo $ECHO "*** Warning: Linking the shared library $output against the non-libtool" $ECHO "*** objects $objs is not portable!" func_append libobjs " $objs" fi fi test no = "$dlself" \ || func_warning "'-dlopen self' is ignored for libtool libraries" set dummy $rpath shift test 1 -lt "$#" \ && func_warning "ignoring multiple '-rpath's for a libtool library" install_libdir=$1 oldlibs= if test -z "$rpath"; then if test yes = "$build_libtool_libs"; then # Building a libtool convenience library. # Some compilers have problems with a '.al' extension so # convenience libraries should have the same extension an # archive normally would. oldlibs="$output_objdir/$libname.$libext $oldlibs" build_libtool_libs=convenience build_old_libs=yes fi test -n "$vinfo" && \ func_warning "'-version-info/-version-number' is ignored for convenience libraries" test -n "$release" && \ func_warning "'-release' is ignored for convenience libraries" else # Parse the version information argument. save_ifs=$IFS; IFS=: set dummy $vinfo 0 0 0 shift IFS=$save_ifs test -n "$7" && \ func_fatal_help "too many parameters to '-version-info'" # convert absolute version numbers to libtool ages # this retains compatibility with .la files and attempts # to make the code below a bit more comprehensible case $vinfo_number in yes) number_major=$1 number_minor=$2 number_revision=$3 # # There are really only two kinds -- those that # use the current revision as the major version # and those that subtract age and use age as # a minor version. But, then there is irix # that has an extra 1 added just for fun # case $version_type in # correct linux to gnu/linux during the next big refactor darwin|freebsd-elf|linux|osf|windows|none) func_arith $number_major + $number_minor current=$func_arith_result age=$number_minor revision=$number_revision ;; freebsd-aout|qnx|sunos) current=$number_major revision=$number_minor age=0 ;; irix|nonstopux) func_arith $number_major + $number_minor current=$func_arith_result age=$number_minor revision=$number_minor lt_irix_increment=no ;; *) func_fatal_configuration "$modename: unknown library version type '$version_type'" ;; esac ;; no) current=$1 revision=$2 age=$3 ;; esac # Check that each of the things are valid numbers. case $current in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) func_error "CURRENT '$current' must be a nonnegative integer" func_fatal_error "'$vinfo' is not valid version information" ;; esac case $revision in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) func_error "REVISION '$revision' must be a nonnegative integer" func_fatal_error "'$vinfo' is not valid version information" ;; esac case $age in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) func_error "AGE '$age' must be a nonnegative integer" func_fatal_error "'$vinfo' is not valid version information" ;; esac if test "$age" -gt "$current"; then func_error "AGE '$age' is greater than the current interface number '$current'" func_fatal_error "'$vinfo' is not valid version information" fi # Calculate the version variables. major= versuffix= verstring= case $version_type in none) ;; darwin) # Like Linux, but with the current version available in # verstring for coding it into the library header func_arith $current - $age major=.$func_arith_result versuffix=$major.$age.$revision # Darwin ld doesn't like 0 for these options... func_arith $current + 1 minor_current=$func_arith_result xlcverstring="$wl-compatibility_version $wl$minor_current $wl-current_version $wl$minor_current.$revision" verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" # On Darwin other compilers case $CC in nagfor*) verstring="$wl-compatibility_version $wl$minor_current $wl-current_version $wl$minor_current.$revision" ;; *) verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" ;; esac ;; freebsd-aout) major=.$current versuffix=.$current.$revision ;; freebsd-elf) func_arith $current - $age major=.$func_arith_result versuffix=$major.$age.$revision ;; irix | nonstopux) if test no = "$lt_irix_increment"; then func_arith $current - $age else func_arith $current - $age + 1 fi major=$func_arith_result case $version_type in nonstopux) verstring_prefix=nonstopux ;; *) verstring_prefix=sgi ;; esac verstring=$verstring_prefix$major.$revision # Add in all the interfaces that we are compatible with. loop=$revision while test 0 -ne "$loop"; do func_arith $revision - $loop iface=$func_arith_result func_arith $loop - 1 loop=$func_arith_result verstring=$verstring_prefix$major.$iface:$verstring done # Before this point, $major must not contain '.'. major=.$major versuffix=$major.$revision ;; linux) # correct to gnu/linux during the next big refactor func_arith $current - $age major=.$func_arith_result versuffix=$major.$age.$revision ;; osf) func_arith $current - $age major=.$func_arith_result versuffix=.$current.$age.$revision verstring=$current.$age.$revision # Add in all the interfaces that we are compatible with. loop=$age while test 0 -ne "$loop"; do func_arith $current - $loop iface=$func_arith_result func_arith $loop - 1 loop=$func_arith_result verstring=$verstring:$iface.0 done # Make executables depend on our current version. func_append verstring ":$current.0" ;; qnx) major=.$current versuffix=.$current ;; sco) major=.$current versuffix=.$current ;; sunos) major=.$current versuffix=.$current.$revision ;; windows) # Use '-' rather than '.', since we only want one # extension on DOS 8.3 file systems. func_arith $current - $age major=$func_arith_result versuffix=-$major ;; *) func_fatal_configuration "unknown library version type '$version_type'" ;; esac # Clear the version info if we defaulted, and they specified a release. if test -z "$vinfo" && test -n "$release"; then major= case $version_type in darwin) # we can't check for "0.0" in archive_cmds due to quoting # problems, so we reset it completely verstring= ;; *) verstring=0.0 ;; esac if test no = "$need_version"; then versuffix= else versuffix=.0.0 fi fi # Remove version info from name if versioning should be avoided if test yes,no = "$avoid_version,$need_version"; then major= versuffix= verstring= fi # Check to see if the archive will have undefined symbols. if test yes = "$allow_undefined"; then if test unsupported = "$allow_undefined_flag"; then if test yes = "$build_old_libs"; then func_warning "undefined symbols not allowed in $host shared libraries; building static only" build_libtool_libs=no else func_fatal_error "can't build $host shared library unless -no-undefined is specified" fi fi else # Don't allow undefined symbols. allow_undefined_flag=$no_undefined_flag fi fi func_generate_dlsyms "$libname" "$libname" : func_append libobjs " $symfileobj" test " " = "$libobjs" && libobjs= if test relink != "$opt_mode"; then # Remove our outputs, but don't remove object files since they # may have been created when compiling PIC objects. removelist= tempremovelist=`$ECHO "$output_objdir/*"` for p in $tempremovelist; do case $p in *.$objext | *.gcno) ;; $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/$libname$release.*) if test -n "$precious_files_regex"; then if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 then continue fi fi func_append removelist " $p" ;; *) ;; esac done test -n "$removelist" && \ func_show_eval "${RM}r \$removelist" fi # Now set the variables for building old libraries. if test yes = "$build_old_libs" && test convenience != "$build_libtool_libs"; then func_append oldlibs " $output_objdir/$libname.$libext" # Transform .lo files to .o files. oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.$libext$/d; $lo2o" | $NL2SP` fi # Eliminate all temporary directories. #for path in $notinst_path; do # lib_search_path=`$ECHO "$lib_search_path " | $SED "s% $path % %g"` # deplibs=`$ECHO "$deplibs " | $SED "s% -L$path % %g"` # dependency_libs=`$ECHO "$dependency_libs " | $SED "s% -L$path % %g"` #done if test -n "$xrpath"; then # If the user specified any rpath flags, then add them. temp_xrpath= for libdir in $xrpath; do func_replace_sysroot "$libdir" func_append temp_xrpath " -R$func_replace_sysroot_result" case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac done if test yes != "$hardcode_into_libs" || test yes = "$build_old_libs"; then dependency_libs="$temp_xrpath $dependency_libs" fi fi # Make sure dlfiles contains only unique files that won't be dlpreopened old_dlfiles=$dlfiles dlfiles= for lib in $old_dlfiles; do case " $dlprefiles $dlfiles " in *" $lib "*) ;; *) func_append dlfiles " $lib" ;; esac done # Make sure dlprefiles contains only unique files old_dlprefiles=$dlprefiles dlprefiles= for lib in $old_dlprefiles; do case "$dlprefiles " in *" $lib "*) ;; *) func_append dlprefiles " $lib" ;; esac done if test yes = "$build_libtool_libs"; then if test -n "$rpath"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*) # these systems don't actually have a c library (as such)! ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C library is in the System framework func_append deplibs " System.ltframework" ;; *-*-netbsd*) # Don't link with libc until the a.out ld.so is fixed. ;; *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc due to us having libc/libc_r. ;; *-*-sco3.2v5* | *-*-sco5v6*) # Causes problems with __ctype ;; *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) # Compiler inserts libc in the correct place for threads to work ;; *) # Add libc to deplibs on all other systems if necessary. if test yes = "$build_libtool_need_lc"; then func_append deplibs " -lc" fi ;; esac fi # Transform deplibs into only deplibs that can be linked in shared. name_save=$name libname_save=$libname release_save=$release versuffix_save=$versuffix major_save=$major # I'm not sure if I'm treating the release correctly. I think # release should show up in the -l (ie -lgmp5) so we don't want to # add it in twice. Is that correct? release= versuffix= major= newdeplibs= droppeddeps=no case $deplibs_check_method in pass_all) # Don't check for shared/static. Everything works. # This might be a little naive. We might want to check # whether the library exists or not. But this is on # osf3 & osf4 and I'm not really sure... Just # implementing what was already the behavior. newdeplibs=$deplibs ;; test_compile) # This code stresses the "libraries are programs" paradigm to its # limits. Maybe even breaks it. We compile a program, linking it # against the deplibs as a proxy for the library. Then we can check # whether they linked in statically or dynamically with ldd. $opt_dry_run || $RM conftest.c cat > conftest.c </dev/null` $nocaseglob else potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null` fi for potent_lib in $potential_libs; do # Follow soft links. if ls -lLd "$potent_lib" 2>/dev/null | $GREP " -> " >/dev/null; then continue fi # The statement above tries to avoid entering an # endless loop below, in case of cyclic links. # We might still enter an endless loop, since a link # loop can be closed while we follow links, # but so what? potlib=$potent_lib while test -h "$potlib" 2>/dev/null; do potliblink=`ls -ld $potlib | $SED 's/.* -> //'` case $potliblink in [\\/]* | [A-Za-z]:[\\/]*) potlib=$potliblink;; *) potlib=`$ECHO "$potlib" | $SED 's|[^/]*$||'`"$potliblink";; esac done if eval $file_magic_cmd \"\$potlib\" 2>/dev/null | $SED -e 10q | $EGREP "$file_magic_regex" > /dev/null; then func_append newdeplibs " $a_deplib" a_deplib= break 2 fi done done fi if test -n "$a_deplib"; then droppeddeps=yes echo $ECHO "*** Warning: linker path does not have real file for library $a_deplib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have" echo "*** because I did check the linker path looking for a file starting" if test -z "$potlib"; then $ECHO "*** with $libname but no candidates were found. (...for file magic test)" else $ECHO "*** with $libname and none of the candidates passed a file format test" $ECHO "*** using a file magic. Last file checked: $potlib" fi fi ;; *) # Add a -L argument. func_append newdeplibs " $a_deplib" ;; esac done # Gone through all deplibs. ;; match_pattern*) set dummy $deplibs_check_method; shift match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` for a_deplib in $deplibs; do case $a_deplib in -l*) func_stripname -l '' "$a_deplib" name=$func_stripname_result if test yes = "$allow_libtool_libs_with_static_runtimes"; then case " $predeps $postdeps " in *" $a_deplib "*) func_append newdeplibs " $a_deplib" a_deplib= ;; esac fi if test -n "$a_deplib"; then libname=`eval "\\$ECHO \"$libname_spec\""` for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do potential_libs=`ls $i/$libname[.-]* 2>/dev/null` for potent_lib in $potential_libs; do potlib=$potent_lib # see symlink-check above in file_magic test if eval "\$ECHO \"$potent_lib\"" 2>/dev/null | $SED 10q | \ $EGREP "$match_pattern_regex" > /dev/null; then func_append newdeplibs " $a_deplib" a_deplib= break 2 fi done done fi if test -n "$a_deplib"; then droppeddeps=yes echo $ECHO "*** Warning: linker path does not have real file for library $a_deplib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have" echo "*** because I did check the linker path looking for a file starting" if test -z "$potlib"; then $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)" else $ECHO "*** with $libname and none of the candidates passed a file format test" $ECHO "*** using a regex pattern. Last file checked: $potlib" fi fi ;; *) # Add a -L argument. func_append newdeplibs " $a_deplib" ;; esac done # Gone through all deplibs. ;; none | unknown | *) newdeplibs= tmp_deplibs=`$ECHO " $deplibs" | $SED 's/ -lc$//; s/ -[LR][^ ]*//g'` if test yes = "$allow_libtool_libs_with_static_runtimes"; then for i in $predeps $postdeps; do # can't use Xsed below, because $i might contain '/' tmp_deplibs=`$ECHO " $tmp_deplibs" | $SED "s|$i||"` done fi case $tmp_deplibs in *[!\ \ ]*) echo if test none = "$deplibs_check_method"; then echo "*** Warning: inter-library dependencies are not supported in this platform." else echo "*** Warning: inter-library dependencies are not known to be supported." fi echo "*** All declared inter-library dependencies are being dropped." droppeddeps=yes ;; esac ;; esac versuffix=$versuffix_save major=$major_save release=$release_save libname=$libname_save name=$name_save case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library with the System framework newdeplibs=`$ECHO " $newdeplibs" | $SED 's/ -lc / System.ltframework /'` ;; esac if test yes = "$droppeddeps"; then if test yes = "$module"; then echo echo "*** Warning: libtool could not satisfy all declared inter-library" $ECHO "*** dependencies of module $libname. Therefore, libtool will create" echo "*** a static module, that should work as long as the dlopening" echo "*** application is linked with the -dlopen flag." if test -z "$global_symbol_pipe"; then echo echo "*** However, this would only work if libtool was able to extract symbol" echo "*** lists from a program, using 'nm' or equivalent, but libtool could" echo "*** not find such a program. So, this module is probably useless." echo "*** 'nm' from GNU binutils and a full rebuild may help." fi if test no = "$build_old_libs"; then oldlibs=$output_objdir/$libname.$libext build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi else echo "*** The inter-library dependencies that have been dropped here will be" echo "*** automatically added whenever a program is linked with this library" echo "*** or is declared to -dlopen it." if test no = "$allow_undefined"; then echo echo "*** Since this library must not contain undefined symbols," echo "*** because either the platform does not support them or" echo "*** it was explicitly requested with -no-undefined," echo "*** libtool will only create a static version of it." if test no = "$build_old_libs"; then oldlibs=$output_objdir/$libname.$libext build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi fi fi fi # Done checking deplibs! deplibs=$newdeplibs fi # Time to change all our "foo.ltframework" stuff back to "-framework foo" case $host in *-*-darwin*) newdeplibs=`$ECHO " $newdeplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` new_inherited_linker_flags=`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` deplibs=`$ECHO " $deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` ;; esac # move library search paths that coincide with paths to not yet # installed libraries to the beginning of the library search list new_libs= for path in $notinst_path; do case " $new_libs " in *" -L$path/$objdir "*) ;; *) case " $deplibs " in *" -L$path/$objdir "*) func_append new_libs " -L$path/$objdir" ;; esac ;; esac done for deplib in $deplibs; do case $deplib in -L*) case " $new_libs " in *" $deplib "*) ;; *) func_append new_libs " $deplib" ;; esac ;; *) func_append new_libs " $deplib" ;; esac done deplibs=$new_libs # All the library-specific variables (install_libdir is set above). library_names= old_library= dlname= # Test again, we may have decided not to build it any more if test yes = "$build_libtool_libs"; then # Remove $wl instances when linking with ld. # FIXME: should test the right _cmds variable. case $archive_cmds in *\$LD\ *) wl= ;; esac if test yes = "$hardcode_into_libs"; then # Hardcode the library paths hardcode_libdirs= dep_rpath= rpath=$finalize_rpath test relink = "$opt_mode" || rpath=$compile_rpath$rpath for libdir in $rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then func_replace_sysroot "$libdir" libdir=$func_replace_sysroot_result if test -z "$hardcode_libdirs"; then hardcode_libdirs=$libdir else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" func_append dep_rpath " $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) func_append perm_rpath " $libdir" ;; esac fi done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir=$hardcode_libdirs eval "dep_rpath=\"$hardcode_libdir_flag_spec\"" fi if test -n "$runpath_var" && test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do func_append rpath "$dir:" done eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" fi test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" fi shlibpath=$finalize_shlibpath test relink = "$opt_mode" || shlibpath=$compile_shlibpath$shlibpath if test -n "$shlibpath"; then eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" fi # Get the real and link names of the library. eval shared_ext=\"$shrext_cmds\" eval library_names=\"$library_names_spec\" set dummy $library_names shift realname=$1 shift if test -n "$soname_spec"; then eval soname=\"$soname_spec\" else soname=$realname fi if test -z "$dlname"; then dlname=$soname fi lib=$output_objdir/$realname linknames= for link do func_append linknames " $link" done # Use standard objects if they are pic test -z "$pic_flag" && libobjs=`$ECHO "$libobjs" | $SP2NL | $SED "$lo2o" | $NL2SP` test "X$libobjs" = "X " && libobjs= delfiles= if test -n "$export_symbols" && test -n "$include_expsyms"; then $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp" export_symbols=$output_objdir/$libname.uexp func_append delfiles " $export_symbols" fi orig_export_symbols= case $host_os in cygwin* | mingw* | cegcc*) if test -n "$export_symbols" && test -z "$export_symbols_regex"; then # exporting using user supplied symfile func_dll_def_p "$export_symbols" || { # and it's NOT already a .def file. Must figure out # which of the given symbols are data symbols and tag # them as such. So, trigger use of export_symbols_cmds. # export_symbols gets reassigned inside the "prepare # the list of exported symbols" if statement, so the # include_expsyms logic still works. orig_export_symbols=$export_symbols export_symbols= always_export_symbols=yes } fi ;; esac # Prepare the list of exported symbols if test -z "$export_symbols"; then if test yes = "$always_export_symbols" || test -n "$export_symbols_regex"; then func_verbose "generating symbol list for '$libname.la'" export_symbols=$output_objdir/$libname.exp $opt_dry_run || $RM $export_symbols cmds=$export_symbols_cmds save_ifs=$IFS; IFS='~' for cmd1 in $cmds; do IFS=$save_ifs # Take the normal branch if the nm_file_list_spec branch # doesn't work or if tool conversion is not needed. case $nm_file_list_spec~$to_tool_file_cmd in *~func_convert_file_noop | *~func_convert_file_msys_to_w32 | ~*) try_normal_branch=yes eval cmd=\"$cmd1\" func_len " $cmd" len=$func_len_result ;; *) try_normal_branch=no ;; esac if test yes = "$try_normal_branch" \ && { test "$len" -lt "$max_cmd_len" \ || test "$max_cmd_len" -le -1; } then func_show_eval "$cmd" 'exit $?' skipped_export=false elif test -n "$nm_file_list_spec"; then func_basename "$output" output_la=$func_basename_result save_libobjs=$libobjs save_output=$output output=$output_objdir/$output_la.nm func_to_tool_file "$output" libobjs=$nm_file_list_spec$func_to_tool_file_result func_append delfiles " $output" func_verbose "creating $NM input file list: $output" for obj in $save_libobjs; do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" done > "$output" eval cmd=\"$cmd1\" func_show_eval "$cmd" 'exit $?' output=$save_output libobjs=$save_libobjs skipped_export=false else # The command line is too long to execute in one step. func_verbose "using reloadable object file for export list..." skipped_export=: # Break out early, otherwise skipped_export may be # set to false by a later but shorter cmd. break fi done IFS=$save_ifs if test -n "$export_symbols_regex" && test : != "$skipped_export"; then func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' func_show_eval '$MV "${export_symbols}T" "$export_symbols"' fi fi fi if test -n "$export_symbols" && test -n "$include_expsyms"; then tmp_export_symbols=$export_symbols test -n "$orig_export_symbols" && tmp_export_symbols=$orig_export_symbols $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' fi if test : != "$skipped_export" && test -n "$orig_export_symbols"; then # The given exports_symbols file has to be filtered, so filter it. func_verbose "filter symbol list for '$libname.la' to tag DATA exports" # FIXME: $output_objdir/$libname.filter potentially contains lots of # 's' commands, which not all seds can handle. GNU sed should be fine # though. Also, the filter scales superlinearly with the number of # global variables. join(1) would be nice here, but unfortunately # isn't a blessed tool. $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter func_append delfiles " $export_symbols $output_objdir/$libname.filter" export_symbols=$output_objdir/$libname.def $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols fi tmp_deplibs= for test_deplib in $deplibs; do case " $convenience " in *" $test_deplib "*) ;; *) func_append tmp_deplibs " $test_deplib" ;; esac done deplibs=$tmp_deplibs if test -n "$convenience"; then if test -n "$whole_archive_flag_spec" && test yes = "$compiler_needs_object" && test -z "$libobjs"; then # extract the archives, so we have objects to list. # TODO: could optimize this to just extract one archive. whole_archive_flag_spec= fi if test -n "$whole_archive_flag_spec"; then save_libobjs=$libobjs eval libobjs=\"\$libobjs $whole_archive_flag_spec\" test "X$libobjs" = "X " && libobjs= else gentop=$output_objdir/${outputname}x func_append generated " $gentop" func_extract_archives $gentop $convenience func_append libobjs " $func_extract_archives_result" test "X$libobjs" = "X " && libobjs= fi fi if test yes = "$thread_safe" && test -n "$thread_safe_flag_spec"; then eval flag=\"$thread_safe_flag_spec\" func_append linker_flags " $flag" fi # Make a backup of the uninstalled library when relinking if test relink = "$opt_mode"; then $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $? fi # Do each of the archive commands. if test yes = "$module" && test -n "$module_cmds"; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then eval test_cmds=\"$module_expsym_cmds\" cmds=$module_expsym_cmds else eval test_cmds=\"$module_cmds\" cmds=$module_cmds fi else if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then eval test_cmds=\"$archive_expsym_cmds\" cmds=$archive_expsym_cmds else eval test_cmds=\"$archive_cmds\" cmds=$archive_cmds fi fi if test : != "$skipped_export" && func_len " $test_cmds" && len=$func_len_result && test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then : else # The command line is too long to link in one step, link piecewise # or, if using GNU ld and skipped_export is not :, use a linker # script. # Save the value of $output and $libobjs because we want to # use them later. If we have whole_archive_flag_spec, we # want to use save_libobjs as it was before # whole_archive_flag_spec was expanded, because we can't # assume the linker understands whole_archive_flag_spec. # This may have to be revisited, in case too many # convenience libraries get linked in and end up exceeding # the spec. if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then save_libobjs=$libobjs fi save_output=$output func_basename "$output" output_la=$func_basename_result # Clear the reloadable object creation command queue and # initialize k to one. test_cmds= concat_cmds= objlist= last_robj= k=1 if test -n "$save_libobjs" && test : != "$skipped_export" && test yes = "$with_gnu_ld"; then output=$output_objdir/$output_la.lnkscript func_verbose "creating GNU ld script: $output" echo 'INPUT (' > $output for obj in $save_libobjs do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" >> $output done echo ')' >> $output func_append delfiles " $output" func_to_tool_file "$output" output=$func_to_tool_file_result elif test -n "$save_libobjs" && test : != "$skipped_export" && test -n "$file_list_spec"; then output=$output_objdir/$output_la.lnk func_verbose "creating linker input file list: $output" : > $output set x $save_libobjs shift firstobj= if test yes = "$compiler_needs_object"; then firstobj="$1 " shift fi for obj do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" >> $output done func_append delfiles " $output" func_to_tool_file "$output" output=$firstobj\"$file_list_spec$func_to_tool_file_result\" else if test -n "$save_libobjs"; then func_verbose "creating reloadable object files..." output=$output_objdir/$output_la-$k.$objext eval test_cmds=\"$reload_cmds\" func_len " $test_cmds" len0=$func_len_result len=$len0 # Loop over the list of objects to be linked. for obj in $save_libobjs do func_len " $obj" func_arith $len + $func_len_result len=$func_arith_result if test -z "$objlist" || test "$len" -lt "$max_cmd_len"; then func_append objlist " $obj" else # The command $test_cmds is almost too long, add a # command to the queue. if test 1 -eq "$k"; then # The first file doesn't have a previous command to add. reload_objs=$objlist eval concat_cmds=\"$reload_cmds\" else # All subsequent reloadable object files will link in # the last one created. reload_objs="$objlist $last_robj" eval concat_cmds=\"\$concat_cmds~$reload_cmds~\$RM $last_robj\" fi last_robj=$output_objdir/$output_la-$k.$objext func_arith $k + 1 k=$func_arith_result output=$output_objdir/$output_la-$k.$objext objlist=" $obj" func_len " $last_robj" func_arith $len0 + $func_len_result len=$func_arith_result fi done # Handle the remaining objects by creating one last # reloadable object file. All subsequent reloadable object # files will link in the last one created. test -z "$concat_cmds" || concat_cmds=$concat_cmds~ reload_objs="$objlist $last_robj" eval concat_cmds=\"\$concat_cmds$reload_cmds\" if test -n "$last_robj"; then eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" fi func_append delfiles " $output" else output= fi ${skipped_export-false} && { func_verbose "generating symbol list for '$libname.la'" export_symbols=$output_objdir/$libname.exp $opt_dry_run || $RM $export_symbols libobjs=$output # Append the command to create the export file. test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\" if test -n "$last_robj"; then eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" fi } test -n "$save_libobjs" && func_verbose "creating a temporary reloadable object file: $output" # Loop through the commands generated above and execute them. save_ifs=$IFS; IFS='~' for cmd in $concat_cmds; do IFS=$save_ifs $opt_quiet || { func_quote_for_expand "$cmd" eval "func_echo $func_quote_for_expand_result" } $opt_dry_run || eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test relink = "$opt_mode"; then ( cd "$output_objdir" && \ $RM "${realname}T" && \ $MV "${realname}U" "$realname" ) fi exit $lt_exit } done IFS=$save_ifs if test -n "$export_symbols_regex" && ${skipped_export-false}; then func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' func_show_eval '$MV "${export_symbols}T" "$export_symbols"' fi fi ${skipped_export-false} && { if test -n "$export_symbols" && test -n "$include_expsyms"; then tmp_export_symbols=$export_symbols test -n "$orig_export_symbols" && tmp_export_symbols=$orig_export_symbols $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' fi if test -n "$orig_export_symbols"; then # The given exports_symbols file has to be filtered, so filter it. func_verbose "filter symbol list for '$libname.la' to tag DATA exports" # FIXME: $output_objdir/$libname.filter potentially contains lots of # 's' commands, which not all seds can handle. GNU sed should be fine # though. Also, the filter scales superlinearly with the number of # global variables. join(1) would be nice here, but unfortunately # isn't a blessed tool. $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter func_append delfiles " $export_symbols $output_objdir/$libname.filter" export_symbols=$output_objdir/$libname.def $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols fi } libobjs=$output # Restore the value of output. output=$save_output if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then eval libobjs=\"\$libobjs $whole_archive_flag_spec\" test "X$libobjs" = "X " && libobjs= fi # Expand the library linking commands again to reset the # value of $libobjs for piecewise linking. # Do each of the archive commands. if test yes = "$module" && test -n "$module_cmds"; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then cmds=$module_expsym_cmds else cmds=$module_cmds fi else if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then cmds=$archive_expsym_cmds else cmds=$archive_cmds fi fi fi if test -n "$delfiles"; then # Append the command to remove temporary files to $cmds. eval cmds=\"\$cmds~\$RM $delfiles\" fi # Add any objects from preloaded convenience libraries if test -n "$dlprefiles"; then gentop=$output_objdir/${outputname}x func_append generated " $gentop" func_extract_archives $gentop $dlprefiles func_append libobjs " $func_extract_archives_result" test "X$libobjs" = "X " && libobjs= fi save_ifs=$IFS; IFS='~' for cmd in $cmds; do IFS=$sp$nl eval cmd=\"$cmd\" IFS=$save_ifs $opt_quiet || { func_quote_for_expand "$cmd" eval "func_echo $func_quote_for_expand_result" } $opt_dry_run || eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test relink = "$opt_mode"; then ( cd "$output_objdir" && \ $RM "${realname}T" && \ $MV "${realname}U" "$realname" ) fi exit $lt_exit } done IFS=$save_ifs # Restore the uninstalled library and exit if test relink = "$opt_mode"; then $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $? if test -n "$convenience"; then if test -z "$whole_archive_flag_spec"; then func_show_eval '${RM}r "$gentop"' fi fi exit $EXIT_SUCCESS fi # Create links to the real library. for linkname in $linknames; do if test "$realname" != "$linkname"; then func_show_eval '(cd "$output_objdir" && $RM "$linkname" && $LN_S "$realname" "$linkname")' 'exit $?' fi done # If -module or -export-dynamic was specified, set the dlname. if test yes = "$module" || test yes = "$export_dynamic"; then # On all known operating systems, these are identical. dlname=$soname fi fi ;; obj) if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then func_warning "'-dlopen' is ignored for objects" fi case " $deplibs" in *\ -l* | *\ -L*) func_warning "'-l' and '-L' are ignored for objects" ;; esac test -n "$rpath" && \ func_warning "'-rpath' is ignored for objects" test -n "$xrpath" && \ func_warning "'-R' is ignored for objects" test -n "$vinfo" && \ func_warning "'-version-info' is ignored for objects" test -n "$release" && \ func_warning "'-release' is ignored for objects" case $output in *.lo) test -n "$objs$old_deplibs" && \ func_fatal_error "cannot build library object '$output' from non-libtool objects" libobj=$output func_lo2o "$libobj" obj=$func_lo2o_result ;; *) libobj= obj=$output ;; esac # Delete the old objects. $opt_dry_run || $RM $obj $libobj # Objects from convenience libraries. This assumes # single-version convenience libraries. Whenever we create # different ones for PIC/non-PIC, this we'll have to duplicate # the extraction. reload_conv_objs= gentop= # if reload_cmds runs $LD directly, get rid of -Wl from # whole_archive_flag_spec and hope we can get by with turning comma # into space. case $reload_cmds in *\$LD[\ \$]*) wl= ;; esac if test -n "$convenience"; then if test -n "$whole_archive_flag_spec"; then eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" test -n "$wl" || tmp_whole_archive_flags=`$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'` reload_conv_objs=$reload_objs\ $tmp_whole_archive_flags else gentop=$output_objdir/${obj}x func_append generated " $gentop" func_extract_archives $gentop $convenience reload_conv_objs="$reload_objs $func_extract_archives_result" fi fi # If we're not building shared, we need to use non_pic_objs test yes = "$build_libtool_libs" || libobjs=$non_pic_objects # Create the old-style object. reload_objs=$objs$old_deplibs' '`$ECHO "$libobjs" | $SP2NL | $SED "/\.$libext$/d; /\.lib$/d; $lo2o" | $NL2SP`' '$reload_conv_objs output=$obj func_execute_cmds "$reload_cmds" 'exit $?' # Exit if we aren't doing a library object file. if test -z "$libobj"; then if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi exit $EXIT_SUCCESS fi test yes = "$build_libtool_libs" || { if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi # Create an invalid libtool object if no PIC, so that we don't # accidentally link it into a program. # $show "echo timestamp > $libobj" # $opt_dry_run || eval "echo timestamp > $libobj" || exit $? exit $EXIT_SUCCESS } if test -n "$pic_flag" || test default != "$pic_mode"; then # Only do commands if we really have different PIC objects. reload_objs="$libobjs $reload_conv_objs" output=$libobj func_execute_cmds "$reload_cmds" 'exit $?' fi if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi exit $EXIT_SUCCESS ;; prog) case $host in *cygwin*) func_stripname '' '.exe' "$output" output=$func_stripname_result.exe;; esac test -n "$vinfo" && \ func_warning "'-version-info' is ignored for programs" test -n "$release" && \ func_warning "'-release' is ignored for programs" $preload \ && test unknown,unknown,unknown = "$dlopen_support,$dlopen_self,$dlopen_self_static" \ && func_warning "'LT_INIT([dlopen])' not used. Assuming no dlopen support." case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library is the System framework compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's/ -lc / System.ltframework /'` finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's/ -lc / System.ltframework /'` ;; esac case $host in *-*-darwin*) # Don't allow lazy linking, it breaks C++ global constructors # But is supposedly fixed on 10.4 or later (yay!). if test CXX = "$tagname"; then case ${MACOSX_DEPLOYMENT_TARGET-10.0} in 10.[0123]) func_append compile_command " $wl-bind_at_load" func_append finalize_command " $wl-bind_at_load" ;; esac fi # Time to change all our "foo.ltframework" stuff back to "-framework foo" compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` ;; esac # move library search paths that coincide with paths to not yet # installed libraries to the beginning of the library search list new_libs= for path in $notinst_path; do case " $new_libs " in *" -L$path/$objdir "*) ;; *) case " $compile_deplibs " in *" -L$path/$objdir "*) func_append new_libs " -L$path/$objdir" ;; esac ;; esac done for deplib in $compile_deplibs; do case $deplib in -L*) case " $new_libs " in *" $deplib "*) ;; *) func_append new_libs " $deplib" ;; esac ;; *) func_append new_libs " $deplib" ;; esac done compile_deplibs=$new_libs func_append compile_command " $compile_deplibs" func_append finalize_command " $finalize_deplibs" if test -n "$rpath$xrpath"; then # If the user specified any rpath flags, then add them. for libdir in $rpath $xrpath; do # This is the magic to use -rpath. case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac done fi # Now hardcode the library paths rpath= hardcode_libdirs= for libdir in $compile_rpath $finalize_rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs=$libdir else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" func_append rpath " $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) func_append perm_rpath " $libdir" ;; esac fi case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) testbindir=`$ECHO "$libdir" | $SED -e 's*/lib$*/bin*'` case :$dllsearchpath: in *":$libdir:"*) ;; ::) dllsearchpath=$libdir;; *) func_append dllsearchpath ":$libdir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; ::) dllsearchpath=$testbindir;; *) func_append dllsearchpath ":$testbindir";; esac ;; esac done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir=$hardcode_libdirs eval rpath=\" $hardcode_libdir_flag_spec\" fi compile_rpath=$rpath rpath= hardcode_libdirs= for libdir in $finalize_rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs=$libdir else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" func_append rpath " $flag" fi elif test -n "$runpath_var"; then case "$finalize_perm_rpath " in *" $libdir "*) ;; *) func_append finalize_perm_rpath " $libdir" ;; esac fi done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir=$hardcode_libdirs eval rpath=\" $hardcode_libdir_flag_spec\" fi finalize_rpath=$rpath if test -n "$libobjs" && test yes = "$build_old_libs"; then # Transform all the library objects into standard objects. compile_command=`$ECHO "$compile_command" | $SP2NL | $SED "$lo2o" | $NL2SP` finalize_command=`$ECHO "$finalize_command" | $SP2NL | $SED "$lo2o" | $NL2SP` fi func_generate_dlsyms "$outputname" "@PROGRAM@" false # template prelinking step if test -n "$prelink_cmds"; then func_execute_cmds "$prelink_cmds" 'exit $?' fi wrappers_required=: case $host in *cegcc* | *mingw32ce*) # Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway. wrappers_required=false ;; *cygwin* | *mingw* ) test yes = "$build_libtool_libs" || wrappers_required=false ;; *) if test no = "$need_relink" || test yes != "$build_libtool_libs"; then wrappers_required=false fi ;; esac $wrappers_required || { # Replace the output file specification. compile_command=`$ECHO "$compile_command" | $SED 's%@OUTPUT@%'"$output"'%g'` link_command=$compile_command$compile_rpath # We have no uninstalled library dependencies, so finalize right now. exit_status=0 func_show_eval "$link_command" 'exit_status=$?' if test -n "$postlink_cmds"; then func_to_tool_file "$output" postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` func_execute_cmds "$postlink_cmds" 'exit $?' fi # Delete the generated files. if test -f "$output_objdir/${outputname}S.$objext"; then func_show_eval '$RM "$output_objdir/${outputname}S.$objext"' fi exit $exit_status } if test -n "$compile_shlibpath$finalize_shlibpath"; then compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" fi if test -n "$finalize_shlibpath"; then finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" fi compile_var= finalize_var= if test -n "$runpath_var"; then if test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do func_append rpath "$dir:" done compile_var="$runpath_var=\"$rpath\$$runpath_var\" " fi if test -n "$finalize_perm_rpath"; then # We should set the runpath_var. rpath= for dir in $finalize_perm_rpath; do func_append rpath "$dir:" done finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " fi fi if test yes = "$no_install"; then # We don't need to create a wrapper script. link_command=$compile_var$compile_command$compile_rpath # Replace the output file specification. link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output"'%g'` # Delete the old output file. $opt_dry_run || $RM $output # Link the executable and exit func_show_eval "$link_command" 'exit $?' if test -n "$postlink_cmds"; then func_to_tool_file "$output" postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` func_execute_cmds "$postlink_cmds" 'exit $?' fi exit $EXIT_SUCCESS fi case $hardcode_action,$fast_install in relink,*) # Fast installation is not supported link_command=$compile_var$compile_command$compile_rpath relink_command=$finalize_var$finalize_command$finalize_rpath func_warning "this platform does not like uninstalled shared libraries" func_warning "'$output' will be relinked during installation" ;; *,yes) link_command=$finalize_var$compile_command$finalize_rpath relink_command=`$ECHO "$compile_var$compile_command$compile_rpath" | $SED 's%@OUTPUT@%\$progdir/\$file%g'` ;; *,no) link_command=$compile_var$compile_command$compile_rpath relink_command=$finalize_var$finalize_command$finalize_rpath ;; *,needless) link_command=$finalize_var$compile_command$finalize_rpath relink_command= ;; esac # Replace the output file specification. link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` # Delete the old output files. $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname func_show_eval "$link_command" 'exit $?' if test -n "$postlink_cmds"; then func_to_tool_file "$output_objdir/$outputname" postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` func_execute_cmds "$postlink_cmds" 'exit $?' fi # Now create the wrapper script. func_verbose "creating $output" # Quote the relink command for shipping. if test -n "$relink_command"; then # Preserve any variables that may affect compiler behavior for var in $variables_saved_for_relink; do if eval test -z \"\${$var+set}\"; then relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else func_quote_for_eval "$var_value" relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" fi done relink_command="(cd `pwd`; $relink_command)" relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` fi # Only actually do things if not in dry run mode. $opt_dry_run || { # win32 will think the script is a binary if it has # a .exe suffix, so we strip it off here. case $output in *.exe) func_stripname '' '.exe' "$output" output=$func_stripname_result ;; esac # test for cygwin because mv fails w/o .exe extensions case $host in *cygwin*) exeext=.exe func_stripname '' '.exe' "$outputname" outputname=$func_stripname_result ;; *) exeext= ;; esac case $host in *cygwin* | *mingw* ) func_dirname_and_basename "$output" "" "." output_name=$func_basename_result output_path=$func_dirname_result cwrappersource=$output_path/$objdir/lt-$output_name.c cwrapper=$output_path/$output_name.exe $RM $cwrappersource $cwrapper trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 func_emit_cwrapperexe_src > $cwrappersource # The wrapper executable is built using the $host compiler, # because it contains $host paths and files. If cross- # compiling, it, like the target executable, must be # executed on the $host or under an emulation environment. $opt_dry_run || { $LTCC $LTCFLAGS -o $cwrapper $cwrappersource $STRIP $cwrapper } # Now, create the wrapper script for func_source use: func_ltwrapper_scriptname $cwrapper $RM $func_ltwrapper_scriptname_result trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15 $opt_dry_run || { # note: this script will not be executed, so do not chmod. if test "x$build" = "x$host"; then $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result else func_emit_wrapper no > $func_ltwrapper_scriptname_result fi } ;; * ) $RM $output trap "$RM $output; exit $EXIT_FAILURE" 1 2 15 func_emit_wrapper no > $output chmod +x $output ;; esac } exit $EXIT_SUCCESS ;; esac # See if we need to build an old-fashioned archive. for oldlib in $oldlibs; do case $build_libtool_libs in convenience) oldobjs="$libobjs_save $symfileobj" addlibs=$convenience build_libtool_libs=no ;; module) oldobjs=$libobjs_save addlibs=$old_convenience build_libtool_libs=no ;; *) oldobjs="$old_deplibs $non_pic_objects" $preload && test -f "$symfileobj" \ && func_append oldobjs " $symfileobj" addlibs=$old_convenience ;; esac if test -n "$addlibs"; then gentop=$output_objdir/${outputname}x func_append generated " $gentop" func_extract_archives $gentop $addlibs func_append oldobjs " $func_extract_archives_result" fi # Do each command in the archive commands. if test -n "$old_archive_from_new_cmds" && test yes = "$build_libtool_libs"; then cmds=$old_archive_from_new_cmds else # Add any objects from preloaded convenience libraries if test -n "$dlprefiles"; then gentop=$output_objdir/${outputname}x func_append generated " $gentop" func_extract_archives $gentop $dlprefiles func_append oldobjs " $func_extract_archives_result" fi # POSIX demands no paths to be encoded in archives. We have # to avoid creating archives with duplicate basenames if we # might have to extract them afterwards, e.g., when creating a # static archive out of a convenience library, or when linking # the entirety of a libtool archive into another (currently # not supported by libtool). if (for obj in $oldobjs do func_basename "$obj" $ECHO "$func_basename_result" done | sort | sort -uc >/dev/null 2>&1); then : else echo "copying selected object files to avoid basename conflicts..." gentop=$output_objdir/${outputname}x func_append generated " $gentop" func_mkdir_p "$gentop" save_oldobjs=$oldobjs oldobjs= counter=1 for obj in $save_oldobjs do func_basename "$obj" objbase=$func_basename_result case " $oldobjs " in " ") oldobjs=$obj ;; *[\ /]"$objbase "*) while :; do # Make sure we don't pick an alternate name that also # overlaps. newobj=lt$counter-$objbase func_arith $counter + 1 counter=$func_arith_result case " $oldobjs " in *[\ /]"$newobj "*) ;; *) if test ! -f "$gentop/$newobj"; then break; fi ;; esac done func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" func_append oldobjs " $gentop/$newobj" ;; *) func_append oldobjs " $obj" ;; esac done fi func_to_tool_file "$oldlib" func_convert_file_msys_to_w32 tool_oldlib=$func_to_tool_file_result eval cmds=\"$old_archive_cmds\" func_len " $cmds" len=$func_len_result if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then cmds=$old_archive_cmds elif test -n "$archiver_list_spec"; then func_verbose "using command file archive linking..." for obj in $oldobjs do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" done > $output_objdir/$libname.libcmd func_to_tool_file "$output_objdir/$libname.libcmd" oldobjs=" $archiver_list_spec$func_to_tool_file_result" cmds=$old_archive_cmds else # the command line is too long to link in one step, link in parts func_verbose "using piecewise archive linking..." save_RANLIB=$RANLIB RANLIB=: objlist= concat_cmds= save_oldobjs=$oldobjs oldobjs= # Is there a better way of finding the last object in the list? for obj in $save_oldobjs do last_oldobj=$obj done eval test_cmds=\"$old_archive_cmds\" func_len " $test_cmds" len0=$func_len_result len=$len0 for obj in $save_oldobjs do func_len " $obj" func_arith $len + $func_len_result len=$func_arith_result func_append objlist " $obj" if test "$len" -lt "$max_cmd_len"; then : else # the above command should be used before it gets too long oldobjs=$objlist if test "$obj" = "$last_oldobj"; then RANLIB=$save_RANLIB fi test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\$concat_cmds$old_archive_cmds\" objlist= len=$len0 fi done RANLIB=$save_RANLIB oldobjs=$objlist if test -z "$oldobjs"; then eval cmds=\"\$concat_cmds\" else eval cmds=\"\$concat_cmds~\$old_archive_cmds\" fi fi fi func_execute_cmds "$cmds" 'exit $?' done test -n "$generated" && \ func_show_eval "${RM}r$generated" # Now create the libtool archive. case $output in *.la) old_library= test yes = "$build_old_libs" && old_library=$libname.$libext func_verbose "creating $output" # Preserve any variables that may affect compiler behavior for var in $variables_saved_for_relink; do if eval test -z \"\${$var+set}\"; then relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else func_quote_for_eval "$var_value" relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" fi done # Quote the link command for shipping. relink_command="(cd `pwd`; $SHELL \"$progpath\" $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` if test yes = "$hardcode_automatic"; then relink_command= fi # Only create the output if not a dry run. $opt_dry_run || { for installed in no yes; do if test yes = "$installed"; then if test -z "$install_libdir"; then break fi output=$output_objdir/${outputname}i # Replace all uninstalled libtool libraries with the installed ones newdependency_libs= for deplib in $dependency_libs; do case $deplib in *.la) func_basename "$deplib" name=$func_basename_result func_resolve_sysroot "$deplib" eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result` test -z "$libdir" && \ func_fatal_error "'$deplib' is not a valid libtool archive" func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name" ;; -L*) func_stripname -L '' "$deplib" func_replace_sysroot "$func_stripname_result" func_append newdependency_libs " -L$func_replace_sysroot_result" ;; -R*) func_stripname -R '' "$deplib" func_replace_sysroot "$func_stripname_result" func_append newdependency_libs " -R$func_replace_sysroot_result" ;; *) func_append newdependency_libs " $deplib" ;; esac done dependency_libs=$newdependency_libs newdlfiles= for lib in $dlfiles; do case $lib in *.la) func_basename "$lib" name=$func_basename_result eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $lib` test -z "$libdir" && \ func_fatal_error "'$lib' is not a valid libtool archive" func_append newdlfiles " ${lt_sysroot:+=}$libdir/$name" ;; *) func_append newdlfiles " $lib" ;; esac done dlfiles=$newdlfiles newdlprefiles= for lib in $dlprefiles; do case $lib in *.la) # Only pass preopened files to the pseudo-archive (for # eventual linking with the app. that links it) if we # didn't already link the preopened objects directly into # the library: func_basename "$lib" name=$func_basename_result eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $lib` test -z "$libdir" && \ func_fatal_error "'$lib' is not a valid libtool archive" func_append newdlprefiles " ${lt_sysroot:+=}$libdir/$name" ;; esac done dlprefiles=$newdlprefiles else newdlfiles= for lib in $dlfiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs=$lib ;; *) abs=`pwd`"/$lib" ;; esac func_append newdlfiles " $abs" done dlfiles=$newdlfiles newdlprefiles= for lib in $dlprefiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs=$lib ;; *) abs=`pwd`"/$lib" ;; esac func_append newdlprefiles " $abs" done dlprefiles=$newdlprefiles fi $RM $output # place dlname in correct position for cygwin # In fact, it would be nice if we could use this code for all target # systems that can't hard-code library paths into their executables # and that have no shared library path variable independent of PATH, # but it turns out we can't easily determine that from inspecting # libtool variables, so we have to hard-code the OSs to which it # applies here; at the moment, that means platforms that use the PE # object format with DLL files. See the long comment at the top of # tests/bindir.at for full details. tdlname=$dlname case $host,$output,$installed,$module,$dlname in *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) # If a -bindir argument was supplied, place the dll there. if test -n "$bindir"; then func_relative_path "$install_libdir" "$bindir" tdlname=$func_relative_path_result/$dlname else # Otherwise fall back on heuristic. tdlname=../bin/$dlname fi ;; esac $ECHO > $output "\ # $outputname - a libtool library file # Generated by $PROGRAM (GNU $PACKAGE) $VERSION # # Please DO NOT delete this file! # It is necessary for linking the library. # The name that we can dlopen(3). dlname='$tdlname' # Names of this library. library_names='$library_names' # The name of the static archive. old_library='$old_library' # Linker flags that cannot go in dependency_libs. inherited_linker_flags='$new_inherited_linker_flags' # Libraries that this one depends upon. dependency_libs='$dependency_libs' # Names of additional weak libraries provided by this library weak_library_names='$weak_libs' # Version information for $libname. current=$current age=$age revision=$revision # Is this an already installed library? installed=$installed # Should we warn about portability when linking against -modules? shouldnotlink=$module # Files to dlopen/dlpreopen dlopen='$dlfiles' dlpreopen='$dlprefiles' # Directory that this library needs to be installed in: libdir='$install_libdir'" if test no,yes = "$installed,$need_relink"; then $ECHO >> $output "\ relink_command=\"$relink_command\"" fi done } # Do a symbolic link so that the libtool archive can be found in # LD_LIBRARY_PATH before the program is installed. func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?' ;; esac exit $EXIT_SUCCESS } if test link = "$opt_mode" || test relink = "$opt_mode"; then func_mode_link ${1+"$@"} fi # func_mode_uninstall arg... func_mode_uninstall () { $debug_cmd RM=$nonopt files= rmforce=false exit_status=0 # This variable tells wrapper scripts just to set variables rather # than running their programs. libtool_install_magic=$magic for arg do case $arg in -f) func_append RM " $arg"; rmforce=: ;; -*) func_append RM " $arg" ;; *) func_append files " $arg" ;; esac done test -z "$RM" && \ func_fatal_help "you must specify an RM program" rmdirs= for file in $files; do func_dirname "$file" "" "." dir=$func_dirname_result if test . = "$dir"; then odir=$objdir else odir=$dir/$objdir fi func_basename "$file" name=$func_basename_result test uninstall = "$opt_mode" && odir=$dir # Remember odir for removal later, being careful to avoid duplicates if test clean = "$opt_mode"; then case " $rmdirs " in *" $odir "*) ;; *) func_append rmdirs " $odir" ;; esac fi # Don't error if the file doesn't exist and rm -f was used. if { test -L "$file"; } >/dev/null 2>&1 || { test -h "$file"; } >/dev/null 2>&1 || test -f "$file"; then : elif test -d "$file"; then exit_status=1 continue elif $rmforce; then continue fi rmfiles=$file case $name in *.la) # Possibly a libtool archive, so verify it. if func_lalib_p "$file"; then func_source $dir/$name # Delete the libtool libraries and symlinks. for n in $library_names; do func_append rmfiles " $odir/$n" done test -n "$old_library" && func_append rmfiles " $odir/$old_library" case $opt_mode in clean) case " $library_names " in *" $dlname "*) ;; *) test -n "$dlname" && func_append rmfiles " $odir/$dlname" ;; esac test -n "$libdir" && func_append rmfiles " $odir/$name $odir/${name}i" ;; uninstall) if test -n "$library_names"; then # Do each command in the postuninstall commands. func_execute_cmds "$postuninstall_cmds" '$rmforce || exit_status=1' fi if test -n "$old_library"; then # Do each command in the old_postuninstall commands. func_execute_cmds "$old_postuninstall_cmds" '$rmforce || exit_status=1' fi # FIXME: should reinstall the best remaining shared library. ;; esac fi ;; *.lo) # Possibly a libtool object, so verify it. if func_lalib_p "$file"; then # Read the .lo file func_source $dir/$name # Add PIC object to the list of files to remove. if test -n "$pic_object" && test none != "$pic_object"; then func_append rmfiles " $dir/$pic_object" fi # Add non-PIC object to the list of files to remove. if test -n "$non_pic_object" && test none != "$non_pic_object"; then func_append rmfiles " $dir/$non_pic_object" fi fi ;; *) if test clean = "$opt_mode"; then noexename=$name case $file in *.exe) func_stripname '' '.exe' "$file" file=$func_stripname_result func_stripname '' '.exe' "$name" noexename=$func_stripname_result # $file with .exe has already been added to rmfiles, # add $file without .exe func_append rmfiles " $file" ;; esac # Do a test to see if this is a libtool program. if func_ltwrapper_p "$file"; then if func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" relink_command= func_source $func_ltwrapper_scriptname_result func_append rmfiles " $func_ltwrapper_scriptname_result" else relink_command= func_source $dir/$noexename fi # note $name still contains .exe if it was in $file originally # as does the version of $file that was added into $rmfiles func_append rmfiles " $odir/$name $odir/${name}S.$objext" if test yes = "$fast_install" && test -n "$relink_command"; then func_append rmfiles " $odir/lt-$name" fi if test "X$noexename" != "X$name"; then func_append rmfiles " $odir/lt-$noexename.c" fi fi fi ;; esac func_show_eval "$RM $rmfiles" 'exit_status=1' done # Try to remove the $objdir's in the directories where we deleted files for dir in $rmdirs; do if test -d "$dir"; then func_show_eval "rmdir $dir >/dev/null 2>&1" fi done exit $exit_status } if test uninstall = "$opt_mode" || test clean = "$opt_mode"; then func_mode_uninstall ${1+"$@"} fi test -z "$opt_mode" && { help=$generic_help func_fatal_help "you must specify a MODE" } test -z "$exec_cmd" && \ func_fatal_help "invalid operation mode '$opt_mode'" if test -n "$exec_cmd"; then eval exec "$exec_cmd" exit $EXIT_FAILURE fi exit $exit_status # The TAGs below are defined such that we never get into a situation # where we disable both kinds of libraries. Given conflicting # choices, we go for a static library, that is the most portable, # since we can't tell whether shared libraries were disabled because # the user asked for that or because the platform doesn't support # them. This is particularly important on AIX, because we don't # support having both static and shared libraries enabled at the same # time on that platform, so we default to a shared-only configuration. # If a disable-shared tag is given, we'll fallback to a static-only # configuration. But we'll never go from static-only to shared-only. # ### BEGIN LIBTOOL TAG CONFIG: disable-shared build_libtool_libs=no build_old_libs=yes # ### END LIBTOOL TAG CONFIG: disable-shared # ### BEGIN LIBTOOL TAG CONFIG: disable-static build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` # ### END LIBTOOL TAG CONFIG: disable-static # Local Variables: # mode:shell-script # sh-indentation:2 # End: modsecurity-v3.0.6/CHANGES0000664000175000017500000004550014146026157016404 0ustar mhsvierulamhsvierulav3.0.6 - 2021-Nov-19 ------------------------------------- - Support configurable limit on depth of JSON parsing [@theMiddleBlue, @martinhsv] v3.0.5 - 2021-Jul-07 -------------------- - Handle URI received with uri-fragment [@martinhsv] - Having ARGS_NAMES, variables proxied [@zimmerle, @martinhsv, @KaNikita] - Use explicit path for cross-compile environments. [Issue #2485 - @dtoubelis] - Fix: FILES variable does not use multipart part name for key [Issue #2377 - @martinhsv] - Replaces put with setenv in SetEnv action [Issue #2469 - @martinhsv, @WGH-, @zimmerle] - Regression: Mark the test as failed in case of segfault. [@zimmerle] - Regex key selection should not be case-sensitive [Issue #2296, #2107, #2297 - @michaelgranzow-avi, @victorhora, @airween, @martinhsv, @zimmerle] - Fix: Only delete Multipart tmp files after rules have run [Issue #2427 - @martinhsv] - Fixed MatchedVar on chained rules [Issue #2423, #2435, #2436 - @michaelgranzow-avi] - Add support for new operator rxGlobal [@martinhsv] - Fix maxminddb link on FreeBSD [Issue #2131 - @granalberto, @zimmerle] - Fix IP address logging in Section A [Issue #2300 - @inaratech, @zavazingo, @martinhsv] - Adds support to lua 5.4 [@zimmerle] - GeoIP: switch to GEOIP_MEMORY_CACHE from GEOIP_INDEX_CACHE [Issues #2378, #2186 - @defanator] - rx: exit after full match (remove /g emulation); ensure capture groups occuring after unused groups still populate TX vars [Issue #2336 - @martinhsv] - Correct CHANGES file entry for #2234 - Add support to test framework for audit log content verification and add regression tests for issues #2000, #2196 - Support configurable limit on number of arguments processed [Issue #2234 - @jleproust, @martinhsv] - Multipart Content-Dispostion should allow field: filename*= [@martinhsv] - Fix rule-update-target for non-regex [Issue 2251 - @martinhsv] - Fix configure script when packaging for Buildroot [Issue 2235 - @frankvanbever] - modsecurity.pc.in: add Libs.private [Issue #1918, #2253 - @ffontaine, @Dridi, @victorhora] v3.0.4 - 2020-Jan-13 -------------------- - Fix: audit log data omitted when nolog,auditlog [@martinhsv] - Fix: ModSecurity 3.x inspectFile operator does not pass FILES_TMPNAMES parameter to lua engine [Issue #2204, #2205 - @kadirerdogan] - XML: Remove error messages from stderr [Issue #2010 - @JaiHarpalani, @zimmerle] - Filter comment or blank line for pmFromFile operator [Issue #1645 - @LeeShan87, @victorhora, @tdoubley] - Additional adjustment to Cookie header parsing [@martinhsv] - Restore chained rule part H logging to be more like 2.9 behaviour [Issue #2196 - @martinhsv] - Small fixes in log messages to help debugging the file upload [Issue #2130 - @airween] - Fix Cookie header parsing issues [Issue #2201 - @airween, @martinhsv] - Fix rules with nolog are logging to part H [Issue #2196 - @martinhsv] - Fix argument key-value pair parsing cases [Issue #1904 - @martinhsv] - Fix: audit log part for response body for JSON format to be E [Issue #2066 - @martinhsv, @zimmerle] - Make sure m_rulesMessages is filled after successfull match [Issue #2000, #2048 - @victorhora, @defanator] - Fix @pm lookup for possible matches on offset zero. [@zimmerle, @afoxdavidi, @martinhsv, @marshal09] - Regex lookup on the key name instead of COLLECTION:key [@rdiperri-yottaa, @danbiagini-work, @mmelo-yottaa, @zimmerle] - Missing throw in Operator::instantiate [Issue #2106 - @marduone] - Making block action execution dependent of the SecEngine status [Issue #2113, #2111 - @theMiddleBlue, @airween] - Making block action execution dependent of the SecEngine status [Issue #1960 - @theMiddleBlue, @zimmerle, @airween, @victorhora] - Having body limits to respect the rule engine state [@zimmerle] - Fix SecRuleUpdateTargetById does not match regular expressions [Issue #1872 - @zimmerle, @anush-cr, @victorhora, @j0k2r] - Adds missing check for runtime ctl:ruleRemoveByTag [Issue #2102, #2099 - @airween] - Adds a new operator verifySVNR that checks for Austrian social security numbers. [Issue #2063 - @Rufus125] - Fix variables output in debug logs [Issue #2057 - @jleproust] - Correct typo validade in log output [Issue #2059 - @nerrehmit] - fix/minor: Error encoding hexa decimal. [Issue #2068 - @tech-ozon-io] - Limit more log variables to 200 characters. [Issue #2073 - @jleproust] - parser: fix parsed file names [@zimmerle] - Allow empty anchored variable [Issue #2024 - @airween] - Fixed FILES_NAMES collection after the end of multipart parsing [Issue #2016 - @airween] - Fixed validateByteRange parsing method [Issue #2017 - @airween] - Removes a memory leak on the JSON parser [@zimmerle] - Enables LMDB on the regression tests. [Issue #2011, #2008 - @WGH-, @mdunc] - Fix: Extra whitespace in some configuration directives causing error [Issue #2006 - @porjo, @zimmerle] - Refactoring on Regex and SMatch classes. [@WGH-] - Fixed buffer overflow in Utils::Md5::hexdigest() [Issue #2002 - @defanator] - Implemented merge() method for ConfigInt, ConfigDouble, ConfigString [Issue #1990 - @defanator] - Adds initially support to the drop action. [@zimmerle] - Complete merging of particular rule properties [Issue #1978 - @defanator] - Replaces AC_CHECK_FILE with 'test -f' [Issue #1984 - @chuckwolber] - Fix inet addr handling on 64 bit big endian systems [Issue #1980 - @airween] - Fix tests on FreeBSD [Issue #1973 - @defanator] - Changes ENV test case to read the default MODSECURTIY env var [Issue #1969 - @zimmerle, @airween, @inittab] - Regression: Sets MODSECURITY env var during the tests execution [Issue #1969 - @zimmerle, @airween, @inittab] - Fix setenv action to strdup key=variable [@zimmerle] - Allow 0 length JSON requests. [Issue #1822 - @allanbomsft, @zimmerle, @victorhora, @marcstern] - Fix "make dist" target to include default configuration [Issue #1966 - @defanator] - Replaced log locking using mutex with fcntl lock [Issue #1949, #1927 - @Cloaked9000] - Correct the usage of modsecurity::Phases::NUMBER_OF_PHASES [Issue #1959 - @weliu] - Adds support to multiple ranges in ctl:ruleRemoveById [Issue #1956 - @theseion, @victorhora, @zimmerle] - Rule variable interpolation broken [Issue #1961 - @soonum, @zimmerle] - Make the boundary check less strict as per RFC2046 [Issue #1943 - @victorhora, @allanbomsft] - Fix buffer size for utf8toUnicode transformation [Issue #1208 - @katef, @victorhora] v3.0.3 - 2018-Nov-05 -------------------- - Fix double macros bug [Issue #1943 - @supplient, @zimmerle] - Override the default status code if not suitable to redirect action [Issue #1850 - @zimmerle, @victorhora] - parser: Fix the support for CRLF configuration files [Issue #1945 - @zimmerle, @defanator, @kjakub] - Organizes the server logs [0xb7c36 and 0x5ac20 - @zimmerle, @steven-j-wojcik] - m_lineNumber in Rule not mapping with the correct line number in file [Issue #1844 - @zimmerle, @victorhora, @xizeng] - Using shared_ptr instead of unique_ptr on rules exceptions [Issue #1697 - @zimmerle, @brianp9906, @victorhora, @LeSwiss, @defanator] - Changes debuglogs schema to avoid unecessary str allocation [0xb2840 - @zimmerle] - Fix the SecUnicodeMapFile and SecUnicodeCodePage [0x3094d - @zimmerle, @victorhora] - Changes the timing to save the rule message [0xca270 - @zimmerle] - Fix crash in msc_rules_add_file() when using disruptive action in chain [Issue #1849 - @victorhora, @zimmerle, @rperper] - Fix memory leak in AuditLog::init() [Issue #1897 - @weliu] - Fix RulesProperties::appendRules() [Issue #1901 - @steven-j-wojcik] - Fix RULE lookup in chained rules [0x3077c - @zimmerle] - @ipMatch "Could not add entry" on slash/32 notation in 2.9.0 [Issue #849 - @zimmerle, @dune73] - Using values after transformation at MATCHED_VARS [0x14316 - @zimmerle] - Adds support to UpdateActionById. [Issue #1800 - @zimmerle, @victorhora, @NisariAIT] - Add correct C function prototypes for msc_init and msc_create_rule_set [Issue #1922 - @steven-j-wojcik] - Allow LuaJIT 2.1 to be used [Issue #1909 - @victorhora, @mdunc] - Match m_id JSON log with RuleMessage and v2 format [Issue #1185 - @victorhora] - Adds support to setenv action. [Issue #1044 - @zimmerle] - Adds new transaction constructor that accepts the transaction id as parameter. [Issue #1627 - @defanator, @zimmerle] - Adds request IDs and URIs to the debug log [Issue #1627 - @defanator, @zimmerle] - Treating variables exception on load-time instead of run time. [0x028e0 and 0x275a1 - @zimmerle] - Fix: function m.setvar in Lua scripts and add testcases [Issue #1859 - @nowaits, @victorhora] - Fix SecResponseBodyAccess and ctl:requestBodyAccess directives [Issue #1531 - @victorhora, @defanator] - Fix OpenBSD build [Issue #1841 - @victorhora, @zimmerle, @juanfra684] - Fix parser to support GeoLookup with MaxMind [Issue #1884, #1895 - @victorhora, @everping] - parser: Fix simple quote setvar in the end of the line [Issue #1831 - @zimmerle, @csanders-git] - Fix pc file [Issue #1847 - @gquintard] - modsec_rules_check: uses the gnu `.la' instead of `.a' file [Issue #1853 - @ste7677, @victorhora, @zimmerle] - good practices: Initialize variables before use it [Issue #1889 - Marc Stern] - Fix utf-8 character encoding conversion [Issue #1794 - @tinselcity, @zimmerle] - Adds support for ctl:requestBodyProcessor=URLENCODED [Issue #1797 - @victorhora] - Add LUA compatibility for CentOS and try to use LuaJIT first if available [Issue #1622 - @victorhora, @dmitryzykov] - Allow LuaJIT to be used [Issue #1809 - @victorhora, @p0pr0ck5] - Implement support for Lua 5.1 [Issue #1809 - @p0pr0ck5, @victorhora] - Variable names must match fully, not partially. Match should be case insensitive. [Issue #1818, #1820, #1810, #1808 - @michaelgranzow-avi, @victorhora, @theMiddleBlue, @airween, @zimmerle, @LeeShan87] - Improves the performance while loading the rules [Issue #1735 - @zimmerle, @p0pr0ck5, @victorhora] - Allow empty strings to be evaluated by regex::searchAll [Issue #1799, #1785 - @victorhora, @XuanHuyDuong, @zimmerle] - Adds basic pkg-config info [Issue #1790 - @gquintard, @zimmerle] - Fixed LMDB collection errors [Issue #1787 - @airween, @zimmerle] - Fixed false positive MULTIPART_UNMATCHED_BOUNDARY errors [Issue #1747, #1924 - @airween, @victorhora, @defanator, @zimmerle] - Fix ip tree lookup on netmask content [Issue #1793 - @tinselcity, @zimmerle] - Changes the behavior of the default sec actions [Issue #1629 - @mirkodziadzka-avi, @zimmerle, @victorhora] - Refactoring on {global,ip,resources,session,tx,user} collections [Issue #1754, #1778 - @LeeShan87, @zimmerle, @victorhora, @wwd5613, @sobigboy] - Fix race condition in UniqueId::uniqueId() [Issue #1786 - @weliu] - Fix memory leak in error message for msc_rules_merge C APIs [Issue #1765 - @weliu] - Return false in SharedFiles::open() when an error happens [Issue #1783 - @weliu] - Use rvalue reference in ModSecurity::serverLog [Issue #1769 - @weliu] - Build System: Fix when multiple lines for curl version. [Issue #1771 - @Artistan] - Checks if response body inspection is enabled before process it [Issue #1643 - @zoltan-fedor, @dennus, @defanator, @zimmerle] - Code Cleanup. [Issue #1757, #1755, #1756, #1761 - @p0pr0ck5] - Fix setvar parsing of quoted data [Issue #1733, #1759, #1775 - @victorhora, @JaiHarpalani, @defanator] - Fix LDFLAGS for unit tests. [Issue #1758 - @smlx] - Adds time stamp back to the audit logs [Issue #1762 - @Pjack, @zimmerle] - Disables skip counter if debug log is disabled [@zimmerle] - Cosmetics: Represents amount of skipped rules without decimal [Issue #1737 - @p0pr0ck5] - Add missing escapeSeqDecode, urlEncode and trimLeft/Right tfns to parser [Issue #1752 - @victorhora] - Fix STATUS var parsing and accept STATUS_LINE var for v2 backward comp. [Issue #1738 - @victorhora] - Fix memory leak in modsecurity::utils::expandEnv() [Issue #1750 - @defanator] - Initialize m_dtd member in ValidateDTD class as NULL [Issue #1751 - @airween] - Fix broken @detectxss operator regression test case [Issue #1739 - @p0pr0ck5] - Fix utils::string::ssplit() to handle delimiter in the end of string [Issue #1743, #1744 - @defanator] - Fix variable FILES_TMPNAMES [Issue #1646, #1610 - @victorhora, @zimmerle, @defanator] - Fix memory leak in Collections [Issue #1729, #1730 - @defanator] v3.0.2 - 2018-Apr-03 -------------------- - Fix lib version information while generating the .so file [@gl1f1v21, @zimmerle] v3.0.1 - 2018-Apr-02 -------------------- - Adds support for ctl:ruleRemoveByTag [@zimmerle, @weliu] - Fix SecUploadDir configuration merge [Issue #1720 - @zimmerle, @gjvanetten] - Include all prerequisites for "make check" into dist archive [Issue #1716 - @defanator] - Fix: Reverse logic of checking output in @inspectFile [Issue #1715 - @defanator] - Adds support to libMaxMind [Issue #1307 - @zimmerle, @defanator] - Adds capture action to detectXSS [Issue #1698 - @victorhora] - Temporarily accept invalid MULTIPART_SEMICOLON_MISSING operator [Issue #1701 - @victorhora] - Adds capture action to detectSQLi [Issue #1698 - @zimmerle] - Adds capture action to rbl [Issue #1698 - @zimmerle] - Adds capture action to verifyCC [Issue #1698 - @michaelgranzow-avi, @zimmerle] - Adds capture action to verifySSN [Issue #1698 - @zimmerle] - Adds capture action to verifyCPF [Issue #1698 - @zimmerle] - Prettier error messages for unsupported configurations (UX) [@victorhora] - Add missing verify*** transformation statements to parser [Issue #1006 and #1007 - @victorhora] - Fix a set of compilation warnings [Issue #1650 - @zimmerle, @JayCase] - Check for disruptive action on SecDefaultAction. [Issue #1614 - @zimmerle, @michaelgranzow-avi] - Fix block-block infinite loop. [Issue #1614 - @zimmerle, @michaelgranzow-avi] - Correction remove_by_tag and remove_by_msg logic. [Issue #1636 - @Minasu] - Fix LMDB compile error [Issue #1691 - @airween] - Fix msc_who_am_i() to return pointer to a valid C string [Issue #1640 - @defanator] - Added some cosmetics to autoconf related code [Issue #1652 - @airween] - Fix "make dist" target to include necessary headers for Lua [Issue #1678 - @defanator] - Fix "include /foo/*.conf" for single matched object in directory [Issue #1677 - @defanator, @zimmerle] - Add missing Base64 transformation statements to parser [Issue #1632 - @victorhora, @zimmerle] - Fixed resource load on ip match from file [#1674 - @zimmerle, @StefaanSeys] - Fixed examples compilation while using disable-shared [#1670 - @zimmerle, @ivanbaldo] - Fixed compilation issue while xml is disabled [0x243028 - @zimmerle] - Having LDADD and LDFLAGS organized on Makefile.am [0xd0e85e - @zimmerle] - Checking std::deque size before use it [0x217cbf - @zimmerle, Yaron Dayagi] - perf improvement: Added the concept of RunTimeString and removed all run time parser. [0x3eae51 0x0320e0 0xb5688f 0xfe47a9 0xfa9842 0x1affc3 0x079de4 0xc7c04f 0x5262ea 0x01974a 0xd5ee1e - @zimmerle] - perf improvement: Checks debuglog level before format debug msg [0x42ee9 - @zimmerle] - perf. improvement/rx: Only compute dynamic regex in case of macro [0x91ff3 - @zimmerle] - Fix uri on the benchmark utility [0x63bec - @zimmerle] - disable Lua on systems with liblua5.1 [Issue #1639 - @victorhora, @defanator] v3.0.0 - 2017-Dec-13 -------------------- - Improvements on LUA build scripts and support for LUA 5.2. [Issue #1617 and #1622 - @victorhora, @zimmerle] - Fix compilation error with disable_debug_log flag [0xfd84e - Izik Abramov] - Improvements on the benchmark tool. [Issue #1615 - @zimmerle] - Fix lua headers on the build scripts [Issue #1621 - @Minasu] - Refactoring on the JSON parser. [Issue #1576, #1577 - Tobias Gutknecht, @zimmerle, @victorhora, @marcstern] - Adds support to WEBAPPID variable. [Issue #1027 - @zimmerle, @victorhora] - Adds support for SecWebAppId. [Issue #1442 - @zimmerle, @victorhora] - Adds support for SecRuleRemoveByTag. [Issue #1476 - @zimmerle, @victorhora] - Adds support for update target by message. [Issue #1474 - @zimmerle, @victorhora] - Adds support to SecRuleScript directive. [Issue #994 - @zimmerle] - Adds support for the exec action. [Issue #1050 - @zimmerle] - Adds support for transformations inside Lua engine [Issue #994 - @zimmerle] - Adds initial support for Lua engine. [Issue #994 - @zimmerle] - Adds support for @inspectFile operator. [Issue #999 - @zimmerle, @victorhora] - Adds support for RESOURCE variable collection. [Issue #1014 - @zimmerle, @victorhora] - Adds support for @fuzzyHash operator. [Issue #997 - @zimmerle] - Fix build on non x86 arch build [Issue #1598 - @athmane] - Fix memory issue while changing rule target dynamic [Issue #1590 - @zimmerle, @slabber] - Fix log while displaying the name of a dict selection by regex. [@zimmerle] - Setting http response code on the auditlog. [Issue #1592 - @zimmerle] - Refactoring on RuleMessage class, now accepting http code as parameter. [@zimmerle] - Having disruptive msgs as disruptive [instead of warnings] on audit log [Issue #1592 - @zimmerle, @nobodysz] - Parser: Pipes are no longer welcomed inside regex dict element selection. [Issue #1591 - @zimmerle, @slabber] - Avoids unicode initialization on every rules object [Issue #1563 - @zimmerle, @Tiki-God, @sethinsd, @Cloaked9000, @AnoopAlias, @intelbg] - Makes clear to the user whenever the audit log is empty due to missing JSON support. [Issue #1585 - @zimmerle] - Makes auditlog more verbose on debug logs [Issue: #1559 - @zimmerle] - Enable support for AuditLogFormat Issue: #1583, #1493 and #1453 - @victorhora] - Adds macro expansion for @rx operator [Issue: #1528, #1536 - @asterite3, @zimmerle] - Consideres under quoted variable while loading the rules. [Felipe Zimmerle/@zimmerle, Victor Hora/@victorhora] - Store the connection and url parameters in std::string [Issue: #1571 - @majordaw] - Eliminate some reorder and sign warnings [Issue: #1572 - Dávid Major/@majordaw] - Makes parallel logging to work when SELinux is enabled. [Issue: #1562 - David Buckle/@met3or] - Adds possibility to run the pm operator inside a mutex to avoid concurrent access while working on a thread environment. This option is a compilation flag. [Felipe Zimmerle/@zimmerle] v3.0.0-rc1 - 2017-Aug-28 ------------------------ Very first public version. modsecurity-v3.0.6/.gitmodules0000664000175000017500000000062414146026157017564 0ustar mhsvierulamhsvierula[submodule "test/test-cases/secrules-language-tests"] path = test/test-cases/secrules-language-tests url = https://github.com/SpiderLabs/secrules-language-tests [submodule "others/libinjection"] path = others/libinjection url = https://github.com/libinjection/libinjection.git [submodule "bindings/python"] path = bindings/python url = https://github.com/SpiderLabs/ModSecurity-Python-bindings.git modsecurity-v3.0.6/Makefile.in0000664000175000017500000053177214146027125017465 0ustar mhsvierulamhsvierula# Makefile.in generated by automake 1.15.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2017 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@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@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 = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/build/ax_prog_doxygen.m4 \ $(top_srcdir)/build/ax_valgrind_check.m4 \ $(top_srcdir)/build/curl.m4 $(top_srcdir)/build/libgeoip.m4 \ $(top_srcdir)/build/libmaxmind.m4 \ $(top_srcdir)/build/libtool.m4 $(top_srcdir)/build/libxml.m4 \ $(top_srcdir)/build/lmdb.m4 $(top_srcdir)/build/ltoptions.m4 \ $(top_srcdir)/build/ltsugar.m4 \ $(top_srcdir)/build/ltversion.m4 \ $(top_srcdir)/build/lt~obsolete.m4 $(top_srcdir)/build/lua.m4 \ $(top_srcdir)/build/pcre.m4 $(top_srcdir)/build/ssdeep.m4 \ $(top_srcdir)/build/yajl.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \ $(am__configure_deps) $(am__DIST_COMMON) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/config.h CONFIG_CLEAN_FILES = modsecurity.pc CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ ctags-recursive dvi-recursive html-recursive info-recursive \ install-data-recursive install-dvi-recursive \ install-exec-recursive install-html-recursive \ install-info-recursive install-pdf-recursive \ install-ps-recursive install-recursive installcheck-recursive \ installdirs-recursive pdf-recursive ps-recursive \ tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac 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__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(pkgconfigdir)" DATA = $(pkgconfig_DATA) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive am__recursive_targets = \ $(RECURSIVE_TARGETS) \ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ cscope check recheck distdir dist dist-all distcheck am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags CSCOPE = cscope am__tty_colors_dummy = \ mgn= red= grn= lgn= blu= brg= std=; \ am__color_tests=no am__tty_colors = { \ $(am__tty_colors_dummy); \ if test "X$(AM_COLOR_TESTS)" = Xno; then \ am__color_tests=no; \ elif test "X$(AM_COLOR_TESTS)" = Xalways; then \ am__color_tests=yes; \ elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \ am__color_tests=yes; \ fi; \ if test $$am__color_tests = yes; then \ red=''; \ grn=''; \ lgn=''; \ blu=''; \ mgn=''; \ brg=''; \ std=''; \ fi; \ } am__recheck_rx = ^[ ]*:recheck:[ ]* am__global_test_result_rx = ^[ ]*:global-test-result:[ ]* am__copy_in_global_log_rx = ^[ ]*:copy-in-global-log:[ ]* # A command that, given a newline-separated list of test names on the # standard input, print the name of the tests that are to be re-run # upon "make recheck". am__list_recheck_tests = $(AWK) '{ \ recheck = 1; \ while ((rc = (getline line < ($$0 ".trs"))) != 0) \ { \ if (rc < 0) \ { \ if ((getline line2 < ($$0 ".log")) < 0) \ recheck = 0; \ break; \ } \ else if (line ~ /$(am__recheck_rx)[nN][Oo]/) \ { \ recheck = 0; \ break; \ } \ else if (line ~ /$(am__recheck_rx)[yY][eE][sS]/) \ { \ break; \ } \ }; \ if (recheck) \ print $$0; \ close ($$0 ".trs"); \ close ($$0 ".log"); \ }' # A command that, given a newline-separated list of test names on the # standard input, create the global log from their .trs and .log files. am__create_global_log = $(AWK) ' \ function fatal(msg) \ { \ print "fatal: making $@: " msg | "cat >&2"; \ exit 1; \ } \ function rst_section(header) \ { \ print header; \ len = length(header); \ for (i = 1; i <= len; i = i + 1) \ printf "="; \ printf "\n\n"; \ } \ { \ copy_in_global_log = 1; \ global_test_result = "RUN"; \ while ((rc = (getline line < ($$0 ".trs"))) != 0) \ { \ if (rc < 0) \ fatal("failed to read from " $$0 ".trs"); \ if (line ~ /$(am__global_test_result_rx)/) \ { \ sub("$(am__global_test_result_rx)", "", line); \ sub("[ ]*$$", "", line); \ global_test_result = line; \ } \ else if (line ~ /$(am__copy_in_global_log_rx)[nN][oO]/) \ copy_in_global_log = 0; \ }; \ if (copy_in_global_log) \ { \ rst_section(global_test_result ": " $$0); \ while ((rc = (getline line < ($$0 ".log"))) != 0) \ { \ if (rc < 0) \ fatal("failed to read from " $$0 ".log"); \ print line; \ }; \ printf "\n"; \ }; \ close ($$0 ".trs"); \ close ($$0 ".log"); \ }' # Restructured Text title. am__rst_title = { sed 's/.*/ & /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; } # Solaris 10 'make', and several other traditional 'make' implementations, # pass "-e" to $(SHELL), and POSIX 2008 even requires this. Work around it # by disabling -e (using the XSI extension "set +e") if it's set. am__sh_e_setup = case $$- in *e*) set +e;; esac # Default flags passed to test drivers. am__common_driver_flags = \ --color-tests "$$am__color_tests" \ --enable-hard-errors "$$am__enable_hard_errors" \ --expect-failure "$$am__expect_failure" # To be inserted before the command running the test. Creates the # directory for the log if needed. Stores in $dir the directory # containing $f, in $tst the test, in $log the log. Executes the # developer- defined test setup AM_TESTS_ENVIRONMENT (if any), and # passes TESTS_ENVIRONMENT. Set up options for the wrapper that # will run the test scripts (or their associated LOG_COMPILER, if # thy have one). am__check_pre = \ $(am__sh_e_setup); \ $(am__vpath_adj_setup) $(am__vpath_adj) \ $(am__tty_colors); \ srcdir=$(srcdir); export srcdir; \ case "$@" in \ */*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;; \ *) am__odir=.;; \ esac; \ test "x$$am__odir" = x"." || test -d "$$am__odir" \ || $(MKDIR_P) "$$am__odir" || exit $$?; \ if test -f "./$$f"; then dir=./; \ elif test -f "$$f"; then dir=; \ else dir="$(srcdir)/"; fi; \ tst=$$dir$$f; log='$@'; \ if test -n '$(DISABLE_HARD_ERRORS)'; then \ am__enable_hard_errors=no; \ else \ am__enable_hard_errors=yes; \ fi; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$f[\ \ ]* | *[\ \ ]$$dir$$f[\ \ ]*) \ am__expect_failure=yes;; \ *) \ am__expect_failure=no;; \ esac; \ $(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT) # A shell command to get the names of the tests scripts with any registered # extension removed (i.e., equivalently, the names of the test logs, with # the '.log' extension removed). The result is saved in the shell variable # '$bases'. This honors runtime overriding of TESTS and TEST_LOGS. Sadly, # we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)", # since that might cause problem with VPATH rewrites for suffix-less tests. # See also 'test-harness-vpath-rewrite.sh' and 'test-trs-basic.sh'. am__set_TESTS_bases = \ bases='$(TEST_LOGS)'; \ bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \ bases=`echo $$bases` RECHECK_LOGS = $(TEST_LOGS) TEST_SUITE_LOG = test-suite.log TEST_EXTENSIONS = @EXEEXT@ .test LOG_COMPILE = $(LOG_COMPILER) $(AM_LOG_FLAGS) $(LOG_FLAGS) am__set_b = \ case '$@' in \ */*) \ case '$*' in \ */*) b='$*';; \ *) b=`echo '$@' | sed 's/\.log$$//'`; \ esac;; \ *) \ b='$*';; \ esac am__test_logs1 = $(TESTS:=.log) am__test_logs2 = $(am__test_logs1:@EXEEXT@.log=.log) TEST_LOGS = $(am__test_logs2:.test.log=.log) TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \ $(TEST_LOG_FLAGS) DIST_SUBDIRS = $(SUBDIRS) am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/modsecurity.pc.in \ AUTHORS ar-lib compile config.guess config.sub depcomp \ install-sh ltmain.sh missing test-driver ylwrap DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ if test -d "$(distdir)"; then \ find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ && rm -rf "$(distdir)" \ || { sleep 5 && rm -rf "$(distdir)"; }; \ else :; fi am__post_remove_distdir = $(am__remove_distdir) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best DIST_TARGETS = dist-gzip distuninstallcheck_listfiles = find . -type f -print am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BISON = @BISON@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CURL_CFLAGS = @CURL_CFLAGS@ CURL_CONFIG = @CURL_CONFIG@ CURL_CPPFLAGS = @CURL_CPPFLAGS@ CURL_DISPLAY = @CURL_DISPLAY@ CURL_FOUND = @CURL_FOUND@ CURL_LDADD = @CURL_LDADD@ CURL_LDFLAGS = @CURL_LDFLAGS@ CURL_USES_GNUTLS = @CURL_USES_GNUTLS@ CURL_VERSION = @CURL_VERSION@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DOXYGEN_PAPER_SIZE = @DOXYGEN_PAPER_SIZE@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ DX_CONFIG = @DX_CONFIG@ DX_DOCDIR = @DX_DOCDIR@ DX_DOT = @DX_DOT@ DX_DOXYGEN = @DX_DOXYGEN@ DX_DVIPS = @DX_DVIPS@ DX_EGREP = @DX_EGREP@ DX_ENV = @DX_ENV@ DX_FLAG_chi = @DX_FLAG_chi@ DX_FLAG_chm = @DX_FLAG_chm@ DX_FLAG_doc = @DX_FLAG_doc@ DX_FLAG_dot = @DX_FLAG_dot@ DX_FLAG_html = @DX_FLAG_html@ DX_FLAG_man = @DX_FLAG_man@ DX_FLAG_pdf = @DX_FLAG_pdf@ DX_FLAG_ps = @DX_FLAG_ps@ DX_FLAG_rtf = @DX_FLAG_rtf@ DX_FLAG_xml = @DX_FLAG_xml@ DX_HHC = @DX_HHC@ DX_LATEX = @DX_LATEX@ DX_MAKEINDEX = @DX_MAKEINDEX@ DX_PDFLATEX = @DX_PDFLATEX@ DX_PERL = @DX_PERL@ DX_PROJECT = @DX_PROJECT@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ENABLE_VALGRIND_drd = @ENABLE_VALGRIND_drd@ ENABLE_VALGRIND_helgrind = @ENABLE_VALGRIND_helgrind@ ENABLE_VALGRIND_memcheck = @ENABLE_VALGRIND_memcheck@ ENABLE_VALGRIND_sgcheck = @ENABLE_VALGRIND_sgcheck@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FLEX = @FLEX@ GEOIP_CFLAGS = @GEOIP_CFLAGS@ GEOIP_DISPLAY = @GEOIP_DISPLAY@ GEOIP_FOUND = @GEOIP_FOUND@ GEOIP_LDADD = @GEOIP_LDADD@ GEOIP_LDFLAGS = @GEOIP_LDFLAGS@ GEOIP_LIBS = @GEOIP_LIBS@ GEOIP_VERSION = @GEOIP_VERSION@ GLOBAL_CFLAGS = @GLOBAL_CFLAGS@ GLOBAL_CPPFLAGS = @GLOBAL_CPPFLAGS@ GLOBAL_LDADD = @GLOBAL_LDADD@ 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@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBXML2_CFLAGS = @LIBXML2_CFLAGS@ LIBXML2_CONFIG = @LIBXML2_CONFIG@ LIBXML2_CPPFLAGS = @LIBXML2_CPPFLAGS@ LIBXML2_DISPLAY = @LIBXML2_DISPLAY@ LIBXML2_FOUND = @LIBXML2_FOUND@ LIBXML2_LDADD = @LIBXML2_LDADD@ LIBXML2_LDFLAGS = @LIBXML2_LDFLAGS@ LIBXML2_VERSION = @LIBXML2_VERSION@ LIPO = @LIPO@ LMDB_CFLAGS = @LMDB_CFLAGS@ LMDB_DISPLAY = @LMDB_DISPLAY@ LMDB_FOUND = @LMDB_FOUND@ LMDB_LDADD = @LMDB_LDADD@ LMDB_LDFLAGS = @LMDB_LDFLAGS@ LMDB_LIBS = @LMDB_LIBS@ LMDB_VERSION = @LMDB_VERSION@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ LUA_CFLAGS = @LUA_CFLAGS@ LUA_DISPLAY = @LUA_DISPLAY@ LUA_FOUND = @LUA_FOUND@ LUA_LDADD = @LUA_LDADD@ LUA_LDFLAGS = @LUA_LDFLAGS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAXMIND_CFLAGS = @MAXMIND_CFLAGS@ MAXMIND_DISPLAY = @MAXMIND_DISPLAY@ MAXMIND_FOUND = @MAXMIND_FOUND@ MAXMIND_LDADD = @MAXMIND_LDADD@ MAXMIND_LDFLAGS = @MAXMIND_LDFLAGS@ MAXMIND_LIBS = @MAXMIND_LIBS@ MAXMIND_VERSION = @MAXMIND_VERSION@ MKDIR_P = @MKDIR_P@ MODSEC_MUTEX_ON_PM = @MODSEC_MUTEX_ON_PM@ MODSEC_NO_LOGS = @MODSEC_NO_LOGS@ MSC_BASE_DIR = @MSC_BASE_DIR@ MSC_GIT_VERSION = @MSC_GIT_VERSION@ MSC_VERSION = @MSC_VERSION@ MSC_VERSION_INFO = @MSC_VERSION_INFO@ MSC_VERSION_WITH_PATCHLEVEL = @MSC_VERSION_WITH_PATCHLEVEL@ 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_LD_PATH = @PCRE_LD_PATH@ PCRE_VERSION = @PCRE_VERSION@ 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@ SSDEEP_CFLAGS = @SSDEEP_CFLAGS@ SSDEEP_DISPLAY = @SSDEEP_DISPLAY@ SSDEEP_FOUND = @SSDEEP_FOUND@ SSDEEP_LDADD = @SSDEEP_LDADD@ SSDEEP_LDFLAGS = @SSDEEP_LDFLAGS@ STRIP = @STRIP@ VALGRIND = @VALGRIND@ VALGRIND_ENABLED = @VALGRIND_ENABLED@ VERSION = @VERSION@ YACC = @YACC@ YACC_INST = @YACC_INST@ YAJL_CFLAGS = @YAJL_CFLAGS@ YAJL_DISPLAY = @YAJL_DISPLAY@ YAJL_FOUND = @YAJL_FOUND@ YAJL_LDADD = @YAJL_LDADD@ YAJL_LDFLAGS = @YAJL_LDFLAGS@ YAJL_LIBS = @YAJL_LIBS@ YAJL_VERSION = @YAJL_VERSION@ YFLAGS = @YFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ 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@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ 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@ valgrind_enabled_tools = @valgrind_enabled_tools@ valgrind_tools = @valgrind_tools@ SUBDIRS = \ others \ src \ doc \ tools \ $(MAYBE_EXAMPLES) \ $(MAYBE_TEST) # make clean CLEANFILES = ACLOCAL_AMFLAGS = -I build # make maintainer-clean MAINTAINERCLEANFILES = \ aclocal.m4 \ ar-lib \ build/libtool.m4 \ build/lt~obsolete.m4 \ build/ltoptions.m4 \ build/ltsugar.m4 \ build/ltversion.m4 \ coding-style.txt \ compile \ config.guess \ config.sub \ configure \ cppcheck.txt \ depcomp \ install-sh \ ltmain.sh \ Makefile.in \ missing \ test/modsec-shared-collections \ test/modsec-shared-collections-lock \ test-suite-drd.log \ test-suite-helgrind.log \ test-suite-memcheck.log \ ylwrap VALGRIND_SUPPRESSIONS_FILES = valgrind_suppressions.txt LOG_DRIVER = env $(SHELL) $(top_srcdir)/test/custom-test-driver AM_TESTS_ENVIRONMENT = AUTOMAKE_TESTS=true; export AUTOMAKE_TESTS; LOG_COMPILER = test/test-suite.sh # for i in `find test/test-cases -iname *.json`; do echo TESTS+=$i; done TESTS = test/test-cases/regression/action-allow.json \ test/test-cases/regression/action-block.json \ test/test-cases/regression/action-ctl_request_body_access.json \ test/test-cases/regression/action-ctl_request_body_processor.json \ test/test-cases/regression/action-ctl_request_body_processor_urlencoded.json \ test/test-cases/regression/action-ctl_rule_engine.json \ test/test-cases/regression/action-ctl_rule_remove_by_id.json \ test/test-cases/regression/action-ctl_rule_remove_by_tag.json \ test/test-cases/regression/action-ctl_rule_remove_target_by_id.json \ test/test-cases/regression/action-ctl_rule_remove_target_by_tag.json \ test/test-cases/regression/action-disruptive.json \ test/test-cases/regression/action-exec.json \ test/test-cases/regression/action-id.json \ test/test-cases/regression/action-initcol.json \ test/test-cases/regression/action-msg.json \ test/test-cases/regression/action-setenv.json \ test/test-cases/regression/action-setrsc.json \ test/test-cases/regression/action-setsid.json \ test/test-cases/regression/action-setuid.json \ test/test-cases/regression/actions.json \ test/test-cases/regression/action-skip.json \ test/test-cases/regression/action-tag.json \ test/test-cases/regression/action-tnf-base64.json \ test/test-cases/regression/action-xmlns.json \ test/test-cases/regression/auditlog.json \ test/test-cases/regression/collection-case-insensitive.json \ test/test-cases/regression/collection-lua.json \ test/test-cases/regression/collection-regular_expression_selection.json \ test/test-cases/regression/collection-resource.json \ test/test-cases/regression/collection-tx.json \ test/test-cases/regression/collection-tx-with-macro.json \ test/test-cases/regression/config-body_limits.json \ test/test-cases/regression/config-calling_phases_by_name.json \ test/test-cases/regression/config-include-bad.json \ test/test-cases/regression/config-include.json \ test/test-cases/regression/config-remove_by_id.json \ test/test-cases/regression/config-remove_by_msg.json \ test/test-cases/regression/config-remove_by_tag.json \ test/test-cases/regression/config-response_type.json \ test/test-cases/regression/config-secdefaultaction.json \ test/test-cases/regression/config-secremoterules.json \ test/test-cases/regression/config-update-action-by-id.json \ test/test-cases/regression/config-update-target-by-id.json \ test/test-cases/regression/config-update-target-by-msg.json \ test/test-cases/regression/config-update-target-by-tag.json \ test/test-cases/regression/config-xml_external_entity.json \ test/test-cases/regression/debug_log.json \ test/test-cases/regression/directive-sec_rule_script.json \ test/test-cases/regression/issue-1152.json \ test/test-cases/regression/issue-1528.json \ test/test-cases/regression/issue-1565.json \ test/test-cases/regression/issue-1576.json \ test/test-cases/regression/issue-1591.json \ test/test-cases/regression/issue-1725.json \ test/test-cases/regression/issue-1743.json \ test/test-cases/regression/issue-1785.json \ test/test-cases/regression/issue-1812.json \ test/test-cases/regression/issue-1831.json \ test/test-cases/regression/issue-1844.json \ test/test-cases/regression/issue-1850.json \ test/test-cases/regression/issue-1941.json \ test/test-cases/regression/issue-1943.json \ test/test-cases/regression/issue-1956.json \ test/test-cases/regression/issue-1960.json \ test/test-cases/regression/issue-2099.json \ test/test-cases/regression/issue-2000.json \ test/test-cases/regression/issue-2111.json \ test/test-cases/regression/issue-2196.json \ test/test-cases/regression/issue-2423-msg-in-chain.json \ test/test-cases/regression/issue-2427.json \ test/test-cases/regression/issue-2296.json \ test/test-cases/regression/issue-394.json \ test/test-cases/regression/issue-849.json \ test/test-cases/regression/issue-960.json \ test/test-cases/regression/misc.json \ test/test-cases/regression/misc-variable-under-quotes.json \ test/test-cases/regression/offset-variable.json \ test/test-cases/regression/operator-detectsqli.json \ test/test-cases/regression/operator-detectxss.json \ test/test-cases/regression/operator-fuzzyhash.json \ test/test-cases/regression/operator-inpectFile.json \ test/test-cases/regression/operator-ipMatchFromFile.json \ test/test-cases/regression/operator-pm.json \ test/test-cases/regression/operator-rx.json \ test/test-cases/regression/operator-rxGlobal.json \ test/test-cases/regression/operator-UnconditionalMatch.json \ test/test-cases/regression/operator-validate-byte-range.json \ test/test-cases/regression/operator-verifycc.json \ test/test-cases/regression/operator-verifycpf.json \ test/test-cases/regression/operator-verifyssn.json \ test/test-cases/regression/operator-verifysvnr.json \ test/test-cases/regression/request-body-parser-json.json \ test/test-cases/regression/request-body-parser-multipart-crlf.json \ test/test-cases/regression/request-body-parser-multipart.json \ test/test-cases/regression/request-body-parser-xml.json \ test/test-cases/regression/request-body-parser-xml-validade-dtd.json \ test/test-cases/regression/rule-920120.json \ test/test-cases/regression/rule-920200.json \ test/test-cases/regression/rule-920274.json \ test/test-cases/regression/secaction.json \ test/test-cases/regression/secargumentslimit.json \ test/test-cases/regression/sec_component_signature.json \ test/test-cases/regression/secmarker.json \ test/test-cases/regression/secruleengine.json \ test/test-cases/regression/transformation-none.json \ test/test-cases/regression/transformations.json \ test/test-cases/regression/variable-ARGS_COMBINED_SIZE.json \ test/test-cases/regression/variable-ARGS_GET.json \ test/test-cases/regression/variable-ARGS_GET_NAMES.json \ test/test-cases/regression/variable-ARGS.json \ test/test-cases/regression/variable-ARGS_NAMES.json \ test/test-cases/regression/variable-ARGS_POST.json \ test/test-cases/regression/variable-ARGS_POST_NAMES.json \ test/test-cases/regression/variable-AUTH_TYPE.json \ test/test-cases/regression/variable-DURATION.json \ test/test-cases/regression/variable-ENV.json \ test/test-cases/regression/variable-FILES_COMBINED_SIZE.json \ test/test-cases/regression/variable-FILES.json \ test/test-cases/regression/variable-FILES_NAMES.json \ test/test-cases/regression/variable-FILES_SIZES.json \ test/test-cases/regression/variable-FULL_REQUEST.json \ test/test-cases/regression/variable-FULL_REQUEST_LENGTH.json \ test/test-cases/regression/variable-GEO.json \ test/test-cases/regression/variable-HIGHEST_SEVERITY.json \ test/test-cases/regression/variable-INBOUND_DATA_ERROR.json \ test/test-cases/regression/variable-MATCHED_VAR.json \ test/test-cases/regression/variable-MATCHED_VAR_NAME.json \ test/test-cases/regression/variable-MATCHED_VARS.json \ test/test-cases/regression/variable-MATCHED_VARS_NAMES.json \ test/test-cases/regression/variable-MODSEC_BUILD.json \ test/test-cases/regression/variable-MULTIPART_CRLF_LF_LINES.json \ test/test-cases/regression/variable-MULTIPART_FILENAME.json \ test/test-cases/regression/variable-MULTIPART_INVALID_HEADER_FOLDING.json \ test/test-cases/regression/variable-MULTIPART_NAME.json \ test/test-cases/regression/variable-MULTIPART_STRICT_ERROR.json \ test/test-cases/regression/variable-MULTIPART_UNMATCHED_BOUNDARY.json \ test/test-cases/regression/variable-OUTBOUND_DATA_ERROR.json \ test/test-cases/regression/variable-PATH_INFO.json \ test/test-cases/regression/variable-QUERY_STRING.json \ test/test-cases/regression/variable-REMOTE_ADDR.json \ test/test-cases/regression/variable-REMOTE_HOST.json \ test/test-cases/regression/variable-REMOTE_PORT.json \ test/test-cases/regression/variable-REMOTE_USER.json \ test/test-cases/regression/variable-REQBODY_PROCESSOR_ERROR.json \ test/test-cases/regression/variable-REQBODY_PROCESSOR.json \ test/test-cases/regression/variable-REQUEST_BASENAME.json \ test/test-cases/regression/variable-REQUEST_BODY.json \ test/test-cases/regression/variable-REQUEST_BODY_LENGTH.json \ test/test-cases/regression/variable-REQUEST_COOKIES.json \ test/test-cases/regression/variable-REQUEST_COOKIES_NAMES.json \ test/test-cases/regression/variable-REQUEST_FILENAME.json \ test/test-cases/regression/variable-REQUEST_HEADERS.json \ test/test-cases/regression/variable-REQUEST_HEADERS_NAMES.json \ test/test-cases/regression/variable-REQUEST_LINE.json \ test/test-cases/regression/variable-REQUEST_METHOD.json \ test/test-cases/regression/variable-REQUEST_PROTOCOL.json \ test/test-cases/regression/variable-REQUEST_URI.json \ test/test-cases/regression/variable-REQUEST_URI_RAW.json \ test/test-cases/regression/variable-RESPONSE_BODY.json \ test/test-cases/regression/variable-RESPONSE_CONTENT_LENGTH.json \ test/test-cases/regression/variable-RESPONSE_CONTENT_TYPE.json \ test/test-cases/regression/variable-RESPONSE_HEADERS.json \ test/test-cases/regression/variable-RESPONSE_HEADERS_NAMES.json \ test/test-cases/regression/variable-RESPONSE_PROTOCOL.json \ test/test-cases/regression/variable-RULE.json \ test/test-cases/regression/variable-SERVER_ADDR.json \ test/test-cases/regression/variable-SERVER_NAME.json \ test/test-cases/regression/variable-SERVER_PORT.json \ test/test-cases/regression/variable-SESSIONID.json \ test/test-cases/regression/variable-STATUS.json \ test/test-cases/regression/variable-TIME_DAY.json \ test/test-cases/regression/variable-TIME_EPOCH.json \ test/test-cases/regression/variable-TIME_HOUR.json \ test/test-cases/regression/variable-TIME.json \ test/test-cases/regression/variable-TIME_MIN.json \ test/test-cases/regression/variable-TIME_MON.json \ test/test-cases/regression/variable-TIME_SEC.json \ test/test-cases/regression/variable-TIME_WDAY.json \ test/test-cases/regression/variable-TIME_YEAR.json \ test/test-cases/regression/variable-TX.json \ test/test-cases/regression/variable-UNIQUE_ID.json \ test/test-cases/regression/variable-URLENCODED_ERROR.json \ test/test-cases/regression/variable-USERID.json \ test/test-cases/regression/variable-variation-count.json \ test/test-cases/regression/variable-variation-exclusion.json \ test/test-cases/regression/variable-WEBAPPID.json \ test/test-cases/regression/variable-WEBSERVER_ERROR_LOG.json \ test/test-cases/secrules-language-tests/operators/beginsWith.json \ test/test-cases/secrules-language-tests/operators/contains.json \ test/test-cases/secrules-language-tests/operators/containsWord.json \ test/test-cases/secrules-language-tests/operators/detectSQLi.json \ test/test-cases/secrules-language-tests/operators/detectXSS.json \ test/test-cases/secrules-language-tests/operators/endsWith.json \ test/test-cases/secrules-language-tests/operators/eq.json \ test/test-cases/secrules-language-tests/operators/ge.json \ test/test-cases/secrules-language-tests/operators/geoLookup.json \ test/test-cases/secrules-language-tests/operators/gt.json \ test/test-cases/secrules-language-tests/operators/ipMatch.json \ test/test-cases/secrules-language-tests/operators/le.json \ test/test-cases/secrules-language-tests/operators/lt.json \ test/test-cases/secrules-language-tests/operators/noMatch.json \ test/test-cases/secrules-language-tests/operators/pmFromFile.json \ test/test-cases/secrules-language-tests/operators/pm.json \ test/test-cases/secrules-language-tests/operators/rx.json \ test/test-cases/secrules-language-tests/operators/rxGlobal.json \ test/test-cases/secrules-language-tests/operators/streq.json \ test/test-cases/secrules-language-tests/operators/strmatch.json \ test/test-cases/secrules-language-tests/operators/unconditionalMatch.json \ test/test-cases/secrules-language-tests/operators/validateByteRange.json \ test/test-cases/secrules-language-tests/operators/validateUrlEncoding.json \ test/test-cases/secrules-language-tests/operators/validateUtf8Encoding.json \ test/test-cases/secrules-language-tests/operators/verifyCC.json \ test/test-cases/secrules-language-tests/operators/verifycpf.json \ test/test-cases/secrules-language-tests/operators/verifyssn.json \ test/test-cases/secrules-language-tests/operators/verifysvnr.json \ test/test-cases/secrules-language-tests/operators/within.json \ test/test-cases/secrules-language-tests/transformations/base64DecodeExt.json \ test/test-cases/secrules-language-tests/transformations/base64Decode.json \ test/test-cases/secrules-language-tests/transformations/base64Encode.json \ test/test-cases/secrules-language-tests/transformations/cmdLine.json \ test/test-cases/secrules-language-tests/transformations/compressWhitespace.json \ test/test-cases/secrules-language-tests/transformations/cssDecode.json \ test/test-cases/secrules-language-tests/transformations/escapeSeqDecode.json \ test/test-cases/secrules-language-tests/transformations/hexDecode.json \ test/test-cases/secrules-language-tests/transformations/hexEncode.json \ test/test-cases/secrules-language-tests/transformations/htmlEntityDecode.json \ test/test-cases/secrules-language-tests/transformations/jsDecode.json \ test/test-cases/secrules-language-tests/transformations/length.json \ test/test-cases/secrules-language-tests/transformations/lowercase.json \ test/test-cases/secrules-language-tests/transformations/md5.json \ test/test-cases/secrules-language-tests/transformations/normalisePath.json \ test/test-cases/secrules-language-tests/transformations/normalisePathWin.json \ test/test-cases/secrules-language-tests/transformations/parityEven7bit.json \ test/test-cases/secrules-language-tests/transformations/parityOdd7bit.json \ test/test-cases/secrules-language-tests/transformations/parityZero7bit.json \ test/test-cases/secrules-language-tests/transformations/removeCommentsChar.json \ test/test-cases/secrules-language-tests/transformations/removeComments.json \ test/test-cases/secrules-language-tests/transformations/removeNulls.json \ test/test-cases/secrules-language-tests/transformations/removeWhitespace.json \ test/test-cases/secrules-language-tests/transformations/replaceComments.json \ test/test-cases/secrules-language-tests/transformations/replaceNulls.json \ test/test-cases/secrules-language-tests/transformations/sha1.json \ test/test-cases/secrules-language-tests/transformations/sqlHexDecode.json \ test/test-cases/secrules-language-tests/transformations/trim.json \ test/test-cases/secrules-language-tests/transformations/trimLeft.json \ test/test-cases/secrules-language-tests/transformations/trimRight.json \ test/test-cases/secrules-language-tests/transformations/urlDecode.json \ test/test-cases/secrules-language-tests/transformations/urlDecodeUni.json \ test/test-cases/secrules-language-tests/transformations/urlEncode.json \ test/test-cases/secrules-language-tests/transformations/utf8toUnicode.json pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = modsecurity.pc EXTRA_DIST = modsecurity.pc.in \ modsecurity.conf-recommended \ unicode.mapping all: all-recursive .SUFFIXES: .SUFFIXES: .log .test .test$(EXEEXT) .trs am--refresh: Makefile @: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \ $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ echo ' $(SHELL) ./config.status'; \ $(SHELL) ./config.status;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(top_srcdir)/configure: $(am__configure_deps) $(am__cd) $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): $(am__aclocal_m4_deps) $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) $(am__aclocal_m4_deps): modsecurity.pc: $(top_builddir)/config.status $(srcdir)/modsecurity.pc.in cd $(top_builddir) && $(SHELL) ./config.status $@ mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool config.lt install-pkgconfigDATA: $(pkgconfig_DATA) @$(NORMAL_INSTALL) @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(pkgconfigdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgconfigdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgconfigdir)" || exit $$?; \ done uninstall-pkgconfigDATA: @$(NORMAL_UNINSTALL) @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(pkgconfigdir)'; $(am__uninstall_files_from_dir) # This directory's subdirectories are mostly independent; you can cd # into them and run 'make' without going through this Makefile. # To change the values of 'make' variables: instead of editing Makefiles, # (1) if the variable is set in 'config.status', edit 'config.status' # (which will cause the Makefiles to be regenerated when you run 'make'); # (2) otherwise, pass the desired values on the 'make' command line. $(am__recursive_targets): @fail=; \ if $(am__make_keepgoing); then \ failcom='fail=yes'; \ else \ failcom='exit 1'; \ fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-recursive TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ $(am__define_uniq_tagged_files); \ 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-recursive CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ 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" cscope: cscope.files test ! -s cscope.files \ || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS) clean-cscope: -rm -f cscope.files cscope.files: clean-cscope cscopelist cscopelist: cscopelist-recursive cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -rm -f cscope.out cscope.in.out cscope.po.out cscope.files # Recover from deleted '.trs' file; this should ensure that # "rm -f foo.log; make foo.trs" re-run 'foo.test', and re-create # both 'foo.log' and 'foo.trs'. Break the recipe in two subshells # to avoid problems with "make -n". .log.trs: rm -f $< $@ $(MAKE) $(AM_MAKEFLAGS) $< # Leading 'am--fnord' is there to ensure the list of targets does not # expand to empty, as could happen e.g. with make check TESTS=''. am--fnord $(TEST_LOGS) $(TEST_LOGS:.log=.trs): $(am__force_recheck) am--force-recheck: @: $(TEST_SUITE_LOG): $(TEST_LOGS) @$(am__set_TESTS_bases); \ am__f_ok () { test -f "$$1" && test -r "$$1"; }; \ redo_bases=`for i in $$bases; do \ am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \ done`; \ if test -n "$$redo_bases"; then \ redo_logs=`for i in $$redo_bases; do echo $$i.log; done`; \ redo_results=`for i in $$redo_bases; do echo $$i.trs; done`; \ if $(am__make_dryrun); then :; else \ rm -f $$redo_logs && rm -f $$redo_results || exit 1; \ fi; \ fi; \ if test -n "$$am__remaking_logs"; then \ echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \ "recursion detected" >&2; \ elif test -n "$$redo_logs"; then \ am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \ fi; \ if $(am__make_dryrun); then :; else \ st=0; \ errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \ for i in $$redo_bases; do \ test -f $$i.trs && test -r $$i.trs \ || { echo "$$errmsg $$i.trs" >&2; st=1; }; \ test -f $$i.log && test -r $$i.log \ || { echo "$$errmsg $$i.log" >&2; st=1; }; \ done; \ test $$st -eq 0 || exit 1; \ fi @$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \ ws='[ ]'; \ results=`for b in $$bases; do echo $$b.trs; done`; \ test -n "$$results" || results=/dev/null; \ all=` grep "^$$ws*:test-result:" $$results | wc -l`; \ pass=` grep "^$$ws*:test-result:$$ws*PASS" $$results | wc -l`; \ fail=` grep "^$$ws*:test-result:$$ws*FAIL" $$results | wc -l`; \ skip=` grep "^$$ws*:test-result:$$ws*SKIP" $$results | wc -l`; \ xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \ xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \ error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \ if test `expr $$fail + $$xpass + $$error` -eq 0; then \ success=true; \ else \ success=false; \ fi; \ br='==================='; br=$$br$$br$$br$$br; \ result_count () \ { \ if test x"$$1" = x"--maybe-color"; then \ maybe_colorize=yes; \ elif test x"$$1" = x"--no-color"; then \ maybe_colorize=no; \ else \ echo "$@: invalid 'result_count' usage" >&2; exit 4; \ fi; \ shift; \ desc=$$1 count=$$2; \ if test $$maybe_colorize = yes && test $$count -gt 0; then \ color_start=$$3 color_end=$$std; \ else \ color_start= color_end=; \ fi; \ echo "$${color_start}# $$desc $$count$${color_end}"; \ }; \ create_testsuite_report () \ { \ result_count $$1 "TOTAL:" $$all "$$brg"; \ result_count $$1 "PASS: " $$pass "$$grn"; \ result_count $$1 "SKIP: " $$skip "$$blu"; \ result_count $$1 "XFAIL:" $$xfail "$$lgn"; \ result_count $$1 "FAIL: " $$fail "$$red"; \ result_count $$1 "XPASS:" $$xpass "$$red"; \ result_count $$1 "ERROR:" $$error "$$mgn"; \ }; \ { \ echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \ $(am__rst_title); \ create_testsuite_report --no-color; \ echo; \ echo ".. contents:: :depth: 2"; \ echo; \ for b in $$bases; do echo $$b; done \ | $(am__create_global_log); \ } >$(TEST_SUITE_LOG).tmp || exit 1; \ mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \ if $$success; then \ col="$$grn"; \ else \ col="$$red"; \ test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \ fi; \ echo "$${col}$$br$${std}"; \ echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \ echo "$${col}$$br$${std}"; \ create_testsuite_report --maybe-color; \ echo "$$col$$br$$std"; \ if $$success; then :; else \ echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}"; \ if test -n "$(PACKAGE_BUGREPORT)"; then \ echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}"; \ fi; \ echo "$$col$$br$$std"; \ fi; \ $$success || exit 1 check-TESTS: @list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list @list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) @set +e; $(am__set_TESTS_bases); \ log_list=`for i in $$bases; do echo $$i.log; done`; \ trs_list=`for i in $$bases; do echo $$i.trs; done`; \ log_list=`echo $$log_list`; trs_list=`echo $$trs_list`; \ $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \ exit $$?; recheck: all @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) @set +e; $(am__set_TESTS_bases); \ bases=`for i in $$bases; do echo $$i; done \ | $(am__list_recheck_tests)` || exit 1; \ log_list=`for i in $$bases; do echo $$i.log; done`; \ log_list=`echo $$log_list`; \ $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) \ am__force_recheck=am--force-recheck \ TEST_LOGS="$$log_list"; \ exit $$? test/test-cases/regression/action-allow.json.log: test/test-cases/regression/action-allow.json @p='test/test-cases/regression/action-allow.json'; \ b='test/test-cases/regression/action-allow.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/action-block.json.log: test/test-cases/regression/action-block.json @p='test/test-cases/regression/action-block.json'; \ b='test/test-cases/regression/action-block.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/action-ctl_request_body_access.json.log: test/test-cases/regression/action-ctl_request_body_access.json @p='test/test-cases/regression/action-ctl_request_body_access.json'; \ b='test/test-cases/regression/action-ctl_request_body_access.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/action-ctl_request_body_processor.json.log: test/test-cases/regression/action-ctl_request_body_processor.json @p='test/test-cases/regression/action-ctl_request_body_processor.json'; \ b='test/test-cases/regression/action-ctl_request_body_processor.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/action-ctl_request_body_processor_urlencoded.json.log: test/test-cases/regression/action-ctl_request_body_processor_urlencoded.json @p='test/test-cases/regression/action-ctl_request_body_processor_urlencoded.json'; \ b='test/test-cases/regression/action-ctl_request_body_processor_urlencoded.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/action-ctl_rule_engine.json.log: test/test-cases/regression/action-ctl_rule_engine.json @p='test/test-cases/regression/action-ctl_rule_engine.json'; \ b='test/test-cases/regression/action-ctl_rule_engine.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/action-ctl_rule_remove_by_id.json.log: test/test-cases/regression/action-ctl_rule_remove_by_id.json @p='test/test-cases/regression/action-ctl_rule_remove_by_id.json'; \ b='test/test-cases/regression/action-ctl_rule_remove_by_id.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/action-ctl_rule_remove_by_tag.json.log: test/test-cases/regression/action-ctl_rule_remove_by_tag.json @p='test/test-cases/regression/action-ctl_rule_remove_by_tag.json'; \ b='test/test-cases/regression/action-ctl_rule_remove_by_tag.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/action-ctl_rule_remove_target_by_id.json.log: test/test-cases/regression/action-ctl_rule_remove_target_by_id.json @p='test/test-cases/regression/action-ctl_rule_remove_target_by_id.json'; \ b='test/test-cases/regression/action-ctl_rule_remove_target_by_id.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/action-ctl_rule_remove_target_by_tag.json.log: test/test-cases/regression/action-ctl_rule_remove_target_by_tag.json @p='test/test-cases/regression/action-ctl_rule_remove_target_by_tag.json'; \ b='test/test-cases/regression/action-ctl_rule_remove_target_by_tag.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/action-disruptive.json.log: test/test-cases/regression/action-disruptive.json @p='test/test-cases/regression/action-disruptive.json'; \ b='test/test-cases/regression/action-disruptive.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/action-exec.json.log: test/test-cases/regression/action-exec.json @p='test/test-cases/regression/action-exec.json'; \ b='test/test-cases/regression/action-exec.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/action-id.json.log: test/test-cases/regression/action-id.json @p='test/test-cases/regression/action-id.json'; \ b='test/test-cases/regression/action-id.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/action-initcol.json.log: test/test-cases/regression/action-initcol.json @p='test/test-cases/regression/action-initcol.json'; \ b='test/test-cases/regression/action-initcol.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/action-msg.json.log: test/test-cases/regression/action-msg.json @p='test/test-cases/regression/action-msg.json'; \ b='test/test-cases/regression/action-msg.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/action-setenv.json.log: test/test-cases/regression/action-setenv.json @p='test/test-cases/regression/action-setenv.json'; \ b='test/test-cases/regression/action-setenv.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/action-setrsc.json.log: test/test-cases/regression/action-setrsc.json @p='test/test-cases/regression/action-setrsc.json'; \ b='test/test-cases/regression/action-setrsc.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/action-setsid.json.log: test/test-cases/regression/action-setsid.json @p='test/test-cases/regression/action-setsid.json'; \ b='test/test-cases/regression/action-setsid.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/action-setuid.json.log: test/test-cases/regression/action-setuid.json @p='test/test-cases/regression/action-setuid.json'; \ b='test/test-cases/regression/action-setuid.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/actions.json.log: test/test-cases/regression/actions.json @p='test/test-cases/regression/actions.json'; \ b='test/test-cases/regression/actions.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/action-skip.json.log: test/test-cases/regression/action-skip.json @p='test/test-cases/regression/action-skip.json'; \ b='test/test-cases/regression/action-skip.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/action-tag.json.log: test/test-cases/regression/action-tag.json @p='test/test-cases/regression/action-tag.json'; \ b='test/test-cases/regression/action-tag.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/action-tnf-base64.json.log: test/test-cases/regression/action-tnf-base64.json @p='test/test-cases/regression/action-tnf-base64.json'; \ b='test/test-cases/regression/action-tnf-base64.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/action-xmlns.json.log: test/test-cases/regression/action-xmlns.json @p='test/test-cases/regression/action-xmlns.json'; \ b='test/test-cases/regression/action-xmlns.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/auditlog.json.log: test/test-cases/regression/auditlog.json @p='test/test-cases/regression/auditlog.json'; \ b='test/test-cases/regression/auditlog.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/collection-case-insensitive.json.log: test/test-cases/regression/collection-case-insensitive.json @p='test/test-cases/regression/collection-case-insensitive.json'; \ b='test/test-cases/regression/collection-case-insensitive.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/collection-lua.json.log: test/test-cases/regression/collection-lua.json @p='test/test-cases/regression/collection-lua.json'; \ b='test/test-cases/regression/collection-lua.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/collection-regular_expression_selection.json.log: test/test-cases/regression/collection-regular_expression_selection.json @p='test/test-cases/regression/collection-regular_expression_selection.json'; \ b='test/test-cases/regression/collection-regular_expression_selection.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/collection-resource.json.log: test/test-cases/regression/collection-resource.json @p='test/test-cases/regression/collection-resource.json'; \ b='test/test-cases/regression/collection-resource.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/collection-tx.json.log: test/test-cases/regression/collection-tx.json @p='test/test-cases/regression/collection-tx.json'; \ b='test/test-cases/regression/collection-tx.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/collection-tx-with-macro.json.log: test/test-cases/regression/collection-tx-with-macro.json @p='test/test-cases/regression/collection-tx-with-macro.json'; \ b='test/test-cases/regression/collection-tx-with-macro.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/config-body_limits.json.log: test/test-cases/regression/config-body_limits.json @p='test/test-cases/regression/config-body_limits.json'; \ b='test/test-cases/regression/config-body_limits.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/config-calling_phases_by_name.json.log: test/test-cases/regression/config-calling_phases_by_name.json @p='test/test-cases/regression/config-calling_phases_by_name.json'; \ b='test/test-cases/regression/config-calling_phases_by_name.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/config-include-bad.json.log: test/test-cases/regression/config-include-bad.json @p='test/test-cases/regression/config-include-bad.json'; \ b='test/test-cases/regression/config-include-bad.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/config-include.json.log: test/test-cases/regression/config-include.json @p='test/test-cases/regression/config-include.json'; \ b='test/test-cases/regression/config-include.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/config-remove_by_id.json.log: test/test-cases/regression/config-remove_by_id.json @p='test/test-cases/regression/config-remove_by_id.json'; \ b='test/test-cases/regression/config-remove_by_id.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/config-remove_by_msg.json.log: test/test-cases/regression/config-remove_by_msg.json @p='test/test-cases/regression/config-remove_by_msg.json'; \ b='test/test-cases/regression/config-remove_by_msg.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/config-remove_by_tag.json.log: test/test-cases/regression/config-remove_by_tag.json @p='test/test-cases/regression/config-remove_by_tag.json'; \ b='test/test-cases/regression/config-remove_by_tag.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/config-response_type.json.log: test/test-cases/regression/config-response_type.json @p='test/test-cases/regression/config-response_type.json'; \ b='test/test-cases/regression/config-response_type.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/config-secdefaultaction.json.log: test/test-cases/regression/config-secdefaultaction.json @p='test/test-cases/regression/config-secdefaultaction.json'; \ b='test/test-cases/regression/config-secdefaultaction.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/config-secremoterules.json.log: test/test-cases/regression/config-secremoterules.json @p='test/test-cases/regression/config-secremoterules.json'; \ b='test/test-cases/regression/config-secremoterules.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/config-update-action-by-id.json.log: test/test-cases/regression/config-update-action-by-id.json @p='test/test-cases/regression/config-update-action-by-id.json'; \ b='test/test-cases/regression/config-update-action-by-id.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/config-update-target-by-id.json.log: test/test-cases/regression/config-update-target-by-id.json @p='test/test-cases/regression/config-update-target-by-id.json'; \ b='test/test-cases/regression/config-update-target-by-id.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/config-update-target-by-msg.json.log: test/test-cases/regression/config-update-target-by-msg.json @p='test/test-cases/regression/config-update-target-by-msg.json'; \ b='test/test-cases/regression/config-update-target-by-msg.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/config-update-target-by-tag.json.log: test/test-cases/regression/config-update-target-by-tag.json @p='test/test-cases/regression/config-update-target-by-tag.json'; \ b='test/test-cases/regression/config-update-target-by-tag.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/config-xml_external_entity.json.log: test/test-cases/regression/config-xml_external_entity.json @p='test/test-cases/regression/config-xml_external_entity.json'; \ b='test/test-cases/regression/config-xml_external_entity.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/debug_log.json.log: test/test-cases/regression/debug_log.json @p='test/test-cases/regression/debug_log.json'; \ b='test/test-cases/regression/debug_log.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/directive-sec_rule_script.json.log: test/test-cases/regression/directive-sec_rule_script.json @p='test/test-cases/regression/directive-sec_rule_script.json'; \ b='test/test-cases/regression/directive-sec_rule_script.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/issue-1152.json.log: test/test-cases/regression/issue-1152.json @p='test/test-cases/regression/issue-1152.json'; \ b='test/test-cases/regression/issue-1152.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/issue-1528.json.log: test/test-cases/regression/issue-1528.json @p='test/test-cases/regression/issue-1528.json'; \ b='test/test-cases/regression/issue-1528.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/issue-1565.json.log: test/test-cases/regression/issue-1565.json @p='test/test-cases/regression/issue-1565.json'; \ b='test/test-cases/regression/issue-1565.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/issue-1576.json.log: test/test-cases/regression/issue-1576.json @p='test/test-cases/regression/issue-1576.json'; \ b='test/test-cases/regression/issue-1576.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/issue-1591.json.log: test/test-cases/regression/issue-1591.json @p='test/test-cases/regression/issue-1591.json'; \ b='test/test-cases/regression/issue-1591.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/issue-1725.json.log: test/test-cases/regression/issue-1725.json @p='test/test-cases/regression/issue-1725.json'; \ b='test/test-cases/regression/issue-1725.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/issue-1743.json.log: test/test-cases/regression/issue-1743.json @p='test/test-cases/regression/issue-1743.json'; \ b='test/test-cases/regression/issue-1743.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/issue-1785.json.log: test/test-cases/regression/issue-1785.json @p='test/test-cases/regression/issue-1785.json'; \ b='test/test-cases/regression/issue-1785.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/issue-1812.json.log: test/test-cases/regression/issue-1812.json @p='test/test-cases/regression/issue-1812.json'; \ b='test/test-cases/regression/issue-1812.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/issue-1831.json.log: test/test-cases/regression/issue-1831.json @p='test/test-cases/regression/issue-1831.json'; \ b='test/test-cases/regression/issue-1831.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/issue-1844.json.log: test/test-cases/regression/issue-1844.json @p='test/test-cases/regression/issue-1844.json'; \ b='test/test-cases/regression/issue-1844.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/issue-1850.json.log: test/test-cases/regression/issue-1850.json @p='test/test-cases/regression/issue-1850.json'; \ b='test/test-cases/regression/issue-1850.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/issue-1941.json.log: test/test-cases/regression/issue-1941.json @p='test/test-cases/regression/issue-1941.json'; \ b='test/test-cases/regression/issue-1941.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/issue-1943.json.log: test/test-cases/regression/issue-1943.json @p='test/test-cases/regression/issue-1943.json'; \ b='test/test-cases/regression/issue-1943.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/issue-1956.json.log: test/test-cases/regression/issue-1956.json @p='test/test-cases/regression/issue-1956.json'; \ b='test/test-cases/regression/issue-1956.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/issue-1960.json.log: test/test-cases/regression/issue-1960.json @p='test/test-cases/regression/issue-1960.json'; \ b='test/test-cases/regression/issue-1960.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/issue-2099.json.log: test/test-cases/regression/issue-2099.json @p='test/test-cases/regression/issue-2099.json'; \ b='test/test-cases/regression/issue-2099.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/issue-2000.json.log: test/test-cases/regression/issue-2000.json @p='test/test-cases/regression/issue-2000.json'; \ b='test/test-cases/regression/issue-2000.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/issue-2111.json.log: test/test-cases/regression/issue-2111.json @p='test/test-cases/regression/issue-2111.json'; \ b='test/test-cases/regression/issue-2111.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/issue-2196.json.log: test/test-cases/regression/issue-2196.json @p='test/test-cases/regression/issue-2196.json'; \ b='test/test-cases/regression/issue-2196.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/issue-2423-msg-in-chain.json.log: test/test-cases/regression/issue-2423-msg-in-chain.json @p='test/test-cases/regression/issue-2423-msg-in-chain.json'; \ b='test/test-cases/regression/issue-2423-msg-in-chain.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/issue-2427.json.log: test/test-cases/regression/issue-2427.json @p='test/test-cases/regression/issue-2427.json'; \ b='test/test-cases/regression/issue-2427.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/issue-2296.json.log: test/test-cases/regression/issue-2296.json @p='test/test-cases/regression/issue-2296.json'; \ b='test/test-cases/regression/issue-2296.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/issue-394.json.log: test/test-cases/regression/issue-394.json @p='test/test-cases/regression/issue-394.json'; \ b='test/test-cases/regression/issue-394.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/issue-849.json.log: test/test-cases/regression/issue-849.json @p='test/test-cases/regression/issue-849.json'; \ b='test/test-cases/regression/issue-849.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/issue-960.json.log: test/test-cases/regression/issue-960.json @p='test/test-cases/regression/issue-960.json'; \ b='test/test-cases/regression/issue-960.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/misc.json.log: test/test-cases/regression/misc.json @p='test/test-cases/regression/misc.json'; \ b='test/test-cases/regression/misc.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/misc-variable-under-quotes.json.log: test/test-cases/regression/misc-variable-under-quotes.json @p='test/test-cases/regression/misc-variable-under-quotes.json'; \ b='test/test-cases/regression/misc-variable-under-quotes.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/offset-variable.json.log: test/test-cases/regression/offset-variable.json @p='test/test-cases/regression/offset-variable.json'; \ b='test/test-cases/regression/offset-variable.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/operator-detectsqli.json.log: test/test-cases/regression/operator-detectsqli.json @p='test/test-cases/regression/operator-detectsqli.json'; \ b='test/test-cases/regression/operator-detectsqli.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/operator-detectxss.json.log: test/test-cases/regression/operator-detectxss.json @p='test/test-cases/regression/operator-detectxss.json'; \ b='test/test-cases/regression/operator-detectxss.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/operator-fuzzyhash.json.log: test/test-cases/regression/operator-fuzzyhash.json @p='test/test-cases/regression/operator-fuzzyhash.json'; \ b='test/test-cases/regression/operator-fuzzyhash.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/operator-inpectFile.json.log: test/test-cases/regression/operator-inpectFile.json @p='test/test-cases/regression/operator-inpectFile.json'; \ b='test/test-cases/regression/operator-inpectFile.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/operator-ipMatchFromFile.json.log: test/test-cases/regression/operator-ipMatchFromFile.json @p='test/test-cases/regression/operator-ipMatchFromFile.json'; \ b='test/test-cases/regression/operator-ipMatchFromFile.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/operator-pm.json.log: test/test-cases/regression/operator-pm.json @p='test/test-cases/regression/operator-pm.json'; \ b='test/test-cases/regression/operator-pm.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/operator-rx.json.log: test/test-cases/regression/operator-rx.json @p='test/test-cases/regression/operator-rx.json'; \ b='test/test-cases/regression/operator-rx.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/operator-rxGlobal.json.log: test/test-cases/regression/operator-rxGlobal.json @p='test/test-cases/regression/operator-rxGlobal.json'; \ b='test/test-cases/regression/operator-rxGlobal.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/operator-UnconditionalMatch.json.log: test/test-cases/regression/operator-UnconditionalMatch.json @p='test/test-cases/regression/operator-UnconditionalMatch.json'; \ b='test/test-cases/regression/operator-UnconditionalMatch.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/operator-validate-byte-range.json.log: test/test-cases/regression/operator-validate-byte-range.json @p='test/test-cases/regression/operator-validate-byte-range.json'; \ b='test/test-cases/regression/operator-validate-byte-range.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/operator-verifycc.json.log: test/test-cases/regression/operator-verifycc.json @p='test/test-cases/regression/operator-verifycc.json'; \ b='test/test-cases/regression/operator-verifycc.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/operator-verifycpf.json.log: test/test-cases/regression/operator-verifycpf.json @p='test/test-cases/regression/operator-verifycpf.json'; \ b='test/test-cases/regression/operator-verifycpf.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/operator-verifyssn.json.log: test/test-cases/regression/operator-verifyssn.json @p='test/test-cases/regression/operator-verifyssn.json'; \ b='test/test-cases/regression/operator-verifyssn.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/operator-verifysvnr.json.log: test/test-cases/regression/operator-verifysvnr.json @p='test/test-cases/regression/operator-verifysvnr.json'; \ b='test/test-cases/regression/operator-verifysvnr.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/request-body-parser-json.json.log: test/test-cases/regression/request-body-parser-json.json @p='test/test-cases/regression/request-body-parser-json.json'; \ b='test/test-cases/regression/request-body-parser-json.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/request-body-parser-multipart-crlf.json.log: test/test-cases/regression/request-body-parser-multipart-crlf.json @p='test/test-cases/regression/request-body-parser-multipart-crlf.json'; \ b='test/test-cases/regression/request-body-parser-multipart-crlf.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/request-body-parser-multipart.json.log: test/test-cases/regression/request-body-parser-multipart.json @p='test/test-cases/regression/request-body-parser-multipart.json'; \ b='test/test-cases/regression/request-body-parser-multipart.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/request-body-parser-xml.json.log: test/test-cases/regression/request-body-parser-xml.json @p='test/test-cases/regression/request-body-parser-xml.json'; \ b='test/test-cases/regression/request-body-parser-xml.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/request-body-parser-xml-validade-dtd.json.log: test/test-cases/regression/request-body-parser-xml-validade-dtd.json @p='test/test-cases/regression/request-body-parser-xml-validade-dtd.json'; \ b='test/test-cases/regression/request-body-parser-xml-validade-dtd.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/rule-920120.json.log: test/test-cases/regression/rule-920120.json @p='test/test-cases/regression/rule-920120.json'; \ b='test/test-cases/regression/rule-920120.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/rule-920200.json.log: test/test-cases/regression/rule-920200.json @p='test/test-cases/regression/rule-920200.json'; \ b='test/test-cases/regression/rule-920200.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/rule-920274.json.log: test/test-cases/regression/rule-920274.json @p='test/test-cases/regression/rule-920274.json'; \ b='test/test-cases/regression/rule-920274.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/secaction.json.log: test/test-cases/regression/secaction.json @p='test/test-cases/regression/secaction.json'; \ b='test/test-cases/regression/secaction.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/secargumentslimit.json.log: test/test-cases/regression/secargumentslimit.json @p='test/test-cases/regression/secargumentslimit.json'; \ b='test/test-cases/regression/secargumentslimit.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/sec_component_signature.json.log: test/test-cases/regression/sec_component_signature.json @p='test/test-cases/regression/sec_component_signature.json'; \ b='test/test-cases/regression/sec_component_signature.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/secmarker.json.log: test/test-cases/regression/secmarker.json @p='test/test-cases/regression/secmarker.json'; \ b='test/test-cases/regression/secmarker.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/secruleengine.json.log: test/test-cases/regression/secruleengine.json @p='test/test-cases/regression/secruleengine.json'; \ b='test/test-cases/regression/secruleengine.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/transformation-none.json.log: test/test-cases/regression/transformation-none.json @p='test/test-cases/regression/transformation-none.json'; \ b='test/test-cases/regression/transformation-none.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/transformations.json.log: test/test-cases/regression/transformations.json @p='test/test-cases/regression/transformations.json'; \ b='test/test-cases/regression/transformations.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/variable-ARGS_COMBINED_SIZE.json.log: test/test-cases/regression/variable-ARGS_COMBINED_SIZE.json @p='test/test-cases/regression/variable-ARGS_COMBINED_SIZE.json'; \ b='test/test-cases/regression/variable-ARGS_COMBINED_SIZE.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/variable-ARGS_GET.json.log: test/test-cases/regression/variable-ARGS_GET.json @p='test/test-cases/regression/variable-ARGS_GET.json'; \ b='test/test-cases/regression/variable-ARGS_GET.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/variable-ARGS_GET_NAMES.json.log: test/test-cases/regression/variable-ARGS_GET_NAMES.json @p='test/test-cases/regression/variable-ARGS_GET_NAMES.json'; \ b='test/test-cases/regression/variable-ARGS_GET_NAMES.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/variable-ARGS.json.log: test/test-cases/regression/variable-ARGS.json @p='test/test-cases/regression/variable-ARGS.json'; \ b='test/test-cases/regression/variable-ARGS.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/variable-ARGS_NAMES.json.log: test/test-cases/regression/variable-ARGS_NAMES.json @p='test/test-cases/regression/variable-ARGS_NAMES.json'; \ b='test/test-cases/regression/variable-ARGS_NAMES.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/variable-ARGS_POST.json.log: test/test-cases/regression/variable-ARGS_POST.json @p='test/test-cases/regression/variable-ARGS_POST.json'; \ b='test/test-cases/regression/variable-ARGS_POST.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/variable-ARGS_POST_NAMES.json.log: test/test-cases/regression/variable-ARGS_POST_NAMES.json @p='test/test-cases/regression/variable-ARGS_POST_NAMES.json'; \ b='test/test-cases/regression/variable-ARGS_POST_NAMES.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/variable-AUTH_TYPE.json.log: test/test-cases/regression/variable-AUTH_TYPE.json @p='test/test-cases/regression/variable-AUTH_TYPE.json'; \ b='test/test-cases/regression/variable-AUTH_TYPE.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/variable-DURATION.json.log: test/test-cases/regression/variable-DURATION.json @p='test/test-cases/regression/variable-DURATION.json'; \ b='test/test-cases/regression/variable-DURATION.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/variable-ENV.json.log: test/test-cases/regression/variable-ENV.json @p='test/test-cases/regression/variable-ENV.json'; \ b='test/test-cases/regression/variable-ENV.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/variable-FILES_COMBINED_SIZE.json.log: test/test-cases/regression/variable-FILES_COMBINED_SIZE.json @p='test/test-cases/regression/variable-FILES_COMBINED_SIZE.json'; \ b='test/test-cases/regression/variable-FILES_COMBINED_SIZE.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/variable-FILES.json.log: test/test-cases/regression/variable-FILES.json @p='test/test-cases/regression/variable-FILES.json'; \ b='test/test-cases/regression/variable-FILES.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/variable-FILES_NAMES.json.log: test/test-cases/regression/variable-FILES_NAMES.json @p='test/test-cases/regression/variable-FILES_NAMES.json'; \ b='test/test-cases/regression/variable-FILES_NAMES.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/variable-FILES_SIZES.json.log: test/test-cases/regression/variable-FILES_SIZES.json @p='test/test-cases/regression/variable-FILES_SIZES.json'; \ b='test/test-cases/regression/variable-FILES_SIZES.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/variable-FULL_REQUEST.json.log: test/test-cases/regression/variable-FULL_REQUEST.json @p='test/test-cases/regression/variable-FULL_REQUEST.json'; \ b='test/test-cases/regression/variable-FULL_REQUEST.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/variable-FULL_REQUEST_LENGTH.json.log: test/test-cases/regression/variable-FULL_REQUEST_LENGTH.json @p='test/test-cases/regression/variable-FULL_REQUEST_LENGTH.json'; \ b='test/test-cases/regression/variable-FULL_REQUEST_LENGTH.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/variable-GEO.json.log: test/test-cases/regression/variable-GEO.json @p='test/test-cases/regression/variable-GEO.json'; \ b='test/test-cases/regression/variable-GEO.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/variable-HIGHEST_SEVERITY.json.log: test/test-cases/regression/variable-HIGHEST_SEVERITY.json @p='test/test-cases/regression/variable-HIGHEST_SEVERITY.json'; \ b='test/test-cases/regression/variable-HIGHEST_SEVERITY.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/variable-INBOUND_DATA_ERROR.json.log: test/test-cases/regression/variable-INBOUND_DATA_ERROR.json @p='test/test-cases/regression/variable-INBOUND_DATA_ERROR.json'; \ b='test/test-cases/regression/variable-INBOUND_DATA_ERROR.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/variable-MATCHED_VAR.json.log: test/test-cases/regression/variable-MATCHED_VAR.json @p='test/test-cases/regression/variable-MATCHED_VAR.json'; \ b='test/test-cases/regression/variable-MATCHED_VAR.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/variable-MATCHED_VAR_NAME.json.log: test/test-cases/regression/variable-MATCHED_VAR_NAME.json @p='test/test-cases/regression/variable-MATCHED_VAR_NAME.json'; \ b='test/test-cases/regression/variable-MATCHED_VAR_NAME.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/variable-MATCHED_VARS.json.log: test/test-cases/regression/variable-MATCHED_VARS.json @p='test/test-cases/regression/variable-MATCHED_VARS.json'; \ b='test/test-cases/regression/variable-MATCHED_VARS.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/variable-MATCHED_VARS_NAMES.json.log: test/test-cases/regression/variable-MATCHED_VARS_NAMES.json @p='test/test-cases/regression/variable-MATCHED_VARS_NAMES.json'; \ b='test/test-cases/regression/variable-MATCHED_VARS_NAMES.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/variable-MODSEC_BUILD.json.log: test/test-cases/regression/variable-MODSEC_BUILD.json @p='test/test-cases/regression/variable-MODSEC_BUILD.json'; \ b='test/test-cases/regression/variable-MODSEC_BUILD.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/variable-MULTIPART_CRLF_LF_LINES.json.log: test/test-cases/regression/variable-MULTIPART_CRLF_LF_LINES.json @p='test/test-cases/regression/variable-MULTIPART_CRLF_LF_LINES.json'; \ b='test/test-cases/regression/variable-MULTIPART_CRLF_LF_LINES.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/variable-MULTIPART_FILENAME.json.log: test/test-cases/regression/variable-MULTIPART_FILENAME.json @p='test/test-cases/regression/variable-MULTIPART_FILENAME.json'; \ b='test/test-cases/regression/variable-MULTIPART_FILENAME.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/variable-MULTIPART_INVALID_HEADER_FOLDING.json.log: test/test-cases/regression/variable-MULTIPART_INVALID_HEADER_FOLDING.json @p='test/test-cases/regression/variable-MULTIPART_INVALID_HEADER_FOLDING.json'; \ b='test/test-cases/regression/variable-MULTIPART_INVALID_HEADER_FOLDING.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/variable-MULTIPART_NAME.json.log: test/test-cases/regression/variable-MULTIPART_NAME.json @p='test/test-cases/regression/variable-MULTIPART_NAME.json'; \ b='test/test-cases/regression/variable-MULTIPART_NAME.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/variable-MULTIPART_STRICT_ERROR.json.log: test/test-cases/regression/variable-MULTIPART_STRICT_ERROR.json @p='test/test-cases/regression/variable-MULTIPART_STRICT_ERROR.json'; \ b='test/test-cases/regression/variable-MULTIPART_STRICT_ERROR.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/variable-MULTIPART_UNMATCHED_BOUNDARY.json.log: test/test-cases/regression/variable-MULTIPART_UNMATCHED_BOUNDARY.json @p='test/test-cases/regression/variable-MULTIPART_UNMATCHED_BOUNDARY.json'; \ b='test/test-cases/regression/variable-MULTIPART_UNMATCHED_BOUNDARY.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/variable-OUTBOUND_DATA_ERROR.json.log: test/test-cases/regression/variable-OUTBOUND_DATA_ERROR.json @p='test/test-cases/regression/variable-OUTBOUND_DATA_ERROR.json'; \ b='test/test-cases/regression/variable-OUTBOUND_DATA_ERROR.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/variable-PATH_INFO.json.log: test/test-cases/regression/variable-PATH_INFO.json @p='test/test-cases/regression/variable-PATH_INFO.json'; \ b='test/test-cases/regression/variable-PATH_INFO.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/variable-QUERY_STRING.json.log: test/test-cases/regression/variable-QUERY_STRING.json @p='test/test-cases/regression/variable-QUERY_STRING.json'; \ b='test/test-cases/regression/variable-QUERY_STRING.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/variable-REMOTE_ADDR.json.log: test/test-cases/regression/variable-REMOTE_ADDR.json @p='test/test-cases/regression/variable-REMOTE_ADDR.json'; \ b='test/test-cases/regression/variable-REMOTE_ADDR.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/variable-REMOTE_HOST.json.log: test/test-cases/regression/variable-REMOTE_HOST.json @p='test/test-cases/regression/variable-REMOTE_HOST.json'; \ b='test/test-cases/regression/variable-REMOTE_HOST.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/variable-REMOTE_PORT.json.log: test/test-cases/regression/variable-REMOTE_PORT.json @p='test/test-cases/regression/variable-REMOTE_PORT.json'; \ b='test/test-cases/regression/variable-REMOTE_PORT.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/variable-REMOTE_USER.json.log: test/test-cases/regression/variable-REMOTE_USER.json @p='test/test-cases/regression/variable-REMOTE_USER.json'; \ b='test/test-cases/regression/variable-REMOTE_USER.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/variable-REQBODY_PROCESSOR_ERROR.json.log: test/test-cases/regression/variable-REQBODY_PROCESSOR_ERROR.json @p='test/test-cases/regression/variable-REQBODY_PROCESSOR_ERROR.json'; \ b='test/test-cases/regression/variable-REQBODY_PROCESSOR_ERROR.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/variable-REQBODY_PROCESSOR.json.log: test/test-cases/regression/variable-REQBODY_PROCESSOR.json @p='test/test-cases/regression/variable-REQBODY_PROCESSOR.json'; \ b='test/test-cases/regression/variable-REQBODY_PROCESSOR.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/variable-REQUEST_BASENAME.json.log: test/test-cases/regression/variable-REQUEST_BASENAME.json @p='test/test-cases/regression/variable-REQUEST_BASENAME.json'; \ b='test/test-cases/regression/variable-REQUEST_BASENAME.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/variable-REQUEST_BODY.json.log: test/test-cases/regression/variable-REQUEST_BODY.json @p='test/test-cases/regression/variable-REQUEST_BODY.json'; \ b='test/test-cases/regression/variable-REQUEST_BODY.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/variable-REQUEST_BODY_LENGTH.json.log: test/test-cases/regression/variable-REQUEST_BODY_LENGTH.json @p='test/test-cases/regression/variable-REQUEST_BODY_LENGTH.json'; \ b='test/test-cases/regression/variable-REQUEST_BODY_LENGTH.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/variable-REQUEST_COOKIES.json.log: test/test-cases/regression/variable-REQUEST_COOKIES.json @p='test/test-cases/regression/variable-REQUEST_COOKIES.json'; \ b='test/test-cases/regression/variable-REQUEST_COOKIES.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/variable-REQUEST_COOKIES_NAMES.json.log: test/test-cases/regression/variable-REQUEST_COOKIES_NAMES.json @p='test/test-cases/regression/variable-REQUEST_COOKIES_NAMES.json'; \ b='test/test-cases/regression/variable-REQUEST_COOKIES_NAMES.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/variable-REQUEST_FILENAME.json.log: test/test-cases/regression/variable-REQUEST_FILENAME.json @p='test/test-cases/regression/variable-REQUEST_FILENAME.json'; \ b='test/test-cases/regression/variable-REQUEST_FILENAME.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/variable-REQUEST_HEADERS.json.log: test/test-cases/regression/variable-REQUEST_HEADERS.json @p='test/test-cases/regression/variable-REQUEST_HEADERS.json'; \ b='test/test-cases/regression/variable-REQUEST_HEADERS.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/variable-REQUEST_HEADERS_NAMES.json.log: test/test-cases/regression/variable-REQUEST_HEADERS_NAMES.json @p='test/test-cases/regression/variable-REQUEST_HEADERS_NAMES.json'; \ b='test/test-cases/regression/variable-REQUEST_HEADERS_NAMES.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/variable-REQUEST_LINE.json.log: test/test-cases/regression/variable-REQUEST_LINE.json @p='test/test-cases/regression/variable-REQUEST_LINE.json'; \ b='test/test-cases/regression/variable-REQUEST_LINE.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/variable-REQUEST_METHOD.json.log: test/test-cases/regression/variable-REQUEST_METHOD.json @p='test/test-cases/regression/variable-REQUEST_METHOD.json'; \ b='test/test-cases/regression/variable-REQUEST_METHOD.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/variable-REQUEST_PROTOCOL.json.log: test/test-cases/regression/variable-REQUEST_PROTOCOL.json @p='test/test-cases/regression/variable-REQUEST_PROTOCOL.json'; \ b='test/test-cases/regression/variable-REQUEST_PROTOCOL.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/variable-REQUEST_URI.json.log: test/test-cases/regression/variable-REQUEST_URI.json @p='test/test-cases/regression/variable-REQUEST_URI.json'; \ b='test/test-cases/regression/variable-REQUEST_URI.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/variable-REQUEST_URI_RAW.json.log: test/test-cases/regression/variable-REQUEST_URI_RAW.json @p='test/test-cases/regression/variable-REQUEST_URI_RAW.json'; \ b='test/test-cases/regression/variable-REQUEST_URI_RAW.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/variable-RESPONSE_BODY.json.log: test/test-cases/regression/variable-RESPONSE_BODY.json @p='test/test-cases/regression/variable-RESPONSE_BODY.json'; \ b='test/test-cases/regression/variable-RESPONSE_BODY.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/variable-RESPONSE_CONTENT_LENGTH.json.log: test/test-cases/regression/variable-RESPONSE_CONTENT_LENGTH.json @p='test/test-cases/regression/variable-RESPONSE_CONTENT_LENGTH.json'; \ b='test/test-cases/regression/variable-RESPONSE_CONTENT_LENGTH.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/variable-RESPONSE_CONTENT_TYPE.json.log: test/test-cases/regression/variable-RESPONSE_CONTENT_TYPE.json @p='test/test-cases/regression/variable-RESPONSE_CONTENT_TYPE.json'; \ b='test/test-cases/regression/variable-RESPONSE_CONTENT_TYPE.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/variable-RESPONSE_HEADERS.json.log: test/test-cases/regression/variable-RESPONSE_HEADERS.json @p='test/test-cases/regression/variable-RESPONSE_HEADERS.json'; \ b='test/test-cases/regression/variable-RESPONSE_HEADERS.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/variable-RESPONSE_HEADERS_NAMES.json.log: test/test-cases/regression/variable-RESPONSE_HEADERS_NAMES.json @p='test/test-cases/regression/variable-RESPONSE_HEADERS_NAMES.json'; \ b='test/test-cases/regression/variable-RESPONSE_HEADERS_NAMES.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/variable-RESPONSE_PROTOCOL.json.log: test/test-cases/regression/variable-RESPONSE_PROTOCOL.json @p='test/test-cases/regression/variable-RESPONSE_PROTOCOL.json'; \ b='test/test-cases/regression/variable-RESPONSE_PROTOCOL.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/variable-RULE.json.log: test/test-cases/regression/variable-RULE.json @p='test/test-cases/regression/variable-RULE.json'; \ b='test/test-cases/regression/variable-RULE.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/variable-SERVER_ADDR.json.log: test/test-cases/regression/variable-SERVER_ADDR.json @p='test/test-cases/regression/variable-SERVER_ADDR.json'; \ b='test/test-cases/regression/variable-SERVER_ADDR.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/variable-SERVER_NAME.json.log: test/test-cases/regression/variable-SERVER_NAME.json @p='test/test-cases/regression/variable-SERVER_NAME.json'; \ b='test/test-cases/regression/variable-SERVER_NAME.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/variable-SERVER_PORT.json.log: test/test-cases/regression/variable-SERVER_PORT.json @p='test/test-cases/regression/variable-SERVER_PORT.json'; \ b='test/test-cases/regression/variable-SERVER_PORT.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/variable-SESSIONID.json.log: test/test-cases/regression/variable-SESSIONID.json @p='test/test-cases/regression/variable-SESSIONID.json'; \ b='test/test-cases/regression/variable-SESSIONID.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/variable-STATUS.json.log: test/test-cases/regression/variable-STATUS.json @p='test/test-cases/regression/variable-STATUS.json'; \ b='test/test-cases/regression/variable-STATUS.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/variable-TIME_DAY.json.log: test/test-cases/regression/variable-TIME_DAY.json @p='test/test-cases/regression/variable-TIME_DAY.json'; \ b='test/test-cases/regression/variable-TIME_DAY.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/variable-TIME_EPOCH.json.log: test/test-cases/regression/variable-TIME_EPOCH.json @p='test/test-cases/regression/variable-TIME_EPOCH.json'; \ b='test/test-cases/regression/variable-TIME_EPOCH.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/variable-TIME_HOUR.json.log: test/test-cases/regression/variable-TIME_HOUR.json @p='test/test-cases/regression/variable-TIME_HOUR.json'; \ b='test/test-cases/regression/variable-TIME_HOUR.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/variable-TIME.json.log: test/test-cases/regression/variable-TIME.json @p='test/test-cases/regression/variable-TIME.json'; \ b='test/test-cases/regression/variable-TIME.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/variable-TIME_MIN.json.log: test/test-cases/regression/variable-TIME_MIN.json @p='test/test-cases/regression/variable-TIME_MIN.json'; \ b='test/test-cases/regression/variable-TIME_MIN.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/variable-TIME_MON.json.log: test/test-cases/regression/variable-TIME_MON.json @p='test/test-cases/regression/variable-TIME_MON.json'; \ b='test/test-cases/regression/variable-TIME_MON.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/variable-TIME_SEC.json.log: test/test-cases/regression/variable-TIME_SEC.json @p='test/test-cases/regression/variable-TIME_SEC.json'; \ b='test/test-cases/regression/variable-TIME_SEC.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/variable-TIME_WDAY.json.log: test/test-cases/regression/variable-TIME_WDAY.json @p='test/test-cases/regression/variable-TIME_WDAY.json'; \ b='test/test-cases/regression/variable-TIME_WDAY.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/variable-TIME_YEAR.json.log: test/test-cases/regression/variable-TIME_YEAR.json @p='test/test-cases/regression/variable-TIME_YEAR.json'; \ b='test/test-cases/regression/variable-TIME_YEAR.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/variable-TX.json.log: test/test-cases/regression/variable-TX.json @p='test/test-cases/regression/variable-TX.json'; \ b='test/test-cases/regression/variable-TX.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/variable-UNIQUE_ID.json.log: test/test-cases/regression/variable-UNIQUE_ID.json @p='test/test-cases/regression/variable-UNIQUE_ID.json'; \ b='test/test-cases/regression/variable-UNIQUE_ID.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/variable-URLENCODED_ERROR.json.log: test/test-cases/regression/variable-URLENCODED_ERROR.json @p='test/test-cases/regression/variable-URLENCODED_ERROR.json'; \ b='test/test-cases/regression/variable-URLENCODED_ERROR.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/variable-USERID.json.log: test/test-cases/regression/variable-USERID.json @p='test/test-cases/regression/variable-USERID.json'; \ b='test/test-cases/regression/variable-USERID.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/variable-variation-count.json.log: test/test-cases/regression/variable-variation-count.json @p='test/test-cases/regression/variable-variation-count.json'; \ b='test/test-cases/regression/variable-variation-count.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/variable-variation-exclusion.json.log: test/test-cases/regression/variable-variation-exclusion.json @p='test/test-cases/regression/variable-variation-exclusion.json'; \ b='test/test-cases/regression/variable-variation-exclusion.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/variable-WEBAPPID.json.log: test/test-cases/regression/variable-WEBAPPID.json @p='test/test-cases/regression/variable-WEBAPPID.json'; \ b='test/test-cases/regression/variable-WEBAPPID.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/regression/variable-WEBSERVER_ERROR_LOG.json.log: test/test-cases/regression/variable-WEBSERVER_ERROR_LOG.json @p='test/test-cases/regression/variable-WEBSERVER_ERROR_LOG.json'; \ b='test/test-cases/regression/variable-WEBSERVER_ERROR_LOG.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/secrules-language-tests/operators/beginsWith.json.log: test/test-cases/secrules-language-tests/operators/beginsWith.json @p='test/test-cases/secrules-language-tests/operators/beginsWith.json'; \ b='test/test-cases/secrules-language-tests/operators/beginsWith.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/secrules-language-tests/operators/contains.json.log: test/test-cases/secrules-language-tests/operators/contains.json @p='test/test-cases/secrules-language-tests/operators/contains.json'; \ b='test/test-cases/secrules-language-tests/operators/contains.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/secrules-language-tests/operators/containsWord.json.log: test/test-cases/secrules-language-tests/operators/containsWord.json @p='test/test-cases/secrules-language-tests/operators/containsWord.json'; \ b='test/test-cases/secrules-language-tests/operators/containsWord.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/secrules-language-tests/operators/detectSQLi.json.log: test/test-cases/secrules-language-tests/operators/detectSQLi.json @p='test/test-cases/secrules-language-tests/operators/detectSQLi.json'; \ b='test/test-cases/secrules-language-tests/operators/detectSQLi.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/secrules-language-tests/operators/detectXSS.json.log: test/test-cases/secrules-language-tests/operators/detectXSS.json @p='test/test-cases/secrules-language-tests/operators/detectXSS.json'; \ b='test/test-cases/secrules-language-tests/operators/detectXSS.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/secrules-language-tests/operators/endsWith.json.log: test/test-cases/secrules-language-tests/operators/endsWith.json @p='test/test-cases/secrules-language-tests/operators/endsWith.json'; \ b='test/test-cases/secrules-language-tests/operators/endsWith.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/secrules-language-tests/operators/eq.json.log: test/test-cases/secrules-language-tests/operators/eq.json @p='test/test-cases/secrules-language-tests/operators/eq.json'; \ b='test/test-cases/secrules-language-tests/operators/eq.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/secrules-language-tests/operators/ge.json.log: test/test-cases/secrules-language-tests/operators/ge.json @p='test/test-cases/secrules-language-tests/operators/ge.json'; \ b='test/test-cases/secrules-language-tests/operators/ge.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/secrules-language-tests/operators/geoLookup.json.log: test/test-cases/secrules-language-tests/operators/geoLookup.json @p='test/test-cases/secrules-language-tests/operators/geoLookup.json'; \ b='test/test-cases/secrules-language-tests/operators/geoLookup.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/secrules-language-tests/operators/gt.json.log: test/test-cases/secrules-language-tests/operators/gt.json @p='test/test-cases/secrules-language-tests/operators/gt.json'; \ b='test/test-cases/secrules-language-tests/operators/gt.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/secrules-language-tests/operators/ipMatch.json.log: test/test-cases/secrules-language-tests/operators/ipMatch.json @p='test/test-cases/secrules-language-tests/operators/ipMatch.json'; \ b='test/test-cases/secrules-language-tests/operators/ipMatch.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/secrules-language-tests/operators/le.json.log: test/test-cases/secrules-language-tests/operators/le.json @p='test/test-cases/secrules-language-tests/operators/le.json'; \ b='test/test-cases/secrules-language-tests/operators/le.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/secrules-language-tests/operators/lt.json.log: test/test-cases/secrules-language-tests/operators/lt.json @p='test/test-cases/secrules-language-tests/operators/lt.json'; \ b='test/test-cases/secrules-language-tests/operators/lt.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/secrules-language-tests/operators/noMatch.json.log: test/test-cases/secrules-language-tests/operators/noMatch.json @p='test/test-cases/secrules-language-tests/operators/noMatch.json'; \ b='test/test-cases/secrules-language-tests/operators/noMatch.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/secrules-language-tests/operators/pmFromFile.json.log: test/test-cases/secrules-language-tests/operators/pmFromFile.json @p='test/test-cases/secrules-language-tests/operators/pmFromFile.json'; \ b='test/test-cases/secrules-language-tests/operators/pmFromFile.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/secrules-language-tests/operators/pm.json.log: test/test-cases/secrules-language-tests/operators/pm.json @p='test/test-cases/secrules-language-tests/operators/pm.json'; \ b='test/test-cases/secrules-language-tests/operators/pm.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/secrules-language-tests/operators/rx.json.log: test/test-cases/secrules-language-tests/operators/rx.json @p='test/test-cases/secrules-language-tests/operators/rx.json'; \ b='test/test-cases/secrules-language-tests/operators/rx.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/secrules-language-tests/operators/rxGlobal.json.log: test/test-cases/secrules-language-tests/operators/rxGlobal.json @p='test/test-cases/secrules-language-tests/operators/rxGlobal.json'; \ b='test/test-cases/secrules-language-tests/operators/rxGlobal.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/secrules-language-tests/operators/streq.json.log: test/test-cases/secrules-language-tests/operators/streq.json @p='test/test-cases/secrules-language-tests/operators/streq.json'; \ b='test/test-cases/secrules-language-tests/operators/streq.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/secrules-language-tests/operators/strmatch.json.log: test/test-cases/secrules-language-tests/operators/strmatch.json @p='test/test-cases/secrules-language-tests/operators/strmatch.json'; \ b='test/test-cases/secrules-language-tests/operators/strmatch.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/secrules-language-tests/operators/unconditionalMatch.json.log: test/test-cases/secrules-language-tests/operators/unconditionalMatch.json @p='test/test-cases/secrules-language-tests/operators/unconditionalMatch.json'; \ b='test/test-cases/secrules-language-tests/operators/unconditionalMatch.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/secrules-language-tests/operators/validateByteRange.json.log: test/test-cases/secrules-language-tests/operators/validateByteRange.json @p='test/test-cases/secrules-language-tests/operators/validateByteRange.json'; \ b='test/test-cases/secrules-language-tests/operators/validateByteRange.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/secrules-language-tests/operators/validateUrlEncoding.json.log: test/test-cases/secrules-language-tests/operators/validateUrlEncoding.json @p='test/test-cases/secrules-language-tests/operators/validateUrlEncoding.json'; \ b='test/test-cases/secrules-language-tests/operators/validateUrlEncoding.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/secrules-language-tests/operators/validateUtf8Encoding.json.log: test/test-cases/secrules-language-tests/operators/validateUtf8Encoding.json @p='test/test-cases/secrules-language-tests/operators/validateUtf8Encoding.json'; \ b='test/test-cases/secrules-language-tests/operators/validateUtf8Encoding.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/secrules-language-tests/operators/verifyCC.json.log: test/test-cases/secrules-language-tests/operators/verifyCC.json @p='test/test-cases/secrules-language-tests/operators/verifyCC.json'; \ b='test/test-cases/secrules-language-tests/operators/verifyCC.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/secrules-language-tests/operators/verifycpf.json.log: test/test-cases/secrules-language-tests/operators/verifycpf.json @p='test/test-cases/secrules-language-tests/operators/verifycpf.json'; \ b='test/test-cases/secrules-language-tests/operators/verifycpf.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/secrules-language-tests/operators/verifyssn.json.log: test/test-cases/secrules-language-tests/operators/verifyssn.json @p='test/test-cases/secrules-language-tests/operators/verifyssn.json'; \ b='test/test-cases/secrules-language-tests/operators/verifyssn.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/secrules-language-tests/operators/verifysvnr.json.log: test/test-cases/secrules-language-tests/operators/verifysvnr.json @p='test/test-cases/secrules-language-tests/operators/verifysvnr.json'; \ b='test/test-cases/secrules-language-tests/operators/verifysvnr.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/secrules-language-tests/operators/within.json.log: test/test-cases/secrules-language-tests/operators/within.json @p='test/test-cases/secrules-language-tests/operators/within.json'; \ b='test/test-cases/secrules-language-tests/operators/within.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/secrules-language-tests/transformations/base64DecodeExt.json.log: test/test-cases/secrules-language-tests/transformations/base64DecodeExt.json @p='test/test-cases/secrules-language-tests/transformations/base64DecodeExt.json'; \ b='test/test-cases/secrules-language-tests/transformations/base64DecodeExt.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/secrules-language-tests/transformations/base64Decode.json.log: test/test-cases/secrules-language-tests/transformations/base64Decode.json @p='test/test-cases/secrules-language-tests/transformations/base64Decode.json'; \ b='test/test-cases/secrules-language-tests/transformations/base64Decode.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/secrules-language-tests/transformations/base64Encode.json.log: test/test-cases/secrules-language-tests/transformations/base64Encode.json @p='test/test-cases/secrules-language-tests/transformations/base64Encode.json'; \ b='test/test-cases/secrules-language-tests/transformations/base64Encode.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/secrules-language-tests/transformations/cmdLine.json.log: test/test-cases/secrules-language-tests/transformations/cmdLine.json @p='test/test-cases/secrules-language-tests/transformations/cmdLine.json'; \ b='test/test-cases/secrules-language-tests/transformations/cmdLine.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/secrules-language-tests/transformations/compressWhitespace.json.log: test/test-cases/secrules-language-tests/transformations/compressWhitespace.json @p='test/test-cases/secrules-language-tests/transformations/compressWhitespace.json'; \ b='test/test-cases/secrules-language-tests/transformations/compressWhitespace.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/secrules-language-tests/transformations/cssDecode.json.log: test/test-cases/secrules-language-tests/transformations/cssDecode.json @p='test/test-cases/secrules-language-tests/transformations/cssDecode.json'; \ b='test/test-cases/secrules-language-tests/transformations/cssDecode.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/secrules-language-tests/transformations/escapeSeqDecode.json.log: test/test-cases/secrules-language-tests/transformations/escapeSeqDecode.json @p='test/test-cases/secrules-language-tests/transformations/escapeSeqDecode.json'; \ b='test/test-cases/secrules-language-tests/transformations/escapeSeqDecode.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/secrules-language-tests/transformations/hexDecode.json.log: test/test-cases/secrules-language-tests/transformations/hexDecode.json @p='test/test-cases/secrules-language-tests/transformations/hexDecode.json'; \ b='test/test-cases/secrules-language-tests/transformations/hexDecode.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/secrules-language-tests/transformations/hexEncode.json.log: test/test-cases/secrules-language-tests/transformations/hexEncode.json @p='test/test-cases/secrules-language-tests/transformations/hexEncode.json'; \ b='test/test-cases/secrules-language-tests/transformations/hexEncode.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/secrules-language-tests/transformations/htmlEntityDecode.json.log: test/test-cases/secrules-language-tests/transformations/htmlEntityDecode.json @p='test/test-cases/secrules-language-tests/transformations/htmlEntityDecode.json'; \ b='test/test-cases/secrules-language-tests/transformations/htmlEntityDecode.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/secrules-language-tests/transformations/jsDecode.json.log: test/test-cases/secrules-language-tests/transformations/jsDecode.json @p='test/test-cases/secrules-language-tests/transformations/jsDecode.json'; \ b='test/test-cases/secrules-language-tests/transformations/jsDecode.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/secrules-language-tests/transformations/length.json.log: test/test-cases/secrules-language-tests/transformations/length.json @p='test/test-cases/secrules-language-tests/transformations/length.json'; \ b='test/test-cases/secrules-language-tests/transformations/length.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/secrules-language-tests/transformations/lowercase.json.log: test/test-cases/secrules-language-tests/transformations/lowercase.json @p='test/test-cases/secrules-language-tests/transformations/lowercase.json'; \ b='test/test-cases/secrules-language-tests/transformations/lowercase.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/secrules-language-tests/transformations/md5.json.log: test/test-cases/secrules-language-tests/transformations/md5.json @p='test/test-cases/secrules-language-tests/transformations/md5.json'; \ b='test/test-cases/secrules-language-tests/transformations/md5.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/secrules-language-tests/transformations/normalisePath.json.log: test/test-cases/secrules-language-tests/transformations/normalisePath.json @p='test/test-cases/secrules-language-tests/transformations/normalisePath.json'; \ b='test/test-cases/secrules-language-tests/transformations/normalisePath.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/secrules-language-tests/transformations/normalisePathWin.json.log: test/test-cases/secrules-language-tests/transformations/normalisePathWin.json @p='test/test-cases/secrules-language-tests/transformations/normalisePathWin.json'; \ b='test/test-cases/secrules-language-tests/transformations/normalisePathWin.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/secrules-language-tests/transformations/parityEven7bit.json.log: test/test-cases/secrules-language-tests/transformations/parityEven7bit.json @p='test/test-cases/secrules-language-tests/transformations/parityEven7bit.json'; \ b='test/test-cases/secrules-language-tests/transformations/parityEven7bit.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/secrules-language-tests/transformations/parityOdd7bit.json.log: test/test-cases/secrules-language-tests/transformations/parityOdd7bit.json @p='test/test-cases/secrules-language-tests/transformations/parityOdd7bit.json'; \ b='test/test-cases/secrules-language-tests/transformations/parityOdd7bit.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/secrules-language-tests/transformations/parityZero7bit.json.log: test/test-cases/secrules-language-tests/transformations/parityZero7bit.json @p='test/test-cases/secrules-language-tests/transformations/parityZero7bit.json'; \ b='test/test-cases/secrules-language-tests/transformations/parityZero7bit.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/secrules-language-tests/transformations/removeCommentsChar.json.log: test/test-cases/secrules-language-tests/transformations/removeCommentsChar.json @p='test/test-cases/secrules-language-tests/transformations/removeCommentsChar.json'; \ b='test/test-cases/secrules-language-tests/transformations/removeCommentsChar.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/secrules-language-tests/transformations/removeComments.json.log: test/test-cases/secrules-language-tests/transformations/removeComments.json @p='test/test-cases/secrules-language-tests/transformations/removeComments.json'; \ b='test/test-cases/secrules-language-tests/transformations/removeComments.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/secrules-language-tests/transformations/removeNulls.json.log: test/test-cases/secrules-language-tests/transformations/removeNulls.json @p='test/test-cases/secrules-language-tests/transformations/removeNulls.json'; \ b='test/test-cases/secrules-language-tests/transformations/removeNulls.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/secrules-language-tests/transformations/removeWhitespace.json.log: test/test-cases/secrules-language-tests/transformations/removeWhitespace.json @p='test/test-cases/secrules-language-tests/transformations/removeWhitespace.json'; \ b='test/test-cases/secrules-language-tests/transformations/removeWhitespace.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/secrules-language-tests/transformations/replaceComments.json.log: test/test-cases/secrules-language-tests/transformations/replaceComments.json @p='test/test-cases/secrules-language-tests/transformations/replaceComments.json'; \ b='test/test-cases/secrules-language-tests/transformations/replaceComments.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/secrules-language-tests/transformations/replaceNulls.json.log: test/test-cases/secrules-language-tests/transformations/replaceNulls.json @p='test/test-cases/secrules-language-tests/transformations/replaceNulls.json'; \ b='test/test-cases/secrules-language-tests/transformations/replaceNulls.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/secrules-language-tests/transformations/sha1.json.log: test/test-cases/secrules-language-tests/transformations/sha1.json @p='test/test-cases/secrules-language-tests/transformations/sha1.json'; \ b='test/test-cases/secrules-language-tests/transformations/sha1.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/secrules-language-tests/transformations/sqlHexDecode.json.log: test/test-cases/secrules-language-tests/transformations/sqlHexDecode.json @p='test/test-cases/secrules-language-tests/transformations/sqlHexDecode.json'; \ b='test/test-cases/secrules-language-tests/transformations/sqlHexDecode.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/secrules-language-tests/transformations/trim.json.log: test/test-cases/secrules-language-tests/transformations/trim.json @p='test/test-cases/secrules-language-tests/transformations/trim.json'; \ b='test/test-cases/secrules-language-tests/transformations/trim.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/secrules-language-tests/transformations/trimLeft.json.log: test/test-cases/secrules-language-tests/transformations/trimLeft.json @p='test/test-cases/secrules-language-tests/transformations/trimLeft.json'; \ b='test/test-cases/secrules-language-tests/transformations/trimLeft.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/secrules-language-tests/transformations/trimRight.json.log: test/test-cases/secrules-language-tests/transformations/trimRight.json @p='test/test-cases/secrules-language-tests/transformations/trimRight.json'; \ b='test/test-cases/secrules-language-tests/transformations/trimRight.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/secrules-language-tests/transformations/urlDecode.json.log: test/test-cases/secrules-language-tests/transformations/urlDecode.json @p='test/test-cases/secrules-language-tests/transformations/urlDecode.json'; \ b='test/test-cases/secrules-language-tests/transformations/urlDecode.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/secrules-language-tests/transformations/urlDecodeUni.json.log: test/test-cases/secrules-language-tests/transformations/urlDecodeUni.json @p='test/test-cases/secrules-language-tests/transformations/urlDecodeUni.json'; \ b='test/test-cases/secrules-language-tests/transformations/urlDecodeUni.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/secrules-language-tests/transformations/urlEncode.json.log: test/test-cases/secrules-language-tests/transformations/urlEncode.json @p='test/test-cases/secrules-language-tests/transformations/urlEncode.json'; \ b='test/test-cases/secrules-language-tests/transformations/urlEncode.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test/test-cases/secrules-language-tests/transformations/utf8toUnicode.json.log: test/test-cases/secrules-language-tests/transformations/utf8toUnicode.json @p='test/test-cases/secrules-language-tests/transformations/utf8toUnicode.json'; \ b='test/test-cases/secrules-language-tests/transformations/utf8toUnicode.json'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) .test.log: @p='$<'; \ $(am__set_b); \ $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) @am__EXEEXT_TRUE@.test$(EXEEXT).log: @am__EXEEXT_TRUE@ @p='$<'; \ @am__EXEEXT_TRUE@ $(am__set_b); \ @am__EXEEXT_TRUE@ $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ @am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \ @am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ @am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT) distdir: $(DISTFILES) $(am__remove_distdir) test -d "$(distdir)" || mkdir "$(distdir)" @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 @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done -test -n "$(am__skip_mode_fix)" \ || find "$(distdir)" -type d ! -perm -755 \ -exec chmod u+rwx,go+rx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r "$(distdir)" dist-gzip: distdir tardir=$(distdir) && $(am__tar) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).tar.gz $(am__post_remove_distdir) dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 $(am__post_remove_distdir) dist-lzip: distdir tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz $(am__post_remove_distdir) dist-xz: distdir tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz $(am__post_remove_distdir) dist-tarZ: distdir @echo WARNING: "Support for distribution archives compressed with" \ "legacy program 'compress' is deprecated." >&2 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__post_remove_distdir) dist-shar: distdir @echo WARNING: "Support for shar distribution archives is" \ "deprecated." >&2 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 shar $(distdir) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).shar.gz $(am__post_remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) $(am__post_remove_distdir) dist dist-all: $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:' $(am__post_remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another # tarfile. distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lz*) \ lzip -dc $(distdir).tar.lz | $(am__untar) ;;\ *.tar.xz*) \ xz -dc $(distdir).tar.xz | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ esac chmod -R a-w $(distdir) chmod u+w $(distdir) mkdir $(distdir)/_build $(distdir)/_build/sub $(distdir)/_inst chmod a-w $(distdir) test -d $(distdir)/_build || exit 0; \ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && am__cwd=`pwd` \ && $(am__cd) $(distdir)/_build/sub \ && ../../configure \ $(AM_DISTCHECK_CONFIGURE_FLAGS) \ $(DISTCHECK_CONFIGURE_FLAGS) \ --srcdir=../.. --prefix="$$dc_install_base" \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ && $(MAKE) $(AM_MAKEFLAGS) uninstall \ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ distuninstallcheck \ && chmod -R a-w "$$dc_install_base" \ && ({ \ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ } || { rm -rf "$$dc_destdir"; exit 1; }) \ && rm -rf "$$dc_destdir" \ && $(MAKE) $(AM_MAKEFLAGS) dist \ && rm -rf $(DIST_ARCHIVES) \ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ && cd "$$am__cwd" \ || exit 1 $(am__post_remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' distuninstallcheck: @test -n '$(distuninstallcheck_dir)' || { \ echo 'ERROR: trying to run $@ with an empty' \ '$$(distuninstallcheck_dir)' >&2; \ exit 1; \ }; \ $(am__cd) '$(distuninstallcheck_dir)' || { \ echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \ exit 1; \ }; \ test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ echo " (check DESTDIR support)"; \ fi ; \ $(distuninstallcheck_listfiles) ; \ exit 1; } >&2 distcleancheck: distclean @if test '$(srcdir)' = . ; then \ echo "ERROR: distcleancheck can only run from a VPATH build" ; \ exit 1 ; \ fi @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left in build directory after distclean:" ; \ $(distcleancheck_listfiles) ; \ exit 1; } >&2 check-am: all-am $(MAKE) $(AM_MAKEFLAGS) check-TESTS check: check-recursive all-am: Makefile $(DATA) installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(pkgconfigdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: -test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS) -test -z "$(TEST_LOGS:.log=.trs)" || rm -f $(TEST_LOGS:.log=.trs) -test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) 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." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -f Makefile distclean-am: clean-am distclean-generic distclean-libtool \ distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-pkgconfigDATA install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-pkgconfigDATA .MAKE: $(am__recursive_targets) check-am install-am install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \ am--refresh check check-TESTS check-am clean clean-cscope \ clean-generic clean-libtool cscope cscopelist-am ctags \ ctags-am dist dist-all dist-bzip2 dist-gzip dist-lzip \ dist-shar dist-tarZ dist-xz dist-zip distcheck distclean \ distclean-generic distclean-libtool distclean-tags \ distcleancheck distdir distuninstallcheck 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-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-pkgconfigDATA install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs installdirs-am \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ recheck tags tags-am uninstall uninstall-am \ uninstall-pkgconfigDATA .PRECIOUS: Makefile @TEST_UTILITIES_TRUE@export MAYBE_TEST = test @EXAMPLES_TRUE@export MAYBE_EXAMPLES = examples parser: cat src/parser/seclang-parser.hh | sed "s/return \*new (yyas_ ()) T (t)/return *new (yyas_ ()) T (std::move((T\&)t))/g" > src/parser/seclang-parser.hh.fix && mv src/parser/seclang-parser.hh.fix src/parser/seclang-parser.hh cppcheck: @cppcheck -U YYSTYPE -U MBEDTLS_MD5_ALT -U MBEDTLS_SHA1_ALT \ -D MS_CPPCHECK_DISABLED_FOR_PARSER -U YY_USER_INIT \ --suppressions-list=./test/cppcheck_suppressions.txt \ --enable=warning,style,performance,portability,unusedFunction,missingInclude \ --inconclusive \ --template="warning: {file},{line},{severity},{id},{message}" \ -I headers -I . -I others -I src -I others/mbedtls -I src/parser \ --error-exitcode=1 \ -i "src/parser/seclang-parser.cc" -i "src/parser/seclang-scanner.cc" \ --force --verbose . check-static: cppcheck check-style: check-coding-style check-coding-style: @cpplint.py \ $$(find . -name "*.h" -o -name "*.cc" | xargs) 2>&1 \ | egrep -v $$(echo -n "catchall" ; \ for i in $$(cat test/coding_style_suppressions.txt); do echo -n "|"$$i; done) \ | sed 's/^\./warning: ./g' > coding-style.txt -cat coding-style.txt @VALGRIND_CHECK_RULES@ # 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: modsecurity-v3.0.6/missing0000755000175000017500000001533014146027124016777 0ustar mhsvierulamhsvierula#! /bin/sh # Common wrapper for a few potentially missing GNU programs. scriptversion=2013-10-28.13; # UTC # Copyright (C) 1996-2014 Free Software Foundation, Inc. # Originally written by Fran,cois Pinard , 1996. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. if test $# -eq 0; then echo 1>&2 "Try '$0 --help' for more information" exit 1 fi case $1 in --is-lightweight) # Used by our autoconf macros to check whether the available missing # script is modern enough. exit 0 ;; --run) # Back-compat with the calling convention used by older automake. shift ;; -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due to PROGRAM being missing or too old. Options: -h, --help display this help and exit -v, --version output version information and exit Supported PROGRAM values: aclocal autoconf autoheader autom4te automake makeinfo bison yacc flex lex help2man Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and 'g' are ignored when checking the name. Send bug reports to ." exit $? ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing $scriptversion (GNU Automake)" exit $? ;; -*) echo 1>&2 "$0: unknown '$1' option" echo 1>&2 "Try '$0 --help' for more information" exit 1 ;; esac # Run the given program, remember its exit status. "$@"; st=$? # If it succeeded, we are done. test $st -eq 0 && exit 0 # Also exit now if we it failed (or wasn't found), and '--version' was # passed; such an option is passed most likely to detect whether the # program is present and works. case $2 in --version|--help) exit $st;; esac # Exit code 63 means version mismatch. This often happens when the user # tries to use an ancient version of a tool on a file that requires a # minimum version. if test $st -eq 63; then msg="probably too old" elif test $st -eq 127; then # Program was missing. msg="missing on your system" else # Program was found and executed, but failed. Give up. exit $st fi perl_URL=http://www.perl.org/ flex_URL=http://flex.sourceforge.net/ gnu_software_URL=http://www.gnu.org/software program_details () { case $1 in aclocal|automake) echo "The '$1' program is part of the GNU Automake package:" echo "<$gnu_software_URL/automake>" echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:" echo "<$gnu_software_URL/autoconf>" echo "<$gnu_software_URL/m4/>" echo "<$perl_URL>" ;; autoconf|autom4te|autoheader) echo "The '$1' program is part of the GNU Autoconf package:" echo "<$gnu_software_URL/autoconf/>" echo "It also requires GNU m4 and Perl in order to run:" echo "<$gnu_software_URL/m4/>" echo "<$perl_URL>" ;; esac } give_advice () { # Normalize program name to check for. normalized_program=`echo "$1" | sed ' s/^gnu-//; t s/^gnu//; t s/^g//; t'` printf '%s\n' "'$1' is $msg." configure_deps="'configure.ac' or m4 files included by 'configure.ac'" case $normalized_program in autoconf*) echo "You should only need it if you modified 'configure.ac'," echo "or m4 files included by it." program_details 'autoconf' ;; autoheader*) echo "You should only need it if you modified 'acconfig.h' or" echo "$configure_deps." program_details 'autoheader' ;; automake*) echo "You should only need it if you modified 'Makefile.am' or" echo "$configure_deps." program_details 'automake' ;; aclocal*) echo "You should only need it if you modified 'acinclude.m4' or" echo "$configure_deps." program_details 'aclocal' ;; autom4te*) echo "You might have modified some maintainer files that require" echo "the 'autom4te' program to be rebuilt." program_details 'autom4te' ;; bison*|yacc*) echo "You should only need it if you modified a '.y' file." echo "You may want to install the GNU Bison package:" echo "<$gnu_software_URL/bison/>" ;; lex*|flex*) echo "You should only need it if you modified a '.l' file." echo "You may want to install the Fast Lexical Analyzer package:" echo "<$flex_URL>" ;; help2man*) echo "You should only need it if you modified a dependency" \ "of a man page." echo "You may want to install the GNU Help2man package:" echo "<$gnu_software_URL/help2man/>" ;; makeinfo*) echo "You should only need it if you modified a '.texi' file, or" echo "any other file indirectly affecting the aspect of the manual." echo "You might want to install the Texinfo package:" echo "<$gnu_software_URL/texinfo/>" echo "The spurious makeinfo call might also be the consequence of" echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might" echo "want to install GNU make:" echo "<$gnu_software_URL/make/>" ;; *) echo "You might have modified some files without having the proper" echo "tools for further handling them. Check the 'README' file, it" echo "often tells you about the needed prerequisites for installing" echo "this package. You may also peek at any GNU archive site, in" echo "case some other package contains this missing '$1' program." ;; esac } give_advice "$1" | sed -e '1s/^/WARNING: /' \ -e '2,$s/^/ /' >&2 # Propagate the correct exit status (expected to be 127 for a program # not found, 63 for a program that failed due to version mismatch). exit $st # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: modsecurity-v3.0.6/LICENSE0000664000175000017500000002613514146026157016421 0ustar mhsvierulamhsvierula Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); 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 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. modsecurity-v3.0.6/configure.ac0000664000175000017500000004072514146026157017703 0ustar mhsvierulamhsvierula# ModSecurity configure.ac # Get the hash of the last commit, to be used if it is not an # official release. AC_DEFUN([MSC_GIT_HASH], m4_esyscmd_s(git log -1 --format="%h" --abbrev-commit)) AC_DEFUN([MSC_MAJOR], m4_esyscmd_s(cat headers/modsecurity/modsecurity.h | grep "define MODSECURITY_MAJOR " | awk {'print $3'} | sed 's/\"//g')) AC_DEFUN([MSC_MINOR], m4_esyscmd_s(cat headers/modsecurity/modsecurity.h | grep "define MODSECURITY_MINOR " | awk {'print $3'} | sed 's/\"//g')) AC_DEFUN([MSC_PATCHLEVEL], m4_esyscmd_s(cat headers/modsecurity/modsecurity.h | grep "define MODSECURITY_PATCHLEVEL " | awk {'print $3'} | sed 's/\"//g')) AC_DEFUN([MSC_TAG], m4_esyscmd_s(cat headers/modsecurity/modsecurity.h | grep "define MODSECURITY_FTAG " | awk {'print $3'} | sed 's/\"//g')) # Version definition to be further used by AC_INIT and # .so file naming. m4_define([msc_version_major], [MSC_MAJOR]) m4_define([msc_version_minor], [MSC_MINOR]) m4_define([msc_version_patchlevel], [MSC_PATCHLEVEL]) m4_define([msc_version_c_plus_a], [m4_eval(msc_version_major + msc_version_minor)]) m4_define([msc_version], [msc_version_major.msc_version_minor]) m4_define([msc_version_with_patchlevel], [msc_version_major.msc_version_minor.msc_version_patchlevel]) m4_define([msc_version_git], [m4_esyscmd_s(git describe)]) m4_define([msc_version_info], [msc_version_c_plus_a:msc_version_patchlevel:msc_version_minor]) # Project Information AC_INIT([modsecurity], [3.0], [security@modsecurity.org]) # General definitions AC_CONFIG_MACRO_DIR([build]) AC_PREFIX_DEFAULT([/usr/local/modsecurity]) # General automake options. AM_INIT_AUTOMAKE([-Wall -Werror foreign subdir-objects]) # Check for dependencies (C++, AR, Lex, Yacc and Make) AC_PROG_CXX AM_PROG_AR AC_PROG_MAKE_SET PKG_PROG_PKG_CONFIG # Check if the compiler is c++11 compatible. # AX_CXX_COMPILE_STDCXX_11(,mandatory) # Check for libinjection if ! test -f "${srcdir}/others/libinjection/src/libinjection_html5.c"; then AC_MSG_ERROR([\ libInjection was not found within ModSecurity source directory. libInjection code is available as part of ModSecurity source code in a format of a git-submodule. git-submodule allow us to specify the correct version of libInjection and still uses the libInjection repository to download it. You can download libInjection using git: $ git submodule init $ git submodule update ]) fi # Libinjection version AC_DEFUN([LIBINJECTION_VERSION], m4_esyscmd_s(cd "others/libinjection" && git describe && cd ../..)) # SecLang test version AC_DEFUN([SECLANG_TEST_VERSION], m4_esyscmd_s(cd "test/test-cases/secrules-language-tests" && git log -1 --format="%h" --abbrev-commit && cd ../../..)) # Check for yajl PROG_YAJL AM_CONDITIONAL([YAJL_VERSION], [test "$YAJL_VERSION" != ""]) # Check for LibGeoIP PROG_GEOIP AM_CONDITIONAL([GEOIP_CFLAGS], [test "GEOIP_CFLAGS" != ""]) # Check for MaxMind PROG_MAXMIND AM_CONDITIONAL([MAXMIND_CFLAGS], [test "MAXMIND_CFLAGS" != ""]) # Check for LMDB PROG_LMDB AM_CONDITIONAL([LMDB_CFLAGS], [test "LMDB_CFLAGS" != ""]) # Check for SSDEEP CHECK_SSDEEP AM_CONDITIONAL([SSDEEP_CFLAGS], [test "SSDEEP_CFLAGS" != ""]) # Check for LUA CHECK_LUA AM_CONDITIONAL([LUA_CFLAGS], [test "LUA_CFLAGS" != ""]) # # Check for curl # CHECK_CURL if ! test -z "${CURL_VERSION}"; then AC_DEFINE([MSC_WITH_CURL], [1], [Define if libcurl is available]) fi # # Check for LibXML # CHECK_LIBXML2 # # Check for libpcre # CHECK_PCRE # Checks for header files. AC_HEADER_STDC AC_CHECK_HEADERS([string]) AC_CHECK_HEADERS([iostream]) AC_CHECK_HEADERS([sys/utsname.h]) # ?? LT_INIT([dlopen]) # Identify platform AC_CANONICAL_HOST case $host in *-*-aix*) echo "Checking platform... Identified as AIX" AC_DEFINE([AIX], [1], [Define if the operating system is AIX]) PLATFORM="AIX" ;; *-*-hpux*) echo "Checking platform... Identified as HPUX" AC_DEFINE([HPUX], [1], [Define if the operating system is HPUX]) PLATFORM="HPUX" ;; *-*-darwin*) echo "Checking platform... Identified as Macintosh OS X" AC_DEFINE([MACOSX], [1], [Define if the operating system is Macintosh OSX]) PLATFORM="MacOSX" ;; *-*-linux* | *-*uclinux*) echo "Checking platform... Identified as Linux" AC_DEFINE([LINUX], [1], [Define if the operating system is LINUX]) PLATFORM="Linux" ;; *-*-solaris*) echo "Checking platform... Identified as Solaris" AC_DEFINE([SOLARIS], [1], [Define if the operating system is SOLARIS]) PLATFORM="Solaris" ;; *-*-freebsd*) echo "Checking platform... Identified as FreeBSD" AC_DEFINE([FREEBSD], [1], [Define if the operating system is FREEBSD]) PLATFORM="FreeBSD" ;; *-*-netbsd*) echo "Checking platform... Identified as NetBSD" AC_DEFINE([NETBSD], [1], [Define if the operating system is NETBSD]) PLATFORM="NetBSD" ;; *-*-openbsd*) echo "Checking platform... Identified as OpenBSD" AC_DEFINE([OPENBSD], [1], [Define if the operating system is OPENBSD]) PLATFORM="OpenBSD" ;; *-*-kfreebsd*) echo "Checking platform... Identified as kFreeBSD, treating as linux" AC_DEFINE([FREEBSD], [1], [Define if the operating system is FREEBSD]) PLATFORM="kFreeBSD" ;; *-*-dragonfly*) echo "Checking platform... Identified as DragonFlyBSD, treating as linux" AC_DEFINE([DRAGONFLY], [1], [Define if the operating system is DRAGONFLY]) PLATFORM="DragonFly" ;; *-*-gnu*.*) echo "Checking platform... Identified as HURD, treating as linux" AC_DEFINE([LINUX], [1], [Define if the operating system is LINUX]) PLATFORM="HURD" ;; *) echo "Unknown CANONICAL_HOST $host" exit 1 ;; esac # Variables to be used inside the Makefile.am files. MSC_BASE_DIR=`pwd` AC_SUBST([MSC_BASE_DIR]) MSC_VERSION_INFO=msc_version_info AC_SUBST([MSC_VERSION_INFO]) MSC_VERSION_WITH_PATCHLEVEL=msc_version_with_patchlevel AC_SUBST([MSC_VERSION_WITH_PATCHLEVEL]) MSC_VERSION=msc_version AC_SUBST([MSC_VERSION]) MSC_GIT_VERSION=msc_version_git AC_SUBST([MSC_GIT_VERSION]) AC_ARG_ENABLE(debug-logs, [AC_HELP_STRING([--disable-debug-logs],[Turn off the SecDebugLog feature])], [case "${enableval}" in yes) debugLogs=true ;; no) debugLogs=false ;; *) AC_MSG_ERROR(bad value ${enableval} for --enable-debug-logs) ;; esac], [debugLogs=true] ) if test "$debugLogs" != "true"; then MODSEC_NO_LOGS="-DNO_LOGS=1" AC_SUBST(MODSEC_NO_LOGS) fi # Fuzzer AC_ARG_ENABLE(afl-fuzz, [AC_HELP_STRING([--enable-afl-fuzz],[Turn on the afl fuzzer compilation utilities])], [case "${enableval}" in yes) aflFuzzer=true ;; no) aflFuzzer=false ;; *) AC_MSG_ERROR(bad value ${enableval} for --enable-afl-fuzz) ;; esac], [aflFuzzer=false] ) # Examples AC_ARG_ENABLE(examples, [AC_HELP_STRING([--enable-examples],[Turn on the examples compilation (default option)])], [case "${enableval}" in yes) buildExamples=true ;; no) buildExamples=false ;; *) AC_MSG_ERROR(bad value ${enableval} for --enable-examples) ;; esac], [buildExamples=true] ) # Parser AC_ARG_ENABLE(parser-generation, [AC_HELP_STRING([--enable-parser-generation],[Enables parser generation during the build])], [case "${enableval}" in yes) buildParser=true ;; no) buildParser=false ;; *) AC_MSG_ERROR(bad value ${enableval} for --enable-parser-generation) ;; esac], [buildParser=false] ) # Mutex AC_ARG_ENABLE(mutex-on-pm, [AC_HELP_STRING([--enable-mutex-on-pm],[Treats pm operations as a critical section])], [case "${enableval}" in yes) mutexPm=true ;; no) mutexPm=false ;; *) AC_MSG_ERROR(bad value ${enableval} for --enable-mutex-on-pm) ;; esac], [mutexPm=false] ) if test "$mutexPm" == "true"; then MODSEC_MUTEX_ON_PM="-DMUTEX_ON_PM=1" AC_SUBST(MODSEC_MUTEX_ON_PM) fi if test $buildParser = true; then AC_PROG_YACC AC_PROG_LEX AC_PATH_PROG([FLEX], [flex]) test "x$FLEX" = "x" && AC_MSG_ERROR([flex is needed to build ModSecurity]) AC_PATH_PROG([BISON], [bison]) test "x$BISON" = "x" && AC_MSG_ERROR([bison is needed to build ModSecurity]) AC_PATH_PROG([YACC_INST], $YACC) if test ! -f "$srcdir/gram.c"; then if test -z "$YACC_INST"; then AC_MSG_ERROR([yacc not found - unable to compile ModSecurity]) fi fi fi # Decide if we want to build the tests or not. buildTestUtilities=false if test "x$YAJL_FOUND" = "x1"; then # Regression tests will not be able to run without the logging support. # But we still have the unit tests. # if test "$debugLogs" = "true"; then buildTestUtilities=true # fi fi AM_CONDITIONAL([TEST_UTILITIES], [test $buildTestUtilities = true]) if test $buildTestUtilities = true; then if test $debugLogs = true; then if test -f ./test/test-list.sh; then TEST_CASES=`./test/test-list.sh` fi fi fi AM_CONDITIONAL([EXAMPLES], [test $buildExamples = true]) AM_CONDITIONAL([BUILD_PARSER], [test $buildParser = true]) AM_CONDITIONAL([USE_MUTEX_ON_PM], [test $mutexPm = true]) # General link options if test "$PLATFORM" != "MacOSX" -a "$PLATFORM" != "OpenBSD"; then GLOBAL_LDADD="-lrt " fi if test "$aflFuzzer" == "true"; then FUZZ_CPPCFLAGS="-fsanitize=address -fsanitize-coverage=4 " GLOBAL_LDADD="$GLOBAL_LDADD -fsanitize=address " GLOBAL_CPPFLAGS="$GLOBAL_CPPFLAGS $FUZZ_CPPCFLAGS" $buildExamples = false fi AC_SUBST(GLOBAL_LDADD) AC_SUBST(GLOBAL_CPPFLAGS) AM_CONDITIONAL([AFL_FUZZER], [test $aflFuzzer = true]) GLOBAL_CFLAGS="" AC_SUBST(GLOBAL_CFLAGS) # Files to be generated via autotools. AC_CONFIG_FILES([\ modsecurity.pc \ Makefile \ doc/Makefile \ src/Makefile \ others/Makefile \ tools/Makefile \ tools/rules-check/Makefile ]) AM_COND_IF([TEST_UTILITIES], [AC_CONFIG_FILES([test/Makefile test/benchmark/Makefile])]) AM_COND_IF([EXAMPLES], [AC_CONFIG_FILES([ \ examples/Makefile \ examples/simple_example_using_c/Makefile \ examples/multiprocess_c/Makefile \ examples/reading_logs_with_offset/Makefile \ examples/reading_logs_via_rule_message/Makefile \ examples/using_bodies_in_chunks/Makefile \ ])]) AM_COND_IF([AFL_FUZZER], [AC_CONFIG_FILES([test/fuzzer/Makefile])]) AM_COND_IF([BUILD_PARSER], [AC_CONFIG_FILES([src/parser/Makefile])]) AC_CONFIG_HEADERS([src/config.h]) # Doxygen support DX_HTML_FEATURE(ON) DX_CHM_FEATURE(OFF) DX_CHI_FEATURE(OFF) DX_MAN_FEATURE(OFF) DX_RTF_FEATURE(OFF) DX_XML_FEATURE(OFF) DX_PDF_FEATURE(OFF) DX_PS_FEATURE(OFF) DX_INIT_DOXYGEN([ModSecurity],[doc/doxygen.cfg]) # make check-valgrind AX_VALGRIND_DFLT([sgcheck], [off]) AX_VALGRIND_CHECK # Generate the files. AC_OUTPUT # Print a fancy summary echo " " echo " " echo "ModSecurity - ${MSC_GIT_VERSION} for $PLATFORM" echo " " echo " Mandatory dependencies" echo -n " + libInjection ...." echo LIBINJECTION_VERSION echo -n " + SecLang tests ...." echo SECLANG_TEST_VERSION echo " " echo " Optional dependencies" ## GeoIP - MaxMind if test "x$GEOIP_FOUND" = "x0" && test "x$MAXMIND_FOUND" = "x0"; then echo " + GeoIP/MaxMind ....not found" fi if test "x$GEOIP_FOUND" = "x1" || test "x$MAXMIND_FOUND" = "x1"; then echo -n " + GeoIP/MaxMind ....found " echo "" if test "x$MAXMIND_FOUND" = "x1"; then echo " * (MaxMind) v${MAXMIND_VERSION}" echo " ${MAXMIND_DISPLAY}" fi if test "x$GEOIP_FOUND" = "x1"; then echo " * (GeoIP) v${GEOIP_VERSION}" echo " ${GEOIP_DISPLAY}" fi fi if test "x$GEOIP_FOUND" = "x2" && test "x$MAXMIND_FOUND" = "x2"; then echo " + GeoIP/MaxMind ....disabled" fi ## LibCurl if test "x$CURL_FOUND" = "x0"; then echo " + LibCURL ....not found" fi if test "x$CURL_FOUND" = "x1"; then echo -n " + LibCURL ....found " if ! test "x$CURL_VERSION" = "x"; then echo "v${CURL_VERSION}" else echo "" fi echo " ${CURL_DISPLAY}" fi if test "x$CURL_FOUND" = "x2"; then echo " + LibCURL ....disabled" fi ## YAJL if test "x$YAJL_FOUND" = "x0"; then echo " + YAJL ....not found" fi if test "x$YAJL_FOUND" = "x1"; then echo -n " + YAJL ....found " if ! test "x$YAJL_VERSION" = "x"; then echo "v${YAJL_VERSION}" else echo "" fi echo " ${YAJL_DISPLAY}" fi if test "x$YAJL_FOUND" = "x2"; then echo " + YAJL ....disabled" fi ## LMDB if test "x$LMDB_FOUND" = "x0"; then echo " + LMDB ....not found" fi if test "x$LMDB_FOUND" = "x1"; then echo -n " + LMDB ....found " if ! test "x$LMDB_VERSION" = "x"; then echo "v${LMDB_VERSION}" else echo "" fi echo " ${LMDB_DISPLAY}" fi if test "x$LMDB_FOUND" = "x2"; then echo " + LMDB ....disabled" fi ## libxml2 if test "x$LIBXML2_FOUND" = "x0"; then echo " + LibXML2 ....not found" fi if test "x$LIBXML2_FOUND" = "x1"; then echo -n " + LibXML2 ....found " if ! test "x$LIBXML2_VERSION" = "x"; then echo "v${LIBXML2_VERSION}" else echo "" fi echo " ${LIBXML2_DISPLAY}" fi if test "x$LIBXML2_FOUND" = "x2"; then echo " + LibXML2 ....disabled" fi ## SSDEEP if test "x$SSDEEP_FOUND" = "x0"; then echo " + SSDEEP ....not found" fi if test "x$SSDEEP_FOUND" = "x1"; then echo -n " + SSDEEP ....found " if ! test "x$SSDEEP_VERSION" = "x"; then echo "v${SSDEEP_VERSION}" else echo "" fi echo " ${SSDEEP_DISPLAY}" fi if test "x$SSDEEP_FOUND" = "x2"; then echo " + SSDEEP ....disabled" fi ## LUA if test "x$LUA_FOUND" = "x0"; then echo " + LUA ....not found" fi if test "x$LUA_FOUND" = "x1"; then echo -n " + LUA ....found " if ! test "x$LUA_VERSION" = "x"; then echo "v${LUA_VERSION}" else echo "" fi echo " ${LUA_DISPLAY}" fi if test "x$LUA_FOUND" = "x2"; then echo " + LUA ....disabled" fi echo " " echo " Other Options" if test $buildTestUtilities = true; then if test $debugLogs = true; then echo " + Test Utilities ....enabled" else echo " + Test Utilities ....partially" fi else echo " + Test Utilities ....disabled" fi if test $debugLogs = true; then echo " + SecDebugLog ....enabled" else echo " + SecDebugLog ....disabled" fi if test "$aflFuzzer" = "true"; then echo " + afl fuzzer ....enabled" echo " ($FUZZ_CPPCFLAGS)" else echo " + afl fuzzer ....disabled" fi if test "$buildExamples" = "true"; then echo " + library examples ....enabled" else echo " + library examples ....disabled" fi if test "$buildParser" = "true"; then echo " + Building parser ....enabled" else echo " + Building parser ....disabled" fi if test "$mutexPm" = "true"; then echo " + Treating pm operations as critical section ....enabled" else echo " + Treating pm operations as critical section ....disabled" fi echo " " if test "$aflFuzzer" = "true"; then echo "WARNING: afl fuzzer was enabled. Make sure you are using the" echo " 'afl-clang-fast' as the compiler, otherwise the compilation" echo " will fail." echo " " echo " You can set the compiler using:" echo " " echo " $ export CXX=afl-clang-fast++ " echo " $ export CC=afl-clang-fast " echo " " fi modsecurity-v3.0.6/AUTHORS0000664000175000017500000000031214146026157016451 0ustar mhsvierulamhsvierulazimmerle = Felipe Zimmerle rbarnett = Ryan C. Barnett csanders-git = Chaim Sanders victorhora = Victor Hora modsecurity-v3.0.6/compile0000755000175000017500000001624514146027124016764 0ustar mhsvierulamhsvierula#! /bin/sh # Wrapper for compilers which do not understand '-c -o'. scriptversion=2012-10-14.11; # UTC # Copyright (C) 1999-2014 Free Software Foundation, Inc. # Written by Tom Tromey . # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # This file is maintained in Automake, please report # bugs to or send patches to # . nl=' ' # We need space, tab and new line, in precisely that order. Quoting is # there to prevent tools from complaining about whitespace usage. IFS=" "" $nl" file_conv= # func_file_conv build_file lazy # Convert a $build file to $host form and store it in $file # Currently only supports Windows hosts. If the determined conversion # type is listed in (the comma separated) LAZY, no conversion will # take place. func_file_conv () { file=$1 case $file in / | /[!/]*) # absolute file, and not a UNC file if test -z "$file_conv"; then # lazily determine how to convert abs files case `uname -s` in MINGW*) file_conv=mingw ;; CYGWIN*) file_conv=cygwin ;; *) file_conv=wine ;; esac fi case $file_conv/,$2, in *,$file_conv,*) ;; mingw/*) file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` ;; cygwin/*) file=`cygpath -m "$file" || echo "$file"` ;; wine/*) file=`winepath -w "$file" || echo "$file"` ;; esac ;; esac } # func_cl_dashL linkdir # Make cl look for libraries in LINKDIR func_cl_dashL () { func_file_conv "$1" if test -z "$lib_path"; then lib_path=$file else lib_path="$lib_path;$file" fi linker_opts="$linker_opts -LIBPATH:$file" } # func_cl_dashl library # Do a library search-path lookup for cl func_cl_dashl () { lib=$1 found=no save_IFS=$IFS IFS=';' for dir in $lib_path $LIB do IFS=$save_IFS if $shared && test -f "$dir/$lib.dll.lib"; then found=yes lib=$dir/$lib.dll.lib break fi if test -f "$dir/$lib.lib"; then found=yes lib=$dir/$lib.lib break fi if test -f "$dir/lib$lib.a"; then found=yes lib=$dir/lib$lib.a break fi done IFS=$save_IFS if test "$found" != yes; then lib=$lib.lib fi } # func_cl_wrapper cl arg... # Adjust compile command to suit cl func_cl_wrapper () { # Assume a capable shell lib_path= shared=: linker_opts= for arg do if test -n "$eat"; then eat= else case $1 in -o) # configure might choose to run compile as 'compile cc -o foo foo.c'. eat=1 case $2 in *.o | *.[oO][bB][jJ]) func_file_conv "$2" set x "$@" -Fo"$file" shift ;; *) func_file_conv "$2" set x "$@" -Fe"$file" shift ;; esac ;; -I) eat=1 func_file_conv "$2" mingw set x "$@" -I"$file" shift ;; -I*) func_file_conv "${1#-I}" mingw set x "$@" -I"$file" shift ;; -l) eat=1 func_cl_dashl "$2" set x "$@" "$lib" shift ;; -l*) func_cl_dashl "${1#-l}" set x "$@" "$lib" shift ;; -L) eat=1 func_cl_dashL "$2" ;; -L*) func_cl_dashL "${1#-L}" ;; -static) shared=false ;; -Wl,*) arg=${1#-Wl,} save_ifs="$IFS"; IFS=',' for flag in $arg; do IFS="$save_ifs" linker_opts="$linker_opts $flag" done IFS="$save_ifs" ;; -Xlinker) eat=1 linker_opts="$linker_opts $2" ;; -*) set x "$@" "$1" shift ;; *.cc | *.CC | *.cxx | *.CXX | *.[cC]++) func_file_conv "$1" set x "$@" -Tp"$file" shift ;; *.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO]) func_file_conv "$1" mingw set x "$@" "$file" shift ;; *) set x "$@" "$1" shift ;; esac fi shift done if test -n "$linker_opts"; then linker_opts="-link$linker_opts" fi exec "$@" $linker_opts exit 1 } eat= case $1 in '') echo "$0: No command. Try '$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: compile [--help] [--version] PROGRAM [ARGS] Wrapper for compilers which do not understand '-c -o'. Remove '-o dest.o' from ARGS, run PROGRAM with the remaining arguments, and rename the output as expected. If you are trying to build a whole package this is not the right script to run: please start by reading the file 'INSTALL'. Report bugs to . EOF exit $? ;; -v | --v*) echo "compile $scriptversion" exit $? ;; cl | *[/\\]cl | cl.exe | *[/\\]cl.exe ) func_cl_wrapper "$@" # Doesn't return... ;; esac ofile= cfile= for arg do if test -n "$eat"; then eat= else case $1 in -o) # configure might choose to run compile as 'compile cc -o foo foo.c'. # So we strip '-o arg' only if arg is an object. eat=1 case $2 in *.o | *.obj) ofile=$2 ;; *) set x "$@" -o "$2" shift ;; esac ;; *.c) cfile=$1 set x "$@" "$1" shift ;; *) set x "$@" "$1" shift ;; esac fi shift done if test -z "$ofile" || test -z "$cfile"; then # If no '-o' option was seen then we might have been invoked from a # pattern rule where we don't need one. That is ok -- this is a # normal compilation that the losing compiler can handle. If no # '.c' file was seen then we are probably linking. That is also # ok. exec "$@" fi # Name of file we expect compiler to create. cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'` # Create the lock directory. # Note: use '[/\\:.-]' here to ensure that we don't use the same name # that we are using for the .o file. Also, base the name on the expected # object file name, since that is what matters with a parallel build. lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d while true; do if mkdir "$lockdir" >/dev/null 2>&1; then break fi sleep 1 done # FIXME: race condition here if user kills between mkdir and trap. trap "rmdir '$lockdir'; exit 1" 1 2 15 # Run the compile. "$@" ret=$? if test -f "$cofile"; then test "$cofile" = "$ofile" || mv "$cofile" "$ofile" elif test -f "${cofile}bj"; then test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile" fi rmdir "$lockdir" exit $ret # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: modsecurity-v3.0.6/config.sub0000755000175000017500000010645014146027124017367 0ustar mhsvierulamhsvierula#! /bin/sh # Configuration validation subroutine script. # Copyright 1992-2018 Free Software Foundation, Inc. timestamp='2018-02-22' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, see . # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that # program. This Exception is an additional permission under section 7 # of the GNU General Public License, version 3 ("GPLv3"). # Please send patches to . # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. # If it is invalid, we print an error message on stderr and exit with code 1. # Otherwise, we print the canonical config type on stdout and succeed. # You can get the latest version of this script from: # https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases # that are meaningful with *any* GNU software. # Each package is responsible for reporting which valid configurations # it does not support. The user should be able to distinguish # a failure to support a valid configuration from a meaningless # configuration. # The goal of this file is to map all the various variations of a given # machine specification into a single specification in the form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or in some cases, the newer four-part form: # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS Canonicalize a configuration name. Options: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.sub ($timestamp) Copyright 1992-2018 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" exit 1 ;; *local*) # First pass through any local machine types. echo "$1" exit ;; * ) break ;; esac done case $# in 0) echo "$me: missing argument$help" >&2 exit 1;; 1) ;; *) echo "$me: too many arguments$help" >&2 exit 1;; esac # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ knetbsd*-gnu* | netbsd*-gnu* | netbsd*-eabi* | \ kopensolaris*-gnu* | cloudabi*-eabi* | \ storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; android-linux) os=-linux-android basic_machine=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown ;; *) basic_machine=`echo "$1" | sed 's/-[^-]*$//'` if [ "$basic_machine" != "$1" ] then os=`echo "$1" | sed 's/.*-/-/'` else os=; fi ;; esac ### Let's recognize common machines as not being operating systems so ### that things like config.sub decstation-3100 work. We also ### recognize some manufacturers as not being operating systems, so we ### can provide default operating systems below. case $os in -sun*os*) # Prevent following clause from handling this invalid input. ;; -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ -apple | -axis | -knuth | -cray | -microblaze*) os= basic_machine=$1 ;; -bluegene*) os=-cnk ;; -sim | -cisco | -oki | -wec | -winbond) os= basic_machine=$1 ;; -scout) ;; -wrs) os=-vxworks basic_machine=$1 ;; -chorusos*) os=-chorusos basic_machine=$1 ;; -chorusrdb) os=-chorusrdb basic_machine=$1 ;; -hiux*) os=-hiuxwe2 ;; -sco6) os=-sco5v6 basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` ;; -sco5) os=-sco3.2v5 basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` ;; -sco4) os=-sco3.2v4 basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` ;; -sco3.2.[4-9]*) os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` ;; -sco3.2v[4-9]*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` ;; -sco5v6*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` ;; -sco*) os=-sco3.2v2 basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` ;; -udk*) basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` ;; -isc) os=-isc2.2 basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` ;; -clix*) basic_machine=clipper-intergraph ;; -isc*) basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` ;; -lynx*178) os=-lynxos178 ;; -lynx*5) os=-lynxos5 ;; -lynx*) os=-lynxos ;; -ptx*) basic_machine=`echo "$1" | sed -e 's/86-.*/86-sequent/'` ;; -psos*) os=-psos ;; -mint | -mint[0-9]*) basic_machine=m68k-atari os=-mint ;; esac # Decode aliases for certain CPU-COMPANY combinations. case $basic_machine in # Recognize the basic CPU types without company name. # Some are omitted here because they have special meanings below. 1750a | 580 \ | a29k \ | aarch64 | aarch64_be \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ | arc | arceb \ | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \ | avr | avr32 \ | ba \ | be32 | be64 \ | bfin \ | c4x | c8051 | clipper \ | d10v | d30v | dlx | dsp16xx \ | e2k | epiphany \ | fido | fr30 | frv | ft32 \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | hexagon \ | i370 | i860 | i960 | ia16 | ia64 \ | ip2k | iq2000 \ | k1om \ | le32 | le64 \ | lm32 \ | m32c | m32r | m32rle | m68000 | m68k | m88k \ | maxq | mb | microblaze | microblazeel | mcore | mep | metag \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ | mips64octeon | mips64octeonel \ | mips64orion | mips64orionel \ | mips64r5900 | mips64r5900el \ | mips64vr | mips64vrel \ | mips64vr4100 | mips64vr4100el \ | mips64vr4300 | mips64vr4300el \ | mips64vr5000 | mips64vr5000el \ | mips64vr5900 | mips64vr5900el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ | mipsisa32r6 | mipsisa32r6el \ | mipsisa64 | mipsisa64el \ | mipsisa64r2 | mipsisa64r2el \ | mipsisa64r6 | mipsisa64r6el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ | mipsr5900 | mipsr5900el \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | moxie \ | mt \ | msp430 \ | nds32 | nds32le | nds32be \ | nios | nios2 | nios2eb | nios2el \ | ns16k | ns32k \ | open8 | or1k | or1knd | or32 \ | pdp10 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle \ | pru \ | pyramid \ | riscv32 | riscv64 \ | rl78 | rx \ | score \ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[234]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ | spu \ | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ | ubicom32 \ | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ | visium \ | wasm32 \ | x86 | xc16x | xstormy16 | xtensa \ | z8k | z80) basic_machine=$basic_machine-unknown ;; c54x) basic_machine=tic54x-unknown ;; c55x) basic_machine=tic55x-unknown ;; c6x) basic_machine=tic6x-unknown ;; leon|leon[3-9]) basic_machine=sparc-$basic_machine ;; m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip) basic_machine=$basic_machine-unknown os=-none ;; m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65) ;; ms1) basic_machine=mt-unknown ;; strongarm | thumb | xscale) basic_machine=arm-unknown ;; xgate) basic_machine=$basic_machine-unknown os=-none ;; xscaleeb) basic_machine=armeb-unknown ;; xscaleel) basic_machine=armel-unknown ;; # We use `pc' rather than `unknown' # because (1) that's what they normally are, and # (2) the word "unknown" tends to confuse beginning users. i*86 | x86_64) basic_machine=$basic_machine-pc ;; # Object if more than one company name word. *-*-*) echo Invalid configuration \`"$1"\': machine \`"$basic_machine"\' not recognized 1>&2 exit 1 ;; # Recognize the basic CPU types with company name. 580-* \ | a29k-* \ | aarch64-* | aarch64_be-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* | avr32-* \ | ba-* \ | be32-* | be64-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* \ | c8051-* | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | e2k-* | elxsi-* \ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | hexagon-* \ | i*86-* | i860-* | i960-* | ia16-* | ia64-* \ | ip2k-* | iq2000-* \ | k1om-* \ | le32-* | le64-* \ | lm32-* \ | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ | microblaze-* | microblazeel-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ | mips64octeon-* | mips64octeonel-* \ | mips64orion-* | mips64orionel-* \ | mips64r5900-* | mips64r5900el-* \ | mips64vr-* | mips64vrel-* \ | mips64vr4100-* | mips64vr4100el-* \ | mips64vr4300-* | mips64vr4300el-* \ | mips64vr5000-* | mips64vr5000el-* \ | mips64vr5900-* | mips64vr5900el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ | mipsisa32r6-* | mipsisa32r6el-* \ | mipsisa64-* | mipsisa64el-* \ | mipsisa64r2-* | mipsisa64r2el-* \ | mipsisa64r6-* | mipsisa64r6el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipsr5900-* | mipsr5900el-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ | mt-* \ | msp430-* \ | nds32-* | nds32le-* | nds32be-* \ | nios-* | nios2-* | nios2eb-* | nios2el-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | open8-* \ | or1k*-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ | pru-* \ | pyramid-* \ | riscv32-* | riscv64-* \ | rl78-* | romp-* | rs6000-* | rx-* \ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ | sparclite-* \ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx*-* \ | tahoe-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | tile*-* \ | tron-* \ | ubicom32-* \ | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ | vax-* \ | visium-* \ | wasm32-* \ | we32k-* \ | x86-* | x86_64-* | xc16x-* | xps100-* \ | xstormy16-* | xtensa*-* \ | ymp-* \ | z8k-* | z80-*) ;; # Recognize the basic CPU types without company name, with glob match. xtensa*) basic_machine=$basic_machine-unknown ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 386bsd) basic_machine=i386-pc os=-bsd ;; 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) basic_machine=m68000-att ;; 3b*) basic_machine=we32k-att ;; a29khif) basic_machine=a29k-amd os=-udi ;; abacus) basic_machine=abacus-unknown ;; adobe68k) basic_machine=m68010-adobe os=-scout ;; alliant | fx80) basic_machine=fx80-alliant ;; altos | altos3068) basic_machine=m68k-altos ;; am29k) basic_machine=a29k-none os=-bsd ;; amd64) basic_machine=x86_64-pc ;; amd64-*) basic_machine=x86_64-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; amdahl) basic_machine=580-amdahl os=-sysv ;; amiga | amiga-*) basic_machine=m68k-unknown ;; amigaos | amigados) basic_machine=m68k-unknown os=-amigaos ;; amigaunix | amix) basic_machine=m68k-unknown os=-sysv4 ;; apollo68) basic_machine=m68k-apollo os=-sysv ;; apollo68bsd) basic_machine=m68k-apollo os=-bsd ;; aros) basic_machine=i386-pc os=-aros ;; asmjs) basic_machine=asmjs-unknown ;; aux) basic_machine=m68k-apple os=-aux ;; balance) basic_machine=ns32k-sequent os=-dynix ;; blackfin) basic_machine=bfin-unknown os=-linux ;; blackfin-*) basic_machine=bfin-`echo "$basic_machine" | sed 's/^[^-]*-//'` os=-linux ;; bluegene*) basic_machine=powerpc-ibm os=-cnk ;; c54x-*) basic_machine=tic54x-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; c55x-*) basic_machine=tic55x-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; c6x-*) basic_machine=tic6x-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; c90) basic_machine=c90-cray os=-unicos ;; cegcc) basic_machine=arm-unknown os=-cegcc ;; convex-c1) basic_machine=c1-convex os=-bsd ;; convex-c2) basic_machine=c2-convex os=-bsd ;; convex-c32) basic_machine=c32-convex os=-bsd ;; convex-c34) basic_machine=c34-convex os=-bsd ;; convex-c38) basic_machine=c38-convex os=-bsd ;; cray | j90) basic_machine=j90-cray os=-unicos ;; craynv) basic_machine=craynv-cray os=-unicosmp ;; cr16 | cr16-*) basic_machine=cr16-unknown os=-elf ;; crds | unos) basic_machine=m68k-crds ;; crisv32 | crisv32-* | etraxfs*) basic_machine=crisv32-axis ;; cris | cris-* | etrax*) basic_machine=cris-axis ;; crx) basic_machine=crx-unknown os=-elf ;; da30 | da30-*) basic_machine=m68k-da30 ;; decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) basic_machine=mips-dec ;; decsystem10* | dec10*) basic_machine=pdp10-dec os=-tops10 ;; decsystem20* | dec20*) basic_machine=pdp10-dec os=-tops20 ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) basic_machine=m68k-motorola ;; delta88) basic_machine=m88k-motorola os=-sysv3 ;; dicos) basic_machine=i686-pc os=-dicos ;; djgpp) basic_machine=i586-pc os=-msdosdjgpp ;; dpx20 | dpx20-*) basic_machine=rs6000-bull os=-bosx ;; dpx2*) basic_machine=m68k-bull os=-sysv3 ;; e500v[12]) basic_machine=powerpc-unknown os=$os"spe" ;; e500v[12]-*) basic_machine=powerpc-`echo "$basic_machine" | sed 's/^[^-]*-//'` os=$os"spe" ;; ebmon29k) basic_machine=a29k-amd os=-ebmon ;; elxsi) basic_machine=elxsi-elxsi os=-bsd ;; encore | umax | mmax) basic_machine=ns32k-encore ;; es1800 | OSE68k | ose68k | ose | OSE) basic_machine=m68k-ericsson os=-ose ;; fx2800) basic_machine=i860-alliant ;; genix) basic_machine=ns32k-ns ;; gmicro) basic_machine=tron-gmicro os=-sysv ;; go32) basic_machine=i386-pc os=-go32 ;; h3050r* | hiux*) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; h8300hms) basic_machine=h8300-hitachi os=-hms ;; h8300xray) basic_machine=h8300-hitachi os=-xray ;; h8500hms) basic_machine=h8500-hitachi os=-hms ;; harris) basic_machine=m88k-harris os=-sysv3 ;; hp300-*) basic_machine=m68k-hp ;; hp300bsd) basic_machine=m68k-hp os=-bsd ;; hp300hpux) basic_machine=m68k-hp os=-hpux ;; hp3k9[0-9][0-9] | hp9[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k2[0-9][0-9] | hp9k31[0-9]) basic_machine=m68000-hp ;; hp9k3[2-9][0-9]) basic_machine=m68k-hp ;; hp9k6[0-9][0-9] | hp6[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k7[0-79][0-9] | hp7[0-79][0-9]) basic_machine=hppa1.1-hp ;; hp9k78[0-9] | hp78[0-9]) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[0-9][13679] | hp8[0-9][13679]) basic_machine=hppa1.1-hp ;; hp9k8[0-9][0-9] | hp8[0-9][0-9]) basic_machine=hppa1.0-hp ;; hppaosf) basic_machine=hppa1.1-hp os=-osf ;; hppro) basic_machine=hppa1.1-hp os=-proelf ;; i370-ibm* | ibm*) basic_machine=i370-ibm ;; i*86v32) basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` os=-sysv32 ;; i*86v4*) basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` os=-sysv4 ;; i*86v) basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` os=-sysv ;; i*86sol2) basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` os=-solaris2 ;; i386mach) basic_machine=i386-mach os=-mach ;; vsta) basic_machine=i386-unknown os=-vsta ;; iris | iris4d) basic_machine=mips-sgi case $os in -irix*) ;; *) os=-irix4 ;; esac ;; isi68 | isi) basic_machine=m68k-isi os=-sysv ;; leon-*|leon[3-9]-*) basic_machine=sparc-`echo "$basic_machine" | sed 's/-.*//'` ;; m68knommu) basic_machine=m68k-unknown os=-linux ;; m68knommu-*) basic_machine=m68k-`echo "$basic_machine" | sed 's/^[^-]*-//'` os=-linux ;; magnum | m3230) basic_machine=mips-mips os=-sysv ;; merlin) basic_machine=ns32k-utek os=-sysv ;; microblaze*) basic_machine=microblaze-xilinx ;; mingw64) basic_machine=x86_64-pc os=-mingw64 ;; mingw32) basic_machine=i686-pc os=-mingw32 ;; mingw32ce) basic_machine=arm-unknown os=-mingw32ce ;; miniframe) basic_machine=m68000-convergent ;; *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) basic_machine=m68k-atari os=-mint ;; mips3*-*) basic_machine=`echo "$basic_machine" | sed -e 's/mips3/mips64/'` ;; mips3*) basic_machine=`echo "$basic_machine" | sed -e 's/mips3/mips64/'`-unknown ;; monitor) basic_machine=m68k-rom68k os=-coff ;; morphos) basic_machine=powerpc-unknown os=-morphos ;; moxiebox) basic_machine=moxie-unknown os=-moxiebox ;; msdos) basic_machine=i386-pc os=-msdos ;; ms1-*) basic_machine=`echo "$basic_machine" | sed -e 's/ms1-/mt-/'` ;; msys) basic_machine=i686-pc os=-msys ;; mvs) basic_machine=i370-ibm os=-mvs ;; nacl) basic_machine=le32-unknown os=-nacl ;; ncr3000) basic_machine=i486-ncr os=-sysv4 ;; netbsd386) basic_machine=i386-unknown os=-netbsd ;; netwinder) basic_machine=armv4l-rebel os=-linux ;; news | news700 | news800 | news900) basic_machine=m68k-sony os=-newsos ;; news1000) basic_machine=m68030-sony os=-newsos ;; news-3600 | risc-news) basic_machine=mips-sony os=-newsos ;; necv70) basic_machine=v70-nec os=-sysv ;; next | m*-next) basic_machine=m68k-next case $os in -nextstep* ) ;; -ns2*) os=-nextstep2 ;; *) os=-nextstep3 ;; esac ;; nh3000) basic_machine=m68k-harris os=-cxux ;; nh[45]000) basic_machine=m88k-harris os=-cxux ;; nindy960) basic_machine=i960-intel os=-nindy ;; mon960) basic_machine=i960-intel os=-mon960 ;; nonstopux) basic_machine=mips-compaq os=-nonstopux ;; np1) basic_machine=np1-gould ;; neo-tandem) basic_machine=neo-tandem ;; nse-tandem) basic_machine=nse-tandem ;; nsr-tandem) basic_machine=nsr-tandem ;; nsv-tandem) basic_machine=nsv-tandem ;; nsx-tandem) basic_machine=nsx-tandem ;; op50n-* | op60c-*) basic_machine=hppa1.1-oki os=-proelf ;; openrisc | openrisc-*) basic_machine=or32-unknown ;; os400) basic_machine=powerpc-ibm os=-os400 ;; OSE68000 | ose68000) basic_machine=m68000-ericsson os=-ose ;; os68k) basic_machine=m68k-none os=-os68k ;; pa-hitachi) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; paragon) basic_machine=i860-intel os=-osf ;; parisc) basic_machine=hppa-unknown os=-linux ;; parisc-*) basic_machine=hppa-`echo "$basic_machine" | sed 's/^[^-]*-//'` os=-linux ;; pbd) basic_machine=sparc-tti ;; pbb) basic_machine=m68k-tti ;; pc532 | pc532-*) basic_machine=ns32k-pc532 ;; pc98) basic_machine=i386-pc ;; pc98-*) basic_machine=i386-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc ;; pentiumpro | p6 | 6x86 | athlon | athlon_*) basic_machine=i686-pc ;; pentiumii | pentium2 | pentiumiii | pentium3) basic_machine=i686-pc ;; pentium4) basic_machine=i786-pc ;; pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) basic_machine=i586-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; pentiumpro-* | p6-* | 6x86-* | athlon-*) basic_machine=i686-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) basic_machine=i686-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; pentium4-*) basic_machine=i786-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; pn) basic_machine=pn-gould ;; power) basic_machine=power-ibm ;; ppc | ppcbe) basic_machine=powerpc-unknown ;; ppc-* | ppcbe-*) basic_machine=powerpc-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; ppcle | powerpclittle) basic_machine=powerpcle-unknown ;; ppcle-* | powerpclittle-*) basic_machine=powerpcle-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; ppc64) basic_machine=powerpc64-unknown ;; ppc64-*) basic_machine=powerpc64-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; ppc64le | powerpc64little) basic_machine=powerpc64le-unknown ;; ppc64le-* | powerpc64little-*) basic_machine=powerpc64le-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; ps2) basic_machine=i386-ibm ;; pw32) basic_machine=i586-unknown os=-pw32 ;; rdos | rdos64) basic_machine=x86_64-pc os=-rdos ;; rdos32) basic_machine=i386-pc os=-rdos ;; rom68k) basic_machine=m68k-rom68k os=-coff ;; rm[46]00) basic_machine=mips-siemens ;; rtpc | rtpc-*) basic_machine=romp-ibm ;; s390 | s390-*) basic_machine=s390-ibm ;; s390x | s390x-*) basic_machine=s390x-ibm ;; sa29200) basic_machine=a29k-amd os=-udi ;; sb1) basic_machine=mipsisa64sb1-unknown ;; sb1el) basic_machine=mipsisa64sb1el-unknown ;; sde) basic_machine=mipsisa32-sde os=-elf ;; sei) basic_machine=mips-sei os=-seiux ;; sequent) basic_machine=i386-sequent ;; sh5el) basic_machine=sh5le-unknown ;; simso-wrs) basic_machine=sparclite-wrs os=-vxworks ;; sps7) basic_machine=m68k-bull os=-sysv2 ;; spur) basic_machine=spur-unknown ;; st2000) basic_machine=m68k-tandem ;; stratus) basic_machine=i860-stratus os=-sysv4 ;; strongarm-* | thumb-*) basic_machine=arm-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; sun2) basic_machine=m68000-sun ;; sun2os3) basic_machine=m68000-sun os=-sunos3 ;; sun2os4) basic_machine=m68000-sun os=-sunos4 ;; sun3os3) basic_machine=m68k-sun os=-sunos3 ;; sun3os4) basic_machine=m68k-sun os=-sunos4 ;; sun4os3) basic_machine=sparc-sun os=-sunos3 ;; sun4os4) basic_machine=sparc-sun os=-sunos4 ;; sun4sol2) basic_machine=sparc-sun os=-solaris2 ;; sun3 | sun3-*) basic_machine=m68k-sun ;; sun4) basic_machine=sparc-sun ;; sun386 | sun386i | roadrunner) basic_machine=i386-sun ;; sv1) basic_machine=sv1-cray os=-unicos ;; symmetry) basic_machine=i386-sequent os=-dynix ;; t3e) basic_machine=alphaev5-cray os=-unicos ;; t90) basic_machine=t90-cray os=-unicos ;; tile*) basic_machine=$basic_machine-unknown os=-linux-gnu ;; tx39) basic_machine=mipstx39-unknown ;; tx39el) basic_machine=mipstx39el-unknown ;; toad1) basic_machine=pdp10-xkl os=-tops20 ;; tower | tower-32) basic_machine=m68k-ncr ;; tpf) basic_machine=s390x-ibm os=-tpf ;; udi29k) basic_machine=a29k-amd os=-udi ;; ultra3) basic_machine=a29k-nyu os=-sym1 ;; v810 | necv810) basic_machine=v810-nec os=-none ;; vaxv) basic_machine=vax-dec os=-sysv ;; vms) basic_machine=vax-dec os=-vms ;; vpp*|vx|vx-*) basic_machine=f301-fujitsu ;; vxworks960) basic_machine=i960-wrs os=-vxworks ;; vxworks68) basic_machine=m68k-wrs os=-vxworks ;; vxworks29k) basic_machine=a29k-wrs os=-vxworks ;; w65*) basic_machine=w65-wdc os=-none ;; w89k-*) basic_machine=hppa1.1-winbond os=-proelf ;; x64) basic_machine=x86_64-pc ;; xbox) basic_machine=i686-pc os=-mingw32 ;; xps | xps100) basic_machine=xps100-honeywell ;; xscale-* | xscalee[bl]-*) basic_machine=`echo "$basic_machine" | sed 's/^xscale/arm/'` ;; ymp) basic_machine=ymp-cray os=-unicos ;; none) basic_machine=none-none os=-none ;; # Here we handle the default manufacturer of certain CPU types. It is in # some cases the only manufacturer, in others, it is the most popular. w89k) basic_machine=hppa1.1-winbond ;; op50n) basic_machine=hppa1.1-oki ;; op60c) basic_machine=hppa1.1-oki ;; romp) basic_machine=romp-ibm ;; mmix) basic_machine=mmix-knuth ;; rs6000) basic_machine=rs6000-ibm ;; vax) basic_machine=vax-dec ;; pdp11) basic_machine=pdp11-dec ;; we32k) basic_machine=we32k-att ;; sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; cydra) basic_machine=cydra-cydrome ;; orion) basic_machine=orion-highlevel ;; orion105) basic_machine=clipper-highlevel ;; mac | mpw | mac-mpw) basic_machine=m68k-apple ;; pmac | pmac-mpw) basic_machine=powerpc-apple ;; *-unknown) # Make sure to match an already-canonicalized machine name. ;; *) echo Invalid configuration \`"$1"\': machine \`"$basic_machine"\' not recognized 1>&2 exit 1 ;; esac # Here we canonicalize certain aliases for manufacturers. case $basic_machine in *-digital*) basic_machine=`echo "$basic_machine" | sed 's/digital.*/dec/'` ;; *-commodore*) basic_machine=`echo "$basic_machine" | sed 's/commodore.*/cbm/'` ;; *) ;; esac # Decode manufacturer-specific aliases for certain operating systems. if [ x"$os" != x"" ] then case $os in # First match some system type aliases that might get confused # with valid system types. # -solaris* is a basic system type, with this one exception. -auroraux) os=-auroraux ;; -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; -solaris) os=-solaris2 ;; -unixware*) os=-sysv4.2uw ;; -gnu/linux*) os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` ;; # es1800 is here to avoid being matched by es* (a different OS) -es1800*) os=-ose ;; # Now accept the basic system types. # The portable systems comes first. # Each alternative MUST end in a * to match a version number. # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ | -sym* | -kopensolaris* | -plan9* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* | -aros* | -cloudabi* | -sortix* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -knetbsd* | -mirbsd* | -netbsd* \ | -bitrig* | -openbsd* | -solidbsd* | -libertybsd* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* | -cegcc* | -glidix* \ | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -midipix* | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ | -linux-newlib* | -linux-musl* | -linux-uclibc* \ | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \ | -onefs* | -tirtos* | -phoenix* | -fuchsia* | -redox* | -bme* \ | -midnightbsd*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) case $basic_machine in x86-* | i*86-*) ;; *) os=-nto$os ;; esac ;; -nto-qnx*) ;; -nto*) os=`echo $os | sed -e 's|nto|nto-qnx|'` ;; -sim | -xray | -os68k* | -v88r* \ | -windows* | -osx | -abug | -netware* | -os9* \ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) ;; -mac*) os=`echo "$os" | sed -e 's|mac|macos|'` ;; -linux-dietlibc) os=-linux-dietlibc ;; -linux*) os=`echo $os | sed -e 's|linux|linux-gnu|'` ;; -sunos5*) os=`echo "$os" | sed -e 's|sunos5|solaris2|'` ;; -sunos6*) os=`echo "$os" | sed -e 's|sunos6|solaris3|'` ;; -opened*) os=-openedition ;; -os400*) os=-os400 ;; -wince*) os=-wince ;; -utek*) os=-bsd ;; -dynix*) os=-bsd ;; -acis*) os=-aos ;; -atheos*) os=-atheos ;; -syllable*) os=-syllable ;; -386bsd) os=-bsd ;; -ctix* | -uts*) os=-sysv ;; -nova*) os=-rtmk-nova ;; -ns2) os=-nextstep2 ;; -nsk*) os=-nsk ;; # Preserve the version number of sinix5. -sinix5.*) os=`echo $os | sed -e 's|sinix|sysv|'` ;; -sinix*) os=-sysv4 ;; -tpf*) os=-tpf ;; -triton*) os=-sysv3 ;; -oss*) os=-sysv3 ;; -svr4*) os=-sysv4 ;; -svr3) os=-sysv3 ;; -sysvr4) os=-sysv4 ;; # This must come after -sysvr4. -sysv*) ;; -ose*) os=-ose ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) os=-mint ;; -zvmoe) os=-zvmoe ;; -dicos*) os=-dicos ;; -pikeos*) # Until real need of OS specific support for # particular features comes up, bare metal # configurations are quite functional. case $basic_machine in arm*) os=-eabi ;; *) os=-elf ;; esac ;; -nacl*) ;; -ios) ;; -none) ;; *) # Get rid of the `-' at the beginning of $os. os=`echo $os | sed 's/[^-]*-//'` echo Invalid configuration \`"$1"\': system \`"$os"\' not recognized 1>&2 exit 1 ;; esac else # Here we handle the default operating systems that come with various machines. # The value should be what the vendor currently ships out the door with their # machine or put another way, the most popular os provided with the machine. # Note that if you're going to try to match "-MANUFACTURER" here (say, # "-sun"), then you have to tell the case statement up towards the top # that MANUFACTURER isn't an operating system. Otherwise, code above # will signal an error saying that MANUFACTURER isn't an operating # system, and we'll never get to this point. case $basic_machine in score-*) os=-elf ;; spu-*) os=-elf ;; *-acorn) os=-riscix1.2 ;; arm*-rebel) os=-linux ;; arm*-semi) os=-aout ;; c4x-* | tic4x-*) os=-coff ;; c8051-*) os=-elf ;; hexagon-*) os=-elf ;; tic54x-*) os=-coff ;; tic55x-*) os=-coff ;; tic6x-*) os=-coff ;; # This must come before the *-dec entry. pdp10-*) os=-tops20 ;; pdp11-*) os=-none ;; *-dec | vax-*) os=-ultrix4.2 ;; m68*-apollo) os=-domain ;; i386-sun) os=-sunos4.0.2 ;; m68000-sun) os=-sunos3 ;; m68*-cisco) os=-aout ;; mep-*) os=-elf ;; mips*-cisco) os=-elf ;; mips*-*) os=-elf ;; or32-*) os=-coff ;; *-tti) # must be before sparc entry or we get the wrong os. os=-sysv3 ;; sparc-* | *-sun) os=-sunos4.1.1 ;; pru-*) os=-elf ;; *-be) os=-beos ;; *-ibm) os=-aix ;; *-knuth) os=-mmixware ;; *-wec) os=-proelf ;; *-winbond) os=-proelf ;; *-oki) os=-proelf ;; *-hp) os=-hpux ;; *-hitachi) os=-hiux ;; i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) os=-sysv ;; *-cbm) os=-amigaos ;; *-dg) os=-dgux ;; *-dolphin) os=-sysv3 ;; m68k-ccur) os=-rtu ;; m88k-omron*) os=-luna ;; *-next) os=-nextstep ;; *-sequent) os=-ptx ;; *-crds) os=-unos ;; *-ns) os=-genix ;; i370-*) os=-mvs ;; *-gould) os=-sysv ;; *-highlevel) os=-bsd ;; *-encore) os=-bsd ;; *-sgi) os=-irix ;; *-siemens) os=-sysv4 ;; *-masscomp) os=-rtu ;; f30[01]-fujitsu | f700-fujitsu) os=-uxpv ;; *-rom68k) os=-coff ;; *-*bug) os=-coff ;; *-apple) os=-macos ;; *-atari*) os=-mint ;; *) os=-none ;; esac fi # Here we handle the case where we know the os, and the CPU type, but not the # manufacturer. We pick the logical manufacturer. vendor=unknown case $basic_machine in *-unknown) case $os in -riscix*) vendor=acorn ;; -sunos*) vendor=sun ;; -cnk*|-aix*) vendor=ibm ;; -beos*) vendor=be ;; -hpux*) vendor=hp ;; -mpeix*) vendor=hp ;; -hiux*) vendor=hitachi ;; -unos*) vendor=crds ;; -dgux*) vendor=dg ;; -luna*) vendor=omron ;; -genix*) vendor=ns ;; -mvs* | -opened*) vendor=ibm ;; -os400*) vendor=ibm ;; -ptx*) vendor=sequent ;; -tpf*) vendor=ibm ;; -vxsim* | -vxworks* | -windiss*) vendor=wrs ;; -aux*) vendor=apple ;; -hms*) vendor=hitachi ;; -mpw* | -macos*) vendor=apple ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) vendor=atari ;; -vos*) vendor=stratus ;; esac basic_machine=`echo "$basic_machine" | sed "s/unknown/$vendor/"` ;; esac echo "$basic_machine$os" exit # Local variables: # eval: (add-hook 'write-file-functions 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: modsecurity-v3.0.6/examples/0000775000175000017500000000000014146027125017217 5ustar mhsvierulamhsvierulamodsecurity-v3.0.6/examples/Makefile.am0000664000175000017500000000053614146026157021263 0ustar mhsvierulamhsvierula ACLOCAL_AMFLAGS = -I build SUBDIRS = \ multiprocess_c \ reading_logs_with_offset \ reading_logs_via_rule_message \ simple_example_using_c \ using_bodies_in_chunks pkginclude_HEADERS = \ reading_logs_via_rule_message/reading_logs_via_rule_message.h # make clean CLEANFILES = # make maintainer-clean MAINTAINERCLEANFILES = \ Makefile.in modsecurity-v3.0.6/examples/Makefile.in0000664000175000017500000006077514146027125021303 0ustar mhsvierulamhsvierula# Makefile.in generated by automake 1.15.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2017 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@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@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 = examples ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/build/ax_prog_doxygen.m4 \ $(top_srcdir)/build/ax_valgrind_check.m4 \ $(top_srcdir)/build/curl.m4 $(top_srcdir)/build/libgeoip.m4 \ $(top_srcdir)/build/libmaxmind.m4 \ $(top_srcdir)/build/libtool.m4 $(top_srcdir)/build/libxml.m4 \ $(top_srcdir)/build/lmdb.m4 $(top_srcdir)/build/ltoptions.m4 \ $(top_srcdir)/build/ltsugar.m4 \ $(top_srcdir)/build/ltversion.m4 \ $(top_srcdir)/build/lt~obsolete.m4 $(top_srcdir)/build/lua.m4 \ $(top_srcdir)/build/pcre.m4 $(top_srcdir)/build/ssdeep.m4 \ $(top_srcdir)/build/yajl.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(pkginclude_HEADERS) \ $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ ctags-recursive dvi-recursive html-recursive info-recursive \ install-data-recursive install-dvi-recursive \ install-exec-recursive install-html-recursive \ install-info-recursive install-pdf-recursive \ install-ps-recursive install-recursive installcheck-recursive \ installdirs-recursive pdf-recursive ps-recursive \ tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac 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__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(pkgincludedir)" HEADERS = $(pkginclude_HEADERS) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive am__recursive_targets = \ $(RECURSIVE_TARGETS) \ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ distdir am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BISON = @BISON@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CURL_CFLAGS = @CURL_CFLAGS@ CURL_CONFIG = @CURL_CONFIG@ CURL_CPPFLAGS = @CURL_CPPFLAGS@ CURL_DISPLAY = @CURL_DISPLAY@ CURL_FOUND = @CURL_FOUND@ CURL_LDADD = @CURL_LDADD@ CURL_LDFLAGS = @CURL_LDFLAGS@ CURL_USES_GNUTLS = @CURL_USES_GNUTLS@ CURL_VERSION = @CURL_VERSION@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DOXYGEN_PAPER_SIZE = @DOXYGEN_PAPER_SIZE@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ DX_CONFIG = @DX_CONFIG@ DX_DOCDIR = @DX_DOCDIR@ DX_DOT = @DX_DOT@ DX_DOXYGEN = @DX_DOXYGEN@ DX_DVIPS = @DX_DVIPS@ DX_EGREP = @DX_EGREP@ DX_ENV = @DX_ENV@ DX_FLAG_chi = @DX_FLAG_chi@ DX_FLAG_chm = @DX_FLAG_chm@ DX_FLAG_doc = @DX_FLAG_doc@ DX_FLAG_dot = @DX_FLAG_dot@ DX_FLAG_html = @DX_FLAG_html@ DX_FLAG_man = @DX_FLAG_man@ DX_FLAG_pdf = @DX_FLAG_pdf@ DX_FLAG_ps = @DX_FLAG_ps@ DX_FLAG_rtf = @DX_FLAG_rtf@ DX_FLAG_xml = @DX_FLAG_xml@ DX_HHC = @DX_HHC@ DX_LATEX = @DX_LATEX@ DX_MAKEINDEX = @DX_MAKEINDEX@ DX_PDFLATEX = @DX_PDFLATEX@ DX_PERL = @DX_PERL@ DX_PROJECT = @DX_PROJECT@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ENABLE_VALGRIND_drd = @ENABLE_VALGRIND_drd@ ENABLE_VALGRIND_helgrind = @ENABLE_VALGRIND_helgrind@ ENABLE_VALGRIND_memcheck = @ENABLE_VALGRIND_memcheck@ ENABLE_VALGRIND_sgcheck = @ENABLE_VALGRIND_sgcheck@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FLEX = @FLEX@ GEOIP_CFLAGS = @GEOIP_CFLAGS@ GEOIP_DISPLAY = @GEOIP_DISPLAY@ GEOIP_FOUND = @GEOIP_FOUND@ GEOIP_LDADD = @GEOIP_LDADD@ GEOIP_LDFLAGS = @GEOIP_LDFLAGS@ GEOIP_LIBS = @GEOIP_LIBS@ GEOIP_VERSION = @GEOIP_VERSION@ GLOBAL_CFLAGS = @GLOBAL_CFLAGS@ GLOBAL_CPPFLAGS = @GLOBAL_CPPFLAGS@ GLOBAL_LDADD = @GLOBAL_LDADD@ 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@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBXML2_CFLAGS = @LIBXML2_CFLAGS@ LIBXML2_CONFIG = @LIBXML2_CONFIG@ LIBXML2_CPPFLAGS = @LIBXML2_CPPFLAGS@ LIBXML2_DISPLAY = @LIBXML2_DISPLAY@ LIBXML2_FOUND = @LIBXML2_FOUND@ LIBXML2_LDADD = @LIBXML2_LDADD@ LIBXML2_LDFLAGS = @LIBXML2_LDFLAGS@ LIBXML2_VERSION = @LIBXML2_VERSION@ LIPO = @LIPO@ LMDB_CFLAGS = @LMDB_CFLAGS@ LMDB_DISPLAY = @LMDB_DISPLAY@ LMDB_FOUND = @LMDB_FOUND@ LMDB_LDADD = @LMDB_LDADD@ LMDB_LDFLAGS = @LMDB_LDFLAGS@ LMDB_LIBS = @LMDB_LIBS@ LMDB_VERSION = @LMDB_VERSION@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ LUA_CFLAGS = @LUA_CFLAGS@ LUA_DISPLAY = @LUA_DISPLAY@ LUA_FOUND = @LUA_FOUND@ LUA_LDADD = @LUA_LDADD@ LUA_LDFLAGS = @LUA_LDFLAGS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAXMIND_CFLAGS = @MAXMIND_CFLAGS@ MAXMIND_DISPLAY = @MAXMIND_DISPLAY@ MAXMIND_FOUND = @MAXMIND_FOUND@ MAXMIND_LDADD = @MAXMIND_LDADD@ MAXMIND_LDFLAGS = @MAXMIND_LDFLAGS@ MAXMIND_LIBS = @MAXMIND_LIBS@ MAXMIND_VERSION = @MAXMIND_VERSION@ MKDIR_P = @MKDIR_P@ MODSEC_MUTEX_ON_PM = @MODSEC_MUTEX_ON_PM@ MODSEC_NO_LOGS = @MODSEC_NO_LOGS@ MSC_BASE_DIR = @MSC_BASE_DIR@ MSC_GIT_VERSION = @MSC_GIT_VERSION@ MSC_VERSION = @MSC_VERSION@ MSC_VERSION_INFO = @MSC_VERSION_INFO@ MSC_VERSION_WITH_PATCHLEVEL = @MSC_VERSION_WITH_PATCHLEVEL@ 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_LD_PATH = @PCRE_LD_PATH@ PCRE_VERSION = @PCRE_VERSION@ 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@ SSDEEP_CFLAGS = @SSDEEP_CFLAGS@ SSDEEP_DISPLAY = @SSDEEP_DISPLAY@ SSDEEP_FOUND = @SSDEEP_FOUND@ SSDEEP_LDADD = @SSDEEP_LDADD@ SSDEEP_LDFLAGS = @SSDEEP_LDFLAGS@ STRIP = @STRIP@ VALGRIND = @VALGRIND@ VALGRIND_ENABLED = @VALGRIND_ENABLED@ VERSION = @VERSION@ YACC = @YACC@ YACC_INST = @YACC_INST@ YAJL_CFLAGS = @YAJL_CFLAGS@ YAJL_DISPLAY = @YAJL_DISPLAY@ YAJL_FOUND = @YAJL_FOUND@ YAJL_LDADD = @YAJL_LDADD@ YAJL_LDFLAGS = @YAJL_LDFLAGS@ YAJL_LIBS = @YAJL_LIBS@ YAJL_VERSION = @YAJL_VERSION@ YFLAGS = @YFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ 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@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ 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@ valgrind_enabled_tools = @valgrind_enabled_tools@ valgrind_tools = @valgrind_tools@ ACLOCAL_AMFLAGS = -I build SUBDIRS = \ multiprocess_c \ reading_logs_with_offset \ reading_logs_via_rule_message \ simple_example_using_c \ using_bodies_in_chunks pkginclude_HEADERS = \ reading_logs_via_rule_message/reading_logs_via_rule_message.h # make clean CLEANFILES = # make maintainer-clean MAINTAINERCLEANFILES = \ Makefile.in all: all-recursive .SUFFIXES: $(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 examples/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign examples/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): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-pkgincludeHEADERS: $(pkginclude_HEADERS) @$(NORMAL_INSTALL) @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(pkgincludedir)'"; \ $(MKDIR_P) "$(DESTDIR)$(pkgincludedir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(pkgincludedir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(pkgincludedir)" || exit $$?; \ done uninstall-pkgincludeHEADERS: @$(NORMAL_UNINSTALL) @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(pkgincludedir)'; $(am__uninstall_files_from_dir) # This directory's subdirectories are mostly independent; you can cd # into them and run 'make' without going through this Makefile. # To change the values of 'make' variables: instead of editing Makefiles, # (1) if the variable is set in 'config.status', edit 'config.status' # (which will cause the Makefiles to be regenerated when you run 'make'); # (2) otherwise, pass the desired values on the 'make' command line. $(am__recursive_targets): @fail=; \ if $(am__make_keepgoing); then \ failcom='fail=yes'; \ else \ failcom='exit 1'; \ fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-recursive TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ $(am__define_uniq_tagged_files); \ 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-recursive CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ 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" cscopelist: cscopelist-recursive cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files 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 @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile $(HEADERS) installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(pkgincludedir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) 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." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-pkgincludeHEADERS install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-pkgincludeHEADERS .MAKE: $(am__recursive_targets) install-am install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \ check-am clean clean-generic clean-libtool cscopelist-am ctags \ ctags-am distclean 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-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-pkgincludeHEADERS \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \ uninstall-am uninstall-pkgincludeHEADERS .PRECIOUS: Makefile # 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: modsecurity-v3.0.6/examples/reading_logs_with_offset/0000775000175000017500000000000014146027125024255 5ustar mhsvierulamhsvierulamodsecurity-v3.0.6/examples/reading_logs_with_offset/Makefile.am0000664000175000017500000000150314146026157026314 0ustar mhsvierulamhsvierula noinst_PROGRAMS = read read_SOURCES = \ read.cc read_LDADD = \ $(CURL_LDADD) \ $(GEOIP_LDADD) \ $(MAXMIND_LDADD) \ $(GLOBAL_LDADD) \ $(LIBXML2_LDADD) \ $(LMDB_LDADD) \ $(LUA_LDADD) \ $(PCRE_LDADD) \ $(SSDEEP_LDADD) \ $(YAJL_LDADD) read_LDFLAGS = \ -L$(top_builddir)/src/.libs/ \ $(GEOIP_LDFLAGS) \ -lmodsecurity \ -lpthread \ -lm \ -lstdc++ \ $(LMDB_LDFLAGS) \ $(LUA_LDFLAGS) \ $(SSDEEP_LDFLAGS) \ $(MAXMIND_LDFLAGS) \ $(YAJL_LDFLAGS) read_CPPFLAGS = \ $(GLOBAL_CFLAGS) \ -std=c++11 \ -I$(top_builddir)/headers \ -I$(top_builddir) \ -g \ -I../others \ -fPIC \ -O3 \ $(CURL_CFLAGS) \ $(GEOIP_CFLAGS) \ $(MAXMIND_CFLAGS) \ $(GLOBAL_CPPFLAGS) \ $(MODSEC_NO_LOGS) \ $(YAJL_CFLAGS) \ $(LMDB_CFLAGS) \ $(LUA_CFLAGS) \ $(PCRE_CFLAGS) \ $(LIBXML2_CFLAGS) MAINTAINERCLEANFILES = \ Makefile.in modsecurity-v3.0.6/examples/reading_logs_with_offset/read.cc0000664000175000017500000000142014146026157025500 0ustar mhsvierulamhsvierula #include #include #include // Variable offset - REQUEST_HEADERS_NAMES const char *request = "" \ "GET /index.html?param1=value1¶m2=value1¶m3=value1 HTTP/\n" \ "AuThOrIzAtIoN: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\n" \ "Host: localhost\n" \ "Content-Length: 27\n" \ "Content-Type: application/x-www-form-urlencoded\n"; int main() { modsecurity::ModSecurity msc; std::string json(""); const char *err = NULL; int ret = 0; ret = msc.processContentOffset(request, strlen(request), "o0,4v64,13v114,4v130,14v149,12t:lowercase", &json, &err); if (ret >= 0) { std::cout << json << std::endl; } else { std::cout << err << std::endl; } return ret; } modsecurity-v3.0.6/examples/reading_logs_with_offset/Makefile.in0000664000175000017500000005777314146027125026345 0ustar mhsvierulamhsvierula# Makefile.in generated by automake 1.15.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2017 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@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@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@ noinst_PROGRAMS = read$(EXEEXT) subdir = examples/reading_logs_with_offset ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/build/ax_prog_doxygen.m4 \ $(top_srcdir)/build/ax_valgrind_check.m4 \ $(top_srcdir)/build/curl.m4 $(top_srcdir)/build/libgeoip.m4 \ $(top_srcdir)/build/libmaxmind.m4 \ $(top_srcdir)/build/libtool.m4 $(top_srcdir)/build/libxml.m4 \ $(top_srcdir)/build/lmdb.m4 $(top_srcdir)/build/ltoptions.m4 \ $(top_srcdir)/build/ltsugar.m4 \ $(top_srcdir)/build/ltversion.m4 \ $(top_srcdir)/build/lt~obsolete.m4 $(top_srcdir)/build/lua.m4 \ $(top_srcdir)/build/pcre.m4 $(top_srcdir)/build/ssdeep.m4 \ $(top_srcdir)/build/yajl.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = PROGRAMS = $(noinst_PROGRAMS) am_read_OBJECTS = read-read.$(OBJEXT) read_OBJECTS = $(am_read_OBJECTS) am__DEPENDENCIES_1 = read_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = read_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(read_LDFLAGS) $(LDFLAGS) -o $@ AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CXXFLAGS) $(CXXFLAGS) AM_V_CXX = $(am__v_CXX_@AM_V@) am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) am__v_CXX_0 = @echo " CXX " $@; am__v_CXX_1 = CXXLD = $(CXX) CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) am__v_CXXLD_0 = @echo " CXXLD " $@; am__v_CXXLD_1 = SOURCES = $(read_SOURCES) DIST_SOURCES = $(read_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BISON = @BISON@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CURL_CFLAGS = @CURL_CFLAGS@ CURL_CONFIG = @CURL_CONFIG@ CURL_CPPFLAGS = @CURL_CPPFLAGS@ CURL_DISPLAY = @CURL_DISPLAY@ CURL_FOUND = @CURL_FOUND@ CURL_LDADD = @CURL_LDADD@ CURL_LDFLAGS = @CURL_LDFLAGS@ CURL_USES_GNUTLS = @CURL_USES_GNUTLS@ CURL_VERSION = @CURL_VERSION@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DOXYGEN_PAPER_SIZE = @DOXYGEN_PAPER_SIZE@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ DX_CONFIG = @DX_CONFIG@ DX_DOCDIR = @DX_DOCDIR@ DX_DOT = @DX_DOT@ DX_DOXYGEN = @DX_DOXYGEN@ DX_DVIPS = @DX_DVIPS@ DX_EGREP = @DX_EGREP@ DX_ENV = @DX_ENV@ DX_FLAG_chi = @DX_FLAG_chi@ DX_FLAG_chm = @DX_FLAG_chm@ DX_FLAG_doc = @DX_FLAG_doc@ DX_FLAG_dot = @DX_FLAG_dot@ DX_FLAG_html = @DX_FLAG_html@ DX_FLAG_man = @DX_FLAG_man@ DX_FLAG_pdf = @DX_FLAG_pdf@ DX_FLAG_ps = @DX_FLAG_ps@ DX_FLAG_rtf = @DX_FLAG_rtf@ DX_FLAG_xml = @DX_FLAG_xml@ DX_HHC = @DX_HHC@ DX_LATEX = @DX_LATEX@ DX_MAKEINDEX = @DX_MAKEINDEX@ DX_PDFLATEX = @DX_PDFLATEX@ DX_PERL = @DX_PERL@ DX_PROJECT = @DX_PROJECT@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ENABLE_VALGRIND_drd = @ENABLE_VALGRIND_drd@ ENABLE_VALGRIND_helgrind = @ENABLE_VALGRIND_helgrind@ ENABLE_VALGRIND_memcheck = @ENABLE_VALGRIND_memcheck@ ENABLE_VALGRIND_sgcheck = @ENABLE_VALGRIND_sgcheck@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FLEX = @FLEX@ GEOIP_CFLAGS = @GEOIP_CFLAGS@ GEOIP_DISPLAY = @GEOIP_DISPLAY@ GEOIP_FOUND = @GEOIP_FOUND@ GEOIP_LDADD = @GEOIP_LDADD@ GEOIP_LDFLAGS = @GEOIP_LDFLAGS@ GEOIP_LIBS = @GEOIP_LIBS@ GEOIP_VERSION = @GEOIP_VERSION@ GLOBAL_CFLAGS = @GLOBAL_CFLAGS@ GLOBAL_CPPFLAGS = @GLOBAL_CPPFLAGS@ GLOBAL_LDADD = @GLOBAL_LDADD@ 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@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBXML2_CFLAGS = @LIBXML2_CFLAGS@ LIBXML2_CONFIG = @LIBXML2_CONFIG@ LIBXML2_CPPFLAGS = @LIBXML2_CPPFLAGS@ LIBXML2_DISPLAY = @LIBXML2_DISPLAY@ LIBXML2_FOUND = @LIBXML2_FOUND@ LIBXML2_LDADD = @LIBXML2_LDADD@ LIBXML2_LDFLAGS = @LIBXML2_LDFLAGS@ LIBXML2_VERSION = @LIBXML2_VERSION@ LIPO = @LIPO@ LMDB_CFLAGS = @LMDB_CFLAGS@ LMDB_DISPLAY = @LMDB_DISPLAY@ LMDB_FOUND = @LMDB_FOUND@ LMDB_LDADD = @LMDB_LDADD@ LMDB_LDFLAGS = @LMDB_LDFLAGS@ LMDB_LIBS = @LMDB_LIBS@ LMDB_VERSION = @LMDB_VERSION@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ LUA_CFLAGS = @LUA_CFLAGS@ LUA_DISPLAY = @LUA_DISPLAY@ LUA_FOUND = @LUA_FOUND@ LUA_LDADD = @LUA_LDADD@ LUA_LDFLAGS = @LUA_LDFLAGS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAXMIND_CFLAGS = @MAXMIND_CFLAGS@ MAXMIND_DISPLAY = @MAXMIND_DISPLAY@ MAXMIND_FOUND = @MAXMIND_FOUND@ MAXMIND_LDADD = @MAXMIND_LDADD@ MAXMIND_LDFLAGS = @MAXMIND_LDFLAGS@ MAXMIND_LIBS = @MAXMIND_LIBS@ MAXMIND_VERSION = @MAXMIND_VERSION@ MKDIR_P = @MKDIR_P@ MODSEC_MUTEX_ON_PM = @MODSEC_MUTEX_ON_PM@ MODSEC_NO_LOGS = @MODSEC_NO_LOGS@ MSC_BASE_DIR = @MSC_BASE_DIR@ MSC_GIT_VERSION = @MSC_GIT_VERSION@ MSC_VERSION = @MSC_VERSION@ MSC_VERSION_INFO = @MSC_VERSION_INFO@ MSC_VERSION_WITH_PATCHLEVEL = @MSC_VERSION_WITH_PATCHLEVEL@ 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_LD_PATH = @PCRE_LD_PATH@ PCRE_VERSION = @PCRE_VERSION@ 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@ SSDEEP_CFLAGS = @SSDEEP_CFLAGS@ SSDEEP_DISPLAY = @SSDEEP_DISPLAY@ SSDEEP_FOUND = @SSDEEP_FOUND@ SSDEEP_LDADD = @SSDEEP_LDADD@ SSDEEP_LDFLAGS = @SSDEEP_LDFLAGS@ STRIP = @STRIP@ VALGRIND = @VALGRIND@ VALGRIND_ENABLED = @VALGRIND_ENABLED@ VERSION = @VERSION@ YACC = @YACC@ YACC_INST = @YACC_INST@ YAJL_CFLAGS = @YAJL_CFLAGS@ YAJL_DISPLAY = @YAJL_DISPLAY@ YAJL_FOUND = @YAJL_FOUND@ YAJL_LDADD = @YAJL_LDADD@ YAJL_LDFLAGS = @YAJL_LDFLAGS@ YAJL_LIBS = @YAJL_LIBS@ YAJL_VERSION = @YAJL_VERSION@ YFLAGS = @YFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ 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@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ 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@ valgrind_enabled_tools = @valgrind_enabled_tools@ valgrind_tools = @valgrind_tools@ read_SOURCES = \ read.cc read_LDADD = \ $(CURL_LDADD) \ $(GEOIP_LDADD) \ $(MAXMIND_LDADD) \ $(GLOBAL_LDADD) \ $(LIBXML2_LDADD) \ $(LMDB_LDADD) \ $(LUA_LDADD) \ $(PCRE_LDADD) \ $(SSDEEP_LDADD) \ $(YAJL_LDADD) read_LDFLAGS = \ -L$(top_builddir)/src/.libs/ \ $(GEOIP_LDFLAGS) \ -lmodsecurity \ -lpthread \ -lm \ -lstdc++ \ $(LMDB_LDFLAGS) \ $(LUA_LDFLAGS) \ $(SSDEEP_LDFLAGS) \ $(MAXMIND_LDFLAGS) \ $(YAJL_LDFLAGS) read_CPPFLAGS = \ $(GLOBAL_CFLAGS) \ -std=c++11 \ -I$(top_builddir)/headers \ -I$(top_builddir) \ -g \ -I../others \ -fPIC \ -O3 \ $(CURL_CFLAGS) \ $(GEOIP_CFLAGS) \ $(MAXMIND_CFLAGS) \ $(GLOBAL_CPPFLAGS) \ $(MODSEC_NO_LOGS) \ $(YAJL_CFLAGS) \ $(LMDB_CFLAGS) \ $(LUA_CFLAGS) \ $(PCRE_CFLAGS) \ $(LIBXML2_CFLAGS) MAINTAINERCLEANFILES = \ Makefile.in all: all-am .SUFFIXES: .SUFFIXES: .cc .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 examples/reading_logs_with_offset/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign examples/reading_logs_with_offset/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): clean-noinstPROGRAMS: @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list read$(EXEEXT): $(read_OBJECTS) $(read_DEPENDENCIES) $(EXTRA_read_DEPENDENCIES) @rm -f read$(EXEEXT) $(AM_V_CXXLD)$(read_LINK) $(read_OBJECTS) $(read_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/read-read.Po@am__quote@ .cc.o: @am__fastdepCXX_TRUE@ $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< .cc.obj: @am__fastdepCXX_TRUE@ $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cc.lo: @am__fastdepCXX_TRUE@ $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ @am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< read-read.o: read.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(read_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT read-read.o -MD -MP -MF $(DEPDIR)/read-read.Tpo -c -o read-read.o `test -f 'read.cc' || echo '$(srcdir)/'`read.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/read-read.Tpo $(DEPDIR)/read-read.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='read.cc' object='read-read.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(read_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o read-read.o `test -f 'read.cc' || echo '$(srcdir)/'`read.cc read-read.obj: read.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(read_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT read-read.obj -MD -MP -MF $(DEPDIR)/read-read.Tpo -c -o read-read.obj `if test -f 'read.cc'; then $(CYGPATH_W) 'read.cc'; else $(CYGPATH_W) '$(srcdir)/read.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/read-read.Tpo $(DEPDIR)/read-read.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='read.cc' object='read-read.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(read_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o read-read.obj `if test -f 'read.cc'; then $(CYGPATH_W) 'read.cc'; else $(CYGPATH_W) '$(srcdir)/read.cc'; fi` mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ 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-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ 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" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files 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 $(PROGRAMS) installdirs: 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: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi 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." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \ 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-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: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstPROGRAMS cscopelist-am ctags \ ctags-am 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-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ 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 tags-am uninstall uninstall-am .PRECIOUS: Makefile # 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: modsecurity-v3.0.6/examples/reading_logs_via_rule_message/0000775000175000017500000000000014146027125025246 5ustar mhsvierulamhsvierulamodsecurity-v3.0.6/examples/reading_logs_via_rule_message/Makefile.am0000664000175000017500000000155214146026157027311 0ustar mhsvierulamhsvierula noinst_PROGRAMS = simple_request simple_request_SOURCES = \ simple_request.cc simple_request_LDADD = \ $(CURL_LDADD) \ $(GEOIP_LDADD) \ $(GLOBAL_LDADD) \ $(LIBXML2_LDADD) \ $(LMDB_LDADD) \ $(MAXMIND_LDADD) \ $(LUA_LDADD) \ $(PCRE_LDADD) \ $(SSDEEP_LDADD) \ $(YAJL_LDADD) simple_request_LDFLAGS = \ -L$(top_builddir)/src/.libs/ \ $(GEOIP_LDFLAGS) \ -lmodsecurity \ -lpthread \ -lm \ -lstdc++ \ $(LMDB_LDFLAGS) \ $(LUA_LDFLAGS) \ $(MAXMIND_LDFLAGS) \ $(SSDEEP_LDFLAGS) \ $(YAJL_LDFLAGS) simple_request_CPPFLAGS = \ $(GLOBAL_CFLAGS) \ -std=c++11 \ -I$(top_builddir)/headers \ -I$(top_builddir) \ -g \ -I../others \ -fPIC \ -O3 \ $(CURL_CFLAGS) \ $(GEOIP_CFLAGS) \ $(GLOBAL_CPPFLAGS) \ $(MODSEC_NO_LOGS) \ $(YAJL_CFLAGS) \ $(LMDB_CFLAGS) \ $(LUA_CFLAGS) \ $(PCRE_CFLAGS) \ $(LIBXML2_CFLAGS) MAINTAINERCLEANFILES = \ Makefile.in modsecurity-v3.0.6/examples/reading_logs_via_rule_message/match.conf0000664000175000017500000000011614146026157027213 0ustar mhsvierulamhsvierulaSecRule ARGS:param1 "test" "id:1,deny,msg:'this',msg:'is',msg:'a',msg:'test'" modsecurity-v3.0.6/examples/reading_logs_via_rule_message/Makefile.in0000664000175000017500000006136314146027125027324 0ustar mhsvierulamhsvierula# Makefile.in generated by automake 1.15.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2017 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@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@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@ noinst_PROGRAMS = simple_request$(EXEEXT) subdir = examples/reading_logs_via_rule_message ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/build/ax_prog_doxygen.m4 \ $(top_srcdir)/build/ax_valgrind_check.m4 \ $(top_srcdir)/build/curl.m4 $(top_srcdir)/build/libgeoip.m4 \ $(top_srcdir)/build/libmaxmind.m4 \ $(top_srcdir)/build/libtool.m4 $(top_srcdir)/build/libxml.m4 \ $(top_srcdir)/build/lmdb.m4 $(top_srcdir)/build/ltoptions.m4 \ $(top_srcdir)/build/ltsugar.m4 \ $(top_srcdir)/build/ltversion.m4 \ $(top_srcdir)/build/lt~obsolete.m4 $(top_srcdir)/build/lua.m4 \ $(top_srcdir)/build/pcre.m4 $(top_srcdir)/build/ssdeep.m4 \ $(top_srcdir)/build/yajl.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = PROGRAMS = $(noinst_PROGRAMS) am_simple_request_OBJECTS = simple_request-simple_request.$(OBJEXT) simple_request_OBJECTS = $(am_simple_request_OBJECTS) am__DEPENDENCIES_1 = simple_request_DEPENDENCIES = $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = simple_request_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ $(AM_CXXFLAGS) $(CXXFLAGS) $(simple_request_LDFLAGS) \ $(LDFLAGS) -o $@ AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CXXFLAGS) $(CXXFLAGS) AM_V_CXX = $(am__v_CXX_@AM_V@) am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) am__v_CXX_0 = @echo " CXX " $@; am__v_CXX_1 = CXXLD = $(CXX) CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) am__v_CXXLD_0 = @echo " CXXLD " $@; am__v_CXXLD_1 = SOURCES = $(simple_request_SOURCES) DIST_SOURCES = $(simple_request_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BISON = @BISON@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CURL_CFLAGS = @CURL_CFLAGS@ CURL_CONFIG = @CURL_CONFIG@ CURL_CPPFLAGS = @CURL_CPPFLAGS@ CURL_DISPLAY = @CURL_DISPLAY@ CURL_FOUND = @CURL_FOUND@ CURL_LDADD = @CURL_LDADD@ CURL_LDFLAGS = @CURL_LDFLAGS@ CURL_USES_GNUTLS = @CURL_USES_GNUTLS@ CURL_VERSION = @CURL_VERSION@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DOXYGEN_PAPER_SIZE = @DOXYGEN_PAPER_SIZE@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ DX_CONFIG = @DX_CONFIG@ DX_DOCDIR = @DX_DOCDIR@ DX_DOT = @DX_DOT@ DX_DOXYGEN = @DX_DOXYGEN@ DX_DVIPS = @DX_DVIPS@ DX_EGREP = @DX_EGREP@ DX_ENV = @DX_ENV@ DX_FLAG_chi = @DX_FLAG_chi@ DX_FLAG_chm = @DX_FLAG_chm@ DX_FLAG_doc = @DX_FLAG_doc@ DX_FLAG_dot = @DX_FLAG_dot@ DX_FLAG_html = @DX_FLAG_html@ DX_FLAG_man = @DX_FLAG_man@ DX_FLAG_pdf = @DX_FLAG_pdf@ DX_FLAG_ps = @DX_FLAG_ps@ DX_FLAG_rtf = @DX_FLAG_rtf@ DX_FLAG_xml = @DX_FLAG_xml@ DX_HHC = @DX_HHC@ DX_LATEX = @DX_LATEX@ DX_MAKEINDEX = @DX_MAKEINDEX@ DX_PDFLATEX = @DX_PDFLATEX@ DX_PERL = @DX_PERL@ DX_PROJECT = @DX_PROJECT@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ENABLE_VALGRIND_drd = @ENABLE_VALGRIND_drd@ ENABLE_VALGRIND_helgrind = @ENABLE_VALGRIND_helgrind@ ENABLE_VALGRIND_memcheck = @ENABLE_VALGRIND_memcheck@ ENABLE_VALGRIND_sgcheck = @ENABLE_VALGRIND_sgcheck@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FLEX = @FLEX@ GEOIP_CFLAGS = @GEOIP_CFLAGS@ GEOIP_DISPLAY = @GEOIP_DISPLAY@ GEOIP_FOUND = @GEOIP_FOUND@ GEOIP_LDADD = @GEOIP_LDADD@ GEOIP_LDFLAGS = @GEOIP_LDFLAGS@ GEOIP_LIBS = @GEOIP_LIBS@ GEOIP_VERSION = @GEOIP_VERSION@ GLOBAL_CFLAGS = @GLOBAL_CFLAGS@ GLOBAL_CPPFLAGS = @GLOBAL_CPPFLAGS@ GLOBAL_LDADD = @GLOBAL_LDADD@ 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@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBXML2_CFLAGS = @LIBXML2_CFLAGS@ LIBXML2_CONFIG = @LIBXML2_CONFIG@ LIBXML2_CPPFLAGS = @LIBXML2_CPPFLAGS@ LIBXML2_DISPLAY = @LIBXML2_DISPLAY@ LIBXML2_FOUND = @LIBXML2_FOUND@ LIBXML2_LDADD = @LIBXML2_LDADD@ LIBXML2_LDFLAGS = @LIBXML2_LDFLAGS@ LIBXML2_VERSION = @LIBXML2_VERSION@ LIPO = @LIPO@ LMDB_CFLAGS = @LMDB_CFLAGS@ LMDB_DISPLAY = @LMDB_DISPLAY@ LMDB_FOUND = @LMDB_FOUND@ LMDB_LDADD = @LMDB_LDADD@ LMDB_LDFLAGS = @LMDB_LDFLAGS@ LMDB_LIBS = @LMDB_LIBS@ LMDB_VERSION = @LMDB_VERSION@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ LUA_CFLAGS = @LUA_CFLAGS@ LUA_DISPLAY = @LUA_DISPLAY@ LUA_FOUND = @LUA_FOUND@ LUA_LDADD = @LUA_LDADD@ LUA_LDFLAGS = @LUA_LDFLAGS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAXMIND_CFLAGS = @MAXMIND_CFLAGS@ MAXMIND_DISPLAY = @MAXMIND_DISPLAY@ MAXMIND_FOUND = @MAXMIND_FOUND@ MAXMIND_LDADD = @MAXMIND_LDADD@ MAXMIND_LDFLAGS = @MAXMIND_LDFLAGS@ MAXMIND_LIBS = @MAXMIND_LIBS@ MAXMIND_VERSION = @MAXMIND_VERSION@ MKDIR_P = @MKDIR_P@ MODSEC_MUTEX_ON_PM = @MODSEC_MUTEX_ON_PM@ MODSEC_NO_LOGS = @MODSEC_NO_LOGS@ MSC_BASE_DIR = @MSC_BASE_DIR@ MSC_GIT_VERSION = @MSC_GIT_VERSION@ MSC_VERSION = @MSC_VERSION@ MSC_VERSION_INFO = @MSC_VERSION_INFO@ MSC_VERSION_WITH_PATCHLEVEL = @MSC_VERSION_WITH_PATCHLEVEL@ 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_LD_PATH = @PCRE_LD_PATH@ PCRE_VERSION = @PCRE_VERSION@ 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@ SSDEEP_CFLAGS = @SSDEEP_CFLAGS@ SSDEEP_DISPLAY = @SSDEEP_DISPLAY@ SSDEEP_FOUND = @SSDEEP_FOUND@ SSDEEP_LDADD = @SSDEEP_LDADD@ SSDEEP_LDFLAGS = @SSDEEP_LDFLAGS@ STRIP = @STRIP@ VALGRIND = @VALGRIND@ VALGRIND_ENABLED = @VALGRIND_ENABLED@ VERSION = @VERSION@ YACC = @YACC@ YACC_INST = @YACC_INST@ YAJL_CFLAGS = @YAJL_CFLAGS@ YAJL_DISPLAY = @YAJL_DISPLAY@ YAJL_FOUND = @YAJL_FOUND@ YAJL_LDADD = @YAJL_LDADD@ YAJL_LDFLAGS = @YAJL_LDFLAGS@ YAJL_LIBS = @YAJL_LIBS@ YAJL_VERSION = @YAJL_VERSION@ YFLAGS = @YFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ 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@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ 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@ valgrind_enabled_tools = @valgrind_enabled_tools@ valgrind_tools = @valgrind_tools@ simple_request_SOURCES = \ simple_request.cc simple_request_LDADD = \ $(CURL_LDADD) \ $(GEOIP_LDADD) \ $(GLOBAL_LDADD) \ $(LIBXML2_LDADD) \ $(LMDB_LDADD) \ $(MAXMIND_LDADD) \ $(LUA_LDADD) \ $(PCRE_LDADD) \ $(SSDEEP_LDADD) \ $(YAJL_LDADD) simple_request_LDFLAGS = \ -L$(top_builddir)/src/.libs/ \ $(GEOIP_LDFLAGS) \ -lmodsecurity \ -lpthread \ -lm \ -lstdc++ \ $(LMDB_LDFLAGS) \ $(LUA_LDFLAGS) \ $(MAXMIND_LDFLAGS) \ $(SSDEEP_LDFLAGS) \ $(YAJL_LDFLAGS) simple_request_CPPFLAGS = \ $(GLOBAL_CFLAGS) \ -std=c++11 \ -I$(top_builddir)/headers \ -I$(top_builddir) \ -g \ -I../others \ -fPIC \ -O3 \ $(CURL_CFLAGS) \ $(GEOIP_CFLAGS) \ $(GLOBAL_CPPFLAGS) \ $(MODSEC_NO_LOGS) \ $(YAJL_CFLAGS) \ $(LMDB_CFLAGS) \ $(LUA_CFLAGS) \ $(PCRE_CFLAGS) \ $(LIBXML2_CFLAGS) MAINTAINERCLEANFILES = \ Makefile.in all: all-am .SUFFIXES: .SUFFIXES: .cc .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 examples/reading_logs_via_rule_message/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign examples/reading_logs_via_rule_message/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): clean-noinstPROGRAMS: @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list simple_request$(EXEEXT): $(simple_request_OBJECTS) $(simple_request_DEPENDENCIES) $(EXTRA_simple_request_DEPENDENCIES) @rm -f simple_request$(EXEEXT) $(AM_V_CXXLD)$(simple_request_LINK) $(simple_request_OBJECTS) $(simple_request_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/simple_request-simple_request.Po@am__quote@ .cc.o: @am__fastdepCXX_TRUE@ $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< .cc.obj: @am__fastdepCXX_TRUE@ $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cc.lo: @am__fastdepCXX_TRUE@ $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ @am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< simple_request-simple_request.o: simple_request.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(simple_request_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT simple_request-simple_request.o -MD -MP -MF $(DEPDIR)/simple_request-simple_request.Tpo -c -o simple_request-simple_request.o `test -f 'simple_request.cc' || echo '$(srcdir)/'`simple_request.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/simple_request-simple_request.Tpo $(DEPDIR)/simple_request-simple_request.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='simple_request.cc' object='simple_request-simple_request.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(simple_request_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o simple_request-simple_request.o `test -f 'simple_request.cc' || echo '$(srcdir)/'`simple_request.cc simple_request-simple_request.obj: simple_request.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(simple_request_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT simple_request-simple_request.obj -MD -MP -MF $(DEPDIR)/simple_request-simple_request.Tpo -c -o simple_request-simple_request.obj `if test -f 'simple_request.cc'; then $(CYGPATH_W) 'simple_request.cc'; else $(CYGPATH_W) '$(srcdir)/simple_request.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/simple_request-simple_request.Tpo $(DEPDIR)/simple_request-simple_request.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='simple_request.cc' object='simple_request-simple_request.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(simple_request_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o simple_request-simple_request.obj `if test -f 'simple_request.cc'; then $(CYGPATH_W) 'simple_request.cc'; else $(CYGPATH_W) '$(srcdir)/simple_request.cc'; fi` mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ 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-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ 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" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files 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 $(PROGRAMS) installdirs: 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: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi 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." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \ 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-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: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstPROGRAMS cscopelist-am ctags \ ctags-am 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-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ 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 tags-am uninstall uninstall-am .PRECIOUS: Makefile # 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: modsecurity-v3.0.6/examples/reading_logs_via_rule_message/blocked_request_engine_on.conf0000664000175000017500000000007014146026157033312 0ustar mhsvierulamhsvierulaSecRuleEngine On SecRule ARGS:param1 "test" "id:1,deny" modsecurity-v3.0.6/examples/reading_logs_via_rule_message/reading_logs_via_rule_message.h0000664000175000017500000001521114146026157033452 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include #include #define NUM_THREADS 100 char request_header[] = "" \ "GET /tutorials/other/top-20-mysql-best-practices/ HTTP/1.1\n\r" \ "Host: net.tutsplus.com\n\r" \ "User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.5)" \ " Gecko/20091102 Firefox/3.5.5 (.NET CLR 3.5.30729)\n\r" \ "Accept: text/html,application/xhtml+xml,application/xml; " \ "q=0.9,*/*;q=0.8\n\r" \ "Accept-Language: en-us,en;q=0.5\n\r" \ "Accept-Encoding: gzip,deflate\n\r" \ "Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7\n\r" \ "Keep-Alive: 300\n\r" \ "Connection: keep-alive\n\r" \ "Cookie: PHPSESSID=r2t5uvjq435r4q7ib3vtdjq120\n\r" \ "Pragma: no-cache\n\r" \ "Cache-Control: no-cache\n\r"; char request_uri[] = "/test.pl?param1=test¶2=test2"; char request_body[] = ""; char response_headers[] = "" \ "HTTP/1.1 200 OK\n\r" \ "Content-Type: text/xml; charset=utf-8\n\r" \ "Content-Length: length\n\r"; char response_body[] = "" \ "\n\r" \ "\n\r" \ " \n\r" \ " \n\r" \ " string\n\r" \ " \n\r" \ " \n\r" \ "\n\r"; char ip[] = "200.249.12.31"; #include "modsecurity/rule_message.h" #ifndef EXAMPLES_READING_LOGS_VIA_RULE_MESSAGE_READING_LOGS_VIA_RULE_MESSAGE_H_ #define EXAMPLES_READING_LOGS_VIA_RULE_MESSAGE_READING_LOGS_VIA_RULE_MESSAGE_H_ struct data_ms { modsecurity::ModSecurity *modsec; modsecurity::RulesSet *rules; }; static void *process_request(void *data) { struct data_ms *a = (struct data_ms *)data; modsecurity::ModSecurity *modsec = a->modsec; modsecurity::RulesSet *rules = a->rules; int z = 0; for (z = 0; z < 10000; z++) { modsecurity::Transaction *modsecTransaction = \ new modsecurity::Transaction(modsec, rules, NULL); modsecTransaction->processConnection(ip, 12345, "127.0.0.1", 80); modsecTransaction->processURI(request_uri, "GET", "1.1"); usleep(10); modsecTransaction->addRequestHeader("Host", "net.tutsplus.com"); modsecTransaction->processRequestHeaders(); modsecTransaction->processRequestBody(); modsecTransaction->addResponseHeader("HTTP/1.1", "200 OK"); modsecTransaction->processResponseHeaders(200, "HTTP 1.2"); modsecTransaction->appendResponseBody( (const unsigned char*)response_body, strlen((const char*)response_body)); modsecTransaction->processResponseBody(); modsecTransaction->processLogging(); delete modsecTransaction; } pthread_exit(NULL); return NULL; } class ReadingLogsViaRuleMessage { public: ReadingLogsViaRuleMessage(char *request_header, char *request_uri, char *request_body, char *response_headers, char *response_body, char *ip, const std::string &rules) : m_request_header(request_header), m_request_uri(request_uri), m_request_body(request_body), m_response_headers(response_headers), m_response_body(response_body), m_ip(ip), m_rules(rules) { } int process() { pthread_t threads[NUM_THREADS]; int i; struct data_ms dms; void *status; modsecurity::ModSecurity *modsec; modsecurity::RulesSet *rules; modsec = new modsecurity::ModSecurity(); modsec->setConnectorInformation("ModSecurity-test v0.0.1-alpha" \ " (ModSecurity test)"); modsec->setServerLogCb(logCb, modsecurity::RuleMessageLogProperty | modsecurity::IncludeFullHighlightLogProperty); rules = new modsecurity::RulesSet(); if (rules->loadFromUri(m_rules.c_str()) < 0) { std::cout << "Problems loading the rules..." << std::endl; std::cout << rules->m_parserError.str() << std::endl; return -1; } dms.modsec = modsec; dms.rules = rules; for (i = 0; i < NUM_THREADS; i++) { pthread_create(&threads[i], NULL, process_request, reinterpret_cast(&dms)); // process_request((void *)&dms); } usleep(10000); for (i=0; i < NUM_THREADS; i++) { pthread_join(threads[i], &status); std::cout << "Main: completed thread id :" << i << std::endl; } delete rules; delete modsec; pthread_exit(NULL); return 0; } static void logCb(void *data, const void *ruleMessagev) { if (ruleMessagev == NULL) { std::cout << "I've got a call but the message was null ;("; std::cout << std::endl; return; } const modsecurity::RuleMessage *ruleMessage = \ reinterpret_cast(ruleMessagev); std::cout << "Rule Id: " << std::to_string(ruleMessage->m_ruleId); std::cout << " phase: " << std::to_string(ruleMessage->m_phase); std::cout << std::endl; if (ruleMessage->m_isDisruptive) { std::cout << " * Disruptive action: "; std::cout << modsecurity::RuleMessage::log(ruleMessage); std::cout << std::endl; std::cout << " ** %d is meant to be informed by the webserver."; std::cout << std::endl; } else { std::cout << " * Match, but no disruptive action: "; std::cout << modsecurity::RuleMessage::log(ruleMessage); std::cout << std::endl; } } protected: char *m_request_header; char *m_request_uri; char *m_request_body; char *m_response_headers; char *m_response_body; char *m_ip; std::string m_rules; }; #endif // EXAMPLES_READING_LOGS_VIA_RULE_MESSAGE_READING_LOGS_VIA_RULE_MESSAGE_H_ modsecurity-v3.0.6/examples/reading_logs_via_rule_message/simple_request.cc0000664000175000017500000000221414146026157030621 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include #include #include #include "examples/reading_logs_via_rule_message/reading_logs_via_rule_message.h" int main(int argc, char **argv) { if (argc < 2) { std::cout << "Use " << *argv << " test-case-file.conf"; std::cout << std::endl << std::endl; return -1; } char *rule = *(argv++); std::string rules(rule); ReadingLogsViaRuleMessage rlvrm(request_header, request_uri, request_body, response_headers, response_body, ip, rules); rlvrm.process(); pthread_exit(NULL); return 0; } modsecurity-v3.0.6/examples/reading_logs_via_rule_message/no_match.conf0000664000175000017500000000012714146026157027711 0ustar mhsvierulamhsvierulaSecRule ARGS:param1 "WHEEE" "id:1,phase:2,deny,msg:'this',msg:'is',msg:'a',msg:'test'" modsecurity-v3.0.6/examples/reading_logs_via_rule_message/blocked_request.conf0000664000175000017500000000014214146026157031271 0ustar mhsvierulamhsvierulaSecRule ARGS:param1 "test" "id:1,deny,phase:2,chain,msg:'test'" SecRule ARGS:param1 "test" "log" modsecurity-v3.0.6/examples/multiprocess_c/0000775000175000017500000000000014146027125022252 5ustar mhsvierulamhsvierulamodsecurity-v3.0.6/examples/multiprocess_c/Makefile.am0000664000175000017500000000072414146026157024315 0ustar mhsvierulamhsvierula noinst_PROGRAMS = multi multi_SOURCES = \ multi.c multi_LDADD = \ $(SSDEEP_LDADD) \ $(LUA_LDADD) \ $(MAXMIND_LDADD) \ $(GLOBAL_LDADD) multi_LDFLAGS = \ -L$(top_builddir)/src/.libs/ \ $(GEOIP_LDFLAGS) \ -lmodsecurity \ -lpthread \ -lm \ -lstdc++ \ $(LUA_LDFLAGS) \ $(SSDEEP_LDFLAGS) \ $(MAXMIND_LDFLAGS) \ $(YAJL_LDFLAGS) multi_CFLAGS = \ -I$(top_builddir)/headers \ -I$(top_builddir) \ $(GLOBAL_CFLAGS) MAINTAINERCLEANFILES = \ Makefile.in modsecurity-v3.0.6/examples/multiprocess_c/basic_rules.conf0000664000175000017500000000066314146026157025425 0ustar mhsvierulamhsvierulaSecDebugLog /dev/stdout SecDebugLogLevel 9 SecRule REQUEST_HEADERS:User-Agent ".*" "id:1,phase:1,t:sha1,t:hexEncode,setvar:tx.ua_hash=%{MATCHED_VAR}" SecAction "phase:2,initcol:ip=%{REMOTE_ADDR}_%{tx.ua_hash}" SecRule REQUEST_HEADERS:User-Agent ".*" "id:2,phase:2,setvar:ip.auth_attempt=+1" SecRule ARGS:foo "herewego" "id:3,phase:2,setvar:ip.foo=bar" SecRule IP "bar" "id:4,phase:2" SecRule IP:auth_attempt "bar" "id:5,phase:2" modsecurity-v3.0.6/examples/multiprocess_c/Makefile.in0000664000175000017500000005662414146027125024334 0ustar mhsvierulamhsvierula# Makefile.in generated by automake 1.15.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2017 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@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@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@ noinst_PROGRAMS = multi$(EXEEXT) subdir = examples/multiprocess_c ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/build/ax_prog_doxygen.m4 \ $(top_srcdir)/build/ax_valgrind_check.m4 \ $(top_srcdir)/build/curl.m4 $(top_srcdir)/build/libgeoip.m4 \ $(top_srcdir)/build/libmaxmind.m4 \ $(top_srcdir)/build/libtool.m4 $(top_srcdir)/build/libxml.m4 \ $(top_srcdir)/build/lmdb.m4 $(top_srcdir)/build/ltoptions.m4 \ $(top_srcdir)/build/ltsugar.m4 \ $(top_srcdir)/build/ltversion.m4 \ $(top_srcdir)/build/lt~obsolete.m4 $(top_srcdir)/build/lua.m4 \ $(top_srcdir)/build/pcre.m4 $(top_srcdir)/build/ssdeep.m4 \ $(top_srcdir)/build/yajl.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = PROGRAMS = $(noinst_PROGRAMS) am_multi_OBJECTS = multi-multi.$(OBJEXT) multi_OBJECTS = $(am_multi_OBJECTS) am__DEPENDENCIES_1 = multi_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = multi_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(multi_CFLAGS) $(CFLAGS) \ $(multi_LDFLAGS) $(LDFLAGS) -o $@ AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(multi_SOURCES) DIST_SOURCES = $(multi_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BISON = @BISON@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CURL_CFLAGS = @CURL_CFLAGS@ CURL_CONFIG = @CURL_CONFIG@ CURL_CPPFLAGS = @CURL_CPPFLAGS@ CURL_DISPLAY = @CURL_DISPLAY@ CURL_FOUND = @CURL_FOUND@ CURL_LDADD = @CURL_LDADD@ CURL_LDFLAGS = @CURL_LDFLAGS@ CURL_USES_GNUTLS = @CURL_USES_GNUTLS@ CURL_VERSION = @CURL_VERSION@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DOXYGEN_PAPER_SIZE = @DOXYGEN_PAPER_SIZE@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ DX_CONFIG = @DX_CONFIG@ DX_DOCDIR = @DX_DOCDIR@ DX_DOT = @DX_DOT@ DX_DOXYGEN = @DX_DOXYGEN@ DX_DVIPS = @DX_DVIPS@ DX_EGREP = @DX_EGREP@ DX_ENV = @DX_ENV@ DX_FLAG_chi = @DX_FLAG_chi@ DX_FLAG_chm = @DX_FLAG_chm@ DX_FLAG_doc = @DX_FLAG_doc@ DX_FLAG_dot = @DX_FLAG_dot@ DX_FLAG_html = @DX_FLAG_html@ DX_FLAG_man = @DX_FLAG_man@ DX_FLAG_pdf = @DX_FLAG_pdf@ DX_FLAG_ps = @DX_FLAG_ps@ DX_FLAG_rtf = @DX_FLAG_rtf@ DX_FLAG_xml = @DX_FLAG_xml@ DX_HHC = @DX_HHC@ DX_LATEX = @DX_LATEX@ DX_MAKEINDEX = @DX_MAKEINDEX@ DX_PDFLATEX = @DX_PDFLATEX@ DX_PERL = @DX_PERL@ DX_PROJECT = @DX_PROJECT@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ENABLE_VALGRIND_drd = @ENABLE_VALGRIND_drd@ ENABLE_VALGRIND_helgrind = @ENABLE_VALGRIND_helgrind@ ENABLE_VALGRIND_memcheck = @ENABLE_VALGRIND_memcheck@ ENABLE_VALGRIND_sgcheck = @ENABLE_VALGRIND_sgcheck@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FLEX = @FLEX@ GEOIP_CFLAGS = @GEOIP_CFLAGS@ GEOIP_DISPLAY = @GEOIP_DISPLAY@ GEOIP_FOUND = @GEOIP_FOUND@ GEOIP_LDADD = @GEOIP_LDADD@ GEOIP_LDFLAGS = @GEOIP_LDFLAGS@ GEOIP_LIBS = @GEOIP_LIBS@ GEOIP_VERSION = @GEOIP_VERSION@ GLOBAL_CFLAGS = @GLOBAL_CFLAGS@ GLOBAL_CPPFLAGS = @GLOBAL_CPPFLAGS@ GLOBAL_LDADD = @GLOBAL_LDADD@ 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@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBXML2_CFLAGS = @LIBXML2_CFLAGS@ LIBXML2_CONFIG = @LIBXML2_CONFIG@ LIBXML2_CPPFLAGS = @LIBXML2_CPPFLAGS@ LIBXML2_DISPLAY = @LIBXML2_DISPLAY@ LIBXML2_FOUND = @LIBXML2_FOUND@ LIBXML2_LDADD = @LIBXML2_LDADD@ LIBXML2_LDFLAGS = @LIBXML2_LDFLAGS@ LIBXML2_VERSION = @LIBXML2_VERSION@ LIPO = @LIPO@ LMDB_CFLAGS = @LMDB_CFLAGS@ LMDB_DISPLAY = @LMDB_DISPLAY@ LMDB_FOUND = @LMDB_FOUND@ LMDB_LDADD = @LMDB_LDADD@ LMDB_LDFLAGS = @LMDB_LDFLAGS@ LMDB_LIBS = @LMDB_LIBS@ LMDB_VERSION = @LMDB_VERSION@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ LUA_CFLAGS = @LUA_CFLAGS@ LUA_DISPLAY = @LUA_DISPLAY@ LUA_FOUND = @LUA_FOUND@ LUA_LDADD = @LUA_LDADD@ LUA_LDFLAGS = @LUA_LDFLAGS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAXMIND_CFLAGS = @MAXMIND_CFLAGS@ MAXMIND_DISPLAY = @MAXMIND_DISPLAY@ MAXMIND_FOUND = @MAXMIND_FOUND@ MAXMIND_LDADD = @MAXMIND_LDADD@ MAXMIND_LDFLAGS = @MAXMIND_LDFLAGS@ MAXMIND_LIBS = @MAXMIND_LIBS@ MAXMIND_VERSION = @MAXMIND_VERSION@ MKDIR_P = @MKDIR_P@ MODSEC_MUTEX_ON_PM = @MODSEC_MUTEX_ON_PM@ MODSEC_NO_LOGS = @MODSEC_NO_LOGS@ MSC_BASE_DIR = @MSC_BASE_DIR@ MSC_GIT_VERSION = @MSC_GIT_VERSION@ MSC_VERSION = @MSC_VERSION@ MSC_VERSION_INFO = @MSC_VERSION_INFO@ MSC_VERSION_WITH_PATCHLEVEL = @MSC_VERSION_WITH_PATCHLEVEL@ 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_LD_PATH = @PCRE_LD_PATH@ PCRE_VERSION = @PCRE_VERSION@ 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@ SSDEEP_CFLAGS = @SSDEEP_CFLAGS@ SSDEEP_DISPLAY = @SSDEEP_DISPLAY@ SSDEEP_FOUND = @SSDEEP_FOUND@ SSDEEP_LDADD = @SSDEEP_LDADD@ SSDEEP_LDFLAGS = @SSDEEP_LDFLAGS@ STRIP = @STRIP@ VALGRIND = @VALGRIND@ VALGRIND_ENABLED = @VALGRIND_ENABLED@ VERSION = @VERSION@ YACC = @YACC@ YACC_INST = @YACC_INST@ YAJL_CFLAGS = @YAJL_CFLAGS@ YAJL_DISPLAY = @YAJL_DISPLAY@ YAJL_FOUND = @YAJL_FOUND@ YAJL_LDADD = @YAJL_LDADD@ YAJL_LDFLAGS = @YAJL_LDFLAGS@ YAJL_LIBS = @YAJL_LIBS@ YAJL_VERSION = @YAJL_VERSION@ YFLAGS = @YFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ 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@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ 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@ valgrind_enabled_tools = @valgrind_enabled_tools@ valgrind_tools = @valgrind_tools@ multi_SOURCES = \ multi.c multi_LDADD = \ $(SSDEEP_LDADD) \ $(LUA_LDADD) \ $(MAXMIND_LDADD) \ $(GLOBAL_LDADD) multi_LDFLAGS = \ -L$(top_builddir)/src/.libs/ \ $(GEOIP_LDFLAGS) \ -lmodsecurity \ -lpthread \ -lm \ -lstdc++ \ $(LUA_LDFLAGS) \ $(SSDEEP_LDFLAGS) \ $(MAXMIND_LDFLAGS) \ $(YAJL_LDFLAGS) multi_CFLAGS = \ -I$(top_builddir)/headers \ -I$(top_builddir) \ $(GLOBAL_CFLAGS) MAINTAINERCLEANFILES = \ Makefile.in 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 examples/multiprocess_c/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign examples/multiprocess_c/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): clean-noinstPROGRAMS: @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list multi$(EXEEXT): $(multi_OBJECTS) $(multi_DEPENDENCIES) $(EXTRA_multi_DEPENDENCIES) @rm -f multi$(EXEEXT) $(AM_V_CCLD)$(multi_LINK) $(multi_OBJECTS) $(multi_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/multi-multi.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< multi-multi.o: multi.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(multi_CFLAGS) $(CFLAGS) -MT multi-multi.o -MD -MP -MF $(DEPDIR)/multi-multi.Tpo -c -o multi-multi.o `test -f 'multi.c' || echo '$(srcdir)/'`multi.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/multi-multi.Tpo $(DEPDIR)/multi-multi.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='multi.c' object='multi-multi.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(multi_CFLAGS) $(CFLAGS) -c -o multi-multi.o `test -f 'multi.c' || echo '$(srcdir)/'`multi.c multi-multi.obj: multi.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(multi_CFLAGS) $(CFLAGS) -MT multi-multi.obj -MD -MP -MF $(DEPDIR)/multi-multi.Tpo -c -o multi-multi.obj `if test -f 'multi.c'; then $(CYGPATH_W) 'multi.c'; else $(CYGPATH_W) '$(srcdir)/multi.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/multi-multi.Tpo $(DEPDIR)/multi-multi.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='multi.c' object='multi-multi.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(multi_CFLAGS) $(CFLAGS) -c -o multi-multi.obj `if test -f 'multi.c'; then $(CYGPATH_W) 'multi.c'; else $(CYGPATH_W) '$(srcdir)/multi.c'; fi` mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ 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-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ 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" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files 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 $(PROGRAMS) installdirs: 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: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi 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." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \ 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-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: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstPROGRAMS cscopelist-am ctags \ ctags-am 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-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ 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 tags-am uninstall uninstall-am .PRECIOUS: Makefile # 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: modsecurity-v3.0.6/examples/multiprocess_c/multi.c0000664000175000017500000000771314146026157023564 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include #include #include #include #include #include #include #include #include #define FORKS 5 #define REQUESTS_PER_PROCESS 100 char main_rule_uri[] = "basic_rules.conf"; RulesSet *rules = NULL; ModSecurity *modsec = NULL; void process_special_request (int j) { Transaction *transaction; transaction = msc_new_transaction(modsec, rules, NULL); msc_process_connection(transaction, "127.0.0.1", 12345, "127.0.0.1", 80); msc_process_uri(transaction, "http://www.modsecurity.org/test?foo=herewego", "GET", "1.1"); msc_add_request_header(transaction, (const unsigned char *) "User-Agent", (const unsigned char *) "Basic ModSecurity example"); msc_process_request_headers(transaction); msc_process_request_body(transaction); msc_add_response_header(transaction, (const unsigned char *) "Content-type", (const unsigned char *) "text/html"); msc_process_response_headers(transaction, 200, "HTTP 1.0"); msc_process_response_body(transaction); msc_process_logging(transaction); msc_transaction_cleanup(transaction); } void process_request (int j) { int i; for (i = 0; i < REQUESTS_PER_PROCESS; i++) { if (i == 1 && j == 1) { process_special_request(j); continue; } struct timeval tv; Transaction *transaction; transaction = msc_new_transaction(modsec, rules, NULL); msc_process_connection(transaction, "127.0.0.1", 12345, "127.0.0.1", 80); msc_process_uri(transaction, "http://www.modsecurity.org/test?key1=value1&key2=value2&key3=value3", "GET", "1.1"); msc_add_request_header(transaction, (const unsigned char *) "User-Agent", (const unsigned char *) "Basic ModSecurity example"); msc_process_request_headers(transaction); msc_process_request_body(transaction); msc_add_response_header(transaction, (const unsigned char *) "Content-type", (const unsigned char *) "text/html"); msc_process_response_headers(transaction, 200, "HTTP 1.0"); msc_process_response_body(transaction); msc_process_logging(transaction); msc_transaction_cleanup(transaction); tv.tv_sec = 1; tv.tv_usec = 500; select(0, NULL, NULL, NULL, &tv); } } int main (int argc, char **argv) { int ret; const char *error = NULL; int i = 0; pid_t pid; int f; modsec = msc_init(); msc_set_connector_info(modsec, "ModSecurity-test v0.0.1-alpha (Simple " \ "example on how to use ModSecurity API"); rules = msc_create_rules_set(); ret = msc_rules_add_file(rules, main_rule_uri, &error); if (ret < 0) { fprintf(stderr, "Problems loading the rules --\n"); fprintf(stderr, "%s\n", error); goto end; } msc_rules_dump(rules); for (f = 0; f < FORKS; f++) { pid = fork(); if (pid == 0) { process_request(f); goto child; } struct timeval tv; tv.tv_sec = 0; tv.tv_usec = 500; select(0, NULL, NULL, NULL, &tv); } wait(NULL); child: if (pid == 0) { return 0; } end: msc_rules_cleanup(rules); msc_cleanup(modsec); return 0; } modsecurity-v3.0.6/examples/simple_example_using_c/0000775000175000017500000000000014146027125023732 5ustar mhsvierulamhsvierulamodsecurity-v3.0.6/examples/simple_example_using_c/Makefile.am0000664000175000017500000000062714146026157025777 0ustar mhsvierulamhsvierula noinst_PROGRAMS = test test_SOURCES = \ test.c test_LDADD = \ $(GLOBAL_LDADD) \ $(LUA_LDADD) \ $(SSDEEP_LDADD) test_LDFLAGS = \ -L$(top_builddir)/src/.libs/ \ $(GEOIP_LDFLAGS) \ -lmodsecurity \ -lm \ -lstdc++ \ $(LUA_LDFLAGS) \ $(SSDEEP_LDFLAGS) \ $(YAJL_LDFLAGS) test_CFLAGS = \ -I$(top_builddir)/headers \ -I$(top_builddir) \ $(GLOBAL_CFLAGS) MAINTAINERCLEANFILES = \ Makefile.in modsecurity-v3.0.6/examples/simple_example_using_c/basic_rules.conf0000664000175000017500000002017214146026157027102 0ustar mhsvierulamhsvierula# -- Rule engine initialization ---------------------------------------------- # Enable ModSecurity, attaching it to every transaction. Use detection # only to start with, because that minimises the chances of post-installation # disruption. # SecRuleEngine DetectionOnly # -- Request body handling --------------------------------------------------- # Allow ModSecurity to access request bodies. If you don't, ModSecurity # won't be able to see any POST parameters, which opens a large security # hole for attackers to exploit. # SecRequestBodyAccess On # Enable XML request body parser. # Initiate XML Processor in case of xml content-type # SecRule REQUEST_HEADERS:Content-Type "text/xml" \ "id:'200000',phase:1,t:none,t:lowercase,pass,nolog,ctl:requestBodyProcessor=XML" # Enable JSON request body parser. # Initiate JSON Processor in case of JSON content-type; change accordingly # if your application does not use 'application/json' # SecRule REQUEST_HEADERS:Content-Type "application/json" \ "id:'200001',phase:1,t:none,t:lowercase,pass,nolog,ctl:requestBodyProcessor=JSON" # Maximum request body size we will accept for buffering. If you support # file uploads then the value given on the first line has to be as large # as the largest file you are willing to accept. The second value refers # to the size of data, with files excluded. You want to keep that value as # low as practical. # # Store up to 128 KB of request body data in memory. When the multipart # parser reachers this limit, it will start using your hard disk for # storage. That is slow, but unavoidable. # # What do do if the request body size is above our configured limit. # Keep in mind that this setting will automatically be set to ProcessPartial # when SecRuleEngine is set to DetectionOnly mode in order to minimize # disruptions when initially deploying ModSecurity. # SecRequestBodyLimitAction Reject # Verify that we've correctly processed the request body. # As a rule of thumb, when failing to process a request body # you should reject the request (when deployed in blocking mode) # or log a high-severity alert (when deployed in detection-only mode). # SecRule REQBODY_ERROR "!@eq 0" \ "id:'200002', phase:2,t:none,log,deny,status:400,msg:'Failed to parse request body.',logdata:'%{reqbody_error_msg}',severity:2" # By default be strict with what we accept in the multipart/form-data # request body. If the rule below proves to be too strict for your # environment consider changing it to detection-only. You are encouraged # _not_ to remove it altogether. # SecRule MULTIPART_STRICT_ERROR "!@eq 0" \ "id:'200003',phase:2,t:none,log,deny,status:400, \ msg:'Multipart request body failed strict validation: \ PE %{REQBODY_PROCESSOR_ERROR}, \ BQ %{MULTIPART_BOUNDARY_QUOTED}, \ BW %{MULTIPART_BOUNDARY_WHITESPACE}, \ DB %{MULTIPART_DATA_BEFORE}, \ DA %{MULTIPART_DATA_AFTER}, \ HF %{MULTIPART_HEADER_FOLDING}, \ LF %{MULTIPART_LF_LINE}, \ SM %{MULTIPART_MISSING_SEMICOLON}, \ IQ %{MULTIPART_INVALID_QUOTING}, \ IP %{MULTIPART_INVALID_PART}, \ IH %{MULTIPART_INVALID_HEADER_FOLDING}, \ FL %{MULTIPART_FILE_LIMIT_EXCEEDED}'" # Did we see anything that might be a boundary? # SecRule MULTIPART_UNMATCHED_BOUNDARY "!@eq 0" \ "id:'200004',phase:2,t:none,log,deny,msg:'Multipart parser detected a possible unmatched boundary.'" # PCRE Tuning # We want to avoid a potential RegEx DoS condition # SecPcreMatchLimit 1000 SecPcreMatchLimitRecursion 1000 # Some internal errors will set flags in TX and we will need to look for these. # All of these are prefixed with "MSC_". The following flags currently exist: # # MSC_PCRE_LIMITS_EXCEEDED: PCRE match limits were exceeded. # SecRule TX:/^MSC_/ "!@streq 0" \ "id:'200005',phase:2,t:none,deny,msg:'ModSecurity internal error flagged: %{MATCHED_VAR_NAME}'" # -- Response body handling -------------------------------------------------- # Allow ModSecurity to access response bodies. # You should have this directive enabled in order to identify errors # and data leakage issues. # # Do keep in mind that enabling this directive does increases both # memory consumption and response latency. # SecResponseBodyAccess On # Which response MIME types do you want to inspect? You should adjust the # configuration below to catch documents but avoid static files # (e.g., images and archives). # SecResponseBodyMimeType text/plain text/html text/xml # Buffer response bodies of up to 512 KB in length. SecResponseBodyLimit 524288 # What happens when we encounter a response body larger than the configured # limit? By default, we process what we have and let the rest through. # That's somewhat less secure, but does not break any legitimate pages. # SecResponseBodyLimitAction ProcessPartial # -- Filesystem configuration ------------------------------------------------ # The location where ModSecurity stores temporary files (for example, when # it needs to handle a file upload that is larger than the configured limit). # # This default setting is chosen due to all systems have /tmp available however, # this is less than ideal. It is recommended that you specify a location that's private. # SecTmpDir /tmp/ # The location where ModSecurity will keep its persistent data. This default setting # is chosen due to all systems have /tmp available however, it # too should be updated to a place that other users can't access. # SecDataDir /tmp/ # -- File uploads handling configuration ------------------------------------- # The location where ModSecurity stores intercepted uploaded files. This # location must be private to ModSecurity. You don't want other users on # the server to access the files, do you? # #SecUploadDir /opt/modsecurity/var/upload/ # By default, only keep the files that were determined to be unusual # in some way (by an external inspection script). For this to work you # will also need at least one file inspection rule. # #SecUploadKeepFiles RelevantOnly # Uploaded files are by default created with permissions that do not allow # any other user to access them. You may need to relax that if you want to # interface ModSecurity to an external program (e.g., an anti-virus). # #SecUploadFileMode 0600 # -- Debug log configuration ------------------------------------------------- # The default debug log configuration is to duplicate the error, warning # and notice messages from the error log. # #SecDebugLog /opt/modsecurity/var/log/debug.log #SecDebugLogLevel 3 # -- Audit log configuration ------------------------------------------------- # Log the transactions that are marked by a rule, as well as those that # trigger a server error (determined by a 5xx or 4xx, excluding 404, # level response status codes). # SecAuditEngine RelevantOnly SecAuditLogRelevantStatus "^(?:5|4(?!04))" # Log everything we know about a transaction. SecAuditLogParts ABIJDEFHZ # Use a single file for logging. This is much easier to look at, but # assumes that you will use the audit log only ocassionally. # SecAuditLogType Serial SecAuditLog /var/log/modsec_audit.log # Specify the path for concurrent audit logging. #SecAuditLogStorageDir /opt/modsecurity/var/audit/ # -- Miscellaneous ----------------------------------------------------------- # Use the most commonly used application/x-www-form-urlencoded parameter # separator. There's probably only one application somewhere that uses # something else so don't expect to change this value. # SecArgumentSeparator & # Settle on version 0 (zero) cookies, as that is what most applications # use. Using an incorrect cookie version may open your installation to # evasion attacks (against the rules that examine named cookies). # SecCookieFormat 0 # Specify your Unicode Code Point. # This mapping is used by the t:urlDecodeUni transformation function # to properly map encoded data to your language. Properly setting # these directives helps to reduce false positives and negatives. # SecUnicodeMapFile unicode.mapping 20127 # Improve the quality of ModSecurity by sharing information about your # current ModSecurity version and dependencies versions. # The following information will be shared: ModSecurity version, # Web Server version, APR version, PCRE version, Lua version, Libxml2 # version, Anonymous unique id for host. SecStatusEngine On modsecurity-v3.0.6/examples/simple_example_using_c/Makefile.in0000664000175000017500000005642214146027125026010 0ustar mhsvierulamhsvierula# Makefile.in generated by automake 1.15.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2017 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@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@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@ noinst_PROGRAMS = test$(EXEEXT) subdir = examples/simple_example_using_c ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/build/ax_prog_doxygen.m4 \ $(top_srcdir)/build/ax_valgrind_check.m4 \ $(top_srcdir)/build/curl.m4 $(top_srcdir)/build/libgeoip.m4 \ $(top_srcdir)/build/libmaxmind.m4 \ $(top_srcdir)/build/libtool.m4 $(top_srcdir)/build/libxml.m4 \ $(top_srcdir)/build/lmdb.m4 $(top_srcdir)/build/ltoptions.m4 \ $(top_srcdir)/build/ltsugar.m4 \ $(top_srcdir)/build/ltversion.m4 \ $(top_srcdir)/build/lt~obsolete.m4 $(top_srcdir)/build/lua.m4 \ $(top_srcdir)/build/pcre.m4 $(top_srcdir)/build/ssdeep.m4 \ $(top_srcdir)/build/yajl.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = PROGRAMS = $(noinst_PROGRAMS) am_test_OBJECTS = test-test.$(OBJEXT) test_OBJECTS = $(am_test_OBJECTS) am__DEPENDENCIES_1 = test_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = test_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(test_CFLAGS) $(CFLAGS) \ $(test_LDFLAGS) $(LDFLAGS) -o $@ AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(test_SOURCES) DIST_SOURCES = $(test_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BISON = @BISON@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CURL_CFLAGS = @CURL_CFLAGS@ CURL_CONFIG = @CURL_CONFIG@ CURL_CPPFLAGS = @CURL_CPPFLAGS@ CURL_DISPLAY = @CURL_DISPLAY@ CURL_FOUND = @CURL_FOUND@ CURL_LDADD = @CURL_LDADD@ CURL_LDFLAGS = @CURL_LDFLAGS@ CURL_USES_GNUTLS = @CURL_USES_GNUTLS@ CURL_VERSION = @CURL_VERSION@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DOXYGEN_PAPER_SIZE = @DOXYGEN_PAPER_SIZE@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ DX_CONFIG = @DX_CONFIG@ DX_DOCDIR = @DX_DOCDIR@ DX_DOT = @DX_DOT@ DX_DOXYGEN = @DX_DOXYGEN@ DX_DVIPS = @DX_DVIPS@ DX_EGREP = @DX_EGREP@ DX_ENV = @DX_ENV@ DX_FLAG_chi = @DX_FLAG_chi@ DX_FLAG_chm = @DX_FLAG_chm@ DX_FLAG_doc = @DX_FLAG_doc@ DX_FLAG_dot = @DX_FLAG_dot@ DX_FLAG_html = @DX_FLAG_html@ DX_FLAG_man = @DX_FLAG_man@ DX_FLAG_pdf = @DX_FLAG_pdf@ DX_FLAG_ps = @DX_FLAG_ps@ DX_FLAG_rtf = @DX_FLAG_rtf@ DX_FLAG_xml = @DX_FLAG_xml@ DX_HHC = @DX_HHC@ DX_LATEX = @DX_LATEX@ DX_MAKEINDEX = @DX_MAKEINDEX@ DX_PDFLATEX = @DX_PDFLATEX@ DX_PERL = @DX_PERL@ DX_PROJECT = @DX_PROJECT@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ENABLE_VALGRIND_drd = @ENABLE_VALGRIND_drd@ ENABLE_VALGRIND_helgrind = @ENABLE_VALGRIND_helgrind@ ENABLE_VALGRIND_memcheck = @ENABLE_VALGRIND_memcheck@ ENABLE_VALGRIND_sgcheck = @ENABLE_VALGRIND_sgcheck@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FLEX = @FLEX@ GEOIP_CFLAGS = @GEOIP_CFLAGS@ GEOIP_DISPLAY = @GEOIP_DISPLAY@ GEOIP_FOUND = @GEOIP_FOUND@ GEOIP_LDADD = @GEOIP_LDADD@ GEOIP_LDFLAGS = @GEOIP_LDFLAGS@ GEOIP_LIBS = @GEOIP_LIBS@ GEOIP_VERSION = @GEOIP_VERSION@ GLOBAL_CFLAGS = @GLOBAL_CFLAGS@ GLOBAL_CPPFLAGS = @GLOBAL_CPPFLAGS@ GLOBAL_LDADD = @GLOBAL_LDADD@ 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@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBXML2_CFLAGS = @LIBXML2_CFLAGS@ LIBXML2_CONFIG = @LIBXML2_CONFIG@ LIBXML2_CPPFLAGS = @LIBXML2_CPPFLAGS@ LIBXML2_DISPLAY = @LIBXML2_DISPLAY@ LIBXML2_FOUND = @LIBXML2_FOUND@ LIBXML2_LDADD = @LIBXML2_LDADD@ LIBXML2_LDFLAGS = @LIBXML2_LDFLAGS@ LIBXML2_VERSION = @LIBXML2_VERSION@ LIPO = @LIPO@ LMDB_CFLAGS = @LMDB_CFLAGS@ LMDB_DISPLAY = @LMDB_DISPLAY@ LMDB_FOUND = @LMDB_FOUND@ LMDB_LDADD = @LMDB_LDADD@ LMDB_LDFLAGS = @LMDB_LDFLAGS@ LMDB_LIBS = @LMDB_LIBS@ LMDB_VERSION = @LMDB_VERSION@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ LUA_CFLAGS = @LUA_CFLAGS@ LUA_DISPLAY = @LUA_DISPLAY@ LUA_FOUND = @LUA_FOUND@ LUA_LDADD = @LUA_LDADD@ LUA_LDFLAGS = @LUA_LDFLAGS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAXMIND_CFLAGS = @MAXMIND_CFLAGS@ MAXMIND_DISPLAY = @MAXMIND_DISPLAY@ MAXMIND_FOUND = @MAXMIND_FOUND@ MAXMIND_LDADD = @MAXMIND_LDADD@ MAXMIND_LDFLAGS = @MAXMIND_LDFLAGS@ MAXMIND_LIBS = @MAXMIND_LIBS@ MAXMIND_VERSION = @MAXMIND_VERSION@ MKDIR_P = @MKDIR_P@ MODSEC_MUTEX_ON_PM = @MODSEC_MUTEX_ON_PM@ MODSEC_NO_LOGS = @MODSEC_NO_LOGS@ MSC_BASE_DIR = @MSC_BASE_DIR@ MSC_GIT_VERSION = @MSC_GIT_VERSION@ MSC_VERSION = @MSC_VERSION@ MSC_VERSION_INFO = @MSC_VERSION_INFO@ MSC_VERSION_WITH_PATCHLEVEL = @MSC_VERSION_WITH_PATCHLEVEL@ 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_LD_PATH = @PCRE_LD_PATH@ PCRE_VERSION = @PCRE_VERSION@ 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@ SSDEEP_CFLAGS = @SSDEEP_CFLAGS@ SSDEEP_DISPLAY = @SSDEEP_DISPLAY@ SSDEEP_FOUND = @SSDEEP_FOUND@ SSDEEP_LDADD = @SSDEEP_LDADD@ SSDEEP_LDFLAGS = @SSDEEP_LDFLAGS@ STRIP = @STRIP@ VALGRIND = @VALGRIND@ VALGRIND_ENABLED = @VALGRIND_ENABLED@ VERSION = @VERSION@ YACC = @YACC@ YACC_INST = @YACC_INST@ YAJL_CFLAGS = @YAJL_CFLAGS@ YAJL_DISPLAY = @YAJL_DISPLAY@ YAJL_FOUND = @YAJL_FOUND@ YAJL_LDADD = @YAJL_LDADD@ YAJL_LDFLAGS = @YAJL_LDFLAGS@ YAJL_LIBS = @YAJL_LIBS@ YAJL_VERSION = @YAJL_VERSION@ YFLAGS = @YFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ 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@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ 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@ valgrind_enabled_tools = @valgrind_enabled_tools@ valgrind_tools = @valgrind_tools@ test_SOURCES = \ test.c test_LDADD = \ $(GLOBAL_LDADD) \ $(LUA_LDADD) \ $(SSDEEP_LDADD) test_LDFLAGS = \ -L$(top_builddir)/src/.libs/ \ $(GEOIP_LDFLAGS) \ -lmodsecurity \ -lm \ -lstdc++ \ $(LUA_LDFLAGS) \ $(SSDEEP_LDFLAGS) \ $(YAJL_LDFLAGS) test_CFLAGS = \ -I$(top_builddir)/headers \ -I$(top_builddir) \ $(GLOBAL_CFLAGS) MAINTAINERCLEANFILES = \ Makefile.in 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 examples/simple_example_using_c/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign examples/simple_example_using_c/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): clean-noinstPROGRAMS: @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list test$(EXEEXT): $(test_OBJECTS) $(test_DEPENDENCIES) $(EXTRA_test_DEPENDENCIES) @rm -f test$(EXEEXT) $(AM_V_CCLD)$(test_LINK) $(test_OBJECTS) $(test_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-test.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< test-test.o: test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_CFLAGS) $(CFLAGS) -MT test-test.o -MD -MP -MF $(DEPDIR)/test-test.Tpo -c -o test-test.o `test -f 'test.c' || echo '$(srcdir)/'`test.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test-test.Tpo $(DEPDIR)/test-test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test.c' object='test-test.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_CFLAGS) $(CFLAGS) -c -o test-test.o `test -f 'test.c' || echo '$(srcdir)/'`test.c test-test.obj: test.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_CFLAGS) $(CFLAGS) -MT test-test.obj -MD -MP -MF $(DEPDIR)/test-test.Tpo -c -o test-test.obj `if test -f 'test.c'; then $(CYGPATH_W) 'test.c'; else $(CYGPATH_W) '$(srcdir)/test.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test-test.Tpo $(DEPDIR)/test-test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test.c' object='test-test.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_CFLAGS) $(CFLAGS) -c -o test-test.obj `if test -f 'test.c'; then $(CYGPATH_W) 'test.c'; else $(CYGPATH_W) '$(srcdir)/test.c'; fi` mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ 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-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ 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" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files 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 $(PROGRAMS) installdirs: 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: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi 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." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \ 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-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: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstPROGRAMS cscopelist-am ctags \ ctags-am 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-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ 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 tags-am uninstall uninstall-am .PRECIOUS: Makefile # 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: modsecurity-v3.0.6/examples/simple_example_using_c/test-valgrind.sh0000775000175000017500000000014414146026157027057 0ustar mhsvierulamhsvierula#!/usr/bin/env bash valgrind --tool=massif valgrind --show-leak-kinds=all --leak-check=full ./test modsecurity-v3.0.6/examples/simple_example_using_c/test.c0000664000175000017500000000420114146026157025056 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include #include "modsecurity/modsecurity.h" #include "modsecurity/rules_set.h" char main_rule_uri[] = "basic_rules.conf"; int main (int argc, char **argv) { int ret; const char *error = NULL; ModSecurity *modsec; Transaction *transaction = NULL; RulesSet *rules; modsec = msc_init(); msc_set_connector_info(modsec, "ModSecurity-test v0.0.1-alpha (Simple " \ "example on how to use ModSecurity API"); rules = msc_create_rules_set(); ret = msc_rules_add_file(rules, main_rule_uri, &error); if (ret < 0) { fprintf(stderr, "Problems loading the rules --\n"); fprintf(stderr, "%s\n", error); goto end; } msc_rules_dump(rules); ret = msc_rules_add_remote(rules, "test", "https://www.modsecurity.org/modsecurity-regression-test-secremoterules.txt", &error); if (ret < 0) { fprintf(stderr, "Problems loading the rules --\n"); fprintf(stderr, "%s\n", error); goto end; } msc_rules_dump(rules); transaction = msc_new_transaction(modsec, rules, NULL); msc_process_connection(transaction, "127.0.0.1", 12345, "127.0.0.1", 80); msc_process_uri(transaction, "http://www.modsecurity.org/test?key1=value1&key2=value2&key3=value3", "GET", "1.1"); msc_process_request_headers(transaction); msc_process_request_body(transaction); msc_process_response_headers(transaction, 200, "HTTP 1.3"); msc_process_response_body(transaction); msc_process_logging(transaction); end: msc_rules_cleanup(rules); msc_cleanup(modsec); return 0; } modsecurity-v3.0.6/examples/using_bodies_in_chunks/0000775000175000017500000000000014146027125023732 5ustar mhsvierulamhsvierulamodsecurity-v3.0.6/examples/using_bodies_in_chunks/Makefile.am0000664000175000017500000000161314146026157025773 0ustar mhsvierulamhsvierula noinst_PROGRAMS = simple_request simple_request_SOURCES = \ simple_request.cc simple_request_LDADD = \ $(CURL_LDADD) \ $(GEOIP_LDADD) \ $(MAXMIND_LDADD) \ $(GLOBAL_LDADD) \ $(LIBXML2_LDADD) \ $(LMDB_LDADD) \ $(LUA_LDADD) \ $(PCRE_LDADD) \ $(SSDEEP_LDADD) \ $(YAJL_LDADD) simple_request_LDFLAGS = \ -L$(top_builddir)/src/.libs/ \ $(GEOIP_LDFLAGS) \ -lmodsecurity \ -lpthread \ -lm \ -lstdc++ \ $(MAXMIND_LDFLAGS) \ $(LMDB_LDFLAGS) \ -lpthread \ $(LUA_LDFLAGS) \ $(SSDEEP_LDFLAGS) \ $(YAJL_LDFLAGS) simple_request_CPPFLAGS = \ $(GLOBAL_CFLAGS) \ -std=c++11 \ -I$(top_builddir)/headers \ -I$(top_builddir) \ -g \ -I../others \ -fPIC \ -O3 \ $(GEOIP_CFLAGS) \ $(CURL_CFLAGS) \ $(MAXMIND_CFLAGS) \ $(GLOBAL_CPPFLAGS) \ $(MODSEC_NO_LOGS) \ $(YAJL_CFLAGS) \ $(LMDB_CFLAGS) \ $(LUA_CFLAGS) \ $(PCRE_CFLAGS) \ $(LIBXML2_CFLAGS) MAINTAINERCLEANFILES = \ Makefile.in modsecurity-v3.0.6/examples/using_bodies_in_chunks/Makefile.in0000664000175000017500000006140014146027125026000 0ustar mhsvierulamhsvierula# Makefile.in generated by automake 1.15.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2017 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@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@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@ noinst_PROGRAMS = simple_request$(EXEEXT) subdir = examples/using_bodies_in_chunks ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/build/ax_prog_doxygen.m4 \ $(top_srcdir)/build/ax_valgrind_check.m4 \ $(top_srcdir)/build/curl.m4 $(top_srcdir)/build/libgeoip.m4 \ $(top_srcdir)/build/libmaxmind.m4 \ $(top_srcdir)/build/libtool.m4 $(top_srcdir)/build/libxml.m4 \ $(top_srcdir)/build/lmdb.m4 $(top_srcdir)/build/ltoptions.m4 \ $(top_srcdir)/build/ltsugar.m4 \ $(top_srcdir)/build/ltversion.m4 \ $(top_srcdir)/build/lt~obsolete.m4 $(top_srcdir)/build/lua.m4 \ $(top_srcdir)/build/pcre.m4 $(top_srcdir)/build/ssdeep.m4 \ $(top_srcdir)/build/yajl.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = PROGRAMS = $(noinst_PROGRAMS) am_simple_request_OBJECTS = simple_request-simple_request.$(OBJEXT) simple_request_OBJECTS = $(am_simple_request_OBJECTS) am__DEPENDENCIES_1 = simple_request_DEPENDENCIES = $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = simple_request_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ $(AM_CXXFLAGS) $(CXXFLAGS) $(simple_request_LDFLAGS) \ $(LDFLAGS) -o $@ AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CXXFLAGS) $(CXXFLAGS) AM_V_CXX = $(am__v_CXX_@AM_V@) am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) am__v_CXX_0 = @echo " CXX " $@; am__v_CXX_1 = CXXLD = $(CXX) CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) am__v_CXXLD_0 = @echo " CXXLD " $@; am__v_CXXLD_1 = SOURCES = $(simple_request_SOURCES) DIST_SOURCES = $(simple_request_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BISON = @BISON@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CURL_CFLAGS = @CURL_CFLAGS@ CURL_CONFIG = @CURL_CONFIG@ CURL_CPPFLAGS = @CURL_CPPFLAGS@ CURL_DISPLAY = @CURL_DISPLAY@ CURL_FOUND = @CURL_FOUND@ CURL_LDADD = @CURL_LDADD@ CURL_LDFLAGS = @CURL_LDFLAGS@ CURL_USES_GNUTLS = @CURL_USES_GNUTLS@ CURL_VERSION = @CURL_VERSION@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DOXYGEN_PAPER_SIZE = @DOXYGEN_PAPER_SIZE@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ DX_CONFIG = @DX_CONFIG@ DX_DOCDIR = @DX_DOCDIR@ DX_DOT = @DX_DOT@ DX_DOXYGEN = @DX_DOXYGEN@ DX_DVIPS = @DX_DVIPS@ DX_EGREP = @DX_EGREP@ DX_ENV = @DX_ENV@ DX_FLAG_chi = @DX_FLAG_chi@ DX_FLAG_chm = @DX_FLAG_chm@ DX_FLAG_doc = @DX_FLAG_doc@ DX_FLAG_dot = @DX_FLAG_dot@ DX_FLAG_html = @DX_FLAG_html@ DX_FLAG_man = @DX_FLAG_man@ DX_FLAG_pdf = @DX_FLAG_pdf@ DX_FLAG_ps = @DX_FLAG_ps@ DX_FLAG_rtf = @DX_FLAG_rtf@ DX_FLAG_xml = @DX_FLAG_xml@ DX_HHC = @DX_HHC@ DX_LATEX = @DX_LATEX@ DX_MAKEINDEX = @DX_MAKEINDEX@ DX_PDFLATEX = @DX_PDFLATEX@ DX_PERL = @DX_PERL@ DX_PROJECT = @DX_PROJECT@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ENABLE_VALGRIND_drd = @ENABLE_VALGRIND_drd@ ENABLE_VALGRIND_helgrind = @ENABLE_VALGRIND_helgrind@ ENABLE_VALGRIND_memcheck = @ENABLE_VALGRIND_memcheck@ ENABLE_VALGRIND_sgcheck = @ENABLE_VALGRIND_sgcheck@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FLEX = @FLEX@ GEOIP_CFLAGS = @GEOIP_CFLAGS@ GEOIP_DISPLAY = @GEOIP_DISPLAY@ GEOIP_FOUND = @GEOIP_FOUND@ GEOIP_LDADD = @GEOIP_LDADD@ GEOIP_LDFLAGS = @GEOIP_LDFLAGS@ GEOIP_LIBS = @GEOIP_LIBS@ GEOIP_VERSION = @GEOIP_VERSION@ GLOBAL_CFLAGS = @GLOBAL_CFLAGS@ GLOBAL_CPPFLAGS = @GLOBAL_CPPFLAGS@ GLOBAL_LDADD = @GLOBAL_LDADD@ 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@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBXML2_CFLAGS = @LIBXML2_CFLAGS@ LIBXML2_CONFIG = @LIBXML2_CONFIG@ LIBXML2_CPPFLAGS = @LIBXML2_CPPFLAGS@ LIBXML2_DISPLAY = @LIBXML2_DISPLAY@ LIBXML2_FOUND = @LIBXML2_FOUND@ LIBXML2_LDADD = @LIBXML2_LDADD@ LIBXML2_LDFLAGS = @LIBXML2_LDFLAGS@ LIBXML2_VERSION = @LIBXML2_VERSION@ LIPO = @LIPO@ LMDB_CFLAGS = @LMDB_CFLAGS@ LMDB_DISPLAY = @LMDB_DISPLAY@ LMDB_FOUND = @LMDB_FOUND@ LMDB_LDADD = @LMDB_LDADD@ LMDB_LDFLAGS = @LMDB_LDFLAGS@ LMDB_LIBS = @LMDB_LIBS@ LMDB_VERSION = @LMDB_VERSION@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ LUA_CFLAGS = @LUA_CFLAGS@ LUA_DISPLAY = @LUA_DISPLAY@ LUA_FOUND = @LUA_FOUND@ LUA_LDADD = @LUA_LDADD@ LUA_LDFLAGS = @LUA_LDFLAGS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAXMIND_CFLAGS = @MAXMIND_CFLAGS@ MAXMIND_DISPLAY = @MAXMIND_DISPLAY@ MAXMIND_FOUND = @MAXMIND_FOUND@ MAXMIND_LDADD = @MAXMIND_LDADD@ MAXMIND_LDFLAGS = @MAXMIND_LDFLAGS@ MAXMIND_LIBS = @MAXMIND_LIBS@ MAXMIND_VERSION = @MAXMIND_VERSION@ MKDIR_P = @MKDIR_P@ MODSEC_MUTEX_ON_PM = @MODSEC_MUTEX_ON_PM@ MODSEC_NO_LOGS = @MODSEC_NO_LOGS@ MSC_BASE_DIR = @MSC_BASE_DIR@ MSC_GIT_VERSION = @MSC_GIT_VERSION@ MSC_VERSION = @MSC_VERSION@ MSC_VERSION_INFO = @MSC_VERSION_INFO@ MSC_VERSION_WITH_PATCHLEVEL = @MSC_VERSION_WITH_PATCHLEVEL@ 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_LD_PATH = @PCRE_LD_PATH@ PCRE_VERSION = @PCRE_VERSION@ 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@ SSDEEP_CFLAGS = @SSDEEP_CFLAGS@ SSDEEP_DISPLAY = @SSDEEP_DISPLAY@ SSDEEP_FOUND = @SSDEEP_FOUND@ SSDEEP_LDADD = @SSDEEP_LDADD@ SSDEEP_LDFLAGS = @SSDEEP_LDFLAGS@ STRIP = @STRIP@ VALGRIND = @VALGRIND@ VALGRIND_ENABLED = @VALGRIND_ENABLED@ VERSION = @VERSION@ YACC = @YACC@ YACC_INST = @YACC_INST@ YAJL_CFLAGS = @YAJL_CFLAGS@ YAJL_DISPLAY = @YAJL_DISPLAY@ YAJL_FOUND = @YAJL_FOUND@ YAJL_LDADD = @YAJL_LDADD@ YAJL_LDFLAGS = @YAJL_LDFLAGS@ YAJL_LIBS = @YAJL_LIBS@ YAJL_VERSION = @YAJL_VERSION@ YFLAGS = @YFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ 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@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ 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@ valgrind_enabled_tools = @valgrind_enabled_tools@ valgrind_tools = @valgrind_tools@ simple_request_SOURCES = \ simple_request.cc simple_request_LDADD = \ $(CURL_LDADD) \ $(GEOIP_LDADD) \ $(MAXMIND_LDADD) \ $(GLOBAL_LDADD) \ $(LIBXML2_LDADD) \ $(LMDB_LDADD) \ $(LUA_LDADD) \ $(PCRE_LDADD) \ $(SSDEEP_LDADD) \ $(YAJL_LDADD) simple_request_LDFLAGS = \ -L$(top_builddir)/src/.libs/ \ $(GEOIP_LDFLAGS) \ -lmodsecurity \ -lpthread \ -lm \ -lstdc++ \ $(MAXMIND_LDFLAGS) \ $(LMDB_LDFLAGS) \ -lpthread \ $(LUA_LDFLAGS) \ $(SSDEEP_LDFLAGS) \ $(YAJL_LDFLAGS) simple_request_CPPFLAGS = \ $(GLOBAL_CFLAGS) \ -std=c++11 \ -I$(top_builddir)/headers \ -I$(top_builddir) \ -g \ -I../others \ -fPIC \ -O3 \ $(GEOIP_CFLAGS) \ $(CURL_CFLAGS) \ $(MAXMIND_CFLAGS) \ $(GLOBAL_CPPFLAGS) \ $(MODSEC_NO_LOGS) \ $(YAJL_CFLAGS) \ $(LMDB_CFLAGS) \ $(LUA_CFLAGS) \ $(PCRE_CFLAGS) \ $(LIBXML2_CFLAGS) MAINTAINERCLEANFILES = \ Makefile.in all: all-am .SUFFIXES: .SUFFIXES: .cc .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 examples/using_bodies_in_chunks/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign examples/using_bodies_in_chunks/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): clean-noinstPROGRAMS: @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list simple_request$(EXEEXT): $(simple_request_OBJECTS) $(simple_request_DEPENDENCIES) $(EXTRA_simple_request_DEPENDENCIES) @rm -f simple_request$(EXEEXT) $(AM_V_CXXLD)$(simple_request_LINK) $(simple_request_OBJECTS) $(simple_request_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/simple_request-simple_request.Po@am__quote@ .cc.o: @am__fastdepCXX_TRUE@ $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< .cc.obj: @am__fastdepCXX_TRUE@ $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cc.lo: @am__fastdepCXX_TRUE@ $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ @am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< simple_request-simple_request.o: simple_request.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(simple_request_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT simple_request-simple_request.o -MD -MP -MF $(DEPDIR)/simple_request-simple_request.Tpo -c -o simple_request-simple_request.o `test -f 'simple_request.cc' || echo '$(srcdir)/'`simple_request.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/simple_request-simple_request.Tpo $(DEPDIR)/simple_request-simple_request.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='simple_request.cc' object='simple_request-simple_request.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(simple_request_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o simple_request-simple_request.o `test -f 'simple_request.cc' || echo '$(srcdir)/'`simple_request.cc simple_request-simple_request.obj: simple_request.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(simple_request_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT simple_request-simple_request.obj -MD -MP -MF $(DEPDIR)/simple_request-simple_request.Tpo -c -o simple_request-simple_request.obj `if test -f 'simple_request.cc'; then $(CYGPATH_W) 'simple_request.cc'; else $(CYGPATH_W) '$(srcdir)/simple_request.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/simple_request-simple_request.Tpo $(DEPDIR)/simple_request-simple_request.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='simple_request.cc' object='simple_request-simple_request.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(simple_request_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o simple_request-simple_request.obj `if test -f 'simple_request.cc'; then $(CYGPATH_W) 'simple_request.cc'; else $(CYGPATH_W) '$(srcdir)/simple_request.cc'; fi` mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ 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-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ 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" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files 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 $(PROGRAMS) installdirs: 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: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi 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." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \ 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-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: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstPROGRAMS cscopelist-am ctags \ ctags-am 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-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ 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 tags-am uninstall uninstall-am .PRECIOUS: Makefile # 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: modsecurity-v3.0.6/examples/using_bodies_in_chunks/simple_request.cc0000664000175000017500000002002414146026157027304 0ustar mhsvierulamhsvierula/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2021 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 #include #include #include #include #include #include #include char request_uri[] = "/test.pl?param1=test¶2=test2"; char request_body_first[] = "" \ "\n\r" \ "\n\r" \ " \n\r" \ " \n\r" \ " string\n\r"; char request_body_third[] = "" \ " \n\r" \ " \n\r" \ "\n\r"; char response_body_first[] = "" \ "\n\r" \ "\n\r" \ " \n\r" \ " \n\r" \ " string\n\r"; char response_body_third[] = "" \ " \n\r" \ " \n\r" \ "\n\r"; char ip[] = "200.249.12.31"; static void logCb(void *data, const void *ruleMessagev) { if (ruleMessagev == NULL) { std::cout << "I've got a call but the message was null ;("; std::cout << std::endl; return; } const modsecurity::RuleMessage *ruleMessage = \ reinterpret_cast(ruleMessagev); std::cout << "Rule Id: " << std::to_string(ruleMessage->m_ruleId); std::cout << " phase: " << std::to_string(ruleMessage->m_phase); std::cout << std::endl; if (ruleMessage->m_isDisruptive) { std::cout << " * Disruptive action: "; std::cout << modsecurity::RuleMessage::log(ruleMessage); std::cout << std::endl; std::cout << " ** %d is meant to be informed by the webserver."; std::cout << std::endl; } else { std::cout << " * Match, but no disruptive action: "; std::cout << modsecurity::RuleMessage::log(ruleMessage); std::cout << std::endl; } } int process_intervention(modsecurity::Transaction *transaction) { modsecurity::ModSecurityIntervention intervention; intervention.status = 200; intervention.url = NULL; intervention.log = NULL; intervention.disruptive = 0; if (msc_intervention(transaction, &intervention) == 0) { return 0; } if (intervention.log == NULL) { intervention.log = strdup("(no log message was specified)"); } std::cout << "Log: " << intervention.log << std::endl; free(intervention.log); intervention.log = NULL; if (intervention.url != NULL) { std::cout << "Intervention, redirect to: " << intervention.url; std::cout << " with status code: " << intervention.status << std::endl; free(intervention.url); intervention.url = NULL; return intervention.status; } if (intervention.status != 200) { std::cout << "Intervention, returning code: " << intervention.status; std::cout << std::endl; return intervention.status; } return 0; } int main(int argc, char **argv) { modsecurity::ModSecurity *modsec; modsecurity::RulesSet *rules; if (argc < 2) { std::cout << "Use " << *argv << " test-case-file.conf"; std::cout << std::endl << std::endl; return -1; } char *rule = *(argv++); std::string rules_arg(rule); /** * ModSecurity initial setup * */ modsec = new modsecurity::ModSecurity(); modsec->setConnectorInformation("ModSecurity-test v0.0.1-alpha" \ " (ModSecurity test)"); modsec->setServerLogCb(logCb, modsecurity::RuleMessageLogProperty | modsecurity::IncludeFullHighlightLogProperty); /** * loading the rules.... * */ rules = new modsecurity::RulesSet(); if (rules->loadFromUri(rules_arg.c_str()) < 0) { std::cout << "Problems loading the rules..." << std::endl; std::cout << rules->m_parserError.str() << std::endl; return -1; } /** * We are going to have a transaction * */ modsecurity::Transaction *modsecTransaction = \ new modsecurity::Transaction(modsec, rules, NULL); process_intervention(modsecTransaction); /** * Initial connection setup * */ modsecTransaction->processConnection(ip, 12345, "127.0.0.1", 80); process_intervention(modsecTransaction); /** * Finally we've got the URI * */ modsecTransaction->processURI(request_uri, "GET", "1.1"); process_intervention(modsecTransaction); /** * Lets add our request headers. * */ modsecTransaction->addRequestHeader("Host", "net.tutsplus.com"); process_intervention(modsecTransaction); /** * No other reuqest header to add, let process it. * */ modsecTransaction->processRequestHeaders(); process_intervention(modsecTransaction); /** * There is a request body to be informed... * */ modsecTransaction->appendRequestBody( (const unsigned char*)request_body_first, strlen((const char*)request_body_first)); process_intervention(modsecTransaction); modsecTransaction->appendRequestBody( (const unsigned char*)request_body_second, strlen((const char*)request_body_second)); process_intervention(modsecTransaction); modsecTransaction->appendRequestBody( (const unsigned char*)request_body_third, strlen((const char*)request_body_third)); process_intervention(modsecTransaction); /** * Request body is there ;) lets process it. * */ modsecTransaction->processRequestBody(); process_intervention(modsecTransaction); /** * The webserver is giving back the response headers. */ modsecTransaction->addResponseHeader("HTTP/1.1", "200 OK"); process_intervention(modsecTransaction); /** * The response headers are filled in, lets process. * */ modsecTransaction->processResponseHeaders(200, "HTTP 1.2"); process_intervention(modsecTransaction); /** * It is time to let modsec aware of the response body * */ modsecTransaction->appendResponseBody( (const unsigned char*)response_body_first, strlen((const char*)response_body_first)); process_intervention(modsecTransaction); modsecTransaction->appendResponseBody( (const unsigned char*)response_body_second, strlen((const char*)response_body_second)); process_intervention(modsecTransaction); modsecTransaction->appendResponseBody( (const unsigned char*)response_body_third, strlen((const char*)response_body_third)); process_intervention(modsecTransaction); /** * Finally, lets have the response body processed. * */ modsecTransaction->processResponseBody(); process_intervention(modsecTransaction); /** * Keeping track of everything: saving the logs. * */ modsecTransaction->processLogging(); process_intervention(modsecTransaction); /** * cleanup. */ delete modsecTransaction; delete rules; delete modsec; } modsecurity-v3.0.6/examples/using_bodies_in_chunks/example.conf0000664000175000017500000000014214146026157026235 0ustar mhsvierulamhsvierulaSecDebugLog /dev/stdout SecDebugLogLevel 9 SecRule RESPONSE_BODY "/soap:Body" "id:1,phase:5,deny" modsecurity-v3.0.6/modsecurity.conf-recommended0000664000175000017500000002444214146026157023111 0ustar mhsvierulamhsvierula# -- Rule engine initialization ---------------------------------------------- # Enable ModSecurity, attaching it to every transaction. Use detection # only to start with, because that minimises the chances of post-installation # disruption. # SecRuleEngine DetectionOnly # -- Request body handling --------------------------------------------------- # Allow ModSecurity to access request bodies. If you don't, ModSecurity # won't be able to see any POST parameters, which opens a large security # hole for attackers to exploit. # SecRequestBodyAccess On # Enable XML request body parser. # Initiate XML Processor in case of xml content-type # SecRule REQUEST_HEADERS:Content-Type "(?:application(?:/soap\+|/)|text/)xml" \ "id:'200000',phase:1,t:none,t:lowercase,pass,nolog,ctl:requestBodyProcessor=XML" # Enable JSON request body parser. # Initiate JSON Processor in case of JSON content-type; change accordingly # if your application does not use 'application/json' # SecRule REQUEST_HEADERS:Content-Type "application/json" \ "id:'200001',phase:1,t:none,t:lowercase,pass,nolog,ctl:requestBodyProcessor=JSON" # Sample rule to enable JSON request body parser for more subtypes. # Uncomment or adapt this rule if you want to engage the JSON # Processor for "+json" subtypes # #SecRule REQUEST_HEADERS:Content-Type "^application/.+[+]json$" \ # "id:'200006',phase:1,t:none,t:lowercase,pass,nolog,ctl:requestBodyProcessor=JSON" # Maximum request body size we will accept for buffering. If you support # file uploads then the value given on the first line has to be as large # as the largest file you are willing to accept. The second value refers # to the size of data, with files excluded. You want to keep that value as # low as practical. # SecRequestBodyLimit 13107200 SecRequestBodyNoFilesLimit 131072 # What to do if the request body size is above our configured limit. # Keep in mind that this setting will automatically be set to ProcessPartial # when SecRuleEngine is set to DetectionOnly mode in order to minimize # disruptions when initially deploying ModSecurity. # SecRequestBodyLimitAction Reject # Verify that we've correctly processed the request body. # As a rule of thumb, when failing to process a request body # you should reject the request (when deployed in blocking mode) # or log a high-severity alert (when deployed in detection-only mode). # SecRule REQBODY_ERROR "!@eq 0" \ "id:'200002', phase:2,t:none,log,deny,status:400,msg:'Failed to parse request body.',logdata:'%{reqbody_error_msg}',severity:2" # By default be strict with what we accept in the multipart/form-data # request body. If the rule below proves to be too strict for your # environment consider changing it to detection-only. You are encouraged # _not_ to remove it altogether. # SecRule MULTIPART_STRICT_ERROR "!@eq 0" \ "id:'200003',phase:2,t:none,log,deny,status:400, \ msg:'Multipart request body failed strict validation: \ PE %{REQBODY_PROCESSOR_ERROR}, \ BQ %{MULTIPART_BOUNDARY_QUOTED}, \ BW %{MULTIPART_BOUNDARY_WHITESPACE}, \ DB %{MULTIPART_DATA_BEFORE}, \ DA %{MULTIPART_DATA_AFTER}, \ HF %{MULTIPART_HEADER_FOLDING}, \ LF %{MULTIPART_LF_LINE}, \ SM %{MULTIPART_MISSING_SEMICOLON}, \ IQ %{MULTIPART_INVALID_QUOTING}, \ IP %{MULTIPART_INVALID_PART}, \ IH %{MULTIPART_INVALID_HEADER_FOLDING}, \ FL %{MULTIPART_FILE_LIMIT_EXCEEDED}'" # Did we see anything that might be a boundary? # # Here is a short description about the ModSecurity Multipart parser: the # parser returns with value 0, if all "boundary-like" line matches with # the boundary string which given in MIME header. In any other cases it returns # with different value, eg. 1 or 2. # # The RFC 1341 descript the multipart content-type and its syntax must contains # only three mandatory lines (above the content): # * Content-Type: multipart/mixed; boundary=BOUNDARY_STRING # * --BOUNDARY_STRING # * --BOUNDARY_STRING-- # # First line indicates, that this is a multipart content, second shows that # here starts a part of the multipart content, third shows the end of content. # # If there are any other lines, which starts with "--", then it should be # another boundary id - or not. # # After 3.0.3, there are two kinds of types of boundary errors: strict and permissive. # # If multipart content contains the three necessary lines with correct order, but # there are one or more lines with "--", then parser returns with value 2 (non-zero). # # If some of the necessary lines (usually the start or end) misses, or the order # is wrong, then parser returns with value 1 (also a non-zero). # # You can choose, which one is what you need. The example below contains the # 'strict' mode, which means if there are any lines with start of "--", then # ModSecurity blocked the content. But the next, commented example contains # the 'permissive' mode, then you check only if the necessary lines exists in # correct order. Whit this, you can enable to upload PEM files (eg "----BEGIN.."), # or other text files, which contains eg. HTTP headers. # # The difference is only the operator - in strict mode (first) the content blocked # in case of any non-zero value. In permissive mode (second, commented) the # content blocked only if the value is explicit 1. If it 0 or 2, the content will # allowed. # # # See #1747 and #1924 for further information on the possible values for # MULTIPART_UNMATCHED_BOUNDARY. # SecRule MULTIPART_UNMATCHED_BOUNDARY "@eq 1" \ "id:'200004',phase:2,t:none,log,deny,msg:'Multipart parser detected a possible unmatched boundary.'" # PCRE Tuning # We want to avoid a potential RegEx DoS condition # SecPcreMatchLimit 1000 SecPcreMatchLimitRecursion 1000 # Some internal errors will set flags in TX and we will need to look for these. # All of these are prefixed with "MSC_". The following flags currently exist: # # MSC_PCRE_LIMITS_EXCEEDED: PCRE match limits were exceeded. # SecRule TX:/^MSC_/ "!@streq 0" \ "id:'200005',phase:2,t:none,deny,msg:'ModSecurity internal error flagged: %{MATCHED_VAR_NAME}'" # -- Response body handling -------------------------------------------------- # Allow ModSecurity to access response bodies. # You should have this directive enabled in order to identify errors # and data leakage issues. # # Do keep in mind that enabling this directive does increases both # memory consumption and response latency. # SecResponseBodyAccess On # Which response MIME types do you want to inspect? You should adjust the # configuration below to catch documents but avoid static files # (e.g., images and archives). # SecResponseBodyMimeType text/plain text/html text/xml # Buffer response bodies of up to 512 KB in length. SecResponseBodyLimit 524288 # What happens when we encounter a response body larger than the configured # limit? By default, we process what we have and let the rest through. # That's somewhat less secure, but does not break any legitimate pages. # SecResponseBodyLimitAction ProcessPartial # -- Filesystem configuration ------------------------------------------------ # The location where ModSecurity stores temporary files (for example, when # it needs to handle a file upload that is larger than the configured limit). # # This default setting is chosen due to all systems have /tmp available however, # this is less than ideal. It is recommended that you specify a location that's private. # SecTmpDir /tmp/ # The location where ModSecurity will keep its persistent data. This default setting # is chosen due to all systems have /tmp available however, it # too should be updated to a place that other users can't access. # SecDataDir /tmp/ # -- File uploads handling configuration ------------------------------------- # The location where ModSecurity stores intercepted uploaded files. This # location must be private to ModSecurity. You don't want other users on # the server to access the files, do you? # #SecUploadDir /opt/modsecurity/var/upload/ # By default, only keep the files that were determined to be unusual # in some way (by an external inspection script). For this to work you # will also need at least one file inspection rule. # #SecUploadKeepFiles RelevantOnly # Uploaded files are by default created with permissions that do not allow # any other user to access them. You may need to relax that if you want to # interface ModSecurity to an external program (e.g., an anti-virus). # #SecUploadFileMode 0600 # -- Debug log configuration ------------------------------------------------- # The default debug log configuration is to duplicate the error, warning # and notice messages from the error log. # #SecDebugLog /opt/modsecurity/var/log/debug.log #SecDebugLogLevel 3 # -- Audit log configuration ------------------------------------------------- # Log the transactions that are marked by a rule, as well as those that # trigger a server error (determined by a 5xx or 4xx, excluding 404, # level response status codes). # SecAuditEngine RelevantOnly SecAuditLogRelevantStatus "^(?:5|4(?!04))" # Log everything we know about a transaction. SecAuditLogParts ABIJDEFHZ # Use a single file for logging. This is much easier to look at, but # assumes that you will use the audit log only ocassionally. # SecAuditLogType Serial SecAuditLog /var/log/modsec_audit.log # Specify the path for concurrent audit logging. #SecAuditLogStorageDir /opt/modsecurity/var/audit/ # -- Miscellaneous ----------------------------------------------------------- # Use the most commonly used application/x-www-form-urlencoded parameter # separator. There's probably only one application somewhere that uses # something else so don't expect to change this value. # SecArgumentSeparator & # Settle on version 0 (zero) cookies, as that is what most applications # use. Using an incorrect cookie version may open your installation to # evasion attacks (against the rules that examine named cookies). # SecCookieFormat 0 # Specify your Unicode Code Point. # This mapping is used by the t:urlDecodeUni transformation function # to properly map encoded data to your language. Properly setting # these directives helps to reduce false positives and negatives. # SecUnicodeMapFile unicode.mapping 20127 # Improve the quality of ModSecurity by sharing information about your # current ModSecurity version and dependencies versions. # The following information will be shared: ModSecurity version, # Web Server version, APR version, PCRE version, Lua version, Libxml2 # version, Anonymous unique id for host. SecStatusEngine On modsecurity-v3.0.6/README.md0000664000175000017500000003064114146026157016670 0ustar mhsvierulamhsvierula ![Quality Assurance](https://github.com/SpiderLabs/ModSecurity/workflows/Quality%20Assurance/badge.svg) [![Build Status](https://sonarcloud.io/api/project_badges/measure?project=USHvY32Uy62L&metric=alert_status)](https://sonarcloud.io/dashboard?id=USHvY32Uy62L) [![](https://sonarcloud.io/api/project_badges/measure?project=USHvY32Uy62L&metric=sqale_rating )](https://sonarcloud.io/dashboard?id=USHvY32Uy62L) [![](https://sonarcloud.io/api/project_badges/measure?project=USHvY32Uy62L&metric=reliability_rating )](https://sonarcloud.io/dashboard?id=USHvY32Uy62L) [![](https://sonarcloud.io/api/project_badges/measure?project=USHvY32Uy62L&metric=security_rating )](https://sonarcloud.io/dashboard?id=USHvY32Uy62L) [![](https://sonarcloud.io/api/project_badges/measure?project=USHvY32Uy62L&metric=vulnerabilities )](https://sonarcloud.io/dashboard?id=USHvY32Uy62L) Libmodsecurity is one component of the ModSecurity v3 project. The library codebase serves as an interface to ModSecurity Connectors taking in web traffic and applying traditional ModSecurity processing. In general, it provides the capability to load/interpret rules written in the ModSecurity SecRules format and apply them to HTTP content provided by your application via Connectors. If you are looking for ModSecurity for Apache (aka ModSecurity v2.x), it is still under maintenance and available: [here](https://github.com/SpiderLabs/ModSecurity/tree/v2/master). ### What is the difference between this project and the old ModSecurity (v2.x.x)? * All Apache dependencies have been removed * Higher performance * New features * New architecture Libmodsecurity is a complete rewrite of the ModSecurity platform. When it was first devised the ModSecurity project started as just an Apache module. Over time the project has been extended, due to popular demand, to support other platforms including (but not limited to) Nginx and IIS. In order to provide for the growing demand for additional platform support, it has became necessary to remove the Apache dependencies underlying this project, making it more platform independent. As a result of this goal we have rearchitected Libmodsecurity such that it is no longer dependent on the Apache web server (both at compilation and during runtime). One side effect of this is that across all platforms users can expect increased performance. Additionally, we have taken this opportunity to lay the groundwork for some new features that users have been long seeking. For example we are looking to natively support auditlogs in the JSON format, along with a host of other functionality in future versions. ### It is no longer just a module. The 'ModSecurity' branch no longer contains the traditional module logic (for Nginx, Apache, and IIS) that has traditionally been packaged all together. Instead, this branch only contains the library portion (libmodsecurity) for this project. This library is consumed by what we have termed 'Connectors' these connectors will interface with your webserver and provide the library with a common format that it understands. Each of these connectors is maintained as a separate GitHub project. For instance, the Nginx connector is supplied by the ModSecurity-nginx project (https://github.com/SpiderLabs/ModSecurity-nginx). Keeping these connectors separated allows each project to have different release cycles, issues and development trees. Additionally, it means that when you install ModSecurity v3 you only get exactly what you need, no extras you won't be using. # Compilation Before starting the compilation process, make sure that you have all the dependencies in place. Read the subsection “Dependencies” for further information. After the compilation make sure that there are no issues on your build/platform. We strongly recommend the utilization of the unit tests and regression tests. These test utilities are located under the subfolder ‘tests’. As a dynamic library, don’t forget that libmodsecurity must be installed to a location (folder) where you OS will be looking for dynamic libraries. ### Unix (Linux, MacOS, FreeBSD, …) On unix the project uses autotools to help the compilation process. ```shell $ ./build.sh $ ./configure $ make $ sudo make install ``` Details on distribution specific builds can be found in our Wiki: [Compilation Recipes](https://github.com/SpiderLabs/ModSecurity/wiki/Compilation-recipes) ### Windows Windows build is not ready yet. ## Dependencies This library is written in C++ using the C++11 standards. It also uses Flex and Yacc to produce the “Sec Rules Language” parser. Other, mandatory dependencies include YAJL, as ModSecurity uses JSON for producing logs and its testing framework, libpcre (not yet mandatory) for processing regular expressions in SecRules, and libXML2 (not yet mandatory) which is used for parsing XML requests. All others dependencies are related to operators specified within SecRules or configuration directives and may not be required for compilation. A short list of such dependencies is as follows: * libinjection is needed for the operator @detectXSS and @detectSQL * curl is needed for the directive SecRemoteRules. If those libraries are missing ModSecurity will be compiled without the support for the operator @detectXSS and the configuration directive SecRemoteRules. # Library documentation The library documentation is written within the code in Doxygen format. To generate this documentation, please use the doxygen utility with the provided configuration file, “doxygen.cfg”, located with the "doc/" subfolder. This will generate HTML formatted documentation including usage examples. # Library utilization The library provides a C++ and C interface. Some resources are currently only available via the C++ interface, for instance, the capability to create custom logging mechanism (see the regression test to check for how those logging mechanism works). The objective is to have both APIs (C, C++) providing the same functionality, if you find an aspect of the API that is missing via a particular interface, please open an issue. Inside the subfolder examples, there are simple examples on how to use the API. Below some are illustrated: ### Simple example using C++ ```c++ using ModSecurity::ModSecurity; using ModSecurity::Rules; using ModSecurity::Transaction; ModSecurity *modsec; ModSecurity::Rules *rules; modsec = new ModSecurity(); rules = new Rules(); rules->loadFromUri(rules_file); Transaction *modsecTransaction = new Transaction(modsec, rules); modsecTransaction->processConnection("127.0.0.1"); if (modsecTransaction->intervention()) { std::cout << "There is an intervention" << std::endl; } ``` ### Simple example using C ```c #include "modsecurity/modsecurity.h" #include "modsecurity/transaction.h" char main_rule_uri[] = "basic_rules.conf"; int main (int argc, char **argv) { ModSecurity *modsec = NULL; Transaction *transaction = NULL; Rules *rules = NULL; modsec = msc_init(); rules = msc_create_rules_set(); msc_rules_add_file(rules, main_rule_uri); transaction = msc_new_transaction(modsec, rules); msc_process_connection(transaction, "127.0.0.1"); msc_process_uri(transaction, "http://www.modsecurity.org/test?key1=value1&key2=value2&key3=value3&test=args&test=test"); msc_process_request_headers(transaction); msc_process_request_body(transaction); msc_process_response_headers(transaction); msc_process_response_body(transaction); return 0; } ``` # Contributing You are more than welcome to contribute to this project and look forward to growing the community around this new version of ModSecurity. Areas of interest include: New functionalities, fixes, bug report, support for beginning users, or anything that you are willing to help with. ## Providing patches We prefer to have your patch within the GitHub infrastructure to facilitate our review work, and our Q.A. integration. GitHub provides excellent documentation on how to perform “Pull Requests”, more information available here: https://help.github.com/articles/using-pull-requests/ Please respect the coding style. Pull requests can include various commits, so provide one fix or one piece of functionality per commit. Please do not change anything outside the scope of your target work (e.g. coding style in a function that you have passed by). For further information about the coding style used in this project, please check: https://www.chromium.org/blink/coding-style Provides explanative commit messages. Your first line should give the highlights of your patch, 3rd and on give a more detailed explanation/technical details about your patch. Patch explanation is valuable during the review process. ### Don’t know where to start? Within our code there are various items marked as TODO or FIXME that may need your attention. Check the list of items by performing a grep: ``` $ cd /path/to/modsecurity-nginx $ egrep -Rin "TODO|FIXME" -R * ``` A TODO list is also available as part of the Doxygen documentation. ### Testing your patch Along with the manual testing, we strongly recommend you to use the our regression tests and unit tests. If you have implemented an operator, don’t forget to create unit tests for it. If you implement anything else, it is encouraged that you develop complimentary regression tests for it. The regression test and unit test utilities are native and do not demand any external tool or script, although you need to fetch the test cases from other repositories, as they are shared with other versions of ModSecurity, those others repositories git submodules. To fetch the submodules repository and run the utilities, follow the commands listed below: ```shell $ cd /path/to/your/ModSecurity $ git submodule foreach git pull $ cd test $ ./regression-tests $ ./unit-tests ``` ### Debugging Before start the debugging process, make sure of where your bug is. The problem could be on your connector or in libmodsecurity. In order to identify where the bug is, it is recommended that you develop a regression test that mimics the scenario where the bug is happening. If the bug is reproducible with the regression-test utility, then it will be far simpler to debug and ensure that it never occurs again. On Linux it is recommended that anyone undertaking debugging utilize gdb and/or valgrind as needed. During the configuration/compilation time, you may want to disable the compiler optimization making your “back traces” populated with readable data. Use the CFLAGS to disable the compilation optimization parameters: ```shell $ export CFLAGS="-g -O0" $ ./build.sh $ ./configure $ make $ sudo make install ``` ## Reporting Issues If you are facing a configuration issue or something is not working as you expected to be, please use the ModSecurity user’s mailing list. Issues on GitHub are also welcomed, but we prefer to have user ask questions on the mailing list first so that you can reach an entire community. Also don’t forget to look for existing issues before open a new one. If you are going to open a new issue on GitHub, don’t forget to tell us the version of your libmodsecurity and the version of a specific connector if there is one. ### Security issue Please do not make public any security issue. Contact us at: security@modsecurity.org reporting the issue. Once the problem is fixed your credit will be given. ## Feature request We are open to discussing any new feature request with the community via the mailing lists. You can alternativly, feel free to open GitHub issues requesting new features. Before opening a new issue, please check if there is one already opened on the same topic. ## Bindings The libModSecurity design allows the integration with bindings. There is an effort to avoid breaking API [binary] compatibility to make an easy integration with possible bindings. Currently, there are two notable projects maintained by the community: * Python - https://github.com/actions-security/pymodsecurity * Varnish - https://github.com/xdecock/vmod-modsecurity ## Packaging Having our packages in distros on time is a desire that we have, so let us know if there is anything we can do to facilitate your work as a packager. ## Sponsor Note Development of ModSecurity is sponsored by Trustwave. Sponsorship will end July 1, 2024. Additional information can be found here https://www.trustwave.com/en-us/resources/security-resources/software-updates/end-of-sale-and-trustwave-support-for-modsecurity-web-application-firewall/ modsecurity-v3.0.6/build.sh0000775000175000017500000000042114146026157017040 0ustar mhsvierulamhsvierula#!/bin/sh rm -rf autom4te.cache rm -f aclocal.m4 case `uname` in Darwin*) glibtoolize --force --copy ;; *) libtoolize --force --copy ;; esac autoreconf --install autoheader automake --add-missing --foreign --copy --force-missing autoconf --force rm -rf autom4te.cache modsecurity-v3.0.6/others/0000775000175000017500000000000014146027125016705 5ustar mhsvierulamhsvierulamodsecurity-v3.0.6/others/Makefile.am0000664000175000017500000000136214146026157020747 0ustar mhsvierulamhsvierula noinst_LTLIBRARIES = libinjection.la libmbedtls.la libinjection_la_SOURCES = \ libinjection/src/libinjection_html5.c \ libinjection/src/libinjection_sqli.c \ libinjection/src/libinjection_xss.c noinst_HEADERS = \ libinjection/src/libinjection.h \ libinjection/src/libinjection_html5.h \ libinjection/src/libinjection_sqli.h \ libinjection/src/libinjection_sqli_data.h \ libinjection/src/libinjection_xss.h \ mbedtls/base64.h \ mbedtls/check_config.h \ mbedtls/mbed-tls-config.h \ mbedtls/md5.h \ mbedtls/platform.h \ mbedtls/sha1.h libmbedtls_la_SOURCES = \ mbedtls/base64.c \ mbedtls/md5.c \ mbedtls/sha1.c libmbedtls_la_CFLAGS = -D MBEDTLS_CONFIG_FILE=\"mbed-tls-config.h\" -Iothers libmbedtls_la_CPPFLAGS = libmbedtls_la_LIBADD = modsecurity-v3.0.6/others/mbedtls/0000775000175000017500000000000014146026763020346 5ustar mhsvierulamhsvierulamodsecurity-v3.0.6/others/mbedtls/sha1.c0000664000175000017500000002654114146026157021353 0ustar mhsvierulamhsvierula/* * FIPS-180-1 compliant SHA-1 implementation * * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); 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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * This file is part of mbed TLS (https://tls.mbed.org) */ /* * The SHA-1 standard was published by NIST in 1993. * * http://www.itl.nist.gov/fipspubs/fip180-1.htm */ #if !defined(MBEDTLS_CONFIG_FILE) #include "mbedtls/config.h" #else #include MBEDTLS_CONFIG_FILE #endif #if defined(MBEDTLS_SHA1_C) #include "mbedtls/sha1.h" #include #if defined(MBEDTLS_SELF_TEST) #if defined(MBEDTLS_PLATFORM_C) #include "mbedtls/platform.h" #else #include #define mbedtls_printf printf #endif /* MBEDTLS_PLATFORM_C */ #endif /* MBEDTLS_SELF_TEST */ #if !defined(MBEDTLS_SHA1_ALT) /* Implementation that should never be optimized out by the compiler */ static void mbedtls_zeroize( void *v, size_t n ) { volatile unsigned char *p = v; while( n-- ) *p++ = 0; } /* * 32-bit integer manipulation macros (big endian) */ #ifndef GET_UINT32_BE #define GET_UINT32_BE(n,b,i) \ { \ (n) = ( (uint32_t) (b)[(i) ] << 24 ) \ | ( (uint32_t) (b)[(i) + 1] << 16 ) \ | ( (uint32_t) (b)[(i) + 2] << 8 ) \ | ( (uint32_t) (b)[(i) + 3] ); \ } #endif #ifndef PUT_UINT32_BE #define PUT_UINT32_BE(n,b,i) \ { \ (b)[(i) ] = (unsigned char) ( (n) >> 24 ); \ (b)[(i) + 1] = (unsigned char) ( (n) >> 16 ); \ (b)[(i) + 2] = (unsigned char) ( (n) >> 8 ); \ (b)[(i) + 3] = (unsigned char) ( (n) ); \ } #endif void mbedtls_sha1_init( mbedtls_sha1_context *ctx ) { memset( ctx, 0, sizeof( mbedtls_sha1_context ) ); } void mbedtls_sha1_free( mbedtls_sha1_context *ctx ) { if( ctx == NULL ) return; mbedtls_zeroize( ctx, sizeof( mbedtls_sha1_context ) ); } void mbedtls_sha1_clone( mbedtls_sha1_context *dst, const mbedtls_sha1_context *src ) { *dst = *src; } /* * SHA-1 context setup */ void mbedtls_sha1_starts( mbedtls_sha1_context *ctx ) { ctx->total[0] = 0; ctx->total[1] = 0; ctx->state[0] = 0x67452301; ctx->state[1] = 0xEFCDAB89; ctx->state[2] = 0x98BADCFE; ctx->state[3] = 0x10325476; ctx->state[4] = 0xC3D2E1F0; } #if !defined(MBEDTLS_SHA1_PROCESS_ALT) void mbedtls_sha1_process( mbedtls_sha1_context *ctx, const unsigned char data[64] ) { uint32_t temp, W[16], A, B, C, D, E; GET_UINT32_BE( W[ 0], data, 0 ); GET_UINT32_BE( W[ 1], data, 4 ); GET_UINT32_BE( W[ 2], data, 8 ); GET_UINT32_BE( W[ 3], data, 12 ); GET_UINT32_BE( W[ 4], data, 16 ); GET_UINT32_BE( W[ 5], data, 20 ); GET_UINT32_BE( W[ 6], data, 24 ); GET_UINT32_BE( W[ 7], data, 28 ); GET_UINT32_BE( W[ 8], data, 32 ); GET_UINT32_BE( W[ 9], data, 36 ); GET_UINT32_BE( W[10], data, 40 ); GET_UINT32_BE( W[11], data, 44 ); GET_UINT32_BE( W[12], data, 48 ); GET_UINT32_BE( W[13], data, 52 ); GET_UINT32_BE( W[14], data, 56 ); GET_UINT32_BE( W[15], data, 60 ); #define S(x,n) ((x << n) | ((x & 0xFFFFFFFF) >> (32 - n))) #define R(t) \ ( \ temp = W[( t - 3 ) & 0x0F] ^ W[( t - 8 ) & 0x0F] ^ \ W[( t - 14 ) & 0x0F] ^ W[ t & 0x0F], \ ( W[t & 0x0F] = S(temp,1) ) \ ) #define P(a,b,c,d,e,x) \ { \ e += S(a,5) + F(b,c,d) + K + x; b = S(b,30); \ } A = ctx->state[0]; B = ctx->state[1]; C = ctx->state[2]; D = ctx->state[3]; E = ctx->state[4]; #define F(x,y,z) (z ^ (x & (y ^ z))) #define K 0x5A827999 P( A, B, C, D, E, W[0] ); P( E, A, B, C, D, W[1] ); P( D, E, A, B, C, W[2] ); P( C, D, E, A, B, W[3] ); P( B, C, D, E, A, W[4] ); P( A, B, C, D, E, W[5] ); P( E, A, B, C, D, W[6] ); P( D, E, A, B, C, W[7] ); P( C, D, E, A, B, W[8] ); P( B, C, D, E, A, W[9] ); P( A, B, C, D, E, W[10] ); P( E, A, B, C, D, W[11] ); P( D, E, A, B, C, W[12] ); P( C, D, E, A, B, W[13] ); P( B, C, D, E, A, W[14] ); P( A, B, C, D, E, W[15] ); P( E, A, B, C, D, R(16) ); P( D, E, A, B, C, R(17) ); P( C, D, E, A, B, R(18) ); P( B, C, D, E, A, R(19) ); #undef K #undef F #define F(x,y,z) (x ^ y ^ z) #define K 0x6ED9EBA1 P( A, B, C, D, E, R(20) ); P( E, A, B, C, D, R(21) ); P( D, E, A, B, C, R(22) ); P( C, D, E, A, B, R(23) ); P( B, C, D, E, A, R(24) ); P( A, B, C, D, E, R(25) ); P( E, A, B, C, D, R(26) ); P( D, E, A, B, C, R(27) ); P( C, D, E, A, B, R(28) ); P( B, C, D, E, A, R(29) ); P( A, B, C, D, E, R(30) ); P( E, A, B, C, D, R(31) ); P( D, E, A, B, C, R(32) ); P( C, D, E, A, B, R(33) ); P( B, C, D, E, A, R(34) ); P( A, B, C, D, E, R(35) ); P( E, A, B, C, D, R(36) ); P( D, E, A, B, C, R(37) ); P( C, D, E, A, B, R(38) ); P( B, C, D, E, A, R(39) ); #undef K #undef F #define F(x,y,z) ((x & y) | (z & (x | y))) #define K 0x8F1BBCDC P( A, B, C, D, E, R(40) ); P( E, A, B, C, D, R(41) ); P( D, E, A, B, C, R(42) ); P( C, D, E, A, B, R(43) ); P( B, C, D, E, A, R(44) ); P( A, B, C, D, E, R(45) ); P( E, A, B, C, D, R(46) ); P( D, E, A, B, C, R(47) ); P( C, D, E, A, B, R(48) ); P( B, C, D, E, A, R(49) ); P( A, B, C, D, E, R(50) ); P( E, A, B, C, D, R(51) ); P( D, E, A, B, C, R(52) ); P( C, D, E, A, B, R(53) ); P( B, C, D, E, A, R(54) ); P( A, B, C, D, E, R(55) ); P( E, A, B, C, D, R(56) ); P( D, E, A, B, C, R(57) ); P( C, D, E, A, B, R(58) ); P( B, C, D, E, A, R(59) ); #undef K #undef F #define F(x,y,z) (x ^ y ^ z) #define K 0xCA62C1D6 P( A, B, C, D, E, R(60) ); P( E, A, B, C, D, R(61) ); P( D, E, A, B, C, R(62) ); P( C, D, E, A, B, R(63) ); P( B, C, D, E, A, R(64) ); P( A, B, C, D, E, R(65) ); P( E, A, B, C, D, R(66) ); P( D, E, A, B, C, R(67) ); P( C, D, E, A, B, R(68) ); P( B, C, D, E, A, R(69) ); P( A, B, C, D, E, R(70) ); P( E, A, B, C, D, R(71) ); P( D, E, A, B, C, R(72) ); P( C, D, E, A, B, R(73) ); P( B, C, D, E, A, R(74) ); P( A, B, C, D, E, R(75) ); P( E, A, B, C, D, R(76) ); P( D, E, A, B, C, R(77) ); P( C, D, E, A, B, R(78) ); P( B, C, D, E, A, R(79) ); #undef K #undef F ctx->state[0] += A; ctx->state[1] += B; ctx->state[2] += C; ctx->state[3] += D; ctx->state[4] += E; } #endif /* !MBEDTLS_SHA1_PROCESS_ALT */ /* * SHA-1 process buffer */ void mbedtls_sha1_update( mbedtls_sha1_context *ctx, const unsigned char *input, size_t ilen ) { size_t fill; uint32_t left; if( ilen == 0 ) return; left = ctx->total[0] & 0x3F; fill = 64 - left; ctx->total[0] += (uint32_t) ilen; ctx->total[0] &= 0xFFFFFFFF; if( ctx->total[0] < (uint32_t) ilen ) ctx->total[1]++; if( left && ilen >= fill ) { memcpy( (void *) (ctx->buffer + left), input, fill ); mbedtls_sha1_process( ctx, ctx->buffer ); input += fill; ilen -= fill; left = 0; } while( ilen >= 64 ) { mbedtls_sha1_process( ctx, input ); input += 64; ilen -= 64; } if( ilen > 0 ) memcpy( (void *) (ctx->buffer + left), input, ilen ); } static const unsigned char sha1_padding[64] = { 0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; /* * SHA-1 final digest */ void mbedtls_sha1_finish( mbedtls_sha1_context *ctx, unsigned char output[20] ) { uint32_t last, padn; uint32_t high, low; unsigned char msglen[8]; high = ( ctx->total[0] >> 29 ) | ( ctx->total[1] << 3 ); low = ( ctx->total[0] << 3 ); PUT_UINT32_BE( high, msglen, 0 ); PUT_UINT32_BE( low, msglen, 4 ); last = ctx->total[0] & 0x3F; padn = ( last < 56 ) ? ( 56 - last ) : ( 120 - last ); mbedtls_sha1_update( ctx, sha1_padding, padn ); mbedtls_sha1_update( ctx, msglen, 8 ); PUT_UINT32_BE( ctx->state[0], output, 0 ); PUT_UINT32_BE( ctx->state[1], output, 4 ); PUT_UINT32_BE( ctx->state[2], output, 8 ); PUT_UINT32_BE( ctx->state[3], output, 12 ); PUT_UINT32_BE( ctx->state[4], output, 16 ); } #endif /* !MBEDTLS_SHA1_ALT */ /* * output = SHA-1( input buffer ) */ void mbedtls_sha1( const unsigned char *input, size_t ilen, unsigned char output[20] ) { mbedtls_sha1_context ctx; mbedtls_sha1_init( &ctx ); mbedtls_sha1_starts( &ctx ); mbedtls_sha1_update( &ctx, input, ilen ); mbedtls_sha1_finish( &ctx, output ); mbedtls_sha1_free( &ctx ); } #if defined(MBEDTLS_SELF_TEST) /* * FIPS-180-1 test vectors */ static const unsigned char sha1_test_buf[3][57] = { { "abc" }, { "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq" }, { "" } }; static const int sha1_test_buflen[3] = { 3, 56, 1000 }; static const unsigned char sha1_test_sum[3][20] = { { 0xA9, 0x99, 0x3E, 0x36, 0x47, 0x06, 0x81, 0x6A, 0xBA, 0x3E, 0x25, 0x71, 0x78, 0x50, 0xC2, 0x6C, 0x9C, 0xD0, 0xD8, 0x9D }, { 0x84, 0x98, 0x3E, 0x44, 0x1C, 0x3B, 0xD2, 0x6E, 0xBA, 0xAE, 0x4A, 0xA1, 0xF9, 0x51, 0x29, 0xE5, 0xE5, 0x46, 0x70, 0xF1 }, { 0x34, 0xAA, 0x97, 0x3C, 0xD4, 0xC4, 0xDA, 0xA4, 0xF6, 0x1E, 0xEB, 0x2B, 0xDB, 0xAD, 0x27, 0x31, 0x65, 0x34, 0x01, 0x6F } }; /* * Checkup routine */ int mbedtls_sha1_self_test( int verbose ) { int i, j, buflen, ret = 0; unsigned char buf[1024]; unsigned char sha1sum[20]; mbedtls_sha1_context ctx; mbedtls_sha1_init( &ctx ); /* * SHA-1 */ for( i = 0; i < 3; i++ ) { if( verbose != 0 ) mbedtls_printf( " SHA-1 test #%d: ", i + 1 ); mbedtls_sha1_starts( &ctx ); if( i == 2 ) { memset( buf, 'a', buflen = 1000 ); for( j = 0; j < 1000; j++ ) mbedtls_sha1_update( &ctx, buf, buflen ); } else mbedtls_sha1_update( &ctx, sha1_test_buf[i], sha1_test_buflen[i] ); mbedtls_sha1_finish( &ctx, sha1sum ); if( memcmp( sha1sum, sha1_test_sum[i], 20 ) != 0 ) { if( verbose != 0 ) mbedtls_printf( "failed\n" ); ret = 1; goto exit; } if( verbose != 0 ) mbedtls_printf( "passed\n" ); } if( verbose != 0 ) mbedtls_printf( "\n" ); exit: mbedtls_sha1_free( &ctx ); return( ret ); } #endif /* MBEDTLS_SELF_TEST */ #endif /* MBEDTLS_SHA1_C */modsecurity-v3.0.6/others/mbedtls/base64.c0000664000175000017500000001647714146026157021612 0ustar mhsvierulamhsvierula/* * RFC 1521 base64 encoding/decoding * * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); 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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * This file is part of mbed TLS (https://tls.mbed.org) */ #if !defined(MBEDTLS_CONFIG_FILE) #include "mbedtls/config.h" #else #include MBEDTLS_CONFIG_FILE #endif #if defined(MBEDTLS_BASE64_C) #include "mbedtls/base64.h" #include #if defined(MBEDTLS_SELF_TEST) #include #if defined(MBEDTLS_PLATFORM_C) #include "mbedtls/platform.h" #else #include #define mbedtls_printf printf #endif /* MBEDTLS_PLATFORM_C */ #endif /* MBEDTLS_SELF_TEST */ static const unsigned char base64_enc_map[64] = { 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '+', '/' }; static const unsigned char base64_dec_map[128] = { 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 62, 127, 127, 127, 63, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 127, 127, 127, 64, 127, 127, 127, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 127, 127, 127, 127, 127, 127, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 127, 127, 127, 127, 127 }; #define BASE64_SIZE_T_MAX ( (size_t) -1 ) /* SIZE_T_MAX is not standard */ /* * Encode a buffer into base64 format */ int mbedtls_base64_encode( unsigned char *dst, size_t dlen, size_t *olen, const unsigned char *src, size_t slen ) { size_t i, n; int C1, C2, C3; unsigned char *p; if( slen == 0 ) { *olen = 0; return( 0 ); } n = slen / 3 + ( slen % 3 != 0 ); if( n > ( BASE64_SIZE_T_MAX - 1 ) / 4 ) { *olen = BASE64_SIZE_T_MAX; return( MBEDTLS_ERR_BASE64_BUFFER_TOO_SMALL ); } n *= 4; if( dlen < n + 1 ) { *olen = n + 1; return( MBEDTLS_ERR_BASE64_BUFFER_TOO_SMALL ); } n = ( slen / 3 ) * 3; for( i = 0, p = dst; i < n; i += 3 ) { C1 = *src++; C2 = *src++; C3 = *src++; *p++ = base64_enc_map[(C1 >> 2) & 0x3F]; *p++ = base64_enc_map[(((C1 & 3) << 4) + (C2 >> 4)) & 0x3F]; *p++ = base64_enc_map[(((C2 & 15) << 2) + (C3 >> 6)) & 0x3F]; *p++ = base64_enc_map[C3 & 0x3F]; } if( i < slen ) { C1 = *src++; C2 = ( ( i + 1 ) < slen ) ? *src++ : 0; *p++ = base64_enc_map[(C1 >> 2) & 0x3F]; *p++ = base64_enc_map[(((C1 & 3) << 4) + (C2 >> 4)) & 0x3F]; if( ( i + 1 ) < slen ) *p++ = base64_enc_map[((C2 & 15) << 2) & 0x3F]; else *p++ = '='; *p++ = '='; } *olen = p - dst; *p = 0; return( 0 ); } /* * Decode a base64-formatted buffer */ int mbedtls_base64_decode( unsigned char *dst, size_t dlen, size_t *olen, const unsigned char *src, size_t slen ) { size_t i, n; uint32_t j, x; unsigned char *p; /* First pass: check for validity and get output length */ for( i = n = j = 0; i < slen; i++ ) { /* Skip spaces before checking for EOL */ x = 0; while( i < slen && src[i] == ' ' ) { ++i; ++x; } /* Spaces at end of buffer are OK */ if( i == slen ) break; if( ( slen - i ) >= 2 && src[i] == '\r' && src[i + 1] == '\n' ) continue; if( src[i] == '\n' ) continue; /* Space inside a line is an error */ if( x != 0 ) return( MBEDTLS_ERR_BASE64_INVALID_CHARACTER ); if( src[i] == '=' && ++j > 2 ) return( MBEDTLS_ERR_BASE64_INVALID_CHARACTER ); if( src[i] > 127 || base64_dec_map[src[i]] == 127 ) return( MBEDTLS_ERR_BASE64_INVALID_CHARACTER ); if( base64_dec_map[src[i]] < 64 && j != 0 ) return( MBEDTLS_ERR_BASE64_INVALID_CHARACTER ); n++; } if( n == 0 ) { *olen = 0; return( 0 ); } n = ( ( n * 6 ) + 7 ) >> 3; n -= j; if( dst == NULL || dlen < n ) { *olen = n; return( MBEDTLS_ERR_BASE64_BUFFER_TOO_SMALL ); } for( j = 3, n = x = 0, p = dst; i > 0; i--, src++ ) { if( *src == '\r' || *src == '\n' || *src == ' ' ) continue; j -= ( base64_dec_map[*src] == 64 ); x = ( x << 6 ) | ( base64_dec_map[*src] & 0x3F ); if( ++n == 4 ) { n = 0; if( j > 0 ) *p++ = (unsigned char)( x >> 16 ); if( j > 1 ) *p++ = (unsigned char)( x >> 8 ); if( j > 2 ) *p++ = (unsigned char)( x ); } } *olen = p - dst; return( 0 ); } #if defined(MBEDTLS_SELF_TEST) static const unsigned char base64_test_dec[64] = { 0x24, 0x48, 0x6E, 0x56, 0x87, 0x62, 0x5A, 0xBD, 0xBF, 0x17, 0xD9, 0xA2, 0xC4, 0x17, 0x1A, 0x01, 0x94, 0xED, 0x8F, 0x1E, 0x11, 0xB3, 0xD7, 0x09, 0x0C, 0xB6, 0xE9, 0x10, 0x6F, 0x22, 0xEE, 0x13, 0xCA, 0xB3, 0x07, 0x05, 0x76, 0xC9, 0xFA, 0x31, 0x6C, 0x08, 0x34, 0xFF, 0x8D, 0xC2, 0x6C, 0x38, 0x00, 0x43, 0xE9, 0x54, 0x97, 0xAF, 0x50, 0x4B, 0xD1, 0x41, 0xBA, 0x95, 0x31, 0x5A, 0x0B, 0x97 }; static const unsigned char base64_test_enc[] = "JEhuVodiWr2/F9mixBcaAZTtjx4Rs9cJDLbpEG8i7hPK" "swcFdsn6MWwINP+Nwmw4AEPpVJevUEvRQbqVMVoLlw=="; /* * Checkup routine */ int mbedtls_base64_self_test( int verbose ) { size_t len; const unsigned char *src; unsigned char buffer[128]; if( verbose != 0 ) mbedtls_printf( " Base64 encoding test: " ); src = base64_test_dec; if( mbedtls_base64_encode( buffer, sizeof( buffer ), &len, src, 64 ) != 0 || memcmp( base64_test_enc, buffer, 88 ) != 0 ) { if( verbose != 0 ) mbedtls_printf( "failed\n" ); return( 1 ); } if( verbose != 0 ) mbedtls_printf( "passed\n Base64 decoding test: " ); src = base64_test_enc; if( mbedtls_base64_decode( buffer, sizeof( buffer ), &len, src, 88 ) != 0 || memcmp( base64_test_dec, buffer, 64 ) != 0 ) { if( verbose != 0 ) mbedtls_printf( "failed\n" ); return( 1 ); } if( verbose != 0 ) mbedtls_printf( "passed\n\n" ); return( 0 ); } #endif /* MBEDTLS_SELF_TEST */ #endif /* MBEDTLS_BASE64_C */modsecurity-v3.0.6/others/mbedtls/platform.h0000664000175000017500000001500514146026157022341 0ustar mhsvierulamhsvierula/** * \file platform.h * * \brief mbed TLS Platform abstraction layer * * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); 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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * This file is part of mbed TLS (https://tls.mbed.org) */ #ifndef MBEDTLS_PLATFORM_H #define MBEDTLS_PLATFORM_H #if !defined(MBEDTLS_CONFIG_FILE) #include "config.h" #else #include MBEDTLS_CONFIG_FILE #endif #ifdef __cplusplus extern "C" { #endif /** * \name SECTION: Module settings * * The configuration options you can set for this module are in this section. * Either change them in config.h or define them on the compiler command line. * \{ */ #if !defined(MBEDTLS_PLATFORM_NO_STD_FUNCTIONS) #include #include #if !defined(MBEDTLS_PLATFORM_STD_SNPRINTF) #if defined(_WIN32) #define MBEDTLS_PLATFORM_STD_SNPRINTF mbedtls_platform_win32_snprintf /**< Default snprintf to use */ #else #define MBEDTLS_PLATFORM_STD_SNPRINTF snprintf /**< Default snprintf to use */ #endif #endif #if !defined(MBEDTLS_PLATFORM_STD_PRINTF) #define MBEDTLS_PLATFORM_STD_PRINTF printf /**< Default printf to use */ #endif #if !defined(MBEDTLS_PLATFORM_STD_FPRINTF) #define MBEDTLS_PLATFORM_STD_FPRINTF fprintf /**< Default fprintf to use */ #endif #if !defined(MBEDTLS_PLATFORM_STD_CALLOC) #define MBEDTLS_PLATFORM_STD_CALLOC calloc /**< Default allocator to use */ #endif #if !defined(MBEDTLS_PLATFORM_STD_FREE) #define MBEDTLS_PLATFORM_STD_FREE free /**< Default free to use */ #endif #if !defined(MBEDTLS_PLATFORM_STD_EXIT) #define MBEDTLS_PLATFORM_STD_EXIT exit /**< Default free to use */ #endif #else /* MBEDTLS_PLATFORM_NO_STD_FUNCTIONS */ #if defined(MBEDTLS_PLATFORM_STD_MEM_HDR) #include MBEDTLS_PLATFORM_STD_MEM_HDR #endif #endif /* MBEDTLS_PLATFORM_NO_STD_FUNCTIONS */ /* \} name SECTION: Module settings */ /* * The function pointers for calloc and free */ #if defined(MBEDTLS_PLATFORM_MEMORY) #if defined(MBEDTLS_PLATFORM_FREE_MACRO) && \ defined(MBEDTLS_PLATFORM_CALLOC_MACRO) #define mbedtls_free MBEDTLS_PLATFORM_FREE_MACRO #define mbedtls_calloc MBEDTLS_PLATFORM_CALLOC_MACRO #else /* For size_t */ #include extern void * (*mbedtls_calloc)( size_t n, size_t size ); extern void (*mbedtls_free)( void *ptr ); /** * \brief Set your own memory implementation function pointers * * \param calloc_func the calloc function implementation * \param free_func the free function implementation * * \return 0 if successful */ int mbedtls_platform_set_calloc_free( void * (*calloc_func)( size_t, size_t ), void (*free_func)( void * ) ); #endif /* MBEDTLS_PLATFORM_FREE_MACRO && MBEDTLS_PLATFORM_CALLOC_MACRO */ #else /* !MBEDTLS_PLATFORM_MEMORY */ #define mbedtls_free free #define mbedtls_calloc calloc #endif /* MBEDTLS_PLATFORM_MEMORY && !MBEDTLS_PLATFORM_{FREE,CALLOC}_MACRO */ /* * The function pointers for fprintf */ #if defined(MBEDTLS_PLATFORM_FPRINTF_ALT) /* We need FILE * */ #include extern int (*mbedtls_fprintf)( FILE *stream, const char *format, ... ); /** * \brief Set your own fprintf function pointer * * \param fprintf_func the fprintf function implementation * * \return 0 */ int mbedtls_platform_set_fprintf( int (*fprintf_func)( FILE *stream, const char *, ... ) ); #else #if defined(MBEDTLS_PLATFORM_FPRINTF_MACRO) #define mbedtls_fprintf MBEDTLS_PLATFORM_FPRINTF_MACRO #else #define mbedtls_fprintf fprintf #endif /* MBEDTLS_PLATFORM_FPRINTF_MACRO */ #endif /* MBEDTLS_PLATFORM_FPRINTF_ALT */ /* * The function pointers for printf */ #if defined(MBEDTLS_PLATFORM_PRINTF_ALT) extern int (*mbedtls_printf)( const char *format, ... ); /** * \brief Set your own printf function pointer * * \param printf_func the printf function implementation * * \return 0 */ int mbedtls_platform_set_printf( int (*printf_func)( const char *, ... ) ); #else /* !MBEDTLS_PLATFORM_PRINTF_ALT */ #if defined(MBEDTLS_PLATFORM_PRINTF_MACRO) #define mbedtls_printf MBEDTLS_PLATFORM_PRINTF_MACRO #else #define mbedtls_printf printf #endif /* MBEDTLS_PLATFORM_PRINTF_MACRO */ #endif /* MBEDTLS_PLATFORM_PRINTF_ALT */ /* * The function pointers for snprintf * * The snprintf implementation should conform to C99: * - it *must* always correctly zero-terminate the buffer * (except when n == 0, then it must leave the buffer untouched) * - however it is acceptable to return -1 instead of the required length when * the destination buffer is too short. */ #if defined(_WIN32) /* For Windows (inc. MSYS2), we provide our own fixed implementation */ int mbedtls_platform_win32_snprintf( char *s, size_t n, const char *fmt, ... ); #endif #if defined(MBEDTLS_PLATFORM_SNPRINTF_ALT) extern int (*mbedtls_snprintf)( char * s, size_t n, const char * format, ... ); /** * \brief Set your own snprintf function pointer * * \param snprintf_func the snprintf function implementation * * \return 0 */ int mbedtls_platform_set_snprintf( int (*snprintf_func)( char * s, size_t n, const char * format, ... ) ); #else /* MBEDTLS_PLATFORM_SNPRINTF_ALT */ #if defined(MBEDTLS_PLATFORM_SNPRINTF_MACRO) #define mbedtls_snprintf MBEDTLS_PLATFORM_SNPRINTF_MACRO #else #define mbedtls_snprintf snprintf #endif /* MBEDTLS_PLATFORM_SNPRINTF_MACRO */ #endif /* MBEDTLS_PLATFORM_SNPRINTF_ALT */ /* * The function pointers for exit */ #if defined(MBEDTLS_PLATFORM_EXIT_ALT) extern void (*mbedtls_exit)( int status ); /** * \brief Set your own exit function pointer * * \param exit_func the exit function implementation * * \return 0 */ int mbedtls_platform_set_exit( void (*exit_func)( int status ) ); #else #if defined(MBEDTLS_PLATFORM_EXIT_MACRO) #define mbedtls_exit MBEDTLS_PLATFORM_EXIT_MACRO #else #define mbedtls_exit exit #endif /* MBEDTLS_PLATFORM_EXIT_MACRO */ #endif /* MBEDTLS_PLATFORM_EXIT_ALT */ #ifdef __cplusplus } #endif #endif /* platform.h */ modsecurity-v3.0.6/others/mbedtls/check_config.h0000664000175000017500000005122314146026157023121 0ustar mhsvierulamhsvierula/** * \file check_config.h * * \brief Consistency checks for configuration options * * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); 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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * This file is part of mbed TLS (https://tls.mbed.org) */ /* * It is recommended to include this file from your config.h * in order to catch dependency issues early. */ #ifndef MBEDTLS_CHECK_CONFIG_H #define MBEDTLS_CHECK_CONFIG_H /* * We assume CHAR_BIT is 8 in many places. In practice, this is true on our * target platforms, so not an issue, but let's just be extra sure. */ #include #if CHAR_BIT != 8 #error "mbed TLS requires a platform with 8-bit chars" #endif #if defined(_WIN32) #if !defined(MBEDTLS_PLATFORM_C) #error "MBEDTLS_PLATFORM_C is required on Windows" #endif /* Fix the config here. Not convenient to put an #ifdef _WIN32 in config.h as * it would confuse config.pl. */ #if !defined(MBEDTLS_PLATFORM_SNPRINTF_ALT) && \ !defined(MBEDTLS_PLATFORM_SNPRINTF_MACRO) #define MBEDTLS_PLATFORM_SNPRINTF_ALT #endif #endif /* _WIN32 */ #if defined(TARGET_LIKE_MBED) && \ ( defined(MBEDTLS_NET_C) || defined(MBEDTLS_TIMING_C) ) #error "The NET and TIMING modules are not available for mbed OS - please use the network and timing functions provided by mbed OS" #endif #if defined(MBEDTLS_DEPRECATED_WARNING) && \ !defined(__GNUC__) && !defined(__clang__) #error "MBEDTLS_DEPRECATED_WARNING only works with GCC and Clang" #endif #if defined(MBEDTLS_HAVE_TIME_DATE) && !defined(MBEDTLS_HAVE_TIME) #error "MBEDTLS_HAVE_TIME_DATE without MBEDTLS_HAVE_TIME does not make sense" #endif #if defined(MBEDTLS_AESNI_C) && !defined(MBEDTLS_HAVE_ASM) #error "MBEDTLS_AESNI_C defined, but not all prerequisites" #endif #if defined(MBEDTLS_CTR_DRBG_C) && !defined(MBEDTLS_AES_C) #error "MBEDTLS_CTR_DRBG_C defined, but not all prerequisites" #endif #if defined(MBEDTLS_DHM_C) && !defined(MBEDTLS_BIGNUM_C) #error "MBEDTLS_DHM_C defined, but not all prerequisites" #endif #if defined(MBEDTLS_ECDH_C) && !defined(MBEDTLS_ECP_C) #error "MBEDTLS_ECDH_C defined, but not all prerequisites" #endif #if defined(MBEDTLS_ECDSA_C) && \ ( !defined(MBEDTLS_ECP_C) || \ !defined(MBEDTLS_ASN1_PARSE_C) || \ !defined(MBEDTLS_ASN1_WRITE_C) ) #error "MBEDTLS_ECDSA_C defined, but not all prerequisites" #endif #if defined(MBEDTLS_ECJPAKE_C) && \ ( !defined(MBEDTLS_ECP_C) || !defined(MBEDTLS_MD_C) ) #error "MBEDTLS_ECJPAKE_C defined, but not all prerequisites" #endif #if defined(MBEDTLS_ECDSA_DETERMINISTIC) && !defined(MBEDTLS_HMAC_DRBG_C) #error "MBEDTLS_ECDSA_DETERMINISTIC defined, but not all prerequisites" #endif #if defined(MBEDTLS_ECP_C) && ( !defined(MBEDTLS_BIGNUM_C) || ( \ !defined(MBEDTLS_ECP_DP_SECP192R1_ENABLED) && \ !defined(MBEDTLS_ECP_DP_SECP224R1_ENABLED) && \ !defined(MBEDTLS_ECP_DP_SECP256R1_ENABLED) && \ !defined(MBEDTLS_ECP_DP_SECP384R1_ENABLED) && \ !defined(MBEDTLS_ECP_DP_SECP521R1_ENABLED) && \ !defined(MBEDTLS_ECP_DP_BP256R1_ENABLED) && \ !defined(MBEDTLS_ECP_DP_BP384R1_ENABLED) && \ !defined(MBEDTLS_ECP_DP_BP512R1_ENABLED) && \ !defined(MBEDTLS_ECP_DP_SECP192K1_ENABLED) && \ !defined(MBEDTLS_ECP_DP_SECP224K1_ENABLED) && \ !defined(MBEDTLS_ECP_DP_SECP256K1_ENABLED) ) ) #error "MBEDTLS_ECP_C defined, but not all prerequisites" #endif #if defined(MBEDTLS_ENTROPY_C) && (!defined(MBEDTLS_SHA512_C) && \ !defined(MBEDTLS_SHA256_C)) #error "MBEDTLS_ENTROPY_C defined, but not all prerequisites" #endif #if defined(MBEDTLS_ENTROPY_C) && defined(MBEDTLS_SHA512_C) && \ defined(MBEDTLS_CTR_DRBG_ENTROPY_LEN) && (MBEDTLS_CTR_DRBG_ENTROPY_LEN > 64) #error "MBEDTLS_CTR_DRBG_ENTROPY_LEN value too high" #endif #if defined(MBEDTLS_ENTROPY_C) && \ ( !defined(MBEDTLS_SHA512_C) || defined(MBEDTLS_ENTROPY_FORCE_SHA256) ) \ && defined(MBEDTLS_CTR_DRBG_ENTROPY_LEN) && (MBEDTLS_CTR_DRBG_ENTROPY_LEN > 32) #error "MBEDTLS_CTR_DRBG_ENTROPY_LEN value too high" #endif #if defined(MBEDTLS_ENTROPY_C) && \ defined(MBEDTLS_ENTROPY_FORCE_SHA256) && !defined(MBEDTLS_SHA256_C) #error "MBEDTLS_ENTROPY_FORCE_SHA256 defined, but not all prerequisites" #endif #if defined(MBEDTLS_GCM_C) && ( \ !defined(MBEDTLS_AES_C) && !defined(MBEDTLS_CAMELLIA_C) ) #error "MBEDTLS_GCM_C defined, but not all prerequisites" #endif #if defined(MBEDTLS_HAVEGE_C) && !defined(MBEDTLS_TIMING_C) #error "MBEDTLS_HAVEGE_C defined, but not all prerequisites" #endif #if defined(MBEDTLS_HMAC_DRBG_C) && !defined(MBEDTLS_MD_C) #error "MBEDTLS_HMAC_DRBG_C defined, but not all prerequisites" #endif #if defined(MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA_ENABLED) && \ ( !defined(MBEDTLS_ECDH_C) || !defined(MBEDTLS_X509_CRT_PARSE_C) ) #error "MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA_ENABLED defined, but not all prerequisites" #endif #if defined(MBEDTLS_KEY_EXCHANGE_ECDH_RSA_ENABLED) && \ ( !defined(MBEDTLS_ECDH_C) || !defined(MBEDTLS_X509_CRT_PARSE_C) ) #error "MBEDTLS_KEY_EXCHANGE_ECDH_RSA_ENABLED defined, but not all prerequisites" #endif #if defined(MBEDTLS_KEY_EXCHANGE_DHE_PSK_ENABLED) && !defined(MBEDTLS_DHM_C) #error "MBEDTLS_KEY_EXCHANGE_DHE_PSK_ENABLED defined, but not all prerequisites" #endif #if defined(MBEDTLS_KEY_EXCHANGE_ECDHE_PSK_ENABLED) && \ !defined(MBEDTLS_ECDH_C) #error "MBEDTLS_KEY_EXCHANGE_ECDHE_PSK_ENABLED defined, but not all prerequisites" #endif #if defined(MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED) && \ ( !defined(MBEDTLS_DHM_C) || !defined(MBEDTLS_RSA_C) || \ !defined(MBEDTLS_X509_CRT_PARSE_C) || !defined(MBEDTLS_PKCS1_V15) ) #error "MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED defined, but not all prerequisites" #endif #if defined(MBEDTLS_KEY_EXCHANGE_ECDHE_RSA_ENABLED) && \ ( !defined(MBEDTLS_ECDH_C) || !defined(MBEDTLS_RSA_C) || \ !defined(MBEDTLS_X509_CRT_PARSE_C) || !defined(MBEDTLS_PKCS1_V15) ) #error "MBEDTLS_KEY_EXCHANGE_ECDHE_RSA_ENABLED defined, but not all prerequisites" #endif #if defined(MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED) && \ ( !defined(MBEDTLS_ECDH_C) || !defined(MBEDTLS_ECDSA_C) || \ !defined(MBEDTLS_X509_CRT_PARSE_C) ) #error "MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED defined, but not all prerequisites" #endif #if defined(MBEDTLS_KEY_EXCHANGE_RSA_PSK_ENABLED) && \ ( !defined(MBEDTLS_RSA_C) || !defined(MBEDTLS_X509_CRT_PARSE_C) || \ !defined(MBEDTLS_PKCS1_V15) ) #error "MBEDTLS_KEY_EXCHANGE_RSA_PSK_ENABLED defined, but not all prerequisites" #endif #if defined(MBEDTLS_KEY_EXCHANGE_RSA_ENABLED) && \ ( !defined(MBEDTLS_RSA_C) || !defined(MBEDTLS_X509_CRT_PARSE_C) || \ !defined(MBEDTLS_PKCS1_V15) ) #error "MBEDTLS_KEY_EXCHANGE_RSA_ENABLED defined, but not all prerequisites" #endif #if defined(MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED) && \ ( !defined(MBEDTLS_ECJPAKE_C) || !defined(MBEDTLS_SHA256_C) || \ !defined(MBEDTLS_ECP_DP_SECP256R1_ENABLED) ) #error "MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED defined, but not all prerequisites" #endif #if defined(MBEDTLS_MEMORY_BUFFER_ALLOC_C) && \ ( !defined(MBEDTLS_PLATFORM_C) || !defined(MBEDTLS_PLATFORM_MEMORY) ) #error "MBEDTLS_MEMORY_BUFFER_ALLOC_C defined, but not all prerequisites" #endif #if defined(MBEDTLS_PADLOCK_C) && !defined(MBEDTLS_HAVE_ASM) #error "MBEDTLS_PADLOCK_C defined, but not all prerequisites" #endif #if defined(MBEDTLS_PEM_PARSE_C) && !defined(MBEDTLS_BASE64_C) #error "MBEDTLS_PEM_PARSE_C defined, but not all prerequisites" #endif #if defined(MBEDTLS_PEM_WRITE_C) && !defined(MBEDTLS_BASE64_C) #error "MBEDTLS_PEM_WRITE_C defined, but not all prerequisites" #endif #if defined(MBEDTLS_PK_C) && \ ( !defined(MBEDTLS_RSA_C) && !defined(MBEDTLS_ECP_C) ) #error "MBEDTLS_PK_C defined, but not all prerequisites" #endif #if defined(MBEDTLS_PK_PARSE_C) && !defined(MBEDTLS_PK_C) #error "MBEDTLS_PK_PARSE_C defined, but not all prerequisites" #endif #if defined(MBEDTLS_PK_WRITE_C) && !defined(MBEDTLS_PK_C) #error "MBEDTLS_PK_WRITE_C defined, but not all prerequisites" #endif #if defined(MBEDTLS_PKCS11_C) && !defined(MBEDTLS_PK_C) #error "MBEDTLS_PKCS11_C defined, but not all prerequisites" #endif #if defined(MBEDTLS_PLATFORM_EXIT_ALT) && !defined(MBEDTLS_PLATFORM_C) #error "MBEDTLS_PLATFORM_EXIT_ALT defined, but not all prerequisites" #endif #if defined(MBEDTLS_PLATFORM_EXIT_MACRO) && !defined(MBEDTLS_PLATFORM_C) #error "MBEDTLS_PLATFORM_EXIT_MACRO defined, but not all prerequisites" #endif #if defined(MBEDTLS_PLATFORM_EXIT_MACRO) &&\ ( defined(MBEDTLS_PLATFORM_STD_EXIT) ||\ defined(MBEDTLS_PLATFORM_EXIT_ALT) ) #error "MBEDTLS_PLATFORM_EXIT_MACRO and MBEDTLS_PLATFORM_STD_EXIT/MBEDTLS_PLATFORM_EXIT_ALT cannot be defined simultaneously" #endif #if defined(MBEDTLS_PLATFORM_FPRINTF_ALT) && !defined(MBEDTLS_PLATFORM_C) #error "MBEDTLS_PLATFORM_FPRINTF_ALT defined, but not all prerequisites" #endif #if defined(MBEDTLS_PLATFORM_FPRINTF_MACRO) && !defined(MBEDTLS_PLATFORM_C) #error "MBEDTLS_PLATFORM_FPRINTF_MACRO defined, but not all prerequisites" #endif #if defined(MBEDTLS_PLATFORM_FPRINTF_MACRO) &&\ ( defined(MBEDTLS_PLATFORM_STD_FPRINTF) ||\ defined(MBEDTLS_PLATFORM_FPRINTF_ALT) ) #error "MBEDTLS_PLATFORM_FPRINTF_MACRO and MBEDTLS_PLATFORM_STD_FPRINTF/MBEDTLS_PLATFORM_FPRINTF_ALT cannot be defined simultaneously" #endif #if defined(MBEDTLS_PLATFORM_FREE_MACRO) &&\ ( !defined(MBEDTLS_PLATFORM_C) || !defined(MBEDTLS_PLATFORM_MEMORY) ) #error "MBEDTLS_PLATFORM_FREE_MACRO defined, but not all prerequisites" #endif #if defined(MBEDTLS_PLATFORM_FREE_MACRO) &&\ defined(MBEDTLS_PLATFORM_STD_FREE) #error "MBEDTLS_PLATFORM_FREE_MACRO and MBEDTLS_PLATFORM_STD_FREE cannot be defined simultaneously" #endif #if defined(MBEDTLS_PLATFORM_FREE_MACRO) && !defined(MBEDTLS_PLATFORM_CALLOC_MACRO) #error "MBEDTLS_PLATFORM_CALLOC_MACRO must be defined if MBEDTLS_PLATFORM_FREE_MACRO is" #endif #if defined(MBEDTLS_PLATFORM_CALLOC_MACRO) &&\ ( !defined(MBEDTLS_PLATFORM_C) || !defined(MBEDTLS_PLATFORM_MEMORY) ) #error "MBEDTLS_PLATFORM_CALLOC_MACRO defined, but not all prerequisites" #endif #if defined(MBEDTLS_PLATFORM_CALLOC_MACRO) &&\ defined(MBEDTLS_PLATFORM_STD_CALLOC) #error "MBEDTLS_PLATFORM_CALLOC_MACRO and MBEDTLS_PLATFORM_STD_CALLOC cannot be defined simultaneously" #endif #if defined(MBEDTLS_PLATFORM_CALLOC_MACRO) && !defined(MBEDTLS_PLATFORM_FREE_MACRO) #error "MBEDTLS_PLATFORM_FREE_MACRO must be defined if MBEDTLS_PLATFORM_CALLOC_MACRO is" #endif #if defined(MBEDTLS_PLATFORM_MEMORY) && !defined(MBEDTLS_PLATFORM_C) #error "MBEDTLS_PLATFORM_MEMORY defined, but not all prerequisites" #endif #if defined(MBEDTLS_PLATFORM_PRINTF_ALT) && !defined(MBEDTLS_PLATFORM_C) #error "MBEDTLS_PLATFORM_PRINTF_ALT defined, but not all prerequisites" #endif #if defined(MBEDTLS_PLATFORM_PRINTF_MACRO) && !defined(MBEDTLS_PLATFORM_C) #error "MBEDTLS_PLATFORM_PRINTF_MACRO defined, but not all prerequisites" #endif #if defined(MBEDTLS_PLATFORM_PRINTF_MACRO) &&\ ( defined(MBEDTLS_PLATFORM_STD_PRINTF) ||\ defined(MBEDTLS_PLATFORM_PRINTF_ALT) ) #error "MBEDTLS_PLATFORM_PRINTF_MACRO and MBEDTLS_PLATFORM_STD_PRINTF/MBEDTLS_PLATFORM_PRINTF_ALT cannot be defined simultaneously" #endif #if defined(MBEDTLS_PLATFORM_SNPRINTF_ALT) && !defined(MBEDTLS_PLATFORM_C) #error "MBEDTLS_PLATFORM_SNPRINTF_ALT defined, but not all prerequisites" #endif #if defined(MBEDTLS_PLATFORM_SNPRINTF_MACRO) && !defined(MBEDTLS_PLATFORM_C) #error "MBEDTLS_PLATFORM_SNPRINTF_MACRO defined, but not all prerequisites" #endif #if defined(MBEDTLS_PLATFORM_SNPRINTF_MACRO) &&\ ( defined(MBEDTLS_PLATFORM_STD_SNPRINTF) ||\ defined(MBEDTLS_PLATFORM_SNPRINTF_ALT) ) #error "MBEDTLS_PLATFORM_SNPRINTF_MACRO and MBEDTLS_PLATFORM_STD_SNPRINTF/MBEDTLS_PLATFORM_SNPRINTF_ALT cannot be defined simultaneously" #endif #if defined(MBEDTLS_PLATFORM_STD_MEM_HDR) &&\ !defined(MBEDTLS_PLATFORM_NO_STD_FUNCTIONS) #error "MBEDTLS_PLATFORM_STD_MEM_HDR defined, but not all prerequisites" #endif #if defined(MBEDTLS_PLATFORM_STD_CALLOC) && !defined(MBEDTLS_PLATFORM_MEMORY) #error "MBEDTLS_PLATFORM_STD_CALLOC defined, but not all prerequisites" #endif #if defined(MBEDTLS_PLATFORM_STD_CALLOC) && !defined(MBEDTLS_PLATFORM_MEMORY) #error "MBEDTLS_PLATFORM_STD_CALLOC defined, but not all prerequisites" #endif #if defined(MBEDTLS_PLATFORM_STD_FREE) && !defined(MBEDTLS_PLATFORM_MEMORY) #error "MBEDTLS_PLATFORM_STD_FREE defined, but not all prerequisites" #endif #if defined(MBEDTLS_PLATFORM_STD_EXIT) &&\ !defined(MBEDTLS_PLATFORM_EXIT_ALT) #error "MBEDTLS_PLATFORM_STD_EXIT defined, but not all prerequisites" #endif #if defined(MBEDTLS_PLATFORM_STD_FPRINTF) &&\ !defined(MBEDTLS_PLATFORM_FPRINTF_ALT) #error "MBEDTLS_PLATFORM_STD_FPRINTF defined, but not all prerequisites" #endif #if defined(MBEDTLS_PLATFORM_STD_PRINTF) &&\ !defined(MBEDTLS_PLATFORM_PRINTF_ALT) #error "MBEDTLS_PLATFORM_STD_PRINTF defined, but not all prerequisites" #endif #if defined(MBEDTLS_PLATFORM_STD_SNPRINTF) &&\ !defined(MBEDTLS_PLATFORM_SNPRINTF_ALT) #error "MBEDTLS_PLATFORM_STD_SNPRINTF defined, but not all prerequisites" #endif #if defined(MBEDTLS_RSA_C) && ( !defined(MBEDTLS_BIGNUM_C) || \ !defined(MBEDTLS_OID_C) ) #error "MBEDTLS_RSA_C defined, but not all prerequisites" #endif #if defined(MBEDTLS_X509_RSASSA_PSS_SUPPORT) && \ ( !defined(MBEDTLS_RSA_C) || !defined(MBEDTLS_PKCS1_V21) ) #error "MBEDTLS_X509_RSASSA_PSS_SUPPORT defined, but not all prerequisites" #endif #if defined(MBEDTLS_SSL_PROTO_SSL3) && ( !defined(MBEDTLS_MD5_C) || \ !defined(MBEDTLS_SHA1_C) ) #error "MBEDTLS_SSL_PROTO_SSL3 defined, but not all prerequisites" #endif #if defined(MBEDTLS_SSL_PROTO_TLS1) && ( !defined(MBEDTLS_MD5_C) || \ !defined(MBEDTLS_SHA1_C) ) #error "MBEDTLS_SSL_PROTO_TLS1 defined, but not all prerequisites" #endif #if defined(MBEDTLS_SSL_PROTO_TLS1_1) && ( !defined(MBEDTLS_MD5_C) || \ !defined(MBEDTLS_SHA1_C) ) #error "MBEDTLS_SSL_PROTO_TLS1_1 defined, but not all prerequisites" #endif #if defined(MBEDTLS_SSL_PROTO_TLS1_2) && ( !defined(MBEDTLS_SHA1_C) && \ !defined(MBEDTLS_SHA256_C) && !defined(MBEDTLS_SHA512_C) ) #error "MBEDTLS_SSL_PROTO_TLS1_2 defined, but not all prerequisites" #endif #if defined(MBEDTLS_SSL_PROTO_DTLS) && \ !defined(MBEDTLS_SSL_PROTO_TLS1_1) && \ !defined(MBEDTLS_SSL_PROTO_TLS1_2) #error "MBEDTLS_SSL_PROTO_DTLS defined, but not all prerequisites" #endif #if defined(MBEDTLS_SSL_CLI_C) && !defined(MBEDTLS_SSL_TLS_C) #error "MBEDTLS_SSL_CLI_C defined, but not all prerequisites" #endif #if defined(MBEDTLS_SSL_TLS_C) && ( !defined(MBEDTLS_CIPHER_C) || \ !defined(MBEDTLS_MD_C) ) #error "MBEDTLS_SSL_TLS_C defined, but not all prerequisites" #endif #if defined(MBEDTLS_SSL_SRV_C) && !defined(MBEDTLS_SSL_TLS_C) #error "MBEDTLS_SSL_SRV_C defined, but not all prerequisites" #endif #if defined(MBEDTLS_SSL_TLS_C) && (!defined(MBEDTLS_SSL_PROTO_SSL3) && \ !defined(MBEDTLS_SSL_PROTO_TLS1) && !defined(MBEDTLS_SSL_PROTO_TLS1_1) && \ !defined(MBEDTLS_SSL_PROTO_TLS1_2)) #error "MBEDTLS_SSL_TLS_C defined, but no protocols are active" #endif #if defined(MBEDTLS_SSL_TLS_C) && (defined(MBEDTLS_SSL_PROTO_SSL3) && \ defined(MBEDTLS_SSL_PROTO_TLS1_1) && !defined(MBEDTLS_SSL_PROTO_TLS1)) #error "Illegal protocol selection" #endif #if defined(MBEDTLS_SSL_TLS_C) && (defined(MBEDTLS_SSL_PROTO_TLS1) && \ defined(MBEDTLS_SSL_PROTO_TLS1_2) && !defined(MBEDTLS_SSL_PROTO_TLS1_1)) #error "Illegal protocol selection" #endif #if defined(MBEDTLS_SSL_TLS_C) && (defined(MBEDTLS_SSL_PROTO_SSL3) && \ defined(MBEDTLS_SSL_PROTO_TLS1_2) && (!defined(MBEDTLS_SSL_PROTO_TLS1) || \ !defined(MBEDTLS_SSL_PROTO_TLS1_1))) #error "Illegal protocol selection" #endif #if defined(MBEDTLS_SSL_DTLS_HELLO_VERIFY) && !defined(MBEDTLS_SSL_PROTO_DTLS) #error "MBEDTLS_SSL_DTLS_HELLO_VERIFY defined, but not all prerequisites" #endif #if defined(MBEDTLS_SSL_DTLS_CLIENT_PORT_REUSE) && \ !defined(MBEDTLS_SSL_DTLS_HELLO_VERIFY) #error "MBEDTLS_SSL_DTLS_CLIENT_PORT_REUSE defined, but not all prerequisites" #endif #if defined(MBEDTLS_SSL_DTLS_ANTI_REPLAY) && \ ( !defined(MBEDTLS_SSL_TLS_C) || !defined(MBEDTLS_SSL_PROTO_DTLS) ) #error "MBEDTLS_SSL_DTLS_ANTI_REPLAY defined, but not all prerequisites" #endif #if defined(MBEDTLS_SSL_DTLS_BADMAC_LIMIT) && \ ( !defined(MBEDTLS_SSL_TLS_C) || !defined(MBEDTLS_SSL_PROTO_DTLS) ) #error "MBEDTLS_SSL_DTLS_BADMAC_LIMIT defined, but not all prerequisites" #endif #if defined(MBEDTLS_SSL_ENCRYPT_THEN_MAC) && \ !defined(MBEDTLS_SSL_PROTO_TLS1) && \ !defined(MBEDTLS_SSL_PROTO_TLS1_1) && \ !defined(MBEDTLS_SSL_PROTO_TLS1_2) #error "MBEDTLS_SSL_ENCRYPT_THEN_MAC defined, but not all prerequsites" #endif #if defined(MBEDTLS_SSL_EXTENDED_MASTER_SECRET) && \ !defined(MBEDTLS_SSL_PROTO_TLS1) && \ !defined(MBEDTLS_SSL_PROTO_TLS1_1) && \ !defined(MBEDTLS_SSL_PROTO_TLS1_2) #error "MBEDTLS_SSL_EXTENDED_MASTER_SECRET defined, but not all prerequsites" #endif #if defined(MBEDTLS_SSL_TICKET_C) && !defined(MBEDTLS_CIPHER_C) #error "MBEDTLS_SSL_TICKET_C defined, but not all prerequisites" #endif #if defined(MBEDTLS_SSL_CBC_RECORD_SPLITTING) && \ !defined(MBEDTLS_SSL_PROTO_SSL3) && !defined(MBEDTLS_SSL_PROTO_TLS1) #error "MBEDTLS_SSL_CBC_RECORD_SPLITTING defined, but not all prerequisites" #endif #if defined(MBEDTLS_SSL_SERVER_NAME_INDICATION) && \ !defined(MBEDTLS_X509_CRT_PARSE_C) #error "MBEDTLS_SSL_SERVER_NAME_INDICATION defined, but not all prerequisites" #endif #if defined(MBEDTLS_THREADING_PTHREAD) #if !defined(MBEDTLS_THREADING_C) || defined(MBEDTLS_THREADING_IMPL) #error "MBEDTLS_THREADING_PTHREAD defined, but not all prerequisites" #endif #define MBEDTLS_THREADING_IMPL #endif #if defined(MBEDTLS_THREADING_ALT) #if !defined(MBEDTLS_THREADING_C) || defined(MBEDTLS_THREADING_IMPL) #error "MBEDTLS_THREADING_ALT defined, but not all prerequisites" #endif #define MBEDTLS_THREADING_IMPL #endif #if defined(MBEDTLS_THREADING_C) && !defined(MBEDTLS_THREADING_IMPL) #error "MBEDTLS_THREADING_C defined, single threading implementation required" #endif #undef MBEDTLS_THREADING_IMPL #if defined(MBEDTLS_VERSION_FEATURES) && !defined(MBEDTLS_VERSION_C) #error "MBEDTLS_VERSION_FEATURES defined, but not all prerequisites" #endif #if defined(MBEDTLS_X509_USE_C) && ( !defined(MBEDTLS_BIGNUM_C) || \ !defined(MBEDTLS_OID_C) || !defined(MBEDTLS_ASN1_PARSE_C) || \ !defined(MBEDTLS_PK_PARSE_C) ) #error "MBEDTLS_X509_USE_C defined, but not all prerequisites" #endif #if defined(MBEDTLS_X509_CREATE_C) && ( !defined(MBEDTLS_BIGNUM_C) || \ !defined(MBEDTLS_OID_C) || !defined(MBEDTLS_ASN1_WRITE_C) || \ !defined(MBEDTLS_PK_WRITE_C) ) #error "MBEDTLS_X509_CREATE_C defined, but not all prerequisites" #endif #if defined(MBEDTLS_X509_CRT_PARSE_C) && ( !defined(MBEDTLS_X509_USE_C) ) #error "MBEDTLS_X509_CRT_PARSE_C defined, but not all prerequisites" #endif #if defined(MBEDTLS_X509_CRL_PARSE_C) && ( !defined(MBEDTLS_X509_USE_C) ) #error "MBEDTLS_X509_CRL_PARSE_C defined, but not all prerequisites" #endif #if defined(MBEDTLS_X509_CSR_PARSE_C) && ( !defined(MBEDTLS_X509_USE_C) ) #error "MBEDTLS_X509_CSR_PARSE_C defined, but not all prerequisites" #endif #if defined(MBEDTLS_X509_CRT_WRITE_C) && ( !defined(MBEDTLS_X509_CREATE_C) ) #error "MBEDTLS_X509_CRT_WRITE_C defined, but not all prerequisites" #endif #if defined(MBEDTLS_X509_CSR_WRITE_C) && ( !defined(MBEDTLS_X509_CREATE_C) ) #error "MBEDTLS_X509_CSR_WRITE_C defined, but not all prerequisites" #endif /* * Avoid warning from -pedantic. This is a convenient place for this * workaround since this is included by every single file before the * #if defined(MBEDTLS_xxx_C) that results in emtpy translation units. */ typedef int mbedtls_iso_c_forbids_empty_translation_units; #endif /* MBEDTLS_CHECK_CONFIG_H */ modsecurity-v3.0.6/others/mbedtls/mbed-tls-config.h0000664000175000017500000022166414146026157023501 0ustar mhsvierulamhsvierula/** * \file config.h * * \brief Configuration options (set of defines) * * This set of compile-time options may be used to enable * or disable features selectively, and reduce the global * memory footprint. * * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); 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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * This file is part of mbed TLS (https://tls.mbed.org) */ #ifndef MBEDTLS_CONFIG_H #define MBEDTLS_CONFIG_H #if defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE) #define _CRT_SECURE_NO_DEPRECATE 1 #endif /** * \name SECTION: System support * * This section sets system specific settings. * \{ */ /** * \def MBEDTLS_HAVE_ASM * * The compiler has support for asm(). * * Requires support for asm() in compiler. * * Used in: * library/timing.c * library/padlock.c * include/mbedtls/bn_mul.h * * Comment to disable the use of assembly code. */ #define MBEDTLS_HAVE_ASM /** * \def MBEDTLS_HAVE_SSE2 * * CPU supports SSE2 instruction set. * * Uncomment if the CPU supports SSE2 (IA-32 specific). */ //#define MBEDTLS_HAVE_SSE2 /** * \def MBEDTLS_HAVE_TIME * * System has time.h and time(). * The time does not need to be correct, only time differences are used, * by contrast with MBEDTLS_HAVE_TIME_DATE * * Comment if your system does not support time functions */ #define MBEDTLS_HAVE_TIME /** * \def MBEDTLS_HAVE_TIME_DATE * * System has time.h and time(), gmtime() and the clock is correct. * The time needs to be correct (not necesarily very accurate, but at least * the date should be correct). This is used to verify the validity period of * X.509 certificates. * * Comment if your system does not have a correct clock. */ #define MBEDTLS_HAVE_TIME_DATE /** * \def MBEDTLS_PLATFORM_MEMORY * * Enable the memory allocation layer. * * By default mbed TLS uses the system-provided calloc() and free(). * This allows different allocators (self-implemented or provided) to be * provided to the platform abstraction layer. * * Enabling MBEDTLS_PLATFORM_MEMORY without the * MBEDTLS_PLATFORM_{FREE,CALLOC}_MACROs will provide * "mbedtls_platform_set_calloc_free()" allowing you to set an alternative calloc() and * free() function pointer at runtime. * * Enabling MBEDTLS_PLATFORM_MEMORY and specifying * MBEDTLS_PLATFORM_{CALLOC,FREE}_MACROs will allow you to specify the * alternate function at compile time. * * Requires: MBEDTLS_PLATFORM_C * * Enable this layer to allow use of alternative memory allocators. */ //#define MBEDTLS_PLATFORM_MEMORY /** * \def MBEDTLS_PLATFORM_NO_STD_FUNCTIONS * * Do not assign standard functions in the platform layer (e.g. calloc() to * MBEDTLS_PLATFORM_STD_CALLOC and printf() to MBEDTLS_PLATFORM_STD_PRINTF) * * This makes sure there are no linking errors on platforms that do not support * these functions. You will HAVE to provide alternatives, either at runtime * via the platform_set_xxx() functions or at compile time by setting * the MBEDTLS_PLATFORM_STD_XXX defines, or enabling a * MBEDTLS_PLATFORM_XXX_MACRO. * * Requires: MBEDTLS_PLATFORM_C * * Uncomment to prevent default assignment of standard functions in the * platform layer. */ //#define MBEDTLS_PLATFORM_NO_STD_FUNCTIONS /** * \def MBEDTLS_PLATFORM_EXIT_ALT * * MBEDTLS_PLATFORM_XXX_ALT: Uncomment a macro to let mbed TLS support the * function in the platform abstraction layer. * * Example: In case you uncomment MBEDTLS_PLATFORM_PRINTF_ALT, mbed TLS will * provide a function "mbedtls_platform_set_printf()" that allows you to set an * alternative printf function pointer. * * All these define require MBEDTLS_PLATFORM_C to be defined! * * \note MBEDTLS_PLATFORM_SNPRINTF_ALT is required on Windows; * it will be enabled automatically by check_config.h * * \warning MBEDTLS_PLATFORM_XXX_ALT cannot be defined at the same time as * MBEDTLS_PLATFORM_XXX_MACRO! * * Uncomment a macro to enable alternate implementation of specific base * platform function */ //#define MBEDTLS_PLATFORM_EXIT_ALT //#define MBEDTLS_PLATFORM_FPRINTF_ALT //#define MBEDTLS_PLATFORM_PRINTF_ALT //#define MBEDTLS_PLATFORM_SNPRINTF_ALT /** * \def MBEDTLS_DEPRECATED_WARNING * * Mark deprecated functions so that they generate a warning if used. * Functions deprecated in one version will usually be removed in the next * version. You can enable this to help you prepare the transition to a new * major version by making sure your code is not using these functions. * * This only works with GCC and Clang. With other compilers, you may want to * use MBEDTLS_DEPRECATED_REMOVED * * Uncomment to get warnings on using deprecated functions. */ //#define MBEDTLS_DEPRECATED_WARNING /** * \def MBEDTLS_DEPRECATED_REMOVED * * Remove deprecated functions so that they generate an error if used. * Functions deprecated in one version will usually be removed in the next * version. You can enable this to help you prepare the transition to a new * major version by making sure your code is not using these functions. * * Uncomment to get errors on using deprecated functions. */ //#define MBEDTLS_DEPRECATED_REMOVED /* \} name SECTION: System support */ /** * \name SECTION: mbed TLS feature support * * This section sets support for features that are or are not needed * within the modules that are enabled. * \{ */ /** * \def MBEDTLS_TIMING_ALT * * Uncomment to provide your own alternate implementation for mbedtls_timing_hardclock(), * mbedtls_timing_get_timer(), mbedtls_set_alarm(), mbedtls_set/get_delay() * * Only works if you have MBEDTLS_TIMING_C enabled. * * You will need to provide a header "timing_alt.h" and an implementation at * compile time. */ //#define MBEDTLS_TIMING_ALT /** * \def MBEDTLS_AES_ALT * * MBEDTLS__MODULE_NAME__ALT: Uncomment a macro to let mbed TLS use your * alternate core implementation of a symmetric crypto or hash module (e.g. * platform specific assembly optimized implementations). Keep in mind that * the function prototypes should remain the same. * * This replaces the whole module. If you only want to replace one of the * functions, use one of the MBEDTLS__FUNCTION_NAME__ALT flags. * * Example: In case you uncomment MBEDTLS_AES_ALT, mbed TLS will no longer * provide the "struct mbedtls_aes_context" definition and omit the base function * declarations and implementations. "aes_alt.h" will be included from * "aes.h" to include the new function definitions. * * Uncomment a macro to enable alternate implementation of the corresponding * module. */ //#define MBEDTLS_AES_ALT //#define MBEDTLS_ARC4_ALT //#define MBEDTLS_BLOWFISH_ALT //#define MBEDTLS_CAMELLIA_ALT //#define MBEDTLS_DES_ALT //#define MBEDTLS_XTEA_ALT //#define MBEDTLS_MD2_ALT //#define MBEDTLS_MD4_ALT //#define MBEDTLS_MD5_ALT //#define MBEDTLS_RIPEMD160_ALT //#define MBEDTLS_SHA1_ALT //#define MBEDTLS_SHA256_ALT //#define MBEDTLS_SHA512_ALT /** * \def MBEDTLS_MD2_PROCESS_ALT * * MBEDTLS__FUNCTION_NAME__ALT: Uncomment a macro to let mbed TLS use you * alternate core implementation of symmetric crypto or hash function. Keep in * mind that function prototypes should remain the same. * * This replaces only one function. The header file from mbed TLS is still * used, in contrast to the MBEDTLS__MODULE_NAME__ALT flags. * * Example: In case you uncomment MBEDTLS_SHA256_PROCESS_ALT, mbed TLS will * no longer provide the mbedtls_sha1_process() function, but it will still provide * the other function (using your mbedtls_sha1_process() function) and the definition * of mbedtls_sha1_context, so your implementation of mbedtls_sha1_process must be compatible * with this definition. * * Note: if you use the AES_xxx_ALT macros, then is is recommended to also set * MBEDTLS_AES_ROM_TABLES in order to help the linker garbage-collect the AES * tables. * * Uncomment a macro to enable alternate implementation of the corresponding * function. */ //#define MBEDTLS_MD2_PROCESS_ALT //#define MBEDTLS_MD4_PROCESS_ALT //#define MBEDTLS_MD5_PROCESS_ALT //#define MBEDTLS_RIPEMD160_PROCESS_ALT //#define MBEDTLS_SHA1_PROCESS_ALT //#define MBEDTLS_SHA256_PROCESS_ALT //#define MBEDTLS_SHA512_PROCESS_ALT //#define MBEDTLS_DES_SETKEY_ALT //#define MBEDTLS_DES_CRYPT_ECB_ALT //#define MBEDTLS_DES3_CRYPT_ECB_ALT //#define MBEDTLS_AES_SETKEY_ENC_ALT //#define MBEDTLS_AES_SETKEY_DEC_ALT //#define MBEDTLS_AES_ENCRYPT_ALT //#define MBEDTLS_AES_DECRYPT_ALT /** * \def MBEDTLS_ENTROPY_HARDWARE_ALT * * Uncomment this macro to let mbed TLS use your own implementation of a * hardware entropy collector. * * Your function must be called \c mbedtls_hardware_poll(), have the same * prototype as declared in entropy_poll.h, and accept NULL as first argument. * * Uncomment to use your own hardware entropy collector. */ //#define MBEDTLS_ENTROPY_HARDWARE_ALT /** * \def MBEDTLS_AES_ROM_TABLES * * Store the AES tables in ROM. * * Uncomment this macro to store the AES tables in ROM. */ //#define MBEDTLS_AES_ROM_TABLES /** * \def MBEDTLS_CAMELLIA_SMALL_MEMORY * * Use less ROM for the Camellia implementation (saves about 768 bytes). * * Uncomment this macro to use less memory for Camellia. */ //#define MBEDTLS_CAMELLIA_SMALL_MEMORY /** * \def MBEDTLS_CIPHER_MODE_CBC * * Enable Cipher Block Chaining mode (CBC) for symmetric ciphers. */ #define MBEDTLS_CIPHER_MODE_CBC /** * \def MBEDTLS_CIPHER_MODE_CFB * * Enable Cipher Feedback mode (CFB) for symmetric ciphers. */ #define MBEDTLS_CIPHER_MODE_CFB /** * \def MBEDTLS_CIPHER_MODE_CTR * * Enable Counter Block Cipher mode (CTR) for symmetric ciphers. */ #define MBEDTLS_CIPHER_MODE_CTR /** * \def MBEDTLS_CIPHER_NULL_CIPHER * * Enable NULL cipher. * Warning: Only do so when you know what you are doing. This allows for * encryption or channels without any security! * * Requires MBEDTLS_ENABLE_WEAK_CIPHERSUITES as well to enable * the following ciphersuites: * MBEDTLS_TLS_ECDH_ECDSA_WITH_NULL_SHA * MBEDTLS_TLS_ECDH_RSA_WITH_NULL_SHA * MBEDTLS_TLS_ECDHE_ECDSA_WITH_NULL_SHA * MBEDTLS_TLS_ECDHE_RSA_WITH_NULL_SHA * MBEDTLS_TLS_ECDHE_PSK_WITH_NULL_SHA384 * MBEDTLS_TLS_ECDHE_PSK_WITH_NULL_SHA256 * MBEDTLS_TLS_ECDHE_PSK_WITH_NULL_SHA * MBEDTLS_TLS_DHE_PSK_WITH_NULL_SHA384 * MBEDTLS_TLS_DHE_PSK_WITH_NULL_SHA256 * MBEDTLS_TLS_DHE_PSK_WITH_NULL_SHA * MBEDTLS_TLS_RSA_WITH_NULL_SHA256 * MBEDTLS_TLS_RSA_WITH_NULL_SHA * MBEDTLS_TLS_RSA_WITH_NULL_MD5 * MBEDTLS_TLS_RSA_PSK_WITH_NULL_SHA384 * MBEDTLS_TLS_RSA_PSK_WITH_NULL_SHA256 * MBEDTLS_TLS_RSA_PSK_WITH_NULL_SHA * MBEDTLS_TLS_PSK_WITH_NULL_SHA384 * MBEDTLS_TLS_PSK_WITH_NULL_SHA256 * MBEDTLS_TLS_PSK_WITH_NULL_SHA * * Uncomment this macro to enable the NULL cipher and ciphersuites */ //#define MBEDTLS_CIPHER_NULL_CIPHER /** * \def MBEDTLS_CIPHER_PADDING_PKCS7 * * MBEDTLS_CIPHER_PADDING_XXX: Uncomment or comment macros to add support for * specific padding modes in the cipher layer with cipher modes that support * padding (e.g. CBC) * * If you disable all padding modes, only full blocks can be used with CBC. * * Enable padding modes in the cipher layer. */ #define MBEDTLS_CIPHER_PADDING_PKCS7 #define MBEDTLS_CIPHER_PADDING_ONE_AND_ZEROS #define MBEDTLS_CIPHER_PADDING_ZEROS_AND_LEN #define MBEDTLS_CIPHER_PADDING_ZEROS /** * \def MBEDTLS_ENABLE_WEAK_CIPHERSUITES * * Enable weak ciphersuites in SSL / TLS. * Warning: Only do so when you know what you are doing. This allows for * channels with virtually no security at all! * * This enables the following ciphersuites: * MBEDTLS_TLS_RSA_WITH_DES_CBC_SHA * MBEDTLS_TLS_DHE_RSA_WITH_DES_CBC_SHA * * Uncomment this macro to enable weak ciphersuites */ //#define MBEDTLS_ENABLE_WEAK_CIPHERSUITES /** * \def MBEDTLS_REMOVE_ARC4_CIPHERSUITES * * Remove RC4 ciphersuites by default in SSL / TLS. * This flag removes the ciphersuites based on RC4 from the default list as * returned by mbedtls_ssl_list_ciphersuites(). However, it is still possible to * enable (some of) them with mbedtls_ssl_conf_ciphersuites() by including them * explicitly. * * Uncomment this macro to remove RC4 ciphersuites by default. */ #define MBEDTLS_REMOVE_ARC4_CIPHERSUITES /** * \def MBEDTLS_ECP_DP_SECP192R1_ENABLED * * MBEDTLS_ECP_XXXX_ENABLED: Enables specific curves within the Elliptic Curve * module. By default all supported curves are enabled. * * Comment macros to disable the curve and functions for it */ #define MBEDTLS_ECP_DP_SECP192R1_ENABLED #define MBEDTLS_ECP_DP_SECP224R1_ENABLED #define MBEDTLS_ECP_DP_SECP256R1_ENABLED #define MBEDTLS_ECP_DP_SECP384R1_ENABLED #define MBEDTLS_ECP_DP_SECP521R1_ENABLED #define MBEDTLS_ECP_DP_SECP192K1_ENABLED #define MBEDTLS_ECP_DP_SECP224K1_ENABLED #define MBEDTLS_ECP_DP_SECP256K1_ENABLED #define MBEDTLS_ECP_DP_BP256R1_ENABLED #define MBEDTLS_ECP_DP_BP384R1_ENABLED #define MBEDTLS_ECP_DP_BP512R1_ENABLED #define MBEDTLS_ECP_DP_CURVE25519_ENABLED /** * \def MBEDTLS_ECP_NIST_OPTIM * * Enable specific 'modulo p' routines for each NIST prime. * Depending on the prime and architecture, makes operations 4 to 8 times * faster on the corresponding curve. * * Comment this macro to disable NIST curves optimisation. */ #define MBEDTLS_ECP_NIST_OPTIM /** * \def MBEDTLS_ECDSA_DETERMINISTIC * * Enable deterministic ECDSA (RFC 6979). * Standard ECDSA is "fragile" in the sense that lack of entropy when signing * may result in a compromise of the long-term signing key. This is avoided by * the deterministic variant. * * Requires: MBEDTLS_HMAC_DRBG_C * * Comment this macro to disable deterministic ECDSA. */ #define MBEDTLS_ECDSA_DETERMINISTIC /** * \def MBEDTLS_KEY_EXCHANGE_PSK_ENABLED * * Enable the PSK based ciphersuite modes in SSL / TLS. * * This enables the following ciphersuites (if other requisites are * enabled as well): * MBEDTLS_TLS_PSK_WITH_AES_256_GCM_SHA384 * MBEDTLS_TLS_PSK_WITH_AES_256_CBC_SHA384 * MBEDTLS_TLS_PSK_WITH_AES_256_CBC_SHA * MBEDTLS_TLS_PSK_WITH_CAMELLIA_256_GCM_SHA384 * MBEDTLS_TLS_PSK_WITH_CAMELLIA_256_CBC_SHA384 * MBEDTLS_TLS_PSK_WITH_AES_128_GCM_SHA256 * MBEDTLS_TLS_PSK_WITH_AES_128_CBC_SHA256 * MBEDTLS_TLS_PSK_WITH_AES_128_CBC_SHA * MBEDTLS_TLS_PSK_WITH_CAMELLIA_128_GCM_SHA256 * MBEDTLS_TLS_PSK_WITH_CAMELLIA_128_CBC_SHA256 * MBEDTLS_TLS_PSK_WITH_3DES_EDE_CBC_SHA * MBEDTLS_TLS_PSK_WITH_RC4_128_SHA */ #define MBEDTLS_KEY_EXCHANGE_PSK_ENABLED /** * \def MBEDTLS_KEY_EXCHANGE_DHE_PSK_ENABLED * * Enable the DHE-PSK based ciphersuite modes in SSL / TLS. * * Requires: MBEDTLS_DHM_C * * This enables the following ciphersuites (if other requisites are * enabled as well): * MBEDTLS_TLS_DHE_PSK_WITH_AES_256_GCM_SHA384 * MBEDTLS_TLS_DHE_PSK_WITH_AES_256_CBC_SHA384 * MBEDTLS_TLS_DHE_PSK_WITH_AES_256_CBC_SHA * MBEDTLS_TLS_DHE_PSK_WITH_CAMELLIA_256_GCM_SHA384 * MBEDTLS_TLS_DHE_PSK_WITH_CAMELLIA_256_CBC_SHA384 * MBEDTLS_TLS_DHE_PSK_WITH_AES_128_GCM_SHA256 * MBEDTLS_TLS_DHE_PSK_WITH_AES_128_CBC_SHA256 * MBEDTLS_TLS_DHE_PSK_WITH_AES_128_CBC_SHA * MBEDTLS_TLS_DHE_PSK_WITH_CAMELLIA_128_GCM_SHA256 * MBEDTLS_TLS_DHE_PSK_WITH_CAMELLIA_128_CBC_SHA256 * MBEDTLS_TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA * MBEDTLS_TLS_DHE_PSK_WITH_RC4_128_SHA */ #define MBEDTLS_KEY_EXCHANGE_DHE_PSK_ENABLED /** * \def MBEDTLS_KEY_EXCHANGE_ECDHE_PSK_ENABLED * * Enable the ECDHE-PSK based ciphersuite modes in SSL / TLS. * * Requires: MBEDTLS_ECDH_C * * This enables the following ciphersuites (if other requisites are * enabled as well): * MBEDTLS_TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA384 * MBEDTLS_TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA * MBEDTLS_TLS_ECDHE_PSK_WITH_CAMELLIA_256_CBC_SHA384 * MBEDTLS_TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256 * MBEDTLS_TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA * MBEDTLS_TLS_ECDHE_PSK_WITH_CAMELLIA_128_CBC_SHA256 * MBEDTLS_TLS_ECDHE_PSK_WITH_3DES_EDE_CBC_SHA * MBEDTLS_TLS_ECDHE_PSK_WITH_RC4_128_SHA */ #define MBEDTLS_KEY_EXCHANGE_ECDHE_PSK_ENABLED /** * \def MBEDTLS_KEY_EXCHANGE_RSA_PSK_ENABLED * * Enable the RSA-PSK based ciphersuite modes in SSL / TLS. * * Requires: MBEDTLS_RSA_C, MBEDTLS_PKCS1_V15, * MBEDTLS_X509_CRT_PARSE_C * * This enables the following ciphersuites (if other requisites are * enabled as well): * MBEDTLS_TLS_RSA_PSK_WITH_AES_256_GCM_SHA384 * MBEDTLS_TLS_RSA_PSK_WITH_AES_256_CBC_SHA384 * MBEDTLS_TLS_RSA_PSK_WITH_AES_256_CBC_SHA * MBEDTLS_TLS_RSA_PSK_WITH_CAMELLIA_256_GCM_SHA384 * MBEDTLS_TLS_RSA_PSK_WITH_CAMELLIA_256_CBC_SHA384 * MBEDTLS_TLS_RSA_PSK_WITH_AES_128_GCM_SHA256 * MBEDTLS_TLS_RSA_PSK_WITH_AES_128_CBC_SHA256 * MBEDTLS_TLS_RSA_PSK_WITH_AES_128_CBC_SHA * MBEDTLS_TLS_RSA_PSK_WITH_CAMELLIA_128_GCM_SHA256 * MBEDTLS_TLS_RSA_PSK_WITH_CAMELLIA_128_CBC_SHA256 * MBEDTLS_TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA * MBEDTLS_TLS_RSA_PSK_WITH_RC4_128_SHA */ #define MBEDTLS_KEY_EXCHANGE_RSA_PSK_ENABLED /** * \def MBEDTLS_KEY_EXCHANGE_RSA_ENABLED * * Enable the RSA-only based ciphersuite modes in SSL / TLS. * * Requires: MBEDTLS_RSA_C, MBEDTLS_PKCS1_V15, * MBEDTLS_X509_CRT_PARSE_C * * This enables the following ciphersuites (if other requisites are * enabled as well): * MBEDTLS_TLS_RSA_WITH_AES_256_GCM_SHA384 * MBEDTLS_TLS_RSA_WITH_AES_256_CBC_SHA256 * MBEDTLS_TLS_RSA_WITH_AES_256_CBC_SHA * MBEDTLS_TLS_RSA_WITH_CAMELLIA_256_GCM_SHA384 * MBEDTLS_TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256 * MBEDTLS_TLS_RSA_WITH_CAMELLIA_256_CBC_SHA * MBEDTLS_TLS_RSA_WITH_AES_128_GCM_SHA256 * MBEDTLS_TLS_RSA_WITH_AES_128_CBC_SHA256 * MBEDTLS_TLS_RSA_WITH_AES_128_CBC_SHA * MBEDTLS_TLS_RSA_WITH_CAMELLIA_128_GCM_SHA256 * MBEDTLS_TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256 * MBEDTLS_TLS_RSA_WITH_CAMELLIA_128_CBC_SHA * MBEDTLS_TLS_RSA_WITH_3DES_EDE_CBC_SHA * MBEDTLS_TLS_RSA_WITH_RC4_128_SHA * MBEDTLS_TLS_RSA_WITH_RC4_128_MD5 */ #define MBEDTLS_KEY_EXCHANGE_RSA_ENABLED /** * \def MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED * * Enable the DHE-RSA based ciphersuite modes in SSL / TLS. * * Requires: MBEDTLS_DHM_C, MBEDTLS_RSA_C, MBEDTLS_PKCS1_V15, * MBEDTLS_X509_CRT_PARSE_C * * This enables the following ciphersuites (if other requisites are * enabled as well): * MBEDTLS_TLS_DHE_RSA_WITH_AES_256_GCM_SHA384 * MBEDTLS_TLS_DHE_RSA_WITH_AES_256_CBC_SHA256 * MBEDTLS_TLS_DHE_RSA_WITH_AES_256_CBC_SHA * MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_256_GCM_SHA384 * MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256 * MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA * MBEDTLS_TLS_DHE_RSA_WITH_AES_128_GCM_SHA256 * MBEDTLS_TLS_DHE_RSA_WITH_AES_128_CBC_SHA256 * MBEDTLS_TLS_DHE_RSA_WITH_AES_128_CBC_SHA * MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_128_GCM_SHA256 * MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256 * MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA * MBEDTLS_TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA */ #define MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED /** * \def MBEDTLS_KEY_EXCHANGE_ECDHE_RSA_ENABLED * * Enable the ECDHE-RSA based ciphersuite modes in SSL / TLS. * * Requires: MBEDTLS_ECDH_C, MBEDTLS_RSA_C, MBEDTLS_PKCS1_V15, * MBEDTLS_X509_CRT_PARSE_C * * This enables the following ciphersuites (if other requisites are * enabled as well): * MBEDTLS_TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 * MBEDTLS_TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384 * MBEDTLS_TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA * MBEDTLS_TLS_ECDHE_RSA_WITH_CAMELLIA_256_GCM_SHA384 * MBEDTLS_TLS_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384 * MBEDTLS_TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 * MBEDTLS_TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 * MBEDTLS_TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA * MBEDTLS_TLS_ECDHE_RSA_WITH_CAMELLIA_128_GCM_SHA256 * MBEDTLS_TLS_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256 * MBEDTLS_TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA * MBEDTLS_TLS_ECDHE_RSA_WITH_RC4_128_SHA */ #define MBEDTLS_KEY_EXCHANGE_ECDHE_RSA_ENABLED /** * \def MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED * * Enable the ECDHE-ECDSA based ciphersuite modes in SSL / TLS. * * Requires: MBEDTLS_ECDH_C, MBEDTLS_ECDSA_C, MBEDTLS_X509_CRT_PARSE_C, * * This enables the following ciphersuites (if other requisites are * enabled as well): * MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA * MBEDTLS_TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_GCM_SHA384 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA * MBEDTLS_TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_GCM_SHA256 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_CBC_SHA256 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA * MBEDTLS_TLS_ECDHE_ECDSA_WITH_RC4_128_SHA */ #define MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED /** * \def MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA_ENABLED * * Enable the ECDH-ECDSA based ciphersuite modes in SSL / TLS. * * Requires: MBEDTLS_ECDH_C, MBEDTLS_X509_CRT_PARSE_C * * This enables the following ciphersuites (if other requisites are * enabled as well): * MBEDTLS_TLS_ECDH_ECDSA_WITH_RC4_128_SHA * MBEDTLS_TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA * MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA * MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA * MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256 * MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384 * MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256 * MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384 * MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_128_CBC_SHA256 * MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_256_CBC_SHA384 * MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_128_GCM_SHA256 * MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_256_GCM_SHA384 */ #define MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA_ENABLED /** * \def MBEDTLS_KEY_EXCHANGE_ECDH_RSA_ENABLED * * Enable the ECDH-RSA based ciphersuite modes in SSL / TLS. * * Requires: MBEDTLS_ECDH_C, MBEDTLS_X509_CRT_PARSE_C * * This enables the following ciphersuites (if other requisites are * enabled as well): * MBEDTLS_TLS_ECDH_RSA_WITH_RC4_128_SHA * MBEDTLS_TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA * MBEDTLS_TLS_ECDH_RSA_WITH_AES_128_CBC_SHA * MBEDTLS_TLS_ECDH_RSA_WITH_AES_256_CBC_SHA * MBEDTLS_TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256 * MBEDTLS_TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384 * MBEDTLS_TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256 * MBEDTLS_TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384 * MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_128_CBC_SHA256 * MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_256_CBC_SHA384 * MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_128_GCM_SHA256 * MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_256_GCM_SHA384 */ #define MBEDTLS_KEY_EXCHANGE_ECDH_RSA_ENABLED /** * \def MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED * * Enable the ECJPAKE based ciphersuite modes in SSL / TLS. * * \warning This is currently experimental. EC J-PAKE support is based on the * Thread v1.0.0 specification; incompatible changes to the specification * might still happen. For this reason, this is disabled by default. * * Requires: MBEDTLS_ECJPAKE_C * MBEDTLS_SHA256_C * MBEDTLS_ECP_DP_SECP256R1_ENABLED * * This enables the following ciphersuites (if other requisites are * enabled as well): * MBEDTLS_TLS_ECJPAKE_WITH_AES_128_CCM_8 */ //#define MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED /** * \def MBEDTLS_PK_PARSE_EC_EXTENDED * * Enhance support for reading EC keys using variants of SEC1 not allowed by * RFC 5915 and RFC 5480. * * Currently this means parsing the SpecifiedECDomain choice of EC * parameters (only known groups are supported, not arbitrary domains, to * avoid validation issues). * * Disable if you only need to support RFC 5915 + 5480 key formats. */ #define MBEDTLS_PK_PARSE_EC_EXTENDED /** * \def MBEDTLS_ERROR_STRERROR_DUMMY * * Enable a dummy error function to make use of mbedtls_strerror() in * third party libraries easier when MBEDTLS_ERROR_C is disabled * (no effect when MBEDTLS_ERROR_C is enabled). * * You can safely disable this if MBEDTLS_ERROR_C is enabled, or if you're * not using mbedtls_strerror() or error_strerror() in your application. * * Disable if you run into name conflicts and want to really remove the * mbedtls_strerror() */ #define MBEDTLS_ERROR_STRERROR_DUMMY /** * \def MBEDTLS_GENPRIME * * Enable the prime-number generation code. * * Requires: MBEDTLS_BIGNUM_C */ #define MBEDTLS_GENPRIME /** * \def MBEDTLS_FS_IO * * Enable functions that use the filesystem. */ #define MBEDTLS_FS_IO /** * \def MBEDTLS_NO_DEFAULT_ENTROPY_SOURCES * * Do not add default entropy sources. These are the platform specific, * mbedtls_timing_hardclock and HAVEGE based poll functions. * * This is useful to have more control over the added entropy sources in an * application. * * Uncomment this macro to prevent loading of default entropy functions. */ //#define MBEDTLS_NO_DEFAULT_ENTROPY_SOURCES /** * \def MBEDTLS_NO_PLATFORM_ENTROPY * * Do not use built-in platform entropy functions. * This is useful if your platform does not support * standards like the /dev/urandom or Windows CryptoAPI. * * Uncomment this macro to disable the built-in platform entropy functions. */ //#define MBEDTLS_NO_PLATFORM_ENTROPY /** * \def MBEDTLS_ENTROPY_FORCE_SHA256 * * Force the entropy accumulator to use a SHA-256 accumulator instead of the * default SHA-512 based one (if both are available). * * Requires: MBEDTLS_SHA256_C * * On 32-bit systems SHA-256 can be much faster than SHA-512. Use this option * if you have performance concerns. * * This option is only useful if both MBEDTLS_SHA256_C and * MBEDTLS_SHA512_C are defined. Otherwise the available hash module is used. */ //#define MBEDTLS_ENTROPY_FORCE_SHA256 /** * \def MBEDTLS_MEMORY_DEBUG * * Enable debugging of buffer allocator memory issues. Automatically prints * (to stderr) all (fatal) messages on memory allocation issues. Enables * function for 'debug output' of allocated memory. * * Requires: MBEDTLS_MEMORY_BUFFER_ALLOC_C * * Uncomment this macro to let the buffer allocator print out error messages. */ //#define MBEDTLS_MEMORY_DEBUG /** * \def MBEDTLS_MEMORY_BACKTRACE * * Include backtrace information with each allocated block. * * Requires: MBEDTLS_MEMORY_BUFFER_ALLOC_C * GLIBC-compatible backtrace() an backtrace_symbols() support * * Uncomment this macro to include backtrace information */ //#define MBEDTLS_MEMORY_BACKTRACE /** * \def MBEDTLS_PK_RSA_ALT_SUPPORT * * Support external private RSA keys (eg from a HSM) in the PK layer. * * Comment this macro to disable support for external private RSA keys. */ #define MBEDTLS_PK_RSA_ALT_SUPPORT /** * \def MBEDTLS_PKCS1_V15 * * Enable support for PKCS#1 v1.5 encoding. * * Requires: MBEDTLS_RSA_C * * This enables support for PKCS#1 v1.5 operations. */ #define MBEDTLS_PKCS1_V15 /** * \def MBEDTLS_PKCS1_V21 * * Enable support for PKCS#1 v2.1 encoding. * * Requires: MBEDTLS_MD_C, MBEDTLS_RSA_C * * This enables support for RSAES-OAEP and RSASSA-PSS operations. */ #define MBEDTLS_PKCS1_V21 /** * \def MBEDTLS_RSA_NO_CRT * * Do not use the Chinese Remainder Theorem for the RSA private operation. * * Uncomment this macro to disable the use of CRT in RSA. * */ //#define MBEDTLS_RSA_NO_CRT /** * \def MBEDTLS_SELF_TEST * * Enable the checkup functions (*_self_test). */ //#define MBEDTLS_SELF_TEST /** * \def MBEDTLS_SHA256_SMALLER * * Enable an implementation of SHA-256 that has lower ROM footprint but also * lower performance. * * The default implementation is meant to be a reasonnable compromise between * performance and size. This version optimizes more aggressively for size at * the expense of performance. Eg on Cortex-M4 it reduces the size of * mbedtls_sha256_process() from ~2KB to ~0.5KB for a performance hit of about * 30%. * * Uncomment to enable the smaller implementation of SHA256. */ //#define MBEDTLS_SHA256_SMALLER /** * \def MBEDTLS_SSL_AEAD_RANDOM_IV * * Generate a random IV rather than using the record sequence number as a * nonce for ciphersuites using and AEAD algorithm (GCM or CCM). * * Using the sequence number is generally recommended. * * Uncomment this macro to always use random IVs with AEAD ciphersuites. */ //#define MBEDTLS_SSL_AEAD_RANDOM_IV /** * \def MBEDTLS_SSL_ALL_ALERT_MESSAGES * * Enable sending of alert messages in case of encountered errors as per RFC. * If you choose not to send the alert messages, mbed TLS can still communicate * with other servers, only debugging of failures is harder. * * The advantage of not sending alert messages, is that no information is given * about reasons for failures thus preventing adversaries of gaining intel. * * Enable sending of all alert messages */ #define MBEDTLS_SSL_ALL_ALERT_MESSAGES /** * \def MBEDTLS_SSL_DEBUG_ALL * * Enable the debug messages in SSL module for all issues. * Debug messages have been disabled in some places to prevent timing * attacks due to (unbalanced) debugging function calls. * * If you need all error reporting you should enable this during debugging, * but remove this for production servers that should log as well. * * Uncomment this macro to report all debug messages on errors introducing * a timing side-channel. * */ //#define MBEDTLS_SSL_DEBUG_ALL /** \def MBEDTLS_SSL_ENCRYPT_THEN_MAC * * Enable support for Encrypt-then-MAC, RFC 7366. * * This allows peers that both support it to use a more robust protection for * ciphersuites using CBC, providing deep resistance against timing attacks * on the padding or underlying cipher. * * This only affects CBC ciphersuites, and is useless if none is defined. * * Requires: MBEDTLS_SSL_PROTO_TLS1 or * MBEDTLS_SSL_PROTO_TLS1_1 or * MBEDTLS_SSL_PROTO_TLS1_2 * * Comment this macro to disable support for Encrypt-then-MAC */ #define MBEDTLS_SSL_ENCRYPT_THEN_MAC /** \def MBEDTLS_SSL_EXTENDED_MASTER_SECRET * * Enable support for Extended Master Secret, aka Session Hash * (draft-ietf-tls-session-hash-02). * * This was introduced as "the proper fix" to the Triple Handshake familiy of * attacks, but it is recommended to always use it (even if you disable * renegotiation), since it actually fixes a more fundamental issue in the * original SSL/TLS design, and has implications beyond Triple Handshake. * * Requires: MBEDTLS_SSL_PROTO_TLS1 or * MBEDTLS_SSL_PROTO_TLS1_1 or * MBEDTLS_SSL_PROTO_TLS1_2 * * Comment this macro to disable support for Extended Master Secret. */ #define MBEDTLS_SSL_EXTENDED_MASTER_SECRET /** * \def MBEDTLS_SSL_FALLBACK_SCSV * * Enable support for FALLBACK_SCSV (draft-ietf-tls-downgrade-scsv-00). * * For servers, it is recommended to always enable this, unless you support * only one version of TLS, or know for sure that none of your clients * implements a fallback strategy. * * For clients, you only need this if you're using a fallback strategy, which * is not recommended in the first place, unless you absolutely need it to * interoperate with buggy (version-intolerant) servers. * * Comment this macro to disable support for FALLBACK_SCSV */ #define MBEDTLS_SSL_FALLBACK_SCSV /** * \def MBEDTLS_SSL_HW_RECORD_ACCEL * * Enable hooking functions in SSL module for hardware acceleration of * individual records. * * Uncomment this macro to enable hooking functions. */ //#define MBEDTLS_SSL_HW_RECORD_ACCEL /** * \def MBEDTLS_SSL_CBC_RECORD_SPLITTING * * Enable 1/n-1 record splitting for CBC mode in SSLv3 and TLS 1.0. * * This is a countermeasure to the BEAST attack, which also minimizes the risk * of interoperability issues compared to sending 0-length records. * * Comment this macro to disable 1/n-1 record splitting. */ #define MBEDTLS_SSL_CBC_RECORD_SPLITTING /** * \def MBEDTLS_SSL_RENEGOTIATION * * Disable support for TLS renegotiation. * * The two main uses of renegotiation are (1) refresh keys on long-lived * connections and (2) client authentication after the initial handshake. * If you don't need renegotiation, it's probably better to disable it, since * it has been associated with security issues in the past and is easy to * misuse/misunderstand. * * Comment this to disable support for renegotiation. */ #define MBEDTLS_SSL_RENEGOTIATION /** * \def MBEDTLS_SSL_SRV_SUPPORT_SSLV2_CLIENT_HELLO * * Enable support for receiving and parsing SSLv2 Client Hello messages for the * SSL Server module (MBEDTLS_SSL_SRV_C). * * Uncomment this macro to enable support for SSLv2 Client Hello messages. */ //#define MBEDTLS_SSL_SRV_SUPPORT_SSLV2_CLIENT_HELLO /** * \def MBEDTLS_SSL_SRV_RESPECT_CLIENT_PREFERENCE * * Pick the ciphersuite according to the client's preferences rather than ours * in the SSL Server module (MBEDTLS_SSL_SRV_C). * * Uncomment this macro to respect client's ciphersuite order */ //#define MBEDTLS_SSL_SRV_RESPECT_CLIENT_PREFERENCE /** * \def MBEDTLS_SSL_MAX_FRAGMENT_LENGTH * * Enable support for RFC 6066 max_fragment_length extension in SSL. * * Comment this macro to disable support for the max_fragment_length extension */ #define MBEDTLS_SSL_MAX_FRAGMENT_LENGTH /** * \def MBEDTLS_SSL_PROTO_SSL3 * * Enable support for SSL 3.0. * * Requires: MBEDTLS_MD5_C * MBEDTLS_SHA1_C * * Comment this macro to disable support for SSL 3.0 */ #define MBEDTLS_SSL_PROTO_SSL3 /** * \def MBEDTLS_SSL_PROTO_TLS1 * * Enable support for TLS 1.0. * * Requires: MBEDTLS_MD5_C * MBEDTLS_SHA1_C * * Comment this macro to disable support for TLS 1.0 */ #define MBEDTLS_SSL_PROTO_TLS1 /** * \def MBEDTLS_SSL_PROTO_TLS1_1 * * Enable support for TLS 1.1 (and DTLS 1.0 if DTLS is enabled). * * Requires: MBEDTLS_MD5_C * MBEDTLS_SHA1_C * * Comment this macro to disable support for TLS 1.1 / DTLS 1.0 */ #define MBEDTLS_SSL_PROTO_TLS1_1 /** * \def MBEDTLS_SSL_PROTO_TLS1_2 * * Enable support for TLS 1.2 (and DTLS 1.2 if DTLS is enabled). * * Requires: MBEDTLS_SHA1_C or MBEDTLS_SHA256_C or MBEDTLS_SHA512_C * (Depends on ciphersuites) * * Comment this macro to disable support for TLS 1.2 / DTLS 1.2 */ #define MBEDTLS_SSL_PROTO_TLS1_2 /** * \def MBEDTLS_SSL_PROTO_DTLS * * Enable support for DTLS (all available versions). * * Enable this and MBEDTLS_SSL_PROTO_TLS1_1 to enable DTLS 1.0, * and/or this and MBEDTLS_SSL_PROTO_TLS1_2 to enable DTLS 1.2. * * Requires: MBEDTLS_SSL_PROTO_TLS1_1 * or MBEDTLS_SSL_PROTO_TLS1_2 * * Comment this macro to disable support for DTLS */ #define MBEDTLS_SSL_PROTO_DTLS /** * \def MBEDTLS_SSL_ALPN * * Enable support for RFC 7301 Application Layer Protocol Negotiation. * * Comment this macro to disable support for ALPN. */ #define MBEDTLS_SSL_ALPN /** * \def MBEDTLS_SSL_DTLS_ANTI_REPLAY * * Enable support for the anti-replay mechanism in DTLS. * * Requires: MBEDTLS_SSL_TLS_C * MBEDTLS_SSL_PROTO_DTLS * * \warning Disabling this is often a security risk! * See mbedtls_ssl_conf_dtls_anti_replay() for details. * * Comment this to disable anti-replay in DTLS. */ #define MBEDTLS_SSL_DTLS_ANTI_REPLAY /** * \def MBEDTLS_SSL_DTLS_HELLO_VERIFY * * Enable support for HelloVerifyRequest on DTLS servers. * * This feature is highly recommended to prevent DTLS servers being used as * amplifiers in DoS attacks against other hosts. It should always be enabled * unless you know for sure amplification cannot be a problem in the * environment in which your server operates. * * \warning Disabling this can ba a security risk! (see above) * * Requires: MBEDTLS_SSL_PROTO_DTLS * * Comment this to disable support for HelloVerifyRequest. */ #define MBEDTLS_SSL_DTLS_HELLO_VERIFY /** * \def MBEDTLS_SSL_DTLS_CLIENT_PORT_REUSE * * Enable server-side support for clients that reconnect from the same port. * * Some clients unexpectedly close the connection and try to reconnect using the * same source port. This needs special support from the server to handle the * new connection securely, as described in section 4.2.8 of RFC 6347. This * flag enables that support. * * Requires: MBEDTLS_SSL_DTLS_HELLO_VERIFY * * Comment this to disable support for clients reusing the source port. */ #define MBEDTLS_SSL_DTLS_CLIENT_PORT_REUSE /** * \def MBEDTLS_SSL_DTLS_BADMAC_LIMIT * * Enable support for a limit of records with bad MAC. * * See mbedtls_ssl_conf_dtls_badmac_limit(). * * Requires: MBEDTLS_SSL_PROTO_DTLS */ #define MBEDTLS_SSL_DTLS_BADMAC_LIMIT /** * \def MBEDTLS_SSL_SESSION_TICKETS * * Enable support for RFC 5077 session tickets in SSL. * Client-side, provides full support for session tickets (maintainance of a * session store remains the responsibility of the application, though). * Server-side, you also need to provide callbacks for writing and parsing * tickets, including authenticated encryption and key management. Example * callbacks are provided by MBEDTLS_SSL_TICKET_C. * * Comment this macro to disable support for SSL session tickets */ #define MBEDTLS_SSL_SESSION_TICKETS /** * \def MBEDTLS_SSL_EXPORT_KEYS * * Enable support for exporting key block and master secret. * This is required for certain users of TLS, e.g. EAP-TLS. * * Comment this macro to disable support for key export */ #define MBEDTLS_SSL_EXPORT_KEYS /** * \def MBEDTLS_SSL_SERVER_NAME_INDICATION * * Enable support for RFC 6066 server name indication (SNI) in SSL. * * Requires: MBEDTLS_X509_CRT_PARSE_C * * Comment this macro to disable support for server name indication in SSL */ #define MBEDTLS_SSL_SERVER_NAME_INDICATION /** * \def MBEDTLS_SSL_TRUNCATED_HMAC * * Enable support for RFC 6066 truncated HMAC in SSL. * * Comment this macro to disable support for truncated HMAC in SSL */ #define MBEDTLS_SSL_TRUNCATED_HMAC /** * \def MBEDTLS_THREADING_ALT * * Provide your own alternate threading implementation. * * Requires: MBEDTLS_THREADING_C * * Uncomment this to allow your own alternate threading implementation. */ //#define MBEDTLS_THREADING_ALT /** * \def MBEDTLS_THREADING_PTHREAD * * Enable the pthread wrapper layer for the threading layer. * * Requires: MBEDTLS_THREADING_C * * Uncomment this to enable pthread mutexes. */ //#define MBEDTLS_THREADING_PTHREAD /** * \def MBEDTLS_VERSION_FEATURES * * Allow run-time checking of compile-time enabled features. Thus allowing users * to check at run-time if the library is for instance compiled with threading * support via mbedtls_version_check_feature(). * * Requires: MBEDTLS_VERSION_C * * Comment this to disable run-time checking and save ROM space */ #define MBEDTLS_VERSION_FEATURES /** * \def MBEDTLS_X509_ALLOW_EXTENSIONS_NON_V3 * * If set, the X509 parser will not break-off when parsing an X509 certificate * and encountering an extension in a v1 or v2 certificate. * * Uncomment to prevent an error. */ //#define MBEDTLS_X509_ALLOW_EXTENSIONS_NON_V3 /** * \def MBEDTLS_X509_ALLOW_UNSUPPORTED_CRITICAL_EXTENSION * * If set, the X509 parser will not break-off when parsing an X509 certificate * and encountering an unknown critical extension. * * \warning Depending on your PKI use, enabling this can be a security risk! * * Uncomment to prevent an error. */ //#define MBEDTLS_X509_ALLOW_UNSUPPORTED_CRITICAL_EXTENSION /** * \def MBEDTLS_X509_CHECK_KEY_USAGE * * Enable verification of the keyUsage extension (CA and leaf certificates). * * Disabling this avoids problems with mis-issued and/or misused * (intermediate) CA and leaf certificates. * * \warning Depending on your PKI use, disabling this can be a security risk! * * Comment to skip keyUsage checking for both CA and leaf certificates. */ #define MBEDTLS_X509_CHECK_KEY_USAGE /** * \def MBEDTLS_X509_CHECK_EXTENDED_KEY_USAGE * * Enable verification of the extendedKeyUsage extension (leaf certificates). * * Disabling this avoids problems with mis-issued and/or misused certificates. * * \warning Depending on your PKI use, disabling this can be a security risk! * * Comment to skip extendedKeyUsage checking for certificates. */ #define MBEDTLS_X509_CHECK_EXTENDED_KEY_USAGE /** * \def MBEDTLS_X509_RSASSA_PSS_SUPPORT * * Enable parsing and verification of X.509 certificates, CRLs and CSRS * signed with RSASSA-PSS (aka PKCS#1 v2.1). * * Comment this macro to disallow using RSASSA-PSS in certificates. */ #define MBEDTLS_X509_RSASSA_PSS_SUPPORT /** * \def MBEDTLS_ZLIB_SUPPORT * * If set, the SSL/TLS module uses ZLIB to support compression and * decompression of packet data. * * \warning TLS-level compression MAY REDUCE SECURITY! See for example the * CRIME attack. Before enabling this option, you should examine with care if * CRIME or similar exploits may be a applicable to your use case. * * \note Currently compression can't be used with DTLS. * * Used in: library/ssl_tls.c * library/ssl_cli.c * library/ssl_srv.c * * This feature requires zlib library and headers to be present. * * Uncomment to enable use of ZLIB */ //#define MBEDTLS_ZLIB_SUPPORT /* \} name SECTION: mbed TLS feature support */ /** * \name SECTION: mbed TLS modules * * This section enables or disables entire modules in mbed TLS * \{ */ /** * \def MBEDTLS_AESNI_C * * Enable AES-NI support on x86-64. * * Module: library/aesni.c * Caller: library/aes.c * * Requires: MBEDTLS_HAVE_ASM * * This modules adds support for the AES-NI instructions on x86-64 */ #define MBEDTLS_AESNI_C /** * \def MBEDTLS_AES_C * * Enable the AES block cipher. * * Module: library/aes.c * Caller: library/ssl_tls.c * library/pem.c * library/ctr_drbg.c * * This module enables the following ciphersuites (if other requisites are * enabled as well): * MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA * MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA * MBEDTLS_TLS_ECDH_RSA_WITH_AES_128_CBC_SHA * MBEDTLS_TLS_ECDH_RSA_WITH_AES_256_CBC_SHA * MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256 * MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384 * MBEDTLS_TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256 * MBEDTLS_TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384 * MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256 * MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384 * MBEDTLS_TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256 * MBEDTLS_TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 * MBEDTLS_TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 * MBEDTLS_TLS_DHE_RSA_WITH_AES_256_GCM_SHA384 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384 * MBEDTLS_TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384 * MBEDTLS_TLS_DHE_RSA_WITH_AES_256_CBC_SHA256 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA * MBEDTLS_TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA * MBEDTLS_TLS_DHE_RSA_WITH_AES_256_CBC_SHA * MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 * MBEDTLS_TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 * MBEDTLS_TLS_DHE_RSA_WITH_AES_128_GCM_SHA256 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256 * MBEDTLS_TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 * MBEDTLS_TLS_DHE_RSA_WITH_AES_128_CBC_SHA256 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA * MBEDTLS_TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA * MBEDTLS_TLS_DHE_RSA_WITH_AES_128_CBC_SHA * MBEDTLS_TLS_DHE_PSK_WITH_AES_256_GCM_SHA384 * MBEDTLS_TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA384 * MBEDTLS_TLS_DHE_PSK_WITH_AES_256_CBC_SHA384 * MBEDTLS_TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA * MBEDTLS_TLS_DHE_PSK_WITH_AES_256_CBC_SHA * MBEDTLS_TLS_DHE_PSK_WITH_AES_128_GCM_SHA256 * MBEDTLS_TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256 * MBEDTLS_TLS_DHE_PSK_WITH_AES_128_CBC_SHA256 * MBEDTLS_TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA * MBEDTLS_TLS_DHE_PSK_WITH_AES_128_CBC_SHA * MBEDTLS_TLS_RSA_WITH_AES_256_GCM_SHA384 * MBEDTLS_TLS_RSA_WITH_AES_256_CBC_SHA256 * MBEDTLS_TLS_RSA_WITH_AES_256_CBC_SHA * MBEDTLS_TLS_RSA_WITH_AES_128_GCM_SHA256 * MBEDTLS_TLS_RSA_WITH_AES_128_CBC_SHA256 * MBEDTLS_TLS_RSA_WITH_AES_128_CBC_SHA * MBEDTLS_TLS_RSA_PSK_WITH_AES_256_GCM_SHA384 * MBEDTLS_TLS_RSA_PSK_WITH_AES_256_CBC_SHA384 * MBEDTLS_TLS_RSA_PSK_WITH_AES_256_CBC_SHA * MBEDTLS_TLS_RSA_PSK_WITH_AES_128_GCM_SHA256 * MBEDTLS_TLS_RSA_PSK_WITH_AES_128_CBC_SHA256 * MBEDTLS_TLS_RSA_PSK_WITH_AES_128_CBC_SHA * MBEDTLS_TLS_PSK_WITH_AES_256_GCM_SHA384 * MBEDTLS_TLS_PSK_WITH_AES_256_CBC_SHA384 * MBEDTLS_TLS_PSK_WITH_AES_256_CBC_SHA * MBEDTLS_TLS_PSK_WITH_AES_128_GCM_SHA256 * MBEDTLS_TLS_PSK_WITH_AES_128_CBC_SHA256 * MBEDTLS_TLS_PSK_WITH_AES_128_CBC_SHA * * PEM_PARSE uses AES for decrypting encrypted keys. */ #define MBEDTLS_AES_C /** * \def MBEDTLS_ARC4_C * * Enable the ARCFOUR stream cipher. * * Module: library/arc4.c * Caller: library/ssl_tls.c * * This module enables the following ciphersuites (if other requisites are * enabled as well): * MBEDTLS_TLS_ECDH_ECDSA_WITH_RC4_128_SHA * MBEDTLS_TLS_ECDH_RSA_WITH_RC4_128_SHA * MBEDTLS_TLS_ECDHE_ECDSA_WITH_RC4_128_SHA * MBEDTLS_TLS_ECDHE_RSA_WITH_RC4_128_SHA * MBEDTLS_TLS_ECDHE_PSK_WITH_RC4_128_SHA * MBEDTLS_TLS_DHE_PSK_WITH_RC4_128_SHA * MBEDTLS_TLS_RSA_WITH_RC4_128_SHA * MBEDTLS_TLS_RSA_WITH_RC4_128_MD5 * MBEDTLS_TLS_RSA_PSK_WITH_RC4_128_SHA * MBEDTLS_TLS_PSK_WITH_RC4_128_SHA */ #define MBEDTLS_ARC4_C /** * \def MBEDTLS_ASN1_PARSE_C * * Enable the generic ASN1 parser. * * Module: library/asn1.c * Caller: library/x509.c * library/dhm.c * library/pkcs12.c * library/pkcs5.c * library/pkparse.c */ #define MBEDTLS_ASN1_PARSE_C /** * \def MBEDTLS_ASN1_WRITE_C * * Enable the generic ASN1 writer. * * Module: library/asn1write.c * Caller: library/ecdsa.c * library/pkwrite.c * library/x509_create.c * library/x509write_crt.c * library/mbedtls_x509write_csr.c */ #define MBEDTLS_ASN1_WRITE_C /** * \def MBEDTLS_BASE64_C * * Enable the Base64 module. * * Module: library/base64.c * Caller: library/pem.c * * This module is required for PEM support (required by X.509). */ #define MBEDTLS_BASE64_C /** * \def MBEDTLS_BIGNUM_C * * Enable the multi-precision integer library. * * Module: library/bignum.c * Caller: library/dhm.c * library/ecp.c * library/ecdsa.c * library/rsa.c * library/ssl_tls.c * * This module is required for RSA, DHM and ECC (ECDH, ECDSA) support. */ #define MBEDTLS_BIGNUM_C /** * \def MBEDTLS_BLOWFISH_C * * Enable the Blowfish block cipher. * * Module: library/blowfish.c */ #define MBEDTLS_BLOWFISH_C /** * \def MBEDTLS_CAMELLIA_C * * Enable the Camellia block cipher. * * Module: library/camellia.c * Caller: library/ssl_tls.c * * This module enables the following ciphersuites (if other requisites are * enabled as well): * MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_128_CBC_SHA256 * MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_256_CBC_SHA384 * MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_128_CBC_SHA256 * MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_256_CBC_SHA384 * MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_128_GCM_SHA256 * MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_256_GCM_SHA384 * MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_128_GCM_SHA256 * MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_256_GCM_SHA384 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_GCM_SHA384 * MBEDTLS_TLS_ECDHE_RSA_WITH_CAMELLIA_256_GCM_SHA384 * MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_256_GCM_SHA384 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384 * MBEDTLS_TLS_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384 * MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256 * MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA * MBEDTLS_TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_GCM_SHA256 * MBEDTLS_TLS_ECDHE_RSA_WITH_CAMELLIA_128_GCM_SHA256 * MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_128_GCM_SHA256 * MBEDTLS_TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_CBC_SHA256 * MBEDTLS_TLS_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256 * MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256 * MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA * MBEDTLS_TLS_DHE_PSK_WITH_CAMELLIA_256_GCM_SHA384 * MBEDTLS_TLS_ECDHE_PSK_WITH_CAMELLIA_256_CBC_SHA384 * MBEDTLS_TLS_DHE_PSK_WITH_CAMELLIA_256_CBC_SHA384 * MBEDTLS_TLS_DHE_PSK_WITH_CAMELLIA_128_GCM_SHA256 * MBEDTLS_TLS_DHE_PSK_WITH_CAMELLIA_128_CBC_SHA256 * MBEDTLS_TLS_ECDHE_PSK_WITH_CAMELLIA_128_CBC_SHA256 * MBEDTLS_TLS_RSA_WITH_CAMELLIA_256_GCM_SHA384 * MBEDTLS_TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256 * MBEDTLS_TLS_RSA_WITH_CAMELLIA_256_CBC_SHA * MBEDTLS_TLS_RSA_WITH_CAMELLIA_128_GCM_SHA256 * MBEDTLS_TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256 * MBEDTLS_TLS_RSA_WITH_CAMELLIA_128_CBC_SHA * MBEDTLS_TLS_RSA_PSK_WITH_CAMELLIA_256_GCM_SHA384 * MBEDTLS_TLS_RSA_PSK_WITH_CAMELLIA_256_CBC_SHA384 * MBEDTLS_TLS_RSA_PSK_WITH_CAMELLIA_128_GCM_SHA256 * MBEDTLS_TLS_RSA_PSK_WITH_CAMELLIA_128_CBC_SHA256 * MBEDTLS_TLS_PSK_WITH_CAMELLIA_256_GCM_SHA384 * MBEDTLS_TLS_PSK_WITH_CAMELLIA_256_CBC_SHA384 * MBEDTLS_TLS_PSK_WITH_CAMELLIA_128_GCM_SHA256 * MBEDTLS_TLS_PSK_WITH_CAMELLIA_128_CBC_SHA256 */ #define MBEDTLS_CAMELLIA_C /** * \def MBEDTLS_CCM_C * * Enable the Counter with CBC-MAC (CCM) mode for 128-bit block cipher. * * Module: library/ccm.c * * Requires: MBEDTLS_AES_C or MBEDTLS_CAMELLIA_C * * This module enables the AES-CCM ciphersuites, if other requisites are * enabled as well. */ #define MBEDTLS_CCM_C /** * \def MBEDTLS_CERTS_C * * Enable the test certificates. * * Module: library/certs.c * Caller: * * This module is used for testing (ssl_client/server). */ #define MBEDTLS_CERTS_C /** * \def MBEDTLS_CIPHER_C * * Enable the generic cipher layer. * * Module: library/cipher.c * Caller: library/ssl_tls.c * * Uncomment to enable generic cipher wrappers. */ #define MBEDTLS_CIPHER_C /** * \def MBEDTLS_CTR_DRBG_C * * Enable the CTR_DRBG AES-256-based random generator. * * Module: library/ctr_drbg.c * Caller: * * Requires: MBEDTLS_AES_C * * This module provides the CTR_DRBG AES-256 random number generator. */ #define MBEDTLS_CTR_DRBG_C /** * \def MBEDTLS_DEBUG_C * * Enable the debug functions. * * Module: library/debug.c * Caller: library/ssl_cli.c * library/ssl_srv.c * library/ssl_tls.c * * This module provides debugging functions. */ #define MBEDTLS_DEBUG_C /** * \def MBEDTLS_DES_C * * Enable the DES block cipher. * * Module: library/des.c * Caller: library/pem.c * library/ssl_tls.c * * This module enables the following ciphersuites (if other requisites are * enabled as well): * MBEDTLS_TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA * MBEDTLS_TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA * MBEDTLS_TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA * MBEDTLS_TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA * MBEDTLS_TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA * MBEDTLS_TLS_ECDHE_PSK_WITH_3DES_EDE_CBC_SHA * MBEDTLS_TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA * MBEDTLS_TLS_RSA_WITH_3DES_EDE_CBC_SHA * MBEDTLS_TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA * MBEDTLS_TLS_PSK_WITH_3DES_EDE_CBC_SHA * * PEM_PARSE uses DES/3DES for decrypting encrypted keys. */ #define MBEDTLS_DES_C /** * \def MBEDTLS_DHM_C * * Enable the Diffie-Hellman-Merkle module. * * Module: library/dhm.c * Caller: library/ssl_cli.c * library/ssl_srv.c * * This module is used by the following key exchanges: * DHE-RSA, DHE-PSK */ #define MBEDTLS_DHM_C /** * \def MBEDTLS_ECDH_C * * Enable the elliptic curve Diffie-Hellman library. * * Module: library/ecdh.c * Caller: library/ssl_cli.c * library/ssl_srv.c * * This module is used by the following key exchanges: * ECDHE-ECDSA, ECDHE-RSA, DHE-PSK * * Requires: MBEDTLS_ECP_C */ #define MBEDTLS_ECDH_C /** * \def MBEDTLS_ECDSA_C * * Enable the elliptic curve DSA library. * * Module: library/ecdsa.c * Caller: * * This module is used by the following key exchanges: * ECDHE-ECDSA * * Requires: MBEDTLS_ECP_C, MBEDTLS_ASN1_WRITE_C, MBEDTLS_ASN1_PARSE_C */ #define MBEDTLS_ECDSA_C /** * \def MBEDTLS_ECJPAKE_C * * Enable the elliptic curve J-PAKE library. * * \warning This is currently experimental. EC J-PAKE support is based on the * Thread v1.0.0 specification; incompatible changes to the specification * might still happen. For this reason, this is disabled by default. * * Module: library/ecjpake.c * Caller: * * This module is used by the following key exchanges: * ECJPAKE * * Requires: MBEDTLS_ECP_C, MBEDTLS_MD_C */ //#define MBEDTLS_ECJPAKE_C /** * \def MBEDTLS_ECP_C * * Enable the elliptic curve over GF(p) library. * * Module: library/ecp.c * Caller: library/ecdh.c * library/ecdsa.c * library/ecjpake.c * * Requires: MBEDTLS_BIGNUM_C and at least one MBEDTLS_ECP_DP_XXX_ENABLED */ #define MBEDTLS_ECP_C /** * \def MBEDTLS_ENTROPY_C * * Enable the platform-specific entropy code. * * Module: library/entropy.c * Caller: * * Requires: MBEDTLS_SHA512_C or MBEDTLS_SHA256_C * * This module provides a generic entropy pool */ #define MBEDTLS_ENTROPY_C /** * \def MBEDTLS_ERROR_C * * Enable error code to error string conversion. * * Module: library/error.c * Caller: * * This module enables mbedtls_strerror(). */ #define MBEDTLS_ERROR_C /** * \def MBEDTLS_GCM_C * * Enable the Galois/Counter Mode (GCM) for AES. * * Module: library/gcm.c * * Requires: MBEDTLS_AES_C or MBEDTLS_CAMELLIA_C * * This module enables the AES-GCM and CAMELLIA-GCM ciphersuites, if other * requisites are enabled as well. */ #define MBEDTLS_GCM_C /** * \def MBEDTLS_HAVEGE_C * * Enable the HAVEGE random generator. * * Warning: the HAVEGE random generator is not suitable for virtualized * environments * * Warning: the HAVEGE random generator is dependent on timing and specific * processor traits. It is therefore not advised to use HAVEGE as * your applications primary random generator or primary entropy pool * input. As a secondary input to your entropy pool, it IS able add * the (limited) extra entropy it provides. * * Module: library/havege.c * Caller: * * Requires: MBEDTLS_TIMING_C * * Uncomment to enable the HAVEGE random generator. */ //#define MBEDTLS_HAVEGE_C /** * \def MBEDTLS_HMAC_DRBG_C * * Enable the HMAC_DRBG random generator. * * Module: library/hmac_drbg.c * Caller: * * Requires: MBEDTLS_MD_C * * Uncomment to enable the HMAC_DRBG random number geerator. */ #define MBEDTLS_HMAC_DRBG_C /** * \def MBEDTLS_MD_C * * Enable the generic message digest layer. * * Module: library/mbedtls_md.c * Caller: * * Uncomment to enable generic message digest wrappers. */ #define MBEDTLS_MD_C /** * \def MBEDTLS_MD2_C * * Enable the MD2 hash algorithm. * * Module: library/mbedtls_md2.c * Caller: * * Uncomment to enable support for (rare) MD2-signed X.509 certs. */ //#define MBEDTLS_MD2_C /** * \def MBEDTLS_MD4_C * * Enable the MD4 hash algorithm. * * Module: library/mbedtls_md4.c * Caller: * * Uncomment to enable support for (rare) MD4-signed X.509 certs. */ //#define MBEDTLS_MD4_C /** * \def MBEDTLS_MD5_C * * Enable the MD5 hash algorithm. * * Module: library/mbedtls_md5.c * Caller: library/mbedtls_md.c * library/pem.c * library/ssl_tls.c * * This module is required for SSL/TLS and X.509. * PEM_PARSE uses MD5 for decrypting encrypted keys. */ #define MBEDTLS_MD5_C /** * \def MBEDTLS_MEMORY_BUFFER_ALLOC_C * * Enable the buffer allocator implementation that makes use of a (stack) * based buffer to 'allocate' dynamic memory. (replaces calloc() and free() * calls) * * Module: library/memory_buffer_alloc.c * * Requires: MBEDTLS_PLATFORM_C * MBEDTLS_PLATFORM_MEMORY (to use it within mbed TLS) * * Enable this module to enable the buffer memory allocator. */ //#define MBEDTLS_MEMORY_BUFFER_ALLOC_C /** * \def MBEDTLS_NET_C * * Enable the TCP/IP networking routines. * * Module: library/net.c * * This module provides TCP/IP networking routines. */ #define MBEDTLS_NET_C /** * \def MBEDTLS_OID_C * * Enable the OID database. * * Module: library/oid.c * Caller: library/asn1write.c * library/pkcs5.c * library/pkparse.c * library/pkwrite.c * library/rsa.c * library/x509.c * library/x509_create.c * library/mbedtls_x509_crl.c * library/mbedtls_x509_crt.c * library/mbedtls_x509_csr.c * library/x509write_crt.c * library/mbedtls_x509write_csr.c * * This modules translates between OIDs and internal values. */ #define MBEDTLS_OID_C /** * \def MBEDTLS_PADLOCK_C * * Enable VIA Padlock support on x86. * * Module: library/padlock.c * Caller: library/aes.c * * Requires: MBEDTLS_HAVE_ASM * * This modules adds support for the VIA PadLock on x86. */ #define MBEDTLS_PADLOCK_C /** * \def MBEDTLS_PEM_PARSE_C * * Enable PEM decoding / parsing. * * Module: library/pem.c * Caller: library/dhm.c * library/pkparse.c * library/mbedtls_x509_crl.c * library/mbedtls_x509_crt.c * library/mbedtls_x509_csr.c * * Requires: MBEDTLS_BASE64_C * * This modules adds support for decoding / parsing PEM files. */ #define MBEDTLS_PEM_PARSE_C /** * \def MBEDTLS_PEM_WRITE_C * * Enable PEM encoding / writing. * * Module: library/pem.c * Caller: library/pkwrite.c * library/x509write_crt.c * library/mbedtls_x509write_csr.c * * Requires: MBEDTLS_BASE64_C * * This modules adds support for encoding / writing PEM files. */ #define MBEDTLS_PEM_WRITE_C /** * \def MBEDTLS_PK_C * * Enable the generic public (asymetric) key layer. * * Module: library/pk.c * Caller: library/ssl_tls.c * library/ssl_cli.c * library/ssl_srv.c * * Requires: MBEDTLS_RSA_C or MBEDTLS_ECP_C * * Uncomment to enable generic public key wrappers. */ #define MBEDTLS_PK_C /** * \def MBEDTLS_PK_PARSE_C * * Enable the generic public (asymetric) key parser. * * Module: library/pkparse.c * Caller: library/mbedtls_x509_crt.c * library/mbedtls_x509_csr.c * * Requires: MBEDTLS_PK_C * * Uncomment to enable generic public key parse functions. */ #define MBEDTLS_PK_PARSE_C /** * \def MBEDTLS_PK_WRITE_C * * Enable the generic public (asymetric) key writer. * * Module: library/pkwrite.c * Caller: library/x509write.c * * Requires: MBEDTLS_PK_C * * Uncomment to enable generic public key write functions. */ #define MBEDTLS_PK_WRITE_C /** * \def MBEDTLS_PKCS5_C * * Enable PKCS#5 functions. * * Module: library/pkcs5.c * * Requires: MBEDTLS_MD_C * * This module adds support for the PKCS#5 functions. */ #define MBEDTLS_PKCS5_C /** * \def MBEDTLS_PKCS11_C * * Enable wrapper for PKCS#11 smartcard support. * * Module: library/pkcs11.c * Caller: library/pk.c * * Requires: MBEDTLS_PK_C * * This module enables SSL/TLS PKCS #11 smartcard support. * Requires the presence of the PKCS#11 helper library (libpkcs11-helper) */ //#define MBEDTLS_PKCS11_C /** * \def MBEDTLS_PKCS12_C * * Enable PKCS#12 PBE functions. * Adds algorithms for parsing PKCS#8 encrypted private keys * * Module: library/pkcs12.c * Caller: library/pkparse.c * * Requires: MBEDTLS_ASN1_PARSE_C, MBEDTLS_CIPHER_C, MBEDTLS_MD_C * Can use: MBEDTLS_ARC4_C * * This module enables PKCS#12 functions. */ #define MBEDTLS_PKCS12_C /** * \def MBEDTLS_PLATFORM_C * * Enable the platform abstraction layer that allows you to re-assign * functions like calloc(), free(), snprintf(), printf(), fprintf(), exit(). * * Enabling MBEDTLS_PLATFORM_C enables to use of MBEDTLS_PLATFORM_XXX_ALT * or MBEDTLS_PLATFORM_XXX_MACRO directives, allowing the functions mentioned * above to be specified at runtime or compile time respectively. * * \note This abstraction layer must be enabled on Windows (including MSYS2) * as other module rely on it for a fixed snprintf implementation. * * Module: library/platform.c * Caller: Most other .c files * * This module enables abstraction of common (libc) functions. */ #define MBEDTLS_PLATFORM_C /** * \def MBEDTLS_RIPEMD160_C * * Enable the RIPEMD-160 hash algorithm. * * Module: library/mbedtls_ripemd160.c * Caller: library/mbedtls_md.c * */ #define MBEDTLS_RIPEMD160_C /** * \def MBEDTLS_RSA_C * * Enable the RSA public-key cryptosystem. * * Module: library/rsa.c * Caller: library/ssl_cli.c * library/ssl_srv.c * library/ssl_tls.c * library/x509.c * * This module is used by the following key exchanges: * RSA, DHE-RSA, ECDHE-RSA, RSA-PSK * * Requires: MBEDTLS_BIGNUM_C, MBEDTLS_OID_C */ #define MBEDTLS_RSA_C /** * \def MBEDTLS_SHA1_C * * Enable the SHA1 cryptographic hash algorithm. * * Module: library/mbedtls_sha1.c * Caller: library/mbedtls_md.c * library/ssl_cli.c * library/ssl_srv.c * library/ssl_tls.c * library/x509write_crt.c * * This module is required for SSL/TLS and SHA1-signed certificates. */ #define MBEDTLS_SHA1_C /** * \def MBEDTLS_SHA256_C * * Enable the SHA-224 and SHA-256 cryptographic hash algorithms. * * Module: library/mbedtls_sha256.c * Caller: library/entropy.c * library/mbedtls_md.c * library/ssl_cli.c * library/ssl_srv.c * library/ssl_tls.c * * This module adds support for SHA-224 and SHA-256. * This module is required for the SSL/TLS 1.2 PRF function. */ #define MBEDTLS_SHA256_C /** * \def MBEDTLS_SHA512_C * * Enable the SHA-384 and SHA-512 cryptographic hash algorithms. * * Module: library/mbedtls_sha512.c * Caller: library/entropy.c * library/mbedtls_md.c * library/ssl_cli.c * library/ssl_srv.c * * This module adds support for SHA-384 and SHA-512. */ #define MBEDTLS_SHA512_C /** * \def MBEDTLS_SSL_CACHE_C * * Enable simple SSL cache implementation. * * Module: library/ssl_cache.c * Caller: * * Requires: MBEDTLS_SSL_CACHE_C */ #define MBEDTLS_SSL_CACHE_C /** * \def MBEDTLS_SSL_COOKIE_C * * Enable basic implementation of DTLS cookies for hello verification. * * Module: library/ssl_cookie.c * Caller: */ #define MBEDTLS_SSL_COOKIE_C /** * \def MBEDTLS_SSL_TICKET_C * * Enable an implementation of TLS server-side callbacks for session tickets. * * Module: library/ssl_ticket.c * Caller: * * Requires: MBEDTLS_CIPHER_C */ #define MBEDTLS_SSL_TICKET_C /** * \def MBEDTLS_SSL_CLI_C * * Enable the SSL/TLS client code. * * Module: library/ssl_cli.c * Caller: * * Requires: MBEDTLS_SSL_TLS_C * * This module is required for SSL/TLS client support. */ #define MBEDTLS_SSL_CLI_C /** * \def MBEDTLS_SSL_SRV_C * * Enable the SSL/TLS server code. * * Module: library/ssl_srv.c * Caller: * * Requires: MBEDTLS_SSL_TLS_C * * This module is required for SSL/TLS server support. */ #define MBEDTLS_SSL_SRV_C /** * \def MBEDTLS_SSL_TLS_C * * Enable the generic SSL/TLS code. * * Module: library/ssl_tls.c * Caller: library/ssl_cli.c * library/ssl_srv.c * * Requires: MBEDTLS_CIPHER_C, MBEDTLS_MD_C * and at least one of the MBEDTLS_SSL_PROTO_XXX defines * * This module is required for SSL/TLS. */ #define MBEDTLS_SSL_TLS_C /** * \def MBEDTLS_THREADING_C * * Enable the threading abstraction layer. * By default mbed TLS assumes it is used in a non-threaded environment or that * contexts are not shared between threads. If you do intend to use contexts * between threads, you will need to enable this layer to prevent race * conditions. * * Module: library/threading.c * * This allows different threading implementations (self-implemented or * provided). * * You will have to enable either MBEDTLS_THREADING_ALT or * MBEDTLS_THREADING_PTHREAD. * * Enable this layer to allow use of mutexes within mbed TLS */ //#define MBEDTLS_THREADING_C /** * \def MBEDTLS_TIMING_C * * Enable the portable timing interface. * * Module: library/timing.c * Caller: library/havege.c * * This module is used by the HAVEGE random number generator. */ #define MBEDTLS_TIMING_C /** * \def MBEDTLS_VERSION_C * * Enable run-time version information. * * Module: library/version.c * * This module provides run-time version information. */ #define MBEDTLS_VERSION_C /** * \def MBEDTLS_X509_USE_C * * Enable X.509 core for using certificates. * * Module: library/x509.c * Caller: library/mbedtls_x509_crl.c * library/mbedtls_x509_crt.c * library/mbedtls_x509_csr.c * * Requires: MBEDTLS_ASN1_PARSE_C, MBEDTLS_BIGNUM_C, MBEDTLS_OID_C, * MBEDTLS_PK_PARSE_C * * This module is required for the X.509 parsing modules. */ #define MBEDTLS_X509_USE_C /** * \def MBEDTLS_X509_CRT_PARSE_C * * Enable X.509 certificate parsing. * * Module: library/mbedtls_x509_crt.c * Caller: library/ssl_cli.c * library/ssl_srv.c * library/ssl_tls.c * * Requires: MBEDTLS_X509_USE_C * * This module is required for X.509 certificate parsing. */ #define MBEDTLS_X509_CRT_PARSE_C /** * \def MBEDTLS_X509_CRL_PARSE_C * * Enable X.509 CRL parsing. * * Module: library/mbedtls_x509_crl.c * Caller: library/mbedtls_x509_crt.c * * Requires: MBEDTLS_X509_USE_C * * This module is required for X.509 CRL parsing. */ #define MBEDTLS_X509_CRL_PARSE_C /** * \def MBEDTLS_X509_CSR_PARSE_C * * Enable X.509 Certificate Signing Request (CSR) parsing. * * Module: library/mbedtls_x509_csr.c * Caller: library/x509_crt_write.c * * Requires: MBEDTLS_X509_USE_C * * This module is used for reading X.509 certificate request. */ #define MBEDTLS_X509_CSR_PARSE_C /** * \def MBEDTLS_X509_CREATE_C * * Enable X.509 core for creating certificates. * * Module: library/x509_create.c * * Requires: MBEDTLS_BIGNUM_C, MBEDTLS_OID_C, MBEDTLS_PK_WRITE_C * * This module is the basis for creating X.509 certificates and CSRs. */ #define MBEDTLS_X509_CREATE_C /** * \def MBEDTLS_X509_CRT_WRITE_C * * Enable creating X.509 certificates. * * Module: library/x509_crt_write.c * * Requires: MBEDTLS_X509_CREATE_C * * This module is required for X.509 certificate creation. */ #define MBEDTLS_X509_CRT_WRITE_C /** * \def MBEDTLS_X509_CSR_WRITE_C * * Enable creating X.509 Certificate Signing Requests (CSR). * * Module: library/x509_csr_write.c * * Requires: MBEDTLS_X509_CREATE_C * * This module is required for X.509 certificate request writing. */ #define MBEDTLS_X509_CSR_WRITE_C /** * \def MBEDTLS_XTEA_C * * Enable the XTEA block cipher. * * Module: library/xtea.c * Caller: */ #define MBEDTLS_XTEA_C /* \} name SECTION: mbed TLS modules */ /** * \name SECTION: Module configuration options * * This section allows for the setting of module specific sizes and * configuration options. The default values are already present in the * relevant header files and should suffice for the regular use cases. * * Our advice is to enable options and change their values here * only if you have a good reason and know the consequences. * * Please check the respective header file for documentation on these * parameters (to prevent duplicate documentation). * \{ */ /* MPI / BIGNUM options */ //#define MBEDTLS_MPI_WINDOW_SIZE 6 /**< Maximum windows size used. */ //#define MBEDTLS_MPI_MAX_SIZE 1024 /**< Maximum number of bytes for usable MPIs. */ /* CTR_DRBG options */ //#define MBEDTLS_CTR_DRBG_ENTROPY_LEN 48 /**< Amount of entropy used per seed by default (48 with SHA-512, 32 with SHA-256) */ //#define MBEDTLS_CTR_DRBG_RESEED_INTERVAL 10000 /**< Interval before reseed is performed by default */ //#define MBEDTLS_CTR_DRBG_MAX_INPUT 256 /**< Maximum number of additional input bytes */ //#define MBEDTLS_CTR_DRBG_MAX_REQUEST 1024 /**< Maximum number of requested bytes per call */ //#define MBEDTLS_CTR_DRBG_MAX_SEED_INPUT 384 /**< Maximum size of (re)seed buffer */ /* HMAC_DRBG options */ //#define MBEDTLS_HMAC_DRBG_RESEED_INTERVAL 10000 /**< Interval before reseed is performed by default */ //#define MBEDTLS_HMAC_DRBG_MAX_INPUT 256 /**< Maximum number of additional input bytes */ //#define MBEDTLS_HMAC_DRBG_MAX_REQUEST 1024 /**< Maximum number of requested bytes per call */ //#define MBEDTLS_HMAC_DRBG_MAX_SEED_INPUT 384 /**< Maximum size of (re)seed buffer */ /* ECP options */ //#define MBEDTLS_ECP_MAX_BITS 521 /**< Maximum bit size of groups */ //#define MBEDTLS_ECP_WINDOW_SIZE 6 /**< Maximum window size used */ //#define MBEDTLS_ECP_FIXED_POINT_OPTIM 1 /**< Enable fixed-point speed-up */ /* Entropy options */ //#define MBEDTLS_ENTROPY_MAX_SOURCES 20 /**< Maximum number of sources supported */ //#define MBEDTLS_ENTROPY_MAX_GATHER 128 /**< Maximum amount requested from entropy sources */ /* Memory buffer allocator options */ //#define MBEDTLS_MEMORY_ALIGN_MULTIPLE 4 /**< Align on multiples of this value */ /* Platform options */ //#define MBEDTLS_PLATFORM_STD_MEM_HDR /**< Header to include if MBEDTLS_PLATFORM_NO_STD_FUNCTIONS is defined. Don't define if no header is needed. */ //#define MBEDTLS_PLATFORM_STD_CALLOC calloc /**< Default allocator to use, can be undefined */ //#define MBEDTLS_PLATFORM_STD_FREE free /**< Default free to use, can be undefined */ //#define MBEDTLS_PLATFORM_STD_EXIT exit /**< Default exit to use, can be undefined */ //#define MBEDTLS_PLATFORM_STD_FPRINTF fprintf /**< Default fprintf to use, can be undefined */ //#define MBEDTLS_PLATFORM_STD_PRINTF printf /**< Default printf to use, can be undefined */ /* Note: your snprintf must correclty zero-terminate the buffer! */ //#define MBEDTLS_PLATFORM_STD_SNPRINTF snprintf /**< Default snprintf to use, can be undefined */ /* To Use Function Macros MBEDTLS_PLATFORM_C must be enabled */ /* MBEDTLS_PLATFORM_XXX_MACRO and MBEDTLS_PLATFORM_XXX_ALT cannot both be defined */ //#define MBEDTLS_PLATFORM_CALLOC_MACRO calloc /**< Default allocator macro to use, can be undefined */ //#define MBEDTLS_PLATFORM_FREE_MACRO free /**< Default free macro to use, can be undefined */ //#define MBEDTLS_PLATFORM_EXIT_MACRO exit /**< Default exit macro to use, can be undefined */ //#define MBEDTLS_PLATFORM_FPRINTF_MACRO fprintf /**< Default fprintf macro to use, can be undefined */ //#define MBEDTLS_PLATFORM_PRINTF_MACRO printf /**< Default printf macro to use, can be undefined */ /* Note: your snprintf must correclty zero-terminate the buffer! */ //#define MBEDTLS_PLATFORM_SNPRINTF_MACRO snprintf /**< Default snprintf macro to use, can be undefined */ /* SSL Cache options */ //#define MBEDTLS_SSL_CACHE_DEFAULT_TIMEOUT 86400 /**< 1 day */ //#define MBEDTLS_SSL_CACHE_DEFAULT_MAX_ENTRIES 50 /**< Maximum entries in cache */ /* SSL options */ //#define MBEDTLS_SSL_MAX_CONTENT_LEN 16384 /**< Maxium fragment length in bytes, determines the size of each of the two internal I/O buffers */ //#define MBEDTLS_SSL_DEFAULT_TICKET_LIFETIME 86400 /**< Lifetime of session tickets (if enabled) */ //#define MBEDTLS_PSK_MAX_LEN 32 /**< Max size of TLS pre-shared keys, in bytes (default 256 bits) */ //#define MBEDTLS_SSL_COOKIE_TIMEOUT 60 /**< Default expiration delay of DTLS cookies, in seconds if HAVE_TIME, or in number of cookies issued */ /** * Complete list of ciphersuites to use, in order of preference. * * \warning No dependency checking is done on that field! This option can only * be used to restrict the set of available ciphersuites. It is your * responsibility to make sure the needed modules are active. * * Use this to save a few hundred bytes of ROM (default ordering of all * available ciphersuites) and a few to a few hundred bytes of RAM. * * The value below is only an example, not the default. */ //#define MBEDTLS_SSL_CIPHERSUITES MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 /* X509 options */ //#define MBEDTLS_X509_MAX_INTERMEDIATE_CA 8 /**< Maximum number of intermediate CAs in a verification chain. */ /* \} name SECTION: Module configuration options */ #if defined(TARGET_LIKE_MBED) #include "mbedtls/target_config.h" #endif /* * Allow user to override any previous default. * * Use two macro names for that, as: * - with yotta the prefix YOTTA_CFG_ is forced * - without yotta is looks weird to have a YOTTA prefix. */ #if defined(YOTTA_CFG_MBEDTLS_USER_CONFIG_FILE) #include YOTTA_CFG_MBEDTLS_USER_CONFIG_FILE #elif defined(MBEDTLS_USER_CONFIG_FILE) #include MBEDTLS_USER_CONFIG_FILE #endif #include "check_config.h" #endif /* MBEDTLS_CONFIG_H */ modsecurity-v3.0.6/others/mbedtls/md5.c0000664000175000017500000002575514146026157021212 0ustar mhsvierulamhsvierula/* * RFC 1321 compliant MD5 implementation * * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); 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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * This file is part of mbed TLS (https://tls.mbed.org) */ /* * The MD5 algorithm was designed by Ron Rivest in 1991. * * http://www.ietf.org/rfc/rfc1321.txt */ #if !defined(MBEDTLS_CONFIG_FILE) #include "mbedtls/config.h" #else #include MBEDTLS_CONFIG_FILE #endif #if defined(MBEDTLS_MD5_C) #include "mbedtls/md5.h" #include #if defined(MBEDTLS_SELF_TEST) #if defined(MBEDTLS_PLATFORM_C) #include "mbedtls/platform.h" #else #include #define mbedtls_printf printf #endif /* MBEDTLS_PLATFORM_C */ #endif /* MBEDTLS_SELF_TEST */ #if !defined(MBEDTLS_MD5_ALT) /* Implementation that should never be optimized out by the compiler */ static void mbedtls_zeroize( void *v, size_t n ) { volatile unsigned char *p = v; while( n-- ) *p++ = 0; } /* * 32-bit integer manipulation macros (little endian) */ #ifndef GET_UINT32_LE #define GET_UINT32_LE(n,b,i) \ { \ (n) = ( (uint32_t) (b)[(i) ] ) \ | ( (uint32_t) (b)[(i) + 1] << 8 ) \ | ( (uint32_t) (b)[(i) + 2] << 16 ) \ | ( (uint32_t) (b)[(i) + 3] << 24 ); \ } #endif #ifndef PUT_UINT32_LE #define PUT_UINT32_LE(n,b,i) \ { \ (b)[(i) ] = (unsigned char) ( ( (n) ) & 0xFF ); \ (b)[(i) + 1] = (unsigned char) ( ( (n) >> 8 ) & 0xFF ); \ (b)[(i) + 2] = (unsigned char) ( ( (n) >> 16 ) & 0xFF ); \ (b)[(i) + 3] = (unsigned char) ( ( (n) >> 24 ) & 0xFF ); \ } #endif void mbedtls_md5_init( mbedtls_md5_context *ctx ) { memset( ctx, 0, sizeof( mbedtls_md5_context ) ); } void mbedtls_md5_free( mbedtls_md5_context *ctx ) { if( ctx == NULL ) return; mbedtls_zeroize( ctx, sizeof( mbedtls_md5_context ) ); } void mbedtls_md5_clone( mbedtls_md5_context *dst, const mbedtls_md5_context *src ) { *dst = *src; } /* * MD5 context setup */ void mbedtls_md5_starts( mbedtls_md5_context *ctx ) { ctx->total[0] = 0; ctx->total[1] = 0; ctx->state[0] = 0x67452301; ctx->state[1] = 0xEFCDAB89; ctx->state[2] = 0x98BADCFE; ctx->state[3] = 0x10325476; } #if !defined(MBEDTLS_MD5_PROCESS_ALT) void mbedtls_md5_process( mbedtls_md5_context *ctx, const unsigned char data[64] ) { uint32_t X[16], A, B, C, D; GET_UINT32_LE( X[ 0], data, 0 ); GET_UINT32_LE( X[ 1], data, 4 ); GET_UINT32_LE( X[ 2], data, 8 ); GET_UINT32_LE( X[ 3], data, 12 ); GET_UINT32_LE( X[ 4], data, 16 ); GET_UINT32_LE( X[ 5], data, 20 ); GET_UINT32_LE( X[ 6], data, 24 ); GET_UINT32_LE( X[ 7], data, 28 ); GET_UINT32_LE( X[ 8], data, 32 ); GET_UINT32_LE( X[ 9], data, 36 ); GET_UINT32_LE( X[10], data, 40 ); GET_UINT32_LE( X[11], data, 44 ); GET_UINT32_LE( X[12], data, 48 ); GET_UINT32_LE( X[13], data, 52 ); GET_UINT32_LE( X[14], data, 56 ); GET_UINT32_LE( X[15], data, 60 ); #define S(x,n) ((x << n) | ((x & 0xFFFFFFFF) >> (32 - n))) #define P(a,b,c,d,k,s,t) \ { \ a += F(b,c,d) + X[k] + t; a = S(a,s) + b; \ } A = ctx->state[0]; B = ctx->state[1]; C = ctx->state[2]; D = ctx->state[3]; #define F(x,y,z) (z ^ (x & (y ^ z))) P( A, B, C, D, 0, 7, 0xD76AA478 ); P( D, A, B, C, 1, 12, 0xE8C7B756 ); P( C, D, A, B, 2, 17, 0x242070DB ); P( B, C, D, A, 3, 22, 0xC1BDCEEE ); P( A, B, C, D, 4, 7, 0xF57C0FAF ); P( D, A, B, C, 5, 12, 0x4787C62A ); P( C, D, A, B, 6, 17, 0xA8304613 ); P( B, C, D, A, 7, 22, 0xFD469501 ); P( A, B, C, D, 8, 7, 0x698098D8 ); P( D, A, B, C, 9, 12, 0x8B44F7AF ); P( C, D, A, B, 10, 17, 0xFFFF5BB1 ); P( B, C, D, A, 11, 22, 0x895CD7BE ); P( A, B, C, D, 12, 7, 0x6B901122 ); P( D, A, B, C, 13, 12, 0xFD987193 ); P( C, D, A, B, 14, 17, 0xA679438E ); P( B, C, D, A, 15, 22, 0x49B40821 ); #undef F #define F(x,y,z) (y ^ (z & (x ^ y))) P( A, B, C, D, 1, 5, 0xF61E2562 ); P( D, A, B, C, 6, 9, 0xC040B340 ); P( C, D, A, B, 11, 14, 0x265E5A51 ); P( B, C, D, A, 0, 20, 0xE9B6C7AA ); P( A, B, C, D, 5, 5, 0xD62F105D ); P( D, A, B, C, 10, 9, 0x02441453 ); P( C, D, A, B, 15, 14, 0xD8A1E681 ); P( B, C, D, A, 4, 20, 0xE7D3FBC8 ); P( A, B, C, D, 9, 5, 0x21E1CDE6 ); P( D, A, B, C, 14, 9, 0xC33707D6 ); P( C, D, A, B, 3, 14, 0xF4D50D87 ); P( B, C, D, A, 8, 20, 0x455A14ED ); P( A, B, C, D, 13, 5, 0xA9E3E905 ); P( D, A, B, C, 2, 9, 0xFCEFA3F8 ); P( C, D, A, B, 7, 14, 0x676F02D9 ); P( B, C, D, A, 12, 20, 0x8D2A4C8A ); #undef F #define F(x,y,z) (x ^ y ^ z) P( A, B, C, D, 5, 4, 0xFFFA3942 ); P( D, A, B, C, 8, 11, 0x8771F681 ); P( C, D, A, B, 11, 16, 0x6D9D6122 ); P( B, C, D, A, 14, 23, 0xFDE5380C ); P( A, B, C, D, 1, 4, 0xA4BEEA44 ); P( D, A, B, C, 4, 11, 0x4BDECFA9 ); P( C, D, A, B, 7, 16, 0xF6BB4B60 ); P( B, C, D, A, 10, 23, 0xBEBFBC70 ); P( A, B, C, D, 13, 4, 0x289B7EC6 ); P( D, A, B, C, 0, 11, 0xEAA127FA ); P( C, D, A, B, 3, 16, 0xD4EF3085 ); P( B, C, D, A, 6, 23, 0x04881D05 ); P( A, B, C, D, 9, 4, 0xD9D4D039 ); P( D, A, B, C, 12, 11, 0xE6DB99E5 ); P( C, D, A, B, 15, 16, 0x1FA27CF8 ); P( B, C, D, A, 2, 23, 0xC4AC5665 ); #undef F #define F(x,y,z) (y ^ (x | ~z)) P( A, B, C, D, 0, 6, 0xF4292244 ); P( D, A, B, C, 7, 10, 0x432AFF97 ); P( C, D, A, B, 14, 15, 0xAB9423A7 ); P( B, C, D, A, 5, 21, 0xFC93A039 ); P( A, B, C, D, 12, 6, 0x655B59C3 ); P( D, A, B, C, 3, 10, 0x8F0CCC92 ); P( C, D, A, B, 10, 15, 0xFFEFF47D ); P( B, C, D, A, 1, 21, 0x85845DD1 ); P( A, B, C, D, 8, 6, 0x6FA87E4F ); P( D, A, B, C, 15, 10, 0xFE2CE6E0 ); P( C, D, A, B, 6, 15, 0xA3014314 ); P( B, C, D, A, 13, 21, 0x4E0811A1 ); P( A, B, C, D, 4, 6, 0xF7537E82 ); P( D, A, B, C, 11, 10, 0xBD3AF235 ); P( C, D, A, B, 2, 15, 0x2AD7D2BB ); P( B, C, D, A, 9, 21, 0xEB86D391 ); #undef F ctx->state[0] += A; ctx->state[1] += B; ctx->state[2] += C; ctx->state[3] += D; } #endif /* !MBEDTLS_MD5_PROCESS_ALT */ /* * MD5 process buffer */ void mbedtls_md5_update( mbedtls_md5_context *ctx, const unsigned char *input, size_t ilen ) { size_t fill; uint32_t left; if( ilen == 0 ) return; left = ctx->total[0] & 0x3F; fill = 64 - left; ctx->total[0] += (uint32_t) ilen; ctx->total[0] &= 0xFFFFFFFF; if( ctx->total[0] < (uint32_t) ilen ) ctx->total[1]++; if( left && ilen >= fill ) { memcpy( (void *) (ctx->buffer + left), input, fill ); mbedtls_md5_process( ctx, ctx->buffer ); input += fill; ilen -= fill; left = 0; } while( ilen >= 64 ) { mbedtls_md5_process( ctx, input ); input += 64; ilen -= 64; } if( ilen > 0 ) { memcpy( (void *) (ctx->buffer + left), input, ilen ); } } static const unsigned char md5_padding[64] = { 0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; /* * MD5 final digest */ void mbedtls_md5_finish( mbedtls_md5_context *ctx, unsigned char output[16] ) { uint32_t last, padn; uint32_t high, low; unsigned char msglen[8]; high = ( ctx->total[0] >> 29 ) | ( ctx->total[1] << 3 ); low = ( ctx->total[0] << 3 ); PUT_UINT32_LE( low, msglen, 0 ); PUT_UINT32_LE( high, msglen, 4 ); last = ctx->total[0] & 0x3F; padn = ( last < 56 ) ? ( 56 - last ) : ( 120 - last ); mbedtls_md5_update( ctx, md5_padding, padn ); mbedtls_md5_update( ctx, msglen, 8 ); PUT_UINT32_LE( ctx->state[0], output, 0 ); PUT_UINT32_LE( ctx->state[1], output, 4 ); PUT_UINT32_LE( ctx->state[2], output, 8 ); PUT_UINT32_LE( ctx->state[3], output, 12 ); } #endif /* !MBEDTLS_MD5_ALT */ /* * output = MD5( input buffer ) */ void mbedtls_md5( const unsigned char *input, size_t ilen, unsigned char output[16] ) { mbedtls_md5_context ctx; mbedtls_md5_init( &ctx ); mbedtls_md5_starts( &ctx ); mbedtls_md5_update( &ctx, input, ilen ); mbedtls_md5_finish( &ctx, output ); mbedtls_md5_free( &ctx ); } #if defined(MBEDTLS_SELF_TEST) /* * RFC 1321 test vectors */ static const unsigned char md5_test_buf[7][81] = { { "" }, { "a" }, { "abc" }, { "message digest" }, { "abcdefghijklmnopqrstuvwxyz" }, { "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789" }, { "12345678901234567890123456789012345678901234567890123456789012" \ "345678901234567890" } }; static const int md5_test_buflen[7] = { 0, 1, 3, 14, 26, 62, 80 }; static const unsigned char md5_test_sum[7][16] = { { 0xD4, 0x1D, 0x8C, 0xD9, 0x8F, 0x00, 0xB2, 0x04, 0xE9, 0x80, 0x09, 0x98, 0xEC, 0xF8, 0x42, 0x7E }, { 0x0C, 0xC1, 0x75, 0xB9, 0xC0, 0xF1, 0xB6, 0xA8, 0x31, 0xC3, 0x99, 0xE2, 0x69, 0x77, 0x26, 0x61 }, { 0x90, 0x01, 0x50, 0x98, 0x3C, 0xD2, 0x4F, 0xB0, 0xD6, 0x96, 0x3F, 0x7D, 0x28, 0xE1, 0x7F, 0x72 }, { 0xF9, 0x6B, 0x69, 0x7D, 0x7C, 0xB7, 0x93, 0x8D, 0x52, 0x5A, 0x2F, 0x31, 0xAA, 0xF1, 0x61, 0xD0 }, { 0xC3, 0xFC, 0xD3, 0xD7, 0x61, 0x92, 0xE4, 0x00, 0x7D, 0xFB, 0x49, 0x6C, 0xCA, 0x67, 0xE1, 0x3B }, { 0xD1, 0x74, 0xAB, 0x98, 0xD2, 0x77, 0xD9, 0xF5, 0xA5, 0x61, 0x1C, 0x2C, 0x9F, 0x41, 0x9D, 0x9F }, { 0x57, 0xED, 0xF4, 0xA2, 0x2B, 0xE3, 0xC9, 0x55, 0xAC, 0x49, 0xDA, 0x2E, 0x21, 0x07, 0xB6, 0x7A } }; /* * Checkup routine */ int mbedtls_md5_self_test( int verbose ) { int i; unsigned char md5sum[16]; for( i = 0; i < 7; i++ ) { if( verbose != 0 ) mbedtls_printf( " MD5 test #%d: ", i + 1 ); mbedtls_md5( md5_test_buf[i], md5_test_buflen[i], md5sum ); if( memcmp( md5sum, md5_test_sum[i], 16 ) != 0 ) { if( verbose != 0 ) mbedtls_printf( "failed\n" ); return( 1 ); } if( verbose != 0 ) mbedtls_printf( "passed\n" ); } if( verbose != 0 ) mbedtls_printf( "\n" ); return( 0 ); } #endif /* MBEDTLS_SELF_TEST */ #endif /* MBEDTLS_MD5_C */modsecurity-v3.0.6/others/mbedtls/base64.h0000664000175000017500000000607514146026157021610 0ustar mhsvierulamhsvierula/** * \file base64.h * * \brief RFC 1521 base64 encoding/decoding * * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); 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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * This file is part of mbed TLS (https://tls.mbed.org) */ #ifndef MBEDTLS_BASE64_H #define MBEDTLS_BASE64_H #include #define MBEDTLS_ERR_BASE64_BUFFER_TOO_SMALL -0x002A /**< Output buffer too small. */ #define MBEDTLS_ERR_BASE64_INVALID_CHARACTER -0x002C /**< Invalid character in input. */ #ifdef __cplusplus extern "C" { #endif /** * \brief Encode a buffer into base64 format * * \param dst destination buffer * \param dlen size of the destination buffer * \param olen number of bytes written * \param src source buffer * \param slen amount of data to be encoded * * \return 0 if successful, or MBEDTLS_ERR_BASE64_BUFFER_TOO_SMALL. * *olen is always updated to reflect the amount * of data that has (or would have) been written. * If that length cannot be represented, then no data is * written to the buffer and *olen is set to the maximum * length representable as a size_t. * * \note Call this function with dlen = 0 to obtain the * required buffer size in *olen */ int mbedtls_base64_encode( unsigned char *dst, size_t dlen, size_t *olen, const unsigned char *src, size_t slen ); /** * \brief Decode a base64-formatted buffer * * \param dst destination buffer (can be NULL for checking size) * \param dlen size of the destination buffer * \param olen number of bytes written * \param src source buffer * \param slen amount of data to be decoded * * \return 0 if successful, MBEDTLS_ERR_BASE64_BUFFER_TOO_SMALL, or * MBEDTLS_ERR_BASE64_INVALID_CHARACTER if the input data is * not correct. *olen is always updated to reflect the amount * of data that has (or would have) been written. * * \note Call this function with *dst = NULL or dlen = 0 to obtain * the required buffer size in *olen */ int mbedtls_base64_decode( unsigned char *dst, size_t dlen, size_t *olen, const unsigned char *src, size_t slen ); /** * \brief Checkup routine * * \return 0 if successful, or 1 if the test failed */ int mbedtls_base64_self_test( int verbose ); #ifdef __cplusplus } #endif #endif /* base64.h */modsecurity-v3.0.6/others/mbedtls/sha1.h0000664000175000017500000000637514146026157021363 0ustar mhsvierulamhsvierula/** * \file sha1.h * * \brief SHA-1 cryptographic hash function * * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); 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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * This file is part of mbed TLS (https://tls.mbed.org) */ #ifndef MBEDTLS_SHA1_H #define MBEDTLS_SHA1_H #if !defined(MBEDTLS_CONFIG_FILE) #include "config.h" #else #include MBEDTLS_CONFIG_FILE #endif #include #include #if !defined(MBEDTLS_SHA1_ALT) // Regular implementation // #ifdef __cplusplus extern "C" { #endif /** * \brief SHA-1 context structure */ typedef struct { uint32_t total[2]; /*!< number of bytes processed */ uint32_t state[5]; /*!< intermediate digest state */ unsigned char buffer[64]; /*!< data block being processed */ } mbedtls_sha1_context; /** * \brief Initialize SHA-1 context * * \param ctx SHA-1 context to be initialized */ void mbedtls_sha1_init( mbedtls_sha1_context *ctx ); /** * \brief Clear SHA-1 context * * \param ctx SHA-1 context to be cleared */ void mbedtls_sha1_free( mbedtls_sha1_context *ctx ); /** * \brief Clone (the state of) a SHA-1 context * * \param dst The destination context * \param src The context to be cloned */ void mbedtls_sha1_clone( mbedtls_sha1_context *dst, const mbedtls_sha1_context *src ); /** * \brief SHA-1 context setup * * \param ctx context to be initialized */ void mbedtls_sha1_starts( mbedtls_sha1_context *ctx ); /** * \brief SHA-1 process buffer * * \param ctx SHA-1 context * \param input buffer holding the data * \param ilen length of the input data */ void mbedtls_sha1_update( mbedtls_sha1_context *ctx, const unsigned char *input, size_t ilen ); /** * \brief SHA-1 final digest * * \param ctx SHA-1 context * \param output SHA-1 checksum result */ void mbedtls_sha1_finish( mbedtls_sha1_context *ctx, unsigned char output[20] ); /* Internal use */ void mbedtls_sha1_process( mbedtls_sha1_context *ctx, const unsigned char data[64] ); #ifdef __cplusplus } #endif #else /* MBEDTLS_SHA1_ALT */ #include "sha1_alt.h" #endif /* MBEDTLS_SHA1_ALT */ #ifdef __cplusplus extern "C" { #endif /** * \brief Output = SHA-1( input buffer ) * * \param input buffer holding the data * \param ilen length of the input data * \param output SHA-1 checksum result */ void mbedtls_sha1( const unsigned char *input, size_t ilen, unsigned char output[20] ); /** * \brief Checkup routine * * \return 0 if successful, or 1 if the test failed */ int mbedtls_sha1_self_test( int verbose ); #ifdef __cplusplus } #endif #endif /* mbedtls_sha1.h */modsecurity-v3.0.6/others/mbedtls/md5.h0000664000175000017500000000632214146026157021204 0ustar mhsvierulamhsvierula/** * \file md5.h * * \brief MD5 message digest algorithm (hash function) * * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); 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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * This file is part of mbed TLS (https://tls.mbed.org) */ #ifndef MBEDTLS_MD5_H #define MBEDTLS_MD5_H #if !defined(MBEDTLS_CONFIG_FILE) #include "config.h" #else #include MBEDTLS_CONFIG_FILE #endif #include #include #if !defined(MBEDTLS_MD5_ALT) // Regular implementation // #ifdef __cplusplus extern "C" { #endif /** * \brief MD5 context structure */ typedef struct { uint32_t total[2]; /*!< number of bytes processed */ uint32_t state[4]; /*!< intermediate digest state */ unsigned char buffer[64]; /*!< data block being processed */ } mbedtls_md5_context; /** * \brief Initialize MD5 context * * \param ctx MD5 context to be initialized */ void mbedtls_md5_init( mbedtls_md5_context *ctx ); /** * \brief Clear MD5 context * * \param ctx MD5 context to be cleared */ void mbedtls_md5_free( mbedtls_md5_context *ctx ); /** * \brief Clone (the state of) an MD5 context * * \param dst The destination context * \param src The context to be cloned */ void mbedtls_md5_clone( mbedtls_md5_context *dst, const mbedtls_md5_context *src ); /** * \brief MD5 context setup * * \param ctx context to be initialized */ void mbedtls_md5_starts( mbedtls_md5_context *ctx ); /** * \brief MD5 process buffer * * \param ctx MD5 context * \param input buffer holding the data * \param ilen length of the input data */ void mbedtls_md5_update( mbedtls_md5_context *ctx, const unsigned char *input, size_t ilen ); /** * \brief MD5 final digest * * \param ctx MD5 context * \param output MD5 checksum result */ void mbedtls_md5_finish( mbedtls_md5_context *ctx, unsigned char output[16] ); /* Internal use */ void mbedtls_md5_process( mbedtls_md5_context *ctx, const unsigned char data[64] ); #ifdef __cplusplus } #endif #else /* MBEDTLS_MD5_ALT */ #include "md5_alt.h" #endif /* MBEDTLS_MD5_ALT */ #ifdef __cplusplus extern "C" { #endif /** * \brief Output = MD5( input buffer ) * * \param input buffer holding the data * \param ilen length of the input data * \param output MD5 checksum result */ void mbedtls_md5( const unsigned char *input, size_t ilen, unsigned char output[16] ); /** * \brief Checkup routine * * \return 0 if successful, or 1 if the test failed */ int mbedtls_md5_self_test( int verbose ); #ifdef __cplusplus } #endif #endif /* mbedtls_md5.h */modsecurity-v3.0.6/others/libinjection/0000775000175000017500000000000014146026313021354 5ustar mhsvierulamhsvierulamodsecurity-v3.0.6/others/libinjection/run-gcov-unittests.sh0000775000175000017500000000107214146026313025513 0ustar mhsvierulamhsvierula#!/bin/sh # # Code coverage for data only (not unit tests) # ./autogen.sh ./configure-gcov.sh make cd src make testdriver rm -f libinjection.info rm -rf lcov-html mkdir lcov-html lcov -b . --directory . --zerocounters libtool --mode=execute ./testdriver ../tests/test-*.txt lcov -b . --directory . --capture --output-file libinjection.info lcov -b . --directory . --remove libinjection.info '/usr/include*' -o libinjection.info lcov -b . --directory . --remove libinjection.info 'testdriver' -o libinjection.info genhtml --branch-coverage -o lcov-html libinjection.info modsecurity-v3.0.6/others/libinjection/data/0000775000175000017500000000000014146026313022265 5ustar mhsvierulamhsvierulamodsecurity-v3.0.6/others/libinjection/data/sqli-ibm.txt0000664000175000017500000000036014146026312024541 0ustar mhsvierulamhsvierula# various things for http://www-01.ibm.com/support/knowledgecenter/SSGU8G_11.50.0/com.ibm.sqls.doc/ids_sqs_1526.htm # UNION ALL SELECT FileToClob("/etc/passwd", "server")::html,0 UNION ALL SELECT FileToBlob("/etc/passwd", "server")::html,0 modsecurity-v3.0.6/others/libinjection/data/xss-mgentile-2013.txt0000664000175000017500000000051214146026313026026 0ustar mhsvierulamhsvierula# Mauro Gentile # https://www.owasp.org/images/7/7c/Gentile_OWASP_EU_Tour_2013.pdf