chiark / gitweb /
Actually working with pam
[elogind.git] / src / login / logind-dbus.c
index 049e33e2a6b48f61a5f2c8b35f12411ebe628e3e..e142b8fcfe114b31aeca9f6aeadac1fad6967ed0 100644 (file)
@@ -822,6 +822,15 @@ static int method_create_session(sd_bus_message *message, void *userdata, sd_bus
          * created. We send the reply back from
          * session_send_create_reply(). */
 
+        /* Elogind note: replying directly, since we're not actually
+           starting slices and thus we aren't waiting on systemd.  */
+
+        r = session_send_create_reply(session, NULL);
+        if (r < 0)
+                goto fail;
+
+        session_save(session);
+
         return 1;
 
 fail:
@@ -1774,7 +1783,7 @@ static int nologin_timeout_handler(
 
         log_info("Creating /run/nologin, blocking further logins...");
 
-        r = write_string_file("/run/nologin", "System is going down.", WRITE_STRING_FILE_ATOMIC);
+        r = write_string_file("/run/nologin", "System is going down.", WRITE_STRING_FILE_CREATE|WRITE_STRING_FILE_ATOMIC);
         if (r < 0)
                 log_error_errno(r, "Failed to create /run/nologin: %m");
         else