Bug 1324650 - SELinux is preventing systemd from 'open' accesses on the file /etc/systemd/system/macspoof@.service.
Summary: SELinux is preventing systemd from 'open' accesses on the file /etc/systemd/s...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 24
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:6181a2b154cf803ce8c945bb2ce...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-04-06 21:17 UTC by Christian Stadelmann
Modified: 2016-04-07 20:00 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-04-07 20:00:37 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

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


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