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: 2b2404bbef
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user