summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJiří Klimeš <jklimes@redhat.com>2012-01-30 18:07:35 +0100
committerJiří Klimeš <jklimes@redhat.com>2012-01-30 18:16:37 +0100
commitdd562a3dc4eeb7ee64a1835bbf146985a9c91957 (patch)
tree8e421600bdf1d2e353ec502cdecf771521762c73
parent81a668ba3106913e2bb233217cca89965276fd3d (diff)
downloadNetworkManager-dd562a3dc4eeb7ee64a1835bbf146985a9c91957.tar.gz
supplicant: fix checking config for EAP-FAST authentication
We do not want to break other methods, when EAP-FAST specific error condition is detected: no PAC file provided and automatic PAC provisioning is disabled.
-rw-r--r--src/supplicant-manager/nm-supplicant-config.c20
1 files changed, 13 insertions, 7 deletions
diff --git a/src/supplicant-manager/nm-supplicant-config.c b/src/supplicant-manager/nm-supplicant-config.c
index 7d306dde30..0dfcaada2b 100644
--- a/src/supplicant-manager/nm-supplicant-config.c
+++ b/src/supplicant-manager/nm-supplicant-config.c
@@ -711,7 +711,7 @@ nm_supplicant_config_add_setting_8021x (NMSupplicantConfig *self,
gboolean success, added;
GString *phase1, *phase2;
const GByteArray *array;
- gboolean peap = FALSE;
+ gboolean peap = FALSE, fast = FALSE;
guint32 i, num_eap;
gboolean fast_provisoning_allowed = FALSE;
@@ -737,15 +737,15 @@ nm_supplicant_config_add_setting_8021x (NMSupplicantConfig *self,
ADD_STRING_LIST_VAL (setting, 802_1x, eap_method, eap_methods, "eap", ' ', TRUE, FALSE);
- /* Check for PEAP + GTC */
+ /* Check EAP method for special handling: PEAP + GTC, FAST */
num_eap = nm_setting_802_1x_get_num_eap_methods (setting);
for (i = 0; i < num_eap; i++) {
const char *method = nm_setting_802_1x_get_eap_method (setting, i);
- if (method && (strcasecmp (method, "peap") == 0)) {
+ if (method && (strcasecmp (method, "peap") == 0))
peap = TRUE;
- break;
- }
+ if (method && (strcasecmp (method, "fast") == 0))
+ fast = TRUE;
}
/* When using PEAP-GTC, we're likely using Cisco kit, so we want to turn
@@ -835,8 +835,14 @@ nm_supplicant_config_add_setting_8021x (NMSupplicantConfig *self,
return FALSE;
}
g_free (blob_name);
- } else
- return FALSE;
+ } else {
+ /* This is only error for EAP-FAST; don't disturb other methods. */
+ if (fast) {
+ nm_log_err (LOGD_SUPPLICANT, "EAP-FAST error: no PAC file provided and "
+ "automatic PAC provisioning is disabled.");
+ return FALSE;
+ }
+ }
}
/* CA path */