Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 625880 - respect PolicyKit privileges in can_{suspend,hibernate}
respect PolicyKit privileges in can_{suspend,hibernate}
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: DeviceKit-power (Show other bugs)
6.0
All Linux
medium Severity medium
: rc
: ---
Assigned To: Richard Hughes
qe-baseos-daemons
: Patch
: 645462 (view as bug list)
Depends On:
Blocks: 662543
  Show dependency treegraph
 
Reported: 2010-08-20 13:12 EDT by ritz
Modified: 2011-09-13 08:17 EDT (History)
8 users (show)

See Also:
Fixed In Version: DeviceKit-power-014-2
Doc Type: Bug Fix
Doc Text:
To allow administrators easily disable the suspend and hibernate actions on the system, DeviceKit-power now checks the PolicyKit authorization before deciding whether an action can be completed.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2011-09-07 09:05:10 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
patch based on upstream code (7.98 KB, patch)
2010-08-20 13:12 EDT, ritz
no flags Details | Diff


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Knowledge Base (Legacy) 33954 None None None Never
Red Hat Knowledge Base (Legacy) 43515 None None None Never
Red Hat Product Errata RHEA-2011:1276 normal SHIPPED_LIVE DeviceKit-power enhancement update 2011-09-07 09:04:58 EDT

  None (edit)
Description ritz 2010-08-20 13:12:12 EDT
Created attachment 439995 [details]
patch based on upstream code

Description of problem:
to disable suspend/hibernate. Obviously this isn't a very clean approach. It
would be much better if upower would actually take the policykit privileges
into account for reporting the values to clients, so that gnome-power-prefs,
gnome-session, and other clients would do the right thing and hide the
suspend/hibernate options if the admin (or an OEM) disables those privileges
through a .pkla file, or if the defaults simply change in the future.


Version-Release number of selected component (if applicable):
DeviceKit-power-014-1.el6

How reproducible:
always

Steps to Reproduce:
1. $ cat /var/lib/polkit-1/localauthority/10-vendor.d/20-hibernate.pkla 
[Disable suspend]
Identity=unix-group:*
Action=org.freedesktop.devicekit.power.hibernate
ResultAny=no
ResultInactive=no
ResultActive=no

2. Login as a regulare user
3. Select Shutdown from gnome application menu.
  
Actual results:
Hibernate option is listed

Expected results:
Hibernate should not be listed


Additional info:
upstream bz - http://bugs.freedesktop.org/show_bug.cgi?id=26473
patch attached.
Comment 1 Ray Strode [halfline] 2010-10-21 12:33:32 EDT
*** Bug 645462 has been marked as a duplicate of this bug. ***
Comment 2 Suzanne Yeghiayan 2011-01-05 14:43:33 EST
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated 
in the current release, Red Hat is unfortunately unable to 
address this request at this time.  This request has been 
proposed for the next release of Red Hat Enterprise Linux.
If you would like it considered as an exception in the 
current release, please ask your support representative.
Comment 7 Petr Kovar 2011-07-26 12:02:40 EDT
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
To allow administrators easily disable the suspend and hibernate actions on the system, DeviceKit-power now checks the PolicyKit authorization before deciding whether an action can be completed.
Comment 10 errata-xmlrpc 2011-09-07 09:05:10 EDT
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHEA-2011-1276.html

Note You need to log in before you can comment on or make changes to this bug.