This service will be undergoing maintenance at 00:00 UTC, 2016-08-01. It is expected to last about 1 hours

Bug 824137

Summary: SELinux is preventing /lib/systemd/systemd-logind from 'setattr' accesses on the blk_file sr0.
Product: [Fedora] Fedora Reporter: Dave <dave>
Component: libvirtAssignee: Libvirt Maintainers <libvirt-maint>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 16CC: berrange, clalancette, crobinso, dominick.grift, dougsland, dwalsh, itamar, jforbes, jyang, laine, libvirt-maint, mgrepl, veillard, virt-maint
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Unspecified   
Whiteboard: abrt_hash:fa0344e188cf72546e973ddb607bbbb0c03178c7102362f48185e7ed9a77d33c
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-06-07 16:31:25 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:

Description Dave 2012-05-22 15:48:31 EDT
libreport version: 2.0.8
executable:     /usr/bin/python2.7
hashmarkername: setroubleshoot
kernel:         3.3.5-2.fc16.i686.PAE
reason:         SELinux is preventing /lib/systemd/systemd-logind from 'setattr' accesses on the blk_file sr0.
time:           Tue 22 May 2012 01:45:58 PM MST

:SELinux is preventing /lib/systemd/systemd-logind from 'setattr' accesses on the blk_file sr0.
:*****  Plugin catchall (100. confidence) suggests  ***************************
:If you believe that systemd-logind should be allowed setattr access on the sr0 blk_file by default.
:Then you should report this as a bug.
:You can generate a local policy module to allow this access.
:allow this access for now by executing:
:# grep systemd-logind /var/log/audit/audit.log | audit2allow -M mypol
:# semodule -i mypol.pp
:Additional Information:
:Source Context                system_u:system_r:systemd_logind_t:s0
:Target Context                system_u:object_r:virt_content_t:s0
:Target Objects                sr0 [ blk_file ]
:Source                        systemd-logind
:Source Path                   /lib/systemd/systemd-logind
:Port                          <Unknown>
:Host                          (removed)
:Source RPM Packages           systemd-37-19.fc16.i686
:Target RPM Packages           
:Policy RPM                    selinux-policy-3.10.0-86.fc16.noarch
:Selinux Enabled               True
:Policy Type                   targeted
:Enforcing Mode                Enforcing
:Host Name                     (removed)
:Platform                      Linux (removed) 3.3.5-2.fc16.i686.PAE #1
:                              SMP Tue May 8 11:43:02 UTC 2012 i686 i686
:Alert Count                   2
:First Seen                    Tue 22 May 2012 12:44:01 PM MST
:Last Seen                     Tue 22 May 2012 12:44:03 PM MST
:Local ID                      a36215f0-4fda-429e-b237-57ef5bda16df
:Raw Audit Messages
:type=AVC msg=audit(1337715843.568:3377): avc:  denied  { setattr } for  pid=2134 comm="systemd-logind" name="sr0" dev="devtmpfs" ino=7593 scontext=system_u:system_r:systemd_logind_t:s0 tcontext=system_u:object_r:virt_content_t:s0 tclass=blk_file
:type=SYSCALL msg=audit(1337715843.568:3377): arch=i386 syscall=setxattr success=yes exit=0 a0=9078220 a1=45f05d37 a2=9078d08 a3=2c items=0 ppid=1 pid=2134 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm=systemd-logind exe=/lib/systemd/systemd-logind subj=system_u:system_r:systemd_logind_t:s0 key=(null)
:Hash: systemd-logind,systemd_logind_t,virt_content_t,blk_file,setattr
:#============= systemd_logind_t ==============
:#!!!! This avc is allowed in the current policy
:allow systemd_logind_t virt_content_t:blk_file setattr;
:audit2allow -R
:#============= systemd_logind_t ==============
:#!!!! This avc is allowed in the current policy
:allow systemd_logind_t virt_content_t:blk_file setattr;
Comment 1 Daniel Walsh 2012-05-24 09:59:41 EDT
This is a libvirt bug, it should not be changing labels of /dev/ devices to virt_content_t, it should return them to their default label.

restorecon /dev/sr0
Comment 2 Cole Robinson 2012-06-07 16:31:25 EDT

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