render / rpms / libvirt

Forked from rpms/libvirt 9 months ago
Clone
7cf89a
From ee6247cad53bf0af3a681de82931a5da67868881 Mon Sep 17 00:00:00 2001
7cf89a
Message-Id: <ee6247cad53bf0af3a681de82931a5da67868881@dist-git>
7cf89a
From: Luyao Huang <lhuang@redhat.com>
7cf89a
Date: Fri, 21 Aug 2015 10:50:55 -0700
7cf89a
Subject: [PATCH] qemu: fix cannot set graphic passwd via
7cf89a
 qemuDomainSaveImageDefineXML
7cf89a
7cf89a
https://bugzilla.redhat.com/show_bug.cgi?id=1183890 [7.2.0]
7cf89a
https://bugzilla.redhat.com/show_bug.cgi?id=1254164 [7.2.0]
7cf89a
https://bugzilla.redhat.com/show_bug.cgi?id=1255859 [7.1.z]
7cf89a
7cf89a
When we try to update a xml to a image file, we will clear the
7cf89a
graphics passwd settings, because we do not pass VIR_DOMAIN_XML_SECURE
7cf89a
to qemuDomainDefCopy, qemuDomainDefFormatBuf won't format the passwd.
7cf89a
7cf89a
Add VIR_DOMAIN_XML_SECURE flag when we call qemuDomainDefCopy
7cf89a
in qemuDomainSaveImageUpdateDef.
7cf89a
7cf89a
Signed-off-by: Luyao Huang <lhuang@redhat.com>
7cf89a
(cherry picked from commit f76df311e8896957b92d0e0c5251ee3e6754d9ac)
7cf89a
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
7cf89a
---
7cf89a
 src/qemu/qemu_driver.c | 3 ++-
7cf89a
 1 file changed, 2 insertions(+), 1 deletion(-)
7cf89a
7cf89a
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
7cf89a
index 5f7fedc..425cf90 100644
7cf89a
--- a/src/qemu/qemu_driver.c
7cf89a
+++ b/src/qemu/qemu_driver.c
7cf89a
@@ -5856,7 +5856,8 @@ qemuDomainSaveImageUpdateDef(virQEMUDriverPtr driver,
7cf89a
 
7cf89a
     if (!(newdef_migr = qemuDomainDefCopy(driver,
7cf89a
                                           newdef,
7cf89a
-                                          VIR_DOMAIN_XML_MIGRATABLE)))
7cf89a
+                                          VIR_DOMAIN_XML_MIGRATABLE |
7cf89a
+                                          VIR_DOMAIN_XML_SECURE)))
7cf89a
         goto cleanup;
7cf89a
 
7cf89a
     if (!virDomainDefCheckABIStability(def, newdef_migr)) {
7cf89a
-- 
7cf89a
2.5.0
7cf89a