mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-10-08 07:12:26 +03:00
{dis|en}able-collection-delete-problem-logging: Option to disable logging of collection delete problem in audit log when log level < 9 in audit log [Issue #576 - Marc Stern]
This commit is contained in:
committed by
Felipe Zimmerle
parent
53a8bb2e18
commit
d243818aff
3
CHANGES
3
CHANGES
@@ -1,6 +1,9 @@
|
|||||||
DD MMM YYYY - 2.9.2 - To be released
|
DD MMM YYYY - 2.9.2 - To be released
|
||||||
------------------------------------
|
------------------------------------
|
||||||
|
|
||||||
|
* {dis|en}able-collection-delete-problem-logging: Option to disable logging of
|
||||||
|
collection delete problem in audit log when log level < 9.
|
||||||
|
[Issue #576 - Marc Stern]
|
||||||
* Adds rule id in logs whenever a rule fail.
|
* Adds rule id in logs whenever a rule fail.
|
||||||
[Issue #1379, #391 - Marc Stern]
|
[Issue #1379, #391 - Marc Stern]
|
||||||
* {dis|en}able-server-logging: Option to disable logging of
|
* {dis|en}able-server-logging: Option to disable logging of
|
||||||
|
@@ -217,10 +217,13 @@ static apr_table_t *collection_retrieve_ex(apr_sdbm_t *existing_dbm, modsec_rec
|
|||||||
|
|
||||||
rc = apr_sdbm_delete(dbm, key);
|
rc = apr_sdbm_delete(dbm, key);
|
||||||
if (rc != APR_SUCCESS) {
|
if (rc != APR_SUCCESS) {
|
||||||
msr_log(msr, 1, "collection_retrieve_ex: Failed deleting collection (name \"%s\", "
|
#ifdef LOG_NO_COLL_DELET_PB
|
||||||
|
if (msr->txcfg->debuglog_level >= 9)
|
||||||
|
#endif
|
||||||
|
msr_log(msr, 1, "collection_retrieve_ex: Failed deleting collection (name \"%s\", "
|
||||||
"key \"%s\"): %s", log_escape(msr->mp, col_name),
|
"key \"%s\"): %s", log_escape(msr->mp, col_name),
|
||||||
log_escape_ex(msr->mp, col_key, col_key_len), get_apr_error(msr->mp, rc));
|
log_escape_ex(msr->mp, col_key, col_key_len), get_apr_error(msr->mp, rc));
|
||||||
msr->msc_sdbm_delete_error = 1;
|
msr->msc_sdbm_delete_error = 1;
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -678,10 +681,13 @@ int collections_remove_stale(modsec_rec *msr, const char *col_name) {
|
|||||||
if (expiry_time <= now) {
|
if (expiry_time <= now) {
|
||||||
rc = apr_sdbm_delete(dbm, key);
|
rc = apr_sdbm_delete(dbm, key);
|
||||||
if (rc != APR_SUCCESS) {
|
if (rc != APR_SUCCESS) {
|
||||||
msr_log(msr, 1, "collections_remove_stale: Failed deleting collection (name \"%s\", "
|
#ifdef LOG_NO_COLL_DELET_PB
|
||||||
|
if (msr->txcfg->debuglog_level >= 9)
|
||||||
|
#endif
|
||||||
|
msr_log(msr, 1, "collections_remove_stale: Failed deleting collection (name \"%s\", "
|
||||||
"key \"%s\"): %s", log_escape(msr->mp, col_name),
|
"key \"%s\"): %s", log_escape(msr->mp, col_name),
|
||||||
log_escape_ex(msr->mp, key.dptr, key.dsize - 1), get_apr_error(msr->mp, rc));
|
log_escape_ex(msr->mp, key.dptr, key.dsize - 1), get_apr_error(msr->mp, rc));
|
||||||
msr->msc_sdbm_delete_error = 1;
|
msr->msc_sdbm_delete_error = 1;
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
17
configure.ac
17
configure.ac
@@ -457,6 +457,21 @@ AC_ARG_ENABLE(server-logging,
|
|||||||
log_server=''
|
log_server=''
|
||||||
])
|
])
|
||||||
|
|
||||||
|
# Disable logging of problem when deleting collection
|
||||||
|
AC_ARG_ENABLE(collection-delete-problem-logging,
|
||||||
|
AS_HELP_STRING([--enable-collection-delete-problem-logging],
|
||||||
|
[Enable logging of collection delete problem in audit log when log level < 9. This is the default]),
|
||||||
|
[
|
||||||
|
if test "$enableval" != "no"; then
|
||||||
|
log_collection_delete_problem=
|
||||||
|
else
|
||||||
|
log_collection_delete_problem="-DLOG_NO_COLL_DELET_PB"
|
||||||
|
fi
|
||||||
|
],
|
||||||
|
[
|
||||||
|
log_collection_delete_problem=''
|
||||||
|
])
|
||||||
|
|
||||||
# Ignore configure errors
|
# Ignore configure errors
|
||||||
AC_ARG_ENABLE(errors,
|
AC_ARG_ENABLE(errors,
|
||||||
AS_HELP_STRING([--disable-errors],
|
AS_HELP_STRING([--disable-errors],
|
||||||
@@ -707,7 +722,7 @@ else
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
MODSEC_EXTRA_CFLAGS="$pcre_study $pcre_match_limit $pcre_match_limit_recursion $pcre_jit $request_early $htaccess_config $lua_cache $debug_conf $debug_cache $debug_acmp $debug_mem $perf_meas $modsec_api $cpu_type $unique_id $log_filename $log_server"
|
MODSEC_EXTRA_CFLAGS="$pcre_study $pcre_match_limit $pcre_match_limit_recursion $pcre_jit $request_early $htaccess_config $lua_cache $debug_conf $debug_cache $debug_acmp $debug_mem $perf_meas $modsec_api $cpu_type $unique_id $log_filename $log_server $log_collection_delete_problem"
|
||||||
|
|
||||||
APXS_WRAPPER=build/apxs-wrapper
|
APXS_WRAPPER=build/apxs-wrapper
|
||||||
APXS_EXTRA_CFLAGS=""
|
APXS_EXTRA_CFLAGS=""
|
||||||
|
Reference in New Issue
Block a user