Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx> --- src/driver.c | 7 ++++++- src/remote/remote_daemon_dispatch.c | 8 +++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/src/driver.c b/src/driver.c index c7a9c2659f..35f8156605 100644 --- a/src/driver.c +++ b/src/driver.c @@ -165,8 +165,13 @@ virGetConnectGeneric(virThreadLocal *threadPtr, const char *name) ident = virIdentityGetCurrent(); if (ident) { g_autoptr(virTypedParamList) tmp = virIdentityGetParameters(ident); + virTypedParameterPtr par; + size_t npar; - if (virConnectSetIdentity(conn, tmp->par, tmp->npar, 0) < 0) + if (virTypedParamListFetch(tmp, &par, &npar) < 0) + goto error; + + if (virConnectSetIdentity(conn, par, npar, 0) < 0) goto error; } } diff --git a/src/remote/remote_daemon_dispatch.c b/src/remote/remote_daemon_dispatch.c index 4fc83dbd90..7144e9e7ca 100644 --- a/src/remote/remote_daemon_dispatch.c +++ b/src/remote/remote_daemon_dispatch.c @@ -1824,7 +1824,13 @@ remoteOpenConn(const char *uri, VIR_DEBUG("Opened driver %p", newconn); if (preserveIdentity) { - if (virConnectSetIdentity(newconn, identparams->par, identparams->npar, 0) < 0) + virTypedParameterPtr par; + size_t npar; + + if (virTypedParamListFetch(identparams, &par, &npar) < 0) + return -1; + + if (virConnectSetIdentity(newconn, par, npar, 0) < 0) return -1; VIR_DEBUG("Forwarded current identity to secondary driver"); -- 2.39.2