size_t secret_size;
virSecretPtr sec = NULL;
char *secret = NULL;
+ char uuidStr[VIR_UUID_STRING_BUFLEN];
/* look up secret */
switch (diskSecretType) {
case VIR_DOMAIN_DISK_SECRET_TYPE_UUID:
sec = virSecretLookupByUUID(conn, uuid);
+ virUUIDFormat(uuid, uuidStr);
break;
case VIR_DOMAIN_DISK_SECRET_TYPE_USAGE:
sec = virSecretLookupByUsage(conn, secretUsageType, usage);
if (diskSecretType == VIR_DOMAIN_DISK_SECRET_TYPE_UUID) {
virReportError(VIR_ERR_NO_SECRET,
_("%s no secret matches uuid '%s'"),
- scheme, uuid);
+ scheme, uuidStr);
} else {
virReportError(VIR_ERR_NO_SECRET,
_("%s no secret matches usage value '%s'"),
virReportError(VIR_ERR_INTERNAL_ERROR,
_("could not get value of the secret for "
"username '%s' using uuid '%s'"),
- username, uuid);
+ username, uuidStr);
} else {
virReportError(VIR_ERR_INTERNAL_ERROR,
_("could not get value of the secret for "
#include "virobject.h"
#include "virrandom.h"
#include "virstring.h"
+#include "viruuid.h"
#define VIR_FROM_THIS VIR_FROM_STORAGE
unsigned char *secret_value = NULL;
virStoragePoolAuthChap chap;
int ret = -1;
+ char uuidStr[VIR_UUID_STRING_BUFLEN];
if (def->source.authType == VIR_STORAGE_POOL_AUTH_NONE)
return 0;
VIR_SECRET_GET_VALUE_INTERNAL_CALL);
if (!secret_value) {
if (chap.secret.uuidUsable) {
+ virUUIDFormat(chap.secret.uuid, uuidStr);
virReportError(VIR_ERR_INTERNAL_ERROR,
_("could not get the value of the secret "
"for username %s using uuid '%s'"),
- chap.username, chap.secret.uuid);
+ chap.username, uuidStr);
} else {
virReportError(VIR_ERR_INTERNAL_ERROR,
_("could not get the value of the secret "
}
} else {
if (chap.secret.uuidUsable) {
+ virUUIDFormat(chap.secret.uuid, uuidStr);
virReportError(VIR_ERR_NO_SECRET,
_("no secret matches uuid '%s'"),
- chap.secret.uuid);
+ uuidStr);
} else {
virReportError(VIR_ERR_NO_SECRET,
_("no secret matches usage value '%s'"),
if (pool->def->source.auth.cephx.secret.uuidUsable) {
virReportError(VIR_ERR_NO_SECRET,
_("no secret matches uuid '%s'"),
- pool->def->source.auth.cephx.secret.uuid);
+ secretUuid);
} else {
virReportError(VIR_ERR_NO_SECRET,
_("no secret matches usage value '%s'"),
_("could not get the value of the secret "
"for username '%s' using uuid '%s'"),
pool->def->source.auth.cephx.username,
- pool->def->source.auth.cephx.secret.uuid);
+ secretUuid);
} else {
virReportError(VIR_ERR_INTERNAL_ERROR,
_("could not get the value of the secret "