Bug 1324650

Summary: SELinux is preventing systemd from 'open' accesses on the file /etc/systemd/system/macspoof@.service.
Product: [Fedora] Fedora Reporter: Christian Stadelmann <fedora>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 24CC: dominick.grift, dwalsh, lvrabec, mgrepl, plautrba
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:6181a2b154cf803ce8c945bb2ce9f53e98d1ecee73bfb737d301089cd35a3081;VARIANT_ID=workstation;
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-04-07 20:00:37 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 Christian Stadelmann 2016-04-06 21:17:18 UTC
Description of problem:
This happened while running `dnf system-upgrade` from Fedora 23 to Fedora 24.
SELinux is preventing systemd from 'open' accesses on the file /etc/systemd/system/macspoof@.service.

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

If you want to fix the label. 
/etc/systemd/system/macspoof@.service default label should be systemd_unit_file_t.
Then you can run restorecon.
Do
# /sbin/restorecon -v /etc/systemd/system/macspoof@.service

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

If you believe that systemd should be allowed open access on the macspoof@.service 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:
# ausearch -c systemd --raw | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:init_t:s0
Target Context                unconfined_u:object_r:user_tmp_t:s0
Target Objects                /etc/systemd/system/macspoof@.service [ file ]
Source                        systemd
Source Path                   systemd
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.13.1-180.fc24.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 4.4.6-301.fc23.x86_64 #1 SMP Wed
                              Mar 30 16:43:58 UTC 2016 x86_64 x86_64
Alert Count                   15
First Seen                    2016-04-06 18:19:59 CEST
Last Seen                     2016-04-06 18:26:11 CEST
Local ID                      972ecdec-1dcc-4fd5-a748-d0bb44ce468a

Raw Audit Messages
type=AVC msg=audit(1459959971.803:464): avc:  denied  { open } for  pid=1 comm="systemd" path="/etc/systemd/system/macspoof@.service" dev="dm-0" ino=659346 scontext=system_u:system_r:init_t:s0 tcontext=unconfined_u:object_r:user_tmp_t:s0 tclass=file permissive=0


Hash: systemd,init_t,user_tmp_t,file,open

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

Additional info:
reporter:       libreport-2.6.4
hashmarkername: setroubleshoot
kernel:         4.5.0-302.fc24.x86_64
type:           libreport

Comment 1 Daniel Walsh 2016-04-07 20:00:37 UTC
The alert told you what to do.


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

If you want to fix the label. 
/etc/systemd/system/macspoof@.service default label should be systemd_unit_file_t.
Then you can run restorecon.
Do
# /sbin/restorecon -v /etc/systemd/system/macspoof@.service