Bug 1037678

Summary: SELinux is preventing /usr/bin/python2.7 from 'open' accesses on the chr_file /dev/pts/1.
Product: [Fedora] Fedora Reporter: Antonio Guzmán Simón <aguzmansimon>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED INSUFFICIENT_DATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 19CC: dominick.grift, dwalsh, lvrabec, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:7df69ae5801131d55064094e47b73b096876cf1409cce7a497f7fa0da65b07ed
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-08-22 13:17:41 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Antonio Guzmán Simón 2013-12-03 15:20:33 UTC
Description of problem:
SELinux is preventing /usr/bin/python2.7 from 'open' accesses on the chr_file /dev/pts/1.

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

If desea allow daemons to use tty
Then usted debe decir a SELinux sobre esto habilitando el booleano 'daemons_use_tty'.
Puede leer la página man de 'None' para más detalles.
Do
setsebool -P daemons_use_tty 1

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

If cree que de manera predeterminada, python2.7 debería permitir acceso open sobre  1 chr_file.     
Then debería reportar esto como un error.
Puede generar un módulo de política local para permitir este acceso.
Do
permita el acceso momentáneamente executando:
# grep python /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/1 [ chr_file ]
Source                        python
Source Path                   /usr/bin/python2.7
Port                          <Desconocido>
Host                          (removed)
Source RPM Packages           python-2.7.5-9.fc19.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.12.1-74.13.fc19.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Host Name                     (removed)
Platform                      Linux (removed) 3.11.9-200.fc19.x86_64 #1 SMP Wed
                              Nov 20 21:22:24 UTC 2013 x86_64 x86_64
Alert Count                   3
First Seen                    2013-12-03 15:55:38 CET
Last Seen                     2013-12-03 16:13:19 CET
Local ID                      bc8abca3-3d94-4079-bfbb-c4bb1a247568

Raw Audit Messages
type=AVC msg=audit(1386083599.400:665): avc:  denied  { open } for  pid=439 comm="python" path="/dev/pts/1" dev="devpts" ino=4 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(1386083599.400:665): arch=x86_64 syscall=open success=yes exit=EIO a0=7fff514e9870 a1=102 a2=ff6 a3=0 items=0 ppid=1 pid=439 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 ses=4294967295 tty=(none) comm=python exe=/usr/bin/python2.7 subj=system_u:system_r:cupsd_t:s0-s0:c0.c1023 key=(null)

Hash: python,cupsd_t,devpts_t,chr_file,open

Additional info:
reporter:       libreport-2.1.9
hashmarkername: setroubleshoot
kernel:         3.11.9-200.fc19.x86_64
type:           libreport

Comment 1 Daniel Walsh 2013-12-04 13:30:13 UTC
Do you have some kind of local printer?