[Pkg-utopia-commits] r815 - in packages/unstable/networkmanager/debian: . patches

Michael Biebl mbiebl-guest at costa.debian.org
Fri May 5 21:40:49 UTC 2006


Author: mbiebl-guest
Date: 2006-05-05 21:40:48 +0000 (Fri, 05 May 2006)
New Revision: 815

Added:
   packages/unstable/networkmanager/debian/patches/08-disabled_devices.patch
   packages/unstable/networkmanager/debian/patches/09-nm_bad_mutex_free.patch
Modified:
   packages/unstable/networkmanager/debian/README.Debian
   packages/unstable/networkmanager/debian/changelog
Log:
Lots of integration work. NM behaves like a good citizen now and is ready for "testing".


Modified: packages/unstable/networkmanager/debian/README.Debian
===================================================================
--- packages/unstable/networkmanager/debian/README.Debian	2006-05-05 17:58:20 UTC (rev 814)
+++ packages/unstable/networkmanager/debian/README.Debian	2006-05-05 21:40:48 UTC (rev 815)
@@ -1,8 +1,44 @@
-NetworkManger consists of two parts: one is on the system level daemon that
+NetworkManager consists of two parts: one is on the system level daemon that
 manages the connections and gathers information about new networks. The other 
 is an applet that users can use to interact with the NetworkManager daemon. 
 
+Security
+~~~~~~~~
 To allow users to connect to the NetworkManager daemon they have to be in the
 group "netdev". If you want to add a user to group "netdev" use the command
 "adduser username netdev" or one of the graphical user management frontends.
 After that you have to reload dbus with the command "/etc/init.d/dbus reload".
+
+Configuration
+~~~~~~~~~~~~~
+Only devices that are not listed in /etc/network/interfaces or which have been
+configured "auto" and "dhcp" (with no other options) are managed by NM.
+
+Examples:
+
+1.)
+auto wlan0
+iface wlan0 inet dhcp
+-> This device is managed by NM.
+
+2.)
+auto wlan0
+iface wlan0 inet dhcp
+	wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
+-> This devices is *not* managed by NM because it has additional options.
+
+3.)
+iface wlan0 inet dhcp
+-> This device is *not* managed by NM because it is not set to "auto".
+
+4.)
+iface eth0 inet static
+address 192.168.1.10
+netmask 255.255.255.0
+gateway 192.168.1.1
+-> This device is *not* managed by NM because it is configured as "static" and
+   has additional options.
+
+5.)
+Device is not listed in /etc/network/interfaces.
+-> Device is managed by NM.

Modified: packages/unstable/networkmanager/debian/changelog
===================================================================
--- packages/unstable/networkmanager/debian/changelog	2006-05-05 17:58:20 UTC (rev 814)
+++ packages/unstable/networkmanager/debian/changelog	2006-05-05 21:40:48 UTC (rev 815)
@@ -1,12 +1,20 @@
 network-manager (0.6.2-2) unstable; urgency=low
 
