qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gmur...@apache.org
Subject qpid-dispatch git commit: DISPATCH-754 - Fixed output of qdstat to just show x.509 in the authentication field for client SSL connections
Date Thu, 27 Apr 2017 13:41:59 GMT
Repository: qpid-dispatch
Updated Branches:
  refs/heads/master a0a17f4c8 -> a2a31e9e2


DISPATCH-754 - Fixed output of qdstat to just show x.509 in the authentication field for client
SSL connections


Project: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/commit/a2a31e9e
Tree: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/tree/a2a31e9e
Diff: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/diff/a2a31e9e

Branch: refs/heads/master
Commit: a2a31e9e2988ac59300c65e01038d29fdea4221a
Parents: a0a17f4
Author: Ganesh Murthy <gmurthy@redhat.com>
Authored: Thu Apr 27 09:41:20 2017 -0400
Committer: Ganesh Murthy <gmurthy@redhat.com>
Committed: Thu Apr 27 09:41:20 2017 -0400

----------------------------------------------------------------------
 src/router_core/agent_connection.c |  5 ++++-
 src/server.c                       |  4 ----
 tools/qdstat                       | 10 +++++++---
 3 files changed, 11 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/a2a31e9e/src/router_core/agent_connection.c
----------------------------------------------------------------------
diff --git a/src/router_core/agent_connection.c b/src/router_core/agent_connection.c
index 6bd3546..b3afe71 100644
--- a/src/router_core/agent_connection.c
+++ b/src/router_core/agent_connection.c
@@ -146,7 +146,10 @@ static void qdr_connection_insert_column_CT(qdr_connection_t *conn, int
col, qd_
         break;
 
     case QDR_CONNECTION_USER:
-        qd_compose_insert_string(body, conn->connection_info->user);
+        if (conn->connection_info->user)
+            qd_compose_insert_string(body, conn->connection_info->user);
+        else
+            qd_compose_insert_null(body);
         break;
 
     case QDR_CONNECTION_IS_ENCRYPTED:

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/a2a31e9e/src/server.c
----------------------------------------------------------------------
diff --git a/src/server.c b/src/server.c
index d5ad5c4..ca13a8f 100644
--- a/src/server.c
+++ b/src/server.c
@@ -142,8 +142,6 @@ const char CERT_FINGERPRINT_SHA256 = '2';
 const char CERT_FINGERPRINT_SHA512 = '5';
 char *COMPONENT_SEPARATOR = ";";
 
-const char *DEFAULT_USER_ID = "anonymous";
-
 static qd_thread_t *thread(qd_server_t *qd_server, int id)
 {
     qd_thread_t *thread = NEW(qd_thread_t);
@@ -448,8 +446,6 @@ void qd_connection_set_user(qd_connection_t *conn)
                 conn->user_id = user_id;
         }
     }
-    if (!conn->user_id)
-        conn->user_id = DEFAULT_USER_ID;
 }
 
 

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/a2a31e9e/tools/qdstat
----------------------------------------------------------------------
diff --git a/tools/qdstat b/tools/qdstat
index 6794495..abd7e39 100755
--- a/tools/qdstat
+++ b/tools/qdstat
@@ -104,10 +104,14 @@ class BusManager(Node):
         if not conn.isAuthenticated:
             return "no-auth"
         sasl = conn.sasl
-        if sasl == "GSSAPI":   sasl = "Kerberos"
-        if sasl == "EXTERNAL": sasl = "x.509"
-        if sasl == "ANONYMOUS":
+        if sasl == "GSSAPI":
+            sasl = "Kerberos"
+        elif sasl == "EXTERNAL":
+            sasl = "x.509"
+        elif sasl == "ANONYMOUS":
             return "anonymous-user"
+        if not conn.user:
+            return sasl
         return "%s(%s)" % (conn.user, sasl)
 
     def connSecurity(self, conn):


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


Mime
View raw message