mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-22 15:00:31 +01:00
libnm-util: silently ignore non-secrets when updating connection secrets
This commit is contained in:
parent
c36c81e2b9
commit
a5103bf234
1 changed files with 3 additions and 7 deletions
|
|
@ -508,13 +508,9 @@ update_one_secret (NMSetting *setting, const char *key, GValue *value, GError **
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
if (!(prop_spec->flags & NM_SETTING_PARAM_SECRET)) {
|
||||
g_set_error (error,
|
||||
NM_SETTING_ERROR,
|
||||
NM_SETTING_ERROR_PROPERTY_NOT_SECRET,
|
||||
"%s", key);
|
||||
return FALSE;
|
||||
}
|
||||
/* Silently ignore non-secrets */
|
||||
if (!(prop_spec->flags & NM_SETTING_PARAM_SECRET))
|
||||
return TRUE;
|
||||
|
||||
if (g_value_type_compatible (G_VALUE_TYPE (value), G_PARAM_SPEC_VALUE_TYPE (prop_spec))) {
|
||||
g_object_set_property (G_OBJECT (setting), prop_spec->name, value);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue