logind: automatically GC lingering users for who now user@.service (nor slice, not...
authorLennart Poettering <lennart@poettering.net>
Wed, 8 Aug 2018 14:04:40 +0000 (16:04 +0200)
committerThe Plumber <50238977+systemd-rhel-bot@users.noreply.github.com>
Fri, 20 Aug 2021 11:06:37 +0000 (13:06 +0200)
commit89dd5e016a50da082e51129eecb3c5e04b8f0cf5
treebec249b2d177354de61446021d41ace77b66b5b0
parent117ed6bd7aa71fc79599e1d37bdb4a94b3505a38
logind: automatically GC lingering users for who now user@.service (nor slice, not runtime dir service) is running anymore

This heavily borrows from @intelfx' PR #5546, but watches all three
units that are associated with a user now: the slice, the user@.service
and user-runtime-dir@.service.

The logic and reasoning behind it is the same though: there's no value
in keeping lingering users around if all their three services are gone.

Replaces: #5546
Fixes: #4162
(cherry picked from commit 4e5b605af202c770dfc8e3562d0f8d0440b2fe14)

Related: #1642460
src/login/logind-user.c