[Spice-devel] [PATCH spice-gtk 3/3] sasl: sasl authentication failure results in disconnection

Marc-André Lureau marcandre.lureau at gmail.com
Wed Mar 7 12:09:35 PST 2012


When SASL auth failure happen, the Spice server disconnects the
client. Sadly, this is not easily distinguishable from an IO error.
However, since it happens during authentication phase it is better to
error out an authentication error.
---
 gtk/spice-channel.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/gtk/spice-channel.c b/gtk/spice-channel.c
index a2bcdae..a960d87 100644
--- a/gtk/spice-channel.c
+++ b/gtk/spice-channel.c
@@ -1618,8 +1618,7 @@ complete:
 error:
     if (saslconn)
         sasl_dispose(&saslconn);
-    if (!c->has_error)
-        emit_main_context(channel, SPICE_CHANNEL_EVENT, SPICE_CHANNEL_ERROR_AUTH);
+    emit_main_context(channel, SPICE_CHANNEL_EVENT, SPICE_CHANNEL_ERROR_AUTH);
     c->has_error = TRUE; /* force disconnect */
     return FALSE;
 }
-- 
1.7.7.6



More information about the Spice-devel mailing list