summaryrefslogtreecommitdiff
path: root/sys-auth/consolekit/files/consolekit-shutdown-reboot-without-policies.patch
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /sys-auth/consolekit/files/consolekit-shutdown-reboot-without-policies.patch
reinit the tree, so we can have metadata
Diffstat (limited to 'sys-auth/consolekit/files/consolekit-shutdown-reboot-without-policies.patch')
-rw-r--r--sys-auth/consolekit/files/consolekit-shutdown-reboot-without-policies.patch26
1 files changed, 26 insertions, 0 deletions
diff --git a/sys-auth/consolekit/files/consolekit-shutdown-reboot-without-policies.patch b/sys-auth/consolekit/files/consolekit-shutdown-reboot-without-policies.patch
new file mode 100644
index 000000000000..6a46649f7587
--- /dev/null
+++ b/sys-auth/consolekit/files/consolekit-shutdown-reboot-without-policies.patch
@@ -0,0 +1,26 @@
+From: Romain Perier <mrpouet@gentoo.org>
+Date: Sat, 24 Oct 2009 18:43:43 +0200
+Subject: [PATCH] Be able to shutdown or reboot even without polkit or RBAC supports
+
+Ck does NOTHING at the origin if its built without polkit or RBAC supports, except
+display a warning using g_warning() (which does not make sense).
+The trick is to to call do_stop()/do_restart() in the #else directive :)
+
+--- src/ck-manager.c
++++ src/ck-manager.c
+@@ -1131,6 +1131,7 @@
+ check_rbac_permissions (manager, context, RBAC_SHUTDOWN_KEY, do_restart);
+ #else
+ g_warning ("Compiled without PolicyKit or RBAC support!");
++ do_restart(manager, context);
+ #endif
+
+ return TRUE;
+@@ -1207,6 +1208,7 @@
+ check_rbac_permissions (manager, context, RBAC_SHUTDOWN_KEY, do_stop);
+ #else
+ g_warning ("Compiled without PolicyKit or RBAC support!");
++ do_stop(manager, context);
+ #endif
+
+ return TRUE;