summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2019-01-13 21:34:01 +0100
committerThomas Haller <thaller@redhat.com>2019-01-22 16:30:23 +0100
commitd2388250d66a7ab075767cb863bf9853b3338ad8 (patch)
tree39b793fbf2ded367940816358cb98b73ebcebee2
parent3a915a020533189788b435032a1cc24b58cfab0e (diff)
downloadNetworkManager-d2388250d66a7ab075767cb863bf9853b3338ad8.tar.gz
libnm: fix secret-name parameter in NMSettingClearSecretsWithFlagsFn for VPN
The secret name should be the one that we can pass to nm_setting_get_secret_flags(). It's wrong to call the function repeatedly with secret-name "secrets". Probably nobody cared anyway about the name. nm_connection_clear_secrets_with_func() is used to clear secrets based on the flags, not the secret-name. Fixes: 2b2404bbef00abf247f1246e146fc873a90a5265
-rw-r--r--libnm-core/nm-setting-vpn.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libnm-core/nm-setting-vpn.c b/libnm-core/nm-setting-vpn.c
index 62ed373df7..581c70d02a 100644
--- a/libnm-core/nm-setting-vpn.c
+++ b/libnm-core/nm-setting-vpn.c
@@ -832,7 +832,7 @@ clear_secrets_with_flags (NMSetting *setting,
NMSettingSecretFlags flags = NM_SETTING_SECRET_FLAG_NONE;
nm_setting_get_secret_flags (setting, secret, &flags, NULL);
- if (func (setting, pspec->name, flags, user_data) == TRUE) {
+ if (func (setting, secret, flags, user_data) == TRUE) {
g_hash_table_iter_remove (&iter);
changed = TRUE;
}