<para><function>List()</function>, <function>Describe()</function>, and <function>CheckNew()</function>
use the polkit action <interfacename>org.freedesktop.sysupdate1.check</interfacename>.
- By default, this action is permitted without administrator authentication.</para>
+ By default, this action is permitted without administrator authentication. Cancellation of these
+ methods uses the polkit action <interfacename>org.freedesktop.sysupdate1.cancel-check</interfacename>.
+ By default, this cancellation action is permitted without administrator authentication.</para>
<para><function>Acquire()</function> and <function>Install()</function>
use the polkit action
<interfacename>org.freedesktop.sysupdate1.update</interfacename> when no version is specified.
By default, this action is permitted without administrator authentication. When a version is
specified, <interfacename>org.freedesktop.sysupdate1.update-to-version</interfacename> is
- used instead. By default, this alternate action requires administrator authentication.</para>
+ used instead. By default, this alternate action requires administrator authentication. Cancellation of
+ these methods uses the polkit actions
+ <interfacename>org.freedesktop.sysupdate1.cancel-update</interfacename> and
+ <interfacename>org.freedesktop.sysupdate1.cancel-update-to-version</interfacename>.
+ By default, these cancellation actions are permitted without administrator authentication.</para>
<para><function>Vacuum()</function> uses the polkit action
<interfacename>org.freedesktop.sysupdate1.vacuum</interfacename>. By default, this action requires
- administrator authentication.</para>
+ administrator authentication. Cancellation of this method uses the polkit action
+ <interfacename>org.freedesktop.sysupdate1.cancel-vacuum</interfacename>.
+ By default, this cancellation action is permitted without administrator authentication.</para>
<para><function>SetFeatureEnabled()</function> uses the polkit action
<interfacename>org.freedesktop.sysupdate1.manage-features</interfacename>. By default, this action
- requires administrator authentication.</para>
+ requires administrator authentication. Cancellation is not supported for this method.</para>
<para><function>GetAppStream()</function>, <function>GetVersion()</function>,
<function>ListFeatures()</function>, and <function>DescribeFeature()</function>
- are unauthenticated and may be called by anybody.</para>
+ are unauthenticated and may be called by anybody. Cancellation is not supported for these methods, or
+ is always allowed without administrator authentication.</para>
<para>All methods called on this interface expose additional variables to the polkit rules.
<literal>class</literal> contains the class of the Target being acted upon, and <literal>name</literal>
a user at the console, and rpm-ostree (generally) needs an "administrative user" at the computer.
Without this default, distributions hoping to use sysupdate as an update mechanism will have to
set the policy to it anyhow.
+
+ Cancellation actions are always allowed by default, as the user can typically pull the plug on
+ the computer to prevent an action completing anyway.
-->
<action id="org.freedesktop.sysupdate1.check">
</defaults>
</action>
+ <action id="org.freedesktop.sysupdate1.cancel-check">
+ <description gettext-domain="systemd">Cancel checking for system updates</description>
+ <message gettext-domain="systemd">Authentication is required to cancel checking for system updates.</message>
+ <defaults>
+ <allow_any>auth_admin</allow_any>
+ <allow_inactive>auth_admin</allow_inactive>
+ <allow_active>yes</allow_active>
+ </defaults>
+ </action>
+
<action id="org.freedesktop.sysupdate1.update">
<description gettext-domain="systemd">Install system updates</description>
<message gettext-domain="systemd">Authentication is required to install system updates.</message>
</defaults>
</action>
+ <action id="org.freedesktop.sysupdate1.cancel-update">
+ <description gettext-domain="systemd">Cancel installing system updates</description>
+ <message gettext-domain="systemd">Authentication is required to cancel installing system updates.</message>
+ <defaults>
+ <allow_any>auth_admin</allow_any>
+ <allow_inactive>auth_admin</allow_inactive>
+ <allow_active>yes</allow_active>
+ </defaults>
+ </action>
+
<action id="org.freedesktop.sysupdate1.update-to-version">
<description gettext-domain="systemd">Install specific system version</description>
<message gettext-domain="systemd">Authentication is required to update the system to a specific (possibly old) version.</message>
</defaults>
</action>
+ <action id="org.freedesktop.sysupdate1.cancel-update-to-version">
+ <description gettext-domain="systemd">Cancel installing specific system version</description>
+ <message gettext-domain="systemd">Authentication is required to cancel updating the system to a specific (possibly old) version.</message>
+ <defaults>
+ <allow_any>auth_admin</allow_any>
+ <allow_inactive>auth_admin</allow_inactive>
+ <allow_active>yes</allow_active>
+ </defaults>
+ </action>
+
<action id="org.freedesktop.sysupdate1.vacuum">
<description gettext-domain="systemd">Cleanup old system updates</description>
<message gettext-domain="systemd">Authentication is required to cleanup old system updates.</message>
</defaults>
</action>
+ <action id="org.freedesktop.sysupdate1.cancel-vacuum">
+ <description gettext-domain="systemd">Cancel cleaning up old system updates</description>
+ <message gettext-domain="systemd">Authentication is required to cancel cleanup of old system updates.</message>
+ <defaults>
+ <allow_any>auth_admin</allow_any>
+ <allow_inactive>auth_admin</allow_inactive>
+ <allow_active>yes</allow_active>
+ </defaults>
+ </action>
+
<action id="org.freedesktop.sysupdate1.manage-features">
<description gettext-domain="systemd">Manage optional features</description>
<message gettext-domain="systemd">Authentication is required to manage optional features.</message>
case JOB_LIST:
case JOB_DESCRIBE:
case JOB_CHECK_NEW:
- action = "org.freedesktop.sysupdate1.check";
+ action = "org.freedesktop.sysupdate1.cancel-check";
break;
case JOB_ACQUIRE:
case JOB_INSTALL:
if (j->version)
- action = "org.freedesktop.sysupdate1.update-to-version";
+ action = "org.freedesktop.sysupdate1.cancel-update-to-version";
else
- action = "org.freedesktop.sysupdate1.update";
+ action = "org.freedesktop.sysupdate1.cancel-update";
break;
case JOB_VACUUM:
- action = "org.freedesktop.sysupdate1.vacuum";
+ action = "org.freedesktop.sysupdate1.cancel-vacuum";
break;
case JOB_DESCRIBE_FEATURE: