chiark / gitweb /
logind: Avoid unnecesary rewrite of user file when switching sessions of the same...
authorColin Guthrie <colin@mageia.org>
Tue, 4 Sep 2012 00:37:28 +0000 (01:37 +0100)
committerLennart Poettering <lennart@poettering.net>
Wed, 12 Sep 2012 06:20:01 +0000 (08:20 +0200)
src/login/logind-seat.c

index 937315e..c2cf6e5 100644 (file)
@@ -263,7 +263,8 @@ int seat_set_active(Seat *s, Session *session) {
 
         if (old_active) {
                 session_save(old_active);
-                user_save(old_active->user);
+                if (!session || session->user != old_active->user)
+                        user_save(old_active->user);
         }
 
         return 0;