config-parser: Honor XDG_CONFIG_DIRS
This set of changes adds support for searching for a given config file in the directories listed in $XDG_CONFIG_DIRS if it wasn't found in $XDG_CONFIG_HOME or ~/.config. This allows packages to install custom config files in /etc/xdg/weston, for example, thus allowing them to avoid dealing with home directories. To avoid a TOCTOU race the config file is actually open()ed during the search. Its file descriptor is returned and stored in the compositor for later use when performing subsequent config file parses. Signed-off-by: Ossama Othman <ossama.othman@intel.com>
This commit is contained in:
committed by
Kristian Høgsberg
parent
95eb3a2eb4
commit
a50e6e4c50
@@ -316,7 +316,7 @@ weston_xserver_destroy(struct wl_listener *l, void *data)
|
||||
|
||||
WL_EXPORT int
|
||||
module_init(struct weston_compositor *compositor,
|
||||
int *argc, char *argv[], const char *config_file)
|
||||
int *argc, char *argv[])
|
||||
|
||||
{
|
||||
struct wl_display *display = compositor->wl_display;
|
||||
|
||||
Reference in New Issue
Block a user