From: Shivaprasad G Bhat Date: Wed, 11 Jun 2014 13:48:34 +0000 (-0400) Subject: qemu: Properly label FDs when restoring domain with static label X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=edc80e23442526bb24d35e46ace2d9632803815f;p=libvirt.git 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 --- diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 11912557ff..ec72d9dd3a 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -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;