Re: [PATCH virt-viewer] spice: show an error dialog if password is invalid

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

 



Looks good, ACK.

On 08/02/2013 04:54 PM, Marc-André Lureau wrote:
Error message should show up when input the wrong password for spice
guests as vnc guests.

https://bugzilla.redhat.com/show_bug.cgi?id=990883
---
  src/virt-viewer-session-spice.c | 6 ++++++
  1 file changed, 6 insertions(+)

diff --git a/src/virt-viewer-session-spice.c b/src/virt-viewer-session-spice.c
index 656814c..f574539 100644
--- a/src/virt-viewer-session-spice.c
+++ b/src/virt-viewer-session-spice.c
@@ -53,6 +53,7 @@ struct _VirtViewerSessionSpicePrivate {
      int channel_count;
      int usbredir_channel_count;
      gboolean has_sw_smartcard_reader;
+    guint pass_try;
  };

  #define VIRT_VIEWER_SESSION_SPICE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE((o), VIRT_VIEWER_TYPE_SESSION_SPICE, VirtViewerSessionSpicePrivate))
@@ -488,6 +489,11 @@ virt_viewer_session_spice_main_channel_event(SpiceChannel *channel G_GNUC_UNUSED
          break;
      case SPICE_CHANNEL_ERROR_AUTH:
          DEBUG_LOG("main channel: auth failure (wrong password?)");
+
+        if (self->priv->pass_try++)
+            g_signal_emit_by_name(session, "session-auth-failed",
+                                  _("invalid password"));
+
          int ret = virt_viewer_auth_collect_credentials(self->priv->main_window,
                                                         "SPICE",
                                                         NULL,


_______________________________________________
virt-tools-list mailing list
virt-tools-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/virt-tools-list





[Index of Archives]     [Linux Virtualization]     [KVM Development]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]     [Video 4 Linux]

  Powered by Linux