mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-22 23:10:18 +01:00
supplicant: If password field is empty, check password-raw
This commit is contained in:
parent
dc92d1258d
commit
b08e2b8932
1 changed files with 15 additions and 2 deletions
|
|
@ -728,8 +728,21 @@ nm_supplicant_config_add_setting_8021x (NMSupplicantConfig *self,
|
||||||
g_return_val_if_fail (connection_uid != NULL, FALSE);
|
g_return_val_if_fail (connection_uid != NULL, FALSE);
|
||||||
|
|
||||||
value = nm_setting_802_1x_get_password (setting);
|
value = nm_setting_802_1x_get_password (setting);
|
||||||
if (!add_string_val (self, value, "password", FALSE, TRUE))
|
if (value) {
|
||||||
return FALSE;
|
if (!add_string_val (self, value, "password", FALSE, TRUE))
|
||||||
|
return FALSE;
|
||||||
|
} else {
|
||||||
|
array = nm_setting_802_1x_get_password_raw (setting);
|
||||||
|
success = nm_supplicant_config_add_option (self,
|
||||||
|
"password",
|
||||||
|
(const char *)array->data,
|
||||||
|
array->len,
|
||||||
|
TRUE);
|
||||||
|
if (!success) {
|
||||||
|
nm_log_warn (LOGD_SUPPLICANT, "Error adding password-raw to supplicant config.");
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
}
|
||||||
value = nm_setting_802_1x_get_pin (setting);
|
value = nm_setting_802_1x_get_pin (setting);
|
||||||
if (!add_string_val (self, value, "pin", FALSE, TRUE))
|
if (!add_string_val (self, value, "pin", FALSE, TRUE))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue