Bug 1000745

Summary: SELinux is preventing /usr/bin/gnome-shell from 'open' accesses on the chr_file /dev/rfkill.
Product: [Fedora] Fedora Reporter: Moez Roy <moez.roy>
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: rawhideCC: dominick.grift, dwalsh, lvrabec, mgrepl, moez.roy
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:9c7f4efafa769acb27836249528c6cb9fe740e57d27fdaddeff07b868a2b759f
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-09-10 06:30:18 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:

Description Moez Roy 2013-08-24 21:03:53 UTC
Description of problem:
SELinux is preventing /usr/bin/gnome-shell from 'open' accesses on the chr_file /dev/rfkill.

*****  Plugin catchall (100. confidence) suggests   **************************

If you believe that gnome-shell should be allowed open access on the rfkill 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 gnome-shell /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:xdm_t:s0-s0:c0.c1023
Target Context                system_u:object_r:wireless_device_t:s0
Target Objects                /dev/rfkill [ chr_file ]
Source                        gnome-shell
Source Path                   /usr/bin/gnome-shell
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           gnome-shell-3.9.90-1.fc21.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.12.1-71.fc19.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 3.11.0-0.rc6.git2.1.fc21.x86_64 #1
                              SMP Thu Aug 22 21:02:34 UTC 2013 x86_64 x86_64
Alert Count                   3
First Seen                    2013-08-23 22:50:55 PDT
Last Seen                     2013-08-23 23:47:40 PDT
Local ID                      2d3ae7ea-129b-4b40-870d-e02798c35873

Raw Audit Messages
type=AVC msg=audit(1377326860.854:597): avc:  denied  { open } for  pid=5564 comm="gnome-shell" path="/dev/rfkill" dev="devtmpfs" ino=18492 scontext=system_u:system_r:xdm_t:s0-s0:c0.c1023 tcontext=system_u:object_r:wireless_device_t:s0 tclass=chr_file


type=SYSCALL msg=audit(1377326860.854:597): arch=x86_64 syscall=open success=no exit=EACCES a0=7f23d257be5c a1=2 a2=25d86d0 a3=7fffad2d6ff0 items=0 ppid=5532 pid=5564 auid=4294967295 uid=42 gid=42 euid=42 suid=42 fsuid=42 egid=42 sgid=42 fsgid=42 ses=4294967295 tty=(none) comm=gnome-shell exe=/usr/bin/gnome-shell subj=system_u:system_r:xdm_t:s0-s0:c0.c1023 key=(null)

Hash: gnome-shell,xdm_t,wireless_device_t,chr_file,open

Additional info:
reporter:       libreport-2.1.6
hashmarkername: setroubleshoot
kernel:         3.11.0-0.rc6.git4.1.fc21.x86_64
type:           libreport

Comment 1 Miroslav Grepl 2013-08-27 14:10:54 UTC
What does

# ps -efZ |grep xdm

# id -Z

Comment 2 Moez Roy 2013-09-08 11:40:57 UTC
[user@localhost ~]$ ps -efZ |grep xdm
system_u:system_r:xdm_t:s0-s0:c0.c1023 root 705    1  0 Sep05 ?        00:00:00 /usr/sbin/gdm
system_u:system_r:xdm_t:s0-s0:c0.c1023 root 1427 705  0 Sep05 ?        00:00:00 /usr/libexec/gdm-simple-slave --display-id /org/gnome/DisplayManager/Displays/_0
system_u:system_r:xdm_t:s0-s0:c0.c1023 root 1658 1427  0 Sep05 ?       00:00:00 gdm-session-worker [pam/gdm-password]
unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 user 14297 14274  0 04:40 pts/1 00:00:00 grep --color=auto xdm
[user@localhost ~]$ id -Z
unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023
[user@localhost ~]$

Comment 3 Miroslav Grepl 2013-09-09 17:48:07 UTC
Did it happen again?

Comment 4 Moez Roy 2013-09-09 18:40:27 UTC
No, because I downgraded back to Fedora 19.