mirror of
https://github.com/systemd/systemd.git
synced 2024-12-05 00:04:02 +08:00
logind-user: check linger file in user_wants_service_manager too
Follow-up for 5099a50d43
Fixes #33005
This commit is contained in:
parent
194dba5ef5
commit
e417415996
@ -371,13 +371,16 @@ static int user_start_runtime_dir(User *u) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
static bool user_wants_service_manager(User *u) {
|
||||
static bool user_wants_service_manager(const User *u) {
|
||||
assert(u);
|
||||
|
||||
LIST_FOREACH(sessions_by_user, s, u->sessions)
|
||||
if (SESSION_CLASS_WANTS_SERVICE_MANAGER(s->class))
|
||||
return true;
|
||||
|
||||
if (user_check_linger_file(u) > 0)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user