Bug 1166192

Summary: SELinux is preventing /usr/lib/systemd/systemd-hostnamed from 'search' accesses on the directory /proc/xen.
Product: [Fedora] Fedora Reporter: Dawid Zamirski <dzrudy>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 21CC: dominick.grift, dwalsh, lvrabec, mgrepl, plautrba
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:6a3edb9019e77366404da8bc566877c5de0089ab73f3df65dfb3898c1001afa0
Fixed In Version: selinux-policy-3.13.1-99.fc21 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-12-03 17:15: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 Dawid Zamirski 2014-11-20 14:44:35 UTC
Description of problem:
SELinux is preventing /usr/lib/systemd/systemd-hostnamed from 'search' accesses on the directory /proc/xen.

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

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

Additional Information:
Source Context                system_u:system_r:systemd_hostnamed_t:s0
Target Context                system_u:object_r:xenfs_t:s0
Target Objects                /proc/xen [ dir ]
Source                        systemd-hostnam
Source Path                   /usr/lib/systemd/systemd-hostnamed
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
Policy RPM                    <Unknown>
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 3.17.3-300.fc21.x86_64 #1 SMP Fri
                              Nov 14 23:36:19 UTC 2014 x86_64 x86_64
Alert Count                   1
First Seen                    2014-11-17 11:49:54 EST
Last Seen                     2014-11-17 11:49:54 EST
Local ID                      104ea535-92fe-4e75-afb5-c2edfb33735e

Raw Audit Messages
type=AVC msg=audit(1416242994.940:574): avc:  denied  { search } for  pid=2970 comm="systemd-hostnam" name="/" dev="xenfs" ino=1 scontext=system_u:system_r:systemd_hostnamed_t:s0 tcontext=system_u:object_r:xenfs_t:s0 tclass=dir permissive=0


type=SYSCALL msg=audit(1416242994.940:574): arch=x86_64 syscall=open success=no exit=EACCES a0=7fa5ee9a896a a1=80000 a2=1b6 a3=240 items=0 ppid=1 pid=2970 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm=systemd-hostnam exe=/usr/lib/systemd/systemd-hostnamed subj=system_u:system_r:systemd_hostnamed_t:s0 key=(null)

Hash: systemd-hostnam,systemd_hostnamed_t,xenfs_t,dir,search

Additional info:
reporter:       libreport-2.3.0
hashmarkername: setroubleshoot
kernel:         3.17.3-300.fc21.x86_64
type:           libreport

Comment 1 Daniel Walsh 2014-11-20 18:30:52 UTC
5ddd4b5e914c31a41b736fcbaeb7c72b910a73b2 fixes this in git.

Comment 2 Lukas Vrabec 2014-11-21 11:39:16 UTC
commit 5ddd4b5e914c31a41b736fcbaeb7c72b910a73b2
Author: Dan Walsh <dwalsh>
Date:   Thu Nov 20 13:30:09 2014 -0500

    Allow all systemd domains to search file systems

Comment 3 Fedora Update System 2014-11-21 12:24:12 UTC
selinux-policy-3.13.1-99.fc21 has been submitted as an update for Fedora 21.
https://admin.fedoraproject.org/updates/selinux-policy-3.13.1-99.fc21

Comment 4 Fedora Update System 2014-12-03 17:15:36 UTC
selinux-policy-3.13.1-99.fc21 has been pushed to the Fedora 21 stable repository.  If problems still persist, please make note of it in this bug report.