Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1057577 - Allow openlmi-powermanagement to do 'systemctl --force reboot'
Summary: Allow openlmi-powermanagement to do 'systemctl --force reboot'
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: selinux-policy
Version: 7.0
Hardware: Unspecified
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Miroslav Grepl
QA Contact: Milos Malik
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-01-24 11:58 UTC by Radek Novacek
Modified: 2016-12-01 00:32 UTC (History)
2 users (show)

Fixed In Version: selinux-policy-3.12.1-121.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-06-13 13:02:03 UTC


Attachments (Terms of Use)

Description Radek Novacek 2014-01-24 11:58:03 UTC
OpenLMI PowerManagement provider can't call 'systemctl --force reboot' because of selinux denial. 

ausearch -m avc:

time->Fri Jan 24 11:11:53 2014
type=SYSCALL msg=audit(1390561913.884:564): arch=c000003e syscall=2 success=no exit=-13 a0=7f2a8684cd44 a1=80000 a2=7f2a8684cd35 a3=1 items=0 ppid=1 pid=8024 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="reboot" exe="/usr/bin/systemctl" subj=system_u:system_r:pegasus_openlmi_system_t:s0 key=(null)
type=AVC msg=audit(1390561913.884:564): avc:  denied  { read } for  pid=8024 comm="reboot" name="utmp" dev="tmpfs" ino=13105 scontext=system_u:system_r:pegasus_openlmi_system_t:s0 tcontext=system_u:object_r:initrc_var_run_t:s0 tclass=file
----
time->Fri Jan 24 11:11:53 2014
type=SYSCALL msg=audit(1390561913.884:565): arch=c000003e syscall=2 success=no exit=-13 a0=7f2a8684cd44 a1=80000 a2=7f2a8684cd35 a3=7f2a89161030 items=0 ppid=1 pid=8024 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="reboot" exe="/usr/bin/systemctl" subj=system_u:system_r:pegasus_openlmi_system_t:s0 key=(null)
type=AVC msg=audit(1390561913.884:565): avc:  denied  { read } for  pid=8024 comm="reboot" name="utmp" dev="tmpfs" ino=13105 scontext=system_u:system_r:pegasus_openlmi_system_t:s0 tcontext=system_u:object_r:initrc_var_run_t:s0 tclass=file
----
time->Fri Jan 24 11:11:53 2014
type=SYSCALL msg=audit(1390561913.885:566): arch=c000003e syscall=169 success=no exit=-1 a0=fffffffffee1dead a1=28121969 a2=ffffffff89abcdef a3=0 items=0 ppid=1 pid=8024 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="reboot" exe="/usr/bin/systemctl" subj=system_u:system_r:pegasus_openlmi_system_t:s0 key=(null)
type=AVC msg=audit(1390561913.885:566): avc:  denied  { sys_boot } for  pid=8024 comm="reboot" capability=22  scontext=system_u:system_r:pegasus_openlmi_system_t:s0 tcontext=system_u:system_r:pegasus_openlmi_system_t:s0 tclass=capability
----
time->Fri Jan 24 11:11:53 2014
type=SYSCALL msg=audit(1390561913.885:567): arch=c000003e syscall=169 success=no exit=-1 a0=fffffffffee1dead a1=28121969 a2=1234567 a3=0 items=0 ppid=1 pid=8024 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="reboot" exe="/usr/bin/systemctl" subj=system_u:system_r:pegasus_openlmi_system_t:s0 key=(null)
type=AVC msg=audit(1390561913.885:567): avc:  denied  { sys_boot } for  pid=8024 comm="reboot" capability=22  scontext=system_u:system_r:pegasus_openlmi_system_t:s0 tcontext=system_u:system_r:pegasus_openlmi_system_t:s0 tclass=capability
----
time->Fri Jan 24 11:11:53 2014
type=SYSCALL msg=audit(1390561913.885:568): arch=c000003e syscall=234 success=no exit=-13 a0=1f58 a1=1f58 a2=6 a3=8 items=0 ppid=1 pid=8024 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="reboot" exe="/usr/bin/systemctl" subj=system_u:system_r:pegasus_openlmi_system_t:s0 key=(null)
type=AVC msg=audit(1390561913.885:568): avc:  denied  { signal } for  pid=8024 comm="reboot" scontext=system_u:system_r:pegasus_openlmi_system_t:s0 tcontext=system_u:system_r:pegasus_openlmi_system_t:s0 tclass=process
----
time->Fri Jan 24 11:11:53 2014
type=SYSCALL msg=audit(1390561913.885:569): arch=c000003e syscall=234 success=no exit=-13 a0=1f58 a1=1f58 a2=6 a3=8 items=0 ppid=1 pid=8024 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="reboot" exe="/usr/bin/systemctl" subj=system_u:system_r:pegasus_openlmi_system_t:s0 key=(null)
type=AVC msg=audit(1390561913.885:569): avc:  denied  { signal } for  pid=8024 comm="reboot" scontext=system_u:system_r:pegasus_openlmi_system_t:s0 tcontext=system_u:system_r:pegasus_openlmi_system_t:s0 tclass=process

audit2allow:
#============= pegasus_openlmi_system_t ==============
allow pegasus_openlmi_system_t initrc_var_run_t:file read;
allow pegasus_openlmi_system_t self:capability sys_boot;
allow pegasus_openlmi_system_t self:process signal;

rpm -q selinux-policy:
selinux-policy-3.12.1-120.el7.noarch

Comment 2 Miroslav Grepl 2014-01-27 07:21:17 UTC
commit 0c061f9e2cc6b372bd4420583446c0696db218c2
Author: Miroslav Grepl <mgrepl@redhat.com>
Date:   Mon Jan 27 08:20:45 2014 +0100

    Allow OpenLMI PowerManagement to call 'systemctl --force reboot'

Comment 4 Ludek Smid 2014-06-13 13:02:03 UTC
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.


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