RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 625880 - respect PolicyKit privileges in can_{suspend,hibernate}
Summary: respect PolicyKit privileges in can_{suspend,hibernate}
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: DeviceKit-power
Version: 6.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Richard Hughes
QA Contact: qe-baseos-daemons
URL:
Whiteboard:
: 645462 (view as bug list)
Depends On:
Blocks: 662543
TreeView+ depends on / blocked
 
Reported: 2010-08-20 17:12 UTC by ritz
Modified: 2018-11-14 19:19 UTC (History)
8 users (show)

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.
Clone Of:
Environment:
Last Closed: 2011-09-07 13:05:10 UTC
Target Upstream Version:
Embargoed:


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


Links
System ID Private Priority Status Summary Last Updated
Red Hat Knowledge Base (Legacy) 33954 0 None None None Never
Red Hat Knowledge Base (Legacy) 43515 0 None None None Never
Red Hat Product Errata RHEA-2011:1276 0 normal SHIPPED_LIVE DeviceKit-power enhancement update 2011-09-07 13:04:58 UTC

Description ritz 2010-08-20 17:12:12 UTC
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 16:33:32 UTC
*** Bug 645462 has been marked as a duplicate of this bug. ***

Comment 2 Suzanne Logcher 2011-01-05 19:43:33 UTC
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 16:02:40 UTC
    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 13:05:10 UTC
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.