login: fix session_kill(..., KILL_LEADER,...) (#35105)
author12paper <104864644+12paper@users.noreply.github.com>
Sun, 10 Nov 2024 02:13:39 +0000 (03:13 +0100)
committerGitHub <noreply@github.com>
Sun, 10 Nov 2024 02:13:39 +0000 (11:13 +0900)
commit8254755091847105c33e473c62cdc7621ed275bc
tree239c332081ee9ed3fa14c2e003d36ba5eb2e9a18
parent053452e22b68877e1df0d218405c0236a4a92ae5
login: fix session_kill(..., KILL_LEADER,...) (#35105)

`loginctl kill-session --kill-whom=leader <N>` (or the D-Bus equivalent)
doesn't work because logind ends up calling `KillUnit(..., "main", ...)`
on a scope unit and these don't have a `MainPID` property. Here, I just
make it send a signal to the `Leader` directly.
src/login/logind-session.c