Beniamino Galvani
6308c90b5e
merge: branch 'bg/checkpoint-bgo757858-v2'
...
Introduce D-Bus API to create, rollback and destroy checkpoints of
some devices' status.
https://bugzilla.gnome.org/show_bug.cgi?id=757858
2016-08-17 14:58:07 +02:00
Beniamino Galvani
048801add3
checkpoint: add python D-Bus example
2016-08-17 14:55:34 +02:00
Beniamino Galvani
a82e514822
checkpoint: add audit support
2016-08-17 14:55:34 +02:00
Beniamino Galvani
a52d4654ec
checkpoint: use polkit to check permission
2016-08-17 14:55:34 +02:00
Beniamino Galvani
3e09aed2a0
checkpoint: add create, rollback and destroy D-Bus API
...
Co-authored-by: Thomas Haller <thaller@redhat.com >
2016-08-17 14:55:34 +02:00
Beniamino Galvani
b9e89c918f
core: fix builds without polkit support
...
Fix the following build error:
nm-auth-utils.c: In function ‘nm_auth_chain_add_call’:
nm-auth-utils.c:402:46: error: ‘DBUS_GERROR’ undeclared (first use in this function)
call->chain->error = g_error_new_literal (DBUS_GERROR,
Fixes: 1cf35cb26b
2016-08-17 11:28:55 +02:00
Thomas Haller
1f2eeb85d8
build: rename $(LIBDL) to $(DL_LIBS) and modify detection
2016-08-15 17:23:41 +02:00
Thomas Haller
2a163c1825
build: use $(LIBDL) in ppp-manager's Makefile.am
2016-08-15 16:57:58 +02:00
Piotr Drąg
c53eed13e9
po: update Polish (pl) translation (bgo #769463 )
...
https://bugzilla.gnome.org/show_bug.cgi?id=769463
2016-08-15 14:41:59 +02:00
Thomas Haller
6a8e46700f
dispatcher/tests: cleanup test by using cleanup attribute to free data
2016-08-12 14:21:05 +02:00
Thomas Haller
1acbe1d66f
dispatcher/tests: fix memleak in test
...
Causes valgrind failure.
Fixes: 570e8ee296
2016-08-12 14:20:57 +02:00
Thomas Haller
f956d2e3ef
systemd: cleanup systemd's include paths in src/Makefile.am
...
Certain systemd include paths are internal and should not be added
to the include paths when compiling non-systemd sources.
2016-08-12 09:38:51 +02:00
Thomas Haller
f5a4a7e007
systemd: hide "nm-sd-adapt.h" and expose required internal API in "nm-sd.h"
...
Users outside of src/systemd should not make use of internal API.
Currently, "nm-dhcp-systemd.c" still makes use of internal systemd
functions. Instead of letting "nm-dhcp-systemd.c" include internal
headers, handpick the required defines to "nm-sd.h" and hide "nm-sd-adapt.h".
"nm-sd-adapt.h" is now only used to compile internal systemd sources.
2016-08-12 09:38:51 +02:00
Thomas Haller
4c849d148f
systemd: add dummy header files to adapt compilation of systemd sources
...
Instead of repeatedly disabling the inclusion like
#if 0 /* NM_IGNORED */
#include "missing.h"
#endif /* NM_IGNORED */
add dummy header files to "src/systemd/sd-adapt".
2016-08-12 09:38:48 +02:00
Thomas Haller
2f296cb8fe
systemd: merge branch systemd into master
...
Conflicts:
src/systemd/src/basic/fd-util.c
src/systemd/src/basic/fileio.c
src/systemd/src/libsystemd/sd-event/sd-event.c
src/systemd/src/libsystemd/sd-id128/sd-id128.c
2016-08-12 09:20:16 +02:00
Thomas Haller
5507dd68ca
systemd: update code from upstream
...
This is a direct dump from systemd git on 2016-08-11, git commit
9c5077fed42dc3cd2517a7ab816babef549dd079.
======
SYSTEMD_DIR=../systemd
COMMIT=9c5077fed42dc3cd2517a7ab816babef549dd079
(
cd "$SYSTEMD_DIR"
git checkout "$COMMIT"
git reset --hard
git clean -fdx
)
git ls-files :/src/systemd/src/ | xargs -d '\n' rm -f
nm_copy_sd() {
mkdir -p "./src/systemd/$(dirname "$1")"
cp "$SYSTEMD_DIR/$1" "./src/systemd/$1"
}
nm_copy_sd "src/basic/alloc-util.c"
nm_copy_sd "src/basic/alloc-util.h"
nm_copy_sd "src/basic/async.h"
nm_copy_sd "src/basic/escape.c"
nm_copy_sd "src/basic/escape.h"
nm_copy_sd "src/basic/ether-addr-util.c"
nm_copy_sd "src/basic/ether-addr-util.h"
nm_copy_sd "src/basic/extract-word.c"
nm_copy_sd "src/basic/extract-word.h"
nm_copy_sd "src/basic/fileio.c"
nm_copy_sd "src/basic/fileio.h"
nm_copy_sd "src/basic/fd-util.c"
nm_copy_sd "src/basic/fd-util.h"
nm_copy_sd "src/basic/fs-util.c"
nm_copy_sd "src/basic/fs-util.h"
nm_copy_sd "src/basic/hash-funcs.c"
nm_copy_sd "src/basic/hash-funcs.h"
nm_copy_sd "src/basic/hashmap.c"
nm_copy_sd "src/basic/hashmap.h"
nm_copy_sd "src/basic/hexdecoct.c"
nm_copy_sd "src/basic/hexdecoct.h"
nm_copy_sd "src/basic/hostname-util.c"
nm_copy_sd "src/basic/hostname-util.h"
nm_copy_sd "src/basic/in-addr-util.c"
nm_copy_sd "src/basic/in-addr-util.h"
nm_copy_sd "src/basic/io-util.c"
nm_copy_sd "src/basic/io-util.h"
nm_copy_sd "src/basic/list.h"
nm_copy_sd "src/basic/log.h"
nm_copy_sd "src/basic/macro.h"
nm_copy_sd "src/basic/mempool.h"
nm_copy_sd "src/basic/mempool.c"
nm_copy_sd "src/basic/parse-util.c"
nm_copy_sd "src/basic/parse-util.h"
nm_copy_sd "src/basic/path-util.c"
nm_copy_sd "src/basic/path-util.h"
nm_copy_sd "src/basic/prioq.h"
nm_copy_sd "src/basic/prioq.c"
nm_copy_sd "src/basic/random-util.c"
nm_copy_sd "src/basic/random-util.h"
nm_copy_sd "src/basic/refcnt.h"
nm_copy_sd "src/basic/set.h"
nm_copy_sd "src/basic/signal-util.h"
nm_copy_sd "src/basic/siphash24.c"
nm_copy_sd "src/basic/siphash24.h"
nm_copy_sd "src/basic/socket-util.c"
nm_copy_sd "src/basic/socket-util.h"
nm_copy_sd "src/basic/sparse-endian.h"
nm_copy_sd "src/basic/stdio-util.h"
nm_copy_sd "src/basic/string-table.c"
nm_copy_sd "src/basic/string-table.h"
nm_copy_sd "src/basic/string-util.c"
nm_copy_sd "src/basic/string-util.h"
nm_copy_sd "src/basic/strv.c"
nm_copy_sd "src/basic/strv.h"
nm_copy_sd "src/basic/time-util.c"
nm_copy_sd "src/basic/time-util.h"
nm_copy_sd "src/basic/umask-util.h"
nm_copy_sd "src/basic/unaligned.h"
nm_copy_sd "src/basic/utf8.c"
nm_copy_sd "src/basic/utf8.h"
nm_copy_sd "src/basic/util.c"
nm_copy_sd "src/basic/util.h"
nm_copy_sd "src/libsystemd-network/arp-util.c"
nm_copy_sd "src/libsystemd-network/arp-util.h"
nm_copy_sd "src/libsystemd-network/dhcp6-internal.h"
nm_copy_sd "src/libsystemd-network/dhcp6-lease-internal.h"
nm_copy_sd "src/libsystemd-network/dhcp6-network.c"
nm_copy_sd "src/libsystemd-network/dhcp6-option.c"
nm_copy_sd "src/libsystemd-network/dhcp6-protocol.h"
nm_copy_sd "src/libsystemd-network/dhcp-identifier.c"
nm_copy_sd "src/libsystemd-network/dhcp-identifier.h"
nm_copy_sd "src/libsystemd-network/dhcp-internal.h"
nm_copy_sd "src/libsystemd-network/dhcp-lease-internal.h"
nm_copy_sd "src/libsystemd-network/dhcp-network.c"
nm_copy_sd "src/libsystemd-network/dhcp-option.c"
nm_copy_sd "src/libsystemd-network/dhcp-packet.c"
nm_copy_sd "src/libsystemd-network/dhcp-protocol.h"
nm_copy_sd "src/libsystemd-network/lldp-internal.h"
nm_copy_sd "src/libsystemd-network/lldp-neighbor.c"
nm_copy_sd "src/libsystemd-network/lldp-neighbor.h"
nm_copy_sd "src/libsystemd-network/lldp-network.c"
nm_copy_sd "src/libsystemd-network/lldp-network.h"
nm_copy_sd "src/libsystemd-network/network-internal.c"
nm_copy_sd "src/libsystemd-network/network-internal.h"
nm_copy_sd "src/libsystemd-network/sd-dhcp6-client.c"
nm_copy_sd "src/libsystemd-network/sd-dhcp6-lease.c"
nm_copy_sd "src/libsystemd-network/sd-dhcp-client.c"
nm_copy_sd "src/libsystemd-network/sd-dhcp-lease.c"
nm_copy_sd "src/libsystemd-network/sd-ipv4ll.c"
nm_copy_sd "src/libsystemd-network/sd-ipv4acd.c"
nm_copy_sd "src/libsystemd-network/sd-lldp.c"
nm_copy_sd "src/libsystemd/sd-event/sd-event.c"
nm_copy_sd "src/libsystemd/sd-id128/id128-util.c"
nm_copy_sd "src/libsystemd/sd-id128/id128-util.h"
nm_copy_sd "src/libsystemd/sd-id128/sd-id128.c"
nm_copy_sd "src/shared/dns-domain.c"
nm_copy_sd "src/shared/dns-domain.h"
nm_copy_sd "src/systemd/_sd-common.h"
nm_copy_sd "src/systemd/sd-dhcp6-client.h"
nm_copy_sd "src/systemd/sd-dhcp6-lease.h"
nm_copy_sd "src/systemd/sd-dhcp-client.h"
nm_copy_sd "src/systemd/sd-dhcp-lease.h"
nm_copy_sd "src/systemd/sd-event.h"
nm_copy_sd "src/systemd/sd-ndisc.h"
nm_copy_sd "src/systemd/sd-id128.h"
nm_copy_sd "src/systemd/sd-ipv4acd.h"
nm_copy_sd "src/systemd/sd-ipv4ll.h"
nm_copy_sd "src/systemd/sd-lldp.h"
2016-08-12 08:30:29 +02:00
Thomas Haller
9c8b7b001e
systemd/tests: don't link test-systemd against libNetworkManagerBase
...
One point of test-systemd is to see whether our internal systemd code can
fully link without external systemd library. In fact, we want all symbols
from the internal systemd code to resolve, because when we link against
an external libsystemd library, we may mix differing APIs, resulting in
subtle bugs.
Currently, it may well be that libNetworkManagerBase.la already links
against libsystemd, which would result in test-systemd to wrongly
succeed resolving all names.
Fix that, by don't link libNetworkManagerBase.la into test-systemd.
2016-08-12 08:14:53 +02:00
Thomas Haller
f124f8772e
build: remove libsystemd-nm.la LDADD from nm-iface-helper
2016-08-11 20:50:19 +02:00
Thomas Haller
6d2680acf1
nm-glib.h: fix compatibility wrapper for g_variant_new_take_string()
...
g_variant_new_from_bytes() is itself only available since 2.36, thus
using it triggers a deprecation warning itself.
2016-08-11 19:21:55 +02:00
Thomas Haller
a657fc39ce
build: fix out-of-tree build for libNetworkManagerTest
...
Fixes: 3d30004710
2016-08-11 17:03:36 +02:00
Beniamino Galvani
740fc29ea7
merge: branch 'bg/checkpoint-bgo757858-v2' (early part)
...
https://bugzilla.gnome.org/show_bug.cgi?id=757858
2016-08-11 11:57:33 +02:00
Thomas Haller
80d52e3230
nm-glib: add compatibility wrapper for g_variant_new_take_string()
2016-08-11 11:54:18 +02:00
Thomas Haller
d23f43f2b9
core: add nm_bus_manager_ensure_root() helper
2016-08-11 11:54:18 +02:00
Thomas Haller
3d30004710
build: cleanup src/Makefile.am
...
- reorder entries in src/Makefile.am so that general names
are all at the beginning (AM_CPPFLAGS, sbin_PROGRAMS)
and the names for a certain library/binary are grouped
together
- have libNetworkManager.la reuse libNetworkManagerBase.la.
- let all components in src/Makefile.am use the same AM_CPPFLAGS,
except libsystem-nm.la.
- move callouts/nm-dispatcher-api.h to shared/ directory. It
is obviously not internal API to callouts, and callouts is
not a library. Thus, the right place is shared/.
2016-08-11 11:54:18 +02:00
Thomas Haller
d44fa3140b
build: rename libNetworkManager-base.la to libNetworkManagerBase.la
...
it matches libNetworkManagerTest.la.
2016-08-11 11:54:07 +02:00
Thomas Haller
663c85a41a
bulid: don't link NMFakePlatform into NetworkManager binary
...
It's only used for testing. Add a new object libNetworkManagerTest.la
that contains libNetworkManager.la including the test stubs.
2016-08-11 11:54:07 +02:00
Jiří Klimeš
e02d56c50c
libnm-util: document all NMSettingBondError entries
2016-08-10 22:45:31 +02:00
Jiří Klimeš
8fc199ae96
libnm-core: fix invalid return annotation for nm_vpn_editor_plugin_set_plugin_info()
2016-08-10 22:30:50 +02:00
Jiří Klimeš
560f810bf5
libnm-core: add missing element-type annotation
2016-08-10 22:24:10 +02:00
Jiří Klimeš
3a50a46fb9
libnm-core: fix GObject introspection transfer annotations
2016-08-10 22:24:10 +02:00
Beniamino Galvani
ac67771bc1
policy: fix hostname change when IP method ends after activation (take 2)
...
Commit 9446481f4c
("policy: update system hostname when DHCP
configuration changes") tried to fix the missing hostname change when
IPv4 receives a hostname through DHCP but terminates after IPv6, by
calling update_routing_and_dns() as soon as the new DHCP configuration
was received.
It turns out that doing so is not always effective because the device
must be the "best" device (the one with default route) in order to
trigger a hostname change, but the best device status is decided
later. Updating the hostname in device_ipx_config_changed() should
cover all cases.
Fixes: 9446481f4c
https://bugzilla.redhat.com/show_bug.cgi?id=1356015
https://bugzilla.redhat.com/show_bug.cgi?id=1364393
2016-08-09 21:24:35 +02:00
Beniamino Galvani
e4b2c989dc
build: fix build with '--with-suspend-resume=upower'
...
Now we have a single file for all suspend APIs and the selection is
done through the preprocessor: remove stale AM_CONDITIONALs and define
SUSPEND_RESUME_UPOWER when needed.
Fixes: c76eb3e8f7
2016-08-04 16:30:14 +02:00
Beniamino Galvani
765dabd005
libnm: fix introspection annotations for nm_client_load_connections()
...
Add the "(array zero-terminated=1)" GLib introspection annotation when
the parameter is a NULL-terminated string array.
https://mail.gnome.org/archives/networkmanager-list/2016-August/msg00017.html
Reported-by: Petr Horacek <phoracek@redhat.com >
2016-08-04 13:52:43 +02:00
Beniamino Galvani
5c45327056
release: bump version to 1.3.90 (1.4-beta1)
2016-08-03 09:51:02 +02:00
Beniamino Galvani
65e522ee16
release: update NEWS
2016-08-03 09:39:03 +02:00
Beniamino Galvani
482e506674
cli: fix error reporting for connection delete
...
get_connection() shifts to the next argument, so we need to cache the
old one.
Fixes: 717db4fe01
2016-08-02 17:21:12 +02:00
Beniamino Galvani
ec6a118f29
cli: fix connection delete/monitor
...
The two commands should apply to all available connections matching
the given name.
Fixes: 717db4fe01
2016-08-02 16:49:37 +02:00
Francesco Giudici
2adb5fc00f
nmcli: fix connection clone/modify
...
remove extra "next_arg"s (get_connection already shifts argv).
Fixes: 717db4fe01
2016-08-02 15:44:47 +02:00
Beniamino Galvani
2eafd0ea52
tui: avoid failed assertion when adding bond slaves
...
When trying to add new slaves to a bond connection, for the first
slave nmt_add_connection_show() is called with !priv->single_type to
display a slave-type selection form. For the second slave the type is
predefined and thus nmt_add_connection_show() doesn't show the dialog;
instead it calls create_connection() directly, which invokes
nmt_newt_form_quit() on the not-shown dialog causing:
nmtui-CRITICAL **: nmt_newt_form_quit: assertion 'priv->form != NULL' failed
Don't call nmt_newt_form_quit() if the form was not shown.
https://bugzilla.gnome.org/show_bug.cgi?id=768981
2016-08-01 17:20:38 +02:00
Lubomir Rintel
b01219ad1b
libnm: link with libdl
...
Not default when linking with GOLD linker, but used for loading the VPN
plugins. We still get it when using NSS by dumb luck, but GnuTLS doesn't
drag it in.
https://bugzilla.gnome.org/show_bug.cgi?id=769328
2016-08-01 17:03:07 +02:00
Lubomir Rintel
2956fd5fcb
merge: branch 'lr/completion-2'
...
https://bugzilla.gnome.org/show_bug.cgi?id=768737
2016-08-01 16:11:35 +02:00
Lubomir Rintel
8cc6ce7e44
cli: add -f argument completion
2016-08-01 15:51:29 +02:00
Lubomir Rintel
2e5f8d7de6
cli: complete global flags
2016-08-01 15:51:29 +02:00
Lubomir Rintel
e996dfbb26
cli: make global flags parsing saner
...
Keep argv pointed at the current argument not the previous one.
2016-08-01 15:51:29 +02:00
Lubomir Rintel
81e8575a46
cli: don't call the nmc_do_cmds() default handler if we're at the end of command completion
2016-08-01 13:52:36 +02:00
Lubomir Rintel
8e7c94ed07
cli/connections: there's nothing to complete for reload
2016-08-01 13:52:36 +02:00
Lubomir Rintel
9e8a227813
cli/connections: add completion to show subcommand
2016-08-01 13:52:36 +02:00
Lubomir Rintel
a410e40655
cli/connections: add completion to down subcommand
2016-08-01 13:52:36 +02:00
Lubomir Rintel
af5c235f14
cli/connections: add completion to import subcommand
2016-08-01 13:52:36 +02:00
Lubomir Rintel
345291d6f1
cli/connections: add completion to load subcommand
2016-08-01 13:52:36 +02:00