]> xenbits.xensource.com Git - libvirt.git/commitdiff
security: Don't skip labelling for network disks
authorPeter Krempa <pkrempa@redhat.com>
Thu, 5 Jun 2014 13:56:33 +0000 (15:56 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Thu, 12 Jun 2014 08:32:12 +0000 (10:32 +0200)
A network disk might actually be backed by local storage. Also the path
iterator actually handles networked disks well now so remove the code
that skips the labelling in dac and selinux security driver.

src/security/security_dac.c
src/security/security_selinux.c

index 015b6994b0b6dd4df6518d370228d08d4e54ee79..9d5c25b81ca9944f2e70bfc0f7e5469cb2b418f8 100644 (file)
@@ -333,9 +333,6 @@ virSecurityDACSetSecurityImageLabel(virSecurityManagerPtr mgr,
     if (!priv->dynamicOwnership)
         return 0;
 
-    if (virDomainDiskGetType(disk) == VIR_STORAGE_TYPE_NETWORK)
-        return 0;
-
     secdef = virDomainDefGetSecurityLabelDef(def, SECURITY_DAC_NAME);
 
     if (secdef && secdef->norelabel)
index 008c58c5d4a50fb5fa617b27229114fbe0326315..228e5cbe6a950f4142a1a9988a28feefb5af762f 100644 (file)
@@ -1255,9 +1255,6 @@ virSecuritySELinuxSetSecurityImageLabel(virSecurityManagerPtr mgr,
     if (!cbdata.secdef || cbdata.secdef->norelabel)
         return 0;
 
-    if (virDomainDiskGetType(disk) == VIR_STORAGE_TYPE_NETWORK)
-        return 0;
-
     return virDomainDiskDefForeachPath(disk,
                                        true,
                                        virSecuritySELinuxSetSecurityFileLabel,