diff options
| author | Michael Biebl <biebl@debian.org> | 2018-09-15 01:05:35 +0200 |
|---|---|---|
| committer | Michael Biebl <biebl@debian.org> | 2018-09-15 01:05:35 +0200 |
| commit | d1148fc0e24d30260606f292db3bb21ba9a6adc5 (patch) | |
| tree | 5f2251e1da11451b72c9dedbe629e3a90ec5bf13 /clients/cli | |
| parent | ffe03e75298bcd15849e314c8233cb9b696d59a3 (diff) | |
| parent | c240974325c552cad177c457d6ff04e381fd77a3 (diff) | |
Update upstream source from tag 'upstream/1.14.0'
Update to upstream version '1.14.0' with Debian dir a85bbd526d758f044876cc0acaa7be950ec06fae
Diffstat (limited to 'clients/cli')
| -rw-r--r-- | clients/cli/common.c | 6 | ||||
| -rw-r--r-- | clients/cli/connections.c | 10 |
2 files changed, 12 insertions, 4 deletions
diff --git a/clients/cli/common.c b/clients/cli/common.c index ede447ba..88e98154 100644 --- a/clients/cli/common.c +++ b/clients/cli/common.c @@ -645,13 +645,13 @@ vpn_openconnect_get_secrets (NMConnection *connection, GPtrArray *secrets) if (!nm_streq0 (secret->vpn_type, NM_SECRET_AGENT_VPN_TYPE_OPENCONNECT)) continue; - if (nm_streq0 (secret->entry_id, NM_SECRET_AGENT_ENTRY_ID_PREFX_VPN_SECRET "cookie")) { + if (nm_streq0 (secret->entry_id, NM_SECRET_AGENT_ENTRY_ID_PREFX_VPN_SECRETS "cookie")) { g_free (secret->value); secret->value = g_steal_pointer (&cookie); - } else if (nm_streq0 (secret->entry_id, NM_SECRET_AGENT_ENTRY_ID_PREFX_VPN_SECRET "gateway")) { + } else if (nm_streq0 (secret->entry_id, NM_SECRET_AGENT_ENTRY_ID_PREFX_VPN_SECRETS "gateway")) { g_free (secret->value); secret->value = g_steal_pointer (&gateway); - } else if (nm_streq0 (secret->entry_id, NM_SECRET_AGENT_ENTRY_ID_PREFX_VPN_SECRET "gwcert")) { + } else if (nm_streq0 (secret->entry_id, NM_SECRET_AGENT_ENTRY_ID_PREFX_VPN_SECRETS "gwcert")) { g_free (secret->value); secret->value = g_steal_pointer (&gwcert); } diff --git a/clients/cli/connections.c b/clients/cli/connections.c index ad0b7672..bcd257ac 100644 --- a/clients/cli/connections.c +++ b/clients/cli/connections.c @@ -2607,7 +2607,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); |