Bug 868617

Summary: SELinux is preventing /usr/bin/systemd-tmpfiles from using the 'mknod' capabilities.
Product: [Fedora] Fedora Reporter: Michael S. <misc>
Component: libvirt-sandboxAssignee: Daniel Berrangé <berrange>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 18CC: ajia, berrange, dominick.grift, dwalsh, jpazdziora, mgrepl, virt-maint
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:fe00b268a5d2366082c0f501e3292d04311e9f29e22f1b4058179b3fcada15c4
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-04-01 19:38:32 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:
Attachments:
Description Flags
File: type
none
File: hashmarkername none

Description Michael S. 2012-10-21 08:56:03 UTC
Description of problem:
Following dan walsh blog post on the container, i tried to run nginx in a secure lxc with 
virt-sandbox-service start test_nginx


Additional info:
libreport version: 2.0.16
kernel:         3.6.1-1.fc18.x86_64

description:
:SELinux is preventing /usr/bin/systemd-tmpfiles from using the 'mknod' capabilities.
:
:*****  Plugin catchall (100. confidence) suggests  ***************************
:
:If vous pensez que systemd-tmpfiles devrait avoir des capacités mknod par défaut.
:Then vous devriez rapporter ceci en tant qu'anomalie.
:Vous pouvez générer un module de stratégie local pour autoriser cet accès.
:Do
:autoriser cet accès pour le moment en exécutant :
:# grep systemd-tmpfile /var/log/audit/audit.log | audit2allow -M mypol
:# semodule -i mypol.pp
:
:Additional Information:
:Source Context                system_u:system_r:svirt_lxc_net_t:s0:c1,c2
:Target Context                system_u:system_r:svirt_lxc_net_t:s0:c1,c2
:Target Objects                 [ capability ]
:Source                        systemd-tmpfile
:Source Path                   /usr/bin/systemd-tmpfiles
:Port                          <Inconnu>
:Host                          (removed)
:Source RPM Packages           systemd-194-1.fc18.x86_64
:Target RPM Packages           
:Policy RPM                    selinux-policy-3.11.1-36.fc18.noarch
:Selinux Enabled               True
:Policy Type                   targeted
:Enforcing Mode                Permissive
:Host Name                     (removed)
:Platform                      Linux (removed) 3.6.1-1.fc18.x86_64 #1 SMP Mon Oct
:                              8 17:19:09 UTC 2012 x86_64 x86_64
:Alert Count                   1
:First Seen                    2012-10-21 10:54:28 CEST
:Last Seen                     2012-10-21 10:54:28 CEST
:Local ID                      238f248a-a78f-4c64-9b0b-648fd1ee8264
:
:Raw Audit Messages
:type=AVC msg=audit(1350809668.123:35054): avc:  denied  { mknod } for  pid=13464 comm="systemd-tmpfile" capability=27  scontext=system_u:system_r:svirt_lxc_net_t:s0:c1,c2 tcontext=system_u:system_r:svirt_lxc_net_t:s0:c1,c2 tclass=capability
:
:
:type=SYSCALL msg=audit(1350809668.123:35054): arch=x86_64 syscall=mknod success=no exit=EPERM a0=7f20c0c77040 a1=21b0 a2=600 a3=7fffca877db0 items=0 ppid=1 pid=13464 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm=systemd-tmpfile exe=/usr/bin/systemd-tmpfiles subj=system_u:system_r:svirt_lxc_net_t:s0:c1,c2 key=(null)
:
:Hash: systemd-tmpfile,svirt_lxc_net_t,svirt_lxc_net_t,capability,mknod
:
:audit2allow
:
:#============= svirt_lxc_net_t ==============
:allow svirt_lxc_net_t self:capability mknod;
:
:audit2allow -R
:
:#============= svirt_lxc_net_t ==============
:allow svirt_lxc_net_t self:capability mknod;
:

Comment 1 Michael S. 2012-10-21 08:56:07 UTC
Created attachment 630828 [details]
File: type

Comment 2 Michael S. 2012-10-21 08:56:08 UTC
Created attachment 630829 [details]
File: hashmarkername

Comment 3 Daniel Walsh 2012-10-24 20:36:00 UTC
Yum not allowed.  This is an interaction between libvirt and systemd, libvirt is supposed to be removing mknod capability and system is supposed to stop trying.

Comment 4 Daniel Walsh 2013-04-01 19:38:32 UTC
systemd-197-1.fc18.2 should fix this.