[libvirt] [PATCH v4] qemu: Properly label FDs when restoring domain with static label

Martin Kletzander mkletzan at redhat.com
Wed Jun 11 14:34:45 UTC 2014


On Wed, Jun 11, 2014 at 09:48:34AM -0400, Shivaprasad G Bhat wrote:
>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
>relabeling the file.
>
>Signed-off-by: Shivaprasad G Bhat <sbhat at linux.vnet.ibm.com>
>---
> src/qemu/qemu_driver.c |    3 +++
> 1 file changed, 3 insertions(+)
>
>diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
>index 5d40239..cf5c27c 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;
>
>

ACK && Pushed.

Thanks,
Martin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20140611/abe683ef/attachment-0001.sig>


More information about the libvir-list mailing list