Commit graph

360 commits

Author SHA1 Message Date
Dan Williams cc924d8bab libnm-glib-vpn: add support for interactive secrets requests
There are three additions to the D-Bus interface for VPN plugins as
part of this patch:

1) ConnectInteractive(): called by NM instead of Connect() to let
the plugin know that it can request additional secrets during the
connection process using SecretsRequired

2) SecretsRequired: a new signal emitted by the plugin to indicate
to NetworkManager that additional secrets are required to connect;
can only be called if NetworkManager initiated the connection by
calling the ConnectInteractive() method

3) NewSecrets(): a new method of the plugin that NetworkManager calls
when new secrets requested by the SecretsRequired signal have been
retrieved from secret agents

We need new methods because agents need to be aware of the hints that
the VPN plugins may send with the SecretsRequired signal (detailing
the specific secrets that are required) and at this time, not all
agents support passing those hints to the VPN plugin authentication
dialogs.
2013-07-31 08:16:40 -05:00
Dan Williams 16bb798861 agents: add agent capabilities
A new agent registration method enables agents to pass capabilities during
the registration process.
2013-07-31 08:16:34 -05:00
Dan Williams e1bb469f80 api: update SecretAgent API with allowed errors for GetSecrets reply 2013-06-21 16:06:44 -05:00
Dan Winship 1f81851017 core: add monitor-connection-files=false and ReloadConnections
Add a "monitor-connection-files" config option, which can be set to
"false" to disable automatic reloading of connections on file change.

To go with this, add a new ReloadConnections method on
o.fd.NM.Settings that can be used to manually reload connections, and
add an nm-cli command to call it.
2013-06-14 12:57:47 -03:00
Dan Williams 3ee0203b8c api: note that the Ip4Address property is deprecated 2013-06-11 12:48:15 -05:00
Dan Winship a7068f48c5 Revert "platform, devices: add support for vxlan devices"
This requires a very recent kernel to even compile, and the kernel
code is still rapidly changing (eg, adding IPv6 support). So take it
out for now, until it stabilizes.

This reverts commit 7f0f04d106.
2013-06-04 10:30:30 -03:00
Dan Winship d9e0a7cbd6 platform, devices: add support for gre and gretap devices 2013-06-04 10:01:14 -03:00
Dan Winship 7f0f04d106 platform, devices: add support for vxlan devices 2013-06-04 10:01:14 -03:00
Dan Winship e9f364548a platform, devices: add support for macvlan and macvtap devices 2013-06-04 10:01:13 -03:00
Dan Winship add316a403 platform, devices: add support for tun and tap devices 2013-06-04 10:01:13 -03:00
Dan Williams 59222e562b settings: implement Save() function for connections 2013-05-28 12:26:56 -05:00
Dan Williams 8a79fb1d41 settings: implement ability to add connections without saving them to disk
We don't always want to immediately write new connections to disk, to
facilitate "runtime" or "temporary" connections where an interface's
runtime config isn't backed by on-disk config.  Also, just because
an interface's configuration is changed doesn't necessarily mean
that new configuration should be written to disk either.

Add D-Bus methods for adding new connections and for updating existing
connections that don't immediately save the connection to disk.

