chiark / gitweb /
Prep v228: Add remaining updates from upstream (3/3)
[elogind.git] / src / login / logind-session-dbus.c
index b0db8e2ccb6cdf06e0a844d2d031b32b4bf89dba..0be2f8abef94791facedd88ef1654c82e57a6321 100644 (file)
 #include <errno.h>
 #include <string.h>
 
-#include "util.h"
-#include "strv.h"
-#include "bus-util.h"
+#include "alloc-util.h"
 #include "bus-common-errors.h"
 #include "bus-label.h"
-
-#include "logind.h"
-#include "logind-session.h"
+#include "bus-util.h"
+#include "fd-util.h"
 #include "logind-session-device.h"
+#include "logind-session.h"
+#include "logind.h"
+#include "strv.h"
+#include "util.h"
 
 static int property_get_user(
                 sd_bus *bus,
@@ -720,9 +721,10 @@ int session_send_create_reply(Session *s, sd_bus_error *error) {
         if (fifo_fd < 0)
                 return fifo_fd;
 
-        /* Update the session state file before we notify the client
-         * about the result. */
+        /* Update the session and user state files before we notify
+         * the client about the result. */
         session_save(s);
+        user_save(s->user);
 
         p = session_bus_path(s);
         if (!p)