mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-08-14 05:45:59 +03:00
Add ability to compile without API support (-DNO_MODSEC_API). See #198.
This commit is contained in:
parent
f4389c9a55
commit
32905f9d46
2
CHANGES
2
CHANGES
@ -1,6 +1,8 @@
|
|||||||
?? ??? 2007 - 2.5.0-trunk
|
?? ??? 2007 - 2.5.0-trunk
|
||||||
-------------------------
|
-------------------------
|
||||||
|
|
||||||
|
* Added ability to compile without an external API (-DNO_MODSEC_API).
|
||||||
|
|
||||||
* Added "logdata" meta action to allow safe logging of raw transaction data.
|
* Added "logdata" meta action to allow safe logging of raw transaction data.
|
||||||
|
|
||||||
* Added TX_SEVERITY that keeps track of the highest severity
|
* Added TX_SEVERITY that keeps track of the highest severity
|
||||||
|
@ -30,7 +30,8 @@ APACHECTL = apachectl
|
|||||||
INCLUDES = -I /usr/include/libxml2
|
INCLUDES = -I /usr/include/libxml2
|
||||||
#DEFS = -DWITH_LIBXML2
|
#DEFS = -DWITH_LIBXML2
|
||||||
#DEFS = -DWITH_LIBXML2 -DDEBUG_CONF
|
#DEFS = -DWITH_LIBXML2 -DDEBUG_CONF
|
||||||
DEFS = -DWITH_LIBXML2 -DCACHE_DEBUG
|
#DEFS = -DWITH_LIBXML2 -DCACHE_DEBUG
|
||||||
|
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,6 +18,7 @@
|
|||||||
#include <apr_optional.h>
|
#include <apr_optional.h>
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef 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));
|
||||||
@ -27,6 +28,7 @@ APR_DECLARE_OPTIONAL_FN(void, modsec_register_variable,
|
|||||||
unsigned int argc_min, unsigned int argc_max,
|
unsigned int argc_min, unsigned int argc_max,
|
||||||
void *fn_validate, void *fn_generate,
|
void *fn_validate, void *fn_generate,
|
||||||
unsigned int is_cacheable, unsigned int availability));
|
unsigned int is_cacheable, unsigned int availability));
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/* Configuration functions. */
|
/* Configuration functions. */
|
||||||
|
@ -972,6 +972,7 @@ static void hook_insert_error_filter(request_rec *r) {
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef 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.
|
||||||
@ -1007,6 +1008,7 @@ static void modsec_register_variable(const char *name, unsigned int type,
|
|||||||
fprintf(stderr,"modsecurity is NULL\n");
|
fprintf(stderr,"modsecurity is NULL\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Registers module hooks with Apache.
|
* Registers module hooks with Apache.
|
||||||
@ -1031,10 +1033,12 @@ static void register_hooks(apr_pool_t *mp) {
|
|||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#ifdef 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);
|
||||||
APR_REGISTER_OPTIONAL_FN(modsec_register_variable);
|
APR_REGISTER_OPTIONAL_FN(modsec_register_variable);
|
||||||
|
#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);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user