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

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