Bug 708561

Summary: SELinux is preventing /usr/libexec/gnome-session-check-accelerated-helper from 'open' accesses on the chr_file nvidiactl.
Product: [Fedora] Fedora Reporter: Alex <nanochase>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: rawhideCC: bugzilla, cruz, didierg-divers, diods, dominick.grift, dwalsh, edosurina, jduttontwo, mgrepl, mkaczma, my_linux
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard: setroubleshoot_trace_hash:48f47016f899712389d003d4ed03226af5d3f9b81e13e7acf8f6f4f2e4db2226
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-05-28 13:13:59 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 Alex 2011-05-28 02:17:24 UTC
SELinux is preventing /usr/libexec/gnome-session-check-accelerated-helper from 'open' accesses on the chr_file nvidiactl.

*****  Plugin device (91.4 confidence) suggests  *****************************

If you want to allow gnome-session-check-accelerated-helper to have open access on the nvidiactl chr_file
Then you need to change the label on nvidiactl to a type of a similar device.
Do
# semanage fcontext -a -t SIMILAR_TYPE 'nvidiactl'
# restorecon -v 'nvidiactl'

*****  Plugin catchall (9.59 confidence) suggests  ***************************

If you believe that gnome-session-check-accelerated-helper should be allowed open access on the nvidiactl 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-session-c /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:device_t:s0
Target Objects                nvidiactl [ chr_file ]
Source                        gnome-session-c
Source Path                   /usr/libexec/gnome-session-check-accelerated-
                              helper
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           gnome-session-3.0.1-2.fc15
Target RPM Packages           
Policy RPM                    selinux-policy-3.9.16-24.fc15
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux nanochase 2.6.38.6-27.fc15.i686 #1 SMP Sun
                              May 15 17:57:13 UTC 2011 i686 i686
Alert Count                   12
First Seen                    Thu 26 May 2011 12:43:41 AM CDT
Last Seen                     Fri 27 May 2011 06:24:37 PM CDT
Local ID                      b0dfb57a-94a1-42be-ac4c-258920ef2d3e

Raw Audit Messages
type=AVC msg=audit(1306538677.393:39): avc:  denied  { open } for  pid=1237 comm="gnome-session-c" name="nvidiactl" dev=devtmpfs ino=17245 scontext=system_u:system_r:xdm_t:s0-s0:c0.c1023 tcontext=system_u:object_r:device_t:s0 tclass=chr_file


type=SYSCALL msg=audit(1306538677.393:39): arch=i386 syscall=open success=no exit=EACCES a0=bf97cfc8 a1=8002 a2=0 a3=bf97cfc8 items=0 ppid=1232 pid=1237 auid=4294967295 uid=42 gid=42 euid=42 suid=42 fsuid=42 egid=42 sgid=42 fsgid=42 tty=(none) ses=4294967295 comm=gnome-session-c exe=/usr/libexec/gnome-session-check-accelerated-helper subj=system_u:system_r:xdm_t:s0-s0:c0.c1023 key=(null)

Hash: gnome-session-c,xdm_t,device_t,chr_file,open

audit2allow

#============= xdm_t ==============
allow xdm_t device_t:chr_file open;

audit2allow -R

#============= xdm_t ==============
allow xdm_t device_t:chr_file open;

Comment 1 Alex 2011-05-28 02:21:02 UTC
Conflict occurs whenever Gnome 3 environment is started while using nvidia 270 driver

Comment 2 Miroslav Grepl 2011-05-28 13:13:59 UTC
Execute

# restorecon -R -v /dev/nvidiactl

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