Bug 1017307 - SELinux is preventing /usr/bin/python2.7 from 'open' accesses on the chr_file /dev/pts/0.
Summary: SELinux is preventing /usr/bin/python2.7 from 'open' accesses on the chr_file...
Keywords:
Status: CLOSED INSUFFICIENT_DATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 19
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:7ccde799a22b4e1c8acd7553e79...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-10-09 15:30 UTC by Carlos Pèrez
Modified: 2023-09-14 01:51 UTC (History)
6 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2014-08-22 12:29:49 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Carlos Pèrez 2013-10-09 15:30:32 UTC
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.
Do
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.
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: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 16:05:11 UTC
ANy idea why cups is trying to open a devpts device? /dev/pts/0?

Comment 2 Tim Waugh 2013-10-17 10:25:24 UTC
This comes from hp-config_usb_printer, which we do not ship in Fedora.

Comment 3 Daniel Walsh 2013-10-17 14:01:58 UTC
Carlos did the printer work?

Comment 4 Red Hat Bugzilla 2023-09-14 01:51:51 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 1000 days


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