summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/login/logind.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/login/logind.c b/src/login/logind.c
index bb34a7f362..f72aac5e61 100644
--- a/src/login/logind.c
+++ b/src/login/logind.c
@@ -37,6 +37,7 @@
#include "dbus-loop.h"
#include "strv.h"
#include "conf-parser.h"
+#include "mkdir.h"
Manager *manager_new(void) {
Manager *m;
@@ -1727,6 +1728,15 @@ int main(int argc, char *argv[]) {
goto finish;
}
+ /* Always create the directories people can create inotify
+ * watches in. Note that some applications might check for the
+ * existance of /run/systemd/seats/ to determine whether
+ * logind is available, so please always make sure this check
+ * stays in. */
+ mkdir_label("/run/systemd/seats", 0755);
+ mkdir_label("/run/systemd/users", 0755);
+ mkdir_label("/run/systemd/sessions", 0755);
+
m = manager_new();
if (!m) {
r = log_oom();