mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-08-14 13:56:01 +03:00
Move version() to mod_security2
This commit is contained in:
parent
371df205d9
commit
f64b5544af
@ -68,6 +68,43 @@ typedef struct {
|
|||||||
|
|
||||||
/* -- Miscellaneous functions -- */
|
/* -- Miscellaneous functions -- */
|
||||||
|
|
||||||
|
/*
|
||||||
|
* \brief Print informations from used libraries
|
||||||
|
*
|
||||||
|
* \param mp Pointer to memory pool
|
||||||
|
*/
|
||||||
|
void version(apr_pool_t *mp) {
|
||||||
|
char *pcre_vrs = NULL;
|
||||||
|
|
||||||
|
ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, NULL,
|
||||||
|
"ModSecurity: APR compiled version=\"%s\"; "
|
||||||
|
"loaded version=\"%s\"", APR_VERSION_STRING, apr_version_string());
|
||||||
|
|
||||||
|
if (strstr(apr_version_string(),APR_VERSION_STRING) == NULL) {
|
||||||
|
ap_log_error(APLOG_MARK, APLOG_WARNING, 0, NULL, "ModSecurity: Loaded APR do not match with compiled!");
|
||||||
|
}
|
||||||
|
|
||||||
|
pcre_vrs = apr_psprintf(mp,"%d.%d", PCRE_MAJOR, PCRE_MINOR);
|
||||||
|
|
||||||
|
ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, NULL,
|
||||||
|
"ModSecurity: PCRE compiled version=\"%s\"; "
|
||||||
|
"loaded version=\"%s\"", pcre_vrs, pcre_version());
|
||||||
|
|
||||||
|
if (strstr(pcre_version(),pcre_vrs) == NULL) {
|
||||||
|
ap_log_error(APLOG_MARK, APLOG_WARNING, 0, NULL, "ModSecurity: Loaded PCRE do not match with compiled!");
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Lua version function was removed in current 5.1. Need to check in future versions if it's back */
|
||||||
|
#if defined(WITH_LUA)
|
||||||
|
ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, NULL,
|
||||||
|
"ModSecurity: LUA compiled version=\"%s\"",LUA_VERSION);
|
||||||
|
#endif /* WITH_LUA */
|
||||||
|
|
||||||
|
ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, NULL,
|
||||||
|
"ModSecurity: LIBXML compiled version=\"%s\"",LIBXML_DOTTED_VERSION);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Intercepts transaction, using the method specified
|
* Intercepts transaction, using the method specified
|
||||||
* in the structure itself. MUST return an HTTP status code,
|
* in the structure itself. MUST return an HTTP status code,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user