summaryrefslogtreecommitdiff
path: root/loader
diff options
context:
space:
mode:
authorBenjamin Saunders <ben.e.saunders@gmail.com>2017-02-19 11:14:24 -0800
committerMark Young <marky@lunarg.com>2017-02-20 13:50:58 -0700
commit9a8132da596f34b1502fd1034471061ad55893a6 (patch)
treef6cd4f559e91f72b584b239078e244117c04d0fc /loader
parent879adf95044e42b78889b4345798c12adfc0a2d5 (diff)
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.
Diffstat (limited to 'loader')
-rw-r--r--loader/loader.c4
1 files changed, 2 insertions, 2 deletions
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;