diff options
| author | Antoine Tenart | 2018-08-29 10:55:52 +0200 |
|---|---|---|
| committer | jvoisin | 2018-08-29 11:02:02 +0200 |
| commit | c817db081750a579812570e40e87e8978fdb0ea9 (patch) | |
| tree | 2d9699fb88316bc64db1dd07b578bc7d9cab77e8 /src/snuffleupagus.c | |
| parent | 64e52596abaf4bdd4c17f79c4e8acf25d1a452b4 (diff) | |
Remove the GLOB_BRACE flag
When calling glob() to get the configuration file location, the
GLOB_BRACE flag is used. This flag enables the parsing of '{a,b}', so
that '/path/{a,b}' represents '/path/a' and '/path/b'. Looking at
Snuffleupagus' documentation I saw nowhere this kind of path was
supported. Instead the documentation shows that glob() is used for paths
with wildcards.
The use of GLOB_BRACE is problematic as it is glibc specific and is not
supported by some other C libraries, such as Musl. Snuffleupagus cannot
be used in Apline for this reason.
Since the documentation does not give a valid usage of GLOB_BRACE this
patch removes it, which fixes the non-glibc support.
Signed-off-by: Antoine Tenart <antoine.tenart@ack.tf>
Diffstat (limited to 'src/snuffleupagus.c')
| -rw-r--r-- | src/snuffleupagus.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/snuffleupagus.c b/src/snuffleupagus.c index 9f92397..ca23bac 100644 --- a/src/snuffleupagus.c +++ b/src/snuffleupagus.c | |||
| @@ -224,7 +224,7 @@ static PHP_INI_MH(OnUpdateConfiguration) { | |||
| 224 | char *rest = new_value->val; | 224 | char *rest = new_value->val; |
| 225 | 225 | ||
| 226 | while ((config_file = strtok_r(rest, ",", &rest))) { | 226 | while ((config_file = strtok_r(rest, ",", &rest))) { |
| 227 | int ret = glob(config_file, GLOB_BRACE | GLOB_NOCHECK, NULL, &globbuf); | 227 | int ret = glob(config_file, GLOB_NOCHECK, NULL, &globbuf); |
| 228 | 228 | ||
| 229 | if (ret != 0) { | 229 | if (ret != 0) { |
| 230 | SNUFFLEUPAGUS_G(is_config_valid) = false; | 230 | SNUFFLEUPAGUS_G(is_config_valid) = false; |
