1. 28 May, 2013 2 commits
    • Dan Williams's avatar
      settings: implement ability to add connections without saving them to disk · 8a79fb1d
      Dan Williams authored
      We don't always want to immediately write new connections to disk, to
      facilitate "runtime" or "temporary" connections where an interface's
      runtime config isn't backed by on-disk config.  Also, just because
      an interface's configuration is changed doesn't necessarily mean
      that new configuration should be written to disk either.
      Add D-Bus methods for adding new connections and for updating existing
      connections that don't immediately save the connection to disk.
      Also add infrastructure to indicate to plugins that the new connection
      shouldn't be immediately saved if the connection was added with the
      new method.
    • Dan Williams's avatar
      settings: track whether connection is saved to disk or not · cd5d9270
      Dan Williams authored
      Use the new NMConnection 'changed' signal to mark connections
      as dirty/unsaved, and reset that when they get flushed to disk.
      Previously, the 'Updated' signal was emitted only when the
      connection was changed and flushed to disk, but now we have
      more granular needs, and the signal is emitted whenever the
      connection actually *is* changed, regardless of whether its
      flushed to disk or not.
  2. 04 Mar, 2011 1 commit
  3. 26 Jan, 2011 2 commits
    • Dan Williams's avatar
    • Dan Williams's avatar
      secrets: simplify GetSecrets call flow · d1979ba6
      Dan Williams authored
      The Settings.Connection interface is now only provided by NetworkManager
      itself since there is only one settings service.  NM can validate
      requests for secrets internally and thus there's no need to lock down
      GetSecrets using a separate D-Bus interface, since PolicyKit provides
      that functionality on systems where this is desirable (ie multi-user).
      Single-user systems that do not have PolicyKit will inherently trust
      the user already, or if not D-Bus auth is flexible enough to lock
      down the GetSecrets method individually even if it's not on a separate
      D-Bus interface.
      Second, since only clients like connection editors or applets will be
      calling the GetSecrets method, there's no need for 'hints' or
      'request_new' arguments here since this  method should never trigger
      an interactive secrets request.  Only NM should send those requests
      when it knows it needs to ask the user, either during connection or
      after validating the incoming GetSecrets request.  A connection editor
      type application should never be able to trigger the normal
      "What's your passphrase" dialog thats provided by the secret agent
      for that user's session.
  4. 02 Dec, 2010 1 commit
    • Dan Williams's avatar
      settings: remove settings dict from connection 'updated' signal · 9d077444
      Dan Williams authored
      New connections should not be pushed out in the Updated signal
      because signals cannot be restricted to particular clients, and
      some clients may not have permission to view the connection.
      Upon receiving the Updated signal, clients should re-read the
      connection using GetSettings to ensure that the client still
      has permissions to view the connection, and to get the updated
  5. 26 Oct, 2010 1 commit
  6. 15 Aug, 2010 1 commit
  7. 07 Aug, 2010 1 commit
    • Daniel Gnoutcheff's avatar
      NetworkMangerSettings -> NetworkManager.Settings · f98e2528
      Daniel Gnoutcheff authored
      Just for consistency, make settings related stuff live under the
      org.freedesktop.NetworkManager namespace, rather than its own
      org.freedesktop.NetworkManagerSettings namespace. Renames are done for
      DBus interface names, DBus object paths, and polkit actions.
  8. 06 Aug, 2010 1 commit
    • Daniel Gnoutcheff's avatar
      Merged NM{Exported,Sysconfig}Connection · aee48901
      Daniel Gnoutcheff authored
      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.
  9. 24 Mar, 2010 1 commit
  10. 24 Aug, 2009 1 commit
  11. 26 Jan, 2009 1 commit
  12. 27 Aug, 2008 1 commit
    • Dan Williams's avatar
      2008-08-26 Dan Williams <dcbw@redhat.com> · 81f8f399
      Dan Williams authored
      	Add connection UUIDs, since connection names can be changed, and since
      	old-style connection IDs could change over the life of the connection.  The
      	UUID should be assigned at connection creation time, be stable for a given
      	connection, and should be unique among all connections for a given settings
      	* configure.in
      		- Require libuuid
      	* introspection/nm-exported-connection.xml
      		- Remove "GetID" method
      	* libnm-glib/nm-dbus-connection.c
      		- Remove id-related stuff
      	* libnm-util/nm-utils.c
      		- (nm_utils_uuid_generate, nm_utils_uuid_generate_from_string): Add
      			utility functions to generate UUIDs
      	* libnm-util/nm-setting-connection.c
      		- Add 'uuid' member to the connection setting
      		- (verify): require valid 'uuid' for a valid connection
      	* system-settings/plugins/ifcfg-fedora/nm-ifcfg-connection.c
      		- Remove id-related stuff
      		- Give connections UUIDs where needed
      git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@4013 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
  13. 09 May, 2008 1 commit
    • Tambet Ingo's avatar
      2008-05-08 Tambet Ingo <tambet@gmail.com> · d2cf6fa7
      Tambet Ingo authored
          	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
          	* 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
  14. 22 Apr, 2008 1 commit
    • Tambet Ingo's avatar
      2008-04-22 Tambet Ingo <tambet@gmail.com> · e6a5d0be
      Tambet Ingo authored
      	Implement GKeyFile system settings plugin.
      	Implement writing system settings (currently supported only by GKeyFile plugin).
      	* system-settings/src/main.c:
      	* system-settings/src/dbus-settings.c: Move the communication with plugins
      	from main.c to dbus-settings.c. Makes it possible to talk to all registered
      	plugins for adding/updating/removing connections.
      	* system-settings/src/nm-system-config-interface.c
      	(nm_system_config_interface_add_connection): Implement
      	(nm_system_config_interface_update_connection): Implement.
      	(nm_system_config_interface_remove_connection): Implement.
      	* system-settings/plugins/keyfile/Makefile.am:
      	* system-settings/plugins/keyfile/plugin.[ch]:
      	* system-settings/plugins/keyfile/writer.[ch]:
      	* system-settings/plugins/keyfile/reader.[ch]: Implement.
      	* system-settings/plugins/Makefile.am: Add GKeyFile plugin.
      	* configure.in: Generate GKeyFile Makefile.
      	* libnm-glib/nm-settings.c (impl_exported_connection_get_id): Fix a memory
      	corruption, need to duplicate the returned string.
      	(impl_exported_connection_update): Implement.
      	(impl_exported_connection_delete): Implement.
      	* introspection/nm-settings-system.xml: Add "AddConnection" method.
      	* introspection/nm-exported-connection.xml: Add "Update" and "Delete" methods.
      git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3587 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
  15. 17 Mar, 2008 1 commit
    • Dan Williams's avatar
      2008-03-17 Dan Williams <dcbw@redhat.com> · 70e79d60
      Dan Williams authored
      	Split the 802.1x bits out of the wireless-security setting so they are
      	generalized enough for wired 802.1x to use too.
      	* introspection/nm-exported-connection.xml
      		- GetSecrets now returns 'a{sa{sv}}' (a hash of settings hashes) instead
      			of just a hash of the secrets for one setting
      	* libnm-util/nm-setting-wireless-security.c
      		- Remove 802.1x-specific stuff
      		- Added leap-username and leap-password properties for old-school LEAP
      	* src/nm-device.c
      		- (connection_secrets_updated_cb): take a list of updated settings names,
      			not just one
      	* src/supplicant-manager/nm-supplicant-config.c
      		- (nm_supplicant_config_add_setting_wireless_security): remove 802.1x
      			specific stuff; fix for updated LEAP bits; punt 802.1x stuff
      			to nm_supplicant_config_add_setting_8021x()
      		- (nm_supplicant_config_add_setting_8021x): add an 802-1x setting to
      			the supplicant config
      	* src/nm-device-802-11-wireless.c
      		- (build_supplicant_config): pass in the 802.1x setting too, if any
      		- (real_connection_secrets_updated): take a list of updated settings
      			names, not just one
      	* src/nm-device-802-3-ethernet.c
      		- (real_connection_secrets_updated_cb): take a list of updated settings
      			names, not just one
      	* src/nm-activation-request.c
      		- (nm_act_request_class_init): the 'connection-secrets-updated' signal
      			now passes a list of updated settings names, not just one
      		- (update_one_setting): new function; handle one updated setting
      		- (get_secrets_cb): handle multiple settings returned from the
      			settings service; have to be careful of ordering here as there are
      			some dependencies between settings (ex. wireless-security and 802.1x
      			in some cases)
      	* src/marshallers/nm-marshal.list
      		- new marshaller for connection-secrets-updated signal
      	* libnm-util/nm-setting-8021x.c
      		- Add back the 'pin' and 'psk' settings, for EAP-SIM and EAP-PSK auth
      		- (verify): a valid 'eap' property is now required
      	* libnm-util/nm-connection.c
      		- (register_default_settings): add priorities to settings; there are
      			some dependencies between settings, and during the need_secrets
      			calls this priority needs to be respected.  For example, only the
      			wireless-security setting knows whether or not the connection is
      			going to use 802.1x or now, so it must be asked for secrets before
      			any existing 802.1x setting is
      		- (nm_connection_lookup_setting_type): expose
      	* libnm-util/nm-setting-wireless.c
      		- (verify): should verify even if all_settings is NULL; otherwise won't
      			catch the case where there is missing security
      	* libnm-util/nm-setting-wireless-security.c
      		- Remove everything to do with 802.1x
      		- Add old-school LEAP specific properties for username and password
      		- (need_secrets): rework LEAP secrets checking
      		- (verify): rework for LEAP and 802.1x verification
      git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3470 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
  16. 28 Feb, 2008 1 commit
  17. 20 Feb, 2008 1 commit
    • Dan Williams's avatar
      2008-02-20 Dan Williams <dcbw@redhat.com> · fd0ab916
      Dan Williams authored
      	* Global rename of NMConnectionSettings -> NMExportedConnection to cut down
      		on confusing names
      	* Add 'path' and 'scope' properties to NMConnection since both NM and the
      		applet were having to hack this in anyway.  Remove the 'path' stuff from
      	* Internally rename NMConnectionType -> NMConnectionScope
      	* Provide default implementations of the 'get_id' and 'get_settings' methods
      		of NMExportedConnection
      git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3334 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
  18. 19 Oct, 2007 1 commit
    • Dan Williams's avatar
      2007-10-19 Dan Williams <dcbw@redhat.com> · 42a732d9
      Dan Williams authored
      	Split the GetSecrets() call off to a separate D-Bus interface so that it
      	can be more easily locked down with D-Bus policy.  Only 'root' (ie, NM)
      	should be able to call GetSecrets().
      	* include/NetworkManager.h
      		- Define the connection secrets D-Bus interface
      	* src/vpn-manager/nm-vpn-connection.c
      		- (clear_need_auth): get the right proxy object for the connection
      			secrets interface
      		- (get_connection_secrets): use the connection secrets proxy; send
      			empty hints in get secrets request
      	* src/nm-activation-request.c
      		- (nm_act_request_request_connection_secrets): use the connection
      			secrets proxy; send empty hints in get secrets request
      	* src/nm-manager.c
      		- (connection_get_settings_cb): set the connection secrets proxy on
      			the connection object too
      		- (internal_new_connection_cb): create the connection secrets proxy
      	* introspection/nm-settings-connection.xml
      		- Define Connection.Secrets interface and move GetSecrets there
      		- Add a 'hints' argument to GetSecrets
      	* libnm-glib/nm-settings.c
      		- (impl_connection_settings_get_secrets): add 'hints' argument
      git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2989 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
  19. 25 Sep, 2007 1 commit
    • Dan Williams's avatar
      2007-09-25 Dan Williams <dcbw@redhat.com> · 1817c620
      Dan Williams authored
      	Properly re-query secrets from the settings daemon when stuff fails.
      	* src/nm-device-802-11-wireless.c
      		- (ap_auth_enforced): handle static WEP correctly here by differentiating
      			between Shared Key and Open System auth modes
      		- (link_timeout_cb, supplicant_connection_timeout_cb,
      		   real_act_stage4_ip_config_timeout): clear existing secrets and
      			request new ones when something fails due to a suspected wrong key
      		- (real_act_stage2_config): fix for new request_new argument to
      	* src/nm-manager.c
      		- (nm_manager_get_connection_secrets): return error status; pass
      			new request_new argument on to the settings daemon
      	* introspection/nm-settings-connection.xml
      		- New 'request_new' argument to the GetSecrets call that hints to the
      			settings daemon to ask the user for completely new secrets
      	* libnm-glib/nm-settings.c
      		- (impl_connection_settings_get_secrets): handle new 'request_new'
      git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2872 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
  20. 20 Sep, 2007 1 commit
  21. 09 Sep, 2007 1 commit
    • Dan Williams's avatar
      2007-09-09 Dan Williams <dcbw@redhat.com> · b1872d9a
      Dan Williams authored
      	Stupid mistake on my part; object path and interface for settings service
      	and connection objects can be the same, only the service name must be
      	different for the system and user settings services.
      	* include/NetworkManager.h
      		- (nm_connection_settings_init, query_user_connections,
      		   new_connection_cb): Unify NetworkManagerSettings and Connection
      		   interface name and object path
      git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2772 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
  22. 29 Aug, 2007 1 commit
  23. 03 Aug, 2007 1 commit