aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2014-03-26 11:31:15 -0300
committerSilvio Rhatto <rhatto@riseup.net>2014-03-26 11:31:15 -0300
commit584ffb92d1694b3b678f5afbfb3a4f57a3c84d1b (patch)
treeaadf60337342d2a64f80ca96727a44a30a28823f
parentc63b93d373bdd53cc6c70951eed3c29b56ba8c81 (diff)
downloadpuppet-nodo-584ffb92d1694b3b678f5afbfb3a4f57a3c84d1b.tar.gz
puppet-nodo-584ffb92d1694b3b678f5afbfb3a4f57a3c84d1b.tar.bz2
Allow regular users to power off the machine on nodo::base::desktop
-rw-r--r--files/polkit/org.freedesktop.consolekit.policy2
-rw-r--r--manifests/base/desktop.pp9
2 files changed, 10 insertions, 1 deletions
diff --git a/files/polkit/org.freedesktop.consolekit.policy b/files/polkit/org.freedesktop.consolekit.policy
index a709b39..be4b850 100644
--- a/files/polkit/org.freedesktop.consolekit.policy
+++ b/files/polkit/org.freedesktop.consolekit.policy
@@ -14,7 +14,7 @@ Policy definitions for ConsoleKit
<message>System policy prevents stopping the system</message>
<defaults>
<allow_inactive>no</allow_inactive>
- <allow_active>yes</allow_active>
+ <!--<allow_active>yes</allow_active>-->
</defaults>
</action>
diff --git a/manifests/base/desktop.pp b/manifests/base/desktop.pp
index bf9d2fe..7dd969c 100644
--- a/manifests/base/desktop.pp
+++ b/manifests/base/desktop.pp
@@ -4,4 +4,13 @@ class nodo::base::desktop inherits nodo::base::personal {
class { [ 'nodo::subsystem::fstab', 'nodo::subsystem::crypttab' ]:
type => 'desktop',
}
+
+ # Allow regular users to power off the machine (overrides policy kit default configuration)
+ file { '/usr/share/polkit-1/actions/org.freedesktop.consolekit.policy':
+ ensure => present,
+ owner => root,
+ group => root,
+ mode => 0644,
+ source => 'puppet:///modules/nodo/polkit/org.freedesktop.consolekit.policy',
+ }
}