Commit Graph

79 Commits

Author SHA1 Message Date
Jiri Popelka
04c8ec7360 libnm-util: new 'zone' property for NMSettingConnection
Used to indicate what firewall zone the interface should be in
when the connection is active.
2011-11-09 21:40:12 -06:00
Dan Williams
864db9f9e8 libnm-util: add new compare flags for ignoring various types of secrets
It turns out we need a way to ignore transient (agent-owned or unsaved)
secrets during connection comparison.  For example, if the user is
connecting to a network where the password is not saved, other
changes could trigger a writeout of that connection to disk when
connecting, which would the connection back in due to inotify, and the
re-read connection would then no longer be recognized as the same as
the in-memory connection due to the transient secret which obviously
wasn't read in from disk.

Adding these compare flags allows the code to not bother writing the
connection out to disk when the only difference between the on-disk
and in-memory connections are secrets that shouldn't get written to
disk anyway.
2011-06-07 18:22:48 -05:00
Dan Williams
bc991b8ff2 libnm-util: fix introspection annotation (bgo #646335) 2011-04-02 08:53:43 -05:00
Dan Williams
b6c436d8d7 libnm-util: reject detail in permissions for now
Already did this in the permissions accessors, this mirrors that
behavior in the GObject property setters.
2011-02-13 00:21:41 -06:00
Dan Williams
2ef55166c8 libnm-util: fix parsing permission if it includes detail 2011-02-11 23:05:53 -06:00
Dan Williams
1c97de837a libnm-util: rework permissions helpers to be more useful
Add add/remove helpers, and make get more useful by actually breaking
down the specifics for us.
2011-02-07 18:35:48 -06:00
Dan Williams
75a1ab9a43 libnm-util: add utility functions for adding/removing permissions 2011-02-07 17:24:50 -06:00
Dan Williams
ca063e4d0c libnm-util: add nm_setting_connection_permissions_has_user()
Utility function to determine whether a given username is in the ACL.
2010-11-18 10:36:18 -06:00
Dan Williams
82772191a9 libnm-util: simplify permissions somewhat; remove groups
Groups may come later, but they are also quite a bit more complicated
because getting the groups a user is in may require network access
if that user is backed by LDAP.  And it gets worse because you have
no idea that the glibc calls like getgrouplist(3) are backed by
the network and may take an arbitrary amount of time to complete.
Punt that.
2010-10-12 17:55:08 -05:00
Daniel Gnoutcheff
94d26709cc WIP: libnm-util: added "permissions" property 2010-08-09 20:01:19 -04:00
Jiří Klimeš
f97c0369c0 doc: fix a typo 2010-03-08 10:59:16 +01:00
Dan Williams
14089e8b26 doc: update some setting properties descriptions 2009-11-10 12:36:20 -08:00
Dan Williams
74fbda9b85 doc: fixes 2009-08-30 23:31:07 -05:00
Dan Williams
b582b4e384 docs: clarify UUID property, document NMSettingCdma 2009-07-12 10:27:10 -04:00
Dan Williams
eee3c4ceb2 libnm-util: validate connection uuid 2009-05-03 01:09:34 -04:00
Dan Williams
b61b199776 libnm-util: flag properties with G_PARAM_CONSTRUCT so default values get set
This caused the 'autoconnect' property of NMSettingConnection to not
get updated in some cases (as when a system setting plugin noticed a
change to autoconnect=true and emitted the Updated signal, which wouldn't
contain the new value).  Add a testcase for setting default values too.
2009-02-01 20:18:21 -05:00
Dan Williams
154f2f4534 libnm-util: default 'autoconnect' to true
Like the NetworkManagerConfigurationSpecification wiki page has stated for
quite a long time.
2009-01-27 11:31:21 -05:00
Dan Williams
ccbd9155ec Documentation updates
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@4331 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-11-24 04:30:36 +00:00
Dan Williams
c438326110 2008-10-27 Dan Williams <dcbw@redhat.com>
Patch from Tambet Ingo <tambet@gmail.com>

	* libnm-util/nm-setting.h
	  libnm-util/nm-setting.c
		- Make properties private and add accessor functions

	* libnm-util/nm-connection.c
	  libnm-util/nm-setting-8021x.c
	  libnm-util/nm-setting-cdma.c
	  libnm-util/nm-setting-connection.c
	  libnm-util/nm-setting-gsm.c
	  libnm-util/nm-setting-ip4-config.c
	  libnm-util/nm-setting-ip6-config.c
	  libnm-util/nm-setting-ppp.c
	  libnm-util/nm-setting-pppoe.c
	  libnm-util/nm-setting-serial.c
	  libnm-util/nm-setting-template.c
	  libnm-util/nm-setting-vpn.c
	  libnm-util/nm-setting-wired.c
	  libnm-util/nm-setting-wireless-security.c
	  libnm-util/nm-setting-wireless.c
	  system-settings/plugins/keyfile/reader.c
	  system-settings/plugins/keyfile/writer.c
		- Use setting accessors



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@4228 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-10-27 17:36:18 +00:00
Dan Williams
519f8cd6c9 2008-10-27 Dan Williams <dcbw@redhat.com>
* libnm-util/libnm-util.ver
	  libnm-util/nm-setting-connection.c
	  libnm-util/nm-setting-connection.h
		- Add a 'read-only' property that indicates the connection cannot be
			modified

	* system-settings/plugins/ifcfg-fedora/reader.c
	  system-settings/plugins/ifcfg-suse/parser.c
	  system-settings/plugins/ifupdown/parser.c
		- These plugins are read-only at the moment

	* system-settings/plugins/keyfile/reader.c
	  system-settings/plugins/keyfile/writer.c
		- Read-only shouldn't get saved out to files or read in from them



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@4227 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-10-27 17:07:42 +00:00
Dan Williams
7d723b54a4 2008-10-26 Dan Williams <dcbw@redhat.com>
Patch from Tambet Ingo <tambet@gmail.com>

	* libnm-util/libnm-util.ver
	  libnm-util/nm-setting-connection.c
	  libnm-util/nm-setting-connection.h
		- Make properties private and add accessor functions

	* src/NetworkManagerPolicy.c
	  src/nm-cdma-device.c
	  src/nm-device-ethernet.c
	  src/nm-device-interface.c
	  src/nm-device-wifi.c
	  src/nm-gsm-device.c
	  src/nm-manager.c
	  src/ppp-manager/nm-ppp-manager.c
	  src/vpn-manager/nm-vpn-connection.c
	  system-settings/plugins/ifcfg-fedora/nm-ifcfg-connection.c
	  system-settings/plugins/ifcfg-fedora/plugin.c
	  system-settings/plugins/ifcfg-fedora/reader.c
	  system-settings/plugins/ifcfg-suse/parser.c
	  system-settings/plugins/ifupdown/parser.c
	  system-settings/plugins/keyfile/nm-keyfile-connection.c
	  system-settings/plugins/keyfile/plugin.c
	  system-settings/plugins/keyfile/writer.c
	  system-settings/src/main.c
		- Use those accessors



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@4220 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-10-26 17:41:37 +00:00
Dan Williams
81f8f39920 2008-08-26 Dan Williams <dcbw@redhat.com>
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
	service.

	* configure.in
	  libnm-util/Makefile.am
		- Require libuuid

	* introspection/nm-exported-connection.xml
		- Remove "GetID" method

	* libnm-glib/nm-dbus-connection.c
	  libnm-glib/nm-settings.c
	  libnm-glib/nm-settings.h
		- Remove id-related stuff

	* libnm-util/nm-utils.c
	  libnm-util/nm-utils.h
	  libnm-util/libnm-util.ver
		- (nm_utils_uuid_generate, nm_utils_uuid_generate_from_string): Add
			utility functions to generate UUIDs

	* libnm-util/nm-setting-connection.c
	  libnm-util/nm-setting-connection.h
		- Add 'uuid' member to the connection setting
		- (verify): require valid 'uuid' for a valid connection

	* system-settings/plugins/ifcfg-fedora/nm-ifcfg-connection.c
	  system-settings/plugins/ifcfg-fedora/reader.c
	  system-settings/plugins/ifcfg-suse/nm-suse-connection.c
	  system-settings/plugins/ifcfg-suse/parser.c
	  system-settings/plugins/keyfile/nm-keyfile-connection.c
	  system-settings/src/main.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
2008-08-27 02:57:21 +00:00
Dan Williams
281791ac77 2008-07-27 Dan Williams <dcbw@redhat.com>
* libnm-util/*
		- Relicense to LGPLv2+



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3859 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-07-27 20:03:46 +00:00
Dan Williams
05e9de9402 2008-06-12 Dan Williams <dcbw@redhat.com>
Add a GError argument to nm_connection_verify() and nm_setting_verify(),
	and add error enums to each NMSetting subclass.  Each NMSetting subclass now
	returns a descriptive GError when verification fails.



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3751 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-06-12 23:58:08 +00:00
Dan Williams
63ac0d725e 2008-04-02 Dan Williams <dcbw@redhat.com>
* libnm-util/nm-setting-connection.c
	  libnm-util/nm-setting-connection.h
		- (set_property, get_property, nm_setting_connection_class_init): remove
			the 'lockdown' property; it's functionality will be replaced by
			PolicyKit instead



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3525 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-04-02 17:36:07 +00:00
Dan Williams
316abd62fd 2008-02-20 Dan Williams <dcbw@redhat.com>
* libnm-util/nm-connection.c
	  libnm-util/nm-connection.h
		- (nm_connection_compare): accept compare flags and pass them to the
			setting compare function

	* libnm-util/nm-setting.c
	  libnm-util/nm-setting.h
		- (nm_setting_compare): accept compare flags; ignore properties that are
			marked fuzzy

	* libnm-util/nm-setting-connection.c
	  libnm-util/nm-setting-wireless.c
	  libnm-util/nm-setting-ppp.c
	  libnm-util/nm-setting-wired.c
		- Mark some setting properties as ignorable when doing a fuzzy compare

	* src/nm-device.c
		- (device_activation_precheck): use exact compare



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3336 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-02-21 04:34:34 +00:00
Dan Williams
5b83f339fe 2007-12-24 Dan Williams <dcbw@redhat.com>
* libnm-util/nm-setting-connection.h
	  libnm-util/nm-setting-connection.c
		- Add 'lockdown' member



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3187 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-12-24 23:45:16 +00:00
Dan Williams
dcc6b2a9c0 2007-11-15 Dan Williams <dcbw@redhat.com>
* libnm-util/nm-setting-connection.h
	  libnm-util/nm-setting-connection.c
		- Rename the 'name' property to 'id', because it conflicted with the
			NMSetting superclass' 'name' property.

	* libnm-util/nm-setting.c
		- (nm_setting_to_hash): serialize the 'name' property
		- (one_property_cb): ignore 'name' on deserialization of a connection

	* src/nm-device-802-11-wireless.c
	  src/vpn-manager/nm-vpn-connection.c
	  src/NetworkManagerPolicy.c
		- Fix up for NMSettingConnection 'name'->'id' changes



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3084 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-11-15 15:52:42 +00:00
Tambet Ingo
6b79d40a76 2007-11-07 Tambet Ingo <tambet@gmail.com>
Rework NMSetting structures: Move each setting to it's own file.
        Convert to GObject. Remove home grown setting types and use
GTypes.
        Use GObject property introspection for hash conversion,
enumerating
        properties, etc.

        * libnm-util/nm-setting-connection.[ch]
        * libnm-util/nm-setting-ip4-config.[ch]
        * libnm-util/nm-setting-ppp.[ch]
        * libnm-util/nm-setting-vpn.[ch]
        * libnm-util/nm-setting-vpn-properties.[ch]
        * libnm-util/nm-setting-wired.[ch]
        * libnm-util/nm-setting-wireless.[ch]
        * libnm-util/nm-setting-wireless-security.[ch]

        New files, each containing a setting.

        * libnm-util/nm-setting-template.[ch]: A template for creating
        * new
        settings. To use it, just replace 'template' with the new
setting
        name, and you're half-way done.

        * libnm-util/nm-setting.c: Convert to GObject and use GObject
        introspection instead of internal types and tables.

        * libnm-util/nm-connection.c: Adapt the new NMSetting work.

        * libnm-util/nm-param-spec-specialized.[ch]: Implement. Handles
        GValue types defined by dbus-glib for composed types like
collections,
        structures and maps.

        * src/*: The API of NMSetting and NMConnection changed a bit:
        * Getting
        a setting from connection takes the setting type now. Also,
since
        the settings are in multiple files, include relevant settings.



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3068 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-11-07 16:06:43 +00:00