chiark / gitweb /
polkit: add "imply" rules to a number of polkit actions
authorLennart Poettering <lennart@poettering.net>
Tue, 25 Dec 2012 10:36:37 +0000 (11:36 +0100)
committerLennart Poettering <lennart@poettering.net>
Mon, 31 Dec 2012 20:24:26 +0000 (21:24 +0100)
src/hostname/org.freedesktop.hostname1.policy.in
src/locale/org.freedesktop.locale1.policy.in
src/login/org.freedesktop.login1.policy.in
src/timedate/org.freedesktop.timedate1.policy.in

index df082d8..c32c1d4 100644 (file)
@@ -34,6 +34,7 @@
                         <allow_inactive>auth_admin_keep</allow_inactive>
                         <allow_active>auth_admin_keep</allow_active>
                 </defaults>
+                <annotate key="org.freedesktop.policykit.imply">org.freedesktop.hostname1.set-hostname org.freedesktop.hostname1.set-machine-info</annotate>
         </action>
 
         <action id="org.freedesktop.hostname1.set-machine-info">
index 91296c2..df63845 100644 (file)
@@ -24,6 +24,7 @@
                         <allow_inactive>auth_admin_keep</allow_inactive>
                         <allow_active>auth_admin_keep</allow_active>
                 </defaults>
+                <annotate key="org.freedesktop.policykit.imply">org.freedesktop.locale1.set-keyboard</annotate>
         </action>
 
         <action id="org.freedesktop.locale1.set-keyboard">
index 57dfb2a..b5f5db4 100644 (file)
@@ -24,6 +24,7 @@
                         <allow_inactive>yes</allow_inactive>
                         <allow_active>yes</allow_active>
                 </defaults>
+                <annotate key="org.freedesktop.policykit.imply">org.freedesktop.login1.inhibit-delay-shutdown org.freedesktop.login1.inhibit-block-sleep org.freedesktop.login1.inhibit-delay-sleep org.freedesktop.login1.inhibit-block-idle</annotate>
         </action>
 
         <action id="org.freedesktop.login1.inhibit-delay-shutdown">
@@ -34,6 +35,7 @@
                         <allow_inactive>yes</allow_inactive>
                         <allow_active>yes</allow_active>
                 </defaults>
+                <annotate key="org.freedesktop.policykit.imply">org.freedesktop.login1.inhibit-delay-sleep</annotate>
         </action>
 
         <action id="org.freedesktop.login1.inhibit-block-sleep">
@@ -44,6 +46,7 @@
                         <allow_inactive>yes</allow_inactive>
                         <allow_active>yes</allow_active>
                 </defaults>
+                <annotate key="org.freedesktop.policykit.imply">org.freedesktop.login1.inhibit-delay-sleep org.freedesktop.login1.inhibit-block-idle</annotate>
         </action>
 
         <action id="org.freedesktop.login1.inhibit-delay-sleep">
@@ -74,6 +77,7 @@
                         <allow_inactive>yes</allow_inactive>
                         <allow_active>yes</allow_active>
                 </defaults>
+                <annotate key="org.freedesktop.policykit.imply">org.freedesktop.login1.inhibit-handle-suspend-key org.freedesktop.login1.inhibit-handle-hibernate-key org.freedesktop.login1.inhibit-handle-lid-switch</annotate>
         </action>
 
         <action id="org.freedesktop.login1.inhibit-handle-suspend-key">
@@ -84,6 +88,7 @@
                         <allow_inactive>yes</allow_inactive>
                         <allow_active>yes</allow_active>
                 </defaults>
+                <annotate key="org.freedesktop.policykit.imply">org.freedesktop.login1.inhibit-handle-hibernate-key org.freedesktop.login1.inhibit-handle-lid-switch</annotate>
         </action>
 
         <action id="org.freedesktop.login1.inhibit-handle-hibernate-key">
                         <allow_inactive>auth_admin_keep</allow_inactive>
                         <allow_active>auth_admin_keep</allow_active>
                 </defaults>
+                <annotate key="org.freedesktop.policykit.imply">org.freedesktop.login1.flush-devices</annotate>
         </action>
 
         <action id="org.freedesktop.login1.flush-devices">
                         <allow_inactive>auth_admin_keep</allow_inactive>
                         <allow_active>auth_admin_keep</allow_active>
                 </defaults>
+                <annotate key="org.freedesktop.policykit.imply">org.freedesktop.login1.power-off</annotate>
         </action>
 
         <action id="org.freedesktop.login1.power-off-ignore-inhibit">
                         <allow_inactive>auth_admin_keep</allow_inactive>
                         <allow_active>auth_admin_keep</allow_active>
                 </defaults>
+                <annotate key="org.freedesktop.policykit.imply">org.freedesktop.login1.power-off</annotate>
         </action>
 
         <action id="org.freedesktop.login1.reboot">
                         <allow_inactive>auth_admin_keep</allow_inactive>
                         <allow_active>auth_admin_keep</allow_active>
                 </defaults>
+                <annotate key="org.freedesktop.policykit.imply">org.freedesktop.login1.reboot</annotate>
         </action>
 
         <action id="org.freedesktop.login1.reboot-ignore-inhibit">
                         <allow_inactive>auth_admin_keep</allow_inactive>
                         <allow_active>auth_admin_keep</allow_active>
                 </defaults>
+                <annotate key="org.freedesktop.policykit.imply">org.freedesktop.login1.reboot</annotate>
         </action>
 
         <action id="org.freedesktop.login1.suspend">
                         <allow_inactive>auth_admin_keep</allow_inactive>
                         <allow_active>yes</allow_active>
                 </defaults>
+                <annotate key="org.freedesktop.policykit.imply">org.freedesktop.login1.suspend</annotate>
         </action>
 
         <action id="org.freedesktop.login1.suspend-ignore-inhibit">
                         <allow_inactive>auth_admin_keep</allow_inactive>
                         <allow_active>auth_admin_keep</allow_active>
                 </defaults>
+                <annotate key="org.freedesktop.policykit.imply">org.freedesktop.login1.suspend</annotate>
         </action>
 
         <action id="org.freedesktop.login1.hibernate">
                         <allow_inactive>auth_admin_keep</allow_inactive>
                         <allow_active>auth_admin_keep</allow_active>
                 </defaults>
+                <annotate key="org.freedesktop.policykit.imply">org.freedesktop.login1.hibernate</annotate>
         </action>
 
         <action id="org.freedesktop.login1.hibernate-ignore-inhibit">
                         <allow_inactive>auth_admin_keep</allow_inactive>
                         <allow_active>auth_admin_keep</allow_active>
                 </defaults>
+                <annotate key="org.freedesktop.policykit.imply">org.freedesktop.login1.hibernate</annotate>
         </action>
 
 </policyconfig>
index dd0a54d..aa30b70 100644 (file)
@@ -24,6 +24,7 @@
                         <allow_inactive>auth_admin_keep</allow_inactive>
                         <allow_active>auth_admin_keep</allow_active>
                 </defaults>
+                <annotate key="org.freedesktop.policykit.imply">org.freedesktop.timedate1.set-timezone org.freedesktop.timedate1.set-ntp</annotate>
         </action>
 
         <action id="org.freedesktop.timedate1.set-timezone">