[PATCH 2/5] sasl: Emit vnc-auth-failure signal on SASL auth failures



When the SASL username or password are wrong, at the moment client
application will not get any specific notification for it, they will
just know that the remote connection was closed because of an error.

This commit adds the emission of the vnc-auth-failure signal when
vnc_connection_perform_auth_sasl() fails.

https://bugzilla.redhat.com/show_bug.cgi?id=1456175

Signed-off-by: Christophe Fergeau <cfergeau redhat com>
---
 src/vncconnection.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/vncconnection.c b/src/vncconnection.c
index 08dd7ab..d8ecfd0 100644
--- a/src/vncconnection.c
+++ b/src/vncconnection.c
@@ -4419,6 +4419,7 @@ static gboolean vnc_connection_perform_auth_sasl(VncConnection *conn)
  error:
     if (saslconn)
         sasl_dispose(&saslconn);
+    vnc_connection_auth_failure(conn, "Unknown authentication failure");
     return FALSE;
 }
 #endif /* HAVE_SASL */
-- 
2.20.1



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