Blame SOURCES/0009-Add-debug-logs-wrt-credential-gathering.patch

bf78cb
From 109cb2369ce3064e96c91e4387c4e122cf722d53 Mon Sep 17 00:00:00 2001
bf78cb
From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= <berrange@redhat.com>
bf78cb
Date: Wed, 31 Jan 2018 11:11:09 +0000
bf78cb
Subject: [PATCH] Add debug logs wrt credential gathering
bf78cb
MIME-Version: 1.0
bf78cb
Content-Type: text/plain; charset=UTF-8
bf78cb
Content-Transfer-Encoding: 8bit
bf78cb
bf78cb
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
bf78cb
(cherry picked from commit 8e14f8a00c486ac4a133fcd190526e73406d9cb6)
bf78cb
---
bf78cb
 src/vncconnection.c | 7 +++++++
bf78cb
 1 file changed, 7 insertions(+)
bf78cb
bf78cb
diff --git a/src/vncconnection.c b/src/vncconnection.c
bf78cb
index e5496ef..35966c9 100644
bf78cb
--- a/src/vncconnection.c
bf78cb
+++ b/src/vncconnection.c
bf78cb
@@ -3537,6 +3537,8 @@ static gboolean vnc_connection_gather_credentials(VncConnection *conn)
bf78cb
 {
bf78cb
     VncConnectionPrivate *priv = conn->priv;
bf78cb
 
bf78cb
+    VNC_DEBUG("Checking if credentials are needed");
bf78cb
+
bf78cb
     if (priv->coroutine_stop)
bf78cb
         return FALSE;
bf78cb
 
bf78cb
@@ -3554,16 +3556,19 @@ static gboolean vnc_connection_gather_credentials(VncConnection *conn)
bf78cb
             g_value_init(&username, VNC_TYPE_CONNECTION_CREDENTIAL);
bf78cb
             g_value_set_enum(&username, VNC_CONNECTION_CREDENTIAL_USERNAME);
bf78cb
             authCred = g_value_array_append(authCred, &username);
bf78cb
+            VNC_DEBUG("Want a username");
bf78cb
         }
bf78cb
         if (priv->want_cred_password) {
bf78cb
             g_value_init(&password, VNC_TYPE_CONNECTION_CREDENTIAL);
bf78cb
             g_value_set_enum(&password, VNC_CONNECTION_CREDENTIAL_PASSWORD);
bf78cb
             authCred = g_value_array_append(authCred, &password);
bf78cb
+            VNC_DEBUG("Want a password");
bf78cb
         }
bf78cb
         if (priv->want_cred_x509) {
bf78cb
             g_value_init(&clientname, VNC_TYPE_CONNECTION_CREDENTIAL);
bf78cb
             g_value_set_enum(&clientname, VNC_CONNECTION_CREDENTIAL_CLIENTNAME);
bf78cb
             authCred = g_value_array_append(authCred, &clientname);
bf78cb
+            VNC_DEBUG("Want a TLS clientname");
bf78cb
         }
bf78cb
 
bf78cb
         sigdata.params.authCred = authCred;
bf78cb
@@ -3577,6 +3582,8 @@ static gboolean vnc_connection_gather_credentials(VncConnection *conn)
bf78cb
         VNC_DEBUG("Waiting for missing credentials");
bf78cb
         g_condition_wait(vnc_connection_has_credentials, conn);
bf78cb
         VNC_DEBUG("Got all credentials");
bf78cb
+    } else {
bf78cb
+        VNC_DEBUG("No credentials required");
bf78cb
     }
bf78cb
     return !vnc_connection_has_error(conn);
bf78cb
 }