diff options
author | Lennart Poettering <lennart@poettering.net> | 2011-07-01 22:34:58 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2011-07-01 22:34:58 +0200 |
commit | 0254daedb1b67a16c6d54b964b31b5e8eaa4ac4c (patch) | |
tree | a53fb3578859be97236b6a6c0d2785a67ddd5b36 /src | |
parent | be81bfc4a700e2b8544857279dc09a17b1efcf2d (diff) |
logind: create private subdirectory for X11 socket
Diffstat (limited to 'src')
-rw-r--r-- | src/logind-session.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/logind-session.c b/src/logind-session.c index cadf93283a..ab4de66ca4 100644 --- a/src/logind-session.c +++ b/src/logind-session.c @@ -380,13 +380,15 @@ static int session_link_x11_socket(Session *s) { return -ENOENT; } - t = strappend(s->user->runtime_path, "/display"); + t = strappend(s->user->runtime_path, "/X11/display"); if (!t) { log_error("Out of memory"); free(f); return -ENOMEM; } + mkdir_parents(t, 0755); + if (link(f, t) < 0) { if (errno == EEXIST) { unlink(t); @@ -638,7 +640,7 @@ static int session_unlink_x11_socket(Session *s) { s->user->display = NULL; - t = strappend(s->user->runtime_path, "/display"); + t = strappend(s->user->runtime_path, "/X11/display"); if (!t) { log_error("Out of memory"); return -ENOMEM; |