NetworkManager r3897 - in branches/mbca: . libnm-glib libnm-util marshallers po src src/dhcp-manager src/dnsmasq-manager src/ppp-manager src/vpn-manager system-settings/plugins/ifcfg-fedora system-settings/plugins/ifcfg-suse vpn-daemons/openvpn vpn-daemons/openvpn/po vpn-daemons/openvpn/properties vpn-daemons/openvpn/src vpn-daemons/pptp vpn-daemons/pptp/po vpn-daemons/pptp/properties vpn-daemons/pptp/src vpn-daemons/vpnc vpn-daemons/vpnc/po vpn-daemons/vpnc/properties vpn-daemons/vpnc/src



Author: kaijanma
Date: Wed Aug  6 06:37:19 2008
New Revision: 3897
URL: http://svn.gnome.org/viewvc/NetworkManager?rev=3897&view=rev

Log:
merge from trunk

Modified:
   branches/mbca/ChangeLog
   branches/mbca/libnm-glib/nm-device.c
   branches/mbca/libnm-glib/nm-object.c
   branches/mbca/libnm-util/crypto.c
   branches/mbca/libnm-util/crypto.h
   branches/mbca/libnm-util/crypto_gnutls.c
   branches/mbca/libnm-util/crypto_nss.c
   branches/mbca/libnm-util/nm-connection.c
   branches/mbca/libnm-util/nm-connection.h
   branches/mbca/libnm-util/nm-param-spec-specialized.c
   branches/mbca/libnm-util/nm-param-spec-specialized.h
   branches/mbca/libnm-util/nm-setting-8021x.c
   branches/mbca/libnm-util/nm-setting-8021x.h
   branches/mbca/libnm-util/nm-setting-cdma.c
   branches/mbca/libnm-util/nm-setting-cdma.h
   branches/mbca/libnm-util/nm-setting-connection.c
   branches/mbca/libnm-util/nm-setting-connection.h
   branches/mbca/libnm-util/nm-setting-gsm.c
   branches/mbca/libnm-util/nm-setting-gsm.h
   branches/mbca/libnm-util/nm-setting-ip4-config.c
   branches/mbca/libnm-util/nm-setting-ip4-config.h
   branches/mbca/libnm-util/nm-setting-ip6-config.c
   branches/mbca/libnm-util/nm-setting-ip6-config.h
   branches/mbca/libnm-util/nm-setting-ppp.c
   branches/mbca/libnm-util/nm-setting-ppp.h
   branches/mbca/libnm-util/nm-setting-pppoe.c
   branches/mbca/libnm-util/nm-setting-pppoe.h
   branches/mbca/libnm-util/nm-setting-serial.c
   branches/mbca/libnm-util/nm-setting-serial.h
   branches/mbca/libnm-util/nm-setting-template.c
   branches/mbca/libnm-util/nm-setting-template.h
   branches/mbca/libnm-util/nm-setting-vpn-properties.c
   branches/mbca/libnm-util/nm-setting-vpn-properties.h
   branches/mbca/libnm-util/nm-setting-vpn.c
   branches/mbca/libnm-util/nm-setting-vpn.h
   branches/mbca/libnm-util/nm-setting-wired.c
   branches/mbca/libnm-util/nm-setting-wired.h
   branches/mbca/libnm-util/nm-setting-wireless-security.c
   branches/mbca/libnm-util/nm-setting-wireless-security.h
   branches/mbca/libnm-util/nm-setting-wireless.c
   branches/mbca/libnm-util/nm-setting-wireless.h
   branches/mbca/libnm-util/nm-setting.c
   branches/mbca/libnm-util/nm-setting.h
   branches/mbca/libnm-util/nm-utils.c
   branches/mbca/libnm-util/nm-utils.h
   branches/mbca/libnm-util/test-crypto.c
   branches/mbca/marshallers/Makefile.am
   branches/mbca/po/ChangeLog
   branches/mbca/po/POTFILES.skip
   branches/mbca/po/ar.po
   branches/mbca/po/bg.po
   branches/mbca/po/pt_BR.po
   branches/mbca/src/NetworkManager.c
   branches/mbca/src/NetworkManagerPolicy.c
   branches/mbca/src/NetworkManagerSystem.c
   branches/mbca/src/dhcp-manager/nm-dhcp-dhcpcd.c
   branches/mbca/src/dnsmasq-manager/nm-dnsmasq-manager.c
   branches/mbca/src/nm-activation-request.c
   branches/mbca/src/nm-cdma-device.c
   branches/mbca/src/nm-device-ethernet.c
   branches/mbca/src/nm-device-wifi.c
   branches/mbca/src/nm-device.c
   branches/mbca/src/nm-gsm-device.c
   branches/mbca/src/nm-manager.c
   branches/mbca/src/nm-manager.h
   branches/mbca/src/nm-serial-device.c
   branches/mbca/src/ppp-manager/nm-ppp-manager.c
   branches/mbca/src/ppp-manager/nm-ppp-manager.h
   branches/mbca/src/ppp-manager/nm-pppd-plugin.c
   branches/mbca/src/ppp-manager/nm-pppd-plugin.h
   branches/mbca/src/vpn-manager/nm-vpn-connection.c
   branches/mbca/system-settings/plugins/ifcfg-fedora/common.h
   branches/mbca/system-settings/plugins/ifcfg-fedora/plugin.c
   branches/mbca/system-settings/plugins/ifcfg-fedora/reader.c
   branches/mbca/system-settings/plugins/ifcfg-suse/parser.c
   branches/mbca/vpn-daemons/openvpn/ChangeLog
   branches/mbca/vpn-daemons/openvpn/Makefile.am
   branches/mbca/vpn-daemons/openvpn/nm-openvpn-service.name.in
   branches/mbca/vpn-daemons/openvpn/po/ChangeLog
   branches/mbca/vpn-daemons/openvpn/po/ar.po
   branches/mbca/vpn-daemons/openvpn/po/bg.po
   branches/mbca/vpn-daemons/openvpn/properties/Makefile.am
   branches/mbca/vpn-daemons/openvpn/properties/auth-helpers.c
   branches/mbca/vpn-daemons/openvpn/src/Makefile.am
   branches/mbca/vpn-daemons/openvpn/src/nm-openvpn-service.c
   branches/mbca/vpn-daemons/pptp/ChangeLog
   branches/mbca/vpn-daemons/pptp/Makefile.am
   branches/mbca/vpn-daemons/pptp/nm-pptp-service.name.in
   branches/mbca/vpn-daemons/pptp/nm-pptp.desktop.in
   branches/mbca/vpn-daemons/pptp/po/ChangeLog
   branches/mbca/vpn-daemons/pptp/po/ar.po
   branches/mbca/vpn-daemons/pptp/po/bg.po
   branches/mbca/vpn-daemons/pptp/properties/Makefile.am
   branches/mbca/vpn-daemons/pptp/src/Makefile.am
   branches/mbca/vpn-daemons/vpnc/ChangeLog
   branches/mbca/vpn-daemons/vpnc/Makefile.am
   branches/mbca/vpn-daemons/vpnc/nm-vpnc-service.name.in
   branches/mbca/vpn-daemons/vpnc/po/ChangeLog
   branches/mbca/vpn-daemons/vpnc/po/ar.po
   branches/mbca/vpn-daemons/vpnc/po/bg.po
   branches/mbca/vpn-daemons/vpnc/properties/Makefile.am
   branches/mbca/vpn-daemons/vpnc/src/Makefile.am
   branches/mbca/vpn-daemons/vpnc/src/nm-vpnc-service.c

Modified: branches/mbca/libnm-glib/nm-device.c
==============================================================================
--- branches/mbca/libnm-glib/nm-device.c	(original)
+++ branches/mbca/libnm-glib/nm-device.c	Wed Aug  6 06:37:19 2008
@@ -547,19 +547,14 @@
 }
 
 static char *
-get_product_and_vendor (NMDevice *device,
-                        DBusGConnection *connection,
-                        const char *udi,
-                        gboolean want_origdev,
-                        gboolean warn,
-                        char **product,
-                        char **vendor)
+get_ancestor_device (NMDevice *device,
+                     DBusGConnection *connection,
+                     const char *udi,
+                     gboolean want_origdev)
 {
 	DBusGProxy *proxy;
 	GError *err = NULL;
 	char *parent = NULL;
-	char *tmp_product = NULL;
-	char *tmp_vendor = NULL;
 
 	g_return_val_if_fail (connection != NULL, NULL);
 	g_return_val_if_fail (udi != NULL, NULL);
@@ -568,28 +563,6 @@
 	if (!proxy)
 		return NULL;
 
-	if (!dbus_g_proxy_call (proxy, "GetPropertyString", &err,
-							G_TYPE_STRING, "info.product",
-							G_TYPE_INVALID,
-							G_TYPE_STRING, &tmp_product,
-							G_TYPE_INVALID)) {
-		if (warn)
-			g_warning ("Error getting device %s product from HAL: %s", udi, err->message);
-		g_error_free (err);
-		err = NULL;
-    }
-
-	if (!dbus_g_proxy_call (proxy, "GetPropertyString", &err,
-							G_TYPE_STRING, "info.vendor",
-							G_TYPE_INVALID,
-							G_TYPE_STRING, &tmp_vendor,
-							G_TYPE_INVALID)) {
-		if (warn)
-			g_warning ("Error getting device %s vendor from HAL: %s", udi, err->message);
-		g_error_free (err);
-		err = NULL;
-    }
-
 	if (want_origdev) {
 		gboolean serial = FALSE;
 
@@ -628,7 +601,79 @@
 	    }
 	}
 
-	if (parent && tmp_product && tmp_vendor) {
+	g_object_unref (proxy);
+	return parent;
+}
+
+static char *
+proxy_get_string (DBusGProxy *proxy,
+                  const char *property,
+                  gboolean warn)
+{
+	GError *error = NULL;
+	char *result = NULL;
+
+	g_return_val_if_fail (proxy != NULL, NULL);
+	g_return_val_if_fail (property != NULL, NULL);
+
+	if (dbus_g_proxy_call (proxy, "GetPropertyString", &error,
+	                       G_TYPE_STRING, property, G_TYPE_INVALID,
+	                       G_TYPE_STRING, &result, G_TYPE_INVALID))
+		return result;
+
+	if (warn) {
+		g_warning ("Error getting HAL property '%s' from device '%s': %s",
+		           property, dbus_g_proxy_get_path (proxy),
+		           error ? error->message : "unknown");
+	}
+	g_error_free (error);
+	return NULL;
+}
+
+static gboolean
+get_product_and_vendor (DBusGConnection *connection,
+                        const char *udi,
+                        char **product,
+                        char **vendor)
+{
+	DBusGProxy *proxy;
+	char *tmp_product = NULL;
+	char *tmp_vendor = NULL;
+	char *subsys = NULL;
+	gboolean product_fallback = TRUE, vendor_fallback = TRUE;
+	gboolean warn = FALSE;
+
+	g_return_val_if_fail (connection != NULL, FALSE);
+	g_return_val_if_fail (udi != NULL, FALSE);
+
+	g_return_val_if_fail (product != NULL, FALSE);
+	g_return_val_if_fail (*product == NULL, FALSE);
+
+	g_return_val_if_fail (vendor != NULL, FALSE);
+	g_return_val_if_fail (*vendor == NULL, FALSE);
+
+	proxy = dbus_g_proxy_new_for_name (connection, "org.freedesktop.Hal", udi, "org.freedesktop.Hal.Device");
+	if (!proxy)
+		return FALSE;
+
+	subsys = proxy_get_string (proxy, "info.subsystem", warn);
+	if (subsys && !strcmp (subsys, "pci")) {
+		tmp_product = proxy_get_string (proxy, "pci.subsys_product", warn);
+		if (tmp_product)
+			product_fallback = FALSE;
+
+		tmp_vendor = proxy_get_string (proxy, "pci.subsys_vendor", warn);
+		if (tmp_vendor)
+			vendor_fallback = FALSE;
+	}
+	g_free (subsys);
+
+	if (product_fallback)
+		tmp_product = proxy_get_string (proxy, "info.product", warn);
+	if (vendor_fallback)
+		tmp_vendor = proxy_get_string (proxy, "info.vendor", warn);
+
+	if (tmp_product && tmp_vendor) {
 		*product = tmp_product;
 		*vendor = tmp_vendor;
 	} else {
@@ -637,7 +682,7 @@
 	}
 	g_object_unref (proxy);
 
-	return parent;
+	return (*product && *vendor) ? TRUE : FALSE;
 }
 
 static void
@@ -647,7 +692,7 @@
 	DBusGConnection *connection;
 	const char *udi;
 	char *orig_dev_udi = NULL;
-	char *pd_parent_udi = NULL;
+	char *parent_udi = NULL;
 
 	g_return_if_fail (NM_IS_DEVICE (device));
 	priv = NM_DEVICE_GET_PRIVATE (device);
@@ -662,38 +707,19 @@
 
 	/* First, get the udi of the originating device */
 	udi = nm_device_get_udi (device);
-	orig_dev_udi = get_product_and_vendor (device, connection, udi, TRUE, FALSE,
-	                                       &priv->product, &priv->vendor);
+	orig_dev_udi = get_ancestor_device (device, connection, udi, TRUE);
 
-	/* Ignore product and vendor for the Network Interface */
-	if (priv->product || priv->vendor) {
-		g_free (priv->product);
-		priv->product = NULL;
-		g_free (priv->vendor);
-		priv->vendor = NULL;
+	/* Get product and vendor off the originating device if possible */
+	if (!get_product_and_vendor (connection, orig_dev_udi, &priv->product, &priv->vendor)) {
+		 /* Try the parent of the originating device */
+		parent_udi = get_ancestor_device (device, connection, orig_dev_udi, FALSE);
+		if (parent_udi)
+			get_product_and_vendor (connection, parent_udi, &priv->product, &priv->vendor);
+		g_free (parent_udi);
 	}
 
-	/* Get product and vendor off the originating device if possible */
-	pd_parent_udi = get_product_and_vendor (device,
-	                                        connection,
-	                                        orig_dev_udi,
-	                                        FALSE,
-	                                        FALSE,
-	                                        &priv->product,
-	                                        &priv->vendor);
 	g_free (orig_dev_udi);
 
-	/* If one of the product/vendor isn't found on the originating device, try the
-	 * parent of the originating device.
-	 */
-	if (!priv->product || !priv->vendor) {
-		char *ignore;
-		ignore = get_product_and_vendor (device, connection, pd_parent_udi,
-		                                 FALSE, TRUE, &priv->product, &priv->vendor);
-		g_free (ignore);
-	}
-	g_free (pd_parent_udi);
-
 	nm_object_queue_notify (NM_OBJECT (device), NM_DEVICE_VENDOR);
 	nm_object_queue_notify (NM_OBJECT (device), NM_DEVICE_PRODUCT);
 }

Modified: branches/mbca/libnm-glib/nm-object.c
==============================================================================
--- branches/mbca/libnm-glib/nm-object.c	(original)
+++ branches/mbca/libnm-glib/nm-object.c	Wed Aug  6 06:37:19 2008
@@ -297,9 +297,11 @@
 		}
 	}
 
-	if (!found)
+	if (!found) {
+#if DEBUG
 		g_warning ("Property '%s' unhandled.", prop_name);
-	else if (!success)
+#endif
+	} else if (!success)
 		g_warning ("Property '%s' could not be set due to errors.", prop_name);
 
 out:

Modified: branches/mbca/libnm-util/crypto.c
==============================================================================
--- branches/mbca/libnm-util/crypto.c	(original)
+++ branches/mbca/libnm-util/crypto.c	Wed Aug  6 06:37:19 2008
@@ -1,22 +1,24 @@
-/* NetworkManager Wireless Applet -- Display wireless access points and allow user control
- *
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
+
+/*
  * Dan Williams <dcbw redhat com>
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
  *
- * This program is distributed in the hope that it will be useful,
+ * This library is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
  *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301 USA.
  *
- * (C) Copyright 2007 Red Hat, Inc.
+ * (C) Copyright 2007 - 2008 Red Hat, Inc.
  */
 
 #include <glib.h>

Modified: branches/mbca/libnm-util/crypto.h
==============================================================================
--- branches/mbca/libnm-util/crypto.h	(original)
+++ branches/mbca/libnm-util/crypto.h	Wed Aug  6 06:37:19 2008
@@ -1,22 +1,24 @@
-/* NetworkManager Wireless Applet -- Display wireless access points and allow user control
- *
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
+
+/*
  * Dan Williams <dcbw redhat com>
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
  *
- * This program is distributed in the hope that it will be useful,
+ * This library is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
  *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301 USA.
  *
- * (C) Copyright 2007 Red Hat, Inc.
+ * (C) Copyright 2007 - 2008 Red Hat, Inc.
  */
 
 #include <glib.h>

Modified: branches/mbca/libnm-util/crypto_gnutls.c
==============================================================================
--- branches/mbca/libnm-util/crypto_gnutls.c	(original)
+++ branches/mbca/libnm-util/crypto_gnutls.c	Wed Aug  6 06:37:19 2008
@@ -2,21 +2,22 @@
  *
  * Dan Williams <dcbw redhat com>
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
  *
- * This program is distributed in the hope that it will be useful,
+ * This library is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
  *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301 USA.
  *
- * (C) Copyright 2007 Red Hat, Inc.
+ * (C) Copyright 2007 - 2008 Red Hat, Inc.
  */
 
 #include <glib.h>

Modified: branches/mbca/libnm-util/crypto_nss.c
==============================================================================
--- branches/mbca/libnm-util/crypto_nss.c	(original)
+++ branches/mbca/libnm-util/crypto_nss.c	Wed Aug  6 06:37:19 2008
@@ -1,22 +1,24 @@
-/* NetworkManager Wireless Applet -- Display wireless access points and allow user control
- *
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
+
+/*
  * Dan Williams <dcbw redhat com>
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
  *
- * This program is distributed in the hope that it will be useful,
+ * This library is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
  *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301 USA.
  *
- * (C) Copyright 2007 Red Hat, Inc.
+ * (C) Copyright 2007 - 2008 Red Hat, Inc.
  */
 
 #include <glib.h>

Modified: branches/mbca/libnm-util/nm-connection.c
==============================================================================
--- branches/mbca/libnm-util/nm-connection.c	(original)
+++ branches/mbca/libnm-util/nm-connection.c	Wed Aug  6 06:37:19 2008
@@ -1,4 +1,27 @@
-/* -*- Mode: C; tab-width: 5; indent-tabs-mode: t; c-basic-offset: 5 -*- */
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
+
+/*
+ * Dan Williams <dcbw redhat com>
+ * Tambet Ingo <tambet gmail com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2007 - 2008 Red Hat, Inc.
+ * (C) Copyright 2007 - 2008 Novell, Inc.
+ */
 
 #include <glib-object.h>
 #include <dbus/dbus-glib.h>
@@ -22,6 +45,37 @@
 #include "nm-setting-gsm.h"
 #include "nm-setting-cdma.h"
 