Also add infrastructure to indicate to plugins that the new connection
shouldn't be immediately saved if the connection was added with the
new method.
2013-05-28 12:26:56 -05:00
Dan Williams cd5d92705d settings: track whether connection is saved to disk or not
Use the new NMConnection 'changed' signal to mark connections
as dirty/unsaved, and reset that when they get flushed to disk.
Previously, the 'Updated' signal was emitted only when the
connection was changed and flushed to disk, but now we have
more granular needs, and the signal is emitted whenever the
connection actually *is* changed, regardless of whether its
flushed to disk or not.
2013-05-28 12:26:55 -05:00
Dan Winship 4416155bea platform, devices: add support for veth devices
https://bugzilla.gnome.org/show_bug.cgi?id=687254
2013-05-24 16:10:03 -03:00
Dan Winship 4819df28b4 core: add NMDeviceGeneric:type-description
Use nm_platform_link_get_type_name() to get information about the
generic device, and export that via D-Bus
2013-05-07 12:46:56 -04:00
Dan Winship ce4f2a4bd6 core, libnm-glib: add NMDeviceGeneric
Add NMDeviceGeneric, to provide generic support for unknown device
types, and create NMDeviceGenerics for those devices that NM
previously was ignoring. Allow NMSettingGeneric connections to be
activated on (managed) NMDeviceGenerics.
2013-05-07 12:46:56 -04:00
Dan Williams b6d2ae429f api: clarify expected agent behavior for GetSecrets and saving secrets
Agents are expected to save any new/updated secrets returned to
NetworkManager from a GetSecrets call, as it would be silly to return
those same secrets right back to the agent via SaveSecrets when the
agent is perfectly capable of saving the secrets itself without
round-tripping to NetworkManager and back.
2013-04-16 15:02:17 -05:00
Dan Williams 7b1fe5428a api: clarify some parameters of GetSecrets and CancelGetSecrets 2013-04-15 14:18:14 -05:00
Dan Williams b62a3abbff api: update Settings documentation to explain NewConnection signal timing (bgo #697742) 2013-04-10 14:21:34 -05:00
Dan Winship fc700e9213 core: add NM_WIFI_DEVICE_CAP_ADHOC
Some wireless devices don't support Ad-Hoc mode. Expose this fact in
the wireless capabilities so that clients can disable the hot-spot
option if neither CAP_ADHOC nor CAP_AP is available.

https://bugzilla.gnome.org/show_bug.cgi?id=692869
2013-02-11 12:39:28 -05:00
Dan Winship 17123fcc61 introspection: belatedly add NM_DEVICE_CAP_AP 2013-01-31 10:47:41 -05:00
Dan Williams 57a2a532ac api: fix location of Bridge device type enum 2013-01-11 15:40:55 -06:00
Jiří Klimeš eb50c69129 introspection: update logging domains description 2013-01-09 16:47:49 +01:00
Jiří Klimeš 2952c09902 core: add GetLogging() D-Bus call to org.freedesktop.NetworkManager
Returns current logging level and domains set.
2013-01-09 16:47:49 +01:00
Dan Williams 7258dd270f core: add the NM_ACTIVE_CONNECTION_STATE_DEACTIVATED state
We'll use this to know when to clean up and dispose of the
active connection in the manager.
2012-12-17 17:01:10 -06:00
Jiří Klimeš 1a7f9e661a core,libnm-glib: expose "slaves" property on NMDeviceBridge 2012-11-30 13:21:51 -06:00
Thomas Graf cfff5a63d9 bridge: add bridge device type
This adds a new device type 'bridge'. Kernel devices are created
on demand.
2012-11-30 13:21:51 -06:00
Jiří Klimeš 9fa1a9b8ae Revert "docs: add PPP interface API to HTML spec"
This reverts commit 2ad6dcf215.

org.freedesktop.NetworkManager.PPP is a private interface between
NM and nm-ppp-plugin and we don't want it in the documentation.
2012-11-07 13:40:24 +01:00
Jiří Klimeš 2ad6dcf215 docs: add PPP interface API to HTML spec 2012-11-06 15:09:44 +01:00
Dan Winship ad74379c2c core, libnm-glib: expose "slaves" property on NMDeviceBond
https://bugzilla.gnome.org/show_bug.cgi?id=686367
2012-10-19 12:09:27 -04:00
Jan Luebbe f9c72dee3e wifi: support ap-mode with wpa_supplicant
A new value for NM80211Mode is introduced (NM_802_11_MODE_AP) and the
new mode is passed to wpa_supplicant analogous to adhoc-mode.
The places which need to know the interface mode have been extended to
handle the new mode.

If the configuration does not contain a fixed frequency, a channel is
selected the same way as with adhoc-mode before.
2012-10-17 12:08:11 -05:00
Jiří Klimeš 07fc3dcb90 api: add NM_DEVICE_STATE_REASON_SECONDARY_CONNECTION_FAILED reason and use that 2012-09-24 10:38:26 +02:00
Dan Williams 29fe6ec830 wifi: add SSID_NOT_FOUND reason and use it when we can
When the supplicant starts connecting, or gets disconnected, track
whether it ever starts talking to an AP.  Then if the connection fails
as a result of an initial connection timeout or a link timeout, we
can use SSID_NOT_FOUND when we're reasonably sure the AP doesn't
exist.  Clients can use this to show better error messages.

Note that SSID_NOT_FOUND may only be reported when using nl80211
drivers, as WEXT drivers don't provide the status necessary to
determine whether the network exists or not.
2012-09-20 10:11:36 -05:00
Dan Williams e6061a1e96 api: add a "ModemManager unavailable" device state reason
To be used when MM quits unexpectedly, or isn't running and the
device needs MM.
2012-08-29 17:39:33 -05:00
Nathanael D. Noblet 808136ac02 core: add AvailableConnections property for NMDevice objects
Implements a new property that provides a list of currently
available connections a device could connect to. For example
if a connection for a particular wireless connection exists and
that wireless network appears in the scan list it would show in the
AvailableConnections property of the device.

(dcbw: found a slightly cleaner way to do this; it's a lot like the
check_connection_compatible class method, except it deals with
live network data too.  So convert the subclass methods to
just check additional live network data, and have the base
device class handle adding the connection to the hash and all
the associated signalling.  Also fix a bug where the available
connections were not updated when a device moved from UNAVAILABLE
to available, its available connections were not updated)
2012-08-15 16:50:49 -05:00
Dan Williams 37deed816a Revert "api: fix VpnStateChanged signal arguments"
This reverts commit 9d85378045.

The original commit that changed this D-Bus signal signature was
in error and we shouldn't change the D-Bus API here.
2012-06-29 15:17:18 -05:00
Jiří Klimeš 9d85378045 api: fix VpnStateChanged signal arguments
The signal has changed in commit 330247399c
2012-06-29 13:17:09 +02:00
Jiří Klimeš f8bef2c10b docs: fix a few documentation errors 2012-06-29 11:49:51 +02:00
Dan Williams 4a2b1d631b api: fix device state reason code enum value
Probably a merge error.
2012-06-28 16:36:16 -05:00
Dan Williams 74e262b303 agents: add a "user-requested" flag to secret agent requests
Allows agents to provide different behavior depending on whether the
secrets request was initiated by a user (eg by picking a connection
from a UI menu or by 'nmcli con up') or was automatically started by
NetworkManager.

See https://bugzilla.gnome.org/show_bug.cgi?id=660293
2012-06-27 09:42:47 -05:00
Jiří Klimeš 25592950e9 core: add driver-version, firmware-version properties to NMDevice (bgo #636124)
The info is extracted via SIOCETHTOOL ioctl() syscall using ETHTOOL_GDRVINFO.
This works for most drivers but not all, e.g. for modems. We may figure out how
to get the info for specific devices, and enhance the solution by implementing
specific functions for particular device types later.
2012-06-08 08:55:15 +02:00
Gary Ching-Pang Lin 5e3e19d02b wifi: add on-demand WiFi scan support
A new D-Bus method was added to invoke the on-demand WiFi scan.
2012-06-07 15:06:48 -05:00
Dan Winship 960c1ae8ff vpn: support IPv6 over VPNs
Add new API to allow passing both IPv4 and IPv6 configuration
information from VPN plugins to the backend.

Now instead of a single Ip4Config, a plugin has Config, Ip4Config, and
Ip6Config. "Config" contains information which is neither IPv4 nor
IPv6 specific, and also indicates which of Ip4Config and Ip6Config are
present. Ip4Config now only contains the IPv4-specific bits of
configuration.

There is backward compatibility in both directions: if the daemon is
new and the VPN plugin is old, then NM will notice that the plugin
emitted the Ip4Config signal without having emitted the Config signal
first, and so will assume that it is IPv4-only, and that the generic
bits of configuration have been included with the Ip4Config. If the
daemon is old and the plugin is new, then NMVPNPlugin will copy the
values from the generic config into the IPv4 config as well. (In fact,
NMVPNPlugin *always* does this, because it's harmless, and it's easier
than actually checking the daemon version.)

Currently the VPN is still configured all-at-once, after both IPv4 and
IPv6 information has been received, but the APIs allow for the
possibility of configuring them one at a time in the future.
2012-05-30 14:24:46 -04:00
Jiří Klimeš 6d9338f2c6 core: add "Autoconnect" property to NMDevice
It is bound to autoconnect_inhibit private variable (has opposite meaning).
While 'Autoconnect' is TRUE (default value) the device can automatically
activate a connection. If it is changed to FALSE, the device will not
auto-activate until 'Autoconnect' is TRUE again.
Disconnect() method sets 'Autoconnect' to FALSE. NMPolicy monitors the property
and schedules auto activation when FALSE->TRUE transition is made.
2012-05-22 17:11:44 +02:00
Pantelis Koukousoulas d125296eb1 adsl: initial PPPoE support for ADSL devices 2012-05-18 15:42:56 -05:00
Pantelis Koukousoulas 0e6f5ce38e adsl: settings and initial "scaffolding"
This patch adds the settings code (NMSettingAdsl) and the initial
"scaffolding" i.e., a tiny stub version of NMDeviceAdsl and the
udev handler code to get the device detected.

With this patch you should be able to see an atm device being detected
by networkmanager in the logs, although of course it doesn't
do anything useful yet.

Extract from the logs:

 [1304668252.341354] [nm-udev-manager.c:562] adsl_add(): adsl_add: ATM Device detected from udev. Adding ..
(ueagle-atm0): failed to look up interface index
(ueagle-atm0): new ADSL device (driver: 'ueagle-atm' ifindex: -1)
(ueagle-atm0): exported as /org/freedesktop/NetworkManager/Devices/2
(ueagle-atm0): now managed
(ueagle-atm0): device state change: unmanaged -> unavailable (reason 'managed') [10 20 2]
(ueagle-atm0): deactivating device (reason: 2).
 [1304668252.345102] [nm-system.c:1349] flush_routes(): (ueagle-atm0) failed to lookup interface index
 [1304668252.347821] [nm-device.c:3912] nm_device_state_changed(): (ueagle-atm0): device is available,

In this version, we hack the nm-device.c:nm_device_get_priority() to get better priority
instead of changing the DeviceType enum.

Signed-off-by: Pantelis Koukousoulas <pktoss@gmail.com>
2012-05-18 15:42:55 -05:00
Dan Winship 49214066a4 Fix capitalization of "InfiniBand"
"InfiniBand" has a capital "B". Fix that everywhere it's being used as
a human-readable string.

In particular, the RH initscripts recognize "TYPE=infiniband" and
"TYPE=InfiniBand", but not "TYPE=Infiniband", which is what we were
writing before.
2012-03-06 13:23:29 -05:00
Dan Williams 33d0cff3e4 core: use active connection dependency master instead of manually setting it
We already have the master device kept in the active connection, so
we can just use that instead of having the Policy determine and set
it manually.  This also should allow slaves to auto-activate their
master connections if the master is able to activate.
2012-03-01 17:40:18 -06:00
Dan Williams db94e37eb5 core: wait for dependencies before continuing with device activation
Before jumping to activation stage 1, make sure dependencies are activated.
2012-03-01 17:40:17 -06:00
Dan Williams 65a13f9d8a core: convert VLAN interfaces to a device subclass
Many different interface types can support VLANs, including
Infiniband, WiFi, etc.  So we have to create a new device class
for them instead of keeping the support in NMDeviceEthernet.
2012-03-01 17:40:17 -06:00
Dan Williams 0c61a51614 bond: move bond master interfaces to NMDeviceBond
This way clients know it's a bond master, and it allows us to more
cleanly separate the code for bonding and non-bonding cases.
2012-02-16 15:20:50 -06:00
Dan Williams cd2603c713 api: fix various Infiniband introspection XML omissions 2012-02-15 17:32:41 -06:00
Dan Winship ec35d47253 introspection: add missing error description for INFINIBAND_MODE 2012-02-02 12:02:11 -06:00
Thomas Bechtold 775ec828b9 core: add device property "StateReason"
Allows clients to retrieve the reason a device changed to
the given state along with the state itself, preventing
race conditions if the state were retrieved separately
from the reason.  Reason codes were not previously
accessible without listening to the StateChanged signal.
2012-02-02 12:02:11 -06:00
Thomas Bechtold fe5392ccd9 core: add missing device state reasons
Some NMDeviceStateReason 's are not available in
introspection/nm-device.xml

Tom
2012-01-25 11:26:57 -06:00
Thomas Graf 1ba50e2f1b bonding: export path of master device property over DBUS
Adds a new "master" property to NMActiveConnection containing the path
of the master NMDevice if the connection has a master.

Signed-off-by: Thomas Graf <tgraf@redhat.com>
2012-01-25 11:12:43 -06:00
Dan Winship 5366c3d6d4 wired: split NMDeviceWired out of NMDeviceEthernet and add NMDeviceInfiniband 2011-12-02 13:09:16 -06:00
Dan Williams 49dc2068ed docs: add Secret Agent API bits to HTML spec 2011-09-06 17:31:27 -05:00
Dan Williams 6c901ab040 api: update version based on configure version
Instead of manually which is error-prone.
2011-08-06 11:19:33 +02:00
Dan Williams 310880a104 api: fix up node names
Not sure if it really makes a difference, but...
2011-08-06 10:46:21 +02:00
Dan Williams 220fb52621 api: update documentation about secret agents and SaveSecrets() 2011-07-01 15:38:38 -05:00
Dan Williams 459e7b9518 api/core: add ActiveConnection property to device objects
Enables easier traversal of the object hierarchy; if a client is
watching signals on a device they can easily get back to the
parent NMActiveConnection object to grab connection details or
status.
2011-05-26 19:19:32 -05:00
Dan Williams e56f0ea18f api: update some documentation for Connection.Active 2011-05-26 19:19:32 -05:00
Dan Williams 9ee83c18aa api: clarify usage of SetLogging 2011-05-04 17:22:05 -05:00
Dan Williams 8cce42f2a5 core: add GetDeviceByIpIface method
Allow clients to get a device by its IP interface name instead
of having to get the device list and iterate through each one,
and read the interface name to get what they want.
2011-04-22 12:29:07 -05:00
Dan Williams 4cae0bb0fa settings: add a GetConnectionByUuid method
If the client knows the UUID, add a convenience function to get
the connection path directly, instead of having to iterate the
whole connection list and get each connection's details and then
check the UUID.
2011-04-22 12:29:07 -05:00
Dan Williams bb8e9a0b18 api: add "Uuid" property to ActiveConnection interface
A convenience so that clients which might key certain operations off
which connections are active (checking work mail only when on VPN for
example) can more easily get which connections are active.  This would
allow those apps to store the UUID (which they would already be doing)
and not have to create a Connection proxy and then get the connection
properties just to retrieve the UUID of the connection.  Instead they
can now get it from GetAll of the ActiveConnection object, which they
would already be doing.
2011-04-22 12:29:07 -05:00
Dan Williams aeb02e457a api: clarify meaning of 'hints' property in Agent interface
At some point we'll be passing other info like whether we need
the 802.1x identity too, or unknown CA certificate data for the
Agent to accept, etc.  Basically state that instead of only
hints from the setting, we can pass other stuff as well.
2011-04-19 12:57:49 -05:00
Dan Williams 6f49afaea0 api: remove unused CDMA and GSM introspection files 2011-03-21 16:48:15 -05:00
Dan Williams 1701df4b75 core: add active connection state DEACTIVATING
Not used yet, but will be when device deactivating state gets
used.  Should be 100% backwards compatible with users that don't
know about it for now.
2011-03-17 14:23:21 -05:00
Dan Williams 1c3a67aaa5 api: clarify function and usage of the Device.Udi property 2011-03-15 12:56:19 -05:00
Dan Williams c74dd8b0b7 api: fix mistakenly absent Dhcp6Config device property
It was still on the bus, but not in the introspection for some
reason.
2011-03-10 09:53:07 -06:00
Dan Williams 62ad893a4a core: bring the state() D-Bus method back
It's a lot easier for app developers to use.
2011-03-08 12:57:35 -06:00
Dan Williams 0def159d1f trivial: whitespace fix 2011-03-04 12:51:05 -06:00
Dan Williams 69f2c75956 api: fix up introspection and header documentation for modem consolidation 2011-03-03 20:16:16 -06:00
Dan Williams b44b1747fa api: document more VPN connection failure codes (bgo #643324) 2011-02-25 14:00:01 -06:00
Dan Williams 2140dad5e0 core: consolidate mobile broadband device types
These days more and more devices are showing up that support a
number of different access technology families in the same hardware,
like Qualcomm Gobi (CDMA and GSM), Pantech UM190 (CDMA and GSM),
Pantech UML290 (CDMA and LTE), LG VL600 (CDMA and LTE), Sierra
320U (GSM and LTE), etc.  The previous scheme of having device
classes based on access technology family simply cannot handle
this hardware and attempting to add LTE to both the CDMA and GSM
device classes would result in a bunch of code duplication that
we don't want.  There's a better way...

Instead, combine both CDMA and GSM device classes into a generic
"Modem" device class that provides capabilities indicating what
access technology families a modem supports, and what families
it supports immediately without a firmware reload.  (Gobi devices
for example require a firmware reload before they can switch
between GSM and CDMA).  This provides the necessary flexibility
to the client and allows us to keep the API stable when the
same consolidation change is made in ModemManager.

The current code doesn't yet allow multi-mode operation internally,
but the API is now what we want it to be and won't need to be
changed.
2011-02-25 10:16:17 -06:00
Dan Williams c5cc53a557 core: add new SECONDARIES device state for dependent connections
Will be used for things like activating a VPN connection before
signaling that the device is activated, or maybe for bridges and
bonds, to ensure that applications don't think the system has
connectivity before everything is set up.
2011-02-23 10:25:49 -06:00
Dan Williams ec115ed442 api: add additional NM daemon states
DISCONNECTING: the only active network connection is now being disconnected
LOCAL, SITE, GLOBAL: one-stop items for level of connectivity, which
we'll use to show when we think we're actually connected to the internet
or behind a captive portal or something
2011-02-14 17:55:27 -06:00
Dan Williams a661f78890 api: remove deprecated methods and signals
sleep, wake, StateChange, all deprecated in 0.8, are now removed.

sleep & wake are replaced with the Sleep() method, while
StateChange is replaced with the StateChanged signal which has
the same arguments.
2011-02-14 17:33:16 -06:00
Dan Williams 85e87bd509 api: update version and copyright info 2011-02-14 17:32:35 -06:00
Dan Williams 7971227011 api: add two more device states (IP_CHECK and DEACTIVATING)
We'll use IP_CHECK for detecting whether we're behind a captive
portal or on a network that does not have access to the Internet.
We'll probably run some variety of plugins during this stage to
help detect this, and possibly handle it for us (auto-login to
captive portal for example).

DEACTIVATING will be used for tearing down network shares or
cleanly closing network sessions when we're able to clean up
an activation.  ie, "pre-down" for Debian.
2011-02-14 17:09:36 -06:00
Dan Williams 915dd85d23 api: update device types to match NetworkManager.h 2011-02-14 16:37:50 -06:00
Dan Williams 0ba142690a build: make sure nm-secret-agent.xml gets into the tarball 2011-02-02 21:39:03 -06:00
Dan Williams 77239854f4 agents: send system-owned secrets to the agent if it has 'modify' permission
If we can authenticate the agent for 'modify' permission, then send
any existing system secrets to it as the user has permission to change
those secrets.  This means the agent doesn't have to call GetSecrets()
itself, which means simpler code on the agent side for a slight LoC
hit in NM itself.

This also moves the permissions checking into the NMAgentManager to
check each agent, which is sub-optimal since now the agent manager
has to do PolicyKit stuff, but hey that's life.  Agents need secrets,
and we do need to authenticate every agent before we send secrets to
them, and the NMSettingsConnection doesn't know about individual
agents at all.
2011-02-02 16:19:15 -06:00
Dan Williams 570c0eb2df settings: implement deleting secrets from agents when connection is deleted 2011-01-31 23:33:46 -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 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
Dan Williams 9cf13cc3e1 agent: request_new -> flags
Use some flags to modify GetSecrets behavior instead of just the
request_new boolean.
2011-01-18 14:17:18 -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 acd16ceeed api: fix argument direction for SecretAgent API calls 2011-01-13 14:08:36 -06:00
Dan Williams f9ceafd4a1 Merge remote branch 'origin/master' into rm-userset 2011-01-12 15:46:37 -06:00
Dan Williams 063859ba66 libnm-glib: add nm_client_add_and_activate_connection() 2011-01-12 00:39:34 -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 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 9e80c1e85d wimax: make WiMAX mostly work
Heavily modify Inaky's Intel WiMAX SDK glue (originally from connman)
to be more generic and more thread-safe, and suitable for use with
NetworkManager instead of rolling our own client code.  Rewrite the
NMDeviceWimax code to mostly work.

Still to be done: actual connection logic, DHCP handling, spawning
wimaxd if it's not started yet
2011-01-03 23:55:38 -06:00
Dan Williams 0587ef1179 Merge remote branch 'origin/master' into wimax 2011-01-02 17:24:23 -06:00
Dan Williams 1496f8056f libnm-glib: add secret agent base class 2010-12-14 00:03:22 -06:00
Dan Williams a30cf19858 agent: add agent manager and minimal agent class 2010-12-10 12:38:19 -06:00
Dan Williams 9d077444a9 settings: remove settings dict from connection 'updated' signal
New connections should not be pushed out in the Updated signal
because signals cannot be restricted to particular clients, and
some clients may not have permission to view the connection.

Upon receiving the Updated signal, clients should re-read the
connection using GetSettings to ensure that the client still
has permissions to view the connection, and to get the updated
settings.
2010-12-02 14:34:38 -06:00
Dan Williams 37845af954 settings: return new connection object path from AddConnection
Finally.
2010-10-29 14:34:33 -05:00
Dan Williams e5adfcbabe settings: remove remnants of unused CheckPermissions signal 2010-10-26 11:40:43 -05:00
Dan Williams 8b41f70dd5 Merge remote branch 'origin/master' into rm-userset 2010-09-27 10:30:46 -05:00
Jiří Klimeš facf6b176f core: add Version property to org.freedesktop.NetworkManager interface 2010-09-27 10:34:56 +02:00
Dan Williams 3945f75bda core: consolidate all permissions checking into main D-Bus interface
Moves the system settings permissions checking into the core service's
permissions checking, which at the same time enables 3-way permission
reporting (yes, no, auth) instead of the old yes/no that we had for
system settings permissions before.  This allows UI to show a lock
icon or such when the user could authenticate to gain the permission.

It also moves the wifi-create permissions' namespace to the main
namespace (not .settings) since they really should be checked before
starting a shared wifi connection, rather than having anything to do
with the settings service.
2010-08-26 14:26:12 -05:00
Daniel Gnoutcheff 6ebc201636 WIP: NMSysconfig: enforce access controls 2010-08-15 03:25:58 -04:00
Daniel Gnoutcheff f98e2528a6 NetworkMangerSettings -> NetworkManager.Settings
Just for consistency, make settings related stuff live under the
org.freedesktop.NetworkManager namespace, rather than its own
org.freedesktop.NetworkManagerSettings namespace. Renames are done for
DBus interface names, DBus object paths, and polkit actions.
2010-08-07 01:19:46 -04:00
Daniel Gnoutcheff aee48901f4 Merged NM{Exported,Sysconfig}Connection
In continuation of the theme, the removal of user settings services
means that the distinction between NMSysconfigConnection and
NMExportedConnection is no longer needed. Merge NMExportedConnection
into NMSysconfigConnection.
2010-08-06 13:05:46 -04:00
Daniel Gnoutcheff da6816a03b nm-glib/DBus: merge nm-settings{,-system} iface
Much as with nm-remote-settings and nm-remote-settings-system, the
removal of user settings services means there is no more need for
separate interfaces for user and system settings services.

In libnm-glib, this commit merges everything in
nm-settings-system-interface into nm-settings-interface.  Alongside with
that, we merge everything in the
org.freedesktop.NetworkManagerSettings.System DBus interface into
org.freedesktop.NetworkManagerSettings.
2010-08-06 13:05:46 -04:00
Daniel Gnoutcheff d503c09466 DBus API: removing user settings support
Remove bits from the external DBus API that were once needed for user
settings support.
2010-08-06 13:05:46 -04:00
Dan Williams 664ccd4464 Revert "core: fix compilation on glib < 2.23.4"
This reverts commit 8a1fe31b31.

This commit was not intended to be pushed, as it's not ready yet
and isn't even my commit (thus attribution is wrong).
2010-07-12 18:20:09 -07:00
Dan Williams 8a1fe31b31 core: fix compilation on glib < 2.23.4
Where G_FILE_MONITOR_EVENT_MOVED isn't defined yet.
2010-07-02 10:42:32 -07:00
Jiří Klimeš 1b49f941a6 core: MAC address spoofing/cloning (rh #447827) (bgo #553771)
This commit implements MAC cloning feature in NetworkManager. To support that,
'PermHwAddress' property is added into *.Device.Wired and *.Device.Wireless
interfaces. The permanent MAC address is obtained when creating the device, and
is used for 'locking' connections to the device. If a cloned MAC is specified
in connection to be activated, the MAC is set to the interface in stage1. While
disconecting, the permanent MAC is set back to the interface.
2010-06-22 14:21:25 +02:00
Dan Williams 763f2f1d01 core: expose device's IP interface when activated
Lets apps find out what the actual kernel interface name is for the
device so they can do fun stuff with it.
2010-06-10 10:16:39 -07:00
Dan Williams ae4b47ca99 core: PolicyKit protect Deactivate and Disconnect 2010-06-04 00:42:10 -07:00
Dan Williams 65818d517e core: PolicyKit-protect sleep/wake
Default to 'not allowed', distros that need backwards compatibility
can flip this to 'yes' if they need to. At this point, only power
management scripts should call these functions.
2010-05-29 23:11:45 -07:00
Dan Williams c013490ba3 core: PolicyKit-protect enable/disable networking method 2010-05-29 23:00:46 -07:00
Dan Williams 716a9c6c0d core: add permissions framework for various operations (rh #585182) (bgo #619323) 2010-05-28 18:23:00 -07:00
Dan Williams fea6431a20 core/libnm-glib: implement better missing firmware support (rh #594578)
Track missing firmware and ensure the device can't be used when firmware
is missing.  Add a property for missing firmware so that clients can do
something intelligent with this information.
2010-05-25 10:52:25 -07:00
Dan Williams fa70542c61 core: add networking enable/disable knob distinct from sleep/wake (rh #589108) (bgo #346615)
Since forever we've used sleep/wake as the way to implement
Networking Enabled.  When the state file was introduced to make the
networking and wifi states persistent, we ran into a bug where
a failed suspend (like if the machine ran out of power while
suspended) would result in networking being disabled on reboot
since suspend/resume used the same knob as enable/disable.

This patch adds a distinct call for enable/disable networking
which changes the state file, while sleep/wake no longer change
the state file.
2010-05-22 09:51:22 -07:00
Dan Williams c4f3bf002b Merge remote branch 'origin/master' into wimax 2010-05-19 08:55:26 -07:00
Dan Williams e99ad94411 api: fix SetLogging description typo 2010-05-04 10:04:55 -07:00
Dan Williams 1d409aeb53 core: fix Address property type of IP6Config objects
We can change the property's D-Bus signature (and thus API) here
because querying the IP6Config object's properties caused NM to
crash.  Apparently we forgot to change the type of the Address
property when we C&P-ed the IP4Config into the IP6Config, and
DBUS_TYPE_G_ARRAY_OF_ARRAY_OF_UINT is certainly the wrong type
to use since the backing object that dbus-glib would marshal
into the ARRAY_OF_ARRAY_OF_UINT wasn't that type, causing a
crash in dbus-glib when a client got the IP6Config.
2010-04-17 17:19:30 -07:00
Dan Williams e2ad8c2a54 core: add 'default6' property for ActiveConnection objects
Since IPv4 and IPv6 have different routing one device can have the
active IPv4 connection and a completely different one can have the
active IPv6 one.
2010-04-15 15:18:08 -07:00
Dan Williams 02002ef9d1 logging: add D-Bus method to change logging 2010-04-08 08:56:17 -07:00
Dan Williams 6773cc6a63 api: clarify Connection.Updated arguments 2010-03-24 14:10:34 -07:00
Dan Williams b95c390015 bluetooth: add timeout for bluetooth connection request 2010-03-23 23:07:17 -07:00
Dan Williams c5eb684718 Merge remote branch 'origin/btdun' 2010-02-18 10:18:20 -08:00
Dan Williams 86e4843902 introspection: sync device state reason codes with NetworkManager.h 2010-01-28 12:15:00 -08:00
Dan Williams 133c86ee92 introspection: fix inclusion of Dhcp6Config XML 2010-01-20 17:30:48 -08:00
Dan Williams ac2505b64c Merge commit 'origin/master' into dhcp6 2010-01-20 15:42:26 -08:00
Dan Williams d20c61a1d6 olpc-mesh: fix companion path and active channel property types
Companion device should be an object path instead of a string, and
the introspection data property type for the active channel was
wrong.
2010-01-14 14:30:02 -08:00
Dan Williams 439768db3d dhcp: add the NMDHCP6Config object 2010-01-13 22:30:40 -08:00
Tambet Ingo 20a4c6c6b6 wimax: Implement RFKILL handling
Implement and export over DBus WiMAX enable/disable and hardware state query.
2009-12-29 11:27:10 +02:00
Tambet Ingo ac0f32537e Merge branch 'master' into wimax 2009-12-29 11:25:37 +02:00
Dan Williams 8f4d4c0463 manager: add WWAN enable/disable support 2009-12-23 01:30:54 -08:00
Tambet Ingo 75c734f1a9 wimax: Implement WiMAX support 2009-12-18 15:41:27 +02:00
Dan Williams b94510e3b3 doc: update D-Bus API specification version and dates 2009-11-11 14:34:07 -08:00
Dan Williams 671f00c86f introspection: synchronize VPN ActiveConnection interface
Due to dbus-glib limitations we still have to keep two copies of this,
and furthermore PropertiesChanged won't yet trigger for the VPN bits
since there's no way to push out signals on a different interface.
2009-10-28 10:41:18 -07:00
Dan Williams bf8d3b027b introspection: document ip4-config argument formats 2009-10-23 15:38:06 -07:00
Dan Williams 8d65515435 manager: automatically pick a base connection for VPNs
If let callers pass "/" for the specific object, and NM will
automatically pick the default device.
2009-10-16 11:52:27 -07:00
Dan Williams 1b9496bbef introspection: clarify wired device 'Speed' property units 2009-10-05 16:58:07 -07:00
Dan Williams 99fb844657 core: device disconnection cleanups
Return an error when trying to disconnect an already-disconnected
or deactivated device.
2009-09-18 09:05:11 -07:00
Alexander Sack 2be94b44c3 core: implement manual disconnect feature
In the past networkmanager did not allow to manually disconnect devices.

Manually disconnected devices will not be automatically reconnected until one
of the following events occur:
 1. user activates a connection for the currently disconnected device
 2. network manager awakes from hibernate/suspend
 3. network manager is restarted (e.g. reboot)

Add a Disconnect method to generic NMDevice dbus interface; set a new private
autoconnect_inhibit flag if Disconnect method is called through dbus.
Based on this auto activation for devices gets inhibited until one
of the above events occur.
2009-09-18 17:06:48 +02:00
Dan Williams 393bdd3737 core: generalize unavailable -> disconnected delayed transition
Instead of doing this in every device subclass, do it in the NMDevice
superclass.  nm_device_can_activate() already did the same logic that
each of the subclass device_state_changed() handlers were doing to
figure out whether they could do the transition from unavailable
to disconnected, so just use that in NMDevice and kill lots of code.
2009-09-14 13:24:29 -07:00
Dan Williams 2dbaab2221 system-settings: add permissions
Since the new PolicyKit does away with easy checking of authorizations,
we get to implement it by ourselves, but that's OK since we can actually
use it for a lot more stuff.  So add the GetPermissions call which returns
the permissions the caller actually has, and a signal informing callers
that their permissions might have changed.  Hook this all up to
PolicyKit so it's useful.
2009-08-24 13:03:09 -05:00
Dan Williams 624708ac5d introspection: whitespace fixup 2009-08-24 09:38:38 -05:00
Dan Williams def14729b9 introspection: fix Removed signal detail 2009-08-24 09:38:14 -05:00