NetworkManager r3559 - in trunk: . libnm-util



Author: dcbw
Date: Tue Apr 15 15:09:56 2008
New Revision: 3559
URL: http://svn.gnome.org/viewvc/NetworkManager?rev=3559&view=rev

Log:
2008-04-15  Dan Williams  <dcbw redhat com>

	* nm-setting-ip4-config.c
		- (ip4_addresses_from_gvalue): handle NULL address array

	* nm-setting-8021x.c
		- (verify_tls, verify_ttls): warn on failed verification



Modified:
   trunk/ChangeLog
   trunk/libnm-util/nm-setting-8021x.c
   trunk/libnm-util/nm-setting-ip4-config.c

Modified: trunk/libnm-util/nm-setting-8021x.c
==============================================================================
--- trunk/libnm-util/nm-setting-8021x.c	(original)
+++ trunk/libnm-util/nm-setting-8021x.c	Tue Apr 15 15:09:56 2008
@@ -79,11 +79,15 @@
 verify_tls (NMSetting8021x *self, gboolean phase2)
 {
 	if (phase2) {
-		if (!self->phase2_client_cert || !self->phase2_client_cert->len)
+		if (!self->phase2_client_cert || !self->phase2_client_cert->len) {
+			g_warning ("%s: phase2 client certificate invalid", __func__);
 			return FALSE;
+		}
 	} else {
-		if (!self->client_cert || !self->client_cert->len)
+		if (!self->client_cert || !self->client_cert->len) {
+			g_warning ("%s: client certificate invalid", __func__);
 			return FALSE;
+		}
 	}
 
 	return TRUE;
@@ -92,11 +96,15 @@
 static gboolean
 verify_ttls (NMSetting8021x *self, gboolean phase2)
 {
-	if (!self->identity && !self->anonymous_identity)
+	if (!self->identity && !self->anonymous_identity) {
+		g_warning ("%s: missing identity or anonymous identity", __func__);
 		return FALSE;
+	}
 
-	if (!self->phase2_auth && !self->phase2_autheap)
+	if (!self->phase2_auth && !self->phase2_autheap) {
+		g_warning ("%s: missing phase2 auth method", __func__);
 		return FALSE;
+	}
 
 	return TRUE;
 }

Modified: trunk/libnm-util/nm-setting-ip4-config.c
==============================================================================
--- trunk/libnm-util/nm-setting-ip4-config.c	(original)
+++ trunk/libnm-util/nm-setting-ip4-config.c	Tue Apr 15 15:09:56 2008
@@ -95,7 +95,7 @@
 	GSList *list = NULL;
 
 	addresses = (GPtrArray *) g_value_get_boxed (value);
-	for (i = 0; i < addresses->len; i++) {
+	for (i = 0; addresses && (i < addresses->len); i++) {
 		GArray *array = (GArray *) g_ptr_array_index (addresses, i);
 
 		if (array->len == 2 || array->len == 3) {



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