]> git.ipfire.org Git - thirdparty/systemd.git/commit
core: add `io.systemd.Manager.{PowerOff,Reboot,SoftReboot,Halt,Kexec}`
authorMichael Vogt <michael@amutable.com>
Fri, 20 Mar 2026 15:25:42 +0000 (16:25 +0100)
committerMichael Vogt <michael@amutable.com>
Sat, 21 Mar 2026 21:01:17 +0000 (22:01 +0100)
commit621514762443bc536cd489a221a8669fdfd54241
tree67aab8beb885197893414f89aca941a2d1f22749
parent55356a78219e5c55bd90d83813630c6dc422afee
core: add `io.systemd.Manager.{PowerOff,Reboot,SoftReboot,Halt,Kexec}`

This adds the low-level io.systemd.Manager shutdown support. This
is (much) simpler than the logind one. It mimics dbus but uses
a shared helper for the simple cases.

Note that this is more restrictive than the dbus version. The
dbus version uses SD_BUS_VTABLE_CAPABILITY(CAP_SYS_BOOT) but
the varlink version uses varlink_check_privileged_peer(link).
This is mostly because I'm not sure how to do the equivalent
in a race-free way.

Thanks to Daan for suggesting this.
src/core/dbus-manager.c
src/core/varlink-manager.c
src/core/varlink-manager.h
src/core/varlink.c
src/shared/varlink-io.systemd.Manager.c