diff options
| author | jvoisin | 2022-07-15 19:32:56 +0200 |
|---|---|---|
| committer | jvoisin | 2022-07-15 19:32:56 +0200 |
| commit | 90bdf39000d2f09534b387d39203819995fb948e (patch) | |
| tree | 0c9d92421d2e3994cbd4358919152086be00e22d /src | |
| parent | 09a1e81ac9bb4c54cbf81ce00657afd991638cf0 (diff) | |
Minor refactor
Diffstat (limited to 'src')
| -rw-r--r-- | src/sp_config.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/sp_config.c b/src/sp_config.c index dbccb1a..ff6cdd9 100644 --- a/src/sp_config.c +++ b/src/sp_config.c | |||
| @@ -4,9 +4,7 @@ | |||
| 4 | 4 | ||
| 5 | #include "php_snuffleupagus.h" | 5 | #include "php_snuffleupagus.h" |
| 6 | 6 | ||
| 7 | 7 | static const sp_config_keyword sp_func[] = { | |
| 8 | static zend_result sp_process_config_root(sp_parsed_keyword *parsed_rule) { | ||
| 9 | sp_config_keyword sp_func[] = { | ||
| 10 | {parse_unserialize, SP_TOKEN_UNSERIALIZE_HMAC, &(SPCFG(unserialize))}, | 8 | {parse_unserialize, SP_TOKEN_UNSERIALIZE_HMAC, &(SPCFG(unserialize))}, |
| 11 | {parse_enable, SP_TOKEN_HARDEN_RANDOM, &(SPCFG(random).enable)}, | 9 | {parse_enable, SP_TOKEN_HARDEN_RANDOM, &(SPCFG(random).enable)}, |
| 12 | {parse_log_media, SP_TOKEN_LOG_MEDIA, &(SPCFG(log_media))}, | 10 | {parse_log_media, SP_TOKEN_LOG_MEDIA, &(SPCFG(log_media))}, |
| @@ -25,7 +23,10 @@ static zend_result sp_process_config_root(sp_parsed_keyword *parsed_rule) { | |||
| 25 | {parse_wrapper_whitelist, SP_TOKEN_ALLOW_WRAPPERS, &(SPCFG(wrapper))}, | 23 | {parse_wrapper_whitelist, SP_TOKEN_ALLOW_WRAPPERS, &(SPCFG(wrapper))}, |
| 26 | {parse_ini_protection, SP_TOKEN_INI_PROTECTION, &(SPCFG(ini))}, | 24 | {parse_ini_protection, SP_TOKEN_INI_PROTECTION, &(SPCFG(ini))}, |
| 27 | {parse_ini_entry, SP_TOKEN_INI, NULL}, | 25 | {parse_ini_entry, SP_TOKEN_INI, NULL}, |
| 28 | {NULL, NULL, NULL}}; | 26 | {NULL, NULL, NULL} |
| 27 | }; | ||
| 28 | |||
| 29 | static zend_result sp_process_config_root(sp_parsed_keyword *parsed_rule) { | ||
| 29 | return sp_process_rule(parsed_rule, sp_func); | 30 | return sp_process_rule(parsed_rule, sp_func); |
| 30 | } | 31 | } |
| 31 | 32 | ||
