[systemd-devel] Confusing error message

David Herrmann dh.herrmann at gmail.com
Tue Jul 14 00:59:53 PDT 2015


Hi

On Tue, Jun 23, 2015 at 4:28 AM, Johannes Ernst
<johannes.ernst at gmail.com> wrote:
> $ systemctl restart systemd-networkd
> Failed to restart systemd-networkd.service: The name org.freedesktop.PolicyKit1 was not provided by any .service files
>
> $ sudo systemctl restart systemd-networkd
> Works.
>
> Presumably this error message could be improved, in particular because that name is indeed not provided by any .service files :-)

So if you're not root, systemctl needs to ask polkit to perform
authorization. It does this, by sending a dbus message to polkit. If
that well-known bus-name is not owned by anyone, the error message in
question gets returned. So with inside knowledge, it does make sense
;)

Regarding changing this: For debug purposes, it is highly valuable to
know the cause of failure. This message clearly tells a developer what
went wrong. Not sure we want to change this. Or more importantly, I'm
not entirely sure it is easy to change this, as this error is
generated deep down in the polkit-code.
We could just throw that message away and always return EPERM. Not
sure it's worth it, though.

Thanks
David


More information about the systemd-devel mailing list