polkit: annotate actions with an owner

this allows running modemmanager as non-root user
This commit is contained in:
2024-06-03 18:06:40 +00:00
parent 03f786ce66
commit fe0fee7be4

View File

@@ -16,6 +16,7 @@
<allow_inactive>no</allow_inactive> <allow_inactive>no</allow_inactive>
<allow_active>auth_admin</allow_active> <allow_active>auth_admin</allow_active>
</defaults> </defaults>
<annotate key="org.freedesktop.policykit.owner">unix-user:networkmanager</annotate>
</action> </action>
<action id="org.freedesktop.ModemManager1.Device.Control"> <action id="org.freedesktop.ModemManager1.Device.Control">
@@ -25,6 +26,7 @@
<allow_inactive>no</allow_inactive> <allow_inactive>no</allow_inactive>
<allow_active>@MM_DEFAULT_USER_POLICY@</allow_active> <allow_active>@MM_DEFAULT_USER_POLICY@</allow_active>
</defaults> </defaults>
<annotate key="org.freedesktop.policykit.owner">unix-user:networkmanager</annotate>
</action> </action>
<action id="org.freedesktop.ModemManager1.Contacts"> <action id="org.freedesktop.ModemManager1.Contacts">
@@ -34,6 +36,7 @@
<allow_inactive>no</allow_inactive> <allow_inactive>no</allow_inactive>
<allow_active>@MM_DEFAULT_USER_POLICY@</allow_active> <allow_active>@MM_DEFAULT_USER_POLICY@</allow_active>
</defaults> </defaults>
<annotate key="org.freedesktop.policykit.owner">unix-user:networkmanager</annotate>
</action> </action>
<action id="org.freedesktop.ModemManager1.Messaging"> <action id="org.freedesktop.ModemManager1.Messaging">
@@ -43,6 +46,7 @@
<allow_inactive>no</allow_inactive> <allow_inactive>no</allow_inactive>
<allow_active>@MM_DEFAULT_USER_POLICY@</allow_active> <allow_active>@MM_DEFAULT_USER_POLICY@</allow_active>
</defaults> </defaults>
<annotate key="org.freedesktop.policykit.owner">unix-user:networkmanager</annotate>
</action> </action>
<action id="org.freedesktop.ModemManager1.Voice"> <action id="org.freedesktop.ModemManager1.Voice">
@@ -52,6 +56,7 @@
<allow_inactive>no</allow_inactive> <allow_inactive>no</allow_inactive>
<allow_active>@MM_DEFAULT_USER_POLICY@</allow_active> <allow_active>@MM_DEFAULT_USER_POLICY@</allow_active>
</defaults> </defaults>
<annotate key="org.freedesktop.policykit.owner">unix-user:networkmanager</annotate>
</action> </action>
<action id="org.freedesktop.ModemManager1.Time"> <action id="org.freedesktop.ModemManager1.Time">
@@ -61,6 +66,7 @@
<allow_inactive>no</allow_inactive> <allow_inactive>no</allow_inactive>
<allow_active>@MM_DEFAULT_USER_POLICY@</allow_active> <allow_active>@MM_DEFAULT_USER_POLICY@</allow_active>
</defaults> </defaults>
<annotate key="org.freedesktop.policykit.owner">unix-user:networkmanager</annotate>
</action> </action>
<action id="org.freedesktop.ModemManager1.Location"> <action id="org.freedesktop.ModemManager1.Location">
@@ -70,6 +76,7 @@
<allow_inactive>no</allow_inactive> <allow_inactive>no</allow_inactive>
<allow_active>@MM_DEFAULT_USER_POLICY@</allow_active> <allow_active>@MM_DEFAULT_USER_POLICY@</allow_active>
</defaults> </defaults>
<annotate key="org.freedesktop.policykit.owner">unix-user:networkmanager</annotate>
</action> </action>
<action id="org.freedesktop.ModemManager1.USSD"> <action id="org.freedesktop.ModemManager1.USSD">
@@ -79,6 +86,7 @@
<allow_inactive>no</allow_inactive> <allow_inactive>no</allow_inactive>
<allow_active>@MM_DEFAULT_USER_POLICY@</allow_active> <allow_active>@MM_DEFAULT_USER_POLICY@</allow_active>
</defaults> </defaults>
<annotate key="org.freedesktop.policykit.owner">unix-user:networkmanager</annotate>
</action> </action>
<action id="org.freedesktop.ModemManager1.Firmware"> <action id="org.freedesktop.ModemManager1.Firmware">
@@ -88,6 +96,7 @@
<allow_inactive>no</allow_inactive> <allow_inactive>no</allow_inactive>
<allow_active>auth_admin</allow_active> <allow_active>auth_admin</allow_active>
</defaults> </defaults>
<annotate key="org.freedesktop.policykit.owner">unix-user:networkmanager</annotate>
</action> </action>
</policyconfig> </policyconfig>