[network-manager-applet] applet: more import fixes for vpnc and pptp



commit e7fed4cc0cfcea1a31089896917efc60d333b267
Author: Dan Williams <dcbw redhat com>
Date:   Mon Mar 14 00:14:03 2011 -0500

    applet: more import fixes for vpnc and pptp
    
    A historical oddity with vpnc is that the passwords are stored in
    the keyring using different names than the NM-vpnc property names
    for them; "password" == "Xauth password", while "group-password" ==
    "IPSec secret".
    
    So after the manual VPN-specific setting of secret flags, don't
    run the generic code below, because the generic code would find
    the "group-password" or "password" items in the keyring, and add a
    secret flag value for them, which would not be a known NM-vpnc
    property and thus would fail validation in the plugin daemon.

 src/gconf-helpers/gconf-upgrade.c |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/src/gconf-helpers/gconf-upgrade.c b/src/gconf-helpers/gconf-upgrade.c
index a352085..a313b80 100644
--- a/src/gconf-helpers/gconf-upgrade.c
+++ b/src/gconf-helpers/gconf-upgrade.c
@@ -2061,7 +2061,7 @@ nm_gconf_migrate_09_secret_flags (GConfClient *client,
 	if (!setting)
 		return;
 
-	/* Migrate vpnc secret flags */
+	/* Migrate various VPN secret flags */
 	if (NM_IS_SETTING_VPN (setting)) {
 		NMSettingSecretFlags flags;
 		NMSettingVPN *s_vpn = NM_SETTING_VPN (setting);
@@ -2081,10 +2081,16 @@ nm_gconf_migrate_09_secret_flags (GConfClient *client,
 				flags = vpnc_type_to_flag (tmp) | NM_SETTING_SECRET_FLAG_AGENT_OWNED;
 				nm_setting_set_secret_flags (setting, NM_VPNC_KEY_XAUTH_PASSWORD, flags, NULL);
 			}
+			return;
 		} else if (g_strcmp0 (service, NM_DBUS_SERVICE_PPTP) == 0) {
 			/* Mark the password as agent-owned */
 			nm_setting_set_secret_flags (setting, NM_PPTP_KEY_PASSWORD, NM_SETTING_SECRET_FLAG_AGENT_OWNED, NULL);
+			return;
 		}
+
+		/* Other VPNs not handled specially here just go through the
+		 * generic secrets flags stuff below.
+		 */
 	}
 
 	/* 802.1x connections might be 'always-ask' */



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