Bug 1401514

Summary: SELinux is preventing /usr/bin/python3.5 from 'ioctl' accesses on the file /usr/lib/python3.5/site-packages/mkosi-1-py3.5.egg.
Product: [Fedora] Fedora Reporter: sheepdestroyer <sheepdestroyer>
Component: selinux-policyAssignee: Lukas Vrabec <lvrabec>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 25CC: dominick.grift, dwalsh, lvrabec, mgrepl, plautrba, pmoore, ssekidde
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:b35aaa9da978944d507e363c9988082512dab3ad597b17be78f6ffa51b0f25e3;VARIANT_ID=workstation;
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-12-05 13:37:06 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description sheepdestroyer 2016-12-05 13:34:41 UTC
Description of problem:
SELinux is preventing /usr/bin/python3.5 from 'ioctl' accesses on the file /usr/lib/python3.5/site-packages/mkosi-1-py3.5.egg.

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

If you want to fix the label. 
/usr/lib/python3.5/site-packages/mkosi-1-py3.5.egg default label should be lib_t.
Then you can run restorecon.
Do
# /sbin/restorecon -v /usr/lib/python3.5/site-packages/mkosi-1-py3.5.egg

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

If you believe that python3.5 should be allowed ioctl access on the mkosi-1-py3.5.egg 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 'firewalld' --raw | audit2allow -M my-firewalld
# semodule -X 300 -i my-firewalld.pp

Additional Information:
Source Context                system_u:system_r:firewalld_t:s0
Target Context                unconfined_u:object_r:user_home_t:s0
Target Objects                /usr/lib/python3.5/site-packages/mkosi-1-py3.5.egg
                              [ file ]
Source                        firewalld
Source Path                   /usr/bin/python3.5
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           python3-3.5.2-4.fc25.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.13.1-224.fc25.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Host Name                     (removed)
Platform                      Linux (removed) 4.8.10-300.fc25.x86_64 #1 SMP Mon
                              Nov 21 18:59:16 UTC 2016 x86_64 x86_64
Alert Count                   1
First Seen                    2016-12-05 00:17:31 CET
Last Seen                     2016-12-05 00:17:31 CET
Local ID                      8783fd63-e099-457f-bebc-25c1bd1f1485

Raw Audit Messages
type=AVC msg=audit(1480893451.570:160857): avc:  denied  { ioctl } for  pid=2890 comm="firewalld" path="/usr/lib/python3.5/site-packages/mkosi-1-py3.5.egg" dev="sda6" ino=1497374 ioctlcmd=0x5451 scontext=system_u:system_r:firewalld_t:s0 tcontext=unconfined_u:object_r:user_home_t:s0 tclass=file permissive=1


type=SYSCALL msg=audit(1480893451.570:160857): arch=x86_64 syscall=ioctl success=yes exit=0 a0=3 a1=5451 a2=0 a3=1 items=0 ppid=1 pid=2890 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/python3.5 subj=system_u:system_r:firewalld_t:s0 key=(null)

Hash: firewalld,firewalld_t,user_home_t,file,ioctl

Version-Release number of selected component:
selinux-policy-3.13.1-224.fc25.noarch

Additional info:
reporter:       libreport-2.8.0
hashmarkername: setroubleshoot
kernel:         4.8.10-300.fc25.x86_64
type:           libreport

Comment 1 Lukas Vrabec 2016-12-05 13:37:06 UTC

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