|
|
a41c76 |
From 1246cae822ca95a8392463631af1126d915eaf5e Mon Sep 17 00:00:00 2001
|
|
|
a41c76 |
Message-Id: <1246cae822ca95a8392463631af1126d915eaf5e@dist-git>
|
|
|
a41c76 |
From: Peter Krempa <pkrempa@redhat.com>
|
|
|
a41c76 |
Date: Mon, 16 Mar 2020 22:11:51 +0100
|
|
|
a41c76 |
Subject: [PATCH] qemuDomainDeviceDiskDefPostParseRestoreSecAlias: Hardcode
|
|
|
a41c76 |
restored aliases
|
|
|
a41c76 |
MIME-Version: 1.0
|
|
|
a41c76 |
Content-Type: text/plain; charset=UTF-8
|
|
|
a41c76 |
Content-Transfer-Encoding: 8bit
|
|
|
a41c76 |
|
|
|
a41c76 |
In order to be able to change the function generating the alias and thus
|
|
|
a41c76 |
also the aliases itself, we must hardcode the old format for the case of
|
|
|
a41c76 |
upgrading form libvirt which didn't record them in the status XML yet.
|
|
|
a41c76 |
|
|
|
a41c76 |
Note that this code path is tested by
|
|
|
a41c76 |
'tests/qemustatusxml2xmldata/disk-secinfo-upgrade-in.xml'
|
|
|
a41c76 |
|
|
|
a41c76 |
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
|
|
|
a41c76 |
Reviewed-by: Ján Tomko <jtomko@redhat.com>
|
|
|
a41c76 |
(cherry picked from commit 95a8c4332dd42ab6a558117a07134a7fdb2ce8f4)
|
|
|
a41c76 |
|
|
|
a41c76 |
Conflicts:
|
|
|
a41c76 |
src/qemu/qemu_domain.c
|
|
|
a41c76 |
Global cleanups from ae9f630e502 not backported.
|
|
|
a41c76 |
|
|
|
a41c76 |
https://bugzilla.redhat.com/show_bug.cgi?id=1804750
|
|
|
a41c76 |
Message-Id: <4b880854049d398ffe424b811af69f4b1a074c9d.1584391726.git.pkrempa@redhat.com>
|
|
|
a41c76 |
Reviewed-by: Ján Tomko <jtomko@redhat.com>
|
|
|
a41c76 |
---
|
|
|
a41c76 |
src/qemu/qemu_domain.c | 6 ++----
|
|
|
a41c76 |
1 file changed, 2 insertions(+), 4 deletions(-)
|
|
|
a41c76 |
|
|
|
a41c76 |
diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
|
|
|
a41c76 |
index 6221e7090f..897e21726a 100644
|
|
|
a41c76 |
--- a/src/qemu/qemu_domain.c
|
|
|
a41c76 |
+++ b/src/qemu/qemu_domain.c
|
|
|
a41c76 |
@@ -9062,16 +9062,14 @@ qemuDomainDeviceDiskDefPostParseRestoreSecAlias(virDomainDiskDefPtr disk,
|
|
|
a41c76 |
}
|
|
|
a41c76 |
|
|
|
a41c76 |
if (restoreAuthSecret) {
|
|
|
a41c76 |
- if (!(authalias = qemuDomainGetSecretAESAlias(disk->info.alias, false)))
|
|
|
a41c76 |
- goto cleanup;
|
|
|
a41c76 |
+ authalias = g_strdup_printf("%s-secret0", disk->info.alias);
|
|
|
a41c76 |
|
|
|
a41c76 |
if (qemuStorageSourcePrivateDataAssignSecinfo(&priv->secinfo, &authalias) < 0)
|
|
|
a41c76 |
goto cleanup;
|
|
|
a41c76 |
}
|
|
|
a41c76 |
|
|
|
a41c76 |
if (restoreEncSecret) {
|
|
|
a41c76 |
- if (!(encalias = qemuDomainGetSecretAESAlias(disk->info.alias, true)))
|
|
|
a41c76 |
- goto cleanup;
|
|
|
a41c76 |
+ encalias = g_strdup_printf("%s-luks-secret0", disk->info.alias);
|
|
|
a41c76 |
|
|
|
a41c76 |
if (qemuStorageSourcePrivateDataAssignSecinfo(&priv->encinfo, &encalias) < 0)
|
|
|
a41c76 |
goto cleanup;
|
|
|
a41c76 |
--
|
|
|
a41c76 |
2.25.1
|
|
|
a41c76 |
|