[PATCH 1/2] admin: Retrieve the SASL context for both local and remote connection

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
---
 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

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



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]