summaryrefslogtreecommitdiff
path: root/src/sp_execute.c
diff options
context:
space:
mode:
authorGiovanni2020-07-22 09:28:42 +0200
committerGitHub2020-07-22 09:28:42 +0200
commite8d3cd9b26f0b4d660e424f2657f11bbc01eb171 (patch)
treefa2b312815be8b50afae7fd0447fe891ab19a487 /src/sp_execute.c
parent5a655dda1c3b666adf552fd50f5ebf5f4cbd3ce7 (diff)
refactoring sp_log_* (#340)
Co-authored-by: Giovanni Dante Grazioli <giovanni.dantegrazioli@nbs-system.com>
Diffstat (limited to '')
-rw-r--r--src/sp_execute.c12
1 files changed, 6 insertions, 6 deletions
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) {
18 SP_TOKEN_READONLY_EXEC); 18 SP_TOKEN_READONLY_EXEC);
19 } 19 }
20 if (true == config_ro_exec->simulation) { 20 if (true == config_ro_exec->simulation) {
21 sp_log_msg("readonly_exec", SP_LOG_SIMULATION, 21 sp_log_simulation("readonly_exec",
22 "Attempted execution of a writable file (%s).", filename); 22 "Attempted execution of a writable file (%s).", filename);
23 } else { 23 } else {
24 sp_log_msg("readonly_exec", SP_LOG_DROP, 24 sp_log_drop("readonly_exec",
25 "Attempted execution of a writable file (%s).", filename); 25 "Attempted execution of a writable file (%s).", filename);
26 zend_bailout(); 26 zend_bailout();
27 } 27 }
@@ -79,14 +79,14 @@ is_in_eval_and_whitelisted(const zend_execute_data *execute_data) {
79 SP_TOKEN_EVAL_WHITELIST); 79 SP_TOKEN_EVAL_WHITELIST);
80 } 80 }
81 if (config_eval->simulation) { 81 if (config_eval->simulation) {
82 sp_log_msg( 82 sp_log_simulation(
83 "Eval_whitelist", SP_LOG_SIMULATION, 83 "Eval_whitelist",
84 "The function '%s' isn't in the eval whitelist, logging its call.", 84 "The function '%s' isn't in the eval whitelist, logging its call.",
85 ZSTR_VAL(current_function)); 85 ZSTR_VAL(current_function));
86 return; 86 return;
87 } else { 87 } else {
88 sp_log_msg( 88 sp_log_drop(
89 "Eval_whitelist", SP_LOG_DROP, 89 "Eval_whitelist",
90 "The function '%s' isn't in the eval whitelist, dropping its call.", 90 "The function '%s' isn't in the eval whitelist, dropping its call.",
91 ZSTR_VAL(current_function)); 91 ZSTR_VAL(current_function));
92 } 92 }