|
|
1efd99 |
From 8e29fa411c7ea10d95bb290fe94d9be965153142 Mon Sep 17 00:00:00 2001
|
|
|
1efd99 |
From: "Eduardo Lima (Etrunko)" <etrunko@redhat.com>
|
|
|
1efd99 |
Date: Thu, 8 Jun 2017 17:59:54 -0300
|
|
|
1efd99 |
Subject: [PATCH virt-viewer 41/41] remote-viewer: Show authentication dialog
|
|
|
1efd99 |
again if in kiosk mode and connecting to ovirt
|
|
|
1efd99 |
|
|
|
1efd99 |
Similar to previous commit 5d9e6d2338cbb680fe761b86e6ca433b1234e6e0, now
|
|
|
1efd99 |
dealing with the case of connecting directly to ovirt:// URIs, which was
|
|
|
1efd99 |
left behind.
|
|
|
1efd99 |
|
|
|
1efd99 |
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1459808
|
|
|
1efd99 |
|
|
|
1efd99 |
Signed-off-by: Eduardo Lima (Etrunko) <etrunko@redhat.com>
|
|
|
1efd99 |
---
|
|
|
1efd99 |
src/remote-viewer.c | 14 ++++++++++----
|
|
|
1efd99 |
1 file changed, 10 insertions(+), 4 deletions(-)
|
|
|
1efd99 |
|
|
|
1efd99 |
diff --git a/src/remote-viewer.c b/src/remote-viewer.c
|
|
|
1efd99 |
index 451fb1d..d927f8a 100644
|
|
|
1efd99 |
--- a/src/remote-viewer.c
|
|
|
1efd99 |
+++ b/src/remote-viewer.c
|
|
|
1efd99 |
@@ -742,19 +742,25 @@ authenticate_cb(RestProxy *proxy, G_GNUC_UNUSED RestProxyAuth *auth,
|
|
|
1efd99 |
gchar *password = NULL;
|
|
|
1efd99 |
VirtViewerWindow *window;
|
|
|
1efd99 |
gboolean success = FALSE;
|
|
|
1efd99 |
+ gboolean kiosk = FALSE;
|
|
|
1efd99 |
|
|
|
1efd99 |
g_object_get(proxy,
|
|
|
1efd99 |
"username", &username,
|
|
|
1efd99 |
NULL);
|
|
|
1efd99 |
|
|
|
1efd99 |
+ g_object_get(G_OBJECT(user_data), "kiosk", &kiosk, NULL);
|
|
|
1efd99 |
+
|
|
|
1efd99 |
if (username == NULL || *username == '\0')
|
|
|
1efd99 |
username = g_strdup(g_get_user_name());
|
|
|
1efd99 |
|
|
|
1efd99 |
window = virt_viewer_app_get_main_window(VIRT_VIEWER_APP(user_data));
|
|
|
1efd99 |
- success = virt_viewer_auth_collect_credentials(virt_viewer_window_get_window(window),
|
|
|
1efd99 |
- "oVirt",
|
|
|
1efd99 |
- NULL,
|
|
|
1efd99 |
- &username, &password);
|
|
|
1efd99 |
+ do {
|
|
|
1efd99 |
+ success = virt_viewer_auth_collect_credentials(virt_viewer_window_get_window(window),
|
|
|
1efd99 |
+ "oVirt",
|
|
|
1efd99 |
+ NULL,
|
|
|
1efd99 |
+ &username, &password);
|
|
|
1efd99 |
+ } while (kiosk && !success);
|
|
|
1efd99 |
+
|
|
|
1efd99 |
if (success) {
|
|
|
1efd99 |
g_object_set(G_OBJECT(proxy),
|
|
|
1efd99 |
"username", username,
|
|
|
1efd99 |
--
|
|
|
1efd99 |
2.9.4
|
|
|
1efd99 |
|