[libvirt] [PATCH 4/4] qemu: Always label newly created file on migration (save/managedsave)

Peter Krempa pkrempa at redhat.com
Wed Jun 26 13:01:50 UTC 2013


Migration to file when (managed)saving a machine failed when static
labelling was used. Use the new security driver method to avoid this.
---
 src/qemu/qemu_migration.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c
index 69d5398..e3203f6 100644
--- a/src/qemu/qemu_migration.c
+++ b/src/qemu/qemu_migration.c
@@ -4578,8 +4578,8 @@ qemuMigrationToFile(virQEMUDriverPtr driver, virDomainObjPtr vm,
          * doesn't have to open() the file, so while we still have to
          * grant SELinux access, we can do it on fd and avoid cleanup
          * later, as well as skip futzing with cgroup.  */
-        if (virSecurityManagerSetImageFDLabel(driver->securityManager, vm->def,
-                                              compressor ? pipeFD[1] : fd) < 0)
+        if (virSecurityManagerSetCreatedFDLabel(driver->securityManager, vm->def,
+                                                compressor ? pipeFD[1] : fd) < 0)
             goto cleanup;
         bypassSecurityDriver = true;
     } else {
-- 
1.8.2.1




More information about the libvir-list mailing list