logind-user: check linger file in user_wants_service_manager too

Follow-up for 5099a50d43

Fixes #33005
This commit is contained in:
Mike Yuan
2024-05-29 00:50:07 +08:00
parent 194dba5ef5
commit e417415996
+4 -1
View File
@@ -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;
}