summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLubomir Rintel <lkundrak@v3.sk>2022-08-22 13:06:31 +0200
committerLubomir Rintel <lkundrak@v3.sk>2022-08-25 14:50:02 +0200
commitb58fc7088b2233caea373f6485a5d85dfad3e16e (patch)
treef64c005c8ba760903430a1f2e62a498b9b9a0ea3
parent350dc1a61bbc670c57241855cc121d179867bf49 (diff)
downloadNetworkManager-b58fc7088b2233caea373f6485a5d85dfad3e16e.tar.gz
tui/wifi: remove WEP options
WEP has been deprecated and is disabled in some distros (RHEL 9) and wpa_supplicant upstream. Let's remove the option of using it, but also keep a chicken bit in form of an environment variable for now. https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1340
-rw-r--r--src/nmtui/nmt-page-wifi.c33
1 files changed, 22 insertions, 11 deletions
diff --git a/src/nmtui/nmt-page-wifi.c b/src/nmtui/nmt-page-wifi.c
index 60960e6409..b76463445a 100644
--- a/src/nmtui/nmt-page-wifi.c
+++ b/src/nmtui/nmt-page-wifi.c
@@ -58,16 +58,22 @@ static NmtNewtPopupEntry wifi_band[] = {{NC_("Wi-Fi", "Automatic"), NULL},
{N_("B/G (2.4 GHz)"), "bg"},
{NULL, NULL}};
-static NmtNewtPopupEntry wifi_security[] = {{NC_("Wi-Fi security", "None"), "none"},
- {N_("WPA & WPA2 Personal"), "wpa-personal"},
- {N_("WPA3 Personal"), "wpa3-personal"},
- {N_("WPA & WPA2 Enterprise"), "wpa-enterprise"},
- {N_("WEP 40/128-bit Key (Hex or ASCII)"), "wep-key"},
- {N_("WEP 128-bit Passphrase"), "wep-passphrase"},
- {N_("Dynamic WEP (802.1x)"), "dynamic-wep"},
- {N_("LEAP"), "leap"},
- {N_("Enhanced Open (OWE)"), "owe"},
- {NULL, NULL}};
+static struct {
+ NmtNewtPopupEntry common[6];
+ NmtNewtPopupEntry wep[4];
+} wifi_security = {
+ {{NC_("Wi-Fi security", "None"), "none"},
+ {N_("WPA & WPA2 Personal"), "wpa-personal"},
+ {N_("WPA3 Personal"), "wpa3-personal"},
+ {N_("WPA & WPA2 Enterprise"), "wpa-enterprise"},
+ {N_("LEAP"), "leap"},
+ {N_("Enhanced Open (OWE)"), "owe"}},
+ {{N_("WEP 40/128-bit Key (Hex or ASCII)"), "wep-key"},
+ {N_("WEP 128-bit Passphrase"), "wep-passphrase"},
+ {N_("Dynamic WEP (802.1x)"), "dynamic-wep"},
+ {NULL, NULL}},
+
+};
static NmtNewtPopupEntry wep_index[] = {{NC_("WEP key index", "1 (Default)"), "1"},
{NC_("WEP key index", "2"), "2"},
@@ -249,7 +255,7 @@ nmt_page_wifi_constructed(GObject *object)
nmt_editor_grid_append(grid, NULL, nmt_newt_separator_new(), NULL);
- widget = nmt_newt_popup_new(wifi_security);
+ widget = nmt_newt_popup_new((NmtNewtPopupEntry *) &wifi_security);
nmt_editor_grid_append(grid, _("Security"), widget, NULL);
security = widget;
@@ -403,4 +409,9 @@ nmt_page_wifi_class_init(NmtPageWifiClass *wifi_class)
object_class->constructed = nmt_page_wifi_constructed;
object_class->finalize = nmt_page_wifi_finalize;
+
+ if (!getenv("NM_ALLOW_INSECURE_WEP")) {
+ wifi_security.wep[0].label = NULL;
+ wifi_security.wep[0].id = NULL;
+ }
}