Bug 1203148 - SELinux is preventing hpfax from 'write' accesses on the file /usr/share/hplip/base/__pycache__/__init__.cpython-34.pyc.3068762472.
Summary: SELinux is preventing hpfax from 'write' accesses on the file /usr/share/hpli...
Keywords:
Status: CLOSED DUPLICATE of bug 1192761
Alias: None
Product: Fedora
Classification: Fedora
Component: hplip
Version: 22
Hardware: i686
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Tim Waugh
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:1b77801359bdc94e3dae229afd8...
: 1203149 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-03-18 09:21 UTC by Mikhail
Modified: 2015-03-20 12:28 UTC (History)
7 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2015-03-20 12:28:29 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Mikhail 2015-03-18 09:21:11 UTC
Description of problem:
SELinux is preventing hpfax from 'write' accesses on the file /usr/share/hplip/base/__pycache__/__init__.cpython-34.pyc.3068762472.

*****  Plugin catchall_labels (83.8 confidence) suggests   *******************

If you want to allow hpfax to have write access on the __init__.cpython-34.pyc.3068762472 file
Then you need to change the label on /usr/share/hplip/base/__pycache__/__init__.cpython-34.pyc.3068762472
Do
# semanage fcontext -a -t FILE_TYPE '/usr/share/hplip/base/__pycache__/__init__.cpython-34.pyc.3068762472'
where FILE_TYPE is one of the following: afs_cache_t, anon_inodefs_t, cupsd_interface_t, cupsd_lock_t, cupsd_log_t, cupsd_rw_etc_t, cupsd_tmp_t, cupsd_var_lib_t, cupsd_var_run_t, faillog_t, initrc_tmp_t, krb5_host_rcache_t, print_spool_t, puppet_tmp_t, samba_var_t, security_t, tmpfs_t, usbfs_t, user_cron_spool_t. 
Then execute: 
restorecon -v '/usr/share/hplip/base/__pycache__/__init__.cpython-34.pyc.3068762472'


*****  Plugin catchall (17.1 confidence) suggests   **************************

If you believe that hpfax should be allowed write access on the __init__.cpython-34.pyc.3068762472 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:
# grep hpfax /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:cupsd_t:s0-s0:c0.c1023
Target Context                system_u:object_r:usr_t:s0
Target Objects                /usr/share/hplip/base/__pycache__/__init__.cpython
                              -34.pyc.3068762472 [ file ]
Source                        hpfax
Source Path                   hpfax
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.13.1-116.fc22.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Host Name                     (removed)
Platform                      Linux (removed) 4.0.0-0.rc3.git0.1.fc22.i686+PAE
                              #1 SMP Mon Mar 9 13:53:28 UTC 2015 i686 i686
Alert Count                   1
First Seen                    2015-03-18 14:19:49 YEKT
Last Seen                     2015-03-18 14:19:49 YEKT
Local ID                      9609b78a-ae5d-40a4-a211-49d4928430ae

Raw Audit Messages
type=AVC msg=audit(1426670389.904:613): avc:  denied  { write } for  pid=5709 comm="hpfax" path="/usr/share/hplip/base/__pycache__/__init__.cpython-34.pyc.3068762472" dev="sda1" ino=1199831 scontext=system_u:system_r:cupsd_t:s0-s0:c0.c1023 tcontext=system_u:object_r:usr_t:s0 tclass=file permissive=1


Hash: hpfax,cupsd_t,usr_t,file,write

Version-Release number of selected component:
selinux-policy-3.13.1-116.fc22.noarch

Additional info:
reporter:       libreport-2.4.0
hashmarkername: setroubleshoot
kernel:         4.0.0-0.rc3.git0.1.fc22.i686+PAE
type:           libreport

Comment 1 Daniel Walsh 2015-03-18 12:36:21 UTC
Is this something new with Python3?

Comment 2 Daniel Walsh 2015-03-18 12:36:38 UTC
*** Bug 1203149 has been marked as a duplicate of this bug. ***

Comment 3 Lukas Vrabec 2015-03-20 12:17:09 UTC
Dan, 
Yes, there is one missing flag during building.


Moving to cupsd.

Comment 4 Tim Waugh 2015-03-20 12:28:29 UTC

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


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