Bug 1045819

Summary: SELinux is preventing /usr/bin/Xorg from 'open' accesses on the chr_file /dev/tty0.
Product: [Fedora] Fedora Reporter: cyrushmh <cyrusyzgtt>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 20CC: dominick.grift, dwalsh, lvrabec, mgrepl, yanuarrisah
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:30bc898fa4a6c83aef958b6765a63b5bd240b757f5c353f8bdcff40b91074196
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-01-06 15:10:38 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 cyrushmh 2013-12-22 09:53:50 UTC
Description of problem:
SELinux is preventing /usr/bin/Xorg from 'open' accesses on the chr_file /dev/tty0.

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

If 您要 允许所有守护进程可读取/写入终端
Then 您必须启用 'daemons_use_tty' 布尔值告知 SELinux 此情况。
您可以阅读 'None' 手册页面来了解详情。
Do
setsebool -P daemons_use_tty 1

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

If 您确定应默认允许 Xorg open 访问 tty0 chr_file。
Then 您应该将这个情况作为 bug 报告。
您可以生成本地策略模块允许这个访问。
Do
请执行以下命令此时允许这个访问:
# grep Xorg /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:bumblebee_t:s0
Target Context                system_u:object_r:tty_device_t:s0
Target Objects                /dev/tty0 [ chr_file ]
Source                        Xorg
Source Path                   /usr/bin/Xorg
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           xorg-x11-server-Xorg-1.14.4-5.fc20.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.12.1-106.fc20.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 3.12.5-302.fc20.x86_64 #1 SMP Tue
                              Dec 17 20:42:32 UTC 2013 x86_64 x86_64
Alert Count                   1
First Seen                    2013-12-22 17:51:58 CST
Last Seen                     2013-12-22 17:51:58 CST
Local ID                      be9ef364-c1a7-4699-815d-991d588e8f00

Raw Audit Messages
type=AVC msg=audit(1387705918.629:1223): avc:  denied  { open } for  pid=25123 comm="Xorg" path="/dev/tty0" dev="devtmpfs" ino=1037 scontext=system_u:system_r:bumblebee_t:s0 tcontext=system_u:object_r:tty_device_t:s0 tclass=chr_file


type=SYSCALL msg=audit(1387705918.629:1223): arch=x86_64 syscall=open success=yes exit=EAGAIN a0=5b3712 a1=1 a2=0 a3=0 items=0 ppid=4731 pid=25123 auid=4294967295 uid=0 gid=1001 euid=0 suid=0 fsuid=0 egid=1001 sgid=1001 fsgid=1001 ses=4294967295 tty=(none) comm=Xorg exe=/usr/bin/Xorg subj=system_u:system_r:bumblebee_t:s0 key=(null)

Hash: Xorg,bumblebee_t,tty_device_t,chr_file,open

Additional info:
reporter:       libreport-2.1.10
hashmarkername: setroubleshoot
kernel:         3.12.5-302.fc20.x86_64
type:           libreport

Comment 1 Miroslav Grepl 2014-01-06 15:10:38 UTC

*** This bug has been marked as a duplicate of bug 1046010 ***