mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-07 17:28:15 +00:00
security: selinux: Restore image label for externalDataStore
Rename the existing virSecuritySELinuxRestoreImageLabelInt to virSecuritySELinuxRestoreImageLabelSingle, 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
a36d3b88d6
commit
bbdf85d63a
@ -1749,7 +1749,7 @@ virSecuritySELinuxRestoreTPMFileLabelInt(virSecurityManagerPtr mgr,
|
|||||||
|
|
||||||
|
|
||||||
static int
|
static int
|
||||||
virSecuritySELinuxRestoreImageLabelInt(virSecurityManagerPtr mgr,
|
virSecuritySELinuxRestoreImageLabelSingle(virSecurityManagerPtr mgr,
|
||||||
virDomainDefPtr def,
|
virDomainDefPtr def,
|
||||||
virStorageSourcePtr src,
|
virStorageSourcePtr src,
|
||||||
bool migrated)
|
bool migrated)
|
||||||
@ -1804,6 +1804,26 @@ virSecuritySELinuxRestoreImageLabelInt(virSecurityManagerPtr mgr,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static int
|
||||||
|
virSecuritySELinuxRestoreImageLabelInt(virSecurityManagerPtr mgr,
|
||||||
|
virDomainDefPtr def,
|
||||||
|
virStorageSourcePtr src,
|
||||||
|
bool migrated)
|
||||||
|
{
|
||||||
|
if (virSecuritySELinuxRestoreImageLabelSingle(mgr, def, src, migrated) < 0)
|
||||||
|
return -1;
|
||||||
|
|
||||||
|
if (src->externalDataStore &&
|
||||||
|
virSecuritySELinuxRestoreImageLabelSingle(mgr,
|
||||||
|
def,
|
||||||
|
src->externalDataStore,
|
||||||
|
migrated) < 0)
|
||||||
|
return -1;
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
static int
|
static int
|
||||||
virSecuritySELinuxRestoreImageLabel(virSecurityManagerPtr mgr,
|
virSecuritySELinuxRestoreImageLabel(virSecurityManagerPtr mgr,
|
||||||
virDomainDefPtr def,
|
virDomainDefPtr def,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user