render / rpms / libvirt

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