Commit graph

1681 commits

Author SHA1 Message Date
Tambet Ingo eb18d37516 2008-05-28 Tambet Ingo <tambet@gmail.com>
* src/ppp-manager/nm-ppp-manager.c (nm_ppp_manager_stop): Make sure
    	pppd gets killed, if SIGTERM doesn't do it's job, SIGKILL it.

    	* src/dhcp-manager/nm-dhcp-manager.c (nm_dhcp_manager_get_ip4_config):
    	Use inet_aton() everywhere to improve error detection.
    	Don't fall back to 'dhcp_server_identifier' if the gateway is not
    	provided.


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3695 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-05-28 14:03:35 +00:00
Tambet Ingo f812251afc 2008-05-26 Tambet Ingo <tambet@gmail.com>
* system-settings/plugins/ifcfg-suse/plugin.c (get_unamanged_devices_cb):
	Fix a typo.


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3693 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-05-26 13:25:22 +00:00
Tambet Ingo c499e8d90b 2008-05-26 Tambet Ingo <tambet@gmail.com>
* src/vpn-manager/nm-vpn-manager.c (nm_vpn_manager_get_service): Fix a
	reference counting issue.


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3692 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-05-26 08:41:27 +00:00
Dan Williams 78d86abfb2 2008-05-23 Dan Williams <dcbw@redhat.com>
Patch from Benoit Boissinot <bboissin+networkmanager@gmail.com>

	* src/backends/NetworkManagerGeneric.c
		- (nm_generic_enable_loopback): use libnl



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3690 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-05-23 10:56:51 +00:00
Dan Williams de61d58c96 2008-05-23 Dan Williams <dcbw@redhat.com>
Patch from Benoit Boissinot <bboissin+networkmanager@gmail.com>

	* src/NetworkManagerSystem.h
	  src/backends/NetworkManagerArch.c
	  src/backends/NetworkManagerDebian.c
	  src/backends/NetworkManagerFrugalware.c
	  src/backends/NetworkManagerGentoo.c
	  src/backends/NetworkManagerMandriva.c
	  src/backends/NetworkManagerPaldo.c
	  src/backends/NetworkManagerRedHat.c
	  src/backends/NetworkManagerSlackware.c
	  src/backends/NetworkManagerSuSE.c
		- (nm_system_device_has_active_routes, nm_system_flush_loopback_routes,
		   nm_system_flush_arp_cache): remove, unused

	* src/backends/NetworkManagerGeneric.c
	  src/backends/NetworkManagerGeneric.h
		- (nm_generic_device_has_active_routes, nm_generic_flush_loopback_routes,
		   nm_generic_flush_arp_cache): remove, unused



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3689 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-05-23 10:48:47 +00:00
Dan Williams eccd0e3101 2008-05-23 Dan Williams <dcbw@redhat.com>
* system-settings/plugins/ifcfg-fedora/reader.c
		- (make_ip4_setting): honor PEERDNS setting



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3688 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-05-23 10:40:41 +00:00
Dan Williams 3f6e3a2a15 2008-05-23 Dan Williams <dcbw@redhat.com>
Patch from Benoit Boissinot <bboissin+networkmanager@gmail.com>

	* src/NetworkManagerSystem.c
		- (nm_system_device_flush_ip4_addresses_with_iface): implement with
			libnl

	* src/backends/NetworkManagerArch.c
	  src/backends/NetworkManagerDebian.c
	  src/backends/NetworkManagerFrugalware.c
	  src/backends/NetworkManagerGentoo.c
	  src/backends/NetworkManagerMandriva.c
	  src/backends/NetworkManagerPaldo.c
	  src/backends/NetworkManagerRedHat.c
	  src/backends/NetworkManagerSlackware.c
	  src/backends/NetworkManagerSuSE.c
		- (nm_system_device_flush_ip4_addresses,
		   nm_system_device_flush_ip4_addresses_with_iface): remove

	* src/backends/NetworkManagerGeneric.c
		- (nm_generic_device_flush_ip4_addresses,
		   nm_generic_device_flush_ip4_addresses_with_iface): remove




git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3687 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-05-23 10:40:00 +00:00
Dan Williams 97f0ffdb42 2008-05-23 Dan Williams <dcbw@redhat.com>
* src/supplicant-manager/nm-supplicant-settings-verify.c
		- Switch 'bssid' from bytes to keyword type
		- (validate_type_keyword): allow NULL keyword lists

	* src/supplicant-manager/nm-supplicant-config.c
		- (nm_supplicant_config_add_setting_wireless): convert the bssid from
			a byte array to string form, which is what the supplicant expects



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3686 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-05-23 10:23:17 +00:00
Tambet Ingo 0ada5a4263 2008-05-23 Tambet Ingo <tambet@gmail.com>
Add a flag to NMSettingIP4Config to make it possible to ignore the DNS
	information received from DHCP.

	* libnm-util/nm-setting-ip4-config.c: Add a new membet "ignore_dhcp_dns"
	to make it possible to ignore the DNS information (both servers and
	searches) returned by DHCP server.

	* src/NetworkManagerUtils.c (nm_utils_merge_ip4_config): Reset the
	name servers and searches if "ignore_dhcp_dns" is set.

	* src/nm-ip4-config.c (nm_ip4_config_reset_nameservers)
	(nm_ip4_config_reset_searches): Implement.


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3685 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-05-23 07:35:43 +00:00
Dan Williams 6cc399d126 2008-05-22 Dan Williams <dcbw@redhat.com>
Remove anything mDNS related.  This is better done from a distro-specific
	dispatcher script.  Plus, any distro using avahi doesn't need to restart
	avahi, since avahi can handle interface changes just fine using netlink.

	* configure.in
		- Remove --with-mdns-provider

	* src/NetworkManagerPolicy.c
		- (global_state_changed): don't restart the mdns provider

	* src/NetworkManagerSystem.h
	  src/backends/NetworkManagerArch.c
	  src/backends/NetworkManagerDebian.c
	  src/backends/NetworkManagerFrugalware.c
	  src/backends/NetworkManagerGentoo.c
	  src/backends/NetworkManagerMandriva.c
	  src/backends/NetworkManagerPaldo.c
	  src/backends/NetworkManagerRedHat.c
	  src/backends/NetworkManagerSlackware.c
	  src/backends/NetworkManagerSuSE.c
		- (nm_system_restart_mdns_responder): remove

	* src/backends/NetworkManagerGeneric.c
	  src/backends/NetworkManagerGeneric.h
		- (nm_generic_restart_mdns_responder): remove



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3684 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-05-22 17:22:53 +00:00
Dan Williams 590610941e 2008-05-22 Dan Williams <dcbw@redhat.com>
* configure.in
		- clean up crypto options; just use --with-crypto=nss or
			--with-crypto=gnutls



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3683 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-05-22 17:19:34 +00:00
Tambet Ingo 55f9c72b42 2008-05-22 Tambet Ingo <tambet@gmail.com>
* src/nm-manager.c (impl_manager_sleep): No need to schedule the sync
	anymore, do it right away.


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3681 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-05-22 14:27:40 +00:00
Tambet Ingo 79dd84f727 2008-05-22 Tambet Ingo <tambet@gmail.com>
Don't remove all devices on waking up, sync with HAL.

	* src/nm-manager.c (nm_manager_udi_is_managed): Implement.
	(sync_devices): Implement, based on hal_manager_hal_reappeared_cb.
	(hal_manager_hal_reappeared_cb): Just call sync_devices.


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3680 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-05-22 14:22:31 +00:00
Tambet Ingo a8096e1ab3 2008-05-22 Tambet Ingo <tambet@gmail.com>
* src/nm-gsm-device.c (device_state_changed): Make sure we don't leave the
	serial device open when we're not connecting or connected.

	* src/nm-cdma-device.c (device_state_changed): Ditto.


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3679 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-05-22 12:36:07 +00:00
Dan Williams 83f1d81297 Update bug #
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3678 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-05-20 21:29:13 +00:00
Dan Williams ef08d804ad 2008-05-20 Dan Williams <dcbw@redhat.com>
* system-settings/plugins/ifcfg-fedora/reader.c
		- (add_one_wep_key): handle ASCII WEP keys too



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3677 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-05-20 21:27:33 +00:00
Dan Williams 1507022785 Update bug #
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3676 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-05-19 18:46:04 +00:00
Dan Williams 5e184c707d 2008-05-19 Dan Williams <dcbw@redhat.com>
* system-settings/plugins/ifcfg-fedora/reader.c
		- (make_ip4_setting): get a fallback gateway from /etc/sysconfig/network
			if the ifcfg doesn't specify one



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3675 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-05-19 16:44:07 +00:00
Dan Williams 6c79f46f13 2008-05-19 Dan Williams <dcbw@redhat.com>
Make the system settings service exit when the bus goes away.  Since it's
	a bus-activated service, it's lifetime is limited to the bus that activated
	it (rh #444976).

	* system-settings/src/Makefile.am
	  system-settings/src/nm-system-config-hal-manager-private.h
		- Remove nm-system-config-hal-manager-private.h

	* system-settings/src/nm-system-config-hal-manager.c
		- (nm_system_config_hal_manager_reinit_dbus,
		   nm_system_config_hal_manager_deinit_dbus): remove

	* system-settings/src/main.c
		- (dbus_reconnect): remove
		- (dbus_cleanup): don't tell the HAL manager to deinit dbus
		- (destroy_cb): just quit when the bus goes away
		- (start_dbus_service, dbus_init): simplify
		- (main): destroy the wired devices hash table after destroying
			the HAL manager so we don't have to disconnect signals from the
			HAL manager



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3674 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-05-19 16:13:31 +00:00
Tambet Ingo 40a69f986c 2008-05-15 Tambet Ingo <tambet@gmail.com>
Move crypto functions from nm-applet to libnm-util.

	* libnm-util/nm-setting-8021x.c (nm_setting_802_1x_set_ca_cert)
	(nm_setting_802_1x_set_client_cert)
	(nm_setting_802_1x_set_phase2_ca_cert)
	(nm_setting_802_1x_set_phase2_client_cert)
	(nm_setting_802_1x_set_private_key)
	(nm_setting_802_1x_set_phase2_private_key): Implement. Given a certificate
	file (or private key and it's password), read the certificate data.

	* libnm-util/crypto_nss.c:
	* libnm-util/crypto_gnutls.c:
	* libnm-util/crypto.[ch]: Move here from nm-applet.

	* configure.in: Check for NSS and gnutls here (moved here from nm-applet).

	* system-settings/plugins/ifcfg-suse/parser.c (read_wpa_eap_settings):
	Imlement WPA-EAP configuration reading from sysconfig.


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3673 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-05-19 07:43:13 +00:00
Dan Williams 192fe93b3a 2008-05-16 Dan Williams <dcbw@redhat.com>
* src/nm-device-802-11-wireless.c
		- (nm_device_802_11_wireless_set_enabled): request a scan after enabling
			wireless



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3672 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-05-16 23:15:28 +00:00
Dan Williams 9d2475da06 2008-05-14 Dan Williams <dcbw@redhat.com>
Fix Linus' bug in rh #134886

	* src/nm-device-802-3-ethernet.c
		- (constructor): request initial carrier state

	* src/nm-netlink-monitor.c
		- (nm_netlink_monitor_request_status): schedule emission of carrier
			signals after refilling the link cache.  Because the refill is a 
			synchronous operation, the normal message hander won't get called
			since libnl has already consumed the messages.
		- (deferred_emit_carrier_state): emit carrier states from an idle handler



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3669 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-05-14 14:01:59 +00:00
Dan Williams 2a2b75cc8b 2008-05-14 Dan Williams <dcbw@redhat.com>
* src/NetworkManagerSystem.c
		- (nm_system_device_is_up_with_iface): clean up



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3668 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-05-14 13:59:12 +00:00
Dan Williams 493f808b01 2008-05-13 Dan Williams <dcbw@redhat.com>
Fix refcounting issues over sleep/wake when a VPN connection was active that
	caused NM to try registering an object path for a device upon wake that was
	the same as an already registered object path.

	* src/nm-device.c
		- (nm_device_take_down): properly handle cases where the device is
			no longer active but was just active, and therefore must be
			deactivated.  When a device moves to unmanaged mode, this function
			previously would not deactivate the device, because the state was
			already unmanaged by the time this function was called.

	* src/vpn-manager/nm-vpn-connection.c
		- (device_state_changed): properly handle multiple devices states in
			which the device is now deactivated.  Code previously didn't handle
			transitions to the UNAVAILABLE (like rfkill or carrier off) and
			UNMANAGED states.



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3667 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-05-14 02:56:01 +00:00
Dan Williams aa44d70038 2008-05-13 Dan Williams <dcbw@redhat.com>
* src/nm-device-private.h
	  src/nm-device.c
		- (nm_device_hw_bring_up, nm_device_hw_take_down): export

	* src/nm-device-802-11-wireless.c
		- (nm_device_802_11_wireless_set_enabled): take devices up
			and down as appropriate for the rfkill state



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3666 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-05-14 01:55:49 +00:00
Dan Williams 4ce69835f5 2008-05-13 Dan Williams <dcbw@redhat.com>
* marshallers/nm-marshal.list
		- Add VOID:POINTER,STRING marshaller for ifcfg-fedora plugin

	* system-settings/plugins/ifcfg-fedora/Makefile.am
	  system-settings/plugins/ifcfg-fedora/nm-inotify-helper.c
	  system-settings/plugins/ifcfg-fedora/nm-inotify-helper.h
		- Implement a minimal inotify helper for watch paths for IN_CLOSE_WRITE
			events.  Solely for use watching ifcfg files to pick up changes
			to their hardlinks, since GIO doesn't support this yet (bgo #532815)

	* system-settings/plugins/ifcfg-fedora/nm-ifcfg-connection.c
		- (nm_ifcfg_connection_class_init): new 'ifcfg-changed' signal when the
			file contents change
		- (finalize): clean up inotify watches
		- (nm_ifcfg_connection_new): store keyfile; inotify watch the keyfile
			and the connection ifcfg for changes on their hardlinks
		- (files_changed_cb): proxy the changed signal back out to listeners

	* system-settings/plugins/ifcfg-fedora/plugin.c
		- (dir_changed): 
		- (connection_ifcfg_changed): re-read the connection when the ifcfg
			changes
		- (read_one_connection): connect to change signals on the new connection
		- (dir_changed, connection_changed_handler,
		   handle_connection_remove_or_new): break out connection change
			handling and connection new/remove handling so it can be used from
			both the GFileMonitor callback and the NMIfcfgConnection changed
			signals

	* system-settings/plugins/ifcfg-fedora/reader.c
	  system-settings/plugins/ifcfg-fedora/reader.h
		- (connection_from_file): return the keyfile path the connection would use



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3663 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-05-13 16:53:50 +00:00
Tambet Ingo b8df4e8217 2008-05-13 Tambet Ingo <tambet@gmail.com>
* system-settings/src/nm-polkit-helpers.c (create_polkit_context): Use a
	single PolKitContext which is shared by all. PolKitContext::unref leaks
	just about everything, including all open file descriptiors and results
	in 99% cpu usage when data arrives to any of the fds that don't belong
	to any context anymore.


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3662 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-05-13 10:16:41 +00:00
Dan Williams 20dddc2c2b 2008-05-12 Dan Williams <dcbw@redhat.com>
* gfilemonitor/glocaldirectorymonitor.c
	  gfilemonitor/glocaldirectorymonitor.h
		- (g_local_directory_monitor_constructor): actually subscribe to the
			watch
		- (_g_local_directory_monitor_new): ensure that inotify is started up

	* gfilemonitor/glocalfilemonitor.c
	  gfilemonitor/glocalfilemonitor.h
		- (g_local_file_monitor_constructor): actually subscribe to the watch
		- (_g_local_file_monitor_new): ensure that inotify is started up



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3661 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-05-12 20:48:48 +00:00
Dan Williams 09d50dbe9d remove conflict garbage
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3660 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-05-12 17:12:06 +00:00
Dan Williams 775a80ad5a 2008-05-11 Dan Williams <dcbw@redhat.com>
* configure.in
		- record PolicyKit version

	* system-settings/src/nm-polkit-helpers.c
		- (check_polkit_privileges): use polkit_context_can_caller_do_action()
			with PolicyKit <= 0.6



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3658 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-05-12 02:49:54 +00:00
Dan Williams ff0468d23b 2008-05-11 Dan Williams <dcbw@redhat.com>
Update Fedora system-settings plugin to support latest API and use
	GFileMonitor rather than home-rolled inotify code.

	* system-settings/plugins/ifcfg-fedora/Makefile.am
	  system-settings/plugins/ifcfg-fedora/common.h
	  system-settings/plugins/ifcfg-fedora/plugin.c
		- Update to latest system settings plugin API; use GIO instead of
			custom inotify code; use NMIfcfgConnection objects instead of
			ConnectionData structures tacked onto NMConnection objects

	* system-settings/plugins/ifcfg-fedora/nm-ifcfg-connection.c
	  system-settings/plugins/ifcfg-fedora/nm-ifcfg-connection.h
		- Implement an NMExportedConnection subclass mapping ifcfg files to
			connections

	* system-settings/plugins/ifcfg-fedora/reader.c
	  system-settings/plugins/ifcfg-fedora/reader.h
		- Move ifcfg parsing bits here from parser.c

	* system-settings/plugins/ifcfg-fedora/parser.c
	  system-settings/plugins/ifcfg-fedora/parser.h
		- Remove; most code moved to reader.c



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3656 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-05-11 20:20:52 +00:00
Dan Williams d7eafc71b1 2008-05-11 Dan Williams <dcbw@redhat.com>
* configure.in
	  Makefile.am
	  gfilemonitor/*
		- Add a private copy of the GIO GFileMonitor code, with a custom GFile
			implementation, so that the same change monitoring code can be used
			on systems without glib-2.14 (like Fedora 8)

	* system-settings/plugins/keyfile/Makefile.am
	  system-settings/plugins/keyfile/plugin.c
	  system-settings/plugins/ifcfg-suse/Makefile.am
	  system-settings/plugins/ifcfg-suse/plugin.c
		- Use private gfilemonitor code if GIO is not present



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3654 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-05-11 20:12:18 +00:00
Tambet Ingo 6ddd48f0f6 2008-05-09 Tambet Ingo <tambet@gmail.com>
* system-settings/plugins/ifcfg-suse/nm-suse-connection.c: Implement
	NMExportedConnection's 'update' and 'delete' and return error with
	descriptive message.


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3648 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-05-09 09:30:03 +00:00
Tambet Ingo d2cf6fa75c 2008-05-08 Tambet Ingo <tambet@gmail.com>
Use PolicyKit to authorize the system settings' AddConnection method
    	and the system settings connections' Update and Delete methods.

    	* libnm-glib/nm-settings.c (impl_exported_connection_update)
    	(impl_exported_connection_delete, nm_exported_connection_update)
    	(nm_exported_connection_delete): Return boolean and fill GError
    	to notify the callers of the reasons why it might have failed.

    	* libnm-glib/nm-dbus-settings-system.c
    	(nm_dbus_settings_system_add_connection): Return the error from dbus
    	call so that the callers can see why it failed.

    	* libnm-glib/nm-dbus-connection.c (update, delete): Update the
    	signatures.

    	* system-settings/src/nm-polkit-helpers.[ch]: Implement.

    	* system-settings/src/nm-sysconfig-connection.[ch]: Implement. New
    	abstract base class that checks PolicyKit permissions.

    	* system-settings/src/dbus-settings.c:
    	(impl_settings_add_connection): Check the policy before carring out
    	the request.

    	* system-settings/plugins/keyfile/nm-keyfile-connection.c:
    	Inherit from NMSysconfigConnection, check the policies before
    	allowing updating or removing.

    	* system-settings/plugins/ifcfg-suse/nm-suse-connection.c:
    	Inherit from NMSysconfigConnection.

    	* introspection/nm-exported-connection.xml: Annotate "Update" and
    	"Delete" methods with async flag so that the implementations can get
    	access to DBusGMethodInvocation.

    	* system-settings/src/dbus-settings.c
    	(settings_add_connection_check_privileges): Implement.
    	(impl_settings_add_connection): Check the privileges before adding a new
    	connection. Improve error reporting.

    	* introspection/nm-settings-system.xml: Make the 'AddConnection' method
    	async so that the implementation can access DBusGMethodInvocation.

    	* configure.in: Check for PolicyKit.

    	* policy/org.freedesktop.network-manager-settings.system.policy:
    	New file.

    	* policy/Makefile.am: Install the policy file.

    	* configure.in: Add 'policy' subdir.


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3646 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-05-09 06:33:30 +00:00
Dan Williams e01dfa43b3 2008-05-08 Dan Williams <dcbw@redhat.com>
Patch from Markus Becker <mab@comnets.uni-bremen.de>

	* src/nm-gsm-device.c
	  src/nm-cdma-device.c
		- (real_get_best_auto_connection): implement; allow autoconnection
			to GSM & CDMA devices



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3645 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-05-08 18:13:28 +00:00
Tambet Ingo 8928b8dbe7 2008-05-08 Tambet Ingo <tambet@gmail.com>
Rewrite the suse system settings plugin.

	* system-settings/plugins/ifcfg-suse/plugin.c: Rewrite.

	* system-settings/plugins/ifcfg-suse/parser.c: Rewrite.

	* system-settings/plugins/ifcfg-suse/nm-suse-connection.[ch]: Implement.

	* system-settings/plugins/ifcfg-suse/Makefile.am: Add new files to build.

	* system-settings/src/dbus-settings.c: Fix connection reference counting.

	* system-settings/src/main.c (load_plugins): Improve error reporting.

	* system-settings/src/sha1.[ch] Add.

	* system-settings/src/Makefile.am: Add sha1[ch] to build.


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3644 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-05-08 07:20:02 +00:00
Dan Williams 9559a7a260 2008-05-07 Dan Williams <dcbw@redhat.com>
* system-settings/plugins/keyfile/reader.c
		- (read_one_setting_value): handle IP address items separately
		- (read_array_of_uint): read IPv4 DNS option as a string array
		- (read_array_of_array_of_uint): read IPv4 address tuples as a string
			array

	* system-settings/plugins/keyfile/writer.c
		- (write_setting_value): handle IP address items separately
		- (write_array_of_uint): handle IPv4 DNS option as a string array,
			not an array of uint, so that it's user-editable
		- (write_array_of_array_of_uint): handle IPv4 address tuples as string
			arrays, so they are user-editable



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3643 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-05-08 01:02:42 +00:00
Dan Williams 16877b0672 2008-05-07 Dan Williams <dcbw@redhat.com>
* system-settings/plugins/keyfile/Makefile.am
		- Change location of the keyfile plugin settings to
			/etc/NetworkManager/system-connections



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3642 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-05-08 00:56:36 +00:00
Tambet Ingo 898c29cce2 2008-05-05 Tambet Ingo <tambet@gmail.com>
* system-settings/plugins/keyfile/nm-keyfile-connection.[ch]: Implement.

	* system-settings/plugins/keyfile/plugin.c: Work with
	NMKeyfileConnections.

	* system-settings/src/dbus-settings.c: Remove NMSysconfigExportedConnection.
	Plugins are supposed to return NMExportedConnections now and handle the
	updated(), removed(), and GetSecrets().
	Store the internal list of connections in hash table to make it easier
	to find duplicates.


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3640 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-05-07 09:48:12 +00:00
Tambet Ingo 97668fc7d6 2008-05-07 Tambet Ingo <tambet@gmail.com>
* src/backends/NetworkManagerSuSE.c (nm_system_set_hostname): Update
	for multiple IP addresses.


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3639 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-05-07 09:36:55 +00:00
Tambet Ingo bbaf9e2bfc 2008-05-07 Tambet Ingo <tambet@gmail.com>
Patch from André Lemos.

	* libnm-glib/nm-dbus-settings.c (fetch_connections_done): Fix a memory
	corruption.


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3638 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-05-07 09:21:44 +00:00
Dan Williams 51503b2d5f 2008-05-06 Dan Williams <dcbw@redhat.com>
* src/dhcp-manager/nm-dhcp-manager.c
		- (nm_dhcp_manager_get_ip4_config): clean up; update for changes to
			NMIP4Config to support multiple IP addresses

	* src/NetworkManagerUtils.c
		- (nm_utils_merge_ip4_config): update for multiple IP addresses

	* src/nm-ip4-config.c
	  src/nm-ip4-config.h
		- Store a list of IPv4 address/netmask/gateway tuples
		- (nm_ip4_config_get_gateway, nm_ip4_config_set_gateway,
		   nm_ip4_config_get_netmask, nm_ip4_config_set_netmask,
		   nm_ip4_config_get_broadcast, nm_ip4_config_set_broadcast,
		   nm_ip4_config_set_address): remove
		- (nm_ip4_config_take_address, nm_ip4_config_add_address,
		   nm_ip4_config_replace_address, nm_ip4_config_get_num_addresses):
			new functions; handle multiple IPv4 addresses

	* src/nm-device.c
	  src/ppp-manager/nm-ppp-manager.c
	  src/vpn-manager/nm-vpn-connection.c
	  src/NetworkManagerPolicy.c
	  test/nm-tool.c
	  libnm-glib/libnm-glib-test.c
		- update for changes to NMIP4Config for multiple IPv4 addresses

	* src/NetworkManagerSystem.c
		- (nm_system_device_set_ip4_route): don't add the route if any address
			is on the same subnet as the destination
		- (check_one_address): ignore the exact match, just match family and
			interface index
		- (add_ip4_addresses): add all IPv4 addresses in an NMIP4Config to
			an interface
		- (nm_system_device_set_from_ip4_config): use add_ip4_addresses()
		- (nm_system_vpn_device_set_from_ip4_config): use add_ip4_addresses()

	* introspection/nm-ip4-config.xml
		- Remove 'address', 'gateway', 'netmask', and 'broadcast' properties
		- Add 'addresses' property which is an array of (uuu) tuples of
			address/netmask/gateway

	* libnm-util/nm-setting-ip4-config.c
		- (set_property): use ip-address <-> GValue converters from nm-utils.c

	* libnm-glib/nm-ip4-config.c
	  libnm-glib/nm-ip4-config.h
		- Handle D-Bus interface changes to support multiple IP addresses



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3637 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-05-06 21:53:22 +00:00
Tambet Ingo 5b2aea3d63 2008-05-06 Tambet Ingo <tambet@gmail.com>
* libnm-glib/nm-dbus-settings.c (fetch_connections_done): Don't leak
	the returned connection paths.


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3633 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-05-06 07:59:30 +00:00
Tambet Ingo 17f26b8d31 2008-05-05 Tambet Ingo <tambet@gmail.com>
* libnm-glib/nm-dbus-settings.c (constructor): Fix the
	"PropertiesChanged" signal signature.

	* libnm-glib/nm-dbus-connection.c (constructor): Use the common GType
	defined in nm-dbus-glib-types.h.
	Don't register the connection on dbus, we're a proxy class to
	communicate with an already registered connection over dbus.

2008-04-30  Tambet Ingo  <tambet@gmail.com>

	Implement new subclasses of NMSettings and NMExportedConnection to make
	it easier for the applet to access and modify system settings.

	* libnm-glib/nm-dbus-connection.[ch]:
	* libnm-glib/nm-dbus-settings.[ch]:
	* libnm-glib/nm-dbus-settings-system.[ch]: Implement.

	* libnm-glib/Makefile.am: Add the new files to build, generate some more
	bindings and glue.

	* include/NetworkManager.h: Define the system settings DBus interface.

2008-04-30  Tambet Ingo  <tambet@gmail.com>

	Implement additional C API for exported connections to make them identical
	with the DBus API. Change the (list_connections) virtual function to be
	more usable from C - instead of requiring implementers to return a GPtrArray
	of dbus paths, return a list of connections.

	* libnm-glib/nm-settings.c (nm_exported_connection_class_init): Fix a typo.
	(nm_settings_list_connections):
	(nm_exported_connection_new):
	(nm_exported_connection_update):
	(nm_exported_connection_delete): Implement.

	(impl_settings_list_connections):
	(impl_exported_connection_update):
	(impl_exported_connection_delete): Use the new public functions to make
	sure the C and dbus interfaces stay in sync.

	* system-settings/src/dbus-settings.c (list_connections): Return a list of
	connections.


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3630 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-05-05 07:07:44 +00:00
Dan Williams 9fdd6fb123 2008-05-02 Dan Williams <dcbw@redhat.com>
* system-settings/plugins/ifcfg-fedora/plugin.c
		- (dispose): use right unref call on the DBusGConnection



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3629 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-05-02 16:22:39 +00:00
Dan Williams 302114db36 2008-05-02 Dan Williams <dcbw@redhat.com>
* src/nm-serial-device.c
		- (find_terminator): don't compare the whole line, just the size of the
			terminator, since some modems put stuff after the terminator, like
			"CONNECT 9600"



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3628 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-05-02 15:59:44 +00:00
Dan Williams c39d6e32d8 2008-05-01 Dan Williams <dcbw@redhat.com>
Patch from Michael Biebl <biebl@debian.org>

	* callouts/Makefile.am
	  callouts/org.freedesktop.nm_dispatcher.service.in
	  system-settings/src/Makefile.am
	  system-settings/src/org.freedesktop.NetworkManagerSystemSettings.service.in
		- use the right install location for dbus-activated stuff



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3624 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-05-01 10:11:14 +00:00
Dan Williams 9c5d7e916b 2008-04-30 Dan Williams <dcbw@redhat.com>
* src/nm-gsm-device.c
		- (enter_pin): fix setting name passed to applets when asking for a GSM
			PIN or PUK



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3623 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-04-30 19:19:50 +00:00
Dan Williams 1813185dcc 2008-04-30 Dan Williams <dcbw@redhat.com>
* src/nm-manager.c
		- (nm_manager_error_get_type): remove erroneous NULL enum from table



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3622 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-04-30 15:39:11 +00:00
Dan Williams ff16205dcb 2008-04-30 Dan Williams <dcbw@redhat.com>
* src/nm-device-802-3-ethernet.c
	  src/nm-device-802-11-wireless.c
		- (real_is_up): return true instead of chaining up to unimplemented
			parent method



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3621 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-04-30 13:48:35 +00:00