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
* 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
* 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
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
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
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
* 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
* 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
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
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
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
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
* 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
* 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
* 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
* 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
* 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
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
* 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
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
* 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
* 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
* 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
* 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
* 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
* 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
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