summaryrefslogtreecommitdiff
path: root/src/login/logind-seat.c
diff options
context:
space:
mode:
authorColin Guthrie <colin@mageia.org>2012-09-04 01:37:28 +0100
committerLennart Poettering <lennart@poettering.net>2012-09-12 08:20:01 +0200
commit78ab361c8f5f5d7614b5bf98b92f3aec4183bfb7 (patch)
tree132c83433111620ffe71ff4673450bf24c601d11 /src/login/logind-seat.c
parent23bd3b6263e4fd9c15cfb6c05e65fa425791374c (diff)
logind: Avoid unnecesary rewrite of user file when switching sessions of the same user.
Diffstat (limited to 'src/login/logind-seat.c')
-rw-r--r--src/login/logind-seat.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/login/logind-seat.c b/src/login/logind-seat.c
index 937315ebf..c2cf6e5e1 100644
--- a/src/login/logind-seat.c
+++ b/src/login/logind-seat.c
@@ -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;