Bug 743244 - SELinux is preventing /usr/libexec/gnome-session-check-accelerated-helper from 'ioctl' accesses on the chr_file /dev/nvidiactl.
Summary: SELinux is preventing /usr/libexec/gnome-session-check-accelerated-helper fro...
Status: CLOSED DUPLICATE of bug 694918
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 15
Hardware: x86_64
OS: Linux
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
Whiteboard: setroubleshoot_trace_hash:66388700d36...
Depends On:
TreeView+ depends on / blocked
Reported: 2011-10-04 10:55 UTC by Dennis Appelon Nielsen
Modified: 2011-11-19 07:51 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2011-10-05 06:03:35 UTC
Type: ---

Attachments (Terms of Use)

Description Dennis Appelon Nielsen 2011-10-04 10:55:34 UTC
SELinux is preventing /usr/libexec/gnome-session-check-accelerated-helper from 'ioctl' accesses on the chr_file /dev/nvidiactl.

*****  Plugin restorecon (90.5 confidence) suggests  *************************

If you want to fix the label. 
/dev/nvidiactl default label should be xserver_misc_device_t.
Then you can run restorecon.
# /sbin/restorecon -v /dev/nvidiactl

*****  Plugin device (9.50 confidence) suggests  *****************************

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

*****  Plugin catchall (1.40 confidence) suggests  ***************************

If you believe that gnome-session-check-accelerated-helper should be allowed ioctl 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.
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                /dev/nvidiactl [ chr_file ]
Source                        gnome-session-c
Source Path                   /usr/libexec/gnome-session-check-accelerated-
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           gnome-session-3.0.1-2.fc15
Target RPM Packages           
Policy RPM                    selinux-policy-3.9.16-38.fc15
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Host Name                     (removed)
Platform                      Linux (removed) #1
                              SMP Tue Aug 30 14:38:32 UTC 2011 x86_64 x86_64
Alert Count                   2
First Seen                    Mon 03 Oct 2011 03:35:07 PM CEST
Last Seen                     Mon 03 Oct 2011 03:41:32 PM CEST
Local ID                      a0d6776d-d1df-4240-88d8-815abd819cb0

Raw Audit Messages
type=AVC msg=audit(1317649292.865:284): avc:  denied  { ioctl } for  pid=27875 comm="gnome-session-c" path="/dev/nvidiactl" dev=devtmpfs ino=25986 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(1317649292.865:284): arch=x86_64 syscall=ioctl success=yes exit=0 a0=4 a1=c04846d2 a2=7fff80c97560 a3=0 items=0 ppid=27860 pid=27875 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,ioctl


#============= xdm_t ==============
#!!!! This avc is allowed in the current policy

allow xdm_t device_t:chr_file ioctl;

audit2allow -R

#============= xdm_t ==============
#!!!! This avc is allowed in the current policy

allow xdm_t device_t:chr_file ioctl;

Comment 1 Miroslav Grepl 2011-10-05 06:03:35 UTC

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

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