Commit Graph

168 Commits

Author SHA1 Message Date
Dan Williams
f2e186bccd ifcfg-rh: add testcases for WPA-EAP TLS connections 2009-04-14 09:07:46 -04:00
Dan Williams
e53c04091d ifcfg-rh: fix loading TLS private keys and WPA-EAP key management 2009-04-14 09:07:37 -04:00
Dan Williams
1535031f97 ifcfg-rh: add testcases for wired PEAP/MSCHAPV2 connections 2009-04-14 09:07:27 -04:00
Dan Williams
f72319b515 ifcfg-rh: fix bugs parsing 802.1x connections 2009-04-14 09:07:17 -04:00
Dan Williams
e6e9e612d7 ifcfg-rh: read wired 802.1x connections 2009-04-14 09:07:11 -04:00
Dan Williams
fdbc72905a ifcfg-rh: read TTLS connections 2009-04-14 09:07:06 -04:00
Dan Williams
e7214b4998 ifcfg-rh: read PEAP connections
And a ton of refactoring to help handle TTLS.
2009-04-14 09:07:00 -04:00
Dan Williams
6d0cdf172e ifcfg-rh: parse eap methods 2009-04-14 09:06:51 -04:00
Dan Williams
a0e635f455 ifupdown: inherit from NMSysconfigConnection to get PolicyKit authorization 2009-04-04 16:37:47 -04:00
Dan Williams
8baebe2a47 ifcfg-rh: remove leftover debugging stuff from cea2885aa733ef86d0889e478886d410f9f95a98 2009-04-04 11:42:56 -04:00
Dan Williams
63f2c0bfbe system-settings: protect system connection secrets with PolicyKit
So that normal users who have PolicyKit authorization to edit system connections
can read secrets, move system connection secrets logic into the system connection
service from libnm-glib, and protect it with PolicyKit checks.  Convert the
ifcfg-rh plugin over to using NMSysconfigConnection so that it can take advantage
of the new PolicyKit protection.
2009-04-04 11:42:48 -04:00
Dan Williams
c2c0a4e4e0 keyfile: fix chmod() error checking 2009-03-27 16:52:08 -04:00
Dan Williams
3da47fd00f ifcfg-rh: don't reverse lookup on 'localhost' unless NM_IGNORE_HOSTNAME_LOCALHOST=yes (rh #490184) 2009-03-23 16:43:25 -04:00
Dan Williams
dc54f52fb5 ifcfg-rh: treat lack of ONBOOT as autoconnect=true (rh #489422) 2009-03-10 10:25:53 -04:00
Alexander Sack
1bb029c395 ifupdown: fix mapping for 'password', 'identity', and 'key' 2009-03-03 12:58:33 -05:00
Alexander Sack
a36d57d2c1 ifupdown: handle previously unsupported format for wifi keys (debian #513874) 2009-03-03 12:56:44 -05:00
Alexander Sack
89278327ee ifupdown: fix crash for wireless-ssid setting (debian #513852) 2009-03-03 12:55:58 -05:00
Dan Williams
cad0c12347 keyfile: fix testcase build 2009-03-02 13:38:28 -05:00
Dan Williams
899ef9b200 ifcfg-rh: add testcases
With a few fixes to WPA support found while writing the testcases.
2009-03-01 19:04:55 -05:00
Dan Williams
2285838cbb ifcfg-rh: move reader/writer to separate utility library 2009-02-28 07:08:19 -05:00
Dan Williams
984b07d5ea ifcfg-rh: first pass at WPA-PSK support 2009-02-27 13:28:20 -05:00
Dan Williams
c3dfea0e06 keyfile: include <sys/types.h> for uid_t (bgo #573281) 2009-02-26 12:44:32 -05:00
Dan Williams
89c27ea060 ifcfg-rh: use DHCP for minimal ifcfg files containing only DEVICE and HWADDR 2009-02-25 15:24:16 -05:00
Dan Williams
451e2942da system-settings: implement common GetSettings and GetSecrets methods (rh #486696)
Fix a few problems... No plugin should return secrets in the GetSettings method,
which some plugins did.  When that was committed in the commit "system-settings:
don't return secrets in the settings", it broke those plugins that didn't implement
GetSecrets.  Each plugin can actually use the same code for GetSettings and
GetSecrets, so implement those generically in the NMExportedConnection class and
remove plugin-specific implementations that all did the same thing.
2009-02-22 17:35:47 -05:00
Dan Williams
3feb016594 ifcfg-rh: ignore explicitly set 'localhost' hostnames (rh #441453)
To match 'network' service behavior, which would perform reverse
address lookups when the HOSTNAME from /etc/sysconfig/network
was 'localhost' or 'localhost.localdomain'.  Just name your machine
already.
2009-02-19 15:51:30 -05:00
Dan Williams
53d76d8bac system-settings: don't return secrets in the settings
Since only authorized users should be able to get secrets, don't return
them in the GetSettings handlers; callers need to use GetSecrets instead.
2009-02-18 14:02:35 -05:00
Dan Williams
73659e724c makefile cleanups
0.7 requires dbus 1.1 or greater (for system bus activation), so make that
explicit, and remove compat code for D-Bus 0.6 and earlier.  Consolidate
the various glib pkgconfig checks into one, since most anything will require
gthread, glib, and gobject anyway.  Fixup the docs makefile to be more
automake-compatible and let 'make clean' actually work correctly when
docs are built.
2009-02-15 11:20:25 -05:00
Dan Williams
47f4d9945e ifcfg-rh: silence message about ignoring loopback config (rh #484060) 2009-02-04 11:28:27 -05:00
Dan Williams
fbb20f04ad ifcfg-rh: help prevent rh#476089 in the future 2009-01-22 19:38:19 -05:00
Przemysław Grzegorczyk
bac45aa0d5 clean up glib includes (bgo #564376)
Only <glib.h> and <gtk/gtk.h> need to be included.
2009-01-19 00:16:40 -05:00
Dan Williams
59bc300cee move test functions somewhere commonly accessible 2009-01-18 18:43:18 -05:00
Dan Williams
e207a458c4 keyfile: read & write nicely formatted BSSIDs 2009-01-13 13:04:24 -05:00
Dan Williams
07d3ffbcec keyfile: write nicely formatted MAC addresses; clean up "special" key handling
Add testcases for keyfile ip4-config setting writing too.
2009-01-12 18:23:30 -05:00
Dan Williams
45f2f1144d keyfile: read MAC addresses and a test framework
Clean up handling of "special" keys in keyfiles, ie ones that
need more processing than the basic GKeyFile API supports.  Add
MAC address reading (writing support to come).

Additionally, add some test bits for the keyfile plugin that get
run on 'make check'.
2009-01-12 14:21:44 -05:00
Chuck Anderson
3d81c82e58 ifcfg-rh: fix IP4 address fallbacks
Previous code forgot to clear a temporary variable when reading IPv4
addresses from ifcfg files, and when the value being read wasn't in the
ifcfg file, it could set wrong values in the connection for that variable
even though it didn't exist.
2009-01-08 12:51:13 -05:00
Dan Williams
3f907cb9e3 License header and FSF address update 2008-12-20 09:46:41 -05:00
Dan Williams
948ee274da 2008-12-09 Dan Williams <dcbw@redhat.com>
* libnm-util/libnm-util.ver
	  libnm-util/nm-setting-ip4-config.c
	  libnm-util/nm-setting-ip4-config.h
		- Add 'never-default' property, which when true indicates that a
			connection should never be the default connection

	* src/nm-ip4-config.c
	  src/nm-ip4-config.h
		- (nm_ip4_config_get_never_default, nm_ip4_config_set_never_default):
			Add never-default helpers

	* src/NetworkManagerUtils.c
		- (nm_utils_merge_ip4_config): update never-default when merging the
			IP4 setting to the IP4 config

	* src/NetworkManagerSystem.c
		- (nm_system_apply_ip4_config): if the connection is never-default,
			don't add routes without a gateway

	* src/NetworkManagerPolicy.c
		- (get_best_device): don't let never-default connections be the best
		- (update_routing_and_dns): handle never-default for VPN connections

	* system-settings/plugins/ifcfg-rh/reader.c
		- (make_ip4_setting): handle never-default by checking GATEWAYDEV



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/branches/NETWORKMANAGER_0_7@4378 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-12-09 20:01:49 +00:00
Dan Williams
f6225d7a94 2008-11-26 Dan Williams <dcbw@redhat.com>
* libnm-glib/nm-settings.c
	  libnm-glib/nm-settings.h
		- (nm_exported_connection_delete): rename 'delete' to 'do_delete' to
			avoid using C++ reserved keywords in headers

	* libnm-glib/nm-dbus-connection.c
	  system-settings/plugins/ifcfg-rh/nm-ifcfg-connection.c
	  system-settings/plugins/ifcfg-suse/nm-suse-connection.c
	  system-settings/plugins/ifupdown/nm-ifupdown-connection.c
	  system-settings/plugins/keyfile/nm-keyfile-connection.c
	  system-settings/src/nm-sysconfig-connection.c
		- Change 'delete' to 'do_delete'



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@4343 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-11-27 00:00:14 +00:00
Dan Williams
04be05e59f 2008-11-25 Dan Williams <dcbw@redhat.com>
* system-settings/plugins/ifcfg-rh
		- Rename 'ifcfg-fedora' to 'ifcfg-rh'; it's not just used on Fedora

	* system-settings/src/main.c
		- (load_plugins): transparently handle ifcfg-fedora as ifcfg-rh



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@4337 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-11-25 22:42:21 +00:00
Tambet Ingo
168518360f 2008-11-21 Tambet Ingo <tambet@gmail.com>
* system-settings/plugins/ifcfg-suse/parser.c (read_wpa_eap_settings): Make suse
	plugin compile again.

git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@4323 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-11-21 07:40:25 +00:00
Dan Williams
93f1c85b26 2008-11-20 Dan Williams <dcbw@redhat.com>
Patch from Tambet Ingo <tambet@gmail.com>

	* libnm-util/nm-setting.c
	  libnm-util/nm-setting.h
		- (NMSettingValueIterFn): instead of just a gboolean for secrets, take
			all the GParamSpec flags of the property

	* system-settings/plugins/keyfile/nm-keyfile-connection.c
	  system-settings/plugins/keyfile/reader.c
	  system-settings/plugins/keyfile/writer.c
		- Update for NMSettingValueIterFn change



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@4322 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-11-20 21:23:55 +00:00
Dan Williams
c47cdcf0e7 2008-11-19 Dan Williams <dcbw@redhat.com>
* libnm-util/nm-setting.h
	  libnm-util/nm-setting.c
	  src/nm-device.c
	  src/nm-manager.c
	  system-settings/plugins/ifcfg-fedora/plugin.c
		- Prefix compare flag defines with NM_SETTING_



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@4299 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-11-19 16:20:47 +00:00
Dan Williams
3c2d8253ec 2008-11-19 Dan Williams <dcbw@redhat.com>
* libnm-util/nm-connection.c
	  libnm-util/nm-connection.h
		- (nm_connection_replace_settings): take a GError

	* libnm-glib/nm-settings.c
	  libnm-glib/nm-dbus-connection.c
	  src/nm-manager.c
	  system-settings/plugins/ifcfg-suse/nm-suse-connection.c
	  system-settings/plugins/keyfile/nm-keyfile-connection.c
	  system-settings/plugins/keyfile/plugin.c
		- Handle, or don't handle, errors from nm_connection_replace_settings()



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@4298 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-11-19 15:09:05 +00:00
Dan Williams
2eda405743 Clarify missing/invalid prefix message
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@4295 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-11-17 18:50:20 +00:00
Dan Williams
43c782ac7d 2008-11-17 Dan Williams <dcbw@redhat.com>
* system-settings/plugins/ifcfg-fedora/reader.c
		- (read_mac_address): clean up
		- (make_wireless_setting): pass NULL array to read_mac_address() like it
			expects

	* system-settings/plugins/ifcfg-fedora/plugin.c
		- (read_one_connection): don't segfault on NULL errors



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@4294 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-11-17 18:39:20 +00:00
Tambet Ingo
e4ae149b37 2008-11-12 Tambet Ingo <tambet@gmail.com>
* system-settings/plugins/keyfile/nm-keyfile-connection.c (copy_one_secret)
	(add_secrets): Don't add empty secrets to the secrets hash table.

git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@4279 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-11-12 13:20:06 +00:00
Dan Williams
1259398b68 Address (if it exists) was previously validated
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@4269 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-11-05 19:06:06 +00:00
Dan Williams
201fd4ed8e 2008-11-03 Dan Williams <dcbw@redhat.com>
* system-settings/src/main.c
		- (add_default_dhcp_connection): make the fallback connection read-only

	* libnm-glib/nm-settings.c
	  libnm-glib/nm-settings.h
		- Add detailed errors
		- (impl_exported_connection_update, impl_exported_connection_delete):
			return an error if the connection is read-only

	* system-settings/plugins/ifupdown/nm-ifupdown-connection.c
	  system-settings/plugins/keyfile/nm-keyfile-connection.c
	  system-settings/src/main.c
		- Use more detailed errors

	* system-settings/src/nm-system-config-error.c
	  system-settings/src/nm-system-config-error.h
	  system-settings/src/dbus-settings.c
		- Remove NM_SYSCONFIG_SETTINGS_ERROR_INVALID_CONNECTION, replaced by
			NM_SETTINGS_ERROR_INVALID_CONNECTION



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@4254 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-11-03 22:32:49 +00:00
Dan Williams
d576e409d4 Ignore case
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@4253 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-11-03 19:36:40 +00:00
Dan Williams
e07a6743e8 Update license headers
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@4251 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-11-03 16:08:13 +00:00