Commit Graph

236 Commits

Author SHA1 Message Date
Tambet Ingo
b9ca266d94 ifcfg-suse: Clean up, upstream the patch which has been in use for a while
Since openSUSE 11.1 NetworkManager does not support reading yast network
setup. It's for your own good - you either want to use static configuration
(yast) or dynamic (NetworkManager). Mixing the two has never worked very well
and has caused a lot of confusion. The only exception to this is hostname
handling, which is handled by ifcfg-suse plugin.
2009-12-21 12:07:18 +02:00
Dan Williams
1e1be1cd57 ifcfg-rh: handle unquoted passphrases better
Before Sept. 2009 the writer may not have properly quoted passphrases,
so handle that.
2009-12-16 13:29:01 -08:00
Dan Williams
cbe313b447 ifcfg-rh: fix distcheck and tests after 9e93924cca
Since one test read in a file, wrote it out, and read it in again, we
have to be careful of whether srcdir == builddir or not.  If it doesn't,
then we need to remove the written-out connection file.  If it does, then
we don't want to remove that written-out connection file because it's
tracked by SCM.  Avoid the whole problem by writing it out to a separate
directory that we can always delete it from.
2009-12-08 17:28:51 -08:00
Jirka Klimes
9e93924cca ifcfg-rh: add routes file support (rh #507307)
Add support for reading and writing routes files for ifcfg connections.
2009-12-07 14:23:26 -08:00
Dan Williams
e0fb3125f9 ifcfg-rh: warn when device will be managed due to missing HWADDR (rh #545003) 2009-12-07 12:44:21 -08:00
Dan Williams
96a61a9909 ifcfg-rh: treat MODE=Auto as infrastructure mode 2009-12-04 11:10:22 -08:00
Dan Williams
9c371949bf core: use GChecksum (bgo #502494)
And remove cargo-culted internal stuff which is no longer needed.
The ifcfg-rh sha1 stuff wasn't even used anymore after the move to
certificate paths.
2009-12-03 10:55:02 -08: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
Gene Czarcinski
f7d7b3193d ifcfg-rh: interpret DEFROUTE as never-default (rh #528281)
Testcases and cleanups by dcbw.
2009-11-13 14:40:13 -08:00
Dan Williams
420ea0220c ifcfg-rh: ignore .rpmnew files (rh #509621) 2009-11-11 17:22:59 -08:00
Dan Williams
4eb2346b67 ifcfg-rh: fix writing LEAP connections 2009-10-19 10:20:25 -07:00
Dan Williams
679d548e09 ifcfg-rh: add testcase for (rh #528068) 2009-10-13 12:32:06 -07:00
Dan Williams
c31b3e4554 ifcfg-rh: recognize 'static' BOOTPROTO (rh #528068) 2009-10-08 16:18:04 -07:00
Alexander Sack
8b3ddc7c8a ifupdown: unmanage devices with "mapping" stanzas - lp:413622 bgo:591864 2009-10-05 19:53:54 +02:00
Dan Williams
28e2e44686 ifcfg-rh: really fix writing the WPA PSK and add testcase for it 2009-09-28 15:29:29 -07:00
Dan Williams
a5de3b9d88 ifcfg-rh: treat BOOTPROTO=none as static IP 2009-09-28 15:08:07 -07:00
Dan Williams
4f6eef9e77 ifcfg-rh: quote WPA passphrases when writing connections
The reader requires passphrases to be quoted, but the writer wasn't
doing that.  Hex PSKs were fine though.
2009-09-28 13:34:42 -07:00
Dan Williams
dbe2816c4c ifcfg-rh: handle BOOTPROTO errors better 2009-09-28 13:09:50 -07:00
Dan Williams
8c35e96b60 libnm-util: add nm_utils_rsa_key_encrypt() and fix crypto padding mixups
To be backwards compatible clients need to handle both paths to private
keys and the decrypted private key data, which is what used to get passed
in the private-key and phase2-private-key attributes of the 802.1x setting.
When moving a connection around between system-settings and user-settings,
if the private key is decrypted data, the settings service needs to store
that decrypted data somewhere so that the key can be sent to NM during
the connection process.

But we don't want to store the decrypted private key data, so we have to
re-encrypt it (possibly generating a private key password if one wasn't
sent with the decrypted data) and save it to disk, then send NM a path
to that private key during connection.

To help clients do this, and so that they don't have to carry around
multiple crypto implementations depending on whether they want to use
NSS or gnutls/gcrypt, add a helper to libnm-util.

Furthermore, I misunderstood a bunch of stuff with crypto padding when
writing the encrypt/decrypt functions long ago, so fix that up.  Don't
return padding as part of the decrypted data, and make sure to verify
the padding's expected lengths and values when decrypting.  Many thanks
to Nalin Dahyabhai for pointing me in the right direction.
2009-09-15 16:01:50 -07:00
Dan Williams
a371951fbc ifcfg-rh: clarify comment 2009-09-14 21:04:19 -07:00
Dan Williams
4e9f388376 Merge commit 'origin/master' into cert-paths 2009-09-14 13:38:19 -07:00
Alexander Sack
eeec1021b2 ifupdown: do not export any connection in managed=false mode - lp:291902 2009-09-04 18:02:24 +02:00
Alexander Sack
801203c3aa ifupdown: support mappings and don't track devices not referenced in any stanza lp:291564 2009-09-04 17:53:43 +02:00
Dan Williams
e5ed391f28 libnm-util: allow certificate/key paths
Overload the certificate and key properties to allow paths to the
certificates and keys using a special prefix for the property data.
Add API to libnm-util for easy certificate path handling, and
documentation for NMSetting8021x.
2009-09-04 09:07:00 -05:00
Dan Williams
cecf8f64c7 ifupdown: fix regression locking connections to their interfaces (lp #424092)
Reported and tirelessly tested by Noel Bergman <noel@devtech.com>
2009-09-03 20:43:26 -05:00
Dan Williams
58fcc8efe6 libnm-glib: libnm_glib -> libnm-glib
Bothered me for a long time; now that we've bumped the soname, we can
rename the library too.
2009-08-26 13:07:35 -05: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
537c2f1f86 build: always link locally-built libraries first (bgo #580131) 2009-08-20 12:31:17 -05:00
Dan Williams
107ac82208 build: fix distcheck 2009-08-13 09:18:26 -05:00
Dan Williams
650cbcc108 ifupdown: port to new settings API 2009-08-12 17:13:24 -05:00
Dan Williams
5be1f8e133 ifcfg-suse: port to new settings API 2009-08-12 17:13:08 -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
f64354d0cc Merge commit 'origin/master' into polkit1
Conflicts:
	system-settings/plugins/ifcfg-rh/nm-ifcfg-connection.c
2009-08-10 16:27:16 -05:00
Dan Williams
1d5a68db74 ifcfg-rh: read iBFT config and convert to NM IPv4 config 2009-08-07 12:13:54 -05:00
Dan Williams
e5347169f6 peap: add GTC as a recognized phase2 method (bgo #565065) (rh #451027) (lp #284211) 2009-07-29 14:08:54 -04: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
Alexander Sack
57b8e0bf18 ifupdown: fix miscast due to udev conversion 2009-07-02 09:26:55 -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
0408c149b5 system-settings: kill usage of sha1 since NM can handle passphrases now
Plugins no longer need to hash WPA passphrases, so there's no need to keep
sha1 stuff around unless its for hasing other stuff (ifcfg-rh uses sha1
for certificate hashing for example, but has a private copy).
2009-06-05 22:09:39 -04:00
Pablo Martí
6029288ffb libnm-util:keyfile: typo fixes 2009-06-03 09:27:44 -04:00
Michael Biebl
ae44aa59d1 Remove NULL in Makefile.am
Be consistent and don't use NULL, it's not defined anyway.
2009-05-02 18:01:20 -04:00
Dan Williams
b87c5495ea core: don't shadow basename (2) 2009-04-21 18:29:44 -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
80bb28eff2 ifcfg-rh: fix printf format of guint64 2009-04-14 18:47:46 -04:00
Dan Williams
5f76b1d480 ifcfg-rh: fix distcheck
distcheck's source dir is read-only, need to use the actual build dir
for temp stuff.
2009-04-14 18:12:07 -04:00
Dan Williams
5c3fe78d4b ifcfg-rh: fix writing TTLS-TLS connections and add testcases
Fixes memory leak where ifcfg structure wouldn't be closed on write error too.
2009-04-14 09:09:59 -04:00