From 16f8cb67d3da7461216ae669976b8d9b46d5c2a6 Mon Sep 17 00:00:00 2001 From: Mike Hiretsky Date: Wed, 25 Aug 2010 15:11:53 +0400 Subject: [PATCH] Add rules for consolekit and upower --- client/domain/consolekit/.calculate_directory | 2 + .../org.freedesktop.consolekit.policy | 48 +++++++++++++++++++ .../undomain/consolekit/.calculate_directory | 2 + .../org.freedesktop.consolekit.policy | 48 +++++++++++++++++++ install/merge/upower/.calculate_directory | 2 + .../upower/org.freedesktop.upower.policy | 33 +++++++++++++ 6 files changed, 135 insertions(+) create mode 100644 client/domain/consolekit/.calculate_directory create mode 100644 client/domain/consolekit/org.freedesktop.consolekit.policy create mode 100644 client/undomain/consolekit/.calculate_directory create mode 100644 client/undomain/consolekit/org.freedesktop.consolekit.policy create mode 100644 install/merge/upower/.calculate_directory create mode 100644 install/merge/upower/org.freedesktop.upower.policy diff --git a/client/domain/consolekit/.calculate_directory b/client/domain/consolekit/.calculate_directory new file mode 100644 index 0000000..bada7dd --- /dev/null +++ b/client/domain/consolekit/.calculate_directory @@ -0,0 +1,2 @@ +# Calculate belong()!=&&pkg(sys-power/upower)!= path=/usr/share/polkit-1 name=actions + diff --git a/client/domain/consolekit/org.freedesktop.consolekit.policy b/client/domain/consolekit/org.freedesktop.consolekit.policy new file mode 100644 index 0000000..a8e7716 --- /dev/null +++ b/client/domain/consolekit/org.freedesktop.consolekit.policy @@ -0,0 +1,48 @@ + + + + + + + + + Stop the system + System policy prevents stopping the system + + no + no + + + + + Stop the system when multiple users are logged in + System policy prevents stopping the system when other users are logged in + + no + no + + + + + Restart the system + System policy prevents restarting the system + + no + no + + + + + Restart the system when multiple users are logged in + System policy prevents restarting the system when other users are logged in + + no + no + + + + diff --git a/client/undomain/consolekit/.calculate_directory b/client/undomain/consolekit/.calculate_directory new file mode 100644 index 0000000..bada7dd --- /dev/null +++ b/client/undomain/consolekit/.calculate_directory @@ -0,0 +1,2 @@ +# Calculate belong()!=&&pkg(sys-power/upower)!= path=/usr/share/polkit-1 name=actions + diff --git a/client/undomain/consolekit/org.freedesktop.consolekit.policy b/client/undomain/consolekit/org.freedesktop.consolekit.policy new file mode 100644 index 0000000..a709b39 --- /dev/null +++ b/client/undomain/consolekit/org.freedesktop.consolekit.policy @@ -0,0 +1,48 @@ + + + + + + + + + Stop the system + System policy prevents stopping the system + + no + yes + + + + + Stop the system when multiple users are logged in + System policy prevents stopping the system when other users are logged in + + no + auth_admin_keep + + + + + Restart the system + System policy prevents restarting the system + + no + yes + + + + + Restart the system when multiple users are logged in + System policy prevents restarting the system when other users are logged in + + no + auth_admin_keep + + + + diff --git a/install/merge/upower/.calculate_directory b/install/merge/upower/.calculate_directory new file mode 100644 index 0000000..bada7dd --- /dev/null +++ b/install/merge/upower/.calculate_directory @@ -0,0 +1,2 @@ +# Calculate belong()!=&&pkg(sys-power/upower)!= path=/usr/share/polkit-1 name=actions + diff --git a/install/merge/upower/org.freedesktop.upower.policy b/install/merge/upower/org.freedesktop.upower.policy new file mode 100644 index 0000000..5036eba --- /dev/null +++ b/install/merge/upower/org.freedesktop.upower.policy @@ -0,0 +1,33 @@ + + + + The DeviceKit-power Project + http://hal.freedesktop.org/docs/DeviceKit-power/ + system-suspend + + + Suspend the system + Authentication is required to suspend the system + + no + yes + + + + + Hibernate the system + Authentication is required to hibernate the system + + no +#os_install_root_type==livecd# + no +#os_install_root_type# +#os_install_root_type!=livecd# + yes +#os_install_root_type# + + + +