Bug 1017307 - SELinux is preventing /usr/bin/python2.7 from 'open' accesses on the chr_file /dev/pts/0. [NEEDINFO]
SELinux is preventing /usr/bin/python2.7 from 'open' accesses on the chr_file...
Product: Fedora
Classification: Fedora
Component: selinux-policy (Show other bugs)
x86_64 Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Miroslav Grepl
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2013-10-09 11:30 EDT by Carlos Pèrez
Modified: 2014-08-22 08:29 EDT (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2014-08-22 08:29:49 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
dwalsh: needinfo? (capg87)

Attachments (Terms of Use)

  None (edit)
Description Carlos Pèrez 2013-10-09 11:30:32 EDT
Description of problem:
SELinux is preventing /usr/bin/python2.7 from 'open' accesses on the chr_file /dev/pts/0.

*****  Plugin catchall_boolean (89.3 confidence) suggests  *******************

If you want to allow daemons to use tty
Then you must tell SELinux about this by enabling the 'daemons_use_tty' boolean.
You can read 'None' man page for more details.
setsebool -P daemons_use_tty 1

*****  Plugin catchall (11.6 confidence) suggests  ***************************

If you believe that python2.7 should be allowed open access on the 0 chr_file by default.
Then you should report this as a bug.
You can generate a local policy module to allow this access.
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:devpts_t:s0
Target Objects                /dev/pts/0 [ chr_file ]
Source                        hp-config_usb_p
Source Path                   /usr/bin/python2.7
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           python-2.7.5-4.fc19.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.12.1-74.8.fc19.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Host Name                     (removed)
Platform                      Linux (removed) 3.11.3-201.fc19.x86_64 #1 SMP Thu
                              Oct 3 00:47:03 UTC 2013 x86_64 x86_64
Alert Count                   2
First Seen                    2013-10-09 10:25:24 CDT
Last Seen                     2013-10-09 10:25:32 CDT
Local ID                      79389cb2-9ee7-4f5d-9a66-28b1b5ce4567

Raw Audit Messages
type=AVC msg=audit(1381332332.254:484): avc:  denied  { open } for  pid=2667 comm="hp-config_usb_p" path="/dev/pts/0" dev="devpts" ino=3 scontext=system_u:system_r:cupsd_t:s0-s0:c0.c1023 tcontext=system_u:object_r:devpts_t:s0 tclass=chr_file

type=SYSCALL msg=audit(1381332332.254:484): arch=x86_64 syscall=open success=yes exit=ENXIO a0=7fff9b7a6a60 a1=102 a2=ff6 a3=0 items=0 ppid=1 pid=2667 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 ses=4294967295 tty=(none) comm=hp-config_usb_p exe=/usr/bin/python2.7 subj=system_u:system_r:cupsd_t:s0-s0:c0.c1023 key=(null)

Hash: hp-config_usb_p,cupsd_t,devpts_t,chr_file,open

Additional info:
reporter:       libreport-2.1.7
hashmarkername: setroubleshoot
kernel:         3.11.3-201.fc19.x86_64
type:           libreport
Comment 1 Daniel Walsh 2013-10-09 12:05:11 EDT
ANy idea why cups is trying to open a devpts device? /dev/pts/0?
Comment 2 Tim Waugh 2013-10-17 06:25:24 EDT
This comes from hp-config_usb_printer, which we do not ship in Fedora.
Comment 3 Daniel Walsh 2013-10-17 10:01:58 EDT
Carlos did the printer work?

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