Bug 1309839

Summary: SELinux is preventing systemd-rfkill from 'read' accesses on the file /var/lib/systemd/rfkill/pci-0000:00:14.0-usb-0:4:1.0:bluetooth.
Product: [Fedora] Fedora Reporter: Andrew Cook <ariscop>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: dominick.grift, dwalsh, lvrabec, mgrepl, mmalik, plautrba
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:2ec7bee4095c290340395f317931f4c368f0d8d2a0e1a0f4748158dbf1360259;VARIANT_ID=workstation;
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-02-18 20:54:00 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Andrew Cook 2016-02-18 19:47:01 UTC
Description of problem:
SELinux is preventing systemd-rfkill from 'read' accesses on the file /var/lib/systemd/rfkill/pci-0000:00:14.0-usb-0:4:1.0:bluetooth.

*****  Plugin restorecon (99.5 confidence) suggests   ************************

If you want to fix the label. 
/var/lib/systemd/rfkill/pci-0000:00:14.0-usb-0:4:1.0:bluetooth default label should be systemd_rfkill_var_lib_t.
Then you can run restorecon.
Do
# /sbin/restorecon -v /var/lib/systemd/rfkill/pci-0000:00:14.0-usb-0:4:1.0:bluetooth

*****  Plugin catchall (1.49 confidence) suggests   **************************

If you believe that systemd-rfkill should be allowed read access on the pci-0000:00:14.0-usb-0:4:1.0:bluetooth file by default.
Then you should report this as a bug.
You can generate a local policy module to allow this access.
Do
allow this access for now by executing:
# grep systemd-rfkill /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:systemd_rfkill_t:s0
Target Context                system_u:object_r:init_var_lib_t:s0
Target Objects                /var/lib/systemd/rfkill/pci-0000:00:14.0-usb-0:4:1
                              .0:bluetooth [ file ]
Source                        systemd-rfkill
Source Path                   systemd-rfkill
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.13.1-171.fc24.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 4.5.0-0.rc3.git3.1.fc24.x86_64 #1
                              SMP Fri Feb 12 17:59:03 UTC 2016 x86_64 x86_64
Alert Count                   1
First Seen                    2016-02-18 19:09:40 AEDT
Last Seen                     2016-02-18 19:09:40 AEDT
Local ID                      a7119a20-7af6-4e10-b3bb-e270e11330ec

Raw Audit Messages
type=AVC msg=audit(1455782980.490:735): avc:  denied  { read } for  pid=12765 comm="systemd-rfkill" name="pci-0000:00:14.0-usb-0:4:1.0:bluetooth" dev="sdc4" ino=1276465 scontext=system_u:system_r:systemd_rfkill_t:s0 tcontext=system_u:object_r:init_var_lib_t:s0 tclass=file permissive=0


Hash: systemd-rfkill,systemd_rfkill_t,init_var_lib_t,file,read

Version-Release number of selected component:
selinux-policy-3.13.1-171.fc24.noarch

Additional info:
reporter:       libreport-2.6.4
hashmarkername: setroubleshoot
kernel:         4.5.0-0.rc3.git3.1.fc24.x86_64
type:           libreport

Comment 1 Andrew Cook 2016-02-18 20:54:00 UTC

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