forked from rpms/libvirt
61 lines
3.0 KiB
Diff
61 lines
3.0 KiB
Diff
From d1569e303d1132059ee4144371b9060ca59c445a Mon Sep 17 00:00:00 2001
|
|
Message-Id: <d1569e303d1132059ee4144371b9060ca59c445a@dist-git>
|
|
From: Peter Krempa <pkrempa@redhat.com>
|
|
Date: Mon, 16 Mar 2020 22:11:50 +0100
|
|
Subject: [PATCH] qemuDomainSecretStorageSourcePrepare: Fix naming of alias
|
|
variables
|
|
MIME-Version: 1.0
|
|
Content-Type: text/plain; charset=UTF-8
|
|
Content-Transfer-Encoding: 8bit
|
|
|
|
The naming of the variables was tied to what they are used for not what
|
|
the alias represents. Since we'll need to use some of the aliases for
|
|
another type of secrets fix the name so that it makes sense.
|
|
|
|
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
|
|
Reviewed-by: Ján Tomko <jtomko@redhat.com>
|
|
(cherry picked from commit b05322fc0376670edd54f9689ac8cda852581edc)
|
|
https://bugzilla.redhat.com/show_bug.cgi?id=1804750
|
|
Message-Id: <ecb2064811e2bab26024bdd8dd90dafc4c23d3eb.1584391726.git.pkrempa@redhat.com>
|
|
Reviewed-by: Ján Tomko <jtomko@redhat.com>
|
|
---
|
|
src/qemu/qemu_domain.c | 8 ++++----
|
|
1 file changed, 4 insertions(+), 4 deletions(-)
|
|
|
|
diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
|
|
index af23079d5d..6221e7090f 100644
|
|
--- a/src/qemu/qemu_domain.c
|
|
+++ b/src/qemu/qemu_domain.c
|
|
@@ -1759,8 +1759,8 @@ qemuDomainDiskHasEncryptionSecret(virStorageSourcePtr src)
|
|
static int
|
|
qemuDomainSecretStorageSourcePrepare(qemuDomainObjPrivatePtr priv,
|
|
virStorageSourcePtr src,
|
|
- const char *authalias,
|
|
- const char *encalias)
|
|
+ const char *aliasprotocol,
|
|
+ const char *aliasformat)
|
|
{
|
|
qemuDomainStorageSourcePrivatePtr srcPriv;
|
|
bool iscsiHasPS = virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_ISCSI_PASSWORD_SECRET);
|
|
@@ -1787,7 +1787,7 @@ qemuDomainSecretStorageSourcePrepare(qemuDomainObjPrivatePtr priv,
|
|
src->auth->username,
|
|
&src->auth->seclookupdef);
|
|
} else {
|
|
- srcPriv->secinfo = qemuDomainSecretAESSetupFromSecret(priv, authalias,
|
|
+ srcPriv->secinfo = qemuDomainSecretAESSetupFromSecret(priv, aliasprotocol,
|
|
usageType,
|
|
src->auth->username,
|
|
&src->auth->seclookupdef,
|
|
@@ -1799,7 +1799,7 @@ qemuDomainSecretStorageSourcePrepare(qemuDomainObjPrivatePtr priv,
|
|
}
|
|
|
|
if (hasEnc) {
|
|
- if (!(srcPriv->encinfo = qemuDomainSecretAESSetupFromSecret(priv, encalias,
|
|
+ if (!(srcPriv->encinfo = qemuDomainSecretAESSetupFromSecret(priv, aliasformat,
|
|
VIR_SECRET_USAGE_TYPE_VOLUME,
|
|
NULL,
|
|
&src->encryption->secrets[0]->seclookupdef,
|
|
--
|
|
2.25.1
|
|
|