Commit graph

1694 commits

Author SHA1 Message Date
Tambet Ingo 4874f758d8 2008-06-02 Tambet Ingo <tambet@gmail.com>
* libnm-util/nm-setting-ip4-config.[ch]: Add static routes property.

	* src/nm-ip4-config.[ch]: Store the static routes as a list of
	NMIP4Address, update the getters and setters.

	* src/dhcp-manager/nm-dhcp-manager.c (nm_dhcp_manager_get_ip4_config):
	Use the updated NMIP4Config routes api.

	* src/NetworkManagerUtils.c (nm_utils_merge_ip4_config): Merge
	static routes as well.

	* src/NetworkManagerSystem.c (netmask_to_prefix): Implement.
	(nm_system_device_set_from_ip4_config): Use the updated NMIP4Config
	routes api.


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3715 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-06-02 08:44:48 +00:00
Dan Williams a53ebdbd37 2008-05-30 Dan Williams <dcbw@redhat.com>
* src/named-manager/nm-named-manager.c
	  src/named-manager/nm-named-manager.h
		- Remove stale/obsolete bits for controlling bind over DBus



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3714 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-05-30 18:41:30 +00:00
Dan Williams 884a070f18 2008-05-29 Dan Williams <dcbw@redhat.com>
* src/dnsmasq-manager/nm-dnsmasq-manager.c
	  src/dnsmasq-manager/nm-dnsmasq-manager.h
		- (nm_dnsmasq_manager_new): move iface argument here
		- (constructor): remove, not needed
		- (get_pidfile_for_iface, create_dm_cmd_line, kill_existing_for_iface,
		   nm_dnsmasq_manager_start, nm_dnsmasq_manager_stop): use priv->pidfile

	* src/nm-device.c
		- (real_act_stage4_get_ip4_config,
		   nm_device_activate_stage5_ip_config_commit): fix for dnsmasq manager
			changes



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3712 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-05-29 21:16:51 +00:00
Dan Williams 0aae98f986 2008-05-29 Dan Williams <dcbw@redhat.com>
* src/nm-device.c
		- (dnsmasq_state_changed_cb): new function; fail the connection if
			something happens to dnsmasq
		- (nm_device_new_ip4_shared_config): new function; create a new
			ip4-config for shared connections.  Shared connections always use a
			fixed static IP address.
		- (real_act_stage4_get_ip4_config): handle shared connections; fix
			autoip connections by actually using the returned ip4-config and
			not leaking it
		- (nm_device_activate_stage5_ip_config_commit): start dnsmasq for shared
			connections
		- (nm_device_deactivate_quickly, nm_device_dispose): terminate dnsmasq
			if its active



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3711 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-05-29 20:58:52 +00:00
Dan Williams d1f092b539 2008-05-29 Dan Williams <dcbw@redhat.com>
* src/nm-device-802-11-wireless.c
		- (real_get_best_auto_connection): auto-activate 'shared' method
			connections too



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3710 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-05-29 20:55:05 +00:00
Dan Williams cab22d895c 2008-05-29 Dan Williams <dcbw@redhat.com>
* libnm-util/nm-setting-ip4-config.c
	  libnm-util/nm-setting-ip4-config.h
		- Add a 'shared' method to indicate that this connection should be
			brought up with a DHCP and proxy DNS server to facilitate
			connection sharing.
		- (verify): 'shared' method doesn't allow DNS or searches either



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3709 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-05-29 20:53:01 +00:00
Dan Williams f20d3695ff 2008-05-29 Dan Williams <dcbw@redhat.com>
* configure.in
	  src/Makefile.am
	  src/dnsmasq-manager/Makefile.am
	  src/dnsmasq-manager/nm-dnsmasq-manager.c
	  src/dnsmasq-manager/nm-dnsmasq-manager.h
		- Add a dnsmasq daemon manager to facilitate connection sharing



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3708 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-05-29 20:47:10 +00:00
Dan Williams 3318502fb8 2008-05-29 Dan Williams <dcbw@redhat.com>
* src/nm-device-private.h
		- Remove unused prototypes and clean up

	* src/nm-device.c
		- Remove anything related to system_config_data, which is no longer used
		- (nm_device_new_ip4_autoip_config): make static



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3707 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-05-29 20:35:34 +00:00
Tambet Ingo 89aaffef8c 2008-05-29 Tambet Ingo <tambet@gmail.com>
* system-settings/plugins/ifcfg-suse/nm-suse-connection.c
	(file_changed): Fix a bug where suse system settings plugin didn't
	update the connections automatically when the files changed.


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3700 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-05-29 07:57:52 +00:00
Dan Williams fe065be722 2008-05-28 Dan Williams <dcbw@redhat.com>
Revert r3697 (adhoc-create property patch); it's the wrong way to do this.



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3699 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-05-29 02:11:17 +00:00
Dan Williams 34bba77f61 2008-05-28 Dan Williams <dcbw@redhat.com>
Patch from Benoit Boissinot <bboissin+networkmanager@gmail.com>

	* src/NetworkManagerSystem.c
		- (nm_system_device_flush_ip4_routes_with_iface): implement with libnl
		- (nm_system_vpn_device_set_from_ip4_config): don't flush routes here,
			was causing -EINVAL errors since the libnl code actually does flush
			the routes on VPN interfaces now

	* src/backends/NetworkManagerArch.c
	  src/backends/NetworkManagerDebian.c
	  src/backends/NetworkManagerFrugalware.c
	  src/backends/NetworkManagerGeneric.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_routes,
		   nm_system_device_flush_ip4_routes_with_iface): remove



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3698 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-05-28 21:49:34 +00:00
Dan Williams 0b52ca0ba1 2008-05-28 Dan Williams <dcbw@redhat.com>
* libnm-util/nm-setting-wireless.c
	  libnm-util/nm-setting-wireless.h
		- (set_property, get_property, nm_setting_wireless_class_init): add the
			'adhoc-create' property, which when TRUE indicates that NM should
			create this connection as an adhoc wifi network if it's not found
			as an adhoc network during scanning.  Can be used to auto-create
			adhoc networks when used in combination with autoconnect.



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3697 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-05-28 21:30:53 +00:00
Tambet Ingo 622a3e3880 2008-05-28 Tambet Ingo <tambet@gmail.com>
Patch from Dennis Noordsij <dennis.noordsij@helsinki.fi>.

	* src/nm-gsm-device.c: Don't try to reset the modem before PIN is
	checked, it doesn't work on some devices.


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3696 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-05-28 15:08:51 +00:00
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