From ed54673e073cb65eecc07fab5d6d1d03ec97e473 Mon Sep 17 00:00:00 2001 From: Benjamin Saunders Date: Sun, 19 Feb 2017 11:14:24 -0800 Subject: loader: Configurable fallback search paths This makes it easier for non-FHS distributions to behave well when the loader is used by a SUID process or in an otherwise unusual environment. --- loader/loader.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'loader') diff --git a/loader/loader.c b/loader/loader.c index 6893d94c..244b8dc8 100644 --- a/loader/loader.c +++ b/loader/loader.c @@ -2655,9 +2655,9 @@ static VkResult loader_get_manifest_files(const struct loader_instance *inst, co const char *xdgconfdirs = secure_getenv("XDG_CONFIG_DIRS"); const char *xdgdatadirs = secure_getenv("XDG_DATA_DIRS"); if (xdgconfdirs == NULL || xdgconfdirs[0] == '\0') - xdgconfdirs = "/etc/xdg"; + xdgconfdirs = FALLBACK_CONFIG_DIRS; if (xdgdatadirs == NULL || xdgdatadirs[0] == '\0') - xdgdatadirs = "/usr/local/share:/usr/share"; + xdgdatadirs = FALLBACK_DATA_DIRS; const size_t rel_size = strlen(relative_location); // Leave space for trailing separators loc_size += strlen(xdgconfdirs) + strlen(xdgdatadirs) + 2*rel_size + 2; -- cgit v1.2.3