summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPatrick Allaert2022-10-13 16:49:56 +0200
committerPatrick Allaert2022-10-13 16:49:56 +0200
commitfdf504459a2e4a4903c9d63dfaee909705661bea (patch)
tree6f8d50cd6e16dc842c4c52b146521ca3d8da9e6f /src
parenta457727f5ed96ca45fa59c02a8595ee95ace3a28 (diff)
Revert "Minor refactor"
This reverts commit 90bdf39000d2f09534b387d39203819995fb948e. Caused compilation failure with PHP compiled with ZTS.
Diffstat (limited to 'src')
-rw-r--r--src/sp_config.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/sp_config.c b/src/sp_config.c
index ff6cdd9..dbccb1a 100644
--- a/src/sp_config.c
+++ b/src/sp_config.c
@@ -4,7 +4,9 @@
4 4
5#include "php_snuffleupagus.h" 5#include "php_snuffleupagus.h"
6 6
7static const sp_config_keyword sp_func[] = { 7
8static zend_result sp_process_config_root(sp_parsed_keyword *parsed_rule) {
9 sp_config_keyword sp_func[] = {
8 {parse_unserialize, SP_TOKEN_UNSERIALIZE_HMAC, &(SPCFG(unserialize))}, 10 {parse_unserialize, SP_TOKEN_UNSERIALIZE_HMAC, &(SPCFG(unserialize))},
9 {parse_enable, SP_TOKEN_HARDEN_RANDOM, &(SPCFG(random).enable)}, 11 {parse_enable, SP_TOKEN_HARDEN_RANDOM, &(SPCFG(random).enable)},
10 {parse_log_media, SP_TOKEN_LOG_MEDIA, &(SPCFG(log_media))}, 12 {parse_log_media, SP_TOKEN_LOG_MEDIA, &(SPCFG(log_media))},
@@ -23,10 +25,7 @@ static const sp_config_keyword sp_func[] = {
23 {parse_wrapper_whitelist, SP_TOKEN_ALLOW_WRAPPERS, &(SPCFG(wrapper))}, 25 {parse_wrapper_whitelist, SP_TOKEN_ALLOW_WRAPPERS, &(SPCFG(wrapper))},
24 {parse_ini_protection, SP_TOKEN_INI_PROTECTION, &(SPCFG(ini))}, 26 {parse_ini_protection, SP_TOKEN_INI_PROTECTION, &(SPCFG(ini))},
25 {parse_ini_entry, SP_TOKEN_INI, NULL}, 27 {parse_ini_entry, SP_TOKEN_INI, NULL},
26 {NULL, NULL, NULL} 28 {NULL, NULL, NULL}};
27};
28
29static zend_result sp_process_config_root(sp_parsed_keyword *parsed_rule) {
30 return sp_process_rule(parsed_rule, sp_func); 29 return sp_process_rule(parsed_rule, sp_func);
31} 30}
32 31