Commit graph

12635 commits

Author SHA1 Message Date
Thomas Haller
ccd2ec7b34 wifi: don't fail construction of NMDeviceWifi in constructor
We cannot abort the construction of a GLib object instance
like we did for NMDeviceWifi and NMDeviceOlpcMesh when
nm_platform_wifi_get_capabilities() failed.

Instead, check the capabilities first (in the factory method)
and only create the object instance when the device can be handled.

https://bugzilla.gnome.org/show_bug.cgi?id=760154
(cherry picked from commit 044de4cea2)
2016-01-06 22:34:29 +01:00
Thomas Haller
75131ed654 wifi-olpc: refactor NMDeviceOlpcMesh to hold pointer to NMManager
Objects that register to a signal of a singleton should own a reference
to the singleton to ensure the proper lifetime of the singleton upon shutdown.

(cherry picked from commit e2e22eb574)
2016-01-06 22:25:26 +01:00
Beniamino Galvani
2f012d80d7 device/infiniband: take interface down to set transport mode
With some drivers it is necessary to take the interface down to set
the transport mode.

https://bugzilla.redhat.com/show_bug.cgi?id=1281301
(cherry picked from commit 5bf0697f65)
2016-01-05 19:01:16 +01:00
Beniamino Galvani
cbcb848e6d device: update @ip_iface only if IP interface exists
If @ip_ifindex is zero, the IP interface has disappeared and
there's no point in updating @ip_iface.

Actually, unconditionally updating @ip_iface is dangerous because it
breaks the assumption used by other functions (as
nm_device_get_ip_ifindex()) that a non-NULL @ip_iface implies a valid
@ip_ifindex. This was causing the scary failure:

  devices/nm-device.c:666:get_ip_iface_identifier: assertion failed: (ifindex)

https://bugzilla.redhat.com/show_bug.cgi?id=1268617
(cherry picked from commit ed536998f9)
2016-01-05 18:44:10 +01:00
Beniamino Galvani
8204c2a196 ppp-manager: clear @ppp_watch_id upon pppd termination
Set @ppp_watch_id to zero upon pppd termination, otherwise the call to
g_source_remove(priv->ppp_watch_id) in dispose() could trigger a failed
assertion.

(cherry picked from commit 5f93f01015)
2016-01-05 18:44:08 +01:00
Thomas Haller
11aa07ed93 core: fix failure to configure routes due to wrong device-route for IPv4 peer-addresses
As in the case of a OpenVPN connection, we might add an address like:
  10.8.0.58/32 ptp 10.8.0.57

In this case, kernel would automatically add a device-route like:
  10.8.0.57/32 via 0.0.0.0 dev 32 metric 0 mss 0 src rtprot-kernel scope link pref-src 10.8.0.58

nm_ip4_config_commit() checks all IP addresses to figure out
the present device-routes. Then the routes are synced by NMRouteManager.
Due to a bug, we would not consider the peer-address, but the local-address
and configure a route 10.8.0.58/32, instead of 10.8.0.57/32.

That stays mostly unnoticed, because usually the peer and the local-address are
in the same subnet, so that there is no difference (/32 is an example of the
peer-address being in a different subnet).

It also seems that due to a bug fixed by df4e535752 this issue didn't surface.
Probably because we would not notice the 10.8.0.57/32 right away and thus
nm_route_manager_ip4_route_sync() would not wrongly delete it.

