Bug 691111

Summary: SELinux is preventing /usr/libexec/gdm-session-worker from 'getattr' accesses on the sock_file /tmp/.X11-unix/X0.
Product: [Fedora] Fedora Reporter: afsar-servis
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED INSUFFICIENT_DATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: rawhideCC: afsar-servis, dwalsh, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard: setroubleshoot_trace_hash:1394a57d3624c1749d0f221181f91ab5f84fba220eefc5e4cfcb34a68e62b1f9
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-04-17 09:04:05 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 afsar-servis 2011-03-26 19:51:04 UTC
SELinux is preventing /usr/libexec/gdm-session-worker from 'getattr' accesses on the sock_file /tmp/.X11-unix/X0.

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

If you believe that gdm-session-worker should be allowed getattr access on the X0 sock_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 gdm-session-wor /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:initrc_tmp_t:s0
Target Objects                /tmp/.X11-unix/X0 [ sock_file ]
Source                        gdm-session-wor
Source Path                   /usr/libexec/gdm-session-worker
Port                          <Неизвестно>
Host                          (removed)
Source RPM Packages           gdm-2.32.0-1.fc14
Target RPM Packages           
Policy RPM                    selinux-policy-3.9.7-37.fc14
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Host Name                     (removed)
Platform                      Linux (removed) 2.6.35.11-83.fc14.x86_64 #1
                              SMP Mon Feb 7 07:06:44 UTC 2011 x86_64 x86_64
Alert Count                   1
First Seen                    Сбт 26 Мар 2011 22:49:54
Last Seen                     Сбт 26 Мар 2011 22:49:54
Local ID                      9bb908c9-08a2-4137-bfb4-f81ce552d26c

Raw Audit Messages
type=AVC msg=audit(1301168994.382:26917): avc:  denied  { getattr } for  pid=10162 comm="gdm-session-wor" path="/tmp/.X11-unix/X0" dev=sdb3 ino=8257692 scontext=system_u:system_r:xdm_t:s0-s0:c0.c1023 tcontext=system_u:object_r:initrc_tmp_t:s0 tclass=sock_file


type=SYSCALL msg=audit(1301168994.382:26917): arch=x86_64 syscall=lstat success=yes exit=0 a0=7fffa629f100 a1=7fffa629f030 a2=7fffa629f030 a3=3fb items=0 ppid=10087 pid=10162 auid=500 uid=0 gid=500 euid=0 suid=0 fsuid=0 egid=500 sgid=500 fsgid=500 tty=(none) ses=13 comm=gdm-session-wor exe=/usr/libexec/gdm-session-worker subj=system_u:system_r:xdm_t:s0-s0:c0.c1023 key=(null)

Hash: gdm-session-wor,xdm_t,initrc_tmp_t,sock_file,getattr

audit2allow

#============= xdm_t ==============
allow xdm_t initrc_tmp_t:sock_file getattr;

audit2allow -R

#============= xdm_t ==============
allow xdm_t initrc_tmp_t:sock_file getattr;

Comment 1 Miroslav Grepl 2011-03-28 11:49:25 UTC
Could you check to see if any processes are running as initrc_t

# ps -eZ | grep initrc_t


and add outputs of

# ls -dZ /tmp/.X11-unix