]> err.no Git - systemd/commitdiff
logind: make sure to create/run/systemd/sessions before we try to place a fifo in it
authorLennart Poettering <lennart@poettering.net>
Thu, 30 Jun 2011 00:16:07 +0000 (02:16 +0200)
committerLennart Poettering <lennart@poettering.net>
Thu, 30 Jun 2011 00:16:07 +0000 (02:16 +0200)
src/logind-session.c

index bc1b9b77ca31858b1e1d13404c30a33dc91d7da5..cadf93283a064c1c292bc34c737ab88c4ea116ba 100644 (file)
@@ -787,6 +787,10 @@ int session_create_fifo(Session *s) {
 
         /* Create FIFO */
         if (!s->fifo_path) {
+                r = safe_mkdir("/run/systemd/sessions", 0755, 0, 0);
+                if (r < 0)
+                        return r;
+
                 if (asprintf(&s->fifo_path, "/run/systemd/sessions/%s.ref", s->id) < 0)
                         return -ENOMEM;