https://bugzilla.gnome.org/show_bug.cgi?id=759892

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=809195
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=809494
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=809526
https://bugs.archlinux.org/task/47535
https://bugzilla.redhat.com/show_bug.cgi?id=1294309
https://mail.gnome.org/archives/networkmanager-list/2015-December/msg00059.html
2016-01-05 10:16:41 +01:00
Beniamino Galvani
a232f885c2 man: fix typos
(cherry picked from commit 2ef3c1047d)
2015-12-24 09:58:33 +01:00
Lubomir Rintel
c163759fe4 release: bump version to 1.0.10 2015-12-23 14:59:08 +01:00
Lubomir Rintel
7f58a83a8c release: update NEWS 2015-12-23 14:56:55 +01:00
Lubomir Rintel
c29906d9ff po: fix some typos in Galician translation
(cherry picked from commit dff1829c99)
2015-12-23 14:52:56 +01:00
Lubomir Rintel
4429f2af1b po: merge in master translations 2015-12-23 14:32:21 +01:00
Lubomir Rintel
676f3079b8 po: update-po 2015-12-23 14:32:18 +01:00
Rafael Fontenelle
904dad1e8d po: update Brazilian Portuguese translation
https://bugzilla.gnome.org/show_bug.cgi?id=759747
2015-12-23 14:01:00 +01:00
Anders Jonsson
8a6a52c4e9 po: update Swedish translation
https://bugzilla.gnome.org/show_bug.cgi?id=759637
2015-12-23 13:54:50 +01:00
Beniamino Galvani
86ceade93a device/vlan: fix failed assertion in parent_hwaddr_changed()
Parent MAC can be NULL if the interface has gone, fix the following
failed assertion:

  [devices/nm-device-vlan.c:107] parent_hwaddr_changed(): (vlan1): parent hardware address changed
  nm_device_set_hw_addr: assertion 'addr != NULL' failed

While at it, improve logging by printing the new MAC address.

Fixes: e6d7fee5a6
(cherry picked from commit e1d06d7a0b)
2015-12-22 15:18:44 +01:00
Thomas Haller
668c1e6d22 macros: add NM_PRINT_FMT_QUOTE_STRING() macro
(cherry picked from commit 6bcc1eda0b)
2015-12-22 15:18:44 +01:00
Thomas Haller
2583110ef9 libnm-util: allow unknown setting types in nm_connection_get_virtual_iface_name()
Allow calling nm_connection_get_virtual_iface_name() on a non-verified
connection by not asserting asserting against a valid base-setting.

On nma-1-0 branch, nm-applet can crash with:

    #3  0x00007ffff2993a7a in g_assertion_message_expr (domain=0x7ffff51fad86 "libnm-util", file=0x7ffff51fb728 "nm-connection.c", line=320, func=0x7ffff51fc028 "_get_type_setting", expr=<optimized out>) at gtestutils.c:2444
    #4  0x00007ffff51ac52f in _get_type_setting (connection=0xa3c160 [NMRemoteConnection]) at nm-connection.c:320
    #5  0x00007ffff51ac341 in nm_connection_get_virtual_iface_name (connection=0xa3c160 [NMRemoteConnection]) at nm-connection.c:1436
    #6  0x0000000000415bdc in add_virtual_items (type=type@entry=0x43c11d "bridge", all_devices=all_devices@entry=0x7f6580, all_connections=all_connections@entry=0x9354a0, menu=menu@entry=0x922990 [GtkMenu], applet=applet@entry=0x6cc000 [NMApplet]) at applet.c:1640
    #7  0x00000000004176f6 in nma_menu_add_devices (menu=menu@entry=0x922990 [GtkMenu], applet=applet@entry=0x6cc000 [NMApplet]) at applet.c:1713
    #8  0x0000000000418315 in nma_menu_show_cb (menu=0x922990 [GtkMenu], applet=0x6cc000 [NMApplet]) at applet.c:1974

where the connection type is "tun".

Note that libnm accepts invalid connections and exposes them to the
user (albeit issuing a warning). Later on there are many places where
that can lead to further g_return*(), which is ugly indeed.
At least, we should not assert against valid connections (because that
crashes the user) and there is a well known fact that the base setting
will be missing for tun settings. No need to even warn about that in
nm_connection_get_virtual_iface_name() (we already got the warning
during replace_settings).

(cherry picked from commit 8c27a370ff)
2015-12-18 14:51:06 +01:00
Thomas Haller
c9e24ff528 cli: fix spelling in error message
https://bugzilla.gnome.org/show_bug.cgi?id=759555

