diff options
| author | Ben Fuhrmannek | 2020-06-15 11:51:16 +0200 |
|---|---|---|
| committer | Ben Fuhrmannek | 2020-06-15 11:51:16 +0200 |
| commit | 7ac1e3866ef4f146c6c93a5ca13b9aebb14e936a (patch) | |
| tree | ce57745314d905ff06119788acb56c11dcb3aede /src/sp_config_keywords.c | |
| parent | f742d9f88bf788e38bbe832f1b75e39784f024bc (diff) | |
| parent | 7f9602ebc23582195d63eb35f1de1961297f2e00 (diff) | |
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'src/sp_config_keywords.c')
| -rw-r--r-- | src/sp_config_keywords.c | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/src/sp_config_keywords.c b/src/sp_config_keywords.c index 5f6cc7b..64b5715 100644 --- a/src/sp_config_keywords.c +++ b/src/sp_config_keywords.c | |||
| @@ -44,7 +44,7 @@ int parse_session(char *line) { | |||
| 44 | "You're trying to use the session cookie encryption feature " | 44 | "You're trying to use the session cookie encryption feature " |
| 45 | "on line %zu without having session support statically built into PHP. " | 45 | "on line %zu without having session support statically built into PHP. " |
| 46 | "This isn't supported, see " | 46 | "This isn't supported, see " |
| 47 | "https://github.com/nbs-system/snuffleupagus/issues/278 for details.", | 47 | "https://github.com/jvoisin/snuffleupagus/issues/278 for details.", |
| 48 | sp_line_no); | 48 | sp_line_no); |
| 49 | pefree(session, 0); | 49 | pefree(session, 0); |
| 50 | return -1; | 50 | return -1; |
| @@ -83,6 +83,25 @@ int parse_random(char *line) { | |||
| 83 | NULL); | 83 | NULL); |
| 84 | } | 84 | } |
| 85 | 85 | ||
| 86 | int parse_log_media(char *line) { | ||
| 87 | size_t consumed = 0; | ||
| 88 | zend_string *value = | ||
| 89 | get_param(&consumed, line, SP_TYPE_STR, SP_TOKEN_LOG_MEDIA); | ||
| 90 | |||
| 91 | if (value) { | ||
| 92 | if (!strcmp(ZSTR_VAL(value), "php")) { | ||
| 93 | SNUFFLEUPAGUS_G(config).log_media = SP_ZEND; | ||
| 94 | return 0; | ||
| 95 | } else if (!strcmp(ZSTR_VAL(value), "syslog")) { | ||
| 96 | SNUFFLEUPAGUS_G(config).log_media = SP_SYSLOG; | ||
| 97 | return 0; | ||
| 98 | } | ||
| 99 | } | ||
| 100 | sp_log_err("config", "%s) only supports 'syslog' or 'php', on line %zu", | ||
| 101 | SP_TOKEN_LOG_MEDIA, sp_line_no); | ||
| 102 | return -1; | ||
| 103 | } | ||
| 104 | |||
| 86 | int parse_sloppy_comparison(char *line) { | 105 | int parse_sloppy_comparison(char *line) { |
| 87 | return parse_enable(line, &(SNUFFLEUPAGUS_G(config).config_sloppy->enable), | 106 | return parse_enable(line, &(SNUFFLEUPAGUS_G(config).config_sloppy->enable), |
| 88 | NULL); | 107 | NULL); |
