Blame SOURCES/0039-spice-do-not-show-error-on-cancel-close-of-auth-dial.patch

1efd99
From 3b8f6932fd4b9f4019eb305943f6d1b6dd01e119 Mon Sep 17 00:00:00 2001
1efd99
From: Victor Toso <me@victortoso.com>
1efd99
Date: Fri, 2 Jun 2017 14:05:51 +0200
1efd99
Subject: [PATCH virt-viewer 39/39] spice: do not show error on cancel/close of
1efd99
 auth dialog
1efd99
1efd99
Mainly an issue for kiosk mode due the fact that it'll not quit the
1efd99
application on cancel. That means that authentication dialog can't
1efd99
really be canceled and showing an input error such as "wrong password"
1efd99
is misleading (no password should be taken in consideration on Cancel).
1efd99
1efd99
Related: https://bugzilla.redhat.com/show_bug.cgi?id=1446161
1efd99
1efd99
Signed-off-by: Victor Toso <victortoso@redhat.com>
1efd99
Acked-by: Pavel Grunt <pgrunt@redhat.com>
1efd99
Acked-by: Eduardo Lima (Etrunko) <etrunko@redhat.com>
1efd99
---
1efd99
 src/virt-viewer-session-spice.c | 4 ++++
1efd99
 1 file changed, 4 insertions(+)
1efd99
1efd99
diff --git a/src/virt-viewer-session-spice.c b/src/virt-viewer-session-spice.c
1efd99
index 5f326aa..f43ed65 100644
1efd99
--- a/src/virt-viewer-session-spice.c
1efd99
+++ b/src/virt-viewer-session-spice.c
1efd99
@@ -724,6 +724,10 @@ virt_viewer_session_spice_main_channel_event(SpiceChannel *channel,
1efd99
                                                    &password);
1efd99
         g_free(host);
1efd99
         if (!ret) {
1efd99
+            /* ret is false when dialog did not return GTK_RESPONSE_OK. We
1efd99
+             * should ignore auth error dialog if user has cancelled or closed
1efd99
+             * the dialog */
1efd99
+            self->priv->pass_try = 0;
1efd99
             g_signal_emit_by_name(session, "session-cancelled");
1efd99
         } else {
1efd99
             gboolean openfd;
1efd99
-- 
1efd99
2.9.4
1efd99