[systemd-devel] systemctl without dbus
Mantas Mikulėnas
grawity at gmail.com
Thu Jan 9 16:10:56 UTC 2025
On Thu, Jan 9, 2025 at 4:46 PM Umut Tezduyar Lindskog <
Umut.Tezduyar at axis.com> wrote:
> Hi,
>
>
>
> I build a minimum image with mkosi with just systemd, udev as the packages
> and set the default target to basic.target. It works fine but I cannot shut
> down the system with systemctl. It complains that dbus is not available.
>
>
>
> AFAIK, systemd implements it’s own dbus server to serve systemctl until
> the dbus daemon / broker starts up. Is this a regression or has something
> changed about the logic?
>
It uses a peer-to-peer dbus socket – i.e. not so much a 'dbus server' but a
direct unix socket that happens to speak the dbus protocol. This is placed
at /run/systemd/private and is restricted to root only (it doesn't support
polkit-based authorization). Systemctl's bus_connect_transport_systemd()
won't even try connecting to it when running as a different user than root.
--
Mantas Mikulėnas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20250109/1480ccb7/attachment.htm>
More information about the systemd-devel
mailing list