Commit Graph

219 Commits

Author SHA1 Message Date
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
Dan Williams
583dd00fc1 ifcfg-rh: use correct initial size for storing SSID 2009-04-14 09:09:54 -04:00
Dan Williams
bebe3e891b ifcfg-rh: fix read/write of EAP-TLS connections
TLS uses the 'identity' which previously wasn't read.  The private key
password should also only be used for PKCS#12 files, becuase they aren't
decrypted when read into the setting.

Private keys also need to be handled differently; PKCS#12 keys are written
out unchanged (ie, still encrypted) with their corresponding private key.
DER keys are stored in the setting unencrypted, so they are re-encrypted
before being written out to disk.  But because the private key password
isn't known for DER keys, a random password must be used to re-encrypt
the key.
2009-04-14 09:09:43 -04:00
Dan Williams
f4c1b422cf ifcfg-rh: fix writing multiple WPA & WPA ciphers 2009-04-14 09:09:37 -04:00
Dan Williams
8bbe884d0c ifcfg-rh: ensure certificates & private keys are mode 0600
g_file_set_contents() doesn't allow us to specify the mode, so roll
our own version.
2009-04-14 09:09:30 -04:00
Dan Williams
b564bfb5e2 ifcfg-rh: fix reading/writing PEAP and wired 802.1x connections 2009-04-14 09:09:25 -04:00
Dan Williams
6566900310 ifcfg-rh: add testcase for WPA2-PSK 2009-04-14 09:09:19 -04:00
Dan Williams
b6700bcb63 ifcfg-rh: fix reading of WPA allowed protocols 2009-04-14 09:09:13 -04:00
Dan Williams
0ee2250583 ifcfg-rh: test and fix up wifi WEP connection writing 2009-04-14 09:09:01 -04:00
Dan Williams
e3a309d694 ifcfg-rh: remove temp ifcfg file 2009-04-14 09:08:54 -04:00
Dan Williams
ecb8a0658c ifcfg-rh: don't free unused array if wifi no HWADDR 2009-04-14 09:08:49 -04:00
Dan Williams
f40d502492 ifcfg-rh: don't write LAST_CONNECT if it's 0 2009-04-14 09:08:44 -04:00
Dan Williams
5ebed3ebfa ifcfg-rh: fix wifi channel and MTU read/write 2009-04-14 09:08:38 -04:00
Dan Williams
c6fe990ba4 ifcfg-rh: fix dhcp-client-id 2009-04-14 09:08:27 -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
865163d041 ifcfg-rh: add tests for Dynamic WEP + TTLS + CHAP 2009-04-14 09:08:03 -04:00
Dan Williams
91e946718b ifcfg-rh: add WPA EAP-TTLS + TLS testcase & fixes 2009-04-14 09:07:57 -04:00
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
16a645761f CVE-2009-0365: only allow root to ask for secrets 2009-03-03 11:49:19 -05:00
Dan Williams
cad0c12347 keyfile: fix testcase build 2009-03-02 13:38:28 -05:00
Dan Williams
eacaeb839b system-settings: make default wired connections less confusing
The "Auto ethX" connection that the system settings service creates
for each wired device that does not have an existing backing connection
provided by one of the system settings plugins is now read/write when
at least one plugin has the MODIFY capability.

When the user updates the "Auto ethX" connection, the system settings
service will try to move that connection to a plugin, thereby preserving
the user's changes.  It will also then save that device's MAC address
and never create an "Auto ethX" connection for it again.
2009-03-02 12:58:45 -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
3888405134 dbus: final dbus policy fixes (bgo #563730)
Keep explicit denials, consolidate stuff, ensure that when denying
send_interface it's almost always matched with send_destination.
2009-02-17 10:43:53 -05:00
Dan Williams
f90d079858 system-settings: fix shutdown issues
Shutdown on SIGTERM, and don't segfault when quitting cleanly.  Can't
send signals on an object that's being disposed of, so don't do that.
Fix a memory leak of the Hal manager's priv->devices on shutdown, not
that it matters.
2009-02-17 10:42:25 -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