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-22 13:21:45 +0200
commitd8ee52455bb15e94d5fd309d3c8a42bcb5087b75 (patch)
treedea3e2fe7fa32ac0a5ff72dc72678dec3c2e6ba4
parent711f69fb738a253674149eb302108dc688181190 (diff)
downloadNetworkManager-lr/tui-wep.tar.gz
tui/wifi: remove WEP optionslr/tui-wep
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.
-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;
+ }
}