mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2026-01-10 02:04:36 +03:00
Added ability to compile without API. See #198.
This commit is contained in:
2
CHANGES
2
CHANGES
@@ -1,6 +1,8 @@
|
|||||||
?? ???? ???? - 2.1.3-rc1
|
?? ???? ???? - 2.1.3-rc1
|
||||||
------------------------
|
------------------------
|
||||||
|
|
||||||
|
* Added ability to compile without an external API (-DNO_MODSEC_API).
|
||||||
|
|
||||||
|
|
||||||
27 July 2007 - 2.1.2
|
27 July 2007 - 2.1.2
|
||||||
--------------------
|
--------------------
|
||||||
|
|||||||
@@ -29,6 +29,7 @@ APACHECTL = apachectl
|
|||||||
|
|
||||||
INCLUDES = -I /usr/include/libxml2
|
INCLUDES = -I /usr/include/libxml2
|
||||||
DEFS = -DWITH_LIBXML2
|
DEFS = -DWITH_LIBXML2
|
||||||
|
#DEFS = -DWITH_LIBXML2 -DNO_MODSEC_API
|
||||||
#LIBS = -Lmy/lib/dir -lmylib
|
#LIBS = -Lmy/lib/dir -lmylib
|
||||||
|
|
||||||
CFLAGS = -O2 -g -Wuninitialized -Wall -Wmissing-prototypes -Wshadow -Wunused-variable -Wunused-value -Wchar-subscripts -Wsign-compare
|
CFLAGS = -O2 -g -Wuninitialized -Wall -Wmissing-prototypes -Wshadow -Wunused-variable -Wunused-value -Wchar-subscripts -Wsign-compare
|
||||||
|
|||||||
@@ -18,10 +18,12 @@
|
|||||||
#include <apr_optional.h>
|
#include <apr_optional.h>
|
||||||
|
|
||||||
|
|
||||||
|
#if (!defined(NO_MODSEC_API))
|
||||||
/* Optional functions. */
|
/* Optional functions. */
|
||||||
|
|
||||||
APR_DECLARE_OPTIONAL_FN(void, modsec_register_tfn, (const char *name, void *fn));
|
APR_DECLARE_OPTIONAL_FN(void, modsec_register_tfn, (const char *name, void *fn));
|
||||||
APR_DECLARE_OPTIONAL_FN(void, modsec_register_operator, (const char *name, void *fn_init, void *fn_exec));
|
APR_DECLARE_OPTIONAL_FN(void, modsec_register_operator, (const char *name, void *fn_init, void *fn_exec));
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/* Configuration functions. */
|
/* Configuration functions. */
|
||||||
|
|||||||
@@ -950,6 +950,7 @@ static void hook_insert_error_filter(request_rec *r) {
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if (!defined(NO_MODSEC_API))
|
||||||
/**
|
/**
|
||||||
* This function is exported for other Apache modules to
|
* This function is exported for other Apache modules to
|
||||||
* register new transformation functions.
|
* register new transformation functions.
|
||||||
@@ -969,6 +970,7 @@ static void modsec_register_operator(const char *name, void *fn_init, void *fn_e
|
|||||||
msre_engine_op_register(modsecurity->msre, name, fn_init, fn_exec);
|
msre_engine_op_register(modsecurity->msre, name, fn_init, fn_exec);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Registers module hooks with Apache.
|
* Registers module hooks with Apache.
|
||||||
@@ -993,9 +995,11 @@ static void register_hooks(apr_pool_t *mp) {
|
|||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#if (!defined(NO_MODSEC_API))
|
||||||
/* Export optional functions. */
|
/* Export optional functions. */
|
||||||
APR_REGISTER_OPTIONAL_FN(modsec_register_tfn);
|
APR_REGISTER_OPTIONAL_FN(modsec_register_tfn);
|
||||||
APR_REGISTER_OPTIONAL_FN(modsec_register_operator);
|
APR_REGISTER_OPTIONAL_FN(modsec_register_operator);
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Main hooks */
|
/* Main hooks */
|
||||||
ap_hook_pre_config(hook_pre_config, NULL, NULL, APR_HOOK_FIRST);
|
ap_hook_pre_config(hook_pre_config, NULL, NULL, APR_HOOK_FIRST);
|
||||||
|
|||||||
Reference in New Issue
Block a user