Bug 862961

Summary: SELinux is preventing /usr/bin/python2.7 from read, write access on the chr_file ptmx.
Product: [Fedora] Fedora Reporter: Tony <tony.baz>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 17CC: dominick.grift, dwalsh, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:55a5b0da58e6a96e8d40e1d4bc67e7255b4a3fb056a592aeaa8ae8734350816d
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-12-20 15:39:21 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
File: type
none
File: hashmarkername none

Description Tony 2012-10-04 03:00:36 UTC
Description of problem:
When attempting to print to fax from Libreoffice Write on HP fax / printer C7280.
Happens every time I try to print to fax.


Additional info:
libreport version: 2.0.14
kernel:         3.5.4-2.fc17.x86_64

description:
:SELinux is preventing /usr/bin/python2.7 from read, write access on the chr_file ptmx.
:
:*****  Plugin catchall (100. confidence) suggests  ***************************
:
:If you believe that python2.7 should be allowed read write access on the ptmx chr_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:hplip_t:s0-s0:c0.c1023
:Target Context                system_u:object_r:ptmx_t:s0
:Target Objects                ptmx [ chr_file ]
:Source                        hpfax
:Source Path                   /usr/bin/python2.7
:Port                          <Unknown>
:Host                          (removed)
:Source RPM Packages           python-2.7.3-7.2.fc17.x86_64
:Target RPM Packages           
:Policy RPM                    selinux-policy-3.10.0-149.fc17.noarch
:Selinux Enabled               True
:Policy Type                   targeted
:Enforcing Mode                Permissive
:Host Name                     (removed)
:Platform                      Linux (removed) 3.5.4-2.fc17.x86_64 #1 SMP Wed Sep
:                              26 21:58:50 UTC 2012 x86_64 x86_64
:Alert Count                   2
:First Seen                    2012-10-04 15:10:12 NZDT
:Last Seen                     2012-10-04 15:14:48 NZDT
:Local ID                      c738c366-3b68-44af-a5e4-55ad14f56eda
:
:Raw Audit Messages
:type=AVC msg=audit(1349316888.993:98): avc:  denied  { read write } for  pid=2113 comm="hpfax" name="ptmx" dev="devtmpfs" ino=1135 scontext=system_u:system_r:hplip_t:s0-s0:c0.c1023 tcontext=system_u:object_r:ptmx_t:s0 tclass=chr_file
:
:
:type=AVC msg=audit(1349316888.993:98): avc:  denied  { open } for  pid=2113 comm="hpfax" path="/dev/ptmx" dev="devtmpfs" ino=1135 scontext=system_u:system_r:hplip_t:s0-s0:c0.c1023 tcontext=system_u:object_r:ptmx_t:s0 tclass=chr_file
:
:
:type=SYSCALL msg=audit(1349316888.993:98): arch=x86_64 syscall=open success=yes exit=ENXIO a0=35b7177c5e a1=2 a2=0 a3=35c8911d10 items=0 ppid=698 pid=2113 auid=4294967295 uid=0 gid=7 euid=0 suid=0 fsuid=0 egid=7 sgid=7 fsgid=7 tty=(none) ses=4294967295 comm=hpfax exe=/usr/bin/python2.7 subj=system_u:system_r:hplip_t:s0-s0:c0.c1023 key=(null)
:
:Hash: hpfax,hplip_t,ptmx_t,chr_file,read,write
:
:audit2allow
:
:#============= hplip_t ==============
:#!!!! The source type 'hplip_t' can write to a 'chr_file' of the following types:
:# initrc_devpts_t, printer_device_t, usb_device_t, null_device_t, zero_device_t, devtty_t
:
:allow hplip_t ptmx_t:chr_file { read write open };
:
:audit2allow -R
:
:#============= hplip_t ==============
:#!!!! The source type 'hplip_t' can write to a 'chr_file' of the following types:
:# initrc_devpts_t, printer_device_t, usb_device_t, null_device_t, zero_device_t, devtty_t
:
:allow hplip_t ptmx_t:chr_file { read write open };
:

Comment 1 Tony 2012-10-04 03:00:39 UTC
Created attachment 621298 [details]
File: type

Comment 2 Tony 2012-10-04 03:00:41 UTC
Created attachment 621299 [details]
File: hashmarkername

Comment 3 Daniel Walsh 2012-10-06 12:03:06 UTC
*** Bug 862959 has been marked as a duplicate of this bug. ***

Comment 4 Daniel Walsh 2012-10-06 12:03:18 UTC
*** Bug 862958 has been marked as a duplicate of this bug. ***

Comment 5 Daniel Walsh 2012-10-06 12:09:31 UTC
Added allow in F18.

Comment 6 Miroslav Grepl 2012-10-08 07:47:26 UTC
commit 7162296fc6cfa59dc12bb48d62ccd45120244080
Author: Miroslav Grepl <mgrepl>
Date:   Mon Oct 8 09:46:59 2012 +0200

    Access needed to allow hplip to send faxes

Comment 7 Fedora Update System 2012-10-08 14:06:57 UTC
selinux-policy-3.10.0-153.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/selinux-policy-3.10.0-153.fc17

Comment 8 Fedora Update System 2012-10-08 21:57:55 UTC
Package selinux-policy-3.10.0-153.fc17:
* should fix your issue,
* was pushed to the Fedora 17 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing selinux-policy-3.10.0-153.fc17'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-15652/selinux-policy-3.10.0-153.fc17
then log in and leave karma (feedback).

Comment 9 Fedora Update System 2012-12-20 15:39:24 UTC
selinux-policy-3.10.0-153.fc17 has been pushed to the Fedora 17 stable repository.  If problems still persist, please make note of it in this bug report.