mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-22 12:35:17 +00:00
qemu_security: Implement qemuSecurityMoveImageMetadata
Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Cole Robinson <crobinso@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
parent
44a204e674
commit
706e68237f
@ -162,6 +162,25 @@ qemuSecurityRestoreImageLabel(virQEMUDriverPtr driver,
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
qemuSecurityMoveImageMetadata(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr vm,
|
||||
virStorageSourcePtr src,
|
||||
virStorageSourcePtr dst)
|
||||
{
|
||||
qemuDomainObjPrivatePtr priv = vm->privateData;
|
||||
pid_t pid = -1;
|
||||
|
||||
if (!priv->rememberOwner)
|
||||
return 0;
|
||||
|
||||
if (qemuDomainNamespaceEnabled(vm, QEMU_DOMAIN_NS_MOUNT))
|
||||
pid = vm->pid;
|
||||
|
||||
return virSecurityManagerMoveImageMetadata(driver->securityManager, pid, src, dst);
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
qemuSecuritySetHostdevLabel(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr vm,
|
||||
|
@ -42,6 +42,11 @@ int qemuSecurityRestoreImageLabel(virQEMUDriverPtr driver,
|
||||
virStorageSourcePtr src,
|
||||
bool backingChain);
|
||||
|
||||
int qemuSecurityMoveImageMetadata(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr vm,
|
||||
virStorageSourcePtr src,
|
||||
virStorageSourcePtr dst);
|
||||
|
||||
int qemuSecuritySetHostdevLabel(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr vm,
|
||||
virDomainHostdevDefPtr hostdev);
|
||||
|
Loading…
x
Reference in New Issue
Block a user