summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Woodhouse <David.Woodhouse@intel.com>2011-05-19 23:41:28 +0100
committerDan Williams <dcbw@redhat.com>2011-05-23 13:54:03 -0500
commit1951029908f10cd8e830c180cefb876135c724f7 (patch)
treea7a1cadbac676f43d69e79526549e8504594f146
parentc0387ffbc50c67a3a11c9a5d6f24fff59c4b9a83 (diff)
downloadNetworkManager-1951029908f10cd8e830c180cefb876135c724f7.tar.gz
core: complete the openconnect migration hack; add flags for the saved secrets too (bgo #650383)
Commit e083cd5c6396e62ea93ec35bc04fed845c282673 stopped openconnect from saving its secrets. It'd been working for a whole three minutes since my previous commit. We need to have at least one secret with an *extant* flags setting of NM_SETTING_SECRET_FLAG_NONE, in order to trigger a write-out of the new set of secrets. And we might as well list all the secrets we *know* the auth-dialog is going to use, although we know there will be some secrets that we cannot predict in advance (the form entry boxes).
-rw-r--r--src/settings/nm-settings.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/settings/nm-settings.c b/src/settings/nm-settings.c
index cad4a54ae0..e23e8d1336 100644
--- a/src/settings/nm-settings.c
+++ b/src/settings/nm-settings.c
@@ -703,6 +703,10 @@ connection_visibility_changed (NMSettingsConnection *connection,
#define NM_OPENCONNECT_KEY_GATEWAY "gateway"
#define NM_OPENCONNECT_KEY_COOKIE "cookie"
#define NM_OPENCONNECT_KEY_GWCERT "gwcert"
+#define NM_OPENCONNECT_KEY_XMLCONFIG "xmlconfig"
+#define NM_OPENCONNECT_KEY_LASTHOST "lasthost"
+#define NM_OPENCONNECT_KEY_AUTOCONNECT "autoconnect"
+#define NM_OPENCONNECT_KEY_CERTSIGS "certsigs"
static void
openconnect_migrate_hack (NMConnection *connection)
@@ -721,9 +725,17 @@ openconnect_migrate_hack (NMConnection *connection)
return;
if (g_strcmp0 (nm_setting_vpn_get_service_type (s_vpn), NM_DBUS_SERVICE_OPENCONNECT) == 0) {
+ /* These are different for every login session, and should not be stored */
nm_setting_set_secret_flags (NM_SETTING (s_vpn), NM_OPENCONNECT_KEY_GATEWAY, flags, NULL);
nm_setting_set_secret_flags (NM_SETTING (s_vpn), NM_OPENCONNECT_KEY_COOKIE, flags, NULL);
nm_setting_set_secret_flags (NM_SETTING (s_vpn), NM_OPENCONNECT_KEY_GWCERT, flags, NULL);
+
+ /* These are purely internal data for the auth-dialog, and should be stored */
+ flags = 0;
+ nm_setting_set_secret_flags (NM_SETTING (s_vpn), NM_OPENCONNECT_KEY_XMLCONFIG, flags, NULL);
+ nm_setting_set_secret_flags (NM_SETTING (s_vpn), NM_OPENCONNECT_KEY_LASTHOST, flags, NULL);
+ nm_setting_set_secret_flags (NM_SETTING (s_vpn), NM_OPENCONNECT_KEY_AUTOCONNECT, flags, NULL);
+ nm_setting_set_secret_flags (NM_SETTING (s_vpn), NM_OPENCONNECT_KEY_CERTSIGS, flags, NULL);
}
}