summaryrefslogtreecommitdiffstats
path: root/data
diff options
context:
space:
mode:
Diffstat (limited to 'data')
-rw-r--r--data/ConsoleKit.policy48
-rw-r--r--data/Makefile.am4
2 files changed, 52 insertions, 0 deletions
diff --git a/data/ConsoleKit.policy b/data/ConsoleKit.policy
new file mode 100644
index 0000000..fea8737
--- /dev/null
+++ b/data/ConsoleKit.policy
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE policyconfig PUBLIC
+ "-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN"
+ "http://www.freedesktop.org/standards/PolicyKit/1.0/policyconfig.dtd">
+
+<!--
+Policy definitions for ConsoleKit
+-->
+
+<policyconfig>
+
+ <action id="org.freedesktop.consolekit.system.stop">
+ <description>Stop the system</description>
+ <message>System policy prevents stopping the system</message>
+ <defaults>
+ <allow_inactive>no</allow_inactive>
+ <allow_active>yes</allow_active>
+ </defaults>
+ </action>
+
+ <action id="org.freedesktop.consolekit.system.stop-multiple-sessions">
+ <description>Stop the system when multiple users are logged in</description>
+ <message>System policy prevents stopping the when other users are logged in</message>
+ <defaults>
+ <allow_inactive>no</allow_inactive>
+ <allow_active>auth_admin</allow_active>
+ </defaults>
+ </action>
+
+ <action id="org.freedesktop.consolekit.system.restart">
+ <description>Restart the system</description>
+ <message>System policy prevents restarting the system</message>
+ <defaults>
+ <allow_inactive>no</allow_inactive>
+ <allow_active>yes</allow_active>
+ </defaults>
+ </action>
+
+ <action id="org.freedesktop.consolekit.system.restart-multiple-sessions">
+ <description>Restart the system when multiple users are logged in</description>
+ <message>System policy prevents restarting the system when other users are logged in</message>
+ <defaults>
+ <allow_inactive>no</allow_inactive>
+ <allow_active>auth_admin</allow_active>
+ </defaults>
+ </action>
+
+</policyconfig>
diff --git a/data/Makefile.am b/data/Makefile.am
index e2a237b..dc1bf1a 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -6,6 +6,10 @@ dbusconf_DATA = ConsoleKit.conf
seatdir = $(sysconfdir)/ConsoleKit/seats.d
seat_DATA = 00-primary.seat
+polkit_policydir = $(datadir)/PolicyKit/policy
+dist_polkit_policy_DATA = \
+ ConsoleKit.policy \
+ $(NULL)
servicedir = $(datadir)/dbus-1/system-services
service_in_files = org.freedesktop.ConsoleKit.service.in