Re: [PATCH virt-viewer 2/4] ovirt: Avoid showing up authentication dialog more times

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

 



On Tue, Mar 17, 2015 at 10:08 AM, Pavel Grunt <pgrunt@xxxxxxxxxx> wrote:
> It is used the same way in libgovirt examples
> ---
>  src/remote-viewer.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/src/remote-viewer.c b/src/remote-viewer.c
> index aa838e3..f9f4f92 100644
> --- a/src/remote-viewer.c
> +++ b/src/remote-viewer.c
> @@ -710,7 +710,7 @@ typedef struct {
>
>  static gboolean
>  authenticate_cb(RestProxy *proxy, G_GNUC_UNUSED RestProxyAuth *auth,
> -                G_GNUC_UNUSED gboolean retrying, gpointer user_data)
> +                gboolean retrying, gpointer user_data)
>  {
>      gchar *username = NULL;
>      gchar *password = NULL;
> @@ -718,6 +718,9 @@ authenticate_cb(RestProxy *proxy, G_GNUC_UNUSED RestProxyAuth *auth,
>      gboolean success = FALSE;
>      AuthenticateInfo *authenticate_info = user_data;
>
> +    if (retrying)
> +        return FALSE;
> +
>      g_object_get(proxy,
>                   "username", &username,
>                   NULL);
> --
> 2.3.2
>
> _______________________________________________
> virt-tools-list mailing list
> virt-tools-list@xxxxxxxxxx
> https://www.redhat.com/mailman/listinfo/virt-tools-list

nack!
If the dialog shows up and the user tries his password (but inserts a
wrong one) is expected that the dialog shows up again till the user
inserts a valid username/password or cancels the dialog.

-- 
Fabiano Fidêncio

_______________________________________________
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