(cherry picked from commit 0959109b19)
2015-12-17 12:28:14 +01:00
Piotr Drąg
ab07a0cb1d po: update Polish (pl) translation (bgo #759562)
https://bugzilla.gnome.org/show_bug.cgi?id=759562

(cherry picked from commit d612cccc4f)
2015-12-17 12:19:20 +01:00
Milo Casagrande
07ee7ca027 po: update Italian (it) translation (bgo #759577)
https://bugzilla.gnome.org/show_bug.cgi?id=759577
2015-12-17 12:10:15 +01:00
Dan Williams
65118df457 adsl: look up ATM index before construction
Fixes a crash if we can't read the ATM index.  We need the ATM
index, and we can't do anything with the device before we have it,
so don't bother creating one if we we can't get it.

NetworkManager[9662]: <error> [1449678770.705541] [nm-device-adsl.c:607] constructor(): (atmtcp0): error reading ATM device index

(NetworkManager:9662): GLib-GObject-CRITICAL **: object NMDeviceAdsl 0x1e8f880 finalized while still in-construction

(NetworkManager:9662): GLib-GObject-CRITICAL **: Custom constructor for class NMDeviceAdsl returned NULL (which is invalid). Please use GInitable instead.
**
NetworkManager-adsl:ERROR:nm-atm-manager.c:121:adsl_add: assertion failed: (device)

(cherry picked from commit 9bb96b00a5)
2015-12-16 09:38:38 -06:00
Dan Williams
48c9a1fcc6 adsl: fix detection of br2684 ("nas") interface (bgo #759001)
At some point the platform changed to no longer ask the kernel for
interfaces when one wasn't in its cache, but to wait for netlink
events to be notified of the new interface.  That broke some assumptions
that the ADSL code was making, causing a crash.

Rework the ADSL br2684 interface to clean up a couple of things
(get rid of 'disposed', consolidate dispose/deactivate cleanup) and
watch for the br2684 interface to show up with a periodic timeout.

(cherry picked from commit 29f4de09a5)
2015-12-16 09:35:05 -06:00
Lubomir Rintel
fb2dced9c3 build: bump soup requirement to 2.40
The dns-manager uses some newer API.

(cherry picked from commit 7873b1761d)
2015-12-16 14:31:12 +01:00
Lubomir Rintel
d0c3dac64b build: use soup 2.32
We already use 2.32 API and also use API that was replaced with new one after
2.42 and deprecated in 2.53.

(cherry picked from commit 15f1cd09d9)
2015-12-16 14:31:07 +01:00
Beniamino Galvani
2469083902 clients: fix build with old GLib
G_DEFINE_QUARK is only available since 2.34, include
"nm-glib-compat.h" to fix the following error:

 ./../common/nm-vpn-helpers.c: In function ‘G_DEFINE_QUARK’:
 ./../common/nm-vpn-helpers.c:54:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘{’ token

Fixes: dca2ded7e8
2015-12-14 16:30:25 +01:00
Jiří Klimeš
5745e954a1 merge: enable VPN secrets for nmtui/nmcli secret agent (rh #975185)
It allows nmcli and nmtui to ask for VPN passwords and thus successfully
activate VPN connections.
There is a special handling for OpenConnect, because the user does not know
the secrets. They have to be obtained by authenticating to OpenConnect server.

https://bugzilla.redhat.com/show_bug.cgi?id=975185
2015-12-12 22:33:51 +01:00
Jiří Klimeš
71cfa4fb79 tui: prefill a secret in the entry if we have a value
(cherry picked from commit a1536fe3d1)
2015-12-12 22:31:37 +01:00
Jiří Klimeš
3f2dd0b2a9 tui: allow connecting to OpenConnect
by running "openconnect --authenticate" and getting secrets from it

(cherry picked from commit 2e345faa7e)
2015-12-12 22:31:10 +01:00
Jiří Klimeš
19756e874d cli: do not present secrets from openconnect to the user for confirmation
It is pointless to present them and require user to press Return for each
password prompt.

(cherry picked from commit fb62fc76cb)
2015-12-12 22:30:48 +01:00
Jiří Klimeš
7acbf23b89 cli: make asking VPN secrets for OpenConnect really work
by running nm_vpn_openconnect_authenticate_helper() and filling the obtained
secrets to the array sent to NM.

(cherry picked from commit 45fc268890)
2015-12-12 22:30:09 +01:00
Jiří Klimeš
348ba7645b clients: add a helper function to get required openconnect VPN secrets
OpenConnect needs three secrets - COOKIE, HOST and FINGERPRINT. They can be
obtained by authenticating to the server. This can be performed by running
"openconnect --authenticate <host>" and the three values are printed to stdout.

Note that the function may (probably will) interactively ask user for
his credentials.

Alternatively, it would be possible to dlopen() libopenconnect and call its
functions. However, as that would be more complicated and would also require
implementing functionality that openconnect simply does for free for us, it is
not worth it, I think.

(cherry picked from commit ea54b7f2c0)
2015-12-12 22:29:25 +01:00
Jiří Klimeš
d6b98449a8 clients: add vpn_type member to secret structure in secret agent
It is useful to know what VPN type the secret belongs to.

(cherry picked from commit 8dfafac17c)
2015-12-12 22:29:03 +01:00
Jiří Klimeš
dca2ded7e8 clients: move vpn_get_secret_names() to nm-vpn-helpers
It should eventually move into libnm and ideally the data be obtained from VPN
plugins.

(No functional change, only moving the function).

(cherry picked from commit 6dd1e2673e)
2015-12-12 22:28:33 +01:00
Jiří Klimeš
9d18afb0e5 clients: enable VPN secrets for nmtui/nmcli secret agent (rh #975185)
It allows nmcli and nmtui to ask for VPN passwords and thus successfully
activate VPN connections.

https://bugzilla.redhat.com/show_bug.cgi?id=975185

(cherry picked from commit de86c23fbe)
2015-12-12 22:27:38 +01:00
Thomas Haller
088604f62e platform: fix memleak in _nl_link_parse_info_data()
Fixes: e9f364548a
2015-12-10 18:04:40 +01:00
Thomas Haller
5810502d19 platform: fix memleak in _nl_sock_flush_data()
Fixes: 9a16ce0876
(cherry picked from commit eeb7d20ee0)
2015-12-10 18:00:08 +01:00
Thomas Haller
feaa4e5b9a platform: EAGAIN is equal to EWOULDBLOCK
The macro EWOULDBLOCK is another name for EAGAIN; they are always the
  same in the GNU C Library.

  https://www.gnu.org/savannah-checkouts/gnu/libc/manual/html_node/Error-Codes.html

Otherwise, we would need a workaround for EWOULDBLOCK too, because
libnl maps that to NLE_FAILURE. So we would have to detect EAGAIN
as (nle == -NLE_FAILURE && errno == EWOULDBLOCK).

(cherry picked from commit d2fab2df54)
2015-12-10 17:57:22 +01:00
Thomas Haller
df4e535752 platform: fix event_handler_read_netlink_one() wrongly returning with nothing to read
When the errno was accidentally set to EAGAIN or EWOULDBLOCK,
we would only read one single message and return that there is
nothing to read.

This means, if there were more then one messages ready to read,
we would only read the first one and return to the main-loop
(which then again calls back to platform as more data is ready
to be read).

(cherry picked from commit 10b684b827)
2015-12-10 17:20:12 +01:00
Thomas Haller
a89feb474b tests/valgrind: rename name of logfile for valgrind run
Change the name of the file where to store the results
of the valgrind run.

Previously the file had a prefix "valgrind-", which is inconvinient.
Instead, have the file using the same name as the test executable,
with a ".valgrind-log" suffix.

(cherry picked from commit ce238a7074)
2015-12-05 20:36:24 +01:00
Beniamino Galvani
83f4c1c9bf core: strip trailing dot from domain search list
dhclient adds a trailing dot to domain search list entries received
from the server, while the same domains received by other means
(dhcpcd on RA) don't have the final dot. The result is that
resolv.conf can be populated with duplicated entries.

Fix this by stripping the trailing dot when a new search domain is
added to a IP configuration.

https://bugzilla.gnome.org/show_bug.cgi?id=758777
(cherry picked from commit 6e990cf97b)
2015-12-05 10:08:15 +01:00
Thomas Haller
dd088ed595 ppp-manager: fix crash in create_pppd_cmd_line() for ADSL with PPPOE protocol
Failed to lookup pppoe_binary, which results in a failed assertion

    NetworkManager:ERROR:ppp-manager/nm-ppp-manager.c:949:create_pppd_cmd_line: assertion failed: (pppoe_binary != NULL)

https://bugzilla.gnome.org/show_bug.cgi?id=759001

Fixes: 7955806a02
2015-12-04 14:25:57 +01:00
Jiří Klimeš
77c7292fc6 cli: remove duplicated checks for running Networkmanager
It is already performed in do_connections().

(cherry picked from commit 4c437863fa)
2015-12-03 16:15:29 +01:00
Jiří Klimeš
c66a021b7e dhcp: lifetimes are unsigned integers, use %u printf specifier (rh #1268911)
https://bugzilla.redhat.com/show_bug.cgi?id=1268911

(cherry picked from commit d944a0f134)
2015-12-03 15:29:51 +01:00
Thomas Haller
25c4497173 platform: cope differently with spurious RTM_DELLINK message when unslaving bridge-slave
Unslaving from a bridge causes a wrong RTM_DELLINK event for
the former slave.

    # ip link add dummy0 type dummy
    # ip link add bridge0 type bridge
    # ip link set bridge0 up
    # ip link set dummy0 master bridge0
    # ip monitor link &
    # ip link set dummy0 nomaster
    18: dummy0: <BROADCAST,NOARP> mtu 1500 qdisc noop master bridge0 state DOWN group default
        link/ether 76:44:5f:b9:38:02 brd ff:ff:ff:ff:ff:ff
    18: dummy0: <BROADCAST,NOARP> mtu 1500 master bridge0 state DOWN
        link/ether 76:44:5f:b9:38:02
    Deleted 18: dummy0: <BROADCAST,NOARP> mtu 1500 master bridge0 state DOWN
        link/ether 76:44:5f:b9:38:02
    18: dummy0: <BROADCAST,NOARP> mtu 1500 qdisc noop state DOWN group default
        link/ether 76:44:5f:b9:38:02 brd ff:ff:ff:ff:ff:ff
    19: bridge0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default
        link/ether 00:00:00:00:00:00 brd ff:ff:ff:ff:ff:ff
    19: bridge0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default
        link/ether 00:00:00:00:00:00 brd ff:ff:ff:ff:ff:ff

Previously, during do_request_link() we would remember the link that is
about to be requested (delayed_deletion) and delay processing a new
RTM_DELLINK message until the end of do_request_link() -- and possibly
forget about about the deletion, if RTM_DELLINK was followed by a
RTM_NEWLINK.

However, this hack does not catch the case where an external command
unslaves the link.

Instead just accept the wrong event and raise a "removed" signal right
away. This brings the cache in an externally visible, wrong state that
will be fixed by a following "added" signal.

Still do that because working around the kernel bug is complicated. Also,
we already might emit wrong "added" signals for devices that are already
removed. As a consequence, a user should not consider the platform signals
until all events are processed.
Listeners to that signal should accept that added/removed link changes
can be wrong and should preferably handle them idly, when the events
have settled.

It can even be worse, that a RTM_DELLINK is not fixed by a following
RTM_NEWLINK:

    ...
    # ip link set dummy0 nomaster
    36: dummy0: <BROADCAST,NOARP> mtu 1500 qdisc noop master bridge0 state DOWN
        link/ether e2:f2:20:98:3a:be brd ff:ff:ff:ff:ff:ff
    36: dummy0: <BROADCAST,NOARP> mtu 1500 master bridge0 state DOWN
        link/ether e2:f2:20:98:3a:be
    Deleted 36: dummy0: <BROADCAST,NOARP> mtu 1500 master bridge0 state DOWN
        link/ether e2:f2:20:98:3a:be
    37: bridge0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN
        link/ether 00:00:00:00:00:00 brd ff:ff:ff:ff:ff:ff
    37: bridge0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN
        link/ether 00:00:00:00:00:00 brd ff:ff:ff:ff:ff:ff

So, when a slave is deleted, we have to refetch it too.

https://bugzilla.redhat.com/show_bug.cgi?id=1285719
(cherry picked from commit 8a87a91813)

Conflicts:
    src/platform/nm-linux-platform.c
    src/platform/tests/test-link.c
2015-12-01 17:26:02 +01:00
Thomas Haller
ba9a278c7c Revert "platform: cancel delayed action REFRESH_LINK when receiving an update"
On some kernels (at least RHEL-7.2) we receive a spurious RTM_NEWLINK
message after the RTM_DELLINK message for deleting a bond master.

On RHEL-7, the following commands give:

    # ip link add dummy0 type dummy
    # ip link add bond0 type bond
    # ip link set bond0 up
    # ip link set dummy0 master bond0
    # ip monitor link &
    # ip link del bond0
    21: bond0: <BROADCAST,MULTICAST,MASTER> mtu 1500 qdisc noqueue state DOWN
        link/ether 1e:a6:6c:81:c1:8d brd ff:ff:ff:ff:ff:ff
    Deleted 21: bond0: <BROADCAST,MULTICAST,MASTER> mtu 1500 qdisc noop state DOWN
        link/ether 1e:a6:6c:81:c1:8d brd ff:ff:ff:ff:ff:ff
    20: dummy0: <BROADCAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN
        link/ether 1e:a6:6c:81:c1:8d brd ff:ff:ff:ff:ff:ff
    21: bond0: <BROADCAST,MULTICAST,MASTER> mtu 1500 qdisc noop state DOWN
        link/ether da:ee:58:70:6f:e5 brd ff:ff:ff:ff:ff:ff

    ^^^^^^^^^^^^^^^ RTM_NEWLINK after RTM_DELLINK (and there follows no
    RTM_DELLINK afterwards)

    21: bond0: <BROADCAST,MULTICAST,MASTER> mtu 1500 qdisc noop state DOWN
        link/ether da:ee:58:70:6f:e5 brd ff:ff:ff:ff:ff:ff
    20: dummy0: <BROADCAST,NOARP> mtu 1500 qdisc noqueue state DOWN
        link/ether 1e:a6:6c:81:c1:8d brd ff:ff:ff:ff:ff:ff
    20: dummy0: <BROADCAST,NOARP> mtu 1500 qdisc noqueue state DOWN
        link/ether 1e:a6:6c:81:c1:8d brd ff:ff:ff:ff:ff:ff

Fix that by reverting clear_REFRESH_LINK(). This fix has two downsides:

- on kernels where this hack is not necessary, we unnecessarily refetch
  a link
- the platform cache first removes the link, adds it again and removes
  it. This is ugly, but should have no real consequences because all
  listeners to the platform signals delay processing the signals to an
  idle handler.

https://bugzilla.redhat.com/show_bug.cgi?id=1285719

This reverts commit f4f4e1cf09 (on master).
This reverts commit 91c00072f2 (on nm-1-0).

(cherry picked from commit 83240f24ae)
2015-12-01 17:21:14 +01:00
Thomas Haller
f5149a1f5a platform: workaround kernel bug about missing IFLA_LINK/parent when creating veth
The related bug rh#1285827 in kernel causes a missing IFLA_LINK/parent
attribute when creating a veth pair:

    # ip monitor link &
    [1] 6745

    # ip link add dev vm1 type veth peer name vm2
    30: vm2@NONE: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN
        link/ether be:e3:b7:0e:14:52 brd ff:ff:ff:ff:ff:ff
    31: vm1@vm2: <BROADCAST,MULTICAST,M-DOWN> mtu 1500 qdisc noop state DOWN
        link/ether da:e6:a6:c5:42:54 brd ff:ff:ff:ff:ff:ff

Add a workaround and test.

Related: https://bugzilla.redhat.com/show_bug.cgi?id=1285827
(cherry picked from commit 5650c82a8e)

Conflicts:
    src/platform/nm-linux-platform.c
    src/platform/tests/test-link.c
2015-12-01 17:15:01 +01:00
Jiří Klimeš
015f99121f merge: merge changes for getting singleton objects (rh #1286576)
This fixes a problem of invoking wpa_supplicant in main() even if it is
not required later.
2015-12-01 15:32:31 +01:00
Thomas Haller
b8cb56eda7 core: declare nm_agent_manager_get() using NM_DEFINE_SINGLETON_GETTER()
Also move the initilization of the instance into the constructed()
method.

NMAgentManager now owns a reference to the DBUS manager and Auth
manager and the dispose() function properly unregisters itself from
both.

(cherry picked from commit 3af40acf31)
2015-12-01 13:17:23 +01:00
Thomas Haller
9c280a9a73 core: declare nm_supplicant_manager_get() using NM_DEFINE_SINGLETON_GETTER()
(cherry picked from commit d45c1b84f4)
2015-12-01 13:16:58 +01:00
Thomas Haller
cbe410e560 core: declare nm_firewall_manager_get() using NM_DEFINE_SINGLETON_GETTER()
(cherry picked from commit 22409e0481)
2015-12-01 13:14:01 +01:00