Bug 902168

Summary: SELinux is preventing /usr/lib/systemd/systemd-logind from 'search' accesses on the directory .X11-unix.
Product: [Fedora] Fedora Reporter: vikram goyal <vikigoyal>
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: 18CC: dominick.grift, dwalsh, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:0a8f0585f6f59a443c9e338a67bb968f3030f1d29ac5b6c6e15408daa16c73dd
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-09-03 18:59:36 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 vikram goyal 2013-01-21 04:37:41 UTC
Description of problem:
the system is running as installed
SELinux is preventing /usr/lib/systemd/systemd-logind from 'search' accesses on the directory .X11-unix.

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

If you believe that systemd-logind should be allowed search access on the .X11-unix directory 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 systemd-logind /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:systemd_logind_t:s0
Target Context                system_u:object_r:xserver_tmpfs_t:s0
Target Objects                .X11-unix [ dir ]
Source                        systemd-logind
Source Path                   /usr/lib/systemd/systemd-logind
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           systemd-197-1.fc18.1.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.11.1-67.fc18.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 3.7.2-201.fc18.x86_64 #1 SMP Fri
                              Jan 11 22:16:23 UTC 2013 x86_64 x86_64
Alert Count                   3
First Seen                    2013-01-21 09:34:51 IST
Last Seen                     2013-01-21 10:02:06 IST
Local ID                      68d348a2-8758-46e7-b99d-cdc92d2c77ff

Raw Audit Messages
type=AVC msg=audit(1358742726.544:955): avc:  denied  { search } for  pid=579 comm="systemd-logind" name=".X11-unix" dev="tmpfs" ino=31281 scontext=system_u:system_r:systemd_logind_t:s0 tcontext=system_u:object_r:xserver_tmpfs_t:s0 tclass=dir


type=SYSCALL msg=audit(1358742726.544:955): arch=x86_64 syscall=access success=no exit=EACCES a0=7f79fd400550 a1=0 a2=30 a3=582f78696e752d31 items=0 ppid=1 pid=579 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 ses=4294967295 tty=(none) comm=systemd-logind exe=/usr/lib/systemd/systemd-logind subj=system_u:system_r:systemd_logind_t:s0 key=(null)

Hash: systemd-logind,systemd_logind_t,xserver_tmpfs_t,dir,search

audit2allow

#============= systemd_logind_t ==============
allow systemd_logind_t xserver_tmpfs_t:dir search;

audit2allow -R

#============= systemd_logind_t ==============
allow systemd_logind_t xserver_tmpfs_t:dir search;


Additional info:
hashmarkername: setroubleshoot
kernel:         3.7.2-201.fc18.x86_64
type:           libreport

Comment 1 Daniel Walsh 2013-01-21 20:24:33 UTC
Where is .X11-unix located?

Comment 2 vikram goyal 2013-02-18 07:56:10 UTC
I don't know if it helps but it is at its usual place.

See:

[root@mail2 mail]# find / -name "*X11-unix*"
/tmp/.X11-unix
find: `/run/user/1000/gvfs': Permission denied

Comment 3 Daniel Walsh 2013-02-18 16:34:50 UTC
Have you had this happen recently.  Looks like the last time it happened was in January.

ls -lZ /tmp/.X11-unix -d
drwxrwxrwt. root root system_u:object_r:xdm_tmp_t:s0   /tmp/.X11-unix

I do not see where an xserver_tmpfs_t file label would come from.