mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-08-13 13:26:01 +03:00
Make clean and maintainer-clean removes unused files, also add # when rule chain doenst match
This commit is contained in:
parent
d4d3497539
commit
b19f32bb3e
28
Makefile.am
28
Makefile.am
@ -1,6 +1,34 @@
|
||||
ACLOCAL_AMFLAGS = -I build
|
||||
SUBDIRS = @TOPLEVEL_SUBDIRS@ tests
|
||||
|
||||
CLEANFILES =
|
||||
MAINTAINERCLEANFILES =
|
||||
|
||||
CLEANFILES += tests/regression/server_root/conf/*.t_*.conf \
|
||||
tests/regression/server_root/logs/*.log
|
||||
|
||||
MAINTAINERCLEANFILES += $(CLEANFILES) \
|
||||
Makefile.in \
|
||||
aclocal.m4 \
|
||||
alp2/Makefile.in \
|
||||
apache2/Makefile.in \
|
||||
build/config.guess \
|
||||
build/config.sub \
|
||||
build/depcomp \
|
||||
build/libtool.m4 \
|
||||
build/ltmain.sh \
|
||||
build/ltoptions.m4 \
|
||||
build/ltsugar.m4 \
|
||||
build/ltversion.m4 \
|
||||
build/lt~obsolete.m4 \
|
||||
build/missing \
|
||||
configure \
|
||||
ext/Makefile.in \
|
||||
mlogc/Makefile.in \
|
||||
modsecurity_config_auto.h.in~ \
|
||||
tests/Makefile.in \
|
||||
tools/Makefile.in
|
||||
|
||||
# Alias for "check"
|
||||
test: check
|
||||
|
||||
|
@ -1085,7 +1085,7 @@ void sec_audit_logger(modsec_rec *msr) {
|
||||
for(i = 0; i < msr->matched_rules->nelts; i++) {
|
||||
rule = ((msre_rule **)msr->matched_rules->elts)[i];
|
||||
if ((rule != NULL) && (rule->actionset != NULL) && rule->actionset->is_chained && (rule->chain_starter == NULL)) {
|
||||
text = apr_psprintf(msr->mp, "Chain Starter [Match]: %s\n", rule->unparsed);
|
||||
text = apr_psprintf(msr->mp, "%s\n", rule->unparsed);
|
||||
sec_auditlog_write(msr, text, strlen(text));
|
||||
do {
|
||||
if (rule->ruleset != NULL) {
|
||||
@ -1097,9 +1097,9 @@ void sec_audit_logger(modsec_rec *msr) {
|
||||
present = chained_is_matched(msr,next_rule);
|
||||
|
||||
if (present == 0) {
|
||||
text = apr_psprintf(msr->mp, "Chain node [No Match]: %s\n",next_rule->unparsed);
|
||||
text = apr_psprintf(msr->mp, "#%s\n",next_rule->unparsed);
|
||||
} else {
|
||||
text = apr_psprintf(msr->mp, "Chain node [Match]: %s\n",next_rule->unparsed);
|
||||
text = apr_psprintf(msr->mp, "%s\n",next_rule->unparsed);
|
||||
i++;
|
||||
}
|
||||
|
||||
@ -1112,7 +1112,7 @@ void sec_audit_logger(modsec_rec *msr) {
|
||||
sec_auditlog_write(msr, text, strlen(text));
|
||||
} else {
|
||||
if ((rule != NULL) && (rule->actionset != NULL) && !rule->actionset->is_chained && (rule->chain_starter == NULL)) {
|
||||
text = apr_psprintf(msr->mp, "Rule [Match]: %s\n\n", rule->unparsed);
|
||||
text = apr_psprintf(msr->mp, "%s\n\n", rule->unparsed);
|
||||
sec_auditlog_write(msr, text, strlen(text));
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user