mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-11 09:17:52 +03:00
admin: Retrieve the SASL context for both local and remote connection
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@redhat.com>
This commit is contained in:
parent
fa4eea8063
commit
385ec6280f
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user