Bug 1282812 - SELinux is preventing /usr/bin/python3.4 from 'ioctl' accesses on the file /root/.hplip/hplip_config_usb_printer.log.
SELinux is preventing /usr/bin/python3.4 from 'ioctl' accesses on the file /r...
Status: CLOSED EOL
Product: Fedora
Classification: Fedora
Component: hplip (Show other bugs)
23
x86_64 Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Zdenek Dohnal
Fedora Extras Quality Assurance
abrt_hash:4fa38b123ba01ed39cd8944ed82...
:
: 1279232 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-11-17 09:04 EST by edo
Modified: 2016-12-20 11:01 EST (History)
9 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-12-20 11:01:20 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description edo 2015-11-17 09:04:06 EST
Description of problem:
SELinux is preventing /usr/bin/python3.4 from 'ioctl' accesses on the file /root/.hplip/hplip_config_usb_printer.log.

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

If you believe that python3.4 should be allowed ioctl access on the hplip_config_usb_printer.log 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 hp-config_usb_p /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:admin_home_t:s0
Target Objects                /root/.hplip/hplip_config_usb_printer.log [ file ]
Source                        hp-config_usb_p
Source Path                   /usr/bin/python3.4
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           python3-3.4.3-5.fc23.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.13.1-154.fc23.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Host Name                     (removed)
Platform                      Linux (removed) 4.2.6-300.fc23.x86_64 #1 SMP Tue
                              Nov 10 19:32:21 UTC 2015 x86_64 x86_64
Alert Count                   2
First Seen                    2015-11-17 14:55:17 CET
Last Seen                     2015-11-17 14:59:49 CET
Local ID                      415db916-35fd-4d36-bbe1-5b91d0f6fa7a

Raw Audit Messages
type=AVC msg=audit(1447768789.134:882): avc:  denied  { ioctl } for  pid=24535 comm="hp-config_usb_p" path="/root/.hplip/hplip_config_usb_printer.log" dev="dm-1" ino=1447077 scontext=system_u:system_r:cupsd_t:s0-s0:c0.c1023 tcontext=system_u:object_r:admin_home_t:s0 tclass=file permissive=1


type=SYSCALL msg=audit(1447768789.134:882): arch=x86_64 syscall=ioctl success=no exit=ENOTTY a0=5 a1=5401 a2=7ffcb58e48f0 a3=55e276667ec0 items=0 ppid=1 pid=24535 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm=hp-config_usb_p exe=/usr/bin/python3.4 subj=system_u:system_r:cupsd_t:s0-s0:c0.c1023 key=(null)

Hash: hp-config_usb_p,cupsd_t,admin_home_t,file,ioctl

Version-Release number of selected component:
selinux-policy-3.13.1-154.fc23.noarch

Additional info:
reporter:       libreport-2.6.3
hashmarkername: setroubleshoot
kernel:         4.2.6-300.fc23.x86_64
type:           libreport
Comment 1 Jiri Popelka 2015-11-20 12:06:17 EST
Tim, BTW upstream has been shipping their own SELinux policy module since 3.15.11, see this type enforcement file:
https://github.com/jpopelka/hplip/blob/master/selinux/hplip.te
Comment 2 Miroslav Grepl 2015-11-20 12:21:12 EST
Why is /root/.hplip used for log files?
Comment 3 Jiri Popelka 2015-11-23 10:58:57 EST
*** Bug 1279232 has been marked as a duplicate of this bug. ***
Comment 4 Jiri Popelka 2015-11-23 10:59:47 EST
Upstream uses ~/.hplip/ for log files and hplip.conf (per-user settings file).

The hplip_config_usb_printer.log is written by
/usr/bin/hp-config_usb_printer
which is started by
hplip-printer@.service which is triggered by udev
(/usr/lib/udev/rules.d/56-hp_conf_usb.rules)
i.e. as root and ~/.hplip/ means /root/.hplip/ in that case.
Comment 5 Tim Waugh 2015-11-30 07:16:24 EST
I've previously had to patch in a special case for USER==root to avoid this someone in HPLIP.
Comment 6 Fedora Admin XMLRPC Client 2016-06-24 06:37:12 EDT
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.
Comment 7 Fedora End Of Life 2016-11-24 08:31:21 EST
This message is a reminder that Fedora 23 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 23. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '23'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 23 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.
Comment 8 Fedora End Of Life 2016-12-20 11:01:20 EST
Fedora 23 changed to end-of-life (EOL) status on 2016-12-20. Fedora 23 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.

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