[libvirt] [PATCH v2 02/14] util: Fix secret generation in virStorageSourceParseRBDColonString

John Ferlan posted 14 patches 8 years, 4 months ago
There is a newer version of this series
[libvirt] [PATCH v2 02/14] util: Fix secret generation in virStorageSourceParseRBDColonString
Posted by John Ferlan 8 years, 4 months ago
Commit id '5604c056' used the wrong API to generate the
<secret type='%s'..." field. The previous code used the
correct API as was done in commit id '6887af39'. The data
is actually a usage type not an auth type even though the
result is the same.

Signed-off-by: John Ferlan <jferlan@redhat.com>
---
 src/util/virstoragefile.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/util/virstoragefile.c b/src/util/virstoragefile.c
index e94ad32f0..1040e9a17 100644
--- a/src/util/virstoragefile.c
+++ b/src/util/virstoragefile.c
@@ -44,6 +44,7 @@
 #include "virbuffer.h"
 #include "virjson.h"
 #include "virstorageencryption.h"
+#include "virsecret.h"
 
 #define VIR_FROM_THIS VIR_FROM_STORAGE
 
@@ -2546,7 +2547,7 @@ virStorageSourceParseRBDColonString(const char *rbdstr,
                 goto error;
 
             if (VIR_STRDUP(authdef->secrettype,
-                           virStorageAuthTypeToString(VIR_STORAGE_AUTH_TYPE_CEPHX)) < 0)
+                           virSecretUsageTypeToString(VIR_SECRET_USAGE_TYPE_CEPH)) < 0)
                 goto error;
             src->auth = authdef;
             authdef = NULL;
-- 
2.13.5

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH v2 02/14] util: Fix secret generation in virStorageSourceParseRBDColonString
Posted by Peter Krempa 8 years, 4 months ago
On Fri, Sep 15, 2017 at 20:30:05 -0400, John Ferlan wrote:
> Commit id '5604c056' used the wrong API to generate the

oops

> <secret type='%s'..." field. The previous code used the
> correct API as was done in commit id '6887af39'. The data
> is actually a usage type not an auth type even though the
> result is the same.

ACK
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list