X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Flogin%2Flogind.c;h=f72aac5e61941bb49ea8e98a2f1d3cec99a578a4;hb=bfa00bc6c05d0f896e9632eccd47d442fea556b9;hp=680bc1fcdff07905e88dd63c903468d0399345ee;hpb=2d96536dd7ef371c94be70cd9fb0fcbc0e5a0329;p=elogind.git diff --git a/src/login/logind.c b/src/login/logind.c index 680bc1fcd..f72aac5e6 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; @@ -1463,7 +1464,7 @@ int manager_dispatch_idle_action(Manager *m) { r = manager_get_idle_hint(m, &since); if (r <= 0) - /* Not idle. Let's check if after a timeout it it might be idle then. */ + /* Not idle. Let's check if after a timeout it might be idle then. */ timespec_store(&its.it_value, n + m->idle_action_usec); else { /* Idle! Let's see if it's time to do something, or if @@ -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();