logind-dbus: set gc_mode to USER_GC_BY_PIN when disable linger
authorTom Yan <tom.ty89@gmail.com>
Mon, 8 Jul 2024 14:10:43 +0000 (22:10 +0800)
committerLennart Poettering <lennart@poettering.net>
Tue, 9 Jul 2024 11:53:10 +0000 (13:53 +0200)
commit1df981a74ae19513b40167c6b320c30bd166ac34
treea03bb688e063e8450c65d98747731209bbff4624
parent13e9ec55cdec2f78d9b32675012bf34bf427dfe4
logind-dbus: set gc_mode to USER_GC_BY_PIN when disable linger

The mode switch from any to pin is currently done in create_session().
However, if no (pinning) session is created before (or after) linger
is disabled, the user will not be gc'd after that. Therefore, also
perform the mode switch when linger is being disabled.
src/login/logind-dbus.c