]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
selinux: Properly check TAP FD label
authorMichal Privoznik <mprivozn@redhat.com>
Thu, 11 Sep 2014 08:04:35 +0000 (10:04 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Thu, 11 Sep 2014 08:04:35 +0000 (10:04 +0200)
After a4431931 the TAP FDs ale labeled with image label instead
of the process label. On the other hand, the commit was
incomplete as a few lines above, there's still old check for the
process label presence while it should be check for the image
label instead.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
src/security/security_selinux.c

index 7064158e337ced5a2fde8e59de49839f2efd9836..bf67fb501fab4b7167f1468506ef557c03837ac4 100644 (file)
@@ -2347,7 +2347,7 @@ virSecuritySELinuxSetTapFDLabel(virSecurityManagerPtr mgr ATTRIBUTE_UNUSED,
     virSecurityLabelDefPtr secdef;
 
     secdef = virDomainDefGetSecurityLabelDef(def, SECURITY_SELINUX_NAME);
-    if (!secdef || !secdef->label)
+    if (!secdef || !secdef->imagelabel)
         return 0;
 
     return virSecuritySELinuxFSetFilecon(fd, secdef->imagelabel);