X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=manager.c;h=88dc64bb655771d56055fa8bf50d29d59b046c15;hp=46b187658d3534cc52892391e097b2ad6a485f40;hb=4697132b91989da27b11af179c430305bb9db9ac;hpb=4e85aff465b2ce0fa34222e52a6f5a984140b22e diff --git a/manager.c b/manager.c index 46b187658..88dc64bb6 100644 --- a/manager.c +++ b/manager.c @@ -149,12 +149,12 @@ static char** session_dirs(void) { } if ((e = getenv("XDG_CONFIG_DIRS"))) - config_dirs = strv_split(e, ":"); - else - config_dirs = strv_new("/etc/xdg", NULL); + if (!(config_dirs = strv_split(e, ":"))) + goto fail; - if (!config_dirs) - goto fail; + /* We don't treat /etc/xdg/systemd here as the spec + * suggests because we assume that that is a link to + * /etc/systemd/ anyway. */ if ((e = getenv("XDG_DATA_HOME"))) { if (asprintf(&data_home, "%s/systemd/session", e) < 0)