You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Broker: talk to systemd over D-Bus, not by running systemd-run and systemctl #1972
Decided by the owner on 6 December 2026. The broker (osapi agent privileged serve) runs systemd-run to start each transient unit, and systemctl to stop or kill it. It parses exit codes and text, and moves the step's I/O through files in the RuntimeDirectory. Instead, the broker talks to systemd over D-Bus with github.com/coreos/go-systemd/v22/dbus.
Start each call or step with StartTransientUnitContext, with the same properties as now (the sandbox, the capabilities, User=, InaccessiblePaths, RuntimeMaxSec, Environment).
Stop and kill with StopUnitContext and KillUnitWithTarget. "Not loaded" becomes a typed D-Bus error, not exit 5.
Move the I/O: keep the files if no D-Bus way is simpler under SELinux (see the 6 December findings: the pipes failed on systemd 257 and under SELinux).
No change to the protocol, the declarations, the enabled list or the security model. The unit properties stay the same, and the TestCallUnit rows still check them.
macOS keeps launchd.
Done in: Close #1971. Check #1962's handling again.
The owner, 6 December 2026: research polkit first. If most of osapi's root operations have a systemd D-Bus service guarded by polkit, and polkitd is present by default on minimal Debian, Ubuntu, Fedora and openSUSE installs, use D-Bus plus polkit for those operations (no root process), and keep the broker for the rest. Record the findings in this issue (the operation, the D-Bus service and action, and polkit's presence on each distribution) before the build.
Scope: this changes only the link from the broker to systemd. The link from the agent to the broker stays our Unix socket (socket activation, peer uid, macOS parity, no bus policy file, no long-running root process). If the polkit research picks D-Bus plus polkit for some operations, the agent calls those systemd D-Bus services directly, and the socket remains for the rest.
The owner, 6 December 2026: avoid home-grown mechanisms. Where Linux has a standard way (polkit, systemd's D-Bus services, D-Bus policy), use it, even if a package must be installed (such as polkitd). Keep our own broker only for operations that no standard mechanism covers. The research decides this per operation, with sources. If osapi becomes Linux-only, the macOS reason for our own socket goes away, so the research also compares the broker as a D-Bus service with our socket.
Activity
retr0h commentedon Dec 6, 2026
The owner, 6 December 2026: research polkit first. If most of osapi's root operations have a systemd D-Bus service guarded by polkit, and polkitd is present by default on minimal Debian, Ubuntu, Fedora and openSUSE installs, use D-Bus plus polkit for those operations (no root process), and keep the broker for the rest. Record the findings in this issue (the operation, the D-Bus service and action, and polkit's presence on each distribution) before the build.
retr0h commentedon Dec 6, 2026
Scope: this changes only the link from the broker to systemd. The link from the agent to the broker stays our Unix socket (socket activation, peer uid, macOS parity, no bus policy file, no long-running root process). If the polkit research picks D-Bus plus polkit for some operations, the agent calls those systemd D-Bus services directly, and the socket remains for the rest.
retr0h commentedon Dec 6, 2026
The owner, 6 December 2026: avoid home-grown mechanisms. Where Linux has a standard way (polkit, systemd's D-Bus services, D-Bus policy), use it, even if a package must be installed (such as polkitd). Keep our own broker only for operations that no standard mechanism covers. The research decides this per operation, with sources. If osapi becomes Linux-only, the macOS reason for our own socket goes away, so the research also compares the broker as a D-Bus service with our socket.