mirror of
https://github.com/systemd/systemd-stable.git
synced 2024-12-27 03:21:32 +03:00
logind: properly write user state files
This commit is contained in:
parent
9b71153605
commit
6c7506dca3
@ -142,7 +142,7 @@ int user_save(User *u) {
|
|||||||
fprintf(f,
|
fprintf(f,
|
||||||
"%s%c",
|
"%s%c",
|
||||||
i->id,
|
i->id,
|
||||||
i->sessions_by_seat_next ? ' ' : '\n');
|
i->sessions_by_user_next ? ' ' : '\n');
|
||||||
}
|
}
|
||||||
|
|
||||||
fputs("SEATS=", f);
|
fputs("SEATS=", f);
|
||||||
@ -151,7 +151,7 @@ int user_save(User *u) {
|
|||||||
fprintf(f,
|
fprintf(f,
|
||||||
"%s%c",
|
"%s%c",
|
||||||
i->seat->id,
|
i->seat->id,
|
||||||
i->sessions_by_seat_next ? ' ' : '\n');
|
i->sessions_by_user_next ? ' ' : '\n');
|
||||||
}
|
}
|
||||||
|
|
||||||
fputs("ACTIVE_SESSIONS=", f);
|
fputs("ACTIVE_SESSIONS=", f);
|
||||||
@ -160,7 +160,7 @@ int user_save(User *u) {
|
|||||||
fprintf(f,
|
fprintf(f,
|
||||||
"%lu%c",
|
"%lu%c",
|
||||||
(unsigned long) i->user->uid,
|
(unsigned long) i->user->uid,
|
||||||
i->sessions_by_seat_next ? ' ' : '\n');
|
i->sessions_by_user_next ? ' ' : '\n');
|
||||||
|
|
||||||
fputs("ACTIVE_SEATS=", f);
|
fputs("ACTIVE_SEATS=", f);
|
||||||
LIST_FOREACH(sessions_by_user, i, u->sessions) {
|
LIST_FOREACH(sessions_by_user, i, u->sessions) {
|
||||||
@ -168,7 +168,7 @@ int user_save(User *u) {
|
|||||||
fprintf(f,
|
fprintf(f,
|
||||||
"%s%c",
|
"%s%c",
|
||||||
i->seat->id,
|
i->seat->id,
|
||||||
i->sessions_by_seat_next ? ' ' : '\n');
|
i->sessions_by_user_next ? ' ' : '\n');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user