Commit Graph

24 Commits

Author SHA1 Message Date
Dan Williams
5a9b7b42d1 ifcfg-rh: return valid errors to dbus-glib (rh #581794) 2010-04-22 14:19:50 -07:00
Dan Williams
6b7ec3894a ifcfg-rh: dbus method return values need to be allocated 2010-02-17 17:23:18 -08:00
Dan Williams
d0f5c92ed9 ifcfg-rh: provide an easy way to get connection UUID/path for tools
ifup/ifdown, nmcli, and possibly other tools need a way to get the
internally generated connection UUID and possibly it's path given
just the ifcfg file path.  Not all ifcfg files have the UUID in
the file, so ifcfg-rh generates one.  But external tools don't know
what that UUID is or what the logic that NM uses to generate it is.

Help them out a bit so that ifup/ifdown can easily poke NM given
just the ifcfg file.
2010-02-17 16:43:03 -08:00
Dan Williams
8b4095cb23 ifcfg-rh: ensure keys/route files are monitored for changes too
keys- and route- files weren't passing the should_ignore_file()
check in dir_changed() because should_ignore_file() was only
taking ifcfg- files into account.  Generalize most of the ifcfg name
handling functions so that should_ignore_file() will now handle
all three variants.

Add testcases to ensure that the name handling does what we want
it to, and optimize memory usage of utils_get_ifcfg_name() a bit.
2009-12-30 16:33:12 -06:00
Dan Williams
0bbdc6b0fc system-settings: generalize nm_sysconfig_connection_update() a bit
So that it can be the sole location where secrets caching happens.
2009-11-16 16:14:50 -08:00
Dan Williams
b135fa3265 system-settings: add helper for updating plugin connections
nm_connection_replace_settings() replaces the connection's settings
but doesn't allow interception of the new settings.  Plugins would then
send out the update signal, but secrets are scrubbed out of them to
ensure secrets aren't leaked out into D-Bus signals.

With NM 0.8 the system settings service was integrated into NM and
thus nm_connection_clear_secrets() acts directly on the system
settings plugins' NMConnection objects.  So when NM cleared secrets
(for example after determining that they might be bad in a device's
stage2 handler), we completely lost the secrets forever.

Adding this function allows the system settings service to hook into
the connection updates when the plugin connection's backing storage
(like config files or whatever) changes and cache the secrets for
use in NMSettingsConnectionInterface get_secrets() requestes.
2009-11-16 15:51:40 -08:00
Dan Williams
420ea0220c ifcfg-rh: ignore .rpmnew files (rh #509621) 2009-11-11 17:22:59 -08:00
Dan Williams
e2b13be3d9 Merge commit 'origin/master' into polkit1
Conflicts:
	libnm-glib/Makefile.am
	src/system-settings/nm-sysconfig-settings.c
	system-settings/plugins/ifcfg-rh/plugin.c
2009-08-21 14:12:31 -05:00
Dan Williams
9c0e929552 core: require gio
Which isn't a problem, since we already require glib-2.16 which
includes gio.  Thus, we can remove all the gfilemonitor compat
stuff.
2009-08-20 13:00:37 -05:00
Dan Williams
2164c14559 ifcfg-rh: use GHashTableIter a bit more 2009-08-12 17:11:07 -05:00
Dan Williams
890866bef9 system-settings: clean up settings service classes
Make NMSettingsService implement most of the NMSettingsInterface
API to make subclasses simpler, and consolidate exporting of
NMExportedConnection subclasses in NMSettingsService instead of
in 3 places.  Make NMSysconfigSettings a subclass of
NMSettingsService and save a ton of code.
2009-08-10 23:25:11 -05:00
Dan Williams
0d69dfe39e libnm-glib: implement new settings interfaces
The old NMExportedConnection was used for both client and server-side classes,
which was a mistake and made the code very complicated to follow.  Additionally,
all PolicyKit operations were synchronous, and PK operations can block for a
long time (ie for user input) before returning, so they need to be async.  But
NMExportedConnection and NMSysconfigConnection didn't allow for async PK ops
at all.

Use this opportunity to clean up the mess and create GInterfaces that both
server and client objects implement, so that the connection editor and applet
can operate on generic objects like they did before (using the interfaces) but
can perform specific operations (like async PK verification of callers) depending
on whether they are local or remote or whatever.
2009-07-23 09:20:52 -04:00
Dan Williams
c9067d8fed everything: use libgudev instead of HAL; merge NM and nm-system-settings
The only thing that doesn't work yet is the system-settings service's
"auto eth" connections for ethernet devices that don't have an existing
connection.  Might also have issues with unmanaged devices that can't
provide a MAC address until they are brought up, but we'll see.
2009-06-11 00:39:12 -04:00
Dan Williams
641af69086 ifcfg-rh: don't shadow basename 2009-04-21 18:23:07 -04:00
Dan Williams
42b4d04fe1 ifcfg-rh: don't check PolicyKit when on-disk ifcfg file changes (rh #495884)
The plugin called nm_exported_connection_update() which ended up checking
PolicyKit for authorization to update the connection, which of course fails
completely when it's just an inotify-triggered update.  inotify-triggered
updates don't need authorization because they require root access anyway.
2009-04-17 07:02:19 -04:00
Dan Williams
13c5e660de ifcfg-rh: read multiple IP addresses, more DNS servers, write more IP4 stuff
Add a simple testcase for write too.
2009-04-14 09:08:20 -04:00
Dan Williams
44964d3b5e ifcfg-rh: initial write support for wifi & wired 2009-04-14 09:08:14 -04:00
Dan Williams
1974b257e0 ifcfg-rh: begin adding write support 2009-04-14 09:08: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
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
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
47f4d9945e ifcfg-rh: silence message about ignoring loopback config (rh #484060) 2009-02-04 11:28:27 -05: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