1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2025-01-12 15:52:55 +00:00

qemu: Properly label FDs when restoring domain with static label

When saving domain with relabel=no, the file that gets created must have the
context set anyway.  That way restore can be successful without the need of
relabelling the file.

Signed-off-by: Shivaprasad G Bhat <sbhat@linux.vnet.ibm.com>
This commit is contained in:
Shivaprasad G Bhat 2014-06-11 09:48:34 -04:00 committed by Martin Kletzander
parent 775bb9b15f
commit edc80e2344

@ -2966,6 +2966,9 @@ qemuDomainSaveMemory(virQEMUDriverPtr driver,
if (fd < 0)
goto cleanup;
if (virSecurityManagerSetImageFDLabel(driver->securityManager, vm->def, fd) < 0)
goto cleanup;
if (!(wrapperFd = virFileWrapperFdNew(&fd, path, wrapperFlags)))
goto cleanup;