[PATCH] Allow root to use the CPUFreq methods

Holger Macht hmacht at suse.de
Thu Sep 14 08:31:01 PDT 2006


The following patch changes the privilege bahaviour of the CPUFreq addon.

Old behaviour: Allow all users with the privilege desktop-console to use
  the CPUFreq methods. Root can obtain the privilege, but doesn't possess
  it by default. This leads to all applications running as root and are
  using the methods to require to care about PolicyKit or even to link
  again libpolkit to obtain the privilege.

New behaviour: Only root is explicitely allowed to use the CPUFreq
  methods. But all others also get the privilege as long as they possess
  the desktop-console privilege.

Signed-Off-By: Holger Macht <hmacht at suse.de>
---

diff --git a/privileges/hal-power-cpufreq.privilege b/privileges/hal-power-cpufreq.privilege
index cee08b4..49df022 100644
--- a/privileges/hal-power-cpufreq.privilege
+++ b/privileges/hal-power-cpufreq.privilege
@@ -3,9 +3,9 @@ # This privilege specifies who is allowe
 # via the org.freedesktop.Hal.Device.CPUFreq interface
 
 [Privilege]
-RequiredPrivileges=desktop-console
-SufficientPrivileges=
-Allow=uid:__all__
+RequiredPrivileges=
+SufficientPrivileges=desktop-console
+Allow=uid:root
 Deny=
 CanObtain=True
 CanGrant=True


More information about the hal mailing list