summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* dhcp: set TERMINATED state when the client is stoppedbg/dhcp-stopBeniamino Galvani2021-04-142-2/+2
| | | | | | | | | | | | | | NM_DHCP_STATE_DONE is for when the client reports that it is shutting down. If we manually stop it, we should set the TERMINATED state, so that NMDevice doesn't start a grace period waiting for a renewal. This fixes the: device (enp1s0): DHCPv4: trying to acquire a new lease within 90 seconds message printed when NM is shutting down. https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/802
* lldp: merge branch 'liangwen12year:wl/lldp'Thomas Haller2021-04-143-20/+72
|\ | | | | | | https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/712
| * libnm,device: add LLDP status flag for NMDevice's interface_flagsWen Liang2021-04-143-8/+31
| | | | | | | | | | | | Add and set the flag to indicate device LLDP status. Signed-off-by: Wen Liang <liangwen12year@gmail.com>
| * device: add and use function `set_interface_flags_full()`Wen Liang2021-04-142-13/+42
|/ | | | | | | When device update `interface_flags`, call the function `set_interface_flags_full()`. Signed-off-by: Wen Liang <liangwen12year@gmail.com>
* all: make nm_steal_pointer() and g_steal_pointer() more typesafe using typeof()Thomas Haller2021-04-132-33/+19
| | | | | | | | | | | | | | | | | The previous code would always cast the argument to "void *", and thus loose some type information. For example, gulong variable = 0; g_steal_pointer(&variable); would compile, when it shouldn't. In general, we try to avoid redefining glib macros and headers. But we really want those extra compile time checks that we can get, so let's do it.
* audit: merge branch 'th/audit-cleanup'Thomas Haller2021-04-1310-94/+319
|\ | | | | | | https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/812
| * audit: improve audit logging for setting NMDevice D-Bus objectsth/audit-cleanupThomas Haller2021-04-121-18/+104
| | | | | | | | | | | | | | | | | | | | | | | | Previously, we would log: audit: op="device-autoconnect" arg="autoconnect" pid=282087 uid=0 result="success" audit: op="radio-control" arg="wimax-enabled" pid=559201 uid=0 result="success" Now we log: audit: op="device-autoconnect" interface="eth0" ifindex=2 args="false" pid=443054 uid=0 result="success" audit: op="radio-control" arg="wimax-enabled:off" pid=629726 uid=0 result="success"
| * audit: pass and reuse NMStrBuf for build_message()Thomas Haller2021-04-121-17/+24
| | | | | | | | | | | | | | | | | | build_message() is an internal helper function with a very specific purpose. Let's change it to take an NMStrBuf argument for generating the string. The advantage is that we don't need to allocate and free the buffers in between, but can just reuse it.
| * audit: don't use GValue for tracking values in AuditField structThomas Haller2021-04-121-36/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When using a GValue, we really should call g_value_unset(). Otherwise it is a code smell, even if we technically only created GValue with static strings and integers. But changing that is not easy, because the AuditField structs are allocated on the stack, and in different functions. So we cannot just pass a GDestroyNotify to GPtrArray to cleanup all those fields, because by then they will be out of scope. The proper solution would be to heap allocate the AuditField struct, add them to the GPtrArray, and free them with the free function. But that seams really unnecessary overhead, for something that is correct in practice. Let's accept the fact that by the time the fields array gets destroyed, it contains dangling pointers. If we already embrace the dangling pointers and that stuff is allocated on the stack and that we don't need to free, also get rid of GValue and use our plain NMValueType and NMValueTypUnion. GValue really doesn't give us much here. And it only makes us wonder: is it OK to not call g_value_unset()? With the plain tracking of the values, we know that it is OK.
| * audit: use NMStrBuf in audit's build_message()Thomas Haller2021-04-121-18/+14
| |
| * audit: fix using original file:line information for audit loggingThomas Haller2021-04-121-1/+12
| | | | | | | | | | With structured logging (journald), the file, line and func information is relevant. Propagate the right value to the audit logging line.
| * logging: add _nm_log_full() macroThomas Haller2021-04-123-16/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | _nm_log_impl() is the underlying implementation. As we have multiple implementations, it's a bit confusing how it all works together. We thus should not call this directly, so that there are few (literal) uses of this symbol. Still, we may need to call this version of the logging statement, because it's the only one that allows to provide the file location. Add a wrapper macro for this, that callers can use.
| * glib-aux: add nm_va_args_one_ptr() helper macroThomas Haller2021-04-121-0/+13
| |
| * glib-aux: add int64/uint64 types to NMValueTypeThomas Haller2021-04-122-2/+86
| |
| * std-aux: add NM_UTILS_GET_NEXT_REALLOC_SIZE_232 defineThomas Haller2021-04-122-0/+7
|/
* build: fix build dependency for systemd's fundamental for "config-extra.h"Thomas Haller2021-04-121-0/+1
| | | | | | | | | | | | | | | | $ make src/libnm-systemd-shared/src/fundamental/libnm_systemd_shared_la-string-util-fundamental.lo CC src/libnm-systemd-shared/src/fundamental/libnm_systemd_shared_la-string-util-fundamental.lo In file included from ./src/libnm-glib-aux/nm-default-glib.h:11, from ./src/libnm-systemd-shared/nm-default-systemd-shared.h:11, from ./src/libnm-systemd-shared/sd-adapt-shared/nm-sd-adapt-shared.h:9, from src/libnm-systemd-shared/src/fundamental/string-util-fundamental.c:3: ./src/libnm-std-aux/nm-default-std.h:32:10: fatal error: config-extra.h: No such file or directory 32 | #include "config-extra.h" | ^~~~~~~~~~~~~~~~ compilation terminated. make: *** [Makefile:15660: src/libnm-systemd-shared/src/fundamental/libnm_systemd_shared_la-string-util-fundamental.lo] Error 1 Fixes: 2a88de2280c9 ('systemd: merge branch systemd into master')
* libnm: fix nm_device_set_autoconnect() to use correct D-Bus property nameThomas Haller2021-04-091-2/+2
| | | | Fixes: ce0e898fb476 ('libnm: refactor caching of D-Bus objects in NMClient')
* nmtui: cleanup includes in "nmt-newt-utils.c"Thomas Haller2021-04-081-2/+3
|
* nmtui: support setting nmtui colors via environment variablesVojtech Bubela2021-04-081-1/+106
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, nmtui would set the newt color "checkbox" to a hard coded value. This made it impossible to override the color via "$NEWT_COLORS". With this change, nmtui also parses "$NEWT_COLORS" to allow setting newt colors: $ NEWT_COLORS=' window=white,red border=white,red checkbox=white,red actcheckbox=white,green ' nmtui Custom nmtui colors can now also be set via "$NMT_NEWT_COLORS": "badLabel" "plainLabel" "disabledButton" "textboxWithBackground" For example: $ NMT_NEWT_COLORS='plainLabel=green,lightgray' nmtui The environment variables "$NEWT_COLORS_FILE" and "NMT_NEWT_COLORS_FILE" are honored too. The code is based on libnewt code ([1]), authored by Miroslav Lichvar. That patch is originally LGPL-2.0-only licensed, but for inclusion in NetworkManager we require it to be LGPL-2.1-or-later. Miroslav kindly agreed to use his original contribution in NetworkManager. [1] https://pagure.io/newt/c/34e56d12931a25222d7debb22f95bb2f9fa696a0 Signed-off-by: Miroslav Lichvar <mlichvar@redhat.com> https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/issues/653 https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/793
* glib-aux: only evaluate arguments to NM_FLAGS_ALL() macro onceThomas Haller2021-04-071-2/+8
| | | | | | | | | | | In many cases, macros should aim to be function-like. That is, to evaluate all arguments and evaluate them exactly once. Fix NM_FLAGS_ALL() to evaluate the "check" argument only once. One downside of this change is that the result is no longer a compile time constance and cannot be used to initialize static variables. But that isn't used much anyway.
* m4/ax_lib_readline.m4: Update after running aclocalmasterJavier Jardón2021-04-071-36/+22
| | | | | See-also: https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/796 See-also: https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/807
* tests: fix undefined references to pthreadorbea2021-04-073-0/+525
| | | | | | | | | | | | | | | | | | | When building NetworkManger with --enable-tests or using 'make check' and slibtool the build will fail in many places with undefined references to pthreads. This is because -lpthread is never explicitly added to the appropriate variable, src_core_libNetworkManagerTest_la_LIBADD. When analyzing the build log with GNU libtool it can be seen that it silently adds -pthread on its own which hides the issue. To solve this ax_pthread.m4 from the autoconf-archives project can be used which provides the $(PTHREAD_LIBS) linker flag. Source: https://github.com/autoconf-archive/autoconf-archive/blob/master/m4/ax_pthread.m4 See-also: https://www.gnu.org/software/autoconf-archive/ax_pthread.html https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/804
* dns: merge branch 'th/dns-minor-cleanup'Thomas Haller2021-04-071-46/+46
|\ | | | | | | https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/809
| * dns: use C99 static array indexes in function parameters for compute_hash()Thomas Haller2021-04-071-1/+1
| |
| * dns/trivial: add code commentThomas Haller2021-04-071-0/+2
| |
| * dns/trivial: rename "ip_configs_lst" to "ip_config_lst"Thomas Haller2021-04-071-20/+20
| | | | | | | | | | | | | | | | | | The "_lst" suffix already indicates that this is a list. We have a list of ip-configs, so the prefix should be singular. It also matches the "NMDnsConfigIPData.ip_config_lst" field. The main reason for this renaming is that I want to search the file for /ip_config_lst/ and find both the list head and the list elements.
| * dns: also log empty DNS info during _collect_resolv_conf_data()Thomas Haller2021-04-071-10/+7
| |
| * dns: use NMStrBuf in _collect_resolv_conf_data()Thomas Haller2021-04-071-15/+16
|/
* systemd: merge branch systemd into masterThomas Haller2021-04-0631-235/+379
|\ | | | | | | https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/808
| * systemd: update code from upstream (2021-04-06)Thomas Haller2021-04-0627-236/+367
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a direct dump from systemd git. ====== SYSTEMD_DIR=../systemd COMMIT=34fde9f898f63096262d95c61d75db85dabe6fe4 ( cd "$SYSTEMD_DIR" git checkout "$COMMIT" git reset --hard git clean -fdx ) git ls-files -z :/src/core/systemd/src/ \ :/src/libnm-systemd-shared/src/ \ :/src/libnm-std-aux/unaligned.h | \ xargs -0 rm -f nm_copy_sd_shared() { mkdir -p "./src/libnm-systemd-shared/$(dirname "$1")" cp "$SYSTEMD_DIR/$1" "./src/libnm-systemd-shared/$1" } nm_copy_sd_core() { mkdir -p "./src/core/systemd/$(dirname "$1")" cp "$SYSTEMD_DIR/$1" "./src/core/systemd/$1" } nm_copy_sd_stdaux() { mkdir -p "./src/libnm-std-aux/" cp "$SYSTEMD_DIR/$1" "./src/libnm-std-aux/${1##*/}" } nm_copy_sd_core "src/libsystemd-network/arp-util.c" nm_copy_sd_core "src/libsystemd-network/arp-util.h" nm_copy_sd_core "src/libsystemd-network/dhcp-identifier.c" nm_copy_sd_core "src/libsystemd-network/dhcp-identifier.h" nm_copy_sd_core "src/libsystemd-network/dhcp-internal.h" nm_copy_sd_core "src/libsystemd-network/dhcp-lease-internal.h" nm_copy_sd_core "src/libsystemd-network/dhcp-network.c" nm_copy_sd_core "src/libsystemd-network/dhcp-option.c" nm_copy_sd_core "src/libsystemd-network/dhcp-packet.c" nm_copy_sd_core "src/libsystemd-network/dhcp-protocol.h" nm_copy_sd_core "src/libsystemd-network/dhcp6-internal.h" nm_copy_sd_core "src/libsystemd-network/dhcp6-lease-internal.h" nm_copy_sd_core "src/libsystemd-network/dhcp6-network.c" nm_copy_sd_core "src/libsystemd-network/dhcp6-option.c" nm_copy_sd_core "src/libsystemd-network/dhcp6-protocol.h" nm_copy_sd_core "src/libsystemd-network/lldp-internal.h" nm_copy_sd_core "src/libsystemd-network/lldp-neighbor.c" nm_copy_sd_core "src/libsystemd-network/lldp-neighbor.h" nm_copy_sd_core "src/libsystemd-network/lldp-network.c" nm_copy_sd_core "src/libsystemd-network/lldp-network.h" nm_copy_sd_core "src/libsystemd-network/network-common.c" nm_copy_sd_core "src/libsystemd-network/network-common.h" nm_copy_sd_core "src/libsystemd-network/network-internal.c" nm_copy_sd_core "src/libsystemd-network/network-internal.h" nm_copy_sd_core "src/libsystemd-network/sd-dhcp-client.c" nm_copy_sd_core "src/libsystemd-network/sd-dhcp-lease.c" nm_copy_sd_core "src/libsystemd-network/sd-dhcp6-client.c" nm_copy_sd_core "src/libsystemd-network/sd-dhcp6-lease.c" nm_copy_sd_core "src/libsystemd-network/sd-ipv4acd.c" nm_copy_sd_core "src/libsystemd-network/sd-ipv4ll.c" nm_copy_sd_core "src/libsystemd-network/sd-lldp.c" nm_copy_sd_core "src/libsystemd/sd-event/event-source.h" nm_copy_sd_core "src/libsystemd/sd-event/event-util.c" nm_copy_sd_core "src/libsystemd/sd-event/event-util.h" nm_copy_sd_core "src/libsystemd/sd-event/sd-event.c" nm_copy_sd_core "src/libsystemd/sd-id128/id128-util.c" nm_copy_sd_core "src/libsystemd/sd-id128/id128-util.h" nm_copy_sd_core "src/libsystemd/sd-id128/sd-id128.c" nm_copy_sd_core "src/systemd/_sd-common.h" nm_copy_sd_core "src/systemd/sd-dhcp-client.h" nm_copy_sd_core "src/systemd/sd-dhcp-lease.h" nm_copy_sd_core "src/systemd/sd-dhcp-option.h" nm_copy_sd_core "src/systemd/sd-dhcp6-client.h" nm_copy_sd_core "src/systemd/sd-dhcp6-lease.h" nm_copy_sd_core "src/systemd/sd-dhcp6-option.h" nm_copy_sd_core "src/systemd/sd-event.h" nm_copy_sd_core "src/systemd/sd-id128.h" nm_copy_sd_core "src/systemd/sd-ipv4acd.h" nm_copy_sd_core "src/systemd/sd-ipv4ll.h" nm_copy_sd_core "src/systemd/sd-lldp.h" nm_copy_sd_core "src/systemd/sd-ndisc.h" nm_copy_sd_shared "src/basic/alloc-util.c" nm_copy_sd_shared "src/basic/alloc-util.h" nm_copy_sd_shared "src/basic/async.h" nm_copy_sd_shared "src/basic/cgroup-util.h" nm_copy_sd_shared "src/basic/dns-def.h" nm_copy_sd_shared "src/basic/env-file.c" nm_copy_sd_shared "src/basic/env-file.h" nm_copy_sd_shared "src/basic/env-util.c" nm_copy_sd_shared "src/basic/env-util.h" nm_copy_sd_shared "src/basic/errno-util.h" nm_copy_sd_shared "src/basic/escape.c" nm_copy_sd_shared "src/basic/escape.h" nm_copy_sd_shared "src/basic/ether-addr-util.c" nm_copy_sd_shared "src/basic/ether-addr-util.h" nm_copy_sd_shared "src/basic/extract-word.c" nm_copy_sd_shared "src/basic/extract-word.h" nm_copy_sd_shared "src/basic/fd-util.c" nm_copy_sd_shared "src/basic/fd-util.h" nm_copy_sd_shared "src/basic/fileio.c" nm_copy_sd_shared "src/basic/fileio.h" nm_copy_sd_shared "src/basic/format-util.c" nm_copy_sd_shared "src/basic/format-util.h" nm_copy_sd_shared "src/basic/fs-util.c" nm_copy_sd_shared "src/basic/fs-util.h" nm_copy_sd_shared "src/basic/hash-funcs.c" nm_copy_sd_shared "src/basic/hash-funcs.h" nm_copy_sd_shared "src/basic/hashmap.c" nm_copy_sd_shared "src/basic/hashmap.h" nm_copy_sd_shared "src/basic/hexdecoct.c" nm_copy_sd_shared "src/basic/hexdecoct.h" nm_copy_sd_shared "src/basic/hostname-util.c" nm_copy_sd_shared "src/basic/hostname-util.h" nm_copy_sd_shared "src/basic/in-addr-util.c" nm_copy_sd_shared "src/basic/in-addr-util.h" nm_copy_sd_shared "src/basic/io-util.c" nm_copy_sd_shared "src/basic/io-util.h" nm_copy_sd_shared "src/basic/list.h" nm_copy_sd_shared "src/basic/log.h" nm_copy_sd_shared "src/basic/macro.h" nm_copy_sd_shared "src/basic/memory-util.c" nm_copy_sd_shared "src/basic/memory-util.h" nm_copy_sd_shared "src/basic/mempool.c" nm_copy_sd_shared "src/basic/mempool.h" nm_copy_sd_shared "src/basic/missing_fcntl.h" nm_copy_sd_shared "src/basic/missing_random.h" nm_copy_sd_shared "src/basic/missing_socket.h" nm_copy_sd_shared "src/basic/missing_stat.h" nm_copy_sd_shared "src/basic/missing_syscall.h" nm_copy_sd_shared "src/basic/missing_type.h" nm_copy_sd_shared "src/basic/ordered-set.c" nm_copy_sd_shared "src/basic/ordered-set.h" nm_copy_sd_shared "src/basic/parse-util.c" nm_copy_sd_shared "src/basic/parse-util.h" nm_copy_sd_shared "src/basic/path-util.c" nm_copy_sd_shared "src/basic/path-util.h" nm_copy_sd_shared "src/basic/prioq.c" nm_copy_sd_shared "src/basic/prioq.h" nm_copy_sd_shared "src/basic/process-util.c" nm_copy_sd_shared "src/basic/process-util.h" nm_copy_sd_shared "src/basic/random-util.c" nm_copy_sd_shared "src/basic/random-util.h" nm_copy_sd_shared "src/basic/ratelimit.c" nm_copy_sd_shared "src/basic/ratelimit.h" nm_copy_sd_shared "src/basic/set.h" nm_copy_sd_shared "src/basic/signal-util.c" nm_copy_sd_shared "src/basic/signal-util.h" nm_copy_sd_shared "src/basic/siphash24.h" nm_copy_sd_shared "src/basic/socket-util.c" nm_copy_sd_shared "src/basic/socket-util.h" nm_copy_sd_shared "src/basic/sort-util.h" nm_copy_sd_shared "src/basic/sparse-endian.h" nm_copy_sd_shared "src/basic/stat-util.c" nm_copy_sd_shared "src/basic/stat-util.h" nm_copy_sd_shared "src/basic/stdio-util.h" nm_copy_sd_shared "src/basic/string-table.c" nm_copy_sd_shared "src/basic/string-table.h" nm_copy_sd_shared "src/basic/string-util.c" nm_copy_sd_shared "src/basic/string-util.h" nm_copy_sd_shared "src/basic/strv.c" nm_copy_sd_shared "src/basic/strv.h" nm_copy_sd_shared "src/basic/strxcpyx.c" nm_copy_sd_shared "src/basic/strxcpyx.h" nm_copy_sd_shared "src/basic/time-util.c" nm_copy_sd_shared "src/basic/time-util.h" nm_copy_sd_shared "src/basic/tmpfile-util.c" nm_copy_sd_shared "src/basic/tmpfile-util.h" nm_copy_sd_shared "src/basic/umask-util.h" nm_copy_sd_shared "src/basic/user-util.h" nm_copy_sd_shared "src/basic/utf8.c" nm_copy_sd_shared "src/basic/utf8.h" nm_copy_sd_shared "src/basic/util.c" nm_copy_sd_shared "src/basic/util.h" nm_copy_sd_shared "src/fundamental/macro-fundamental.h" nm_copy_sd_shared "src/fundamental/string-util-fundamental.c" nm_copy_sd_shared "src/fundamental/string-util-fundamental.h" nm_copy_sd_shared "src/fundamental/type.h" nm_copy_sd_shared "src/shared/dns-domain.c" nm_copy_sd_shared "src/shared/dns-domain.h" nm_copy_sd_shared "src/shared/log-link.h" nm_copy_sd_shared "src/shared/web-util.c" nm_copy_sd_shared "src/shared/web-util.h" nm_copy_sd_stdaux "src/basic/unaligned.h"
* | tools: use libtool --mode=executeorbea2021-04-042-15/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Better fix for https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/732 The original issue was that when compiling NetworkManager with slibtool the create-exports-NetworkManager.sh script gave the NetworkManager-all-sym slibtool wrapper script to nm(1) instead of the actual binary. This is because slibtool and GNU libtool do not place the compiled programs in the same location. The original fix was to test both locations, but this is bit of a hack especially since the build system should not be using the .libs directory directly. However with $(LIBTOOL) --mode=execute this is not a problem since both implementations can figure out where the correct binary is. https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/805
* | contrib: fix URL to nm-git-bundle in "nm-copr-build.sh"Thomas Haller2021-04-011-1/+1
| |
* | docs: fix reference to "main" branch in docsThomas Haller2021-04-011-1/+1
| |
* | Changelog: update references to "main" branchThomas Haller2021-04-011-2/+2
| |
* | contrib/rpm: fix reference to main branch in NetworkManager.specThomas Haller2021-04-011-1/+1
| |
* | contrib/scripts: use "main" branch name in "checkpatch-feature-branch.sh"Thomas Haller2021-04-011-4/+4
| |
* | contrib: update nm-git-bundle to use "main" branchThomas Haller2021-04-012-5/+5
| |
* | gilab-ci: update .gitlab-ci.yml to use "main" branch nameThomas Haller2021-04-012-7/+7
| |
* | contrib/scripts: update find-backports script to use "main" branch nameThomas Haller2021-04-011-2/+2
| |
* | contrib/release: update release.sh script to use "main" branch nameThomas Haller2021-04-011-25/+25
| |
* | example: rework "vpn-import-libnm" exampleThomas Haller2021-04-011-41/+130
| | | | | | | | | | | | | | | | | | | | | | | | - add more error handling and free/unref data. - split code in 3 functions: vpn_connection_import(), connection_add() and main(). These steps are mostly independent, and having them in separate functions makes their separation clearer. - handle error from nm_client_add_connection_async() to exit program with non zero exit code.
* | systemd: fix borked mergeThomas Haller2021-04-0115-94/+172
| | | | | | | | Fixes: 5f7f81a6a011 ('systemd: merge branch systemd into master')
* | systemd: merge branch systemd into masterThomas Haller2021-04-0184-1988/+2287
|\ \ | |/ | | | | https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/799
| * systemd: update code from upstream (2021-03-30)Thomas Haller2021-03-3084-1961/+2287
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a direct dump from systemd git. ====== SYSTEMD_DIR=../systemd COMMIT=119063d2b149667a91e0e08e4bdf82a0eb6a7efd ( cd "$SYSTEMD_DIR" git checkout "$COMMIT" git reset --hard git clean -fdx ) git ls-files -z :/src/core/systemd/src/ \ :/src/libnm-systemd-shared/src/ \ :/src/libnm-std-aux/unaligned.h | \ xargs -0 rm -f nm_copy_sd_shared() { mkdir -p "./src/libnm-systemd-shared/$(dirname "$1")" cp "$SYSTEMD_DIR/$1" "./src/libnm-systemd-shared/$1" } nm_copy_sd_core() { mkdir -p "./src/core/systemd/$(dirname "$1")" cp "$SYSTEMD_DIR/$1" "./src/core/systemd/$1" } nm_copy_sd_stdaux() { mkdir -p "./src/libnm-std-aux/" cp "$SYSTEMD_DIR/$1" "./src/libnm-std-aux/${1##*/}" } nm_copy_sd_core "src/libsystemd-network/arp-util.c" nm_copy_sd_core "src/libsystemd-network/arp-util.h" nm_copy_sd_core "src/libsystemd-network/dhcp-identifier.c" nm_copy_sd_core "src/libsystemd-network/dhcp-identifier.h" nm_copy_sd_core "src/libsystemd-network/dhcp-internal.h" nm_copy_sd_core "src/libsystemd-network/dhcp-lease-internal.h" nm_copy_sd_core "src/libsystemd-network/dhcp-network.c" nm_copy_sd_core "src/libsystemd-network/dhcp-option.c" nm_copy_sd_core "src/libsystemd-network/dhcp-packet.c" nm_copy_sd_core "src/libsystemd-network/dhcp-protocol.h" nm_copy_sd_core "src/libsystemd-network/dhcp6-internal.h" nm_copy_sd_core "src/libsystemd-network/dhcp6-lease-internal.h" nm_copy_sd_core "src/libsystemd-network/dhcp6-network.c" nm_copy_sd_core "src/libsystemd-network/dhcp6-option.c" nm_copy_sd_core "src/libsystemd-network/dhcp6-protocol.h" nm_copy_sd_core "src/libsystemd-network/lldp-internal.h" nm_copy_sd_core "src/libsystemd-network/lldp-neighbor.c" nm_copy_sd_core "src/libsystemd-network/lldp-neighbor.h" nm_copy_sd_core "src/libsystemd-network/lldp-network.c" nm_copy_sd_core "src/libsystemd-network/lldp-network.h" nm_copy_sd_core "src/libsystemd-network/network-internal.c" nm_copy_sd_core "src/libsystemd-network/network-internal.h" nm_copy_sd_core "src/libsystemd-network/sd-dhcp-client.c" nm_copy_sd_core "src/libsystemd-network/sd-dhcp-lease.c" nm_copy_sd_core "src/libsystemd-network/sd-dhcp6-client.c" nm_copy_sd_core "src/libsystemd-network/sd-dhcp6-lease.c" nm_copy_sd_core "src/libsystemd-network/sd-ipv4acd.c" nm_copy_sd_core "src/libsystemd-network/sd-ipv4ll.c" nm_copy_sd_core "src/libsystemd-network/sd-lldp.c" nm_copy_sd_core "src/libsystemd/sd-event/event-source.h" nm_copy_sd_core "src/libsystemd/sd-event/event-util.c" nm_copy_sd_core "src/libsystemd/sd-event/event-util.h" nm_copy_sd_core "src/libsystemd/sd-event/sd-event.c" nm_copy_sd_core "src/libsystemd/sd-id128/id128-util.c" nm_copy_sd_core "src/libsystemd/sd-id128/id128-util.h" nm_copy_sd_core "src/libsystemd/sd-id128/sd-id128.c" nm_copy_sd_core "src/systemd/_sd-common.h" nm_copy_sd_core "src/systemd/sd-dhcp-client.h" nm_copy_sd_core "src/systemd/sd-dhcp-lease.h" nm_copy_sd_core "src/systemd/sd-dhcp-option.h" nm_copy_sd_core "src/systemd/sd-dhcp6-client.h" nm_copy_sd_core "src/systemd/sd-dhcp6-lease.h" nm_copy_sd_core "src/systemd/sd-dhcp6-option.h" nm_copy_sd_core "src/systemd/sd-event.h" nm_copy_sd_core "src/systemd/sd-id128.h" nm_copy_sd_core "src/systemd/sd-ipv4acd.h" nm_copy_sd_core "src/systemd/sd-ipv4ll.h" nm_copy_sd_core "src/systemd/sd-lldp.h" nm_copy_sd_core "src/systemd/sd-ndisc.h" nm_copy_sd_shared "src/basic/alloc-util.c" nm_copy_sd_shared "src/basic/alloc-util.h" nm_copy_sd_shared "src/basic/async.h" nm_copy_sd_shared "src/basic/cgroup-util.h" nm_copy_sd_shared "src/basic/dns-def.h" nm_copy_sd_shared "src/basic/env-file.c" nm_copy_sd_shared "src/basic/env-file.h" nm_copy_sd_shared "src/basic/env-util.c" nm_copy_sd_shared "src/basic/env-util.h" nm_copy_sd_shared "src/basic/errno-util.h" nm_copy_sd_shared "src/basic/escape.c" nm_copy_sd_shared "src/basic/escape.h" nm_copy_sd_shared "src/basic/ether-addr-util.c" nm_copy_sd_shared "src/basic/ether-addr-util.h" nm_copy_sd_shared "src/basic/extract-word.c" nm_copy_sd_shared "src/basic/extract-word.h" nm_copy_sd_shared "src/basic/fd-util.c" nm_copy_sd_shared "src/basic/fd-util.h" nm_copy_sd_shared "src/basic/fileio.c" nm_copy_sd_shared "src/basic/fileio.h" nm_copy_sd_shared "src/basic/format-util.c" nm_copy_sd_shared "src/basic/format-util.h" nm_copy_sd_shared "src/basic/fs-util.c" nm_copy_sd_shared "src/basic/fs-util.h" nm_copy_sd_shared "src/basic/hash-funcs.c" nm_copy_sd_shared "src/basic/hash-funcs.h" nm_copy_sd_shared "src/basic/hashmap.c" nm_copy_sd_shared "src/basic/hashmap.h" nm_copy_sd_shared "src/basic/hexdecoct.c" nm_copy_sd_shared "src/basic/hexdecoct.h" nm_copy_sd_shared "src/basic/hostname-util.c" nm_copy_sd_shared "src/basic/hostname-util.h" nm_copy_sd_shared "src/basic/in-addr-util.c" nm_copy_sd_shared "src/basic/in-addr-util.h" nm_copy_sd_shared "src/basic/io-util.c" nm_copy_sd_shared "src/basic/io-util.h" nm_copy_sd_shared "src/basic/list.h" nm_copy_sd_shared "src/basic/log.h" nm_copy_sd_shared "src/basic/macro.h" nm_copy_sd_shared "src/basic/memory-util.c" nm_copy_sd_shared "src/basic/memory-util.h" nm_copy_sd_shared "src/basic/mempool.c" nm_copy_sd_shared "src/basic/mempool.h" nm_copy_sd_shared "src/basic/missing_fcntl.h" nm_copy_sd_shared "src/basic/missing_random.h" nm_copy_sd_shared "src/basic/missing_socket.h" nm_copy_sd_shared "src/basic/missing_stat.h" nm_copy_sd_shared "src/basic/missing_syscall.h" nm_copy_sd_shared "src/basic/missing_type.h" nm_copy_sd_shared "src/basic/ordered-set.c" nm_copy_sd_shared "src/basic/ordered-set.h" nm_copy_sd_shared "src/basic/parse-util.c" nm_copy_sd_shared "src/basic/parse-util.h" nm_copy_sd_shared "src/basic/path-util.c" nm_copy_sd_shared "src/basic/path-util.h" nm_copy_sd_shared "src/basic/prioq.c" nm_copy_sd_shared "src/basic/prioq.h" nm_copy_sd_shared "src/basic/process-util.c" nm_copy_sd_shared "src/basic/process-util.h" nm_copy_sd_shared "src/basic/random-util.c" nm_copy_sd_shared "src/basic/random-util.h" nm_copy_sd_shared "src/basic/ratelimit.c" nm_copy_sd_shared "src/basic/ratelimit.h" nm_copy_sd_shared "src/basic/set.h" nm_copy_sd_shared "src/basic/signal-util.c" nm_copy_sd_shared "src/basic/signal-util.h" nm_copy_sd_shared "src/basic/siphash24.h" nm_copy_sd_shared "src/basic/socket-util.c" nm_copy_sd_shared "src/basic/socket-util.h" nm_copy_sd_shared "src/basic/sort-util.h" nm_copy_sd_shared "src/basic/sparse-endian.h" nm_copy_sd_shared "src/basic/stat-util.c" nm_copy_sd_shared "src/basic/stat-util.h" nm_copy_sd_shared "src/basic/stdio-util.h" nm_copy_sd_shared "src/basic/string-table.c" nm_copy_sd_shared "src/basic/string-table.h" nm_copy_sd_shared "src/basic/string-util.c" nm_copy_sd_shared "src/basic/string-util.h" nm_copy_sd_shared "src/basic/strv.c" nm_copy_sd_shared "src/basic/strv.h" nm_copy_sd_shared "src/basic/strxcpyx.c" nm_copy_sd_shared "src/basic/strxcpyx.h" nm_copy_sd_shared "src/basic/time-util.c" nm_copy_sd_shared "src/basic/time-util.h" nm_copy_sd_shared "src/basic/tmpfile-util.c" nm_copy_sd_shared "src/basic/tmpfile-util.h" nm_copy_sd_shared "src/basic/umask-util.h" nm_copy_sd_shared "src/basic/user-util.h" nm_copy_sd_shared "src/basic/utf8.c" nm_copy_sd_shared "src/basic/utf8.h" nm_copy_sd_shared "src/basic/util.c" nm_copy_sd_shared "src/basic/util.h" nm_copy_sd_shared "src/fundamental/macro-fundamental.h" nm_copy_sd_shared "src/fundamental/string-util-fundamental.c" nm_copy_sd_shared "src/fundamental/string-util-fundamental.h" nm_copy_sd_shared "src/fundamental/type.h" nm_copy_sd_shared "src/shared/dns-domain.c" nm_copy_sd_shared "src/shared/dns-domain.h" nm_copy_sd_shared "src/shared/log-link.h" nm_copy_sd_shared "src/shared/web-util.c" nm_copy_sd_shared "src/shared/web-util.h" nm_copy_sd_stdaux "src/basic/unaligned.h"
* | all: merge branch 'balrog-kun:serialize-flags'Thomas Haller2021-04-0119-100/+129
|\ \ | | | | | | | | | https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/795
| * | libnm-core: use _nm_connection_serialize_non_secret() in ↵Thomas Haller2021-04-011-2/+1
| | | | | | | | | | | | _nm_utils_hwaddr_cloned_data_synth()
| * | all: Replace deprecated NM_CONNECTION_SERIALIZE_* flagsAndrew Zaborowski2021-04-0110-19/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | Review and replace usages of the two nm_connection_to_dbus() flags marked deprecated in commit 84648e562c98 ('libnm: Refactor NM_CONNECTION_SERIALIZE_* flags'): NM_CONNECTION_SERIALIZE_NO_SECRETS and NM_CONNECTION_SERIALIZE_ONLY_SECRETS.
| * | settings: Don't clone connections to serialize secretsAndrew Zaborowski2021-04-011-37/+15
| | | | | | | | | | | | | | | | | | | | | Use the new nm_connection_to_dbus() flags to filter secrets instead of cloning connections and using _nm_connection_clear_secrets_by_secret_flags() and then serializing all secrets in NMSettingsConnection. Fix a related comment.
| * | libnm: Refactor NM_CONNECTION_SERIALIZE_* flagsAndrew Zaborowski2021-04-019-44/+96
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | nm-settings-connection.c has code similar to this in two places: /* FIXME: improve NMConnection API so we can avoid the overhead of cloning the connection, * in particular if there are no secrets to begin with. */ connection_cloned = nm_simple_connection_new_clone(new); /* Clear out unwanted secrets */ _nm_connection_clear_secrets_by_secret_flags(connection_cloned, NM_SETTING_SECRET_FLAG_NOT_SAVED | NM_SETTING_SECRET_FLAG_AGENT_OWNED); secrets = nm_g_variant_ref_sink( nm_connection_to_dbus(connection_cloned, NM_CONNECTION_SERIALIZE_ONLY_SECRETS)); It seems the secrets filtering can be done by nm_connection_to_dbus() if the NM_CONNECTION_SERIALIZE_* flags are extended. The current set of flags contains flags that start with NO, ONLY and WITH prefixes, which makes it useless for combining the flags because most combinations of more than one flag don't have a clear interpretation. So they're mostly useful when used alone, i.e. you'd need to add a new enum value for each new subset of settings to be serialized. To get the most flexibility from a small set of flags they should either all be of the WITH_* type or NO_* type. In the former case they could be combined to extend the subset of properties serialized, in the latter case each flag would reduce the subset. After trying both options I found it's easier to adapt the current set of flags to the WITH_* schema while keeping binary and source compatibility. This commit changes the set of flags in the following way: NM_CONNECTION_SERIALIZE_ALL is kept for compatibility but is equivalent to a combination of other flags. NM_CONNECTION_SERIALIZE_WITH_NON_SECRET is added with the same value as NM_CONNECTION_SERIALIZE_NO_SECRETS, it implies that non-secret properties are included but doesn't prevent including other properties. Since it couldn't be meaningfully combined with any other flag this change shouldn't break compatibility. Similarly NM_CONNECTION_SERIALIZE_WITH_SECRETS is added with the same value as existing NM_CONNECTION_SERIALIZE_ONLY_SECRETS with the same consideration about compatibility. NM_CONNECTION_SERIALIZE_WITH_SECRETS_AGENT_OWNED and the new NM_CONNECTION_SERIALIZE_WITH_SECRETS_SYSTEM_OWNED and NM_CONNECTION_SERIALIZE_WITH_SECRETS_NOT_SAVED add only subsets of secrets and can be combined. For backwards compatibility NM_CONNECTION_SERIALIZE_ONLY_SECRETS is basically ignored when either of these three is present, so that the value: ..ONLY_SECRETS | ..AGENT_OWNED works as previously.
* | po: update Russian (ru) translationJulia Dronova2021-04-011-9640/+10220
| | | | | | | | https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/issues/697