Bug 1342587

Summary: SELinux is preventing /usr/bin/python2.7 from 'create' accesses on the directory /run/.
Product: Red Hat Enterprise Linux 7 Reporter: Matěj Cepl <mcepl>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED DUPLICATE QA Contact: Milos Malik <mmalik>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.3CC: lvrabec, mgrepl, mmalik, plautrba, pvrabec, ssekidde, twoerner
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard: abrt_hash:7fc39c7957258acddfb511775abd7c5448549a7aa0dacdbc93c5f4208146e33a
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-06-07 11:18:58 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 Matěj Cepl 2016-06-03 15:28:15 UTC
Description of problem:
When upgrading firewalld from RHEL-7.3Nightly I got this.
SELinux is preventing /usr/bin/python2.7 from 'create' accesses on the directory /run/.

WHen upgrading firewalld this is what happened.

*****  Plugin catchall (100. confidence) suggests   **************************

If you believe that python2.7 should be allowed create access on the  directory 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 firewalld /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:firewalld_t:s0
Target Context                system_u:object_r:var_run_t:s0
Target Objects                /run/ [ dir ]
Source                        firewalld
Source Path                   /usr/bin/python2.7
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           python-2.7.5-44.el7.x86_64
Target RPM Packages           filesystem-3.2-21.el7.x86_64
Policy RPM                    selinux-policy-3.13.1-75.el7.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 3.10.0-382.el7.rhel73drm.17.x86_64
                              #1 SMP Tue Apr 26 09:37:17 EDT 2016 x86_64 x86_64
Alert Count                   1
First Seen                    2016-06-03 17:26:56 CEST
Last Seen                     2016-06-03 17:26:56 CEST
Local ID                      bda15520-0789-498d-8c5e-ee26e3be4380

Raw Audit Messages
type=AVC msg=audit(1464967616.751:20259): avc:  denied  { create } for  pid=1054 comm="firewalld" name="firewalld" scontext=system_u:system_r:firewalld_t:s0 tcontext=system_u:object_r:var_run_t:s0 tclass=dir


type=SYSCALL msg=audit(1464967616.751:20259): arch=x86_64 syscall=mkdir success=no exit=EACCES a0=23942e0 a1=1e8 a2=7f93c5ad6fa8 a3=7fff6a8deff0 items=2 ppid=1 pid=1054 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm=firewalld exe=/usr/bin/python2.7 subj=system_u:system_r:firewalld_t:s0 key=(null)

type=CWD msg=audit(1464967616.751:20259): cwd=/

type=PATH msg=audit(1464967616.751:20259): item=0 name=/run/ inode=8776 dev=00:13 mode=040755 ouid=0 ogid=0 rdev=00:00 obj=system_u:object_r:var_run_t:s0 objtype=PARENT

type=PATH msg=audit(1464967616.751:20259): item=1 name=/run/firewalld objtype=CREATE

Hash: firewalld,firewalld_t,var_run_t,dir,create

Version-Release number of selected component:
selinux-policy-3.13.1-75.el7.noarch

Additional info:
reporter:       libreport-2.1.11.1
hashmarkername: setroubleshoot
kernel:         3.10.0-382.el7.rhel73drm.17.x86_64
reproducible:   Not sure how to reproduce the problem
type:           libreport

Comment 1 Thomas Woerner 2016-06-06 13:29:27 UTC
Please have a look at #1304723

Comment 2 Thomas Woerner 2016-06-07 11:18:58 UTC

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