summaryrefslogtreecommitdiffstats
path: root/block
diff options
context:
space:
mode:
authorMichal Privoznik <mprivozn@redhat.com>2014-12-14 13:36:52 +0100
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2014-12-19 23:01:03 +0100
commitad1d8313cdeec8bc10cecb2143d047eb565b9f65 (patch)
tree456df70b2c1e6d0df4c94c2e199575b6d687bff5 /block
parentRevert "tools: cpupower: fix return checks for sysfs_get_idlestate_count()" (diff)
downloadlinux-ad1d8313cdeec8bc10cecb2143d047eb565b9f65.tar.xz
linux-ad1d8313cdeec8bc10cecb2143d047eb565b9f65.zip
tools / cpupower: Correctly detect if running as root
Some operations, like frequency-set, need root privileges. However, the way that this is detected is not correct. The getuid() is called, while in fact geteuid() should be. This way we can allow distributions or users to set SETUID flags on the cpupower binary if they want to and let regular users change the cpu frequency governor. Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Acked-by: Thomas Renninger <trenn@suse.de> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'block')
0 files changed, 0 insertions, 0 deletions