Network disks don't have paths to be resolved or files to be checked
for ownership.
ee3efc41e6233e625aa03003bf3127319ccd546f checked this
for some image label functions, but was partially reverted in a
refactor. This finishes adding the check to each security driver's
set and restore label methods for images.
Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
virDomainObjPtr vm,
virDomainDiskDefPtr disk ATTRIBUTE_UNUSED)
{
+ if (disk->type == VIR_DOMAIN_DISK_TYPE_NETWORK)
+ return 0;
+
return reload_profile(mgr, vm, NULL, false);
}
if (!priv->dynamicOwnership)
return 0;
+ if (disk->type == VIR_DOMAIN_DISK_TYPE_NETWORK)
+ return 0;
+
return virDomainDiskDefForeachPath(disk,
virSecurityManagerGetAllowDiskFormatProbing(mgr),
false,
if (!priv->dynamicOwnership)
return 0;
+ if (disk->type == VIR_DOMAIN_DISK_TYPE_NETWORK)
+ return 0;
+
/* Don't restore labels on readoly/shared disks, because
* other VMs may still be accessing these
* Alternatively we could iterate over all running
if (secdef->norelabel)
return 0;
+ if (disk->type == VIR_DOMAIN_DISK_TYPE_NETWORK)
+ return 0;
+
return virDomainDiskDefForeachPath(disk,
allowDiskFormatProbing,
true,