-  * More integration work.
-    Added network-manager-dispatcher.script and 06-dispatch_more_events.patch.
-    This way the scripts in /etc/networks/if-*.d/ are called properly by
-    NetworkManagerDispatcher.
-    Thanks to the Ubuntu devs for this work!
-  * Added 07-libnm_glib_reconnect_dbus.patch which makes libnm_glib sleep between
-    unsuccessful connection attempts to dbus. (Closes: #366010)
+  * More integration work. (Closes: #355244)
+    - Added network-manager-dispatcher.script and
+      06-dispatch_more_events.patch.
+      This way the scripts in /etc/networks/if-*.d/ are called properly by
+      NetworkManagerDispatcher.
+      Thanks to the Ubuntu devs for this work!
+    - Added 08-disabled_devices.patch. Network interfaces listed in
+      /etc/network/interfaces which are not configured "auto" and "dhcp" are
+      not handled by NM. This makes it possible to configure interfaces 
+      statically and have NM not messing with them. 
+      Updated README.Debian to reflect these changes.
+    - Added 09-nm_bad_mutex_free.patch. Otherwise NM crashes if devices are
+      listed in /etc/network/interfaces. 
+  * Added 07-libnm_glib_reconnect_dbus.patch which makes libnm_glib sleep 
+    between unsuccessful connection attempts to dbus. (Closes: #366010)
   * Bumped Standards-Version to 3.7.2, no further changes required.
 
  -- Michael Biebl <biebl at teco.edu>  Fri,  5 May 2006 18:01:47 +0200

Added: packages/unstable/networkmanager/debian/patches/08-disabled_devices.patch
===================================================================
--- packages/unstable/networkmanager/debian/patches/08-disabled_devices.patch	2006-05-05 17:58:20 UTC (rev 814)
+++ packages/unstable/networkmanager/debian/patches/08-disabled_devices.patch	2006-05-05 21:40:48 UTC (rev 815)
@@ -0,0 +1,52 @@
+--- src/backends/NetworkManagerDebian.c.orig	2006-05-05 19:59:18.000000000 +0200
++++ src/backends/NetworkManagerDebian.c	2006-05-05 20:04:34.000000000 +0200
+@@ -521,7 +521,48 @@
+  */
+ gboolean nm_system_device_get_disabled (NMDevice *dev)
+ {
+-	return FALSE;
++	const char      *iface;
++	if_block	*curr_device, *curr_b;
++	if_data		*curr_d;
++	gboolean	 blacklist = TRUE;
++
++	g_return_val_if_fail (dev != NULL, TRUE);
++
++	iface = nm_device_get_iface (dev);
++
++	ifparser_init ();
++
++	/* If the interface isn't listed in /etc/network/interfaces then
++	 * it's considered okay to control it.
++ 	 */
++	curr_device = ifparser_getif (iface);
++	if (curr_device == NULL) {
++		blacklist = FALSE;
++		goto out;
++	}
++
++	/* If the interface is listed and isn't marked "auto" then it's
++	 * definitely not okay to control it.
++	 */
++	for (curr_b = ifparser_getfirst(); curr_b; curr_b = curr_b->next) {
++		if (!strcmp (curr_b->type, "auto")
++		    && !strcmp (curr_b->name, iface))
++			blacklist = FALSE;
++	}
++
++	/* If the interface has no options other than just "inet dhcp"
++	 * it's probably ok to fiddle with it.
++	 */
++	for (curr_d = curr_device->info; curr_d; curr_d = curr_d->next) {
++		if (strcmp (curr_d->key, "inet")
++		    || strcmp (curr_d->data, "dhcp"))
++			blacklist = TRUE;
++	}
++
++out:
++	ifparser_destroy ();
++
++	return blacklist;
+ }
+ 
+ 

Added: packages/unstable/networkmanager/debian/patches/09-nm_bad_mutex_free.patch
===================================================================
--- packages/unstable/networkmanager/debian/patches/09-nm_bad_mutex_free.patch	2006-05-05 17:58:20 UTC (rev 814)
+++ packages/unstable/networkmanager/debian/patches/09-nm_bad_mutex_free.patch	2006-05-05 21:40:48 UTC (rev 815)
@@ -0,0 +1,69 @@
+--- network-manager-0.6.2.orig/src/nm-device-802-11-wireless.c	2006-05-05 02:13:37.000000000 -0500
++++ network-manager-0.6.2/src/nm-device-802-11-wireless.c	2006-05-05 02:20:23.000000000 -0500
+@@ -60,7 +60,7 @@
+ 
+ struct _NMDevice80211WirelessPrivate
+ {
+-	gboolean	dispose_has_run;
++	gboolean	is_initialized;
+ 
+ 	struct ether_addr	hw_addr;
+ 
+@@ -242,7 +242,7 @@
+ nm_device_802_11_wireless_init (NMDevice80211Wireless * self)
+ {
+ 	self->priv = NM_DEVICE_802_11_WIRELESS_GET_PRIVATE (self);
+-	self->priv->dispose_has_run = FALSE;
++	self->priv->is_initialized = FALSE;
+ 
+ 	memset (&(self->priv->hw_addr), 0, sizeof (struct ether_addr));
+ 	self->priv->supplicant.pid = -1;
+@@ -256,6 +256,7 @@
+ 	guint32				caps;
+ 	NMSock *				sk;
+ 
++	self->priv->is_initialized = TRUE;
+ 	self->priv->scan_mutex = g_mutex_new ();
+ 	nm_register_mutex_desc (self->priv->scan_mutex, "Scan Mutex");
+ 
+@@ -2988,24 +2989,22 @@
+ 	NMDevice80211WirelessClass *	klass = NM_DEVICE_802_11_WIRELESS_GET_CLASS (object);
+ 	NMDeviceClass *			parent_class;
+ 
+-	if (self->priv->dispose_has_run)
+-		/* If dispose did already run, return. */
+-		return;
+-
+-	/* Make sure dispose does not run twice. */
+-	self->priv->dispose_has_run = TRUE;
+-
+-	/* 
+-	 * In dispose, you are supposed to free all types referenced from this
+-	 * object which might themselves hold a reference to self. Generally,
+-	 * the most simple solution is to unref all members on which you own a 
+-	 * reference.
+-	 */
+-
+-	nm_device_802_11_wireless_ap_list_clear (self);
+-	if (self->priv->ap_list)
+-		nm_ap_list_unref (self->priv->ap_list);
+-	g_mutex_free (self->priv->scan_mutex);
++	/* Only do this part of the cleanup if the object is initialized */
++	if (self->priv->is_initialized) {
++		self->priv->is_initialized = FALSE;
++
++		/* 
++		* In dispose, you are supposed to free all types referenced from this
++		* object which might themselves hold a reference to self. Generally,
++		* the most simple solution is to unref all members on which you own a 
++		* reference.
++		*/
++
++		nm_device_802_11_wireless_ap_list_clear (self);
++		if (self->priv->ap_list)
++			nm_ap_list_unref (self->priv->ap_list);
++		g_mutex_free (self->priv->scan_mutex);
++	}
+ 
+ 	/* Chain up to the parent class */
+ 	parent_class = NM_DEVICE_CLASS (g_type_class_peek_parent (klass));




More information about the Pkg-utopia-commits mailing list