From d2388250d66a7ab075767cb863bf9853b3338ad8 Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Sun, 13 Jan 2019 21:34:01 +0100 Subject: [PATCH] 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 --- libnm-core/nm-setting-vpn.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libnm-core/nm-setting-vpn.c b/libnm-core/nm-setting-vpn.c index 62ed373df..581c70d02 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; }