When commit 4a0e9108 added a support for client information retrieval, it made
the API return SASL identity info only for clients connected remotely, yet SASL
can be happily used with UNIX sockets as well.
Signed-off-by: Erik Skultety <eskultet(a)redhat.com>
---
daemon/admin_server.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/daemon/admin_server.c b/daemon/admin_server.c
index 9f24f68..5bbf229 100644
--- a/daemon/admin_server.c
+++ b/daemon/admin_server.c
@@ -237,19 +237,19 @@ adminClientGetInfo(virNetServerClientPtr client,
readonly) < 0)
goto cleanup;
+ if (virIdentityGetSASLUserName(identity, &attr) < 0 ||
+ (attr &&
+ virTypedParamsAddString(&tmpparams, nparams, &maxparams,
+ VIR_CLIENT_INFO_SASL_USER_NAME,
+ attr) < 0))
+ goto cleanup;
+
if (!virNetServerClientIsLocal(client)) {
if (virTypedParamsAddString(&tmpparams, nparams, &maxparams,
VIR_CLIENT_INFO_SOCKET_ADDR,
sock_addr) < 0)
goto cleanup;
- if (virIdentityGetSASLUserName(identity, &attr) < 0 ||
- (attr &&
- virTypedParamsAddString(&tmpparams, nparams, &maxparams,
- VIR_CLIENT_INFO_SASL_USER_NAME,
- attr) < 0))
- goto cleanup;
-
if (virIdentityGetX509DName(identity, &attr) < 0 ||
(attr &&
virTypedParamsAddString(&tmpparams, nparams, &maxparams,
--
2.5.5