+GQuark
+nm_connection_error_quark (void)
+{
+	static GQuark quark;
+
+	if (G_UNLIKELY (!quark))
+		quark = g_quark_from_static_string ("nm-connection-error-quark");
+	return quark;
+}
+
+/* This should really be standard. */
+#define ENUM_ENTRY(NAME, DESC) { NAME, "" #NAME "", DESC }
+
+GType
+nm_connection_error_get_type (void)
+{
+	static GType etype = 0;
+
+	if (etype == 0) {
+		static const GEnumValue values[] = {
+			/* Unknown error. */
+			ENUM_ENTRY (NM_CONNECTION_ERROR_UNKNOWN, "UnknownError"),
+			/* The required 'connection' setting was not found. */
+			ENUM_ENTRY (NM_CONNECTION_ERROR_CONNECTION_SETTING_NOT_FOUND, "ConnectionSettingNotFound"),
+			{ 0, 0, 0 }
+		};
+		etype = g_enum_register_static ("NMConnectionError", values);
+	}
+	return etype;
+}
+
 typedef struct {
 	GHashTable *settings;
 
@@ -407,7 +461,7 @@
 nm_connection_verify (NMConnection *connection, GError **error)
 {
 	NMConnectionPrivate *priv;
-	NMSetting *connection_setting;
+	NMSetting *s_con;
 	VerifySettingsInfo info;
 
 	g_return_val_if_fail (NM_IS_CONNECTION (connection), FALSE);
@@ -417,9 +471,12 @@
 	priv = NM_CONNECTION_GET_PRIVATE (connection);
 
 	/* First, make sure there's at least 'connection' setting */
-	connection_setting = nm_connection_get_setting (connection, NM_TYPE_SETTING_CONNECTION);
-	if (!connection_setting) {
-		g_warning ("'connection' setting not present.");
+	s_con = nm_connection_get_setting (connection, NM_TYPE_SETTING_CONNECTION);
+	if (!s_con) {
+		g_set_error (error,
+		             NM_CONNECTION_ERROR,
+		             NM_CONNECTION_ERROR_CONNECTION_SETTING_NOT_FOUND,
+		             "connection setting not found");
 		return FALSE;
 	}
 

Modified: branches/mbca/libnm-util/nm-connection.h
==============================================================================
--- branches/mbca/libnm-util/nm-connection.h	(original)
+++ branches/mbca/libnm-util/nm-connection.h	Wed Aug  6 06:37:19 2008
@@ -1,4 +1,27 @@
-/* -*- Mode: C; tab-width: 5; indent-tabs-mode: t; c-basic-offset: 5 -*- */
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
+
+/*
+ * Dan Williams <dcbw redhat com>
+ * Tambet Ingo <tambet gmail com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2007 - 2008 Red Hat, Inc.
+ * (C) Copyright 2007 - 2008 Novell, Inc.
+ */
 
 #ifndef NM_CONNECTION_H
 #define NM_CONNECTION_H
@@ -22,6 +45,18 @@
 	NM_CONNECTION_SCOPE_USER
 } NMConnectionScope;
 
+typedef enum
+{
+	NM_CONNECTION_ERROR_UNKNOWN = 0,
+	NM_CONNECTION_ERROR_CONNECTION_SETTING_NOT_FOUND
+} NMConnectionError;
+
+#define NM_TYPE_CONNECTION_ERROR (nm_connection_error_get_type ()) 
+GType nm_connection_error_get_type (void);
+
+#define NM_CONNECTION_ERROR nm_connection_error_quark ()
+GQuark nm_connection_error_quark (void);
+
 #define NM_CONNECTION_SCOPE "scope"
 #define NM_CONNECTION_PATH "path"
 

Modified: branches/mbca/libnm-util/nm-param-spec-specialized.c
==============================================================================
--- branches/mbca/libnm-util/nm-param-spec-specialized.c	(original)
+++ branches/mbca/libnm-util/nm-param-spec-specialized.c	Wed Aug  6 06:37:19 2008
@@ -1,4 +1,27 @@
-/* -*- Mode: C; tab-width: 5; indent-tabs-mode: t; c-basic-offset: 5 -*- */
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
+
+/*
+ * Dan Williams <dcbw redhat com>
+ * Tambet Ingo <tambet gmail com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2007 - 2008 Red Hat, Inc.
+ * (C) Copyright 2007 - 2008 Novell, Inc.
+ */
 
 #include "nm-param-spec-specialized.h"
 

Modified: branches/mbca/libnm-util/nm-param-spec-specialized.h
==============================================================================
--- branches/mbca/libnm-util/nm-param-spec-specialized.h	(original)
+++ branches/mbca/libnm-util/nm-param-spec-specialized.h	Wed Aug  6 06:37:19 2008
@@ -1,4 +1,27 @@
-/* -*- Mode: C; tab-width: 5; indent-tabs-mode: t; c-basic-offset: 5 -*- */
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
+
+/*
+ * Dan Williams <dcbw redhat com>
+ * Tambet Ingo <tambet gmail com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2007 - 2008 Red Hat, Inc.
+ * (C) Copyright 2007 - 2008 Novell, Inc.
+ */
 
 #ifndef NM_PARAM_SPEC_SPECIALIZED_H
 #define NM_PARAM_SPEC_SPECIALIZED_H

Modified: branches/mbca/libnm-util/nm-setting-8021x.c
==============================================================================
--- branches/mbca/libnm-util/nm-setting-8021x.c	(original)
+++ branches/mbca/libnm-util/nm-setting-8021x.c	Wed Aug  6 06:37:19 2008
@@ -1,4 +1,27 @@
-/* -*- Mode: C; tab-width: 5; indent-tabs-mode: t; c-basic-offset: 5 -*- */
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
+
+/*
+ * Dan Williams <dcbw redhat com>
+ * Tambet Ingo <tambet gmail com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2007 - 2008 Red Hat, Inc.
+ * (C) Copyright 2007 - 2008 Novell, Inc.
+ */
 
 #include <string.h>
 #include <ctype.h>

Modified: branches/mbca/libnm-util/nm-setting-8021x.h
==============================================================================
--- branches/mbca/libnm-util/nm-setting-8021x.h	(original)
+++ branches/mbca/libnm-util/nm-setting-8021x.h	Wed Aug  6 06:37:19 2008
@@ -1,4 +1,27 @@
-/* -*- Mode: C; tab-width: 5; indent-tabs-mode: t; c-basic-offset: 5 -*- */
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
+
+/*
+ * Dan Williams <dcbw redhat com>
+ * Tambet Ingo <tambet gmail com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2007 - 2008 Red Hat, Inc.
+ * (C) Copyright 2007 - 2008 Novell, Inc.
+ */
 
 #ifndef NM_SETTING_8021X_H
 #define NM_SETTING_8021X_H

Modified: branches/mbca/libnm-util/nm-setting-cdma.c
==============================================================================
--- branches/mbca/libnm-util/nm-setting-cdma.c	(original)
+++ branches/mbca/libnm-util/nm-setting-cdma.c	Wed Aug  6 06:37:19 2008
@@ -1,5 +1,26 @@
 /* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
 
+/*
+ * Dan Williams <dcbw redhat com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2007 - 2008 Red Hat, Inc.
+ */
+
 #include <string.h>
 #include "nm-setting-cdma.h"
 #include "nm-setting-serial.h"
@@ -96,9 +117,42 @@
 		return FALSE;
 	}
 
+	if (self->username && !strlen (self->username)) {
+		g_set_error (error,
+		             NM_SETTING_CDMA_ERROR,
+		             NM_SETTING_CDMA_ERROR_INVALID_PROPERTY,
+		             NM_SETTING_CDMA_USERNAME);
+		return FALSE;
+	}
+
+	if (self->password && !strlen (self->password)) {
+		g_set_error (error,
+		             NM_SETTING_CDMA_ERROR,
+		             NM_SETTING_CDMA_ERROR_INVALID_PROPERTY,
+		             NM_SETTING_CDMA_PASSWORD);
+		return FALSE;
+	}
+
 	return TRUE;
 }
 
+static GPtrArray *
+need_secrets (NMSetting *setting)
+{
+	NMSettingCdma *self = NM_SETTING_CDMA (setting);
+	GPtrArray *secrets = NULL;
+
+	if (self->password)
+		return NULL;
+
+	if (self->username) {
+		secrets = g_ptr_array_sized_new (1);
+		g_ptr_array_add (secrets, NM_SETTING_CDMA_PASSWORD);
+	}
+
+	return secrets;
+}
+
 static void
 nm_setting_cdma_init (NMSettingCdma *setting)
 {
@@ -175,6 +229,7 @@
 	object_class->get_property = get_property;
 	object_class->finalize     = finalize;
 	parent_class->verify       = verify;
+	parent_class->need_secrets = need_secrets;
 
 	/* Properties */
 	g_object_class_install_property

Modified: branches/mbca/libnm-util/nm-setting-cdma.h
==============================================================================
--- branches/mbca/libnm-util/nm-setting-cdma.h	(original)
+++ branches/mbca/libnm-util/nm-setting-cdma.h	Wed Aug  6 06:37:19 2008
@@ -1,5 +1,28 @@
 /* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
 
+/*
+ * Dan Williams <dcbw redhat com>
+ * Tambet Ingo <tambet gmail com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2007 - 2008 Red Hat, Inc.
+ * (C) Copyright 2007 - 2008 Novell, Inc.
+ */
+
 #ifndef NM_SETTING_CDMA_H
 #define NM_SETTING_CDMA_H
 

Modified: branches/mbca/libnm-util/nm-setting-connection.c
==============================================================================
--- branches/mbca/libnm-util/nm-setting-connection.c	(original)
+++ branches/mbca/libnm-util/nm-setting-connection.c	Wed Aug  6 06:37:19 2008
@@ -1,4 +1,27 @@
-/* -*- Mode: C; tab-width: 5; indent-tabs-mode: t; c-basic-offset: 5 -*- */
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
+
+/*
+ * Dan Williams <dcbw redhat com>
+ * Tambet Ingo <tambet gmail com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2007 - 2008 Red Hat, Inc.
+ * (C) Copyright 2007 - 2008 Novell, Inc.
+ */
 
 #include <string.h>
 #include "nm-setting-connection.h"

Modified: branches/mbca/libnm-util/nm-setting-connection.h
==============================================================================
--- branches/mbca/libnm-util/nm-setting-connection.h	(original)
+++ branches/mbca/libnm-util/nm-setting-connection.h	Wed Aug  6 06:37:19 2008
@@ -1,4 +1,27 @@
-/* -*- Mode: C; tab-width: 5; indent-tabs-mode: t; c-basic-offset: 5 -*- */
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
+
+/*
+ * Dan Williams <dcbw redhat com>
+ * Tambet Ingo <tambet gmail com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2007 - 2008 Red Hat, Inc.
+ * (C) Copyright 2007 - 2008 Novell, Inc.
+ */
 
 #ifndef NM_SETTING_CONNECTION_H
 #define NM_SETTING_CONNECTION_H

Modified: branches/mbca/libnm-util/nm-setting-gsm.c
==============================================================================
--- branches/mbca/libnm-util/nm-setting-gsm.c	(original)
+++ branches/mbca/libnm-util/nm-setting-gsm.c	Wed Aug  6 06:37:19 2008
@@ -1,4 +1,27 @@
-/* -*- Mode: C; tab-width: 5; indent-tabs-mode: t; c-basic-offset: 5 -*- */
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
+
+/*
+ * Dan Williams <dcbw redhat com>
+ * Tambet Ingo <tambet gmail com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2007 - 2008 Red Hat, Inc.
+ * (C) Copyright 2007 - 2008 Novell, Inc.
+ */
 
 #include <string.h>
 #include "nm-setting-gsm.h"
@@ -110,9 +133,42 @@
 		return FALSE;
 	}
 
+	if (self->username && !strlen (self->username)) {
+		g_set_error (error,
+		             NM_SETTING_GSM_ERROR,
+		             NM_SETTING_GSM_ERROR_INVALID_PROPERTY,
+		             NM_SETTING_GSM_USERNAME);
+		return FALSE;
+	}
+
+	if (self->password && !strlen (self->password)) {
+		g_set_error (error,
+		             NM_SETTING_GSM_ERROR,
+		             NM_SETTING_GSM_ERROR_INVALID_PROPERTY,
+		             NM_SETTING_GSM_USERNAME);
+		return FALSE;
+	}
+
 	return TRUE;
 }
 
+static GPtrArray *
+need_secrets (NMSetting *setting)
+{
+	NMSettingGsm *self = NM_SETTING_GSM (setting);
+	GPtrArray *secrets = NULL;
+
+	if (self->password)
+		return NULL;
+
+	if (self->username) {
+		secrets = g_ptr_array_sized_new (1);
+		g_ptr_array_add (secrets, NM_SETTING_GSM_PASSWORD);
+	}
+
+	return secrets;
+}
+
 static void
 nm_setting_gsm_init (NMSettingGsm *setting)
 {
@@ -233,6 +289,7 @@
 	object_class->get_property = get_property;
 	object_class->finalize     = finalize;
 	parent_class->verify       = verify;
+	parent_class->need_secrets = need_secrets;
 
 	/* Properties */
 	g_object_class_install_property

Modified: branches/mbca/libnm-util/nm-setting-gsm.h
==============================================================================
--- branches/mbca/libnm-util/nm-setting-gsm.h	(original)
+++ branches/mbca/libnm-util/nm-setting-gsm.h	Wed Aug  6 06:37:19 2008
@@ -1,4 +1,27 @@
-/* -*- Mode: C; tab-width: 5; indent-tabs-mode: t; c-basic-offset: 5 -*- */
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
+
+/*
+ * Dan Williams <dcbw redhat com>
+ * Tambet Ingo <tambet gmail com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2007 - 2008 Red Hat, Inc.
+ * (C) Copyright 2007 - 2008 Novell, Inc.
+ */
 
 #ifndef NM_SETTING_GSM_H
 #define NM_SETTING_GSM_H

Modified: branches/mbca/libnm-util/nm-setting-ip4-config.c
==============================================================================
--- branches/mbca/libnm-util/nm-setting-ip4-config.c	(original)
+++ branches/mbca/libnm-util/nm-setting-ip4-config.c	Wed Aug  6 06:37:19 2008
@@ -1,5 +1,28 @@
 /* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
 
+/*
+ * Dan Williams <dcbw redhat com>
+ * Tambet Ingo <tambet gmail com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2007 - 2008 Red Hat, Inc.
+ * (C) Copyright 2007 - 2008 Novell, Inc.
+ */
+
 #include <string.h>
 
 #include <dbus/dbus-glib.h>
@@ -89,7 +112,7 @@
 			             NM_SETTING_IP4_CONFIG_ADDRESSES);
 			return FALSE;
 		}
-	} else if (   !strcmp (self->method, NM_SETTING_IP4_CONFIG_METHOD_AUTOIP)
+	} else if (   !strcmp (self->method, NM_SETTING_IP4_CONFIG_METHOD_LINK_LOCAL)
 	           || !strcmp (self->method, NM_SETTING_IP4_CONFIG_METHOD_SHARED)) {
 		if (self->dns && self->dns->len) {
 			g_set_error (error,
@@ -114,7 +137,7 @@
 			             NM_SETTING_IP4_CONFIG_ADDRESSES);
 			return FALSE;
 		}
-	} else if (!strcmp (self->method, NM_SETTING_IP4_CONFIG_METHOD_DHCP)) {
+	} else if (!strcmp (self->method, NM_SETTING_IP4_CONFIG_METHOD_AUTO)) {
 		/* nothing to do */
 	} else {
 		g_set_error (error,
@@ -125,12 +148,18 @@
 	}
 
 	if (self->dhcp_client_id && !strlen (self->dhcp_client_id)) {
-		g_warning ("invalid DHCP client ID");
+		g_set_error (error,
+		             NM_SETTING_IP4_CONFIG_ERROR,
+		             NM_SETTING_IP4_CONFIG_ERROR_INVALID_PROPERTY,
+		             NM_SETTING_IP4_CONFIG_DHCP_CLIENT_ID);
 		return FALSE;
 	}
 
 	if (self->dhcp_hostname && !strlen (self->dhcp_hostname)) {
-		g_warning ("invalid DHCP client ID");
+		g_set_error (error,
+		             NM_SETTING_IP4_CONFIG_ERROR,
+		             NM_SETTING_IP4_CONFIG_ERROR_INVALID_PROPERTY,
+		             NM_SETTING_IP4_CONFIG_DHCP_HOSTNAME);
 		return FALSE;
 	}
 
@@ -139,13 +168,39 @@
 		NMSettingIP4Address *addr = (NMSettingIP4Address *) iter->data;
 
 		if (!addr->address) {
-			g_warning ("invalid IP4 address #%d", i);
+			g_set_error (error,
+			             NM_SETTING_IP4_CONFIG_ERROR,
+			             NM_SETTING_IP4_CONFIG_ERROR_INVALID_PROPERTY,
+			             NM_SETTING_IP4_CONFIG_ADDRESSES);
 			return FALSE;
 		}
 
 		if (!addr->prefix || addr->prefix > 32) {
-			g_warning ("invalid IP4 address prefix %d for address #%d",
-			           addr->prefix, i);
+			g_set_error (error,
+			             NM_SETTING_IP4_CONFIG_ERROR,
+			             NM_SETTING_IP4_CONFIG_ERROR_INVALID_PROPERTY,
+			             NM_SETTING_IP4_CONFIG_ADDRESSES);
+			return FALSE;
+		}
+	}
+
+	/* Validate routes */
+	for (iter = self->routes, i = 0; iter; iter = g_slist_next (iter), i++) {
+		NMSettingIP4Address *addr = (NMSettingIP4Address *) iter->data;
+
+		if (!addr->address) {
+			g_set_error (error,
+			             NM_SETTING_IP4_CONFIG_ERROR,
+			             NM_SETTING_IP4_CONFIG_ERROR_INVALID_PROPERTY,
+			             NM_SETTING_IP4_CONFIG_ROUTES);
+			return FALSE;
+		}
+
+		if (!addr->prefix || addr->prefix > 32) {
+			g_set_error (error,
+			             NM_SETTING_IP4_CONFIG_ERROR,
+			             NM_SETTING_IP4_CONFIG_ERROR_INVALID_PROPERTY,
+			             NM_SETTING_IP4_CONFIG_ROUTES);
 			return FALSE;
 		}
 	}
@@ -172,6 +227,7 @@
 
 	nm_utils_slist_free (self->dns_search, g_free);
 	nm_utils_slist_free (self->addresses, g_free);
+	nm_utils_slist_free (self->routes, g_free);
 
 	G_OBJECT_CLASS (nm_setting_ip4_config_parent_class)->finalize (object);
 }
@@ -199,6 +255,7 @@
 	case PROP_ADDRESSES:
 		nm_utils_slist_free (setting->addresses, g_free);
 		setting->addresses = nm_utils_ip4_addresses_from_gvalue (value);
+		break;
 	case PROP_ROUTES:
 		nm_utils_slist_free (setting->routes, g_free);
 		setting->routes = nm_utils_ip4_addresses_from_gvalue (value);

Modified: branches/mbca/libnm-util/nm-setting-ip4-config.h
==============================================================================
--- branches/mbca/libnm-util/nm-setting-ip4-config.h	(original)
+++ branches/mbca/libnm-util/nm-setting-ip4-config.h	Wed Aug  6 06:37:19 2008
@@ -1,4 +1,27 @@
-/* -*- Mode: C; tab-width: 5; indent-tabs-mode: t; c-basic-offset: 5 -*- */
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
+
+/*
+ * Dan Williams <dcbw redhat com>
+ * Tambet Ingo <tambet gmail com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2007 - 2008 Red Hat, Inc.
+ * (C) Copyright 2007 - 2008 Novell, Inc.
+ */
 
 #ifndef NM_SETTING_IP4_CONFIG_H
 #define NM_SETTING_IP4_CONFIG_H
@@ -39,10 +62,10 @@
 #define NM_SETTING_IP4_CONFIG_DHCP_CLIENT_ID  "dhcp-client-id"
 #define NM_SETTING_IP4_CONFIG_DHCP_HOSTNAME   "dhcp-hostname"
 
