Bug 1192761 - SELinux is preventing hpfax from 'create' accesses on the directory __pycache__.
Summary: SELinux is preventing hpfax from 'create' accesses on the directory __pycache__.
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: hplip
Version: 22
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Tim Waugh
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:5f1339062b51e6cd6fb46f56289...
: 1203148 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-02-15 06:29 UTC by Joachim Frieben
Modified: 2015-03-21 04:52 UTC (History)
8 users (show)

Fixed In Version: hplip-3.15.2-6.fc22
Clone Of:
Environment:
Last Closed: 2015-03-21 04:52:59 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Launchpad 1427652 0 None None None Never

Description Joachim Frieben 2015-02-15 06:29:26 UTC
Description of problem:
Alert occurred when installing a new printer (HP LaserJet 4000 N).
SELinux is preventing hpfax from 'create' accesses on the directory __pycache__.

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

If you want to allow hpfax to have create access on the __pycache__ directory
Then you need to change the label on __pycache__
Do
# semanage fcontext -a -t FILE_TYPE '__pycache__'
where FILE_TYPE is one of the following: cupsd_log_t, cupsd_rw_etc_t, cupsd_tmp_t, cupsd_var_run_t, print_spool_t. 
Then execute: 
restorecon -v '__pycache__'


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

If you believe that hpfax should be allowed create access on the __pycache__ 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 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                __pycache__ [ dir ]
Source                        hpfax
Source Path                   hpfax
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.13.1-110.fc22.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 3.20.0-0.rc0.git5.1.fc22.x86_64 #1
                              SMP Fri Feb 13 16:13:52 UTC 2015 x86_64 x86_64
Alert Count                   23
First Seen                    2015-02-15 07:27:40 CET
Last Seen                     2015-02-15 07:27:41 CET
Local ID                      ba0fa015-2024-4dbe-8dc3-33812c153b59

Raw Audit Messages
type=AVC msg=audit(1423981661.665:565): avc:  denied  { create } for  pid=2619 comm="hpfax" name="__pycache__" scontext=system_u:system_r:cupsd_t:s0-s0:c0.c1023 tcontext=system_u:object_r:usr_t:s0 tclass=dir permissive=0


Hash: hpfax,cupsd_t,usr_t,dir,create

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

Additional info:
reporter:       libreport-2.3.0
hashmarkername: setroubleshoot
kernel:         3.20.0-0.rc0.git5.1.fc22.x86_64
type:           libreport

Comment 1 Tim Waugh 2015-02-16 16:32:37 UTC
Perhaps /usr/lib/cups/backend/hpfax needs to have '-B' in line 1?

Comment 2 Lukas Vrabec 2015-02-16 17:00:59 UTC
Agree with comment 1.

Comment 3 Fedora Update System 2015-03-03 15:07:10 UTC
hplip-3.15.2-3.fc22 has been submitted as an update for Fedora 22.
https://admin.fedoraproject.org/updates/hplip-3.15.2-3.fc22

Comment 4 Fedora Update System 2015-03-04 21:07:00 UTC
Package hplip-3.15.2-3.fc22:
* should fix your issue,
* was pushed to the Fedora 22 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing hplip-3.15.2-3.fc22'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2015-3066/hplip-3.15.2-3.fc22
then log in and leave karma (feedback).

Comment 5 Fedora Update System 2015-03-13 17:27:08 UTC
Package hplip-3.15.2-5.fc22:
* should fix your issue,
* was pushed to the Fedora 22 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing hplip-3.15.2-5.fc22'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2015-3066/hplip-3.15.2-4.fc22
then log in and leave karma (feedback).

Comment 6 Fedora Update System 2015-03-18 10:23:05 UTC
Package hplip-3.15.2-6.fc22:
* should fix your issue,
* was pushed to the Fedora 22 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing hplip-3.15.2-6.fc22'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2015-3066/hplip-3.15.2-6.fc22
then log in and leave karma (feedback).

Comment 7 Tim Waugh 2015-03-20 12:28:29 UTC
*** Bug 1203148 has been marked as a duplicate of this bug. ***

Comment 8 Fedora Update System 2015-03-21 04:52:59 UTC
hplip-3.15.2-6.fc22 has been pushed to the Fedora 22 stable repository.  If problems still persist, please make note of it in this bug report.


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