[systemd-devel] Confusing error message
Spencer Baugh
sbaugh at catern.com
Tue Jul 14 01:06:47 PDT 2015
Perhaps if there is an issue with polkit (or permissions in general) we should always print something like, "Unable to perform action without privileges; try again with sudo." in addition to the polkit message.
On July 14, 2015 12:59:53 AM PDT, David Herrmann <dh.herrmann at gmail.com> wrote:
>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
>_______________________________________________
>systemd-devel mailing list
>systemd-devel at lists.freedesktop.org
>http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
Sent from my Android device with K-9 Mail. Please excuse my brevity.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20150714/7b62b76f/attachment.html>
More information about the systemd-devel
mailing list