-#define NM_SETTING_IP4_CONFIG_METHOD_DHCP   "dhcp"
-#define NM_SETTING_IP4_CONFIG_METHOD_AUTOIP "autoip"
-#define NM_SETTING_IP4_CONFIG_METHOD_MANUAL "manual"
-#define NM_SETTING_IP4_CONFIG_METHOD_SHARED "shared"
+#define NM_SETTING_IP4_CONFIG_METHOD_AUTO       "auto"
+#define NM_SETTING_IP4_CONFIG_METHOD_LINK_LOCAL "link-local"
+#define NM_SETTING_IP4_CONFIG_METHOD_MANUAL     "manual"
+#define NM_SETTING_IP4_CONFIG_METHOD_SHARED     "shared"
 
 typedef struct {
 	guint32 address;   /* network byte order */

Modified: branches/mbca/libnm-util/nm-setting-ip6-config.c
==============================================================================
--- branches/mbca/libnm-util/nm-setting-ip6-config.c	(original)
+++ branches/mbca/libnm-util/nm-setting-ip6-config.c	Wed Aug  6 06:37:19 2008
@@ -1,4 +1,26 @@
-/* -*- Mode: C; tab-width: 5; indent-tabs-mode: t; c-basic-offset: 5 -*- */
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
+
+/*
+ * Dan Williams <dcbw redhat com>
+ * David Cantrell <dcantrel redhat com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2007 - 2008 Red Hat, Inc.
+ */
 
 #include <string.h>
 
@@ -182,6 +204,7 @@
 	case PROP_ADDRESSES:
 		nm_utils_slist_free (setting->addresses, g_free);
 		setting->addresses = nm_utils_ip6_addresses_from_gvalue (value);
+		break;
 	case PROP_ROUTES:
 		nm_utils_slist_free (setting->routes, g_free);
 		setting->routes = nm_utils_ip6_addresses_from_gvalue (value);

Modified: branches/mbca/libnm-util/nm-setting-ip6-config.h
==============================================================================
--- branches/mbca/libnm-util/nm-setting-ip6-config.h	(original)
+++ branches/mbca/libnm-util/nm-setting-ip6-config.h	Wed Aug  6 06:37:19 2008
@@ -1,4 +1,26 @@
-/* -*- Mode: C; tab-width: 5; indent-tabs-mode: t; c-basic-offset: 5 -*- */
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
+
+/*
+ * Dan Williams <dcbw redhat com>
+ * David Cantrell <dcantrel redhat com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2007 - 2008 Red Hat, Inc.
+ */
 
 #ifndef NM_SETTING_IP6_CONFIG_H
 #define NM_SETTING_IP6_CONFIG_H

Modified: branches/mbca/libnm-util/nm-setting-ppp.c
==============================================================================
--- branches/mbca/libnm-util/nm-setting-ppp.c	(original)
+++ branches/mbca/libnm-util/nm-setting-ppp.c	Wed Aug  6 06:37:19 2008
@@ -1,4 +1,27 @@
-/* -*- Mode: C; tab-width: 5; indent-tabs-mode: t; c-basic-offset: 5 -*- */
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
+
+/*
+ * Dan Williams <dcbw redhat com>
+ * Tambet Ingo <tambet gmail com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2007 - 2008 Red Hat, Inc.
+ * (C) Copyright 2007 - 2008 Novell, Inc.
+ */
 
 #include "nm-setting-ppp.h"
 

Modified: branches/mbca/libnm-util/nm-setting-ppp.h
==============================================================================
--- branches/mbca/libnm-util/nm-setting-ppp.h	(original)
+++ branches/mbca/libnm-util/nm-setting-ppp.h	Wed Aug  6 06:37:19 2008
@@ -1,4 +1,27 @@
-/* -*- Mode: C; tab-width: 5; indent-tabs-mode: t; c-basic-offset: 5 -*- */
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
+
+/*
+ * Dan Williams <dcbw redhat com>
+ * Tambet Ingo <tambet gmail com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2007 - 2008 Red Hat, Inc.
+ * (C) Copyright 2007 - 2008 Novell, Inc.
+ */
 
 #ifndef NM_SETTING_PPP_H
 #define NM_SETTING_PPP_H

Modified: branches/mbca/libnm-util/nm-setting-pppoe.c
==============================================================================
--- branches/mbca/libnm-util/nm-setting-pppoe.c	(original)
+++ branches/mbca/libnm-util/nm-setting-pppoe.c	Wed Aug  6 06:37:19 2008
@@ -1,4 +1,27 @@
-/* -*- Mode: C; tab-width: 5; indent-tabs-mode: t; c-basic-offset: 5 -*- */
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
+
+/*
+ * Dan Williams <dcbw redhat com>
+ * Tambet Ingo <tambet gmail com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2007 - 2008 Red Hat, Inc.
+ * (C) Copyright 2007 - 2008 Novell, Inc.
+ */
 
 #include <string.h>
 #include "nm-setting-pppoe.h"

Modified: branches/mbca/libnm-util/nm-setting-pppoe.h
==============================================================================
--- branches/mbca/libnm-util/nm-setting-pppoe.h	(original)
+++ branches/mbca/libnm-util/nm-setting-pppoe.h	Wed Aug  6 06:37:19 2008
@@ -1,4 +1,27 @@
-/* -*- Mode: C; tab-width: 5; indent-tabs-mode: t; c-basic-offset: 5 -*- */
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
+
+/*
+ * Dan Williams <dcbw redhat com>
+ * Tambet Ingo <tambet gmail com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2007 - 2008 Red Hat, Inc.
+ * (C) Copyright 2007 - 2008 Novell, Inc.
+ */
 
 #ifndef NM_SETTING_PPPOE_H
 #define NM_SETTING_PPPOE_H

Modified: branches/mbca/libnm-util/nm-setting-serial.c
==============================================================================
--- branches/mbca/libnm-util/nm-setting-serial.c	(original)
+++ branches/mbca/libnm-util/nm-setting-serial.c	Wed Aug  6 06:37:19 2008
@@ -1,4 +1,27 @@
-/* -*- Mode: C; tab-width: 5; indent-tabs-mode: t; c-basic-offset: 5 -*- */
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
+
+/*
+ * Dan Williams <dcbw redhat com>
+ * Tambet Ingo <tambet gmail com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2007 - 2008 Red Hat, Inc.
+ * (C) Copyright 2007 - 2008 Novell, Inc.
+ */
 
 #include <string.h>
 

Modified: branches/mbca/libnm-util/nm-setting-serial.h
==============================================================================
--- branches/mbca/libnm-util/nm-setting-serial.h	(original)
+++ branches/mbca/libnm-util/nm-setting-serial.h	Wed Aug  6 06:37:19 2008
@@ -1,4 +1,27 @@
-/* -*- Mode: C; tab-width: 5; indent-tabs-mode: t; c-basic-offset: 5 -*- */
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
+
+/*
+ * Dan Williams <dcbw redhat com>
+ * Tambet Ingo <tambet gmail com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2007 - 2008 Red Hat, Inc.
+ * (C) Copyright 2007 - 2008 Novell, Inc.
+ */
 
 #ifndef NM_SETTING_SERIAL_H
 #define NM_SETTING_SERIAL_H

Modified: branches/mbca/libnm-util/nm-setting-template.c
==============================================================================
--- branches/mbca/libnm-util/nm-setting-template.c	(original)
+++ branches/mbca/libnm-util/nm-setting-template.c	Wed Aug  6 06:37:19 2008
@@ -1,4 +1,25 @@
-/* -*- Mode: C; tab-width: 5; indent-tabs-mode: t; c-basic-offset: 5 -*- */
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
+
+/*
+ * Tambet Ingo <tambet gmail com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2007 - 2008 Novell, Inc.
+ */
 
 /* This file is just a template - it's not built nor included in the tarball.
    It's sole purpose is to make the process of creating new settings easier.

Modified: branches/mbca/libnm-util/nm-setting-template.h
==============================================================================
--- branches/mbca/libnm-util/nm-setting-template.h	(original)
+++ branches/mbca/libnm-util/nm-setting-template.h	Wed Aug  6 06:37:19 2008
@@ -1,4 +1,25 @@
-/* -*- Mode: C; tab-width: 5; indent-tabs-mode: t; c-basic-offset: 5 -*- */
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
+
+/*
+ * Tambet Ingo <tambet gmail com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2007 - 2008 Novell, Inc.
+ */
 
 /* This file is just a template - it's not built nor included in the tarball.
    It's sole purpose is to make the process of creating new settings easier.

Modified: branches/mbca/libnm-util/nm-setting-vpn-properties.c
==============================================================================
--- branches/mbca/libnm-util/nm-setting-vpn-properties.c	(original)
+++ branches/mbca/libnm-util/nm-setting-vpn-properties.c	Wed Aug  6 06:37:19 2008
@@ -1,4 +1,27 @@
-/* -*- Mode: C; tab-width: 5; indent-tabs-mode: t; c-basic-offset: 5 -*- */
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
+
+/*
+ * Dan Williams <dcbw redhat com>
+ * Tambet Ingo <tambet gmail com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2007 - 2008 Red Hat, Inc.
+ * (C) Copyright 2007 - 2008 Novell, Inc.
+ */
 
 #include <dbus/dbus-glib.h>
 #include "nm-setting-vpn-properties.h"

Modified: branches/mbca/libnm-util/nm-setting-vpn-properties.h
==============================================================================
--- branches/mbca/libnm-util/nm-setting-vpn-properties.h	(original)
+++ branches/mbca/libnm-util/nm-setting-vpn-properties.h	Wed Aug  6 06:37:19 2008
@@ -1,4 +1,27 @@
-/* -*- Mode: C; tab-width: 5; indent-tabs-mode: t; c-basic-offset: 5 -*- */
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
+
+/*
+ * Dan Williams <dcbw redhat com>
+ * Tambet Ingo <tambet gmail com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2007 - 2008 Red Hat, Inc.
+ * (C) Copyright 2007 - 2008 Novell, Inc.
+ */
 
 #ifndef NM_SETTING_VPN_PROPERTIES_H
 #define NM_SETTING_VPN_PROPERTIES_H

Modified: branches/mbca/libnm-util/nm-setting-vpn.c
==============================================================================
--- branches/mbca/libnm-util/nm-setting-vpn.c	(original)
+++ branches/mbca/libnm-util/nm-setting-vpn.c	Wed Aug  6 06:37:19 2008
@@ -1,4 +1,27 @@
-/* -*- Mode: C; tab-width: 5; indent-tabs-mode: t; c-basic-offset: 5 -*- */
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
+
+/*
+ * Dan Williams <dcbw redhat com>
+ * Tambet Ingo <tambet gmail com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2007 - 2008 Red Hat, Inc.
+ * (C) Copyright 2007 - 2008 Novell, Inc.
+ */
 
 #include <string.h>
 #include <dbus/dbus-glib.h>

Modified: branches/mbca/libnm-util/nm-setting-vpn.h
==============================================================================
--- branches/mbca/libnm-util/nm-setting-vpn.h	(original)
+++ branches/mbca/libnm-util/nm-setting-vpn.h	Wed Aug  6 06:37:19 2008
@@ -1,4 +1,27 @@
-/* -*- Mode: C; tab-width: 5; indent-tabs-mode: t; c-basic-offset: 5 -*- */
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
+
+/*
+ * Dan Williams <dcbw redhat com>
+ * Tambet Ingo <tambet gmail com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2007 - 2008 Red Hat, Inc.
+ * (C) Copyright 2007 - 2008 Novell, Inc.
+ */
 
 #ifndef NM_SETTING_VPN_H
 #define NM_SETTING_VPN_H

Modified: branches/mbca/libnm-util/nm-setting-wired.c
==============================================================================
--- branches/mbca/libnm-util/nm-setting-wired.c	(original)
+++ branches/mbca/libnm-util/nm-setting-wired.c	Wed Aug  6 06:37:19 2008
@@ -1,4 +1,27 @@
-/* -*- Mode: C; tab-width: 5; indent-tabs-mode: t; c-basic-offset: 5 -*- */
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
+
+/*
+ * Dan Williams <dcbw redhat com>
+ * Tambet Ingo <tambet gmail com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2007 - 2008 Red Hat, Inc.
+ * (C) Copyright 2007 - 2008 Novell, Inc.
+ */
 
 #include <net/ethernet.h>
 #include <dbus/dbus-glib.h>

Modified: branches/mbca/libnm-util/nm-setting-wired.h
==============================================================================
--- branches/mbca/libnm-util/nm-setting-wired.h	(original)
+++ branches/mbca/libnm-util/nm-setting-wired.h	Wed Aug  6 06:37:19 2008
@@ -1,4 +1,27 @@
-/* -*- Mode: C; tab-width: 5; indent-tabs-mode: t; c-basic-offset: 5 -*- */
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
+
+/*
+ * Dan Williams <dcbw redhat com>
+ * Tambet Ingo <tambet gmail com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2007 - 2008 Red Hat, Inc.
+ * (C) Copyright 2007 - 2008 Novell, Inc.
+ */
 
 #ifndef NM_SETTING_WIRED_H
 #define NM_SETTING_WIRED_H

Modified: branches/mbca/libnm-util/nm-setting-wireless-security.c
==============================================================================
--- branches/mbca/libnm-util/nm-setting-wireless-security.c	(original)
+++ branches/mbca/libnm-util/nm-setting-wireless-security.c	Wed Aug  6 06:37:19 2008
@@ -1,4 +1,27 @@
-/* -*- Mode: C; tab-width: 5; indent-tabs-mode: t; c-basic-offset: 5 -*- */
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
+
+/*
+ * Dan Williams <dcbw redhat com>
+ * Tambet Ingo <tambet gmail com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2007 - 2008 Red Hat, Inc.
+ * (C) Copyright 2007 - 2008 Novell, Inc.
+ */
 
 #include <string.h>
 #include <ctype.h>

Modified: branches/mbca/libnm-util/nm-setting-wireless-security.h
==============================================================================
--- branches/mbca/libnm-util/nm-setting-wireless-security.h	(original)
+++ branches/mbca/libnm-util/nm-setting-wireless-security.h	Wed Aug  6 06:37:19 2008
@@ -1,4 +1,27 @@
-/* -*- Mode: C; tab-width: 5; indent-tabs-mode: t; c-basic-offset: 5 -*- */
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
+
+/*
+ * Dan Williams <dcbw redhat com>
+ * Tambet Ingo <tambet gmail com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2007 - 2008 Red Hat, Inc.
+ * (C) Copyright 2007 - 2008 Novell, Inc.
+ */
 
 #ifndef NM_SETTING_WIRELESS_SECURITY_H
 #define NM_SETTING_WIRELESS_SECURITY_H

Modified: branches/mbca/libnm-util/nm-setting-wireless.c
==============================================================================
--- branches/mbca/libnm-util/nm-setting-wireless.c	(original)
+++ branches/mbca/libnm-util/nm-setting-wireless.c	Wed Aug  6 06:37:19 2008
@@ -1,4 +1,27 @@
-/* -*- Mode: C; tab-width: 5; indent-tabs-mode: t; c-basic-offset: 5 -*- */
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
+
+/*
+ * Dan Williams <dcbw redhat com>
+ * Tambet Ingo <tambet gmail com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2007 - 2008 Red Hat, Inc.
+ * (C) Copyright 2007 - 2008 Novell, Inc.
+ */
 
 #include <string.h>
 #include <netinet/ether.h>

Modified: branches/mbca/libnm-util/nm-setting-wireless.h
==============================================================================
--- branches/mbca/libnm-util/nm-setting-wireless.h	(original)
+++ branches/mbca/libnm-util/nm-setting-wireless.h	Wed Aug  6 06:37:19 2008
@@ -1,4 +1,27 @@
-/* -*- Mode: C; tab-width: 5; indent-tabs-mode: t; c-basic-offset: 5 -*- */
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
+
+/*
+ * Dan Williams <dcbw redhat com>
+ * Tambet Ingo <tambet gmail com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2007 - 2008 Red Hat, Inc.
+ * (C) Copyright 2007 - 2008 Novell, Inc.
+ */
 
 #ifndef NM_SETTING_WIRELESS_H
 #define NM_SETTING_WIRELESS_H

Modified: branches/mbca/libnm-util/nm-setting.c
==============================================================================
--- branches/mbca/libnm-util/nm-setting.c	(original)
+++ branches/mbca/libnm-util/nm-setting.c	Wed Aug  6 06:37:19 2008
@@ -1,4 +1,27 @@
-/* -*- Mode: C; tab-width: 5; indent-tabs-mode: t; c-basic-offset: 5 -*- */
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
+
+/*
+ * Dan Williams <dcbw redhat com>
+ * Tambet Ingo <tambet gmail com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2007 - 2008 Red Hat, Inc.
+ * (C) Copyright 2007 - 2008 Novell, Inc.
+ */
 
 #include <string.h>
 

Modified: branches/mbca/libnm-util/nm-setting.h
==============================================================================
--- branches/mbca/libnm-util/nm-setting.h	(original)
+++ branches/mbca/libnm-util/nm-setting.h	Wed Aug  6 06:37:19 2008
@@ -1,4 +1,27 @@
-/* -*- Mode: C; tab-width: 5; indent-tabs-mode: t; c-basic-offset: 5 -*- */
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
+
+/*
+ * Dan Williams <dcbw redhat com>
+ * Tambet Ingo <tambet gmail com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2007 - 2008 Red Hat, Inc.
+ * (C) Copyright 2007 - 2008 Novell, Inc.
+ */
 
 #ifndef NM_SETTING_H
 #define NM_SETTING_H

Modified: branches/mbca/libnm-util/nm-utils.c
==============================================================================
--- branches/mbca/libnm-util/nm-utils.c	(original)
+++ branches/mbca/libnm-util/nm-utils.c	Wed Aug  6 06:37:19 2008
@@ -1,24 +1,27 @@
-/* -*- Mode: C; tab-width: 5; indent-tabs-mode: t; c-basic-offset: 5 -*- */
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
 
 /* NetworkManager -- Network link manager
  *
  * Ray Strode <rstrode redhat com>
+ * Dan Williams <dcbw redhat com>
+ * Tambet Ingo <tambet gmail com>
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
  *
- * This program is distributed in the hope that it will be useful,
+ * This library is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
  *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301 USA.
  *
- * (C) Copyright 2005 Red Hat, Inc.
+ * (C) Copyright 2005 - 2008 Red Hat, Inc.
  */
 
 #include <string.h>

Modified: branches/mbca/libnm-util/nm-utils.h
==============================================================================
--- branches/mbca/libnm-util/nm-utils.h	(original)
+++ branches/mbca/libnm-util/nm-utils.h	Wed Aug  6 06:37:19 2008
@@ -1,23 +1,27 @@
-/* -*- Mode: C; tab-width: 5; indent-tabs-mode: t; c-basic-offset: 5 -*- */
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
+
 /* NetworkManager -- Network link manager
  *
  * Ray Strode <rstrode redhat com>
+ * Dan Williams <dcbw redhat com>
+ * Tambet Ingo <tambet gmail com>
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
  *
- * This program is distributed in the hope that it will be useful,
+ * This library is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
  *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301 USA.
  *
- * (C) Copyright 2005 Red Hat, Inc.
+ * (C) Copyright 2005 - 2008 Red Hat, Inc.
  */
 
 #ifndef NM_UTILS_H

Modified: branches/mbca/libnm-util/test-crypto.c
==============================================================================
--- branches/mbca/libnm-util/test-crypto.c	(original)
+++ branches/mbca/libnm-util/test-crypto.c	Wed Aug  6 06:37:19 2008
@@ -1,22 +1,24 @@
-/* NetworkManager Wireless Applet -- Display wireless access points and allow user control
- *
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
+
+/*
  * Dan Williams <dcbw redhat com>
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
  *
- * This program is distributed in the hope that it will be useful,
+ * This library is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
  *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301 USA.
  *
- * (C) Copyright 2007 Red Hat, Inc.
+ * (C) Copyright 2007 - 2008 Red Hat, Inc.
  */
 
 #include <glib.h>

Modified: branches/mbca/marshallers/Makefile.am
==============================================================================
--- branches/mbca/marshallers/Makefile.am	(original)
+++ branches/mbca/marshallers/Makefile.am	Wed Aug  6 06:37:19 2008
@@ -9,8 +9,6 @@
 
 libmarshallers_la_CPPFLAGS = \
 	$(GTHREAD_CFLAGS) \
-	-g \
-	-Wall \
 	-DG_DISABLE_DEPRECATED
 
 

Modified: branches/mbca/po/POTFILES.skip
==============================================================================
--- branches/mbca/po/POTFILES.skip	(original)
+++ branches/mbca/po/POTFILES.skip	Wed Aug  6 06:37:19 2008
@@ -1,30 +1,5 @@
 examples/python/NetworkManager.py
 examples/python/systray/eggtrayicon.c
-vpn-daemons/openvpn/auth-dialog/gnome-two-password-dialog.c
-vpn-daemons/openvpn/auth-dialog/main.c
-vpn-daemons/openvpn/nm-openvpn.desktop.in
-vpn-daemons/openvpn/properties/auth-helpers.c
-vpn-daemons/openvpn/properties/nm-openvpn-dialog.glade
-vpn-daemons/openvpn/properties/nm-openvpn.c
-vpn-daemons/openvpn/src/nm-openvpn-service.c
-vpn-daemons/pptp/auth-dialog-general/gnome-generic-auth-dialog.c
-vpn-daemons/pptp/auth-dialog-general/main.c
-vpn-daemons/pptp/auth-dialog-general/nm-ppp-auth.glade
-vpn-daemons/pptp/auth-dialog/gnome-two-password-dialog.c
-vpn-daemons/pptp/auth-dialog/main.c
-vpn-daemons/pptp/nm-ppp.desktop.in
-vpn-daemons/pptp/nm-pptp.desktop.in
-vpn-daemons/pptp/properties/advanced-dialog.c
-vpn-daemons/pptp/properties/nm-ppp-dialog.glade
-vpn-daemons/pptp/properties/nm-ppp-properties.c
-vpn-daemons/pptp/properties/nm-pptp-dialog.glade
-vpn-daemons/pptp/properties/vpnui_impl.c
-vpn-daemons/pptp/src/nm-ppp-starter.c
-vpn-daemons/vpnc/auth-dialog/gnome-two-password-dialog.c
-vpn-daemons/vpnc/auth-dialog/main.c
-vpn-daemons/vpnc/nm-vpnc.desktop.in
-vpn-daemons/vpnc/properties/nm-vpnc-dialog.glade
-vpn-daemons/vpnc/properties/nm-vpnc.c
-vpn-daemons/vpnc/src/nm-utils.c
-vpn-daemons/vpnc/src/nm-vpnc-service-vpnc-helper.c
-vpn-daemons/vpnc/src/nm-vpnc-service.c
+vpn-daemons/openvpn
+vpn-daemons/pptp
+vpn-daemons/vpnc

Modified: branches/mbca/src/NetworkManager.c
==============================================================================
--- branches/mbca/src/NetworkManager.c	(original)
+++ branches/mbca/src/NetworkManager.c	Wed Aug  6 06:37:19 2008
@@ -303,7 +303,7 @@
 		goto done;
 	}
 
-	manager = nm_manager_new ();
+	manager = nm_manager_get ();
 	if (manager == NULL) {
 		nm_error ("Failed to initialize the network manager.");
 		goto done;

Modified: branches/mbca/src/NetworkManagerPolicy.c
==============================================================================
--- branches/mbca/src/NetworkManagerPolicy.c	(original)
+++ branches/mbca/src/NetworkManagerPolicy.c	Wed Aug  6 06:37:19 2008
@@ -149,7 +149,7 @@
 
 		/* Never set the default route through an IPv4LL-addressed device */
 		s_ip4 = (NMSettingIP4Config *) nm_connection_get_setting (connection, NM_TYPE_SETTING_IP4_CONFIG);
-		if (s_ip4 && !strcmp (s_ip4->method, NM_SETTING_IP4_CONFIG_METHOD_AUTOIP))
+		if (s_ip4 && !strcmp (s_ip4->method, NM_SETTING_IP4_CONFIG_METHOD_LINK_LOCAL))
 			continue;
 
 		/* Make sure at least one of this device's IP addresses has a gateway */

Modified: branches/mbca/src/NetworkManagerSystem.c
==============================================================================
--- branches/mbca/src/NetworkManagerSystem.c	(original)
+++ branches/mbca/src/NetworkManagerSystem.c	Wed Aug  6 06:37:19 2008
@@ -62,7 +62,7 @@
 #include <netlink/route/link.h>
 
 static gboolean
-route_in_same_subnet (NMIP4Config *config, guint32 prefix)
+route_in_same_subnet (NMIP4Config *config, guint32 dest, guint32 prefix)
 {
 	int num;
 	int i;
@@ -72,8 +72,13 @@
 		const NMSettingIP4Address *addr;
 
 		addr = nm_ip4_config_get_address (config, i);
-		if (prefix == addr->prefix)
-			return TRUE;
+		if (prefix == addr->prefix) {
+			guint32 masked_addr = addr->address >> (32 - addr->prefix);
+			guint32 masked_dest = dest >> (32 - prefix);
+
+			if (masked_addr == masked_dest)
+				return TRUE;
+		}
 	}
 
 	return FALSE;
@@ -110,7 +115,7 @@
 	struct nl_addr *gw_addr = NULL;
 	int err, iface_idx;
 
-	if (iface_config && route_in_same_subnet (iface_config, ip4_prefix))
+	if (iface_config && route_in_same_subnet (iface_config, ip4_dest, ip4_prefix))
 		return;
 
 	nlh = nm_netlink_get_default_handle ();

Modified: branches/mbca/src/dhcp-manager/nm-dhcp-dhcpcd.c
==============================================================================
--- branches/mbca/src/dhcp-manager/nm-dhcp-dhcpcd.c	(original)
+++ branches/mbca/src/dhcp-manager/nm-dhcp-dhcpcd.c	Wed Aug  6 06:37:19 2008
@@ -90,7 +90,9 @@
 	argv = g_ptr_array_new ();
 	g_ptr_array_add (argv, (gpointer) DHCP_CLIENT_PATH);
 
-	g_ptr_array_add (argv, (gpointer) "-X");	/* Don't fork */
+	g_ptr_array_add (argv, (gpointer) "-B");	/* Don't background on lease (disable fork()) */
+
+	g_ptr_array_add (argv, (gpointer) "-K");	/* Disable built-in carrier detection */
 
 	g_ptr_array_add (argv, (gpointer) "-L");	/* Disable built-in IPv4LL since we use avahi-autoipd */
 

Modified: branches/mbca/src/dnsmasq-manager/nm-dnsmasq-manager.c
==============================================================================
--- branches/mbca/src/dnsmasq-manager/nm-dnsmasq-manager.c	(original)
+++ branches/mbca/src/dnsmasq-manager/nm-dnsmasq-manager.c	Wed Aug  6 06:37:19 2008
@@ -255,6 +255,7 @@
 	nm_cmd_line_add_string (cmd, "--keep-in-foreground");
 	nm_cmd_line_add_string (cmd, "--bind-interfaces");
 	nm_cmd_line_add_string (cmd, "--no-poll");
+	nm_cmd_line_add_string (cmd, "--except-interface=lo");
 
 	s = g_string_new ("--listen-address=");
 	addr.s_addr = tmp->address;
@@ -357,7 +358,6 @@
 	NMDnsMasqManagerPrivate *priv;
 	NMCmdLine *dm_cmd;
 	char *cmd_str;
-	GSource *dm_watch;
 
 	g_return_val_if_fail (NM_IS_DNSMASQ_MANAGER (manager), FALSE);
 	if (error)
@@ -389,11 +389,7 @@
 
 	nm_debug ("dnsmasq started with pid %d", priv->pid);
 
-	dm_watch = g_child_watch_source_new (priv->pid);
-	g_source_set_callback (dm_watch, (GSourceFunc) dm_watch_cb, manager, NULL);
-	g_source_attach (dm_watch, NULL);
-	priv->dm_watch_id = g_source_get_id (dm_watch);
-	g_source_unref (dm_watch);
+	priv->dm_watch_id = g_child_watch_add (priv->pid, (GChildWatchFunc) dm_watch_cb, manager);
 
  out:
 	if (dm_cmd)
@@ -410,6 +406,9 @@
 	if (kill (pid, 0) == 0)
 		kill (pid, SIGKILL);
 
+	/* ensure child is reaped */
+	waitpid (pid, NULL, WNOHANG);
+
 	return FALSE;
 }
 
@@ -433,6 +432,8 @@
 		else
 			kill (priv->pid, SIGKILL);
 
+		/* ensure child is reaped */
+		waitpid (priv->pid, NULL, WNOHANG);
 		priv->pid = 0;
 	}
 

Modified: branches/mbca/src/nm-activation-request.c
==============================================================================
--- branches/mbca/src/nm-activation-request.c	(original)
+++ branches/mbca/src/nm-activation-request.c	Wed Aug  6 06:37:19 2008
@@ -35,8 +35,6 @@
 
 #include "nm-manager.h" /* FIXME! */
 
-#define CONNECTION_GET_SECRETS_CALL_TAG "get-secrets-call"
-
 G_DEFINE_TYPE (NMActRequest, nm_act_request, G_TYPE_OBJECT)
 
 #define NM_ACT_REQUEST_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), NM_TYPE_ACT_REQUEST, NMActRequestPrivate))
@@ -53,7 +51,11 @@
 
 
 typedef struct {
+	gboolean disposed;
+
 	NMConnection *connection;
+	DBusGProxyCall *secrets_call;
+
 	char *specific_object;
 	NMDevice *device;
 	gboolean user_requested;
@@ -168,32 +170,44 @@
 }
 
 static void
+cleanup_secrets_dbus_call (NMActRequest *self)
+{
+	NMActRequestPrivate *priv = NM_ACT_REQUEST_GET_PRIVATE (self);
+	DBusGProxy *proxy;
+
+	g_return_if_fail (priv->connection != NULL);
+	g_return_if_fail (NM_IS_CONNECTION (priv->connection));
+
+	proxy = g_object_get_data (G_OBJECT (priv->connection), NM_MANAGER_CONNECTION_SECRETS_PROXY_TAG);
+	g_assert (proxy);
+
+	if (priv->secrets_call) {
+		dbus_g_proxy_cancel_call (proxy, priv->secrets_call);
+		priv->secrets_call = NULL;
+	}
+}
+
+static void
 dispose (GObject *object)
 {
 	NMActRequestPrivate *priv = NM_ACT_REQUEST_GET_PRIVATE (object);
-	DBusGProxy *proxy;
-	DBusGProxyCall *call;
 
-	if (!priv->connection)
-		goto out;
+	if (priv->disposed) {
+		G_OBJECT_CLASS (nm_act_request_parent_class)->dispose (object);
+		return;
+	}
+	priv->disposed = TRUE;
+
+	g_assert (priv->connection);
 
 	g_signal_handlers_disconnect_by_func (G_OBJECT (priv->device),
 	                                      G_CALLBACK (device_state_changed),
 	                                      NM_ACT_REQUEST (object));
 
-	proxy = g_object_get_data (G_OBJECT (priv->connection),
-	                           NM_MANAGER_CONNECTION_SECRETS_PROXY_TAG);
-	call = g_object_get_data (G_OBJECT (priv->connection),
-	                          CONNECTION_GET_SECRETS_CALL_TAG);
-
-	if (proxy && call)
-		dbus_g_proxy_cancel_call (proxy, call);
+	cleanup_secrets_dbus_call (NM_ACT_REQUEST (object));
 
-	g_object_set_data (G_OBJECT (priv->connection),
-	                   CONNECTION_GET_SECRETS_CALL_TAG, NULL);
 	g_object_unref (priv->connection);
 
-out:
 	G_OBJECT_CLASS (nm_act_request_parent_class)->dispose (object);
 }
 
@@ -443,7 +457,9 @@
 	g_return_if_fail (info->setting_name);
 
 	priv = NM_ACT_REQUEST_GET_PRIVATE (info->req);
-	g_object_set_data (G_OBJECT (priv->connection), CONNECTION_GET_SECRETS_CALL_TAG, NULL);
+
+	g_return_if_fail (call == priv->secrets_call);
+	priv->secrets_call = NULL;
 
 	if (!dbus_g_proxy_end_call (proxy, call, &err,
 								DBUS_TYPE_G_MAP_OF_MAP_OF_VARIANT, &settings,
@@ -498,40 +514,31 @@
 }
 
 gboolean
-nm_act_request_request_connection_secrets (NMActRequest *req,
+nm_act_request_request_connection_secrets (NMActRequest *self,
                                            const char *setting_name,
                                            gboolean request_new,
                                            RequestSecretsCaller caller,
                                            const char *hint1,
                                            const char *hint2)
 {
-	DBusGProxy *proxy;
-	DBusGProxyCall *call;
+	DBusGProxy *secrets_proxy;
 	GetSecretsInfo *info = NULL;
 	NMActRequestPrivate *priv = NULL;
 	GPtrArray *hints = NULL;
 
-	g_return_val_if_fail (NM_IS_ACT_REQUEST (req), FALSE);
+	g_return_val_if_fail (NM_IS_ACT_REQUEST (self), FALSE);
 	g_return_val_if_fail (setting_name != NULL, FALSE);
 
-	priv = NM_ACT_REQUEST_GET_PRIVATE (req);
-	proxy = g_object_get_data (G_OBJECT (priv->connection), NM_MANAGER_CONNECTION_SECRETS_PROXY_TAG);
-	if (!DBUS_IS_G_PROXY (proxy)) {
-		nm_warning ("Couldn't get dbus proxy for connection.");
-		goto error;
-	}
+	priv = NM_ACT_REQUEST_GET_PRIVATE (self);
+
+	cleanup_secrets_dbus_call (self);
 
 	info = g_malloc0 (sizeof (GetSecretsInfo));
-	if (!info) {
-		nm_warning ("Not enough memory to get secrets");
-		goto error;
-	}
+	g_return_val_if_fail (info != NULL, FALSE);
 
+	info->req = self;
+	info->caller = caller;
 	info->setting_name = g_strdup (setting_name);
-	if (!info->setting_name) {
-		nm_warning ("Not enough memory to get secrets");
-		goto error;
-	}
 
 	/* Empty for now */
 	hints = g_ptr_array_sized_new (2);
@@ -541,29 +548,30 @@
 	if (hint2)
 		g_ptr_array_add (hints, g_strdup (hint2));
 
-	info->req = req;
-	info->caller = caller;
-	call = dbus_g_proxy_begin_call_with_timeout (proxy, "GetSecrets",
-	                                             get_secrets_cb,
-	                                             info,
-	                                             free_get_secrets_info,
-	                                             G_MAXINT32,
-	                                             G_TYPE_STRING, setting_name,
-	                                             DBUS_TYPE_G_ARRAY_OF_STRING, hints,
-	                                             G_TYPE_BOOLEAN, request_new,
-	                                             G_TYPE_INVALID);
+	secrets_proxy = g_object_get_data (G_OBJECT (priv->connection), NM_MANAGER_CONNECTION_SECRETS_PROXY_TAG);
+	g_assert (secrets_proxy);
+
+	priv->secrets_call = dbus_g_proxy_begin_call_with_timeout (secrets_proxy, "GetSecrets",
+	                                                           get_secrets_cb,
+	                                                           info,
+	                                                           free_get_secrets_info,
+	                                                           G_MAXINT32,
+	                                                           G_TYPE_STRING, setting_name,
+	                                                           DBUS_TYPE_G_ARRAY_OF_STRING, hints,
+	                                                           G_TYPE_BOOLEAN, request_new,
+	                                                           G_TYPE_INVALID);
 	g_ptr_array_free (hints, TRUE);
-	if (!call) {
-		nm_warning ("Could not call GetSecrets");
+	if (!priv->secrets_call) {
+		nm_warning ("Could not call get secrets");
 		goto error;
 	}
 
-	g_object_set_data (G_OBJECT (priv->connection), CONNECTION_GET_SECRETS_CALL_TAG, call);
 	return TRUE;
 
 error:
 	if (info)
 		free_get_secrets_info (info);
+	cleanup_secrets_dbus_call (self);
 	return FALSE;
 }
 

Modified: branches/mbca/src/nm-cdma-device.c
==============================================================================
--- branches/mbca/src/nm-cdma-device.c	(original)
+++ branches/mbca/src/nm-cdma-device.c	Wed Aug  6 06:37:19 2008
@@ -398,7 +398,6 @@
 
 	/* Make sure we don't leave the serial device open */
 	switch (new_state) {
-	case NM_DEVICE_STATE_NEED_AUTH:
 	case NM_DEVICE_STATE_UNMANAGED:
 	case NM_DEVICE_STATE_UNAVAILABLE:
 	case NM_DEVICE_STATE_FAILED:

Modified: branches/mbca/src/nm-device-ethernet.c
==============================================================================
--- branches/mbca/src/nm-device-ethernet.c	(original)
+++ branches/mbca/src/nm-device-ethernet.c	Wed Aug  6 06:37:19 2008
@@ -1178,11 +1178,8 @@
 	req = nm_device_get_act_request (NM_DEVICE (self));
 	g_assert (req);
 
-	priv->ppp_manager = nm_ppp_manager_new ();
-	if (nm_ppp_manager_start (priv->ppp_manager,
-						 nm_device_get_iface (NM_DEVICE (self)),
-						 req,
-						 &err)) {
+	priv->ppp_manager = nm_ppp_manager_new (nm_device_get_iface (NM_DEVICE (self)));
+	if (nm_ppp_manager_start (priv->ppp_manager, req, &err)) {
 		g_signal_connect (priv->ppp_manager, "state-changed",
 					   G_CALLBACK (ppp_state_changed),
 					   self);

Modified: branches/mbca/src/nm-device-wifi.c
==============================================================================
--- branches/mbca/src/nm-device-wifi.c	(original)
+++ branches/mbca/src/nm-device-wifi.c	Wed Aug  6 06:37:19 2008
@@ -2770,6 +2770,7 @@
 	NMConnection *          connection;
 	NMSettingConnection *	s_connection;
 	const char *			setting_name;
+	NMSettingWireless *     s_wireless;
 
 	g_return_val_if_fail (reason != NULL, NM_ACT_STAGE_RETURN_FAILURE);
 
@@ -2787,33 +2788,31 @@
 	s_connection = (NMSettingConnection *) nm_connection_get_setting (connection, NM_TYPE_SETTING_CONNECTION);
 	g_assert (s_connection);
 
+	s_wireless = (NMSettingWireless *) nm_connection_get_setting (connection, NM_TYPE_SETTING_WIRELESS);
+	g_assert (s_wireless);
+
 	/* If we need secrets, get them */
 	setting_name = nm_connection_need_secrets (connection, NULL);
 	if (setting_name) {
-		NMActStageReturn auth_ret;
-
 		nm_info ("Activation (%s/wireless): access point '%s' has security,"
 		         " but secrets are required.",
 		         iface, s_connection->id);
 
-		auth_ret = handle_auth_or_fail (self, req, FALSE);
-		if (auth_ret == NM_ACT_STAGE_RETURN_FAILURE) {
+		ret = handle_auth_or_fail (self, req, FALSE);
+		if (ret == NM_ACT_STAGE_RETURN_FAILURE)
 			*reason = NM_DEVICE_STATE_REASON_NO_SECRETS;
-			goto out;
-		}
-	} else {
-		NMSettingWireless *s_wireless = (NMSettingWireless *) nm_connection_get_setting (connection, 
-																		 NM_TYPE_SETTING_WIRELESS);
+		goto out;
+	}
 
-		if (s_wireless->security) {
-			nm_info ("Activation (%s/wireless): connection '%s' has security"
-			         ", and secrets exist.  No new secrets needed.",
-			         iface, s_connection->id);
-		} else {
-			nm_info ("Activation (%s/wireless): connection '%s' requires no "
-			         "security.  No secrets needed.",
-			         iface, s_connection->id);
-		}
+	/* have secrets, or no secrets required */
+	if (s_wireless->security) {
+		nm_info ("Activation (%s/wireless): connection '%s' has security"
+		         ", and secrets exist.  No new secrets needed.",
+		         iface, s_connection->id);
+	} else {
+		nm_info ("Activation (%s/wireless): connection '%s' requires no "
+		         "security.  No secrets needed.",
+		         iface, s_connection->id);
 	}
 
 	config = build_supplicant_config (self, connection, ap);
@@ -3417,7 +3416,8 @@
 		return;
 
 	if (enabled) {
-		g_warn_if_fail (state == NM_DEVICE_STATE_UNAVAILABLE);
+		if (state != NM_DEVICE_STATE_UNAVAILABLE);
+			nm_warning ("not in expected unavailable state!");
 
 		if (!nm_device_hw_bring_up (NM_DEVICE (self), TRUE)) {
 			/* The device sucks, or HAL was lying to us about the killswitch state */

Modified: branches/mbca/src/nm-device.c
==============================================================================
--- branches/mbca/src/nm-device.c	(original)
+++ branches/mbca/src/nm-device.c	Wed Aug  6 06:37:19 2008
@@ -551,16 +551,18 @@
 {
 	NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (self);
 
-	if (priv->aipd_pid > 0) {
-		kill (priv->aipd_pid, SIGKILL);
-		priv->aipd_pid = -1;
-	}
-
 	if (priv->aipd_watch) {
 		g_source_remove (priv->aipd_watch);
 		priv->aipd_watch = 0;
 	}
 
+	if (priv->aipd_pid > 0) {
+		kill (priv->aipd_pid, SIGKILL);
+		/* Ensure child is reaped */
+		waitpid (priv->aipd_pid, NULL, WNOHANG);
+		priv->aipd_pid = -1;
+	}
+
 	aipd_timeout_remove (self);
 
 	priv->aipd_addr = 0;
@@ -647,7 +649,7 @@
 
 	/* Ignore if the connection isn't an AutoIP connection */
 	s_ip4 = (NMSettingIP4Config *) nm_connection_get_setting (connection, NM_TYPE_SETTING_IP4_CONFIG);
-	if (!s_ip4 || !s_ip4->method || strcmp (s_ip4->method, NM_SETTING_IP4_CONFIG_METHOD_AUTOIP))
+	if (!s_ip4 || !s_ip4->method || strcmp (s_ip4->method, NM_SETTING_IP4_CONFIG_METHOD_LINK_LOCAL))
 		return;
 
 	iface = nm_device_get_iface (self);
@@ -826,7 +828,7 @@
 													NM_TYPE_SETTING_IP4_CONFIG);
 
 	/* If we did not receive IP4 configuration information, default to DHCP */
-	if (!s_ip4 || !strcmp (s_ip4->method, NM_SETTING_IP4_CONFIG_METHOD_DHCP)) {
+	if (!s_ip4 || !strcmp (s_ip4->method, NM_SETTING_IP4_CONFIG_METHOD_AUTO)) {
 		NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (self);
 		gboolean success;
 
@@ -848,7 +850,7 @@
 			*reason = NM_DEVICE_STATE_REASON_DHCP_START_FAILED;
 			ret = NM_ACT_STAGE_RETURN_FAILURE;
 		}
-	} else if (s_ip4 && !strcmp (s_ip4->method, NM_SETTING_IP4_CONFIG_METHOD_AUTOIP)) {
+	} else if (s_ip4 && !strcmp (s_ip4->method, NM_SETTING_IP4_CONFIG_METHOD_LINK_LOCAL)) {
 		GError *error = NULL;
 
 		/* Start avahi-autoipd */
@@ -1024,7 +1026,7 @@
 		g_assert (s_ip4);
 		g_assert (s_ip4->method);
 
-		if (!strcmp (s_ip4->method, NM_SETTING_IP4_CONFIG_METHOD_AUTOIP)) {
+		if (!strcmp (s_ip4->method, NM_SETTING_IP4_CONFIG_METHOD_LINK_LOCAL)) {
 			*config = aipd_get_ip4_config (self, reason);
 		} else if (!strcmp (s_ip4->method, NM_SETTING_IP4_CONFIG_METHOD_MANUAL)) {
 			*config = nm_ip4_config_new ();

Modified: branches/mbca/src/nm-gsm-device.c
==============================================================================
--- branches/mbca/src/nm-gsm-device.c	(original)
+++ branches/mbca/src/nm-gsm-device.c	Wed Aug  6 06:37:19 2008
@@ -301,22 +301,28 @@
 {
 	switch (reply_index) {
 	case 0:
-		nm_info ("Registered on Home network");
-		automatic_registration_get_network (NM_GSM_DEVICE (device));
+		nm_warning ("Automatic registration failed: not registered and not searching.");
+		nm_device_state_changed (NM_DEVICE (device),
+		                         NM_DEVICE_STATE_FAILED,
+		                         NM_DEVICE_STATE_REASON_GSM_REGISTRATION_FAILED);
 		break;
 	case 1:
-		nm_info ("Registered on Roaming network");
+		nm_info ("Registered on Home network");
 		automatic_registration_get_network (NM_GSM_DEVICE (device));
 		break;
 	case 2:
 		NM_GSM_DEVICE_GET_PRIVATE (device)->pending_id = g_timeout_add (1000, automatic_registration_again, device);
 		break;
 	case 3:
-		nm_warning ("Automatic registration failed: not registered and not searching.");
+		nm_warning ("Automatic registration failed: registration denied.");
 		nm_device_state_changed (NM_DEVICE (device),
 		                         NM_DEVICE_STATE_FAILED,
 		                         NM_DEVICE_STATE_REASON_GSM_REGISTRATION_FAILED);
 		break;
+	case 4:
+		nm_info ("Registered on Roaming network");
+		automatic_registration_get_network (NM_GSM_DEVICE (device));
+		break;
 	case -1:
 		nm_warning ("Automatic registration timed out");
 		nm_device_state_changed (NM_DEVICE (device),
@@ -335,7 +341,7 @@
 static void
 automatic_registration (NMGsmDevice *device)
 {
-	char *responses[] = { "+CREG: 0,1", "+CREG: 0,5", "+CREG: 0,2", "+CREG: 0,0", NULL };
+	char *responses[] = { "+CREG: 0,0", "+CREG: 0,1", "+CREG: 0,2", "+CREG: 0,3", "+CREG: 0,5", NULL };
 	char *terminators[] = { "OK", "ERROR", "ERR", NULL };
 
 	modem_wait_for_reply (device, "AT+CREG?", 60, responses, terminators, automatic_registration_response);
@@ -383,7 +389,11 @@
 {
 	char *responses[] = { "OK", "ERROR", "ERR", NULL };
 
-	modem_wait_for_reply (device, "ATZ", 10, responses, responses, init_full_done);
+	/* Send E0 too because some devices turn echo back on after CPIN which
+	 * just breaks stuff since echo-ed commands are interpreted as replies.
+	 * rh #456770
+	 */
+	modem_wait_for_reply (device, "ATZ E0", 10, responses, responses, init_full_done);
 }
 
 static void
@@ -792,7 +802,6 @@
 
 	/* Make sure we don't leave the serial device open */
 	switch (new_state) {
-	case NM_DEVICE_STATE_NEED_AUTH:
 	case NM_DEVICE_STATE_UNMANAGED:
 	case NM_DEVICE_STATE_UNAVAILABLE:
 	case NM_DEVICE_STATE_FAILED:

Modified: branches/mbca/src/nm-manager.c
==============================================================================
--- branches/mbca/src/nm-manager.c	(original)
+++ branches/mbca/src/nm-manager.c	Wed Aug  6 06:37:19 2008
@@ -1353,49 +1353,54 @@
 }
 
 NMManager *
-nm_manager_new (void)
+nm_manager_get (void)
 {
-	GObject *object;
+	static NMManager *singleton = NULL;
 	NMManagerPrivate *priv;
 
-	object = g_object_new (NM_TYPE_MANAGER, NULL);
-	priv = NM_MANAGER_GET_PRIVATE (object);
+	if (singleton)
+		return g_object_ref (singleton);
+
+	singleton = (NMManager *) g_object_new (NM_TYPE_MANAGER, NULL);
+	g_assert (singleton);
+
+	priv = NM_MANAGER_GET_PRIVATE (singleton);
 
 	dbus_g_connection_register_g_object (nm_dbus_manager_get_connection (priv->dbus_mgr),
 	                                     NM_DBUS_PATH,
-	                                     object);
+	                                     G_OBJECT (singleton));
 
 	g_signal_connect (priv->dbus_mgr,
 	                  "name-owner-changed",
 	                  G_CALLBACK (nm_manager_name_owner_changed),
-	                  NM_MANAGER (object));
+	                  singleton);
 
-	g_idle_add ((GSourceFunc) initial_get_connections, NM_MANAGER (object));
+	g_idle_add ((GSourceFunc) initial_get_connections, singleton);
 
 	priv->hal_mgr = nm_hal_manager_new ();
-	priv->sync_devices_id = g_idle_add (deferred_sync_devices, object);
+	priv->sync_devices_id = g_idle_add (deferred_sync_devices, singleton);
 
 	g_signal_connect (priv->hal_mgr,
 	                  "udi-added",
 	                  G_CALLBACK (hal_manager_udi_added_cb),
-	                  NM_MANAGER (object));
+	                  singleton);
 
 	g_signal_connect (priv->hal_mgr,
 	                  "udi-removed",
 	                  G_CALLBACK (hal_manager_udi_removed_cb),
-	                  NM_MANAGER (object));
+	                  singleton);
 
 	g_signal_connect (priv->hal_mgr,
 	                  "rfkill-changed",
 	                  G_CALLBACK (hal_manager_rfkill_changed_cb),
-	                  NM_MANAGER (object));
+	                  singleton);
 
 	g_signal_connect (priv->hal_mgr,
 	                  "hal-reappeared",
 	                  G_CALLBACK (hal_manager_hal_reappeared_cb),
-	                  NM_MANAGER (object));
+	                  singleton);
 
-	return NM_MANAGER (object);
+	return singleton;
 }
 
 static void

Modified: branches/mbca/src/nm-manager.h
==============================================================================
--- branches/mbca/src/nm-manager.h	(original)
+++ branches/mbca/src/nm-manager.h	Wed Aug  6 06:37:19 2008
@@ -52,7 +52,7 @@
 
 GType nm_manager_get_type (void);
 
-NMManager *nm_manager_new (void);
+NMManager *nm_manager_get (void);
 
 /* Device handling */
 

Modified: branches/mbca/src/nm-serial-device.c
==============================================================================
--- branches/mbca/src/nm-serial-device.c	(original)
+++ branches/mbca/src/nm-serial-device.c	Wed Aug  6 06:37:19 2008
@@ -768,7 +768,7 @@
 	info->callback = callback;
 	info->user_data = user_data;
 	info->reply_index = -1;
-	info->timeout = timeout * 1000;
+	info->timeout = timeout;
 	info->start = time (NULL);
 
 	return nm_serial_device_set_pending (device, timeout, wait_for_reply_got_data, info, wait_for_reply_done);
@@ -981,6 +981,12 @@
 	case NM_PPP_STATUS_DISCONNECT:
 		nm_device_state_changed (device, NM_DEVICE_STATE_FAILED, NM_DEVICE_STATE_REASON_PPP_DISCONNECT);
 		break;
+	case NM_PPP_STATUS_DEAD:
+		nm_device_state_changed (device, NM_DEVICE_STATE_FAILED, NM_DEVICE_STATE_REASON_PPP_FAILED);
+		break;
+	case NM_PPP_STATUS_AUTHENTICATE:
+		nm_device_state_changed (device, NM_DEVICE_STATE_NEED_AUTH, NM_DEVICE_STATE_REASON_NONE);
+		break;
 	default:
 		break;
 	}
@@ -1027,12 +1033,8 @@
 	req = nm_device_get_act_request (device);
 	g_assert (req);
 
-	priv->ppp_manager = nm_ppp_manager_new ();
-
-	if (nm_ppp_manager_start (priv->ppp_manager,
-						 nm_device_get_iface (device),
-						 req,
-						 &err)) {
+	priv->ppp_manager = nm_ppp_manager_new (nm_device_get_iface (device));
+	if (nm_ppp_manager_start (priv->ppp_manager, req, &err)) {
 		g_signal_connect (priv->ppp_manager, "state-changed",
 					   G_CALLBACK (ppp_state_changed),
 					   device);

Modified: branches/mbca/src/ppp-manager/nm-ppp-manager.c
==============================================================================
--- branches/mbca/src/ppp-manager/nm-ppp-manager.c	(original)
+++ branches/mbca/src/ppp-manager/nm-ppp-manager.c	Wed Aug  6 06:37:19 2008
@@ -19,6 +19,7 @@
 #endif
 #include <linux/if_ppp.h>
 
+#include "NetworkManager.h"
 #include "nm-ppp-manager.h"
 #include "nm-setting-connection.h"
 #include "nm-setting-ppp.h"
@@ -43,12 +44,15 @@
 #include "nm-ppp-manager-glue.h"
 
 #define NM_PPPD_PLUGIN PLUGINDIR "/nm-pppd-plugin.so"
-#define NM_PPP_WAIT_PPPD 10000 /* 10 seconds */
+#define NM_PPP_WAIT_PPPD 15000 /* 10 seconds */
 #define PPP_MANAGER_SECRET_TRIES "ppp-manager-secret-tries"
 
 typedef struct {
 	GPid pid;
 	NMDBusManager *dbus_manager;
+	char *dbus_path;
+
+	char *parent_iface;
 
 	NMActRequest *act_req;
 	DBusGMethodInvocation *pending_secrets_context;
@@ -57,7 +61,7 @@
 	guint32 ppp_timeout_handler;
 
 	/* Monitoring */
-	char *iface;
+	char *ip_iface;
 	int monitor_fd;
 	guint monitor_id;
 } NMPPPManagerPrivate;
@@ -76,6 +80,12 @@
 
 static guint signals[LAST_SIGNAL] = { 0 };
 
+enum {
+	PROP_0,
+	PROP_PARENT_IFACE,
+	LAST_PROP
+};
+
 typedef enum {
 	NM_PPP_MANAGER_ERROR_UNKOWN
 } NMPPPManagerError;
@@ -104,9 +114,8 @@
 	GObject *object;
 	NMPPPManagerPrivate *priv;
 	DBusGConnection *connection;
-	DBusGProxy *proxy;
-	guint request_name_result;
-	GError *err = NULL;
+	static gboolean name_requested = FALSE;
+	static guint32 counter = 0;
 
 	object = G_OBJECT_CLASS (nm_ppp_manager_parent_class)->constructor (type,
 														   n_construct_params,
@@ -116,28 +125,48 @@
 
 	priv = NM_PPP_MANAGER_GET_PRIVATE (object);
 	priv->dbus_manager = nm_dbus_manager_get ();
+	if (!priv->dbus_manager) {
+		g_object_unref (object);
+		return NULL;
+	}
 	connection = nm_dbus_manager_get_connection (priv->dbus_manager);
 
-	proxy = dbus_g_proxy_new_for_name (connection,
-								"org.freedesktop.DBus",
-								"/org/freedesktop/DBus",
-								"org.freedesktop.DBus");
-
-	if (dbus_g_proxy_call (proxy, "RequestName", &err,
-					   G_TYPE_STRING, NM_DBUS_SERVICE_PPP,
-					   G_TYPE_UINT, 0,
-					   G_TYPE_INVALID,
-					   G_TYPE_UINT, &request_name_result,
-					   G_TYPE_INVALID))
-		dbus_g_connection_register_g_object (connection, NM_DBUS_PATH_PPP, object);
+	/* Only need to request bus name the first time */
+	if (!name_requested) {
+		DBusGProxy *proxy;
+		gboolean success;
+		guint request_name_result;
+		GError *err = NULL;
 
-	g_object_unref (proxy);
+		proxy = dbus_g_proxy_new_for_name (connection,
+									"org.freedesktop.DBus",
+									"/org/freedesktop/DBus",
+									"org.freedesktop.DBus");
+		success = dbus_g_proxy_call (proxy, "RequestName", &err,
+		                             G_TYPE_STRING, NM_DBUS_SERVICE_PPP,
+		                             G_TYPE_UINT, 0,
+		                             G_TYPE_INVALID,
+		                             G_TYPE_UINT, &request_name_result,
+		                             G_TYPE_INVALID);
+		g_object_unref (proxy);
+
+		if (!success) {
+			nm_warning ("Failed to acquire PPP manager service: %s", err->message);
+			g_object_unref (object);
+			return NULL;
+		}
+
+		name_requested = TRUE;
+	}
+
+	priv->dbus_path = g_strdup_printf (NM_DBUS_PATH "/PPP/%d", counter++);
+	dbus_g_connection_register_g_object (connection, priv->dbus_path, object);
 
 	return object;
 }
 
 static void
-finalize (GObject *object)
+dispose (GObject *object)
 {
 	NMPPPManagerPrivate *priv = NM_PPP_MANAGER_GET_PRIVATE (object);
 
@@ -146,21 +175,75 @@
 	g_object_unref (priv->act_req);
 	g_object_unref (priv->dbus_manager);
 
+	G_OBJECT_CLASS (nm_ppp_manager_parent_class)->dispose (object);
+}
+
+static void
+finalize (GObject *object)
+{
+	NMPPPManagerPrivate *priv = NM_PPP_MANAGER_GET_PRIVATE (object);
+
+	g_free (priv->ip_iface);
+	g_free (priv->parent_iface);
+
 	G_OBJECT_CLASS (nm_ppp_manager_parent_class)->finalize (object);
 }
 
 static void
+set_property (GObject *object, guint prop_id,
+		    const GValue *value, GParamSpec *pspec)
+{
+	NMPPPManagerPrivate *priv = NM_PPP_MANAGER_GET_PRIVATE (object);
+
+	switch (prop_id) {
+	case PROP_PARENT_IFACE:
+		if (priv->parent_iface)
+			g_free (priv->parent_iface);
+		priv->parent_iface = g_value_dup_string (value);
+		break;
+	default:
+		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+		break;
+	}
+}
+
+static void
+get_property (GObject *object, guint prop_id,
+			  GValue *value, GParamSpec *pspec)
+{
+	NMPPPManagerPrivate *priv = NM_PPP_MANAGER_GET_PRIVATE (object);
+
+	switch (prop_id) {
+	case PROP_PARENT_IFACE:
+		g_value_set_string (value, priv->parent_iface);
+		break;
+	default:
+		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+		break;
+	}
+}
+
+static void
 nm_ppp_manager_class_init (NMPPPManagerClass *manager_class)
 {
 	GObjectClass *object_class = G_OBJECT_CLASS (manager_class);
 
 	g_type_class_add_private (manager_class, sizeof (NMPPPManagerPrivate));
 
-	dbus_g_object_type_install_info (G_TYPE_FROM_CLASS (manager_class),
-							   &dbus_glib_nm_ppp_manager_object_info);
-
 	object_class->constructor = constructor;
+	object_class->dispose = dispose;
 	object_class->finalize = finalize;
+	object_class->get_property = get_property;
+	object_class->set_property = set_property;
+
+	/* Properties */
+	g_object_class_install_property
+		(object_class, PROP_PARENT_IFACE,
+		 g_param_spec_string (NM_PPP_MANAGER_PARENT_IFACE,
+							"ParentIface",
+							"Parent interface",
+							NULL,
+							G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
 
 	/* signals */
 	signals[STATE_CHANGED] =
@@ -193,12 +276,19 @@
 				    nm_marshal_VOID__UINT_UINT,
 				    G_TYPE_NONE, 2,
 				    G_TYPE_UINT, G_TYPE_UINT);
+
+	dbus_g_object_type_install_info (G_TYPE_FROM_CLASS (manager_class),
+							   &dbus_glib_nm_ppp_manager_object_info);
 }
 
 NMPPPManager *
-nm_ppp_manager_new (void)
+nm_ppp_manager_new (const char *iface)
 {
-	return (NMPPPManager *) g_object_new (NM_TYPE_PPP_MANAGER, NULL);
+	g_return_val_if_fail (iface != NULL, NULL);
+
+	return (NMPPPManager *) g_object_new (NM_TYPE_PPP_MANAGER,
+	                                      NM_PPP_MANAGER_PARENT_IFACE, iface,
+	                                      NULL);
 }
 
 /*******************************************/
@@ -213,7 +303,7 @@
 	memset (&req, 0, sizeof (req));
 	req.stats_ptr = (caddr_t) &req.stats;
 
-	strncpy (req.ifr__name, priv->iface, sizeof (req.ifr__name));
+	strncpy (req.ifr__name, priv->ip_iface, sizeof (req.ifr__name));
 	if (!ioctl (priv->monitor_fd, SIOCGPPPSTATS, &req) < 0)
 		nm_warning ("Could not read ppp stats: %s", strerror (errno));
 	else
@@ -225,15 +315,14 @@
 }
 
 static void
-monitor_stats (NMPPPManager *manager, const char *iface)
+monitor_stats (NMPPPManager *manager)
 {
 	NMPPPManagerPrivate *priv = NM_PPP_MANAGER_GET_PRIVATE (manager);
 
 	priv->monitor_fd = socket (AF_INET, SOCK_DGRAM, 0);
-	if (priv->monitor_fd > 0) {
-		priv->iface = g_strdup (iface);
+	if (priv->monitor_fd > 0)
 		priv->monitor_id = g_timeout_add (5000, monitor_cb, manager);
-	} else
+	else
 		nm_warning ("Could not open pppd monitor: %s", strerror (errno));
 }
 
@@ -257,12 +346,10 @@
 	NMPPPManagerPrivate *priv = NM_PPP_MANAGER_GET_PRIVATE (manager);
 	NMConnection *connection;
 	NMSettingConnection *s_con;
-	NMSetting *setting;
 	const char *setting_name;
 	guint32 tries;
-	char *hint1 = NULL;
-
-	remove_timeout_handler (manager);
+	GPtrArray *hints = NULL;
+	const char *hint1 = NULL, *hint2 = NULL;
 
 	connection = nm_act_request_get_connection (priv->act_req);
 
@@ -271,54 +358,73 @@
 	g_assert (s_con->type);
 
 	nm_connection_clear_secrets (connection);
-	setting_name = nm_connection_need_secrets (connection, NULL);
-	if (setting_name) {
-		setting = nm_connection_get_setting_by_name (connection, setting_name);
-	} else {
-		/* Always ask for secrets unless the connection's type setting doesn't
-		 * even exist (which shouldn't happen).  Empty username and password are
-		 * valid, but we need to tell the pppd plugin that this is valid by
-		 * sending back blank secrets.
-		 */
+	setting_name = nm_connection_need_secrets (connection, &hints);
+	if (!setting_name) {
+		NMSetting *setting;
+
 		setting = nm_connection_get_setting_by_name (connection, s_con->type);
-		if (!setting) {
+		if (setting) {
+			const char *username = NULL;
+			const char *password = NULL;
+
+			/* FIXME: push this down to the settings and keep PPP manager generic */
+			if (NM_IS_SETTING_PPPOE (setting)) {
+				username = NM_SETTING_PPPOE (setting)->username;
+				password = NM_SETTING_PPPOE (setting)->password;
+			} else if (NM_IS_SETTING_GSM (setting)) {
+				username = NM_SETTING_GSM (setting)->username;
+				password = NM_SETTING_GSM (setting)->password;
+			} else if (NM_IS_SETTING_CDMA (setting)) {
+				username = NM_SETTING_CDMA (setting)->username;
+				password = NM_SETTING_CDMA (setting)->password;
+			}
+
+			/* If secrets are not required, send the existing username and password
+			 * back to the PPP plugin immediately.
+			 */
+			priv->pending_secrets_context = context;
+			nm_ppp_manager_update_secrets (manager,
+			                               NULL, /* FIXME: pass device name */
+			                               username ? username : "",
+			                               password ? password : "",
+			                               NULL);
+		} else {
 			GError *err = NULL;
 
 			g_set_error (&err, NM_PPP_MANAGER_ERROR, NM_PPP_MANAGER_ERROR_UNKOWN,
 					   "Missing type-specific setting; no secrets could be found.");
 			nm_warning ("%s", err->message);
 			dbus_g_method_return_error (context, err);
-			return;
 		}
-		setting_name = nm_setting_get_name (setting);
+		return;
 	}
 
-	/* FIXME: figure out some way of pushing this down to the settings
-	 * themselves and keeping the PPP Manager generic.
-	 */
-	if (NM_IS_SETTING_PPPOE (setting))
-		hint1 = NM_SETTING_PPPOE_PASSWORD;
-	else if (NM_IS_SETTING_GSM (setting))
-		hint1 = NM_SETTING_GSM_PASSWORD;
-	else if (NM_IS_SETTING_CDMA (setting))
-		hint1 = NM_SETTING_CDMA_PASSWORD;
+	/* Extract hints */
+	if (hints) {
+		if (hints->len > 0)
+			hint1 = g_ptr_array_index (hints, 0);
+		if (hints->len > 1)
+			hint2 = g_ptr_array_index (hints, 1);
+	}
 
 	tries = GPOINTER_TO_UINT (g_object_get_data (G_OBJECT (connection), PPP_MANAGER_SECRET_TRIES));
 	nm_act_request_request_connection_secrets (priv->act_req,
 	                                           setting_name,
-	                                           tries == 0 ? TRUE : FALSE,
+	                                           tries ? TRUE : FALSE,
 	                                           SECRETS_CALLER_PPP,
 	                                           hint1,
-	                                           NULL);
+	                                           hint2);
 	g_object_set_data (G_OBJECT (connection), PPP_MANAGER_SECRET_TRIES, GUINT_TO_POINTER (++tries));
 	priv->pending_secrets_context = context;
+
+	if (hints)
+		g_ptr_array_free (hints, TRUE);
 }
 
 static gboolean impl_ppp_manager_set_state (NMPPPManager *manager,
 								    guint32 state,
 								    GError **err)
 {
-	remove_timeout_handler (manager);
 	g_signal_emit (manager, signals[STATE_CHANGED], 0, state);
 
 	return TRUE;
@@ -329,10 +435,11 @@
 						   GHashTable *config_hash,
 						   GError **err)
 {
+	NMPPPManagerPrivate *priv = NM_PPP_MANAGER_GET_PRIVATE (manager);
+	NMConnection *connection;
 	NMIP4Config *config;
 	NMSettingIP4Address *addr;
 	GValue *val;
-	const char *iface;
 	int i;
 
 	nm_info ("PPP manager(IP Config Get) reply received.");
@@ -374,16 +481,21 @@
 	}
 
 	val = (GValue *) g_hash_table_lookup (config_hash, NM_PPP_IP4_CONFIG_INTERFACE);
-	if (val)
-		iface = g_value_get_string (val);
-	else {
+	if (!val || !G_VALUE_HOLDS_STRING (val)) {
 		nm_warning ("No interface");
 		goto out;
 	}
+	priv->ip_iface = g_value_dup_string (val);
 
-	g_signal_emit (manager, signals[IP4_CONFIG], 0, iface, config);
+	/* Got successful IP4 config; obviously the secrets worked */
+	connection = nm_act_request_get_connection (priv->act_req);
+	g_assert (connection);
+	g_object_set_data (G_OBJECT (connection), PPP_MANAGER_SECRET_TRIES, NULL);
+
+	/* Push the IP4 config up to the device */
+	g_signal_emit (manager, signals[IP4_CONFIG], 0, priv->ip_iface, config);
 
-	monitor_stats (manager, iface);
+	monitor_stats (manager);
 
  out:
 	g_object_unref (config);
@@ -582,11 +694,12 @@
 }
 
 static NMCmdLine *
-create_pppd_cmd_line (NMSettingPPP *setting, 
-				  NMSettingPPPOE *pppoe,
-				  const char *device,
-				  GError **err)
+create_pppd_cmd_line (NMPPPManager *self,
+                      NMSettingPPP *setting, 
+                      NMSettingPPPOE *pppoe,
+                      GError **err)
 {
+	NMPPPManagerPrivate *priv = NM_PPP_MANAGER_GET_PRIVATE (self);
 	const char *ppp_binary;
 	NMCmdLine *cmd;
 
@@ -610,7 +723,7 @@
 		nm_cmd_line_add_string (cmd, "plugin");
 		nm_cmd_line_add_string (cmd, "rp-pppoe.so");
 
-		dev_str = g_strdup_printf ("nic-%s", device);
+		dev_str = g_strdup_printf ("nic-%s", priv->parent_iface);
 		nm_cmd_line_add_string (cmd, dev_str);
 		g_free (dev_str);
 
@@ -622,7 +735,7 @@
 		nm_cmd_line_add_string (cmd, "user");
 		nm_cmd_line_add_string (cmd, pppoe->username);
 	} else {
-		nm_cmd_line_add_string (cmd, device);
+		nm_cmd_line_add_string (cmd, priv->parent_iface);
 		/* Don't send some random address as the local address */
 		nm_cmd_line_add_string (cmd, "noipdefault");
 	}
@@ -680,6 +793,9 @@
 		nm_cmd_line_add_int (cmd, setting->lcp_echo_interval);
 	}
 
+	nm_cmd_line_add_string (cmd, "ipparam");
+	nm_cmd_line_add_string (cmd, priv->dbus_path);
+
 	nm_cmd_line_add_string (cmd, "plugin");
 	nm_cmd_line_add_string (cmd, NM_PPPD_PLUGIN);
 
@@ -726,10 +842,7 @@
 }
 
 gboolean
-nm_ppp_manager_start (NMPPPManager *manager,
-				  const char *device,
-				  NMActRequest *req,
-				  GError **err)
+nm_ppp_manager_start (NMPPPManager *manager, NMActRequest *req, GError **err)
 {
 	NMPPPManagerPrivate *priv;
 	NMConnection *connection;
@@ -737,10 +850,8 @@
 	NMSettingPPPOE *pppoe_setting;
 	NMCmdLine *ppp_cmd;
 	char *cmd_str;
-	GSource *ppp_watch;
 
 	g_return_val_if_fail (NM_IS_PPP_MANAGER (manager), FALSE);
-	g_return_val_if_fail (device != NULL, FALSE);
 	g_return_val_if_fail (NM_IS_ACT_REQUEST (req), FALSE);
 
 	connection = nm_act_request_get_connection (req);
@@ -751,7 +862,7 @@
 	if (pppoe_setting)
 		pppoe_fill_defaults (ppp_setting);
 
-	ppp_cmd = create_pppd_cmd_line (ppp_setting, pppoe_setting, device, err);
+	ppp_cmd = create_pppd_cmd_line (manager, ppp_setting, pppoe_setting, err);
 	if (!ppp_cmd)
 		return FALSE;
 
@@ -775,12 +886,7 @@
 
 	nm_debug ("ppp started with pid %d", priv->pid);
 
-	ppp_watch = g_child_watch_source_new (priv->pid);
-	g_source_set_callback (ppp_watch, (GSourceFunc) ppp_watch_cb, manager, NULL);
-	g_source_attach (ppp_watch, NULL);
-	priv->ppp_watch_id = g_source_get_id (ppp_watch);
-	g_source_unref (ppp_watch);
-
+	priv->ppp_watch_id = g_child_watch_add (priv->pid, (GChildWatchFunc) ppp_watch_cb, manager);
 	priv->ppp_timeout_handler = g_timeout_add (NM_PPP_WAIT_PPPD, pppd_timed_out, manager);
 	priv->act_req = g_object_ref (req);
 
@@ -826,10 +932,7 @@
 		   the plugin would need to link against libnm-util just to parse this.
 		   So instead, let's just send what it needs */
 
-		/* FIXME: Do we have to strdup the values here? */
-		dbus_g_method_return (priv->pending_secrets_context,
-		                      g_strdup (username),
-		                      g_strdup (password));
+		dbus_g_method_return (priv->pending_secrets_context, username, password);
 	}
 	priv->pending_secrets_context = NULL;
 }
@@ -842,6 +945,9 @@
 	if (kill (pid, 0) == 0)
 		kill (pid, SIGKILL);
 
+	/* ensure the child is reaped */
+	waitpid (pid, NULL, WNOHANG);
+
 	return FALSE;
 }
 
@@ -866,8 +972,6 @@
 		priv->monitor_fd = 0;
 	}
 
-	g_free (priv->iface);
-
 	if (priv->ppp_timeout_handler) {
 		g_source_remove (priv->ppp_timeout_handler);
 		priv->ppp_timeout_handler = 0;
@@ -881,8 +985,11 @@
 	if (priv->pid) {
 		if (kill (priv->pid, SIGTERM) == 0)
 			g_timeout_add (2000, ensure_killed, GINT_TO_POINTER (priv->pid));
-		else
+		else {
 			kill (priv->pid, SIGKILL);
+			/* ensure the child is reaped */
+			waitpid (priv->pid, NULL, WNOHANG);
+		}
 
 		priv->pid = 0;
 	}

Modified: branches/mbca/src/ppp-manager/nm-ppp-manager.h
==============================================================================
--- branches/mbca/src/ppp-manager/nm-ppp-manager.h	(original)
+++ branches/mbca/src/ppp-manager/nm-ppp-manager.h	Wed Aug  6 06:37:19 2008
@@ -19,6 +19,8 @@
 #define NM_IS_PPP_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), NM_TYPE_PPP_MANAGER))
 #define NM_PPP_MANAGER_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_PPP_MANAGER, NMPPPManagerClass))
 
+#define NM_PPP_MANAGER_PARENT_IFACE "parent-iface"
+
 typedef struct {
 	GObject parent;
 } NMPPPManager;
@@ -34,12 +36,9 @@
 
 GType nm_ppp_manager_get_type (void);
 
-NMPPPManager *nm_ppp_manager_new (void);
+NMPPPManager *nm_ppp_manager_new (const char *iface);
 
-gboolean nm_ppp_manager_start (NMPPPManager *manager,
-						 const char *device,
-						 NMActRequest *req,
-						 GError **err);
+gboolean nm_ppp_manager_start (NMPPPManager *manager, NMActRequest *req, GError **err);
 
 void     nm_ppp_manager_update_secrets (NMPPPManager *manager,
                                         const char *device,

Modified: branches/mbca/src/ppp-manager/nm-pppd-plugin.c
==============================================================================
--- branches/mbca/src/ppp-manager/nm-pppd-plugin.c	(original)
+++ branches/mbca/src/ppp-manager/nm-pppd-plugin.c	Wed Aug  6 06:37:19 2008
@@ -91,9 +91,8 @@
 
 	if (ppp_status != NM_PPP_STATUS_UNKNOWN) {
 		dbus_g_proxy_call_no_reply (proxy, "SetState",
-							   G_TYPE_UINT, ppp_status,
-							   G_TYPE_INVALID,
-							   G_TYPE_INVALID);
+		                            G_TYPE_UINT, ppp_status, G_TYPE_INVALID,
+		                            G_TYPE_INVALID);
 	}
 }
 
@@ -133,16 +132,18 @@
 static void
 nm_ip_up (void *data, int arg)
 {
-	ipcp_options opts = ipcp_gotoptions[ifunit];
-	ipcp_options peer_opts = ipcp_hisoptions[ifunit];
+	ipcp_options opts = ipcp_gotoptions[0];
+	ipcp_options peer_opts = ipcp_hisoptions[0];
 	GHashTable *hash;
 	GArray *array;
 	GValue *val;
+	guint32 pppd_made_up_address = htonl (0x0a404040 + ifunit);
 
 	g_return_if_fail (DBUS_IS_G_PROXY (proxy));
 
 	if (!opts.ouraddr) {
-		g_warning ("Didn't receive an internal IP from pppd");
+		g_warning ("Didn't receive an internal IP from pppd!");
+		nm_phasechange (NULL, PHASE_DEAD);
 		return;
 	}
 
@@ -155,12 +156,20 @@
 	g_hash_table_insert (hash, NM_PPP_IP4_CONFIG_ADDRESS, 
 					 uint_to_gvalue (opts.ouraddr));
 
-	if (opts.hisaddr) {
+	/* Prefer the peer options remote address first, _unless_ pppd made the
+	 * address up, at which point prefer the local options remote address,
+	 * and if that's not right, use the made-up address as a last resort.
+	 */
+	if (peer_opts.hisaddr && (peer_opts.hisaddr != pppd_made_up_address)) {
 		g_hash_table_insert (hash, NM_PPP_IP4_CONFIG_GATEWAY, 
-						 uint_to_gvalue (opts.hisaddr));
-	} else if (peer_opts.hisaddr) {
+		                     uint_to_gvalue (peer_opts.hisaddr));
+	} else if (opts.hisaddr) {
 		g_hash_table_insert (hash, NM_PPP_IP4_CONFIG_GATEWAY, 
-						 uint_to_gvalue (peer_opts.hisaddr));
+		                     uint_to_gvalue (opts.hisaddr));
+	} else if (peer_opts.hisaddr == pppd_made_up_address) {
+		/* As a last resort, use the made-up address */
+		g_hash_table_insert (hash, NM_PPP_IP4_CONFIG_GATEWAY, 
+		                     uint_to_gvalue (peer_opts.hisaddr));
 	}
 
 	g_hash_table_insert (hash, NM_PPP_IP4_CONFIG_PREFIX, uint_to_gvalue (32));
@@ -289,10 +298,13 @@
 		return -1;
 	}
 
+	/* NM passes in the object path of the corresponding PPPManager
+	 * object as the 'ipparam' argument to pppd.
+	 */
 	proxy = dbus_g_proxy_new_for_name (bus,
-								NM_DBUS_SERVICE_PPP,
-								NM_DBUS_PATH_PPP,
-								NM_DBUS_INTERFACE_PPP);
+	                                   NM_DBUS_SERVICE_PPP,
+	                                   ipparam,
+	                                   NM_DBUS_INTERFACE_PPP);
 
 	dbus_g_connection_unref (bus);
 

Modified: branches/mbca/src/ppp-manager/nm-pppd-plugin.h
==============================================================================
--- branches/mbca/src/ppp-manager/nm-pppd-plugin.h	(original)
+++ branches/mbca/src/ppp-manager/nm-pppd-plugin.h	Wed Aug  6 06:37:19 2008
@@ -1,5 +1,4 @@
 #define NM_DBUS_SERVICE_PPP    "org.freedesktop.NetworkManager.PPP"
-#define NM_DBUS_PATH_PPP    "/org/freedesktop/NetworkManager/PPP"
 #define NM_DBUS_INTERFACE_PPP  "org.freedesktop.NetworkManager.PPP"
 
 #define NM_PPP_IP4_CONFIG_INTERFACE "interface"

Modified: branches/mbca/src/vpn-manager/nm-vpn-connection.c
==============================================================================
--- branches/mbca/src/vpn-manager/nm-vpn-connection.c	(original)
+++ branches/mbca/src/vpn-manager/nm-vpn-connection.c	Wed Aug  6 06:37:19 2008
@@ -48,8 +48,6 @@
 #include "nm-dbus-glib-types.h"
 #include "NetworkManagerUtils.h"
 
-#define CONNECTION_GET_SECRETS_CALL_TAG "get-secrets-call"
-
 #include "nm-vpn-connection-glue.h"
 
 G_DEFINE_TYPE (NMVPNConnection, nm_vpn_connection, G_TYPE_OBJECT)
@@ -58,6 +56,8 @@
 	gboolean disposed;
 
 	NMConnection *connection;
+	DBusGProxyCall *secrets_call;
+
 	NMActRequest *act_request;
 	NMDevice *parent_dev;
 	char *ac_path;
@@ -672,27 +672,21 @@
 /******************************************************************************/
 
 static void
-clear_need_auth (NMVPNConnection *vpn_connection)
+cleanup_secrets_dbus_call (NMVPNConnection *self)
 {
-	NMVPNConnectionPrivate *priv;
+	NMVPNConnectionPrivate *priv = NM_VPN_CONNECTION_GET_PRIVATE (self);
 	DBusGProxy *proxy;
-	DBusGProxyCall *call;
-
-	g_return_if_fail (vpn_connection != NULL);
 
-	priv = NM_VPN_CONNECTION_GET_PRIVATE (vpn_connection);
-	g_assert (priv->connection);
+	g_return_if_fail (priv->connection != NULL);
+	g_return_if_fail (NM_IS_CONNECTION (priv->connection));
 
 	proxy = g_object_get_data (G_OBJECT (priv->connection), NM_MANAGER_CONNECTION_SECRETS_PROXY_TAG);
-	if (!proxy || !DBUS_IS_G_PROXY (proxy))
-		return;
+	g_assert (proxy);
 
-	call = g_object_get_data (G_OBJECT (vpn_connection), CONNECTION_GET_SECRETS_CALL_TAG);
-	if (!call)
-		return;
-
-	dbus_g_proxy_cancel_call (proxy, call);
-	g_object_set_data (G_OBJECT (vpn_connection), CONNECTION_GET_SECRETS_CALL_TAG, NULL);
+	if (priv->secrets_call) {
+		dbus_g_proxy_cancel_call (proxy, priv->secrets_call);
+		priv->secrets_call = NULL;
+	}
 }
 
 typedef struct GetSecretsInfo {
@@ -737,7 +731,7 @@
 
 	priv = NM_VPN_CONNECTION_GET_PRIVATE (info->vpn_connection);
 
-	g_object_set_data (G_OBJECT (info->vpn_connection), CONNECTION_GET_SECRETS_CALL_TAG, NULL);
+	priv->secrets_call = NULL;
 
 	if (!dbus_g_proxy_end_call (proxy, call, &err,
 								DBUS_TYPE_G_MAP_OF_MAP_OF_VARIANT, &settings,
@@ -770,7 +764,6 @@
 	NMVPNConnectionPrivate *priv;
 	DBusGProxy *secrets_proxy;
 	GetSecretsInfo *info = NULL;
-	DBusGProxyCall *call;
 	GPtrArray *hints;
 
 	g_return_val_if_fail (vpn_connection != NULL, FALSE);
@@ -780,48 +773,39 @@
 	priv = NM_VPN_CONNECTION_GET_PRIVATE (vpn_connection);
 	g_assert (priv->connection);
 
-	secrets_proxy = g_object_get_data (G_OBJECT (priv->connection),
-	                                   NM_MANAGER_CONNECTION_SECRETS_PROXY_TAG);
-	g_return_val_if_fail (secrets_proxy && DBUS_IS_G_PROXY (secrets_proxy), FALSE);
+	secrets_proxy = g_object_get_data (G_OBJECT (priv->connection), NM_MANAGER_CONNECTION_SECRETS_PROXY_TAG);
+	g_assert (secrets_proxy);
 
 	info = g_slice_new0 (GetSecretsInfo);
 	g_return_val_if_fail (info != NULL, FALSE);
 
 	info->setting_name = g_strdup (setting_name);
-	if (!info->setting_name) {
-		nm_warning ("Not enough memory to get secrets");
-		goto error;
-	}
-
 	info->vpn_connection = g_object_ref (vpn_connection);
 
 	/* Empty for now... */
 	hints = g_ptr_array_new ();
 
 	/* use ..._with_timeout to give the user time to enter secrets */
-	call = dbus_g_proxy_begin_call_with_timeout (secrets_proxy, "GetSecrets",
-	                                             get_secrets_cb,
-	                                             info,
-	                                             free_get_secrets_info,
-	                                             G_MAXINT32,
-	                                             G_TYPE_STRING, setting_name,
-	                                             DBUS_TYPE_G_ARRAY_OF_STRING, hints,
-	                                             G_TYPE_BOOLEAN, request_new,
-	                                             G_TYPE_INVALID);
+	priv->secrets_call = dbus_g_proxy_begin_call_with_timeout (secrets_proxy, "GetSecrets",
+	                                                           get_secrets_cb,
+	                                                           info,
+	                                                           free_get_secrets_info,
+	                                                           G_MAXINT32,
+	                                                           G_TYPE_STRING, setting_name,
+	                                                           DBUS_TYPE_G_ARRAY_OF_STRING, hints,
+	                                                           G_TYPE_BOOLEAN, request_new,
+	                                                           G_TYPE_INVALID);
 	g_ptr_array_free (hints, TRUE);
-	if (!call) {
+	if (!priv->secrets_call) {
 		nm_warning ("Could not call GetSecrets");
 		goto error;
 	}
-
-	g_object_set_data (G_OBJECT (vpn_connection),
-	                   CONNECTION_GET_SECRETS_CALL_TAG,
-	                   call);
 	return TRUE;
 
 error:
 	if (info)
 		free_get_secrets_info (info);
+	cleanup_secrets_dbus_call (vpn_connection);
 	return FALSE;
 }
 
@@ -833,9 +817,7 @@
 {
 	NMVPNConnection *vpn_connection = NM_VPN_CONNECTION (user_data);
 
-	g_object_set_data (G_OBJECT (vpn_connection),
-	                   CONNECTION_GET_SECRETS_CALL_TAG,
-	                   NULL);
+	cleanup_secrets_dbus_call (vpn_connection);
 
 	if (error) {
 		g_warning ("%s.%d: NeedSecrets failed: %s %s",
@@ -876,7 +858,7 @@
 {
 	NMVPNConnectionPrivate *priv = NM_VPN_CONNECTION_GET_PRIVATE (connection);
 
-	clear_need_auth (connection);
+	cleanup_secrets_dbus_call (connection);
 
 	switch (state) {
 	case NM_VPN_CONNECTION_STATE_NEED_AUTH:
@@ -962,6 +944,8 @@
 	}
 	priv->disposed = TRUE;
 
+	cleanup_secrets_dbus_call (NM_VPN_CONNECTION (object));
+
 	if (priv->parent_dev) {
 		if (priv->device_monitor)
 			g_signal_handler_disconnect (priv->parent_dev, priv->device_monitor);

Modified: branches/mbca/system-settings/plugins/ifcfg-fedora/common.h
==============================================================================
--- branches/mbca/system-settings/plugins/ifcfg-fedora/common.h	(original)
+++ branches/mbca/system-settings/plugins/ifcfg-fedora/common.h	Wed Aug  6 06:37:19 2008
@@ -28,6 +28,9 @@
 #define ORIG_TAG ".orig"
 #define REJ_TAG ".rej"
 
+#define IFCFG_PLUGIN_NAME "ifcfg-fedora"
+#define IFCFG_PLUGIN_INFO "(c) 2007 - 2008 Red Hat, Inc.  To report bugs please use the NetworkManager mailing list."
+
 #include <glib.h>
 
 GQuark ifcfg_plugin_error_quark (void);

Modified: branches/mbca/system-settings/plugins/ifcfg-fedora/plugin.c
==============================================================================
--- branches/mbca/system-settings/plugins/ifcfg-fedora/plugin.c	(original)
+++ branches/mbca/system-settings/plugins/ifcfg-fedora/plugin.c	Wed Aug  6 06:37:19 2008
@@ -45,9 +45,6 @@
 #include "nm-system-config-interface.h"
 #include "nm-ifcfg-connection.h"
 
-#define IFCFG_PLUGIN_NAME "ifcfg-fedora"
-#define IFCFG_PLUGIN_INFO "(c) 2007 - 2008 Red Hat, Inc.  To report bugs please use the NetworkManager mailing list."
-
 #define IFCFG_DIR SYSCONFDIR"/sysconfig/network-scripts/"
 
 static void system_config_interface_init (NMSystemConfigInterface *system_config_interface_class);

Modified: branches/mbca/system-settings/plugins/ifcfg-fedora/reader.c
==============================================================================
--- branches/mbca/system-settings/plugins/ifcfg-fedora/reader.c	(original)
+++ branches/mbca/system-settings/plugins/ifcfg-fedora/reader.c	Wed Aug  6 06:37:19 2008
@@ -51,6 +51,7 @@
 #include "shvar.h"
 
 #include "reader.h"
+#include "nm-system-config-interface.h"
 
 #define TYPE_ETHERNET "Ethernet"
 #define TYPE_WIRELESS "Wireless"
@@ -168,67 +169,70 @@
 
 	value = svGetValue (ifcfg, "BOOTPROTO");
 	if (value && (!g_ascii_strcasecmp (value, "bootp") || !g_ascii_strcasecmp (value, "dhcp")))
-		method = NM_SETTING_IP4_CONFIG_METHOD_DHCP;
+		method = NM_SETTING_IP4_CONFIG_METHOD_AUTO;
 
 	if (value && !g_ascii_strcasecmp (value, "autoip")) {
 		g_free (value);
 		s_ip4 = (NMSettingIP4Config *) nm_setting_ip4_config_new ();
-		s_ip4->method = g_strdup (NM_SETTING_IP4_CONFIG_METHOD_AUTOIP);
+		s_ip4->method = g_strdup (NM_SETTING_IP4_CONFIG_METHOD_LINK_LOCAL);
 		return NM_SETTING (s_ip4);
 	}
 
 	g_free (value);
 
-	get_one_ip4_addr (ifcfg, "IPADDR", &tmp.address, error);
-	if (*error)
-		goto error;
+	/* Handle manual settings */
+	if (!strcmp (method, NM_SETTING_IP4_CONFIG_METHOD_MANUAL)) {
+		get_one_ip4_addr (ifcfg, "IPADDR", &tmp.address, error);
+		if (*error)
+			goto error;
 
-	get_one_ip4_addr (ifcfg, "GATEWAY", &tmp.gateway, error);
-	if (*error)
-		goto error;
+		get_one_ip4_addr (ifcfg, "GATEWAY", &tmp.gateway, error);
+		if (*error)
+			goto error;
 
-	/* If no gateway in the ifcfg, try /etc/sysconfig/network instead */
-	if (!tmp.gateway) {
-		shvarFile *network;
-
-		network = svNewFile ("/etc/sysconfig/network");
-		if (network) {
-			get_one_ip4_addr (network, "GATEWAY", &tmp.gateway, error);
-			svCloseFile (network);
-			if (*error)
+		/* If no gateway in the ifcfg, try /etc/sysconfig/network instead */
+		if (!tmp.gateway) {
+			shvarFile *network;
+
+			network = svNewFile ("/etc/sysconfig/network");
+			if (network) {
+				get_one_ip4_addr (network, "GATEWAY", &tmp.gateway, error);
+				svCloseFile (network);
+				if (*error)
+					goto error;
+			}
+		}
+
+		value = svGetValue (ifcfg, "PREFIX");
+		if (value) {
+			long int prefix;
+
+			errno = 0;
+			prefix = strtol (value, NULL, 10);
+			if (errno || prefix <= 0 || prefix > 32) {
+				g_set_error (error, ifcfg_plugin_error_quark (), 0,
+				             "Invalid IP4 prefix '%s'", value);
+				g_free (value);
 				goto error;
+			}
+			tmp.prefix = (guint32) prefix;
+			g_free (value);
 		}
-	}
 
-	value = svGetValue (ifcfg, "PREFIX");
-	if (value) {
-		long int prefix;
+		/* Fall back to NETMASK if no PREFIX was specified */
+		if (!tmp.prefix) {
+			get_one_ip4_addr (ifcfg, "NETMASK", &netmask, error);
+			if (*error)
+				goto error;
+			tmp.prefix = nm_utils_ip4_netmask_to_prefix (netmask);
+		}
 
-		errno = 0;
-		prefix = strtol (value, NULL, 10);
-		if (errno || prefix <= 0 || prefix > 32) {
+		/* Validate the prefix */
+		if (!tmp.prefix || tmp.prefix > 32) {
 			g_set_error (error, ifcfg_plugin_error_quark (), 0,
-			             "Invalid IP4 prefix '%s'", value);
-			g_free (value);
+			             "Invalid IP4 prefix '%d'", tmp.prefix);
 			goto error;
 		}
-		tmp.prefix = (guint32) prefix;
-		g_free (value);
-	}
-
-	/* Fall back to NETMASK if no PREFIX was specified */
-	if (!tmp.prefix) {
-		get_one_ip4_addr (ifcfg, "NETMASK", &netmask, error);
-		if (*error)
-			goto error;
-		tmp.prefix = nm_utils_ip4_netmask_to_prefix (netmask);
-	}
-
-	/* Validate the prefix */
-	if (!tmp.prefix || tmp.prefix > 32) {
-		g_set_error (error, ifcfg_plugin_error_quark (), 0,
-		             "Invalid IP4 prefix '%d'", tmp.prefix);
-		goto error;
 	}
 
 	/* Yay, let's make an IP4 config */
@@ -237,7 +241,7 @@
 	s_ip4->ignore_dhcp_dns = !svTrueValue (ifcfg, "PEERDNS", 1);
 
 	/* DHCP hostname for 'send host-name' option */
-	if (!strcmp (method, NM_SETTING_IP4_CONFIG_METHOD_DHCP)) {
+	if (!strcmp (method, NM_SETTING_IP4_CONFIG_METHOD_AUTO)) {
 		value = svGetValue (ifcfg, "DHCP_HOSTNAME");
 		if (value && strlen (value))
 			s_ip4->dhcp_hostname = g_strdup (value);
@@ -601,6 +605,7 @@
 static NMSetting *
 make_wireless_setting (shvarFile *ifcfg,
                        NMSetting *security,
+                       gboolean unmanaged,
                        GError **error)
 {
 	NMSettingWireless *s_wireless;
@@ -608,6 +613,11 @@
 
 	s_wireless = NM_SETTING_WIRELESS (nm_setting_wireless_new ());
 
+	if (!read_mac_address (ifcfg, &s_wireless->mac_address, error)) {
+		g_object_unref (s_wireless);
+		return NULL;
+	}
+
 	value = svGetValue (ifcfg, "ESSID");
 	if (value) {
 		gsize len = strlen (value);
@@ -624,41 +634,41 @@
 		g_byte_array_append (s_wireless->ssid, (const guint8 *) value, len);
 		g_free (value);
 	} else {
-		g_set_error (error, ifcfg_plugin_error_quark (), 0, "Missing SSID");
-		goto error;
+		/* Only fail on lack of SSID if device is managed */
+		if (!unmanaged) {
+			g_set_error (error, ifcfg_plugin_error_quark (), 0, "Missing SSID");
+			goto error;
+		}
 	}
 
-	value = svGetValue (ifcfg, "MODE");
-	if (value) {
-		char *lcase;
+	if (!unmanaged) {
+		value = svGetValue (ifcfg, "MODE");
+		if (value) {
+			char *lcase;
 
-		lcase = g_ascii_strdown (value, -1);
-		g_free (value);
+			lcase = g_ascii_strdown (value, -1);
+			g_free (value);
 
-		if (!strcmp (lcase, "ad-hoc")) {
-			s_wireless->mode = g_strdup ("adhoc");
-		} else if (!strcmp (lcase, "managed")) {
-			s_wireless->mode = g_strdup ("infrastructure");
-		} else {
-			g_set_error (error, ifcfg_plugin_error_quark (), 0,
-			             "Invalid mode '%s' (not ad-hoc or managed)",
-			             lcase);
+			if (!strcmp (lcase, "ad-hoc")) {
+				s_wireless->mode = g_strdup ("adhoc");
+			} else if (!strcmp (lcase, "managed")) {
+				s_wireless->mode = g_strdup ("infrastructure");
+			} else {
+				g_set_error (error, ifcfg_plugin_error_quark (), 0,
+				             "Invalid mode '%s' (not ad-hoc or managed)",
+				             lcase);
+				g_free (lcase);
+				goto error;
+			}
 			g_free (lcase);
-			goto error;
 		}
-		g_free (lcase);
-	}
 
-	if (security)
-		s_wireless->security = g_strdup (NM_SETTING_WIRELESS_SECURITY_SETTING_NAME);
+		if (security)
+			s_wireless->security = g_strdup (NM_SETTING_WIRELESS_SECURITY_SETTING_NAME);
 
-	if (!read_mac_address (ifcfg, &s_wireless->mac_address, error)) {
-		g_object_unref (s_wireless);
-		s_wireless = NULL;
+		// FIXME: channel/freq, other L2 parameters like RTS
 	}
 
-	// FIXME: channel/freq, other L2 parameters like RTS
-
 	return NM_SETTING (s_wireless);
 
 error:
@@ -668,12 +678,15 @@
 }
 
 static NMConnection *
-wireless_connection_from_ifcfg (const char *file, shvarFile *ifcfg, GError **error)
+wireless_connection_from_ifcfg (const char *file,
+                                shvarFile *ifcfg,
+                                gboolean unmanaged,
+                                GError **error)
 {
 	NMConnection *connection = NULL;
 	NMSetting *con_setting = NULL;
 	NMSetting *wireless_setting = NULL;
-	NMSettingWireless *tmp;
+	NMSettingWireless *s_wireless;
 	NMSetting *security_setting = NULL;
 	char *printable_ssid = NULL;
 
@@ -691,49 +704,53 @@
 
 	/* Wireless security */
 	security_setting = make_wireless_security_setting (ifcfg, file, error);
-	if (*error)
-		goto error;
+	if (*error) {
+		g_object_unref (connection);
+		return NULL;
+	}
 	if (security_setting)
 		nm_connection_add_setting (connection, security_setting);
 
 	/* Wireless */
-	wireless_setting = make_wireless_setting (ifcfg, security_setting, error);
-	if (!wireless_setting)
-		goto error;
-
+	wireless_setting = make_wireless_setting (ifcfg, security_setting, unmanaged, error);
+	if (!wireless_setting) {
+		g_object_unref (connection);
+		return NULL;
+	}
 	nm_connection_add_setting (connection, wireless_setting);
 
-	tmp = NM_SETTING_WIRELESS (wireless_setting);
-	printable_ssid = nm_utils_ssid_to_utf8 ((const char *) tmp->ssid->data,
-	                                        (guint32) tmp->ssid->len);
+	s_wireless = (NMSettingWireless *) wireless_setting;
+	if (s_wireless && s_wireless->ssid) {
+		printable_ssid = nm_utils_ssid_to_utf8 ((const char *) s_wireless->ssid->data,
+		                                        (guint32) s_wireless->ssid->len);
+	} else
+		printable_ssid = g_strdup_printf ("unmanaged");
 
 	con_setting = make_connection_setting (file, ifcfg,
 	                                       NM_SETTING_WIRELESS_SETTING_NAME,
 	                                       printable_ssid);
+	g_free (printable_ssid);
 	if (!con_setting) {
 		g_set_error (error, ifcfg_plugin_error_quark (), 0,
 		             "Failed to create connection setting.");
-		goto error;
+		g_object_unref (connection);
+		return NULL;
 	}
 	nm_connection_add_setting (connection, con_setting);
 
-	if (!nm_connection_verify (connection, error))
-		goto error;
+	/* Don't verify if unmanaged since we may not have an SSID or whatever */
+	if (!unmanaged) {
+		if (!nm_connection_verify (connection, error)) {
+			g_object_unref (connection);
+			return NULL;
+		}
+	}
 
 	return connection;
-
-error:
-	g_free (printable_ssid);
-	g_object_unref (connection);
-	if (con_setting)
-		g_object_unref (con_setting);
-	if (wireless_setting)
-		g_object_unref (wireless_setting);
-	return NULL;
 }
 
 static NMSetting *
-make_wired_setting (shvarFile *ifcfg, GError **error)
+make_wired_setting (shvarFile *ifcfg, gboolean unmanaged, GError **error)
 {
 	NMSettingWired *s_wired;
 	char *value;
@@ -747,10 +764,8 @@
 			if (mtu >= 0 && mtu < 65536)
 				s_wired->mtu = mtu;
 		} else {
-			g_set_error (error, ifcfg_plugin_error_quark (), 0,
-			             "Invalid MTU '%s'", value);
-			g_object_unref (s_wired);
-			s_wired = NULL;
+			/* Shouldn't be fatal... */
+			PLUGIN_PRINT (IFCFG_PLUGIN_NAME, "    warning: invalid MTU '%s'", value);
 		}
 		g_free (value);
 	}
@@ -764,7 +779,10 @@
 }
 
 static NMConnection *
-wired_connection_from_ifcfg (const char *file, shvarFile *ifcfg, GError **error)
+wired_connection_from_ifcfg (const char *file,
+                             shvarFile *ifcfg,
+                             gboolean unmanaged,
+                             GError **error)
 {
 	NMConnection *connection = NULL;
 	NMSetting *con_setting = NULL;
@@ -784,28 +802,24 @@
 	if (!con_setting) {
 		g_set_error (error, ifcfg_plugin_error_quark (), 0,
 		             "Failed to create connection setting.");
-		goto error;
+		g_object_unref (connection);
+		return NULL;
 	}
 	nm_connection_add_setting (connection, con_setting);
 
-	wired_setting = make_wired_setting (ifcfg, error);
-	if (!wired_setting)
-		goto error;
-
+	wired_setting = make_wired_setting (ifcfg, unmanaged, error);
+	if (!wired_setting) {
+		g_object_unref (connection);
+		return NULL;
+	}
 	nm_connection_add_setting (connection, wired_setting);
 
-	if (!nm_connection_verify (connection, error))
-		goto error;
+	if (!nm_connection_verify (connection, error)) {
+		g_object_unref (connection);
+		return NULL;
+	}
 
 	return connection;
-
-error:
-	g_object_unref (connection);
-	if (con_setting)
-		g_object_unref (con_setting);
-	if (wired_setting)
-		g_object_unref (wired_setting);
-	return NULL;
 }
 
 static gboolean
@@ -930,9 +944,9 @@
 	}
 
 	if (!strcmp (type, TYPE_ETHERNET))
-		connection = wired_connection_from_ifcfg (filename, parsed, error);
+		connection = wired_connection_from_ifcfg (filename, parsed, *ignored, error);
 	else if (!strcmp (type, TYPE_WIRELESS))
-		connection = wireless_connection_from_ifcfg (filename, parsed, error);
+		connection = wireless_connection_from_ifcfg (filename, parsed, *ignored, error);
 	else {
 		g_set_error (error, ifcfg_plugin_error_quark (), 0,
 		             "Unknown connection type '%s'", type);
@@ -940,7 +954,8 @@
 
 	g_free (type);
 
-	if (!connection)
+	/* Don't bother reading the connection fully if it's unmanaged */
+	if (!connection || *ignored)
 		goto done;
 
 	s_ip4 = make_ip4_setting (parsed, error);

Modified: branches/mbca/system-settings/plugins/ifcfg-suse/parser.c
==============================================================================
--- branches/mbca/system-settings/plugins/ifcfg-suse/parser.c	(original)
+++ branches/mbca/system-settings/plugins/ifcfg-suse/parser.c	Wed Aug  6 06:37:19 2008
@@ -108,11 +108,11 @@
 	str = svGetValue (ifcfg, "BOOTPROTO");
 	if (str) {
 		if (!g_ascii_strcasecmp (str, "bootp") || !g_ascii_strcasecmp (str, "dhcp"))
-			s_ip4->method = g_strdup (NM_SETTING_IP4_CONFIG_METHOD_DHCP);
+			s_ip4->method = g_strdup (NM_SETTING_IP4_CONFIG_METHOD_AUTO);
 		else if (!g_ascii_strcasecmp (str, "static"))
 			s_ip4->method = g_strdup (NM_SETTING_IP4_CONFIG_METHOD_MANUAL);
 		else if (!g_ascii_strcasecmp (str, "autoip"))
-			s_ip4->method = g_strdup (NM_SETTING_IP4_CONFIG_METHOD_AUTOIP);
+			s_ip4->method = g_strdup (NM_SETTING_IP4_CONFIG_METHOD_LINK_LOCAL);
 
 		g_free (str);
 	}

Modified: branches/mbca/vpn-daemons/openvpn/Makefile.am
==============================================================================
--- branches/mbca/vpn-daemons/openvpn/Makefile.am	(original)
+++ branches/mbca/vpn-daemons/openvpn/Makefile.am	Wed Aug  6 06:37:19 2008
@@ -22,10 +22,8 @@
 icon_DATA = gnome-mime-application-x-openvpn-settings.png
 endif
 
-nm-openvpn-service.name: $(srcdir)/nm-openvpn-service.name.in Makefile
-	sed	-e 's|[ ]BINDIR[@]|$(bindir)|g' \
-		< $(srcdir)/nm-openvpn-service.name.in \
-		> nm-openvpn-service.name
+nm-openvpn-service.name: $(srcdir)/nm-openvpn-service.name.in
+	sed -e 's|[ ]LIBEXECDIR[@]|$(libexecdir)|g' $< >$@
 
 EXTRA_DIST = nm-openvpn-service.name.in \
              $(dbusservice_DATA)  \

Modified: branches/mbca/vpn-daemons/openvpn/nm-openvpn-service.name.in
==============================================================================
--- branches/mbca/vpn-daemons/openvpn/nm-openvpn-service.name.in	(original)
+++ branches/mbca/vpn-daemons/openvpn/nm-openvpn-service.name.in	Wed Aug  6 06:37:19 2008
@@ -1,7 +1,7 @@
 [VPN Connection]
 name=openvpn
 service=org.freedesktop.NetworkManager.openvpn
-program= BINDIR@/nm-openvpn-service
+program= LIBEXECDIR@/nm-openvpn-service
 
 [GNOME]
 auth-dialog=nm-openvpn-auth-dialog

Modified: branches/mbca/vpn-daemons/openvpn/properties/Makefile.am
==============================================================================
--- branches/mbca/vpn-daemons/openvpn/properties/Makefile.am	(original)
+++ branches/mbca/vpn-daemons/openvpn/properties/Makefile.am	Wed Aug  6 06:37:19 2008
@@ -1,6 +1,5 @@
-
-
-lib_LTLIBRARIES = libnm-openvpn-properties.la
+plugindir = $(libdir)/NetworkManager
+plugin_LTLIBRARIES = libnm-openvpn-properties.la
 
 libnm_openvpn_properties_la_SOURCES = \
 	nm-openvpn.c \

Modified: branches/mbca/vpn-daemons/openvpn/properties/auth-helpers.c
==============================================================================
--- branches/mbca/vpn-daemons/openvpn/properties/auth-helpers.c	(original)
+++ branches/mbca/vpn-daemons/openvpn/properties/auth-helpers.c	Wed Aug  6 06:37:19 2008
@@ -681,18 +681,26 @@
 	GtkListStore *store;
 	GtkTreeIter iter;
 	const char *openvpn_binary = NULL;
-	gchar *cmdline, *tmp, *token;
+	gchar *tmp, **items, **item;
 	gboolean user_added = FALSE;
+	char *argv[3];
+	GError *error = NULL;
+	gboolean success, found_blank = FALSE;
 
 	openvpn_binary = nm_find_openvpn ();
 	if (!openvpn_binary)
 		return;
 
-	cmdline = g_strdup_printf("/bin/sh -c \"%s --show-ciphers | /bin/awk '/^[A-Z][A-Z0-9]+-/ { print $1 }'\"", openvpn_binary);
-	if (!g_spawn_command_line_sync(cmdline, &tmp, NULL, NULL, NULL))
-		goto end;
-
-	token = strtok(tmp, "\n");
+	argv[0] = (char *) openvpn_binary;
+	argv[1] = "--show-ciphers";
+	argv[2] = NULL;
+
+	success = g_spawn_sync ("/", argv, NULL, 0, NULL, NULL, &tmp, NULL, NULL, &error);
+	if (!success) {
+		g_warning ("%s: couldn't determine ciphers: %s", __func__, error->message);
+		g_error_free (error);
+		return;
+	}
 
 	store = gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_INT);
 	gtk_combo_box_set_model (box, GTK_TREE_MODEL (store));
@@ -703,18 +711,32 @@
 	                    TLS_CIPHER_COL_NAME, _("Default"),
 	                    TLS_CIPHER_COL_DEFAULT, TRUE, -1);
 
-	while (token) {
-		if (strlen (token)) {
+	items = g_strsplit (tmp, "\n", 0);
+	g_free (tmp);
+
+	for (item = items; *item; item++) {
+		char *space = strchr (*item, ' ');
+
+		/* Don't add anything until after the first blank line */
+		if (!found_blank) {
+			if (!strlen (*item))
+				found_blank = TRUE;
+			continue;
+		}
+
+		if (space)
+			*space = '\0';
+
+		if (strlen (*item)) {
 			gtk_list_store_append (store, &iter);
 			gtk_list_store_set (store, &iter,
-			                    TLS_CIPHER_COL_NAME, token,
+			                    TLS_CIPHER_COL_NAME, *item,
 			                    TLS_CIPHER_COL_DEFAULT, FALSE, -1);
-			if (user_cipher && !strcmp (token, user_cipher)) {
+			if (user_cipher && !strcmp (*item, user_cipher)) {
 				gtk_combo_box_set_active_iter (box, &iter);
 				user_added = TRUE;
 			}
 		}
-		token = strtok (NULL, "\n");
 	}
 
 	/* Add the user-specified cipher if it exists wasn't found by openvpn */
@@ -731,7 +753,7 @@
 	g_object_unref (G_OBJECT (store));
 
  end:
-	g_free(tmp);
+	g_strfreev (items);
 }
 
 static void

Modified: branches/mbca/vpn-daemons/openvpn/src/Makefile.am
==============================================================================
--- branches/mbca/vpn-daemons/openvpn/src/Makefile.am	(original)
+++ branches/mbca/vpn-daemons/openvpn/src/Makefile.am	Wed Aug  6 06:37:19 2008
@@ -1,7 +1,6 @@
 AM_CPPFLAGS =							\
 	$(DBUS_CFLAGS)						\
 	$(NETWORK_MANAGER_CFLAGS)				\
-	-Wall							\
 	-DDBUS_API_SUBJECT_TO_CHANGE				\
 	-DG_DISABLE_DEPRECATED					\
 	-DBINDIR=\"$(bindir)\"					\
@@ -13,7 +12,7 @@
 	-DLOCALSTATEDIR=\""$(localstatedir)"\"		 	\
 	-DDATADIR=\"$(datadir)\"
 
-bin_PROGRAMS = nm-openvpn-service nm-openvpn-service-openvpn-helper
+libexec_PROGRAMS = nm-openvpn-service nm-openvpn-service-openvpn-helper
 
 nm_openvpn_service_SOURCES =				\
 				nm-openvpn-service.c	\

Modified: branches/mbca/vpn-daemons/openvpn/src/nm-openvpn-service.c
==============================================================================
--- branches/mbca/vpn-daemons/openvpn/src/nm-openvpn-service.c	(original)
+++ branches/mbca/vpn-daemons/openvpn/src/nm-openvpn-service.c	Wed Aug  6 06:37:19 2008
@@ -53,7 +53,7 @@
 #include "nm-openvpn-service.h"
 #include "nm-utils.h"
 
-#define NM_OPENVPN_HELPER_PATH		BINDIR"/nm-openvpn-service-openvpn-helper"
+#define NM_OPENVPN_HELPER_PATH		LIBEXECDIR"/nm-openvpn-service-openvpn-helper"
 
 G_DEFINE_TYPE (NMOpenvpnPlugin, nm_openvpn_plugin, NM_TYPE_VPN_PLUGIN)
 

Modified: branches/mbca/vpn-daemons/pptp/Makefile.am
==============================================================================
--- branches/mbca/vpn-daemons/pptp/Makefile.am	(original)
+++ branches/mbca/vpn-daemons/pptp/Makefile.am	Wed Aug  6 06:37:19 2008
@@ -22,10 +22,8 @@
 icon_DATA = gnome-mime-application-x-pptp-settings.png
 endif
 
-nm-pptp-service.name: $(srcdir)/nm-pptp-service.name.in Makefile
-	sed	-e 's|[ ]BINDIR[@]|$(bindir)|g' \
-		< $(srcdir)/nm-pptp-service.name.in \
-		> nm-pptp-service.name
+nm-pptp-service.name: $(srcdir)/nm-pptp-service.name.in
+	sed -e 's|[ ]LIBEXECDIR[@]|$(libexecdir)|g' $< >$@
 
 EXTRA_DIST = nm-pptp-service.name.in \
              $(dbusservice_DATA)  \

Modified: branches/mbca/vpn-daemons/pptp/nm-pptp-service.name.in
==============================================================================
--- branches/mbca/vpn-daemons/pptp/nm-pptp-service.name.in	(original)
+++ branches/mbca/vpn-daemons/pptp/nm-pptp-service.name.in	Wed Aug  6 06:37:19 2008
@@ -1,7 +1,7 @@
 [VPN Connection]
 name=pptp
 service=org.freedesktop.NetworkManager.pptp
-program= BINDIR@/nm-pptp-service
+program= LIBEXECDIR@/nm-pptp-service
 
 [GNOME]
 auth-dialog=nm-pptp-auth-dialog

Modified: branches/mbca/vpn-daemons/pptp/nm-pptp.desktop.in
==============================================================================
--- branches/mbca/vpn-daemons/pptp/nm-pptp.desktop.in	(original)
+++ branches/mbca/vpn-daemons/pptp/nm-pptp.desktop.in	Wed Aug  6 06:37:19 2008
@@ -10,3 +10,4 @@
 DocPath=
 Categories=GNOME;Application;Network;
 MimeType=application/x-ppp-settings
+NoDisplay=true

Modified: branches/mbca/vpn-daemons/pptp/properties/Makefile.am
==============================================================================
--- branches/mbca/vpn-daemons/pptp/properties/Makefile.am	(original)
+++ branches/mbca/vpn-daemons/pptp/properties/Makefile.am	Wed Aug  6 06:37:19 2008
@@ -1,4 +1,5 @@
-lib_LTLIBRARIES = libnm-pptp-properties.la
+plugindir = $(libdir)/NetworkManager
+plugin_LTLIBRARIES = libnm-pptp-properties.la
 
 libnm_pptp_properties_la_SOURCES = \
 	nm-pptp.c \

Modified: branches/mbca/vpn-daemons/pptp/src/Makefile.am
==============================================================================
--- branches/mbca/vpn-daemons/pptp/src/Makefile.am	(original)
+++ branches/mbca/vpn-daemons/pptp/src/Makefile.am	Wed Aug  6 06:37:19 2008
@@ -4,7 +4,6 @@
 	$(DBUS_GLIB_CFLAGS)						\
 	$(GTHREAD_CFLAGS)					\
 	$(NM_UTILS_CFLAGS)				\
-	-Wall							\
 	-DDBUS_API_SUBJECT_TO_CHANGE				\
 	-DG_DISABLE_DEPRECATED					\
 	-DBINDIR=\"$(bindir)\"					\
@@ -15,10 +14,9 @@
 	-DLIBEXECDIR=\""$(libexecdir)"\"			\
 	-DLOCALSTATEDIR=\""$(localstatedir)"\"		 	\
 	-DDATADIR=\"$(datadir)\"				\
-	-DPLUGINDIR=\"$(PPPD_PLUGIN_DIR)\" \
-	-fPIC
+	-DPLUGINDIR=\"$(PPPD_PLUGIN_DIR)\" 
 
-bin_PROGRAMS = nm-pptp-service
+libexec_PROGRAMS = nm-pptp-service
 
 nm_pptp_service_SOURCES = \
 				nm-pptp-service.c \

Modified: branches/mbca/vpn-daemons/vpnc/Makefile.am
==============================================================================
--- branches/mbca/vpn-daemons/vpnc/Makefile.am	(original)
+++ branches/mbca/vpn-daemons/vpnc/Makefile.am	Wed Aug  6 06:37:19 2008
@@ -22,10 +22,8 @@
 icon_DATA = gnome-mime-application-x-cisco-vpn-settings.png
 endif
 
-nm-vpnc-service.name: $(srcdir)/nm-vpnc-service.name.in Makefile
-	sed	-e 's|[ ]BINDIR[@]|$(bindir)|g' \
-		< $(srcdir)/nm-vpnc-service.name.in \
-		> nm-vpnc-service.name
+nm-vpnc-service.name: $(srcdir)/nm-vpnc-service.name.in
+	sed -e 's|[ ]LIBEXECDIR[@]|$(libexecdir)|g' $< >$@
 
 EXTRA_DIST = nm-vpnc-service.name.in \
              $(dbusservice_DATA)  \

Modified: branches/mbca/vpn-daemons/vpnc/nm-vpnc-service.name.in
==============================================================================
--- branches/mbca/vpn-daemons/vpnc/nm-vpnc-service.name.in	(original)
+++ branches/mbca/vpn-daemons/vpnc/nm-vpnc-service.name.in	Wed Aug  6 06:37:19 2008
@@ -1,7 +1,7 @@
 [VPN Connection]
 name=vpnc
 service=org.freedesktop.NetworkManager.vpnc
-program= BINDIR@/nm-vpnc-service
+program= LIBEXECDIR@/nm-vpnc-service
 
 [GNOME]
 auth-dialog=nm-vpnc-auth-dialog

Modified: branches/mbca/vpn-daemons/vpnc/properties/Makefile.am
==============================================================================
--- branches/mbca/vpn-daemons/vpnc/properties/Makefile.am	(original)
+++ branches/mbca/vpn-daemons/vpnc/properties/Makefile.am	Wed Aug  6 06:37:19 2008
@@ -1,6 +1,5 @@
-
-
-lib_LTLIBRARIES = libnm-vpnc-properties.la
+plugindir = $(libdir)/NetworkManager
+plugin_LTLIBRARIES = libnm-vpnc-properties.la
 
 libnm_vpnc_properties_la_SOURCES = \
 	pcf-file.c \

Modified: branches/mbca/vpn-daemons/vpnc/src/Makefile.am
==============================================================================
--- branches/mbca/vpn-daemons/vpnc/src/Makefile.am	(original)
+++ branches/mbca/vpn-daemons/vpnc/src/Makefile.am	Wed Aug  6 06:37:19 2008
@@ -4,7 +4,6 @@
 	$(DBUS_CFLAGS) \
 	$(GTHREAD_CFLAGS) \
 	$(NM_UTILS_CFLAGS) \
-	-Wall \
 	-DDBUS_API_SUBJECT_TO_CHANGE \
 	-DG_DISABLE_DEPRECATED \
 	-DBINDIR=\"$(bindir)\" \
@@ -16,7 +15,7 @@
 	-DLOCALSTATEDIR=\""$(localstatedir)"\" \
 	-DDATADIR=\"$(datadir)\"
 
-bin_PROGRAMS = nm-vpnc-service nm-vpnc-service-vpnc-helper
+libexec_PROGRAMS = nm-vpnc-service nm-vpnc-service-vpnc-helper
 
 nm_vpnc_service_SOURCES = \
 				nm-vpnc-service.c \

Modified: branches/mbca/vpn-daemons/vpnc/src/nm-vpnc-service.c
==============================================================================
--- branches/mbca/vpn-daemons/vpnc/src/nm-vpnc-service.c	(original)
+++ branches/mbca/vpn-daemons/vpnc/src/nm-vpnc-service.c	Wed Aug  6 06:37:19 2008
@@ -30,7 +30,7 @@
 	NULL
 };
 
-#define NM_VPNC_HELPER_PATH		BINDIR"/nm-vpnc-service-vpnc-helper"
+#define NM_VPNC_HELPER_PATH		LIBEXECDIR"/nm-vpnc-service-vpnc-helper"
 #define NM_VPNC_UDP_ENCAPSULATION_PORT	0 /* random port */
 
 typedef struct {
@@ -38,6 +38,8 @@
 	GType type;
 } ValidProperty;
 
+#define LEGACY_NAT_KEEPALIVE "NAT-Keepalive packet interval"
+
 static ValidProperty valid_properties[] = {
 	{ NM_VPNC_KEY_GATEWAY,               G_TYPE_STRING },
 	{ NM_VPNC_KEY_ID,                    G_TYPE_STRING },
@@ -53,6 +55,8 @@
 	{ NM_VPNC_KEY_DPD_IDLE_TIMEOUT,      G_TYPE_INT },
 	{ NM_VPNC_KEY_NAT_TRAVERSAL_MODE,    G_TYPE_STRING },
 	{ NM_VPNC_KEY_CISCO_UDP_ENCAPS_PORT, G_TYPE_INT },
+	/* Legacy options that are ignored */
+	{ LEGACY_NAT_KEEPALIVE,              G_TYPE_STRING },
 	{ NULL,                              G_TYPE_NONE }
 };
 



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