提交 bbdf85d6 编写于 作者: C Cole Robinson

security: selinux: Restore image label for externalDataStore

Rename the existing virSecuritySELinuxRestoreImageLabelInt
to virSecuritySELinuxRestoreImageLabelSingle, and extend the new
ImageLabelInt handle externalDataStore
Reviewed-by: NDaniel Henrique Barboza <danielhb413@gmail.com>
Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
Signed-off-by: NCole Robinson <crobinso@redhat.com>
上级 a36d3b88
......@@ -1749,7 +1749,7 @@ virSecuritySELinuxRestoreTPMFileLabelInt(virSecurityManagerPtr mgr,
static int
virSecuritySELinuxRestoreImageLabelInt(virSecurityManagerPtr mgr,
virSecuritySELinuxRestoreImageLabelSingle(virSecurityManagerPtr mgr,
virDomainDefPtr def,
virStorageSourcePtr src,
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
virSecuritySELinuxRestoreImageLabel(virSecurityManagerPtr mgr,
virDomainDefPtr def,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册