From dfdcbfe115a700adc83c44ba50438d091fb6e54f Mon Sep 17 00:00:00 2001 From: Lubomir Rintel Date: Sat, 22 Nov 2014 09:58:52 +0100 Subject: [PATCH] core: don't wipe out VPN secrets if we're changing the connection The VPN secret properties are hashes and thus the default property value does not work with them. --- src/settings/nm-settings-connection.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/settings/nm-settings-connection.c b/src/settings/nm-settings-connection.c index 49331d6d7..529f4d8f4 100644 --- a/src/settings/nm-settings-connection.c +++ b/src/settings/nm-settings-connection.c @@ -1229,6 +1229,12 @@ has_some_secrets_cb (NMSetting *setting, { GParamSpec *pspec; + if (NM_IS_SETTING_VPN (setting)) { + if (nm_setting_vpn_get_num_secrets (NM_SETTING_VPN(setting))) + *((gboolean *) user_data) = TRUE; + return; + } + pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (G_OBJECT (setting)), key); if (pspec) { if ( (flags & NM_SETTING_PARAM_SECRET)