Bug 1264979

Summary: poweroff: Failed to execute operation: Access denied
Product: [Fedora] Fedora Reporter: Dr. David Alan Gilbert <dgilbert>
Component: systemdAssignee: systemd-maint
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 23CC: johannbg, jsynacek, lnykryn, msekleta, s, systemd-maint, zbyszek
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-09-22 09:55:26 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Dr. David Alan Gilbert 2015-09-21 19:29:31 UTC
Description of problem:
f22 xfce upgraded to f23
'poweroff' no longer works; I get 'Failed to execute operation: Access denied
Must be root.'


Version-Release number of selected component (if applicable):
systemd-222-4.fc23.x86_64

How reproducible:
75% ?

Steps to Reproduce:
1. poweroff


Actual results:
[dgilbert@dgilbert-t530 ~]$ poweroff
Failed to execute operation: Access denied
Must be root.
[41635.440352] audit: type=1107 audit(1442863575.870:1206): pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='avc:  denied  { start } for auid=n/a uid=0 gid=0 path="/usr/lib/systemd/system/poweroff.target" cmdline="/usr/lib/systemd/systemd-logind" scontext=system_u:system_r:systemd_logind_t:s0 tcontext=system_u:object_r:power_unit_file_t:s0 tclass=service


Expected results:
peace, quiet and a black screen.

Additional info:

Comment 1 Dr. David Alan Gilbert 2015-09-21 19:31:11 UTC
Actually, it's worse than this;
sudo poweroff doesn't help in this case either:

[41864.433658] audit: type=1107 audit(1442863804.802:1224): pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='avc:  denied  { start } for auid=1000 uid=0 gid=0 path="/usr/lib/systemd/system/poweroff.target" cmdline="poweroff" scontext=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 tcontext=system_u:object_r:power_unit_file_t:s0 tclass=service
                exe="/usr/lib/systemd/systemd" sauid=0 hostname=? addr=? terminal=?'
Failed to start poweroff.target: Access denied

(I'm reasonably sure I've had it work once after I upgraded to f23?!)

Comment 2 Michal Sekletar 2015-09-21 19:53:20 UTC
Can you verify that also selinux-policy is upgraded to version from F23?

Comment 3 Dr. David Alan Gilbert 2015-09-22 09:07:19 UTC
(In reply to Michal Sekletar from comment #2)
> Can you verify that also selinux-policy is upgraded to version from F23?

[dgilbert@dgilbert-t530 ~]$ rpm -qa selinux-policy
selinux-policy-3.13.1-147.fc23.noarch

looks like it.

Dave

Comment 4 Jan Synacek 2015-09-22 09:55:26 UTC
I believe this is a duplicate of https://bugzilla.redhat.com/show_bug.cgi?id=1264051. Forced reboot should work around this.

*** This bug has been marked as a duplicate of bug 1264051 ***