From c817db081750a579812570e40e87e8978fdb0ea9 Mon Sep 17 00:00:00 2001 From: Antoine Tenart Date: Wed, 29 Aug 2018 10:55:52 +0200 Subject: 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 --- src/snuffleupagus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') 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) { char *rest = new_value->val; while ((config_file = strtok_r(rest, ",", &rest))) { - int ret = glob(config_file, GLOB_BRACE | GLOB_NOCHECK, NULL, &globbuf); + int ret = glob(config_file, GLOB_NOCHECK, NULL, &globbuf); if (ret != 0) { SNUFFLEUPAGUS_G(is_config_valid) = false; -- cgit v1.3