mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-28 06:20:10 +01:00
settings: set deprecated 'security' for GetSettings() not to break old clients
Old clients might expect 802-11-wireless.security being set for secured Wi-Fi connections. So to be on a safer side, we set the property in D-Bus GetSettings() result.
This commit is contained in:
parent
0185e8371f
commit
ea78744555
1 changed files with 12 additions and 0 deletions
|
|
@ -1152,6 +1152,18 @@ get_settings_auth_cb (NMSettingsConnection *self,
|
|||
g_slist_free_full (bssid_list, g_free);
|
||||
}
|
||||
|
||||
/* 802-11-wireless.security property is deprecated. But we set it here so that
|
||||
* we don't disturb old clients that might expect it being properly set for
|
||||
* secured Wi-Fi connections.
|
||||
*/
|
||||
if (nm_connection_get_setting_wireless_security (NM_CONNECTION (dupl_con))) {
|
||||
s_wifi = nm_connection_get_setting_wireless (NM_CONNECTION (dupl_con));
|
||||
g_assert (s_wifi);
|
||||
g_object_set (s_wifi,
|
||||
NM_SETTING_WIRELESS_SEC, NM_SETTING_WIRELESS_SECURITY_SETTING_NAME,
|
||||
NULL);
|
||||
}
|
||||
|
||||
/* Secrets should *never* be returned by the GetSettings method, they
|
||||
* get returned by the GetSecrets method which can be better
|
||||
* protected against leakage of secrets to unprivileged callers.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue