From e8d3cd9b26f0b4d660e424f2657f11bbc01eb171 Mon Sep 17 00:00:00 2001 From: Giovanni Date: Wed, 22 Jul 2020 09:28:42 +0200 Subject: refactoring sp_log_* (#340) Co-authored-by: Giovanni Dante Grazioli --- src/sp_execute.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/sp_execute.c') diff --git a/src/sp_execute.c b/src/sp_execute.c index 4eae874..73cc560 100644 --- a/src/sp_execute.c +++ b/src/sp_execute.c @@ -18,10 +18,10 @@ ZEND_COLD static inline void terminate_if_writable(const char *filename) { SP_TOKEN_READONLY_EXEC); } if (true == config_ro_exec->simulation) { - sp_log_msg("readonly_exec", SP_LOG_SIMULATION, + sp_log_simulation("readonly_exec", "Attempted execution of a writable file (%s).", filename); } else { - sp_log_msg("readonly_exec", SP_LOG_DROP, + sp_log_drop("readonly_exec", "Attempted execution of a writable file (%s).", filename); zend_bailout(); } @@ -79,14 +79,14 @@ is_in_eval_and_whitelisted(const zend_execute_data *execute_data) { SP_TOKEN_EVAL_WHITELIST); } if (config_eval->simulation) { - sp_log_msg( - "Eval_whitelist", SP_LOG_SIMULATION, + sp_log_simulation( + "Eval_whitelist", "The function '%s' isn't in the eval whitelist, logging its call.", ZSTR_VAL(current_function)); return; } else { - sp_log_msg( - "Eval_whitelist", SP_LOG_DROP, + sp_log_drop( + "Eval_whitelist", "The function '%s' isn't in the eval whitelist, dropping its call.", ZSTR_VAL(current_function)); } -- cgit v1.3