]> err.no Git - systemd/commitdiff
logind: create private subdirectory for X11 socket
authorLennart Poettering <lennart@poettering.net>
Fri, 1 Jul 2011 20:34:58 +0000 (22:34 +0200)
committerLennart Poettering <lennart@poettering.net>
Fri, 1 Jul 2011 20:34:58 +0000 (22:34 +0200)
src/logind-session.c

index cadf93283a064c1c292bc34c737ab88c4ea116ba..ab4de66ca4d8c4bc90eb521a72029476296a0a82 100644 (file)
@@ -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;