Blame SOURCES/libvirt-qemuDomainSecretStorageSourcePrepare-Fix-naming-of-alias-variables.patch

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