Commit Graph

32 Commits

Author SHA1 Message Date
Dan Williams
b3959aefa3 core: rename NMSysconfigConnection -> NMSettingsConnection 2011-01-26 11:38:12 -06:00
Dan Williams
f9ceafd4a1 Merge remote branch 'origin/master' into rm-userset 2011-01-12 15:46:37 -06:00
Michael Biebl
898e08eef1 ifupdown: Allow to mark bridge ports as unmanaged (debian #530335)
Parse bridge configurations in /etc/network/interfaces and add
interfaces defined via bridge_ports to well_known_interfaces. This
allows to mark those interfaces as unmanaged if managed=false.
The "all" keyword and regexes are not supported and simply skipped.

Example:
iface br0 inet manual
	bridge_ports eth0 eth1 (→ eth0/1 will be marked as unmanaged)

See also:
http://manpages.ubuntu.com/manpages/maverick/man5/bridge-utils-interfaces.5.html

Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=530335
2010-12-09 00:15:17 -06:00
Michael Biebl
1939209759 ifupdown: Correctly mark unmanaged devices (debian #569215)
If we find a "iface ..." line, add the interface to
well_known_interfaces no matter if there is a connection for it or not.

Otherwise we fail to mark devices as unmageded in cases like

iface wlan0 inet manual
	wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf

as NM does not know how to parse such a interface configuration.

Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=569215
2010-12-09 00:13:37 -06:00
Dan Williams
8b41f70dd5 Merge remote branch 'origin/master' into rm-userset 2010-09-27 10:30:46 -05:00
Dan Williams
6f2aa8a817 ifupdown: return NULL hostname, not a zero-length string 2010-09-24 18:54:37 -05:00
Dan Williams
022d8e665c Merge remote branch 'origin/master' into gsoc 2010-08-26 09:18:37 -05:00
Dan Williams
ba355b6a7e ifupdown: make testcase parsing quiet
Removes messages about invalid ENI formatting when running the
testcases.
2010-08-12 22:44:07 -05:00
Dan Williams
e386548132 ifupdown: split parsers into convenience library for easier testcase creation 2010-08-12 18:15:21 -05:00
Daniel Gnoutcheff
7f8dc06dff remove nm-settings-connection-interface
NMSettingsConnectionInterface was created to allow the daemon and NM
clients to have common code that handled both system and user
connections. It's no longer needed now that user settings services are
gone.

This concludes the flattening of libnm-glib.
2010-08-06 20:53:37 -04:00
Daniel Gnoutcheff
aee48901f4 Merged NM{Exported,Sysconfig}Connection
In continuation of the theme, the removal of user settings services
means that the distinction between NMSysconfigConnection and
NMExportedConnection is no longer needed. Merge NMExportedConnection
into NMSysconfigConnection.
2010-08-06 13:05:46 -04:00
Dan Williams
3abf5f30bf system-settings: fix plugins for /etc/NetworkManager/NetworkManager.conf 2010-03-06 00:18:28 -08:00
Dan Williams
37e8ae824e ifupdown: don't tell NM about connections until we check 'managed' (lp:450458)
Otherwise it causes connections that we don't want exported to leak
out and be shown in the connection editor even though the device
isn't supposed to be managed.
2010-02-18 07:55:34 -08:00
Michael Biebl
2a7a4ebaf6 ifupdown: interpret allow-hotplug as autoconnect (debian #568784) 2010-02-08 09:34:28 -08:00
Alexander Sack
8b3ddc7c8a ifupdown: unmanage devices with "mapping" stanzas - lp:413622 bgo:591864 2009-10-05 19:53:54 +02:00
Alexander Sack
eeec1021b2 ifupdown: do not export any connection in managed=false mode - lp:291902 2009-09-04 18:02:24 +02:00
Alexander Sack
801203c3aa ifupdown: support mappings and don't track devices not referenced in any stanza lp:291564 2009-09-04 17:53:43 +02:00
Dan Williams
cecf8f64c7 ifupdown: fix regression locking connections to their interfaces (lp #424092)
Reported and tirelessly tested by Noel Bergman <noel@devtech.com>
2009-09-03 20:43:26 -05:00
Dan Williams
650cbcc108 ifupdown: port to new settings API 2009-08-12 17:13:24 -05:00
Dan Williams
0d69dfe39e libnm-glib: implement new settings interfaces
The old NMExportedConnection was used for both client and server-side classes,
which was a mistake and made the code very complicated to follow.  Additionally,
all PolicyKit operations were synchronous, and PK operations can block for a
long time (ie for user input) before returning, so they need to be async.  But
NMExportedConnection and NMSysconfigConnection didn't allow for async PK ops
at all.

Use this opportunity to clean up the mess and create GInterfaces that both
server and client objects implement, so that the connection editor and applet
can operate on generic objects like they did before (using the interfaces) but
can perform specific operations (like async PK verification of callers) depending
on whether they are local or remote or whatever.
2009-07-23 09:20:52 -04:00
Alexander Sack
57b8e0bf18 ifupdown: fix miscast due to udev conversion 2009-07-02 09:26:55 -04:00
Dan Williams
c9067d8fed everything: use libgudev instead of HAL; merge NM and nm-system-settings
The only thing that doesn't work yet is the system-settings service's
"auto eth" connections for ethernet devices that don't have an existing
connection.  Might also have issues with unmanaged devices that can't
provide a MAC address until they are brought up, but we'll see.
2009-06-11 00:39:12 -04:00
Dan Williams
0408c149b5 system-settings: kill usage of sha1 since NM can handle passphrases now
Plugins no longer need to hash WPA passphrases, so there's no need to keep
sha1 stuff around unless its for hasing other stuff (ifcfg-rh uses sha1
for certificate hashing for example, but has a private copy).
2009-06-05 22:09:39 -04:00
Przemysław Grzegorczyk
bac45aa0d5 clean up glib includes (bgo #564376)
Only <glib.h> and <gtk/gtk.h> need to be included.
2009-01-19 00:16:40 -05:00
Dan Williams
3f907cb9e3 License header and FSF address update 2008-12-20 09:46:41 -05:00
Alexander Sack
e6644a699a 2008-10-10 Alexander Sack <asac@ubuntu.com>
Implement managed mode. We bind devices configured in /etc/network/interfaces
	to their connections by updating wired/wireless setting with the
	mac address of the device.

	* system-settings/plugins/ifupdown/plugin.c
		- (get_net_address_for_udi): implement function to retrieve MAC
			address of udi from hal in GByteArray format
		- (bind_device_to_connection): bind mac address of device to
			wired/wireless system connection
		- (hal_device_added_cb): call bind_device_to_connection for
			system connections with a matching interface.name
		- (hal_device_added_cb): ensure that all code paths
			properly free the "iface" string.



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@4165 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-10-10 11:25:53 +00:00
Alexander Sack
da167bbcb1 2008-10-10 Alexander Sack <asac@ubuntu.com>
Parse nm-system-settings.conf and allow admins to either use managed and unmanaged
	mode of the ifupdown system config plugin.

	* system-settings/plugins/ifupdown/plugin.c
		- (SCPluginIfupdown_init): parse nm-system-settings.conf keyfile and set
			private unmanage_well_known state field accordingly



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@4164 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-10-10 11:14:26 +00:00
Alexander Sack
ab59790905 2008-10-10 Alexander Sack <asac@ubuntu.com>
Implement unmanaged mode that will prevent all devices in the
	well_known_udis set from being touched by NetworkManager

	* system-settings/plugins/ifupdown/plugin.c
		- (typedef struct SCPluginIfupdownPrivate): add gboolean
			unmanage_well_known field used to turn on/off unmanaged
			mode
		- (hal_device_added_cb,hal_device_remove_cb): emit |unmanaged-devices-changed|
			signal when well_known_udis get added/removed
		- (SCPluginIfupdown_get_unmanaged_devices): return all well_known_udis
			if we are in unmanaged mode



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@4163 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-10-10 11:13:26 +00:00
Alexander Sack
0359c9a59b 2008-10-10 Alexander Sack <asac@ubuntu.com>
Add support to track network devices that have a configuration
	with a matching interface.name in /etc/network/interfaces

	* system-settings/plugins/ifupdown/plugin.c
		- (typedef struct SCPluginIfupdownPrivate): add hash table
			to track |well_known_udis|
		- (get_iface_for_udi): helper function to get interface.name
			for a udi
		- (hal_device_added_cb, hal_device_removed_cb): callbacks
			that add and remove devices to and from the well_known_udis
			set depending on whether their |interface.name| matches
			any interface definition in /etc/network/interfaces
		- (SCPluginIfupdown_init): connect callbacks from above with
			hal_mgr and setup well_known_udis hashtable
		- (GObject__dispose): destroy well_known_udis hashtable
		- (hal_device_added_cb2): implement wrapper callback with GFunc
			signature. user_data is supposed to be a triple (hal_mgr,
			config and devtype)
		- (SCPluginIfupdown_init): bootstrap wired and wifi devices for
			startup and call hal_device_added_cb2



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@4162 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-10-10 11:12:05 +00:00
Alexander Sack
73dfd9643e 2008-10-10 Alexander Sack <asac@ubuntu.com>
Remove implementation for not used NMSystemConfigInterface callback functions
	in ifupdown plugin

	* system-settings/plugins/ifupdown/plugin.c
		- (SCPluginIfupdown_unmanaged_devices_changed): removed
		- (SCPluginIfupdown_connection_added): removed



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@4161 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-10-10 11:10:19 +00:00
Alexander Sack
724ece22c4 2008-10-03 Alexander Sack <asac@ubuntu.com>
Implement system hostname support for debian/ubuntu

	* system-settings/plugins/ifupdown/plugin.c
		- (GObject__get_property): extend announced capabilities; add
			NM_SYSTEM_CONFIG_INTERFACE_CAP_MODIFY_HOSTNAME support
		- (GObject__set_property,write_system_hostname): implement
			NM_SYSTEM_CONFIG_INTERFACE_CAP_MODIFY_HOSTNAME capability.
		- (GObject__set_property, GObject__get_property, SCPluginIfupdown_init,
		   update_system_hostname, get_hostname):
			implement hostname property that watches and
			parses /etc/hostname



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@4151 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-10-06 18:07:03 +00:00
Dan Williams
8d19530da2 2008-09-18 Dan Williams <dcbw@redhat.com>
Patch from Alexander Sack <asac@ubuntu.com>

	* configure.in
	  system-settings/plugins/Makefile.am
	  system-settings/plugins/ifupdown/Makefile.am
	  system-settings/plugins/ifupdown/interface_parser.c
	  system-settings/plugins/ifupdown/interface_parser.h
	  system-settings/plugins/ifupdown/nm-ifupdown-connection.c
	  system-settings/plugins/ifupdown/nm-ifupdown-connection.h
	  system-settings/plugins/ifupdown/parser.c
	  system-settings/plugins/ifupdown/parser.h
	  system-settings/plugins/ifupdown/plugin.c
	  system-settings/plugins/ifupdown/plugin.h
		- Implement a Debian/Ubuntu legacy network configuration plugin
			(gnome.org #551941)



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@4078 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-09-18 15:29:59 +00:00