diff options
author | Thomas Haller <thaller@redhat.com> | 2018-09-14 11:13:05 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2018-09-14 15:17:53 +0200 |
commit | 6bfab6796f064c4f878e05476a60cd59fa8bf11e (patch) | |
tree | 757fb6a57ac9ec19efca5a8a33eb9c484ccf4354 /clients/cli/common.c | |
parent | 63639f338fcf5380e0606ea32aefce1273497164 (diff) | |
download | NetworkManager-6bfab6796f064c4f878e05476a60cd59fa8bf11e.tar.gz |
cli: fix reading "vpn.secrets.*" from passwd-file
Due to a bug, we required VPN secrets to be prefixed with
"vpn.secret." instead of "vpn.secrets.". This was a change
in behavior with 1.12.0 release.
Fix it, to restore the old behavior. For backward compatibility
to the broken behavior, adjust parse_passwords() to treat accept
that as well.
https://bugzilla.redhat.com/show_bug.cgi?id=1628833
https://github.com/NetworkManager/NetworkManager/pull/201
Fixes: 0601b5d725b072bd3ce4ec60be867898a16f85cd
(cherry picked from commit 5815ae8c60961f088e4e54b41ddf8254cb83574a)
Diffstat (limited to 'clients/cli/common.c')
-rw-r--r-- | clients/cli/common.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/clients/cli/common.c b/clients/cli/common.c index ede447bad0..88e9815455 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); } |