Bug 1371198

Summary: SELinux is preventing hpfax from 'open' accesses on the file /usr/lib64/python3.5/site-packages/python_dateutil-2.5.3-py3.5.egg.
Product: [Fedora] Fedora Reporter: phutauruk <phutauruk>
Component: selinux-policyAssignee: Lukas Vrabec <lvrabec>
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:0f9d63e71678274b395d7a09c127052327205f60e8e9d7c50143c01c49bd399a;VARIANT_ID=workstation;
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-08-30 11:28:12 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 phutauruk 2016-08-29 14:30:04 UTC
Description of problem:
SELinux is preventing hpfax from 'open' accesses on the file /usr/lib64/python3.5/site-packages/python_dateutil-2.5.3-py3.5.egg.

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

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

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

If you believe that hpfax should be allowed open access on the python_dateutil-2.5.3-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 'hpfax' --raw | audit2allow -M my-hpfax
# semodule -X 300 -i my-hpfax.pp

Additional Information:
Source Context                system_u:system_r:cupsd_t:s0-s0:c0.c1023
Target Context                unconfined_u:object_r:user_tmp_t:s0
Target Objects                /usr/lib64/python3.5/site-
                              packages/python_dateutil-2.5.3-py3.5.egg [ file ]
Source                        hpfax
Source Path                   hpfax
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.13.1-191.13.fc24.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 4.6.7-300.fc24.x86_64 #1 SMP Wed
                              Aug 17 18:48:43 UTC 2016 x86_64 x86_64
Alert Count                   12
First Seen                    2016-08-29 17:09:26 KST
Last Seen                     2016-08-29 23:24:34 KST
Local ID                      c5657474-879f-41d6-ab07-701d5a6a05e8

Raw Audit Messages
type=AVC msg=audit(1472480674.56:221): avc:  denied  { open } for  pid=2444 comm="hpfax" path="/usr/lib64/python3.5/site-packages/python_dateutil-2.5.3-py3.5.egg" dev="sda7" ino=695344 scontext=system_u:system_r:cupsd_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:user_tmp_t:s0 tclass=file permissive=0


Hash: hpfax,cupsd_t,user_tmp_t,file,open

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

Additional info:
reporter:       libreport-2.7.2
hashmarkername: setroubleshoot
kernel:         4.6.7-300.fc24.x86_64
type:           libreport

Comment 1 Lukas Vrabec 2016-08-30 11:28:12 UTC
*****  Plugin restorecon (99.5 confidence) suggests   ************************

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