libnm-util: silently ignore non-secrets when updating connection secrets

This commit is contained in:
Dan Williams 2011-02-02 17:25:56 -06:00
parent c36c81e2b9
commit a5103bf234

View file

@ -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);