]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commitdiff
security: Re-apply commit ce53382ba28179d3a504b29b4f888b6e130d53f0
authorPeter Krempa <pkrempa@redhat.com>
Thu, 30 Aug 2012 14:05:53 +0000 (16:05 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Thu, 30 Aug 2012 14:45:38 +0000 (16:45 +0200)
Recent changes in the security driver discarded changes that fixed
labeling un-confined guests.

src/security/security_manager.c

index 367f7adff97d59305659c05ad8f8b36be08d0882..07f5a9ba7f71cf1295638681d04b147e32b4cafc 100644 (file)
@@ -340,10 +340,12 @@ int virSecurityManagerGenLabel(virSecurityManagerPtr mgr,
         }
 
         if (seclabel->type == VIR_DOMAIN_SECLABEL_DEFAULT) {
-            if (sec_managers[i]->defaultConfined)
+            if (sec_managers[i]->defaultConfined) {
                 seclabel->type = VIR_DOMAIN_SECLABEL_DYNAMIC;
-            else
+            } else {
                 seclabel->type = VIR_DOMAIN_SECLABEL_NONE;
+                seclabel->norelabel = true;
+            }
         }
 
         if ((seclabel->type == VIR_DOMAIN_SECLABEL_NONE) &&