From 49ac11f84b61cabf36cd5e29b78c6934771c8d8f Mon Sep 17 00:00:00 2001 From: Lubomir Rintel Date: Tue, 22 Jan 2019 09:08:04 +0000 Subject: [PATCH] clients/common: drop unuseful wifi-sec.psk validation The generic connection validation produces a good result: Error: failed to modify 802-11-wireless-security.psk: ':(' is not a valid PSK. vs.: Error: Failed to add 'wifi666' connection: 802-11-wireless-security.psk: property is invalid --- clients/common/nm-meta-setting-desc.c | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/clients/common/nm-meta-setting-desc.c b/clients/common/nm-meta-setting-desc.c index d5435683e1..a62504448c 100644 --- a/clients/common/nm-meta-setting-desc.c +++ b/clients/common/nm-meta-setting-desc.c @@ -4848,16 +4848,6 @@ _gobject_enum_pre_set_notify_fcn_wireless_security_wep_key_type (const NMMetaPro } } -static const char * -_validate_fcn_wireless_security_psk (const char *value, char **out_to_free, GError **error) -{ - if (!nm_utils_wpa_psk_valid (value)) { - g_set_error (error, 1, 0, _("'%s' is not a valid PSK"), value); - return NULL; - } - return value; -} - /*****************************************************************************/ static gconstpointer @@ -7757,9 +7747,6 @@ static const NMMetaPropertyInfo *const property_infos_WIRELESS_SECURITY[] = { PROPERTY_INFO_WITH_DESC (NM_SETTING_WIRELESS_SECURITY_PSK, .is_secret = TRUE, .property_type = &_pt_gobject_string, - .property_typ_data = DEFINE_PROPERTY_TYP_DATA_SUBTYPE (gobject_string, - .validate_fcn = _validate_fcn_wireless_security_psk, - ), ), PROPERTY_INFO_WITH_DESC (NM_SETTING_WIRELESS_SECURITY_PSK_FLAGS, .property_type = &_pt_gobject_secret_flags,