[network-manager-openconnect] Always return success from auth-dialog
- From: David Woodhouse <dwmw2 src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [network-manager-openconnect] Always return success from auth-dialog
- Date: Tue, 12 Aug 2014 14:16:30 +0000 (UTC)
commit 5e899ec0dfff56ac15f9e19cccb8b8d17f792afd
Author: David Woodhouse <David Woodhouse intel com>
Date: Tue Aug 12 14:58:05 2014 +0100
Always return success from auth-dialog
We want to store the secrets even when we ultimately failed to log in.
This was slightly suboptimal even before, when we were failing to remember
things like the 'autoconnect' and 'certsigs' secrets. But now with HOTP
it's particularly important that we keep track of which tokens have been
used *even* if we end up failing to log in.
Even if we don't get a valid login cookie, it's OK to return success.
auth-dialog/main.c | 7 +------
1 files changed, 1 insertions(+), 6 deletions(-)
---
diff --git a/auth-dialog/main.c b/auth-dialog/main.c
index b078d48..7171247 100644
--- a/auth-dialog/main.c
+++ b/auth-dialog/main.c
@@ -180,7 +180,6 @@ typedef struct auth_ui_data {
GtkWidget *last_notice_icon;
GtkTextBuffer *log;
- int retval;
int cookie_retval;
int cancel_pipes[2];
@@ -1376,7 +1375,6 @@ static gboolean cookie_obtained(auth_ui_data *ui_data)
gtk_widget_show_all(ui_data->ssl_box);
gtk_widget_set_sensitive(ui_data->cancel_button, FALSE);
}
- ui_data->retval = 1;
} else if (!ui_data->cookie_retval) {
OPENCONNECT_X509 *cert;
gchar *key, *value;
@@ -1413,13 +1411,11 @@ static gboolean cookie_obtained(auth_ui_data *ui_data)
keyring_store_passwords,
NULL);
}
- ui_data->retval = 0;
gtk_main_quit();
} else {
/* no cookie; user cancellation */
gtk_widget_show (ui_data->no_form_label);
- ui_data->retval = 1;
}
g_hash_table_remove_all (ui_data->success_secrets);
@@ -1672,7 +1668,6 @@ static auth_ui_data *init_ui_data (char *vpn_name, GHashTable *options, GHashTab
auth_ui_data *ui_data;
ui_data = g_slice_new0(auth_ui_data);
- ui_data->retval = 1;
ui_data->form_entries = g_queue_new();
g_mutex_init(&ui_data->form_mutex);
@@ -1848,5 +1843,5 @@ int main (int argc, char **argv)
wait_for_quit ();
- return _ui_data->retval;
+ return 0;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]