<html><head></head><body>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.<br><br><div class="gmail_quote">On July 14, 2015 12:59:53 AM PDT, David Herrmann <dh.herrmann@gmail.com> wrote:<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<pre class="k9mail">Hi<br /><br />On Tue, Jun 23, 2015 at 4:28 AM, Johannes Ernst<br /><johannes.ernst@gmail.com> wrote:<br /><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #729fcf; padding-left: 1ex;"> $ systemctl restart systemd-networkd<br /> Failed to restart systemd-networkd.service: The name org.freedesktop.PolicyKit1 was not provided by any .service files<br /><br /> $ sudo systemctl restart systemd-networkd<br /> Works.<br /><br /> Presumably this error message could be improved, in particular because that name is indeed not provided by any .service files :-)<br /></blockquote><br />So if you're not root, systemctl needs to ask polkit to perform<br />authorization. It does this, by sending a dbus message to polkit. If<br />that well-known bus-name is not owned by anyone, the error message in<br />question gets returned. So with inside knowledge, it does make sense<br />;)<br /><br />Regarding changing this: For debug purposes,
it is highly valuable to<br />know the cause of failure. This message clearly tells a developer what<br />went wrong. Not sure we want to change this. Or more importantly, I'm<br />not entirely sure it is easy to change this, as this error is<br />generated deep down in the polkit-code.<br />We could just throw that message away and always return EPERM. Not<br />sure it's worth it, though.<br /><br />Thanks<br />David<br /><hr /><br />systemd-devel mailing list<br />systemd-devel@lists.freedesktop.org<br /><a href="http://lists.freedesktop.org/mailman/listinfo/systemd-devel">http://lists.freedesktop.org/mailman/listinfo/systemd-devel</a><br /></pre></blockquote></div><br>
-- <br>
Sent from my Android device with K-9 Mail. Please excuse my brevity.</body></html>