Commit Graph

2464 Commits

Author SHA1 Message Date
Dan Williams
e68e27aa75 libnm-util: add 'flags' argument to nm_connection_to_hash() and nm_setting_to_hash()
Simplifies code internally, and makes it easier for clients as well in
some cases where they want to control what ends up in the resulting
hash and what does not.
2011-01-26 14:14:37 -06:00
Dan Williams
6fc469d74a agent: pass setting name back in secrets callback 2011-01-26 13:32:25 -06:00
Dan Williams
b3959aefa3 core: rename NMSysconfigConnection -> NMSettingsConnection 2011-01-26 11:38:12 -06:00
Dan Williams
d1979ba63e secrets: simplify GetSecrets call flow
The Settings.Connection interface is now only provided by NetworkManager
itself since there is only one settings service.  NM can validate
requests for secrets internally and thus there's no need to lock down
GetSecrets using a separate D-Bus interface, since PolicyKit provides
that functionality on systems where this is desirable (ie multi-user).
Single-user systems that do not have PolicyKit will inherently trust
the user already, or if not D-Bus auth is flexible enough to lock
down the GetSecrets method individually even if it's not on a separate
D-Bus interface.

Second, since only clients like connection editors or applets will be
calling the GetSecrets method, there's no need for 'hints' or
'request_new' arguments here since this  method should never trigger
an interactive secrets request.  Only NM should send those requests
when it knows it needs to ask the user, either during connection or
after validating the incoming GetSecrets request.  A connection editor
type application should never be able to trigger the normal
"What's your passphrase" dialog thats provided by the secret agent
for that user's session.
2011-01-26 10:17:07 -06:00
Dan Williams
4b6a86d748 dbus: remove obsolete interfaces from permissions 2011-01-26 09:58:22 -06:00
Dan Williams
9806a92eaa trivial: fix some possible uninitialized variable usage in error cases 2011-01-25 15:41:14 -06:00
Dan Williams
b7259fd2a8 Merge remote branch 'origin/master' into rm-userset 2011-01-25 15:41:03 -06:00
Dan Williams
bc6fc7b910 vpn: fix VPN active connection D-Bus API handling (bgo #569294)
Due to limitations in dbus-glib, where one GObject cannot have more
than one introspection XML object attached to it, we used to include
more than one <interface> in the VPNConnection object introspection
XML.  This was suboptimal for two reasons:

1) it duplicated the Connection.Active introspection XML which
made it harder for clients to use the introspection data in a
dynamic fashion, besides looking ugly in the docs

2) not many other programs use this feature of dbus-glib, which
means it didn't get a lot of testing, and broke, which sucks
for NM.

To fix this issue, create a base class for NMVpnConnection that
handles the Connection.Active API, and make NMVpnConnection itself
handle just the VPN pieces that it layers on top.  This  makes
dbus-glib happy because we aren't using two <interface> blocks
in the same introspection XML, and it makes the NM code more
robust because we can re-use the existing Connection.Active
introspection XML in the NMVpnConnectionBase class.
2011-01-25 12:41:03 -06:00
Giovanni Campagna
9067356856 core: fix policy handling of connections-loaded signal 2011-01-21 14:20:38 -06:00
Dan Williams
ec55e32ee6 agent: pass the right call-id in the secrets callback 2011-01-19 17:17:41 -06:00
Dan Williams
8ff556be3c agent: fix current agent removal if agent goes away
The current agent isn't in the 'pending' list, so don't check
the list for the agent and bail if it's not found since that
won't handle the current agent going away.
2011-01-19 17:16:21 -06:00
Dan Williams
85409427be agent: add some debug logging 2011-01-19 16:58:26 -06:00
Dan Williams
223c00fdee core: don't require connection path for AddAndActivate
There is no path yet since we haven't added the connection yet.
2011-01-18 20:40:58 -06:00
Dan Williams
c804909f83 wired: clear wired secrets tries counter when appropriate
If NM asks for secrets, and then a client calls ActivateDevice on
that same connection, the secrets tries counter doesn't get reset
and NM then thinks we need completely new secrets when we really
don't since the old secrets request isn't valid anymore.

Also ensure the secrets tries gets reset on success and failure
to match behavior of wifi.
2011-01-18 18:35:35 -06:00
Dan Williams
9f7f02b3b8 wifi: clear wireless secrets tries counter when deactivating
If NM asks for secrets, and then a client calls ActivateDevice on
that same connection, the secrets tries counter doesn't get reset
and NM then thinks we need completely new secrets when we really
don't since the old secrets request isn't valid anymore.

Found by Evan Broder
2011-01-18 18:29:56 -06:00
Dan Williams
68ab26143b core: use GetSecrets flags everywhere 2011-01-18 14:57:44 -06:00
Dan Williams
a2f36e8bd4 agent: add CancelGetSecrets D-Bus API
Allows NM to signal to an agent that an in-progress secrets
request is no longer needed.  This could happen if the device
for which the request was started was removed, disabled, or the
network being connected to changed, or whatever.
2011-01-18 13:19:29 -06:00
Dan Williams
1187922adf core: lack of an IPv4 setting indicates DHCP (novell #664640)
It shouldn't assert.
2011-01-14 14:02:02 -06:00
Dan Williams
bba24a0e00 core: allow minimal completion of VPN connections for AddAndActivate
We can at least fill in the connection setting if we're just given
the VPN setting.
2011-01-13 13:30:30 -06:00
Dan Williams
53766ae291 core: move generic connection complete function to a generic location
Out of NMDevice specific places to the utils code, so it can be used
more easily from everywhere.  There's nothing device-specific about
it anyway.
2011-01-13 13:28:52 -06:00
Dan Williams
2d9cd80c87 wifi: use less memory converting SSID
nm_utils_ssid_to_utf8() handles null termination for us, so no
need to copy the SSID to a buffer first.
2011-01-13 12:42:52 -06:00
Dan Williams
b38f39cfc6 core: build keyfile plugin into NetworkManager
Since settings storage is now handled by NetworkManager, we must
have the ability to read/write all connection types at all times.
Since the 'keyfile' plugin is the only plugin that can handle all
connection types, build it into NetworkManager.
2011-01-12 18:12:23 -06:00
Dan Williams
8259b35ee5 wimax: add connection completion function 2011-01-12 17:46:43 -06:00
Dan Williams
f9ceafd4a1 Merge remote branch 'origin/master' into rm-userset 2011-01-12 15:46:37 -06:00
Dan Williams
c1ee4fce68 tests: add some comments to the wifi connection completion tests 2011-01-12 13:20:37 -06:00
Dan Williams
3a160af5ab wifi: add RSN connection completion tests 2011-01-12 00:25:07 -06:00
Dan Williams
f7a8d53ac4 wifi: ensure shared auth is rejected for WPA APs when completing connections 2011-01-12 00:24:41 -06:00
Dan Williams
54c58bcf1f wifi: add more AP connection completion tests for EAP 2011-01-12 00:11:29 -06:00
Dan Williams
c4c02758e1 wifi: add more AP connection completion tests 2011-01-11 22:40:18 -06:00
Dan Williams
aa88058a5e wifi: simplify AP connection completion testcase
Make it clearer exactly what settings are added to the source
connection, and what to the expected one.
2011-01-11 21:52:12 -06:00
Dan Williams
215306f5a1 core: add AddAndActivate D-Bus method
Given connection details, complete the connection as well as possible
using the given specific object and device, add it to system
settings, and activate it all in one method.
2011-01-10 23:39:12 -06:00
Dan Williams
f08d892bda trivial: fix autoconf warning 2011-01-06 17:17:10 -06:00
Dan Williams
9d24269e30 wimax: add Center Frequency, RSSI, CINR, TX Power, and BSID properties
Useful diagnostic/support info when device is connected.
2011-01-06 15:18:19 -06:00
Dan Williams
263c05118b build: ensure WiMAX bits are linked before system settings
System settings still links to libnm-glib, which also contains
an NMDeviceWimax class.  We don't care about the libnm-glib
class, so link the wimax bits first to ensure they are the ones
used.

This issue will go away when user settings is removed in the
near future.
2011-01-06 14:22:17 -06:00
Dan Williams
430151d6c2 build: make WiMAX support optional 2011-01-05 18:23:08 -06:00
Dan Williams
6971dcd34e wimax: logging cleanup 2011-01-05 17:54:05 -06:00
Dan Williams
6ab1f4f420 wimax: only update NSP properties if they've changed 2011-01-05 17:39:14 -06:00
Dan Williams
13794bfeb6 wimax: poll connected network signal strength 2011-01-05 16:57:56 -06:00
Dan Williams
f87e2251d7 wimax: turn off wimaxd's fast reconnect logic
It eventually gets confusing for everyone.  NM is the policy, so
handle reconnect there.
2011-01-05 16:34:51 -06:00
Dan Williams
89095e9fa7 wimax: fix debug log format string 2011-01-05 16:30:58 -06:00
Dan Williams
5cbe6da10e wimax: release and renew DHCP lease when requested by wimaxd 2011-01-05 16:23:22 -06:00
Dan Williams
9917da2c71 dhcp: add DHCP lease release capability 2011-01-05 16:23:00 -06:00
Dan Williams
6ae91e2f67 wimax: if the device is connected at startup, force it to disconnect
Otherwise it doesn't auto-scan and we get no network list.  As a later
optimization, we could detect this, call iwmx_sdk_get_connected_network()
to get the current NSP, match that up with a connection, and "assume"
the connection like we do for Ethernet devices.
2011-01-05 15:39:07 -06:00
Dan Williams
71adbcbb20 Revert "wimax: if the device is connected at startup, force it to disconnect"
This reverts commit 9c99066d6c.

Yay for finger-memory of git commit -a...
2011-01-05 15:38:03 -06:00
Dan Williams
9c99066d6c wimax: if the device is connected at startup, force it to disconnect
Otherwise it doesn't auto-scan and we get no network list.  As a later
optimization, we could detect this, call iwmx_sdk_get_connected_network()
to get the current NSP, match that up with a connection, and "assume"
the connection like we do for Ethernet devices.
2011-01-05 15:30:59 -06:00
Dan Williams
a9918eefac wimax: protect device add/remove with a mutex
Sometimes the add/remove code will get re-entered by the SDK because
the SDK is stupid.  Lock the code to ensure we don't double-detect
the same device.
2011-01-05 15:27:48 -06:00
Dan Williams
bee33b9a26 wimax: notify listeners of new wimax devices
If wimaxd gets started after NetworkManager, we need to notify
NetworkManager that the daemon has found and set up any wimax
interface it finds.  Most of the code for this was there but
not previously hooked up.
2011-01-05 15:13:04 -06:00
Dan Williams
1ec327130a core: factor out DHCPv4 setup 2011-01-05 14:07:32 -06:00
Dan Williams
e598b18656 wimax: add link timeout 2011-01-05 14:06:48 -06:00
Dan Williams
d1c7f3d992 wimax: handle media status change events
Which we need to use for DHCP renew.
2011-01-05 09:59:08 -06:00