From cc6484d486701aad2b3c16e06e187b464eb16fed Mon Sep 17 00:00:00 2001 From: Peter Krempa <pkrempa@redhat.com> Date: Thu, 5 Jun 2014 15:56:33 +0200 Subject: [PATCH] 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. --- src/security/security_dac.c | 3 --- src/security/security_selinux.c | 3 --- 2 files changed, 6 deletions(-) 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,