render / rpms / libvirt

Forked from rpms/libvirt 9 months ago
Clone
99cbc7
From c96a89bd5962a945f6097af4fa7264446cba613f Mon Sep 17 00:00:00 2001
99cbc7
Message-Id: <c96a89bd5962a945f6097af4fa7264446cba613f@dist-git>
99cbc7
From: Peter Krempa <pkrempa@redhat.com>
99cbc7
Date: Tue, 10 Jul 2018 17:41:10 +0200
99cbc7
Subject: [PATCH] qemu: hotplug: Do not try to add secret object for TLS if it
99cbc7
 does not exist
99cbc7
MIME-Version: 1.0
99cbc7
Content-Type: text/plain; charset=UTF-8
99cbc7
Content-Transfer-Encoding: 8bit
99cbc7
99cbc7
The check whether the object holding secret for decryption of the TLS
99cbc7
environment was wrong and would always attempt to add the object. This
99cbc7
lead to a crash due to recent refactors.
99cbc7
99cbc7
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1598015
99cbc7
99cbc7
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
99cbc7
Reviewed-by: Ján Tomko <jtomko@redhat.com>
99cbc7
(cherry picked from commit 62ef8227e2717618c96fa17f2d4f5b7570bbe980)
99cbc7
Reviewed-by: Ján Tomko <jtomko@redhat.com>
99cbc7
---
99cbc7
 src/qemu/qemu_hotplug.c | 2 +-
99cbc7
 1 file changed, 1 insertion(+), 1 deletion(-)
99cbc7
99cbc7
diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c
99cbc7
index 075f2fb72e..456bfa4493 100644
99cbc7
--- a/src/qemu/qemu_hotplug.c
99cbc7
+++ b/src/qemu/qemu_hotplug.c
99cbc7
@@ -1338,7 +1338,7 @@ qemuDomainAddTLSObjects(virQEMUDriverPtr driver,
99cbc7
     if (qemuDomainObjEnterMonitorAsync(driver, vm, asyncJob) < 0)
99cbc7
         return -1;
99cbc7
 
99cbc7
-    if (secProps &&
99cbc7
+    if (secProps && *secProps &&
99cbc7
         qemuMonitorAddObject(priv->mon, secProps, &secAlias) < 0)
99cbc7
         goto error;
99cbc7
 
99cbc7
-- 
99cbc7
2.18.0
99cbc7