Bug 961485

Summary: SELinux is preventing /usr/lib/systemd/systemd-logind from 'create' accesses on the fifo_file c2.ref.
Product: [Fedora] Fedora Reporter: Alexey Torkhov <atorkhov>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED NEXTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 17CC: dominick.grift, dwalsh, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:bce501a1b95df0fd214686a62f5fc2f71aec946ea89f1a0fa5c4e98a9c05a27c
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-05-10 08:51:37 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 Alexey Torkhov 2013-05-09 17:27:19 UTC
Description of problem:
Running Fedora-18 inside LXC container
SELinux is preventing /usr/lib/systemd/systemd-logind from 'create' accesses on the fifo_file c2.ref.

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

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

Additional Information:
Source Context                system_u:system_r:virtd_lxc_t:s0-s0:c0.c1023
Target Context                system_u:object_r:tmpfs_t:s0
Target Objects                c2.ref [ fifo_file ]
Source                        systemd-logind
Source Path                   /usr/lib/systemd/systemd-logind
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           systemd-44-24.fc17.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.10.0-167.fc17.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Host Name                     (removed)
Platform                      Linux (removed) 3.8.4-102.fc17.x86_64 #1 SMP Sun
                              Mar 24 13:09:09 UTC 2013 x86_64 x86_64
Alert Count                   1
First Seen                    2013-05-09 21:24:47 MSK
Last Seen                     2013-05-09 21:24:47 MSK
Local ID                      93040598-1cfd-470f-a6c8-d121fb3030ea

Raw Audit Messages
type=AVC msg=audit(1368120287.569:4989): avc:  denied  { create } for  pid=2594 comm="systemd-logind" name="c2.ref" scontext=system_u:system_r:virtd_lxc_t:s0-s0:c0.c1023 tcontext=system_u:object_r:tmpfs_t:s0 tclass=fifo_file


type=SYSCALL msg=audit(1368120287.569:4989): arch=x86_64 syscall=mknod success=yes exit=0 a0=7f7bcd68a360 a1=1180 a2=0 a3=1d items=0 ppid=1 pid=2594 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:virtd_lxc_t:s0-s0:c0.c1023 key=(null)

Hash: systemd-logind,virtd_lxc_t,tmpfs_t,fifo_file,create

audit2allow

#============= virtd_lxc_t ==============
allow virtd_lxc_t tmpfs_t:fifo_file create;

audit2allow -R

#============= virtd_lxc_t ==============
allow virtd_lxc_t tmpfs_t:fifo_file create;


Additional info:
hashmarkername: setroubleshoot
kernel:         3.8.4-102.fc17.x86_64
type:           libreport

Comment 1 Daniel Walsh 2013-05-09 18:54:14 UTC
If you are going to play with virt-sandbox or libvirt-lxc, could you try it on a newer fedora, preferably F19.  There are lots of fixes there that will not likely get back ported to F17.