Bug 868617 - SELinux is preventing /usr/bin/systemd-tmpfiles from using the 'mknod' capabilities.
SELinux is preventing /usr/bin/systemd-tmpfiles from using the 'mknod' capabi...
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: libvirt-sandbox (Show other bugs)
18
x86_64 Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Daniel Berrange
Fedora Extras Quality Assurance
abrt_hash:fe00b268a5d2366082c0f501e32...
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-10-21 04:56 EDT by Michael Scherer
Modified: 2014-10-03 08:12 EDT (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-04-01 15:38:32 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
File: type (9 bytes, text/plain)
2012-10-21 04:56 EDT, Michael Scherer
no flags Details
File: hashmarkername (14 bytes, text/plain)
2012-10-21 04:56 EDT, Michael Scherer
no flags Details

  None (edit)
Description Michael Scherer 2012-10-21 04:56:03 EDT
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 Scherer 2012-10-21 04:56:07 EDT
Created attachment 630828 [details]
File: type
Comment 2 Michael Scherer 2012-10-21 04:56:08 EDT
Created attachment 630829 [details]
File: hashmarkername
Comment 3 Daniel Walsh 2012-10-24 16:36:00 EDT
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 15:38:32 EDT
systemd-197-1.fc18.2 should fix this.

Note You need to log in before you can comment on or make changes to this bug.