about summary refs log tree commit diff
path: root/clients/cli/connections.c
diff options
context:
space:
mode:
authorIain Lane <iain.lane@canonical.com>2018-10-03 09:30:23 +0100
committerIain Lane <iain.lane@canonical.com>2018-10-03 09:33:16 +0100
commit898733d427e7b640bab0ea0fa578b3224102fde2 (patch)
tree91c16e4d9d2c363858d1c9ea8a937e0f2c25373a /clients/cli/connections.c
parent9ba7891e6e49755ef4f3c9e3ef424a9ef06cf58c (diff)
parenteca0cfe89a2a7ec88abe9c03075160f46b338137 (diff)
Merge tag 'debian/1.12.4-1' into cosmic
network-manager Debian release 1.12.4-1
Diffstat (limited to 'clients/cli/connections.c')
-rw-r--r--clients/cli/connections.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/clients/cli/connections.c b/clients/cli/connections.c
index 1563178d..b547e34c 100644
--- a/clients/cli/connections.c
+++ b/clients/cli/connections.c
@@ -2565,7 +2565,15 @@ parse_passwords (const char *passwd_file, GError **error)
 			return NULL;
 		}
 
-		pwd_spec = g_strdup_printf ("%s.%s", setting, prop);
+		if (   nm_streq (setting, "vpn")
+		    && g_str_has_prefix (prop, "secret.")) {
+			/* in 1.12.0, we wrongly required the VPN secrets to be named
+			 * "vpn.secret". It should be "vpn.secrets". Work around it
+			 * (rh#1628833). */
+			pwd_spec = g_strdup_printf ("vpn.secrets.%s", &prop[NM_STRLEN ("secret.")]);
+		} else
+			pwd_spec = g_strdup_printf ("%s.%s", setting, prop);
+
 		g_hash_table_insert (pwds_hash, pwd_spec, g_strdup (pwd));
 	}
 	return g_steal_pointer (&pwds_hash);