mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-08-14 05:45:59 +03:00
defined id_log() only once
This commit is contained in:
parent
556835c6fe
commit
5122f89005
@ -31,10 +31,9 @@
|
||||
#endif
|
||||
|
||||
// Returns the rule id if existing, otherwise the file name & line number
|
||||
static const char* id_log(msre_rule* rule) {
|
||||
const char* id_log(msre_rule* rule) {
|
||||
char* id = rule->actionset->id;
|
||||
if (id == NOT_SET_P || !id || !*id)
|
||||
id = apr_psprintf(rule->ruleset->mp, "%s (%d)", rule->filename, rule->line_num);
|
||||
if (!id || !*id || id == NOT_SET_P) id = apr_psprintf(rule->ruleset->mp, "%s (%d)", rule->filename, rule->line_num);
|
||||
return id;
|
||||
}
|
||||
|
||||
|
@ -166,6 +166,7 @@ int ip_tree_from_uri(TreeRoot **rtree, char *uri,
|
||||
#endif
|
||||
|
||||
char DSOLOCAL *get_username(apr_pool_t* mp);
|
||||
const char* id_log(msre_rule* rule);
|
||||
|
||||
int read_line(char *buff, int size, FILE *fp);
|
||||
|
||||
|
@ -48,13 +48,6 @@ static apr_status_t msre_rule_process(msre_rule *rule, modsec_rec *msr);
|
||||
|
||||
/* -- Actions, variables, functions and operator functions ----------------- */
|
||||
|
||||
// Returns the rule id if existing, otherwise the file name & line number
|
||||
static const char* id_log(msre_rule* rule) {
|
||||
const char* id = rule->actionset->id;
|
||||
if (!id || !*id || id == NOT_SET_P) id = apr_psprintf(rule->ruleset->mp, "%s (%d)", rule->filename, rule->line_num);
|
||||
return id;
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Remove rule targets to be processed
|
||||
*
|
||||
|
@ -313,7 +313,6 @@ AC_ARG_ENABLE(assertions,
|
||||
[
|
||||
if test "${enableval}" = "yes"; then
|
||||
assertions='-UNDEBUG'
|
||||
MODSEC_EXTRA_CFLAGS="$MODSEC_EXTRA_CFLAGS $assertions"
|
||||
else
|
||||
assertions='-DNDEBUG'
|
||||
fi
|
||||
@ -844,9 +843,9 @@ else
|
||||
EXTRA_CFLAGS="-O2 -g -Wall $strict_compile"
|
||||
fi
|
||||
fi
|
||||
EXTRA_CFLAGS="$EXTRA_CFLAGS $assertions"
|
||||
EXTRA_CFLAGS="$EXTRA_CFLAGS"
|
||||
|
||||
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 $log_dechunk $log_stopwatch $log_handler $log_server_context $collection_global_lock $large_stream_input"
|
||||
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 $log_dechunk $log_stopwatch $log_handler $log_server_context $collection_global_lock $large_stream_input $assertions"
|
||||
|
||||
APXS_WRAPPER=build/apxs-wrapper
|
||||
APXS_EXTRA_CFLAGS=""
|
||||
|
Loading…
x
Reference in New Issue
Block a user