mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-09-30 11:44:32 +03:00
defined id_log() only once
This commit is contained in:
@@ -31,10 +31,9 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Returns the rule id if existing, otherwise the file name & line number
|
// 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;
|
char* id = rule->actionset->id;
|
||||||
if (id == NOT_SET_P || !id || !*id)
|
if (!id || !*id || id == NOT_SET_P) id = apr_psprintf(rule->ruleset->mp, "%s (%d)", rule->filename, rule->line_num);
|
||||||
id = apr_psprintf(rule->ruleset->mp, "%s (%d)", rule->filename, rule->line_num);
|
|
||||||
return id;
|
return id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -166,6 +166,7 @@ int ip_tree_from_uri(TreeRoot **rtree, char *uri,
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
char DSOLOCAL *get_username(apr_pool_t* mp);
|
char DSOLOCAL *get_username(apr_pool_t* mp);
|
||||||
|
const char* id_log(msre_rule* rule);
|
||||||
|
|
||||||
int read_line(char *buff, int size, FILE *fp);
|
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 ----------------- */
|
/* -- 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
|
* \brief Remove rule targets to be processed
|
||||||
*
|
*
|
||||||
|
@@ -313,7 +313,6 @@ AC_ARG_ENABLE(assertions,
|
|||||||
[
|
[
|
||||||
if test "${enableval}" = "yes"; then
|
if test "${enableval}" = "yes"; then
|
||||||
assertions='-UNDEBUG'
|
assertions='-UNDEBUG'
|
||||||
MODSEC_EXTRA_CFLAGS="$MODSEC_EXTRA_CFLAGS $assertions"
|
|
||||||
else
|
else
|
||||||
assertions='-DNDEBUG'
|
assertions='-DNDEBUG'
|
||||||
fi
|
fi
|
||||||
@@ -844,9 +843,9 @@ else
|
|||||||
EXTRA_CFLAGS="-O2 -g -Wall $strict_compile"
|
EXTRA_CFLAGS="-O2 -g -Wall $strict_compile"
|
||||||
fi
|
fi
|
||||||
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_WRAPPER=build/apxs-wrapper
|
||||||
APXS_EXTRA_CFLAGS=""
|
APXS_EXTRA_CFLAGS=""
|
||||||
|
Reference in New Issue
Block a user