Commit Graph

259 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
dc7fe96e3f ifcfg-rh: fix IPv6-only configurations (rh #538499) 2010-04-12 16:24:07 -07:00
Jiří Klimeš
ab529302a7 ifcfg-rh: fix setting MTU to "automatic" for wired connections (rh #569319)
ifcfg-rh plugin was not able to reset MTU to "automatic" if it had been
set to a value, for wired connection. This fix removes "MTU" variable
from the ifcfg-* file when mtu is 0.
2010-04-12 17:15:28 +02:00
Jiří Klimeš
639ae507e1 keyfile: don't free GError when it's NULL (after connection's successful update) 2010-03-09 11:10:58 +01:00
Dan Williams
3abf5f30bf system-settings: fix plugins for /etc/NetworkManager/NetworkManager.conf 2010-03-06 00:18:28 -08:00
Jirka Klimes
0f0daf7852 core: determine classful IPv4 prefix if no DHCP netmask is provided (bgo #603098) 2010-02-25 16:52:10 -08:00
Dan Williams
23f26b300f Merge remote branch 'origin/dhcp6' 2010-02-18 10:17:47 -08:00
Dan Williams
6136bca71f ifcfg-rh: add missing file to fix distcheck 2010-02-18 08:10:18 -08:00
Dan Williams
37e8ae824e ifupdown: don't tell NM about connections until we check 'managed' (lp:450458)
Otherwise it causes connections that we don't want exported to leak
out and be shown in the connection editor even though the device
isn't supposed to be managed.
2010-02-18 07:55:34 -08: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
c218be1165 keyfile: add testcase for MAC address case
To make sure you can specify the MAC in either upper and lowercase.
2010-02-12 11:11:45 -08:00
Michael Biebl
2a7a4ebaf6 ifupdown: interpret allow-hotplug as autoconnect (debian #568784) 2010-02-08 09:34:28 -08:00
Dan Williams
13af29f693 ifcfg-rh: read and write DHCPv6 connections 2010-01-22 12:04:52 -08:00
Dan Williams
79303517ee ifcfg-rh: formatting fix 2010-01-20 16:37:49 -08:00
Dan Williams
14aef3678a ifcfg-rh: handle missing PREFIX by generating one
Based on what the initscripts do with ipcalc, which was tripping
a few people up when they forgot to do PREFIX/NETMASK.
2010-01-20 16:34:23 -08:00
Dan Williams
79db492854 ifcfg-rh: ensure IPv6 addresses are cleared when none get written out 2010-01-20 16:30:06 -08:00
Jirka Klimes
a74e2cfde0 keyfile: add IPv6 support (bgo #593814)
(fixes by dcbw to use '/' as the prefix separator)
2010-01-08 11:23:39 -08:00
Jirka Klimes
686425adce ifcfg-rh: add IPv6 addressing and routes support (rh #523288) 2010-01-05 19:06:27 -06:00
Dan Williams
97ab9c8497 ifcfg-rh: add missing testcase 2010-01-01 13:58:34 -06: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
f012d06531 ifcfg-rh: remove another unused variable 2009-12-23 11:11:30 -08:00
Dan Williams
16c29e6daf ifcfg-rh: remove unused variables 2009-12-23 11:11:11 -08:00
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