Re: [PATCH virt-viewer] remote-viewer: Show authentication dialog again if in kiosk mode and connecting to ovirt

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

 



On 08/06/17 18:19, Victor Toso wrote:
> On Thu, Jun 08, 2017 at 06:00:39PM -0300, Eduardo Lima (Etrunko) wrote:
>> Similar to previous commits, but the case for connecting directly to
>> ovirt:// URIs was not dealt with.
>>
>> Related: https://bugzilla.redhat.com/show_bug.cgi?id=1446161
>>
>> Signed-off-by: Eduardo Lima (Etrunko) <etrunko@xxxxxxxxxx>
>> ---
>>  src/remote-viewer.c | 14 ++++++++++----
>>  1 file changed, 10 insertions(+), 4 deletions(-)
>>
>> diff --git a/src/remote-viewer.c b/src/remote-viewer.c
>> index 2db76bc..11d25ff 100644
>> --- a/src/remote-viewer.c
>> +++ b/src/remote-viewer.c
>> @@ -738,19 +738,25 @@ authenticate_cb(RestProxy *proxy, G_GNUC_UNUSED RestProxyAuth *auth,
>>      gchar *password = NULL;
>>      VirtViewerWindow *window;
>>      gboolean success = FALSE;
>> +    gboolean kiosk = FALSE;
>>  
>>      g_object_get(proxy,
>>                   "username", &username,
>>                   NULL);
>>  
>> +    g_object_get(G_OBJECT(user_data), "kiosk", &kiosk, NULL);
>> +
>>      if (username == NULL || *username == '\0')
>>          username = g_strdup(g_get_user_name());
>>  
>>      window = virt_viewer_app_get_main_window(VIRT_VIEWER_APP(user_data));
>> -    success = virt_viewer_auth_collect_credentials(virt_viewer_window_get_window(window),
>> -                                                   "oVirt",
>> -                                                   NULL,
>> -                                                   &username, &password);
>> +    do {
>> +        success = virt_viewer_auth_collect_credentials(virt_viewer_window_get_window(window),
>> +                                                       "oVirt",
>> +                                                       NULL,
>> +                                                       &username, &password);
>> +    } while (!kiosk || (kiosk && !success));
> ~~~~~~~~~~~~~~~~~^ you can drop this first check

Thanks for the tip, I did noticed it but ended up sending a wrong v2. V3
has the proper fix.

-- 
Eduardo de Barros Lima (Etrunko)
Software Engineer - RedHat
etrunko@xxxxxxxxxx

_______________________________________________
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