mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-12 13:17:58 +03:00
security: dac: Restore image label for externalDataStore
Rename the existing virSecurityDACRestoreImageLabelInt to virSecurityDACRestoreImageLabelSingle, and extend the new ImageLabelInt handle externalDataStore Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com> Signed-off-by: Cole Robinson <crobinso@redhat.com>
This commit is contained in:
parent
c1f0b31267
commit
ee5a367d06
@ -956,10 +956,10 @@ virSecurityDACSetImageLabel(virSecurityManagerPtr mgr,
|
||||
|
||||
|
||||
static int
|
||||
virSecurityDACRestoreImageLabelInt(virSecurityManagerPtr mgr,
|
||||
virDomainDefPtr def,
|
||||
virStorageSourcePtr src,
|
||||
bool migrated)
|
||||
virSecurityDACRestoreImageLabelSingle(virSecurityManagerPtr mgr,
|
||||
virDomainDefPtr def,
|
||||
virStorageSourcePtr src,
|
||||
bool migrated)
|
||||
{
|
||||
virSecurityDACDataPtr priv = virSecurityManagerGetPrivateData(mgr);
|
||||
virSecurityLabelDefPtr secdef;
|
||||
@ -1010,6 +1010,26 @@ virSecurityDACRestoreImageLabelInt(virSecurityManagerPtr mgr,
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
virSecurityDACRestoreImageLabelInt(virSecurityManagerPtr mgr,
|
||||
virDomainDefPtr def,
|
||||
virStorageSourcePtr src,
|
||||
bool migrated)
|
||||
{
|
||||
if (virSecurityDACRestoreImageLabelSingle(mgr, def, src, migrated) < 0)
|
||||
return -1;
|
||||
|
||||
if (src->externalDataStore &&
|
||||
virSecurityDACRestoreImageLabelSingle(mgr,
|
||||
def,
|
||||
src->externalDataStore,
|
||||
migrated) < 0)
|
||||
return -1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
virSecurityDACRestoreImageLabel(virSecurityManagerPtr mgr,
|
||||
virDomainDefPtr def,
|
||||
|
Loading…
Reference in New Issue
Block a user