render / rpms / libvirt

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