Re: WPA2 Enterprise (and other things)



Jon Escombe <lists <at> dresco.co.uk> writes:

> Patch follows inline (can't post as an attachment from here - so can only
> apologise if the formatting gets messed up)

Grr, let me try that again...

diff -urN NetworkManager.orig/gnome/applet/nm-gconf-wso.c
NetworkManager.patched/gnome/applet/nm-gconf-wso.c
--- NetworkManager.orig/gnome/applet/nm-gconf-wso.c	2006-02-26
02:16:52.000000000 +0000
+++ NetworkManager.patched/gnome/applet/nm-gconf-wso.c	2006-03-24
14:18:29.000000000 +0000
@@ -137,6 +137,10 @@
 				security = NM_GCONF_WSO (nm_gconf_wso_wpa_psk_new_deserialize_gconf
(client, network, we_cipher));
 				break;
 
+			case NM_AUTH_TYPE_WPA_EAP:
+				security = NM_GCONF_WSO (nm_gconf_wso_wpa_eap_new_deserialize_gconf
(client, network, we_cipher));
+				break;
+
 			default:
 				break;
 		}
diff -urN NetworkManager.orig/gnome/applet/nm-gconf-wso-wpa-eap.c
NetworkManager.patched/gnome/applet/nm-gconf-wso-wpa-eap.c
--- NetworkManager.orig/gnome/applet/nm-gconf-wso-wpa-eap.c	2006-03-22
19:52:40.000000000 +0000
+++ NetworkManager.patched/gnome/applet/nm-gconf-wso-wpa-eap.c	2006-03-24
14:10:52.000000000 +0000
@@ -106,90 +106,80 @@
 	char *			private_key_file = NULL;
 	char *			client_cert_file = NULL;
 	char *			ca_cert_file = NULL;
-	int				wpa_version;
-	int				eap_method;
-	int				key_type;
-	int				key_mgmt;
+	int				wpa_version = 0;
+	int				eap_method = 0;
+	int				key_type = 0;
+	int				key_mgmt = 0;
 
 	g_return_val_if_fail (client != NULL, NULL);
 	g_return_val_if_fail (network != NULL, NULL);
 	g_return_val_if_fail ((we_cipher == NM_AUTH_TYPE_WPA_EAP), NULL);
 
-	if (!nm_gconf_get_int_helper (client,
+	nm_gconf_get_int_helper (client,
 							GCONF_PATH_WIRELESS_NETWORKS,
 							WPA_EAP_PREFIX"eap_method",
 							network,
-							&eap_method))
-		goto out;
+							&eap_method);
 
-	if (!nm_gconf_get_int_helper (client,
+	nm_gconf_get_int_helper (client,
 							GCONF_PATH_WIRELESS_NETWORKS,
 							WPA_EAP_PREFIX"key_type",
 							network,
-							&key_type))
-		goto out;
+							&key_type);
 
-	if (!nm_gconf_get_int_helper (client,
+	nm_gconf_get_int_helper (client,
 							GCONF_PATH_WIRELESS_NETWORKS,
 							WPA_EAP_PREFIX"wpa_version",
 							network,
-							&wpa_version))
-		goto out;
+							&wpa_version);
 
-	if (!nm_gconf_get_int_helper (client,
+	nm_gconf_get_int_helper (client,
 							GCONF_PATH_WIRELESS_NETWORKS,
 							WPA_EAP_PREFIX"key_mgt",
 							network,
-							&key_mgmt))
+							&key_mgmt);
 
-	if (!nm_gconf_get_string_helper (client,
+	nm_gconf_get_string_helper (client,
 							   GCONF_PATH_WIRELESS_NETWORKS,
 							   WPA_EAP_PREFIX"identity",
 							   network,
-							   &identity))
-		goto out;
+							   &identity);
 
-	if (!nm_gconf_get_string_helper (client,
+	nm_gconf_get_string_helper (client,
 							   GCONF_PATH_WIRELESS_NETWORKS,
 							   WPA_EAP_PREFIX"passwd",
 							   network,
-							   &passwd))
-		goto out;
+							   &passwd);
 
-	if (!nm_gconf_get_string_helper (client,
+	nm_gconf_get_string_helper (client,
 							   GCONF_PATH_WIRELESS_NETWORKS,
 							   WPA_EAP_PREFIX"anon_identity",
 							   network,
-							   &anon_identity))
-		goto out;
+							   &anon_identity);
 
-	if (!nm_gconf_get_string_helper (client,
+	nm_gconf_get_string_helper (client,
 							   GCONF_PATH_WIRELESS_NETWORKS,
 							   WPA_EAP_PREFIX"private_key_passwd",
 							   network,
-							   &private_key_passwd))
-		goto out;
+							   &private_key_passwd);
 
-	if (!nm_gconf_get_string_helper (client,
+	nm_gconf_get_string_helper (client,
 							   GCONF_PATH_WIRELESS_NETWORKS,
 							   WPA_EAP_PREFIX"private_key_file",
 							   network,
-							   &private_key_file))
-		goto out;
+							   &private_key_file);
 
-	if (!nm_gconf_get_string_helper (client,
+	nm_gconf_get_string_helper (client,
 							   GCONF_PATH_WIRELESS_NETWORKS,
 							   WPA_EAP_PREFIX"client_cert_file",
 							   network,
-							   &client_cert_file))
-		goto out;
+							   &client_cert_file);
 
-	if (!nm_gconf_get_string_helper (client,
+	nm_gconf_get_string_helper (client,
 							   GCONF_PATH_WIRELESS_NETWORKS,
 							   WPA_EAP_PREFIX"ca_cert_file",
 							   network,
-							   &ca_cert_file))
-		goto out;
+							   &ca_cert_file);
 
 	/* Success, build up our security object */
 	security = g_object_new (NM_TYPE_GCONF_WSO_WPA_EAP, NULL);
@@ -214,7 +204,6 @@
 	g_free (client_cert_file);
 	g_free (ca_cert_file);
 
-out:
 	return security;
 }
 





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]