diff options
| author | Michael Biebl <biebl@debian.org> | 2018-09-23 10:11:11 +0200 |
|---|---|---|
| committer | Michael Biebl <biebl@debian.org> | 2018-09-23 10:11:11 +0200 |
| commit | 135c3be0fb0eedb7a1b493ffde6c1ab3d23771f6 (patch) | |
| tree | 40408d2ad887437e3ca63ff7fc6334bf22ae3fe6 /clients/cli | |
| parent | 81e5928f26b40b0227604ccaf4b051fe14c9b3ef (diff) | |
| parent | e126f3e804c35480c4f075777430419d6ece23da (diff) | |
Update upstream source from tag 'upstream/1.12.4'
Update to upstream version '1.12.4' with Debian dir 650b52e60bf462f2972d0c33deec2cb171953445
Diffstat (limited to 'clients/cli')
| -rw-r--r-- | clients/cli/common.c | 6 | ||||
| -rw-r--r-- | clients/cli/connections.c | 10 | ||||
| -rw-r--r-- | clients/cli/devices.c | 2 |
3 files changed, 13 insertions, 5 deletions
diff --git a/clients/cli/common.c b/clients/cli/common.c index 09c86334..4aea0d5b 100644 --- a/clients/cli/common.c +++ b/clients/cli/common.c @@ -630,13 +630,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 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); diff --git a/clients/cli/devices.c b/clients/cli/devices.c index aa28678f..be759732 100644 --- a/clients/cli/devices.c +++ b/clients/cli/devices.c @@ -1470,7 +1470,7 @@ nmc_device_state_to_color (NMDeviceState state) else if (state == NM_DEVICE_STATE_ACTIVATED) return NM_META_COLOR_DEVICE_ACTIVATED; - g_return_val_if_reached (NM_META_COLOR_DEVICE_UNKNOWN); + return NM_META_COLOR_DEVICE_UNKNOWN; } static void |