From: Peter Krempa Date: Thu, 5 Jun 2014 13:56:33 +0000 (+0200) Subject: security: Don't skip labelling for network disks X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=cc6484d486701aad2b3c16e06e187b464eb16fed;p=libvirt.git security: Don't skip labelling for network disks 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. --- diff --git a/src/security/security_dac.c b/src/security/security_dac.c index 015b6994b0..9d5c25b81c 100644 --- a/src/security/security_dac.c +++ b/src/security/security_dac.c @@ -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) diff --git a/src/security/security_selinux.c b/src/security/security_selinux.c index 008c58c5d4..228e5cbe6a 100644 --- a/src/security/security_selinux.c +++ b/src/security/security_selinux.c @@ -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,