From 289e9107384096366d3cfddc61f2c1be95fe389e Mon Sep 17 00:00:00 2001 From: Michael Biebl Date: Thu, 11 Feb 2021 18:12:53 +0100 Subject: New upstream version 1.29.90 (1.30 rc1) --- debian/changelog | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index c6c62790..9cec3689 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +network-manager (1.29.90-1) UNRELEASED; urgency=medium + + * New upstream version 1.29.90 (1.30 rc1) + + -- Michael Biebl Thu, 11 Feb 2021 18:12:50 +0100 + network-manager (1.28.0-2) unstable; urgency=medium * Demote libpam-systemd to Recommends. -- cgit 1.3.0-6-gf8a5 From 7b0a0e63d570f6d678266ac99087db152f703423 Mon Sep 17 00:00:00 2001 From: Michael Biebl Date: Thu, 11 Feb 2021 18:16:06 +0100 Subject: Rebase patches --- ...Force-online-state-with-unmanaged-devices.patch | 24 ++-- debian/patches/series | 1 - ...ssing_syscall-fix-syscall-numbers-for-x32.patch | 124 --------------------- 3 files changed, 12 insertions(+), 137 deletions(-) delete mode 100644 debian/patches/systemd-basic-missing_syscall-fix-syscall-numbers-for-x32.patch (limited to 'debian') diff --git a/debian/patches/Force-online-state-with-unmanaged-devices.patch b/debian/patches/Force-online-state-with-unmanaged-devices.patch index f8bc3398..a639e11a 100644 --- a/debian/patches/Force-online-state-with-unmanaged-devices.patch +++ b/debian/patches/Force-online-state-with-unmanaged-devices.patch @@ -8,13 +8,13 @@ online state to CONNECTED. Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=512286 --- - src/nm-manager.c | 115 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ + src/core/nm-manager.c | 115 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 115 insertions(+) -diff --git a/src/nm-manager.c b/src/nm-manager.c -index 46f81c7..3465be4 100644 ---- a/src/nm-manager.c -+++ b/src/nm-manager.c +diff --git a/src/core/nm-manager.c b/src/core/nm-manager.c +index 5a6e05a..4c56b77 100644 +--- a/src/core/nm-manager.c ++++ b/src/core/nm-manager.c @@ -52,6 +52,8 @@ #define DEVICE_STATE_PRUNE_RATELIMIT_MAX 100u @@ -24,7 +24,7 @@ index 46f81c7..3465be4 100644 /*****************************************************************************/ typedef struct { -@@ -186,6 +188,10 @@ typedef struct { +@@ -187,6 +189,10 @@ typedef struct { GFileMonitor *fw_monitor; guint fw_changed_id; @@ -35,7 +35,7 @@ index 46f81c7..3465be4 100644 guint timestamp_update_id; guint devices_inited_id; -@@ -1433,6 +1439,27 @@ find_best_device_state(NMManager *manager) +@@ -1463,6 +1469,27 @@ find_best_device_state(NMManager *manager) return best_state; } @@ -63,7 +63,7 @@ index 46f81c7..3465be4 100644 static void nm_manager_update_metered(NMManager *self) { -@@ -1479,6 +1506,9 @@ nm_manager_update_state(NMManager *self) +@@ -1509,6 +1536,9 @@ nm_manager_update_state(NMManager *self) else new_state = find_best_device_state(self); @@ -73,7 +73,7 @@ index 46f81c7..3465be4 100644 if (new_state >= NM_STATE_CONNECTED_LOCAL && priv->connectivity_state == NM_CONNECTIVITY_FULL) { new_state = NM_STATE_CONNECTED_GLOBAL; } -@@ -6587,6 +6617,62 @@ impl_manager_set_logging(NMDBusObject * obj, +@@ -6603,6 +6633,62 @@ impl_manager_set_logging(NMDBusObject * obj, g_dbus_method_invocation_return_value(invocation, NULL); } @@ -136,7 +136,7 @@ index 46f81c7..3465be4 100644 static void impl_manager_get_logging(NMDBusObject * obj, const NMDBusInterfaceInfoExtended *interface_info, -@@ -6916,6 +7002,9 @@ nm_manager_start(NMManager *self, GError **error) +@@ -6932,6 +7018,9 @@ nm_manager_start(NMManager *self, GError **error) nm_clear_g_source(&priv->devices_inited_id); priv->devices_inited_id = g_idle_add_full(G_PRIORITY_LOW + 10, devices_inited_cb, self, NULL); @@ -146,7 +146,7 @@ index 46f81c7..3465be4 100644 return TRUE; } -@@ -7795,6 +7884,22 @@ nm_manager_init(NMManager *self) +@@ -7826,6 +7915,22 @@ nm_manager_init(NMManager *self) _LOGW(LOGD_CORE, "failed to monitor kernel firmware directory '%s'.", KERNEL_FIRMWARE_DIR); } @@ -169,7 +169,7 @@ index 46f81c7..3465be4 100644 /* Update timestamps in active connections */ priv->timestamp_update_id = g_timeout_add_seconds(300, -@@ -8078,6 +8183,16 @@ dispose(GObject *object) +@@ -8111,6 +8216,16 @@ dispose(GObject *object) g_clear_object(&priv->fw_monitor); } diff --git a/debian/patches/series b/debian/patches/series index b718f8ef..a2d7e06d 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,2 +1 @@ Force-online-state-with-unmanaged-devices.patch -systemd-basic-missing_syscall-fix-syscall-numbers-for-x32.patch diff --git a/debian/patches/systemd-basic-missing_syscall-fix-syscall-numbers-for-x32.patch b/debian/patches/systemd-basic-missing_syscall-fix-syscall-numbers-for-x32.patch deleted file mode 100644 index 75b2fd2b..00000000 --- a/debian/patches/systemd-basic-missing_syscall-fix-syscall-numbers-for-x32.patch +++ /dev/null @@ -1,124 +0,0 @@ -From: mirabilos -Date: Fri, 9 Oct 2020 15:58:48 +0200 -Subject: fixup syscall numbers for x32 vs. amd64 - ---- - shared/systemd/src/basic/missing_syscall.h | 28 +++++++++++++++++----------- - 1 file changed, 17 insertions(+), 11 deletions(-) - -diff --git a/shared/systemd/src/basic/missing_syscall.h b/shared/systemd/src/basic/missing_syscall.h -index d11a77d..82daa68 100644 ---- a/shared/systemd/src/basic/missing_syscall.h -+++ b/shared/systemd/src/basic/missing_syscall.h -@@ -15,6 +15,12 @@ - #include - #endif - -+#if defined(__x86_64__) && defined(__ILP32__) -+#define systemd_SC_arch_bias(x) ((x) | /* __X32_SYSCALL_BIT */ 0x40000000) -+#else -+#define systemd_SC_arch_bias(x) (x) -+#endif -+ - #include "missing_keyctl.h" - #include "missing_stat.h" - -@@ -36,7 +42,7 @@ static inline int missing_pivot_root(const char *new_root, const char *put_old) - /* ======================================================================= */ - - #if defined __x86_64__ --# define systemd_NR_memfd_create 319 -+# define systemd_NR_memfd_create systemd_SC_arch_bias(319) - #elif defined __arm__ - # define systemd_NR_memfd_create 385 - #elif defined __aarch64__ -@@ -93,7 +99,7 @@ static inline int missing_memfd_create(const char *name, unsigned int flags) { - /* ======================================================================= */ - - #if defined __x86_64__ --# define systemd_NR_getrandom 318 -+# define systemd_NR_getrandom systemd_SC_arch_bias(318) - #elif defined(__i386__) - # define systemd_NR_getrandom 355 - #elif defined(__arm__) -@@ -169,7 +175,7 @@ static inline pid_t missing_gettid(void) { - /* ======================================================================= */ - - #if defined(__x86_64__) --# define systemd_NR_name_to_handle_at 303 -+# define systemd_NR_name_to_handle_at systemd_SC_arch_bias(303) - #elif defined(__i386__) - # define systemd_NR_name_to_handle_at 341 - #elif defined(__arm__) -@@ -226,7 +232,7 @@ static inline int missing_name_to_handle_at(int fd, const char *name, struct fil - #elif defined __arm__ - # define systemd_NR_setns 375 - #elif defined(__x86_64__) --# define systemd_NR_setns 308 -+# define systemd_NR_setns systemd_SC_arch_bias(308) - #elif defined(__i386__) - # define systemd_NR_setns 346 - #elif defined(__powerpc__) -@@ -279,7 +285,7 @@ static inline pid_t raw_getpid(void) { - /* ======================================================================= */ - - #if defined __x86_64__ --# define systemd_NR_renameat2 316 -+# define systemd_NR_renameat2 systemd_SC_arch_bias(316) - #elif defined __arm__ - # define systemd_NR_renameat2 382 - #elif defined __aarch64__ -@@ -388,7 +394,7 @@ static inline key_serial_t missing_request_key(const char *type, const char *des - /* ======================================================================= */ - - #if defined(__x86_64__) --# define systemd_NR_copy_file_range 326 -+# define systemd_NR_copy_file_range systemd_SC_arch_bias(326) - #elif defined(__i386__) - # define systemd_NR_copy_file_range 377 - #elif defined __s390__ -@@ -440,7 +446,7 @@ static inline ssize_t missing_copy_file_range(int fd_in, loff_t *off_in, - #if defined __i386__ - # define systemd_NR_bpf 357 - #elif defined __x86_64__ --# define systemd_NR_bpf 321 -+# define systemd_NR_bpf systemd_SC_arch_bias(321) - #elif defined __aarch64__ - # define systemd_NR_bpf 280 - #elif defined __arm__ -@@ -492,7 +498,7 @@ static inline int missing_bpf(int cmd, union bpf_attr *attr, size_t size) { - # if defined __i386__ - # define systemd_NR_pkey_mprotect 380 - # elif defined __x86_64__ --# define systemd_NR_pkey_mprotect 329 -+# define systemd_NR_pkey_mprotect systemd_SC_arch_bias(329) - # elif defined __aarch64__ - # define systemd_NR_pkey_mprotect 288 - # elif defined __arm__ -@@ -545,7 +551,7 @@ assert_cc(__NR_pkey_mprotect == systemd_NR_pkey_mprotect); - #elif defined __sparc__ - # define systemd_NR_statx 360 - #elif defined __x86_64__ --# define systemd_NR_statx 332 -+# define systemd_NR_statx systemd_SC_arch_bias(332) - #else - # warning "statx() syscall number unknown for your architecture" - #endif -@@ -647,7 +653,7 @@ static inline long missing_get_mempolicy(int *mode, unsigned long *nodemask, - #elif defined __ia64__ - # define systemd_NR_pidfd_send_signal (424 + 1024) - #else --# define systemd_NR_pidfd_send_signal 424 -+# define systemd_NR_pidfd_send_signal systemd_SC_arch_bias(424) - #endif - - /* may be (invalid) negative number due to libseccomp, see PR 13319 */ -@@ -691,7 +697,7 @@ static inline int missing_pidfd_send_signal(int fd, int sig, siginfo_t *info, un - #elif defined __ia64__ - # define systemd_NR_pidfd_open (434 + 1024) - #else --# define systemd_NR_pidfd_open 434 -+# define systemd_NR_pidfd_open systemd_SC_arch_bias(434) - #endif - - /* may be (invalid) negative number due to libseccomp, see PR 13319 */ -- cgit 1.3.0-6-gf8a5 From 3160401a2119e3409413f44b4ee89c797b677140 Mon Sep 17 00:00:00 2001 From: Michael Biebl Date: Thu, 11 Feb 2021 18:46:53 +0100 Subject: Update symbols file for libnm0 --- debian/libnm0.symbols | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'debian') diff --git a/debian/libnm0.symbols b/debian/libnm0.symbols index 3073b2c8..f59387a8 100644 --- a/debian/libnm0.symbols +++ b/debian/libnm0.symbols @@ -23,6 +23,7 @@ libnm.so.0 libnm0 #MINVER# libnm_1_28_0@libnm_1_28_0 1.27.90 libnm_1_2_0@libnm_1_2_0 1.1.90 libnm_1_2_4@libnm_1_2_4 1.2.4 + libnm_1_30_0@libnm_1_30_0 1.29.90 libnm_1_4_0@libnm_1_4_0 1.4.0 libnm_1_6_0@libnm_1_6_0 1.5.90 libnm_1_8_0@libnm_1_8_0 1.8.0 @@ -411,6 +412,7 @@ libnm.so.0 libnm0 #MINVER# nm_device_tun_get_type@libnm_1_2_0 1.1.90 nm_device_tun_get_vnet_hdr@libnm_1_2_0 1.1.90 nm_device_type_get_type@libnm_1_0_0 1.0.0 + nm_device_veth_get_type@libnm_1_30_0 1.29.90 nm_device_vlan_get_carrier@libnm_1_0_0 1.0.0 nm_device_vlan_get_hw_address@libnm_1_0_0 1.0.0 nm_device_vlan_get_parent@libnm_1_0_0 1.0.0 @@ -590,6 +592,14 @@ libnm.so.0 libnm0 #MINVER# nm_ip_routing_rule_validate@libnm_1_18_0 1.18.0 nm_ip_tunnel_flags_get_type@libnm_1_12_0 1.11.3 nm_ip_tunnel_mode_get_type@libnm_1_2_0 1.1.90 + nm_keyfile_handler_data_fail_with_error@libnm_1_30_0 1.29.90 + nm_keyfile_handler_data_get_context@libnm_1_30_0 1.29.90 + nm_keyfile_handler_data_warn_get@libnm_1_30_0 1.29.90 + nm_keyfile_handler_flags_get_type@libnm_1_30_0 1.29.90 + nm_keyfile_handler_type_get_type@libnm_1_30_0 1.29.90 + nm_keyfile_read@libnm_1_30_0 1.29.90 + nm_keyfile_warn_severity_get_type@libnm_1_30_0 1.29.90 + nm_keyfile_write@libnm_1_30_0 1.29.90 nm_lldp_neighbor_get_attr_names@libnm_1_2_0 1.1.90 nm_lldp_neighbor_get_attr_string_value@libnm_1_2_0 1.1.90 nm_lldp_neighbor_get_attr_type@libnm_1_2_0 1.1.90 @@ -924,6 +934,11 @@ libnm.so.0 libnm0 #MINVER# nm_setting_gsm_get_type@libnm_1_0_0 1.0.0 nm_setting_gsm_get_username@libnm_1_0_0 1.0.0 nm_setting_gsm_new@libnm_1_0_0 1.0.0 + nm_setting_hostname_get_from_dhcp@libnm_1_30_0 1.29.90 + nm_setting_hostname_get_from_dns_lookup@libnm_1_30_0 1.29.90 + nm_setting_hostname_get_only_from_default@libnm_1_30_0 1.29.90 + nm_setting_hostname_get_priority@libnm_1_30_0 1.29.90 + nm_setting_hostname_get_type@libnm_1_30_0 1.29.90 nm_setting_infiniband_get_mac_address@libnm_1_0_0 1.0.0 nm_setting_infiniband_get_mtu@libnm_1_0_0 1.0.0 nm_setting_infiniband_get_p_key@libnm_1_0_0 1.0.0 @@ -1088,6 +1103,13 @@ libnm.so.0 libnm0 #MINVER# nm_setting_ovs_dpdk_get_devargs@libnm_1_20_0 1.19.90 nm_setting_ovs_dpdk_get_type@libnm_1_20_0 1.19.90 nm_setting_ovs_dpdk_new@libnm_1_20_0 1.19.90 + nm_setting_ovs_external_ids_check_key@libnm_1_30_0 1.29.90 + nm_setting_ovs_external_ids_check_val@libnm_1_30_0 1.29.90 + nm_setting_ovs_external_ids_get_data@libnm_1_30_0 1.29.90 + nm_setting_ovs_external_ids_get_data_keys@libnm_1_30_0 1.29.90 + nm_setting_ovs_external_ids_get_type@libnm_1_30_0 1.29.90 + nm_setting_ovs_external_ids_new@libnm_1_30_0 1.29.90 + nm_setting_ovs_external_ids_set_data@libnm_1_30_0 1.29.90 nm_setting_ovs_interface_get_interface_type@libnm_1_10_0 1.9.90 nm_setting_ovs_interface_get_type@libnm_1_10_0 1.9.90 nm_setting_ovs_interface_new@libnm_1_10_0 1.9.90 @@ -1230,6 +1252,9 @@ libnm.so.0 libnm0 #MINVER# nm_setting_user_set_data@libnm_1_8_0 1.8.0 nm_setting_verify@libnm_1_0_0 1.0.0 nm_setting_verify_secrets@libnm_1_2_0 1.1.90 + nm_setting_veth_get_peer@libnm_1_30_0 1.29.90 + nm_setting_veth_get_type@libnm_1_30_0 1.29.90 + nm_setting_veth_new@libnm_1_30_0 1.29.90 nm_setting_vlan_add_priority@libnm_1_0_0 1.0.0 nm_setting_vlan_add_priority_str@libnm_1_0_0 1.0.0 nm_setting_vlan_clear_priorities@libnm_1_0_0 1.0.0 @@ -1540,6 +1565,7 @@ libnm.so.0 libnm0 #MINVER# nm_utils_is_uuid@libnm_1_0_0 1.0.0 nm_utils_is_valid_iface_name@libnm_1_6_0 1.5.90 nm_utils_parse_variant_attributes@libnm_1_8_0 1.8.0 + nm_utils_print@libnm_1_30_0 1.29.90 nm_utils_same_ssid@libnm_1_0_0 1.0.0 nm_utils_security_type_get_type@libnm_1_0_0 1.0.0 nm_utils_security_valid@libnm_1_0_0 1.0.0 -- cgit 1.3.0-6-gf8a5 From d70079768d24e7b5c187f37b4423436f9bc848bc Mon Sep 17 00:00:00 2001 From: Helmut Grohne Date: Thu, 11 Feb 2021 19:15:42 +0100 Subject: Drop unused Build-Depends Closes: #979378 --- debian/control | 4 ---- 1 file changed, 4 deletions(-) (limited to 'debian') diff --git a/debian/control b/debian/control index b50a848f..7ed03dc6 100644 --- a/debian/control +++ b/debian/control @@ -11,8 +11,6 @@ Build-Depends: debhelper-compat (= 13), intltool, libglib2.0-dev (>= 2.32), ppp-dev (>= 2.4.7-1+1), - libpolkit-gobject-1-dev, - libpolkit-agent-1-dev (>= 0.97), libselinux1-dev, libaudit-dev, libgnutls28-dev (>= 2.12), @@ -26,8 +24,6 @@ Build-Depends: debhelper-compat (= 13), libpsl-dev (>= 0.1), libcurl4-gnutls-dev (>= 7.24.0), gtk-doc-tools, - perl, - libyaml-perl, libglib2.0-doc, libmm-glib-dev (>= 0.7.991), libndp-dev, -- cgit 1.3.0-6-gf8a5 From 76474015fbf155a3c8c12c6582832382b13c35e4 Mon Sep 17 00:00:00 2001 From: Michael Biebl Date: Thu, 11 Feb 2021 19:24:19 +0100 Subject: Fix polkit-agent-helper-1 path --- .../patches/Fix-polkit-agent-helper-1-path.patch | 25 ++++++++++++++++++++++ debian/patches/series | 1 + 2 files changed, 26 insertions(+) create mode 100644 debian/patches/Fix-polkit-agent-helper-1-path.patch (limited to 'debian') diff --git a/debian/patches/Fix-polkit-agent-helper-1-path.patch b/debian/patches/Fix-polkit-agent-helper-1-path.patch new file mode 100644 index 00000000..f8005e6d --- /dev/null +++ b/debian/patches/Fix-polkit-agent-helper-1-path.patch @@ -0,0 +1,25 @@ +From: Michael Biebl +Date: Thu, 11 Feb 2021 19:21:46 +0100 +Subject: Fix polkit-agent-helper-1 path + +Use /usr/lib/policykit-1/polkit-agent-helper-1, as this path also works +on buster, i.e. the current stable release. +It should eventually be updated to use /usr/libexec once bullseye has +been released. +--- + clients/common/nm-polkit-listener.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/clients/common/nm-polkit-listener.c b/clients/common/nm-polkit-listener.c +index db21abf..204d734 100644 +--- a/clients/common/nm-polkit-listener.c ++++ b/clients/common/nm-polkit-listener.c +@@ -501,7 +501,7 @@ begin_authentication(AuthRequest *request) + { + int fd_flags; + const char *helper_argv[] = { +- POLKIT_PACKAGE_PREFIX "/lib/polkit-1/polkit-agent-helper-1", ++ "/usr/lib/policykit-1/polkit-agent-helper-1", + request->username, + NULL, + }; diff --git a/debian/patches/series b/debian/patches/series index a2d7e06d..4a96b643 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1 +1,2 @@ Force-online-state-with-unmanaged-devices.patch +Fix-polkit-agent-helper-1-path.patch -- cgit 1.3.0-6-gf8a5 From 46afb13d852c7d217923795c094ea3e7d368010c Mon Sep 17 00:00:00 2001 From: Michael Biebl Date: Thu, 11 Feb 2021 20:10:39 +0100 Subject: Release version 1.29.90-1 to unstable --- debian/changelog | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 9cec3689..4cbd4efb 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,15 @@ -network-manager (1.29.90-1) UNRELEASED; urgency=medium +network-manager (1.29.90-1) unstable; urgency=medium + [ Michael Biebl ] * New upstream version 1.29.90 (1.30 rc1) + * Rebase patches + * Update symbols file for libnm0 + * Fix polkit-agent-helper-1 path + + [ Helmut Grohne ] + * Drop unused Build-Depends (Closes: #979378) - -- Michael Biebl Thu, 11 Feb 2021 18:12:50 +0100 + -- Michael Biebl Thu, 11 Feb 2021 20:09:16 +0100 network-manager (1.28.0-2) unstable; urgency=medium -- cgit 1.3.0-6-gf8a5 From 6c616225b284e289570f0e30dd00d074399925e7 Mon Sep 17 00:00:00 2001 From: Michael Biebl Date: Mon, 15 Feb 2021 13:47:15 +0100 Subject: Add iproute2 to Build-Depends Required by the test suite. Mark as accordingly. --- debian/control | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'debian') diff --git a/debian/control b/debian/control index 7ed03dc6..06146cd2 100644 --- a/debian/control +++ b/debian/control @@ -34,7 +34,8 @@ Build-Depends: debhelper-compat (= 13), libbluetooth-dev (>= 5), valac (>= 0.17.1.24), dbus , - python3-dbus + python3-dbus , + iproute2 , Standards-Version: 4.5.1 Rules-Requires-Root: no Vcs-Git: https://salsa.debian.org/utopia-team/network-manager.git -- cgit 1.3.0-6-gf8a5 From d32ef70c8f8831f40528e09b55e93f559a1cc3d9 Mon Sep 17 00:00:00 2001 From: Michael Biebl Date: Tue, 16 Feb 2021 22:52:38 +0100 Subject: Cherry-pick fixes from upstream nm-1-30 branch - Fixes assertion when running the python-dbusmock test suite - Replaces our custom polkit-agent-helper-1 patch Closes: #982613 --- .../patches/Fix-polkit-agent-helper-1-path.patch | 25 --- ...to-polkit-agent-helper-1-binary-configura.patch | 169 +++++++++++++++++++++ ...ld-option-with-polkit-agent-helper-1-path.patch | 75 +++++++++ ...e-leaks-in-get_agent_request_network_path.patch | 38 +++++ ...ertion-in-_dbus_handle_properties_changed.patch | 21 +++ ...rtion-failure-in-_dbus_handle_properties_.patch | 32 ++++ ...x-tracking-object-state-in-NMClient-cache.patch | 102 +++++++++++++ ...g-PID-in-LIBNM_CLIENT_DEBUG-debug-logging.patch | 42 +++++ ...de-severity-of-message-for-failure-to-cre.patch | 37 +++++ ...NM_SOCK_ADDR_UNION_INIT_UNSPEC-fully-init.patch | 35 +++++ ...orm-reorder-code-in-_netns_stack_get_impl.patch | 51 +++++++ ...kip-tests-if-unshare-CLONE_NEWNET-CLONE_N.patch | 42 +++++ debian/patches/series | 15 +- ...shared-refactor-nm_assert-for-NMRefString.patch | 54 +++++++ ...tests-add-bin-sbin-to-PATH-for-unit-tests.patch | 43 ++++++ ...-last-resolved-IP-from-resolving-endpoint.patch | 110 ++++++++++++++ debian/rules | 1 + 17 files changed, 866 insertions(+), 26 deletions(-) delete mode 100644 debian/patches/Fix-polkit-agent-helper-1-path.patch create mode 100644 debian/patches/build-make-path-to-polkit-agent-helper-1-binary-configura.patch create mode 100644 debian/patches/build-rename-build-option-with-polkit-agent-helper-1-path.patch create mode 100644 debian/patches/iwd-Fix-the-leaks-in-get_agent_request_network_path.patch create mode 100644 debian/patches/libnm-add-assertion-in-_dbus_handle_properties_changed.patch create mode 100644 debian/patches/libnm-avoid-assertion-failure-in-_dbus_handle_properties_.patch create mode 100644 debian/patches/libnm-fix-tracking-object-state-in-NMClient-cache.patch create mode 100644 debian/patches/libnm-log-PID-in-LIBNM_CLIENT_DEBUG-debug-logging.patch create mode 100644 debian/patches/platform-downgrade-severity-of-message-for-failure-to-cre.patch create mode 100644 debian/patches/platform-ensure-NM_SOCK_ADDR_UNION_INIT_UNSPEC-fully-init.patch create mode 100644 debian/patches/platform-reorder-code-in-_netns_stack_get_impl.patch create mode 100644 debian/patches/platform-tests-skip-tests-if-unshare-CLONE_NEWNET-CLONE_N.patch create mode 100644 debian/patches/shared-refactor-nm_assert-for-NMRefString.patch create mode 100644 debian/patches/tests-add-bin-sbin-to-PATH-for-unit-tests.patch create mode 100644 debian/patches/wireguard-prefer-last-resolved-IP-from-resolving-endpoint.patch (limited to 'debian') diff --git a/debian/patches/Fix-polkit-agent-helper-1-path.patch b/debian/patches/Fix-polkit-agent-helper-1-path.patch deleted file mode 100644 index f8005e6d..00000000 --- a/debian/patches/Fix-polkit-agent-helper-1-path.patch +++ /dev/null @@ -1,25 +0,0 @@ -From: Michael Biebl -Date: Thu, 11 Feb 2021 19:21:46 +0100 -Subject: Fix polkit-agent-helper-1 path - -Use /usr/lib/policykit-1/polkit-agent-helper-1, as this path also works -on buster, i.e. the current stable release. -It should eventually be updated to use /usr/libexec once bullseye has -been released. ---- - clients/common/nm-polkit-listener.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/clients/common/nm-polkit-listener.c b/clients/common/nm-polkit-listener.c -index db21abf..204d734 100644 ---- a/clients/common/nm-polkit-listener.c -+++ b/clients/common/nm-polkit-listener.c -@@ -501,7 +501,7 @@ begin_authentication(AuthRequest *request) - { - int fd_flags; - const char *helper_argv[] = { -- POLKIT_PACKAGE_PREFIX "/lib/polkit-1/polkit-agent-helper-1", -+ "/usr/lib/policykit-1/polkit-agent-helper-1", - request->username, - NULL, - }; diff --git a/debian/patches/build-make-path-to-polkit-agent-helper-1-binary-configura.patch b/debian/patches/build-make-path-to-polkit-agent-helper-1-binary-configura.patch new file mode 100644 index 00000000..03f2bc80 --- /dev/null +++ b/debian/patches/build-make-path-to-polkit-agent-helper-1-binary-configura.patch @@ -0,0 +1,169 @@ +From: Thomas Haller +Date: Fri, 12 Feb 2021 10:17:41 +0100 +Subject: build: make path to polkit-agent-helper-1 binary configurable + +Add new configure option to set the path to "polkit-agent-helper-1". + +The path cannot be obtained from pkg-config and `pkg-config +--variable=prefix polkit-agent-1` is not good enough. + +On Fedora, the path is "/usr/lib/polkit-1/polkit-agent-helper-1". +On Debian Buster, the path is "/usr/lib/policykit-1/polkit-agent-helper-1" +On Debian Sid, the path is "/usr/libexec/polkit-agent-helper-1" (but +currently it is also symlinked from "/usr/lib/policykit-1/polkit-agent-helper-1". + +(cherry picked from commit 801c41a11c2cd37dc1271c026edc0a3292cc69b8) +--- + NEWS | 1 + + clients/common/nm-polkit-listener.c | 2 +- + config.h.meson | 6 +++--- + configure.ac | 28 +++++++++++++++++++--------- + meson.build | 17 ++++++++++++----- + meson_options.txt | 2 +- + 6 files changed, 37 insertions(+), 19 deletions(-) + +diff --git a/NEWS b/NEWS +index 5ba8533..0946800 100644 +--- a/NEWS ++++ b/NEWS +@@ -28,6 +28,7 @@ USE AT YOUR OWN RISK. NOT RECOMMENDED FOR PRODUCTION USE! + * initrd: support new ip method "link6" for IPv6 link-local only. + * ci: use ci-templates for containers on gitlab-ci. + * ci: test build against Alpine Linux on gitlab-ci. ++* build: new configure option to set path to "polkit-agent-helper-1". + * Many bugfixes and improvements. + + ============================================= +diff --git a/clients/common/nm-polkit-listener.c b/clients/common/nm-polkit-listener.c +index db21abf..357e1ef 100644 +--- a/clients/common/nm-polkit-listener.c ++++ b/clients/common/nm-polkit-listener.c +@@ -501,7 +501,7 @@ begin_authentication(AuthRequest *request) + { + int fd_flags; + const char *helper_argv[] = { +- POLKIT_PACKAGE_PREFIX "/lib/polkit-1/polkit-agent-helper-1", ++ POLKIT_AGENT_HELPER_1_PATH, + request->username, + NULL, + }; +diff --git a/config.h.meson b/config.h.meson +index bb5458a..a911dbe 100644 +--- a/config.h.meson ++++ b/config.h.meson +@@ -109,6 +109,9 @@ + /* Define to the full name and version of this package. */ + #mesondefine PACKAGE_STRING + ++/* path to polkit-agent-helper-1 binary */ ++#mesondefine POLKIT_AGENT_HELPER_1_PATH ++ + /* Path to resolvconf */ + #mesondefine RESOLVCONF_PATH + +@@ -218,9 +221,6 @@ + /* Define if you have oFono support (experimental) */ + #mesondefine WITH_OFONO + +-/* Define the polkit agent package prefix */ +-#mesondefine POLKIT_PACKAGE_PREFIX +- + /* Define if you have PPP support */ + #mesondefine WITH_PPP + +diff --git a/configure.ac b/configure.ac +index 98c2259..5e7d67c 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -642,16 +642,25 @@ fi + AC_DEFINE_UNQUOTED(NM_CONFIG_DEFAULT_MAIN_AUTH_POLKIT, "$enable_polkit", [The default value of the auth-polkit configuration option]) + AC_SUBST(NM_CONFIG_DEFAULT_MAIN_AUTH_POLKIT_TEXT, "$enable_polkit") + +-PKG_CHECK_MODULES(POLKIT, [polkit-agent-1 >= 0.97], [have_pk_agent=yes],[have_pk_agent=no]) +-if test x"$have_pk_agent" = x"no"; then +- POLKIT_PACKAGE_PREFIX="/usr" +-else +- POLKIT_PACKAGE_PREFIX=`$PKG_CONFIG --variable=prefix polkit-agent-1` ++AC_ARG_WITH([polkit-agent-helper-1-path], ++ AS_HELP_STRING([--with-polkit-agent-helper-1-path=PATH], ++ [Path name to the polkit-agent-helper-1 binary from polkit]), ++ POLKIT_AGENT_HELPER_1_PATH="$withval", ++ POLKIT_AGENT_HELPER_1_PATH="") ++if test -z "$POLKIT_AGENT_HELPER_1_PATH" ; then ++ for p in /usr/libexec/polkit-agent-helper-1 \ ++ /usr/lib/polkit-1/polkit-agent-helper-1 \ ++ /usr/lib/policykit-1/polkit-agent-helper-1 ; do ++ if test -f "$p" ; then ++ POLKIT_AGENT_HELPER_1_PATH="$p" ++ break ++ fi ++ done + fi +-AC_DEFINE_UNQUOTED([POLKIT_PACKAGE_PREFIX], +- ["$POLKIT_PACKAGE_PREFIX"], +- [polkit-agent package prefix]) +- ++test -z "$POLKIT_AGENT_HELPER_1_PATH" && POLKIT_AGENT_HELPER_1_PATH=/usr/lib/polkit-1/polkit-agent-helper-1 ++AC_DEFINE_UNQUOTED([POLKIT_AGENT_HELPER_1_PATH], ++ ["$POLKIT_AGENT_HELPER_1_PATH"], ++ [path to polkit-agent-helper-1 binary]) + + AC_ARG_ENABLE(modify-system, AS_HELP_STRING([--enable-modify-system], [Allow users to modify system connections])) + if test "${enable_modify_system}" = "yes"; then +@@ -1332,6 +1341,7 @@ if test "${enable_modify_system}" = "yes"; then + else + echo " policykit: main.auth-polkit=${enable_polkit} (restrictive modify.system)" + fi ++echo " polkit-agent-helper-1: $POLKIT_AGENT_HELPER_1_PATH" + echo " selinux: $have_selinux" + echo " systemd-journald: $have_systemd_journal (default: logging.backend=${nm_config_logging_backend_default})" + echo " hostname persist: ${hostname_persist}" +diff --git a/meson.build b/meson.build +index 594fa63..bf6055b 100644 +--- a/meson.build ++++ b/meson.build +@@ -514,12 +514,18 @@ config_h.set_quoted('NM_CONFIG_DEFAULT_MAIN_AUTH_POLKIT', config_auth_polkit_def + + enable_modify_system = get_option('modify_system') + +-polkit_agent_dep = dependency('polkit-agent-1', version: '>= 0.97', required : false) +-if polkit_agent_dep.found() +- config_h.set_quoted('POLKIT_PACKAGE_PREFIX', polkit_agent_dep.get_pkgconfig_variable('prefix')) +-else +- config_h.set_quoted('POLKIT_PACKAGE_PREFIX', '/usr') ++polkit_agent_helper_1_path = get_option('polkit_agent_helper_1_path') ++foreach p : [ '/usr/libexec/polkit-agent-helper-1', ++ '/usr/lib/polkit-1/polkit-agent-helper-1', ++ '/usr/lib/policykit-1/polkit-agent-helper-1' ] ++ if polkit_agent_helper_1_path == '' and run_command('test', '-f', p).returncode() == 0 ++ polkit_agent_helper_1_path = p ++ endif ++endforeach ++if polkit_agent_helper_1_path == '' ++ polkit_agent_helper_1_path = '/usr/lib/polkit-1/polkit-agent-helper-1' + endif ++config_h.set_quoted('POLKIT_AGENT_HELPER_1_PATH', polkit_agent_helper_1_path) + + + crypto = get_option('crypto') +@@ -1016,6 +1022,7 @@ if enable_polkit + output += ' modify.system)' + endif + output += '\n' ++output += ' polkit-agent-helper-1: ' + polkit_agent_helper_1_path + '\n' + output += ' selinux: ' + enable_selinux.to_string() + '\n' + output += ' systemd-journald: ' + enable_systemd_journal.to_string() + ' (default: logging.backend=' + config_logging_backend_default + ')\n' + output += ' hostname persist: ' + hostname_persist + '\n' +diff --git a/meson_options.txt b/meson_options.txt +index d4f6282..71de320 100644 +--- a/meson_options.txt ++++ b/meson_options.txt +@@ -16,7 +16,7 @@ option('suspend_resume', type: 'combo', choices: ['upower', 'systemd', 'elogind' + option('polkit', type: 'boolean', value: true, description: 'User auth-polkit configuration option.') + option('config_auth_polkit_default', type: 'combo', choices: ['default', 'true', 'false', 'root-only'], value: 'default', description: 'Default value for configuration main.auth-polkit.') + option('modify_system', type: 'boolean', value: false, description: 'Allow users to modify system connections') +-option('polkit_agent', type: 'boolean', value: false, description: 'enable polkit agent for clients') ++option('polkit_agent_helper_1_path', type: 'string', value: '', description: 'Path name to the polkit-agent-helper-1 binary from polkit') + option('selinux', type: 'boolean', value: true, description: 'Build with SELinux') + option('systemd_journal', type: 'boolean', value: true, description: 'Use systemd journal for logging') + option('config_logging_backend_default', type: 'combo', choices: ['default', 'syslog', 'journal'], value: 'default', description: 'Default value for logging.backend') diff --git a/debian/patches/build-rename-build-option-with-polkit-agent-helper-1-path.patch b/debian/patches/build-rename-build-option-with-polkit-agent-helper-1-path.patch new file mode 100644 index 00000000..6693f3cb --- /dev/null +++ b/debian/patches/build-rename-build-option-with-polkit-agent-helper-1-path.patch @@ -0,0 +1,75 @@ +From: Thomas Haller +Date: Tue, 16 Feb 2021 21:33:30 +0100 +Subject: build: rename build option "--with-polkit-agent-helper-1{-path,}" + +Suggested-by: Michael Biebl +(cherry picked from commit d9968b133b32fbfbc5e726a8fc96e38cc044c831) +--- + configure.ac | 9 ++++++--- + meson.build | 5 ++++- + meson_options.txt | 2 +- + 3 files changed, 11 insertions(+), 5 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 5e7d67c..9d37ce6 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -642,9 +642,9 @@ fi + AC_DEFINE_UNQUOTED(NM_CONFIG_DEFAULT_MAIN_AUTH_POLKIT, "$enable_polkit", [The default value of the auth-polkit configuration option]) + AC_SUBST(NM_CONFIG_DEFAULT_MAIN_AUTH_POLKIT_TEXT, "$enable_polkit") + +-AC_ARG_WITH([polkit-agent-helper-1-path], +- AS_HELP_STRING([--with-polkit-agent-helper-1-path=PATH], +- [Path name to the polkit-agent-helper-1 binary from polkit]), ++AC_ARG_WITH([polkit-agent-helper-1], ++ AS_HELP_STRING([--with-polkit-agent-helper-1=/path/to/polkit-agent-helper-1], ++ [Path to the polkit-agent-helper-1 binary from polkit]), + POLKIT_AGENT_HELPER_1_PATH="$withval", + POLKIT_AGENT_HELPER_1_PATH="") + if test -z "$POLKIT_AGENT_HELPER_1_PATH" ; then +@@ -658,6 +658,9 @@ if test -z "$POLKIT_AGENT_HELPER_1_PATH" ; then + done + fi + test -z "$POLKIT_AGENT_HELPER_1_PATH" && POLKIT_AGENT_HELPER_1_PATH=/usr/lib/polkit-1/polkit-agent-helper-1 ++if test "$POLKIT_AGENT_HELPER_1_PATH" = "${POLKIT_AGENT_HELPER_1_PATH#/}" ; then ++ AC_MSG_ERROR(["polkit_agent_helper_1 must be an absolute path, but is '$POLKIT_AGENT_HELPER_1_PATH'"]) ++fi + AC_DEFINE_UNQUOTED([POLKIT_AGENT_HELPER_1_PATH], + ["$POLKIT_AGENT_HELPER_1_PATH"], + [path to polkit-agent-helper-1 binary]) +diff --git a/meson.build b/meson.build +index bf6055b..1bfe202 100644 +--- a/meson.build ++++ b/meson.build +@@ -514,7 +514,7 @@ config_h.set_quoted('NM_CONFIG_DEFAULT_MAIN_AUTH_POLKIT', config_auth_polkit_def + + enable_modify_system = get_option('modify_system') + +-polkit_agent_helper_1_path = get_option('polkit_agent_helper_1_path') ++polkit_agent_helper_1_path = get_option('polkit_agent_helper_1') + foreach p : [ '/usr/libexec/polkit-agent-helper-1', + '/usr/lib/polkit-1/polkit-agent-helper-1', + '/usr/lib/policykit-1/polkit-agent-helper-1' ] +@@ -525,6 +525,9 @@ endforeach + if polkit_agent_helper_1_path == '' + polkit_agent_helper_1_path = '/usr/lib/polkit-1/polkit-agent-helper-1' + endif ++if polkit_agent_helper_1_path[0] != '/' ++ error('polkit_agent_helper_1 must be an absolute path, but is ' + polkit_agent_helper_1_path) ++endif + config_h.set_quoted('POLKIT_AGENT_HELPER_1_PATH', polkit_agent_helper_1_path) + + +diff --git a/meson_options.txt b/meson_options.txt +index 71de320..5100ed7 100644 +--- a/meson_options.txt ++++ b/meson_options.txt +@@ -16,7 +16,7 @@ option('suspend_resume', type: 'combo', choices: ['upower', 'systemd', 'elogind' + option('polkit', type: 'boolean', value: true, description: 'User auth-polkit configuration option.') + option('config_auth_polkit_default', type: 'combo', choices: ['default', 'true', 'false', 'root-only'], value: 'default', description: 'Default value for configuration main.auth-polkit.') + option('modify_system', type: 'boolean', value: false, description: 'Allow users to modify system connections') +-option('polkit_agent_helper_1_path', type: 'string', value: '', description: 'Path name to the polkit-agent-helper-1 binary from polkit') ++option('polkit_agent_helper_1', type: 'string', value: '', description: 'Path name to the polkit-agent-helper-1 binary from polkit') + option('selinux', type: 'boolean', value: true, description: 'Build with SELinux') + option('systemd_journal', type: 'boolean', value: true, description: 'Use systemd journal for logging') + option('config_logging_backend_default', type: 'combo', choices: ['default', 'syslog', 'journal'], value: 'default', description: 'Default value for logging.backend') diff --git a/debian/patches/iwd-Fix-the-leaks-in-get_agent_request_network_path.patch b/debian/patches/iwd-Fix-the-leaks-in-get_agent_request_network_path.patch new file mode 100644 index 00000000..31e60ae1 --- /dev/null +++ b/debian/patches/iwd-Fix-the-leaks-in-get_agent_request_network_path.patch @@ -0,0 +1,38 @@ +From: Andrew Zaborowski +Date: Fri, 12 Feb 2021 11:04:26 +0100 +Subject: iwd: Fix the leaks in get_agent_request_network_path + +Don't request new copies of strings from g_variant_get() to avoid +leaking memory as pointed out by Thomas Haller. + +Fixes: dc0e31fb7014 ('iwd: Add the wifi.iwd.autoconnect setting') +(cherry picked from commit 5ccb8ce17a161fa7e926a1644a4c1aadbf74c002) +--- + src/core/devices/wifi/nm-device-iwd.c | 12 +++++------- + 1 file changed, 5 insertions(+), 7 deletions(-) + +diff --git a/src/core/devices/wifi/nm-device-iwd.c b/src/core/devices/wifi/nm-device-iwd.c +index f0de90d..95ade44 100644 +--- a/src/core/devices/wifi/nm-device-iwd.c ++++ b/src/core/devices/wifi/nm-device-iwd.c +@@ -1282,15 +1282,13 @@ get_agent_request_network_path(GDBusMethodInvocation *invocation) + const char *network_path = NULL; + + if (nm_streq(method_name, "RequestPassphrase")) +- g_variant_get(params, "(o)", &network_path); ++ g_variant_get(params, "(&o)", &network_path); + else if (nm_streq(method_name, "RequestPrivateKeyPassphrase")) +- g_variant_get(params, "(o)", &network_path); ++ g_variant_get(params, "(&o)", &network_path); + else if (nm_streq(method_name, "RequestUserNameAndPassword")) +- g_variant_get(params, "(o)", &network_path); +- else if (nm_streq(method_name, "RequestUserPassword")) { +- const char *user; +- g_variant_get(params, "(os)", &network_path, &user); +- } ++ g_variant_get(params, "(&o)", &network_path); ++ else if (nm_streq(method_name, "RequestUserPassword")) ++ g_variant_get(params, "(&os)", &network_path, NULL); + + return network_path; + } diff --git a/debian/patches/libnm-add-assertion-in-_dbus_handle_properties_changed.patch b/debian/patches/libnm-add-assertion-in-_dbus_handle_properties_changed.patch new file mode 100644 index 00000000..1cfefd48 --- /dev/null +++ b/debian/patches/libnm-add-assertion-in-_dbus_handle_properties_changed.patch @@ -0,0 +1,21 @@ +From: Thomas Haller +Date: Mon, 15 Feb 2021 09:59:53 +0100 +Subject: libnm: add assertion in _dbus_handle_properties_changed() + +(cherry picked from commit 3ceec9c6ac399b849fcabc52cf58e9001a6b8684) +--- + libnm/nm-client.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/libnm/nm-client.c b/libnm/nm-client.c +index 92ad5ef..f1b2597 100644 +--- a/libnm/nm-client.c ++++ b/libnm/nm-client.c +@@ -2959,6 +2959,7 @@ _dbus_handle_properties_changed(NMClient * self, + dbobj = _dbobjs_dbobj_create(self, g_steal_pointer(&dbus_path)); + nml_dbus_object_set_obj_state(dbobj, NML_DBUS_OBJ_STATE_ON_DBUS, self); + db_iface_data = nml_dbus_object_iface_data_get(dbobj, interface_name, TRUE); ++ nm_assert(db_iface_data); + } + + NM_SET_OUT(inout_dbobj, dbobj); diff --git a/debian/patches/libnm-avoid-assertion-failure-in-_dbus_handle_properties_.patch b/debian/patches/libnm-avoid-assertion-failure-in-_dbus_handle_properties_.patch new file mode 100644 index 00000000..e6f9209a --- /dev/null +++ b/debian/patches/libnm-avoid-assertion-failure-in-_dbus_handle_properties_.patch @@ -0,0 +1,32 @@ +From: Thomas Haller +Date: Mon, 15 Feb 2021 09:11:42 +0100 +Subject: libnm: avoid assertion failure in _dbus_handle_properties_changed() + for logging no properties + +(cherry picked from commit 1f9622358a691aa97b72b3df118feac7970769c4) +--- + libnm/nm-client.c | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) + +diff --git a/libnm/nm-client.c b/libnm/nm-client.c +index 2c77519..ec79b40 100644 +--- a/libnm/nm-client.c ++++ b/libnm/nm-client.c +@@ -2930,11 +2930,15 @@ _dbus_handle_properties_changed(NMClient * self, + gs_free char *ss = NULL; + + NML_NMCLIENT_LOG_T(self, +- "[%s]: %s: properties changed for interface %s { %s }", ++ "[%s]: %s: properties changed for interface %s %s%s%s", + object_path, + log_context, + interface_name, +- (ss = g_variant_print(changed_properties, TRUE))); ++ NM_PRINT_FMT_QUOTED(changed_properties, ++ "{ ", ++ (ss = g_variant_print(changed_properties, TRUE)), ++ " }", ++ "(no changed properties)")); + } + + if (inout_dbobj) { diff --git a/debian/patches/libnm-fix-tracking-object-state-in-NMClient-cache.patch b/debian/patches/libnm-fix-tracking-object-state-in-NMClient-cache.patch new file mode 100644 index 00000000..722e7fef --- /dev/null +++ b/debian/patches/libnm-fix-tracking-object-state-in-NMClient-cache.patch @@ -0,0 +1,102 @@ +From: Thomas Haller +Date: Mon, 15 Feb 2021 09:17:07 +0100 +Subject: libnm: fix tracking object state in NMClient cache + +NMClient has a NMLDBusObject instance for each D-Bus object +that it sees. This object can be in different states, like that we +already saw it on D-Bus or that it is only referred to by another +property. Due to a bug, we would wrongly not update the state and +trigger an assertion. + +Reproduce with python-dbusmock (commit e89e28bf1bc0254a1eb71b71cf68ef7a97d11e5b) +by running `pytest -v -s tests/test_networkmanager.py -k test_one_wifi_with_accesspoints`. +With LIBNM_CLIENT_DEBUG we get: + +>>> libnm-dbus[96085]: [6464.06459] nmclient[c9bf1eaa1f4b6c99]: [/org/freedesktop/NetworkManager/Devices/mock_WiFi2]: properties-changed: properties changed for interface org.freedesktop.NetworkManager.Device { {'ActiveConnection': } } + libnm-dbus[96085]: [6464.06459] nmclient[c9bf1eaa1f4b6c99]: [/org/freedesktop/NetworkManager/Devices/mock_WiFi2]: properties-changed: set property org.freedesktop.NetworkManager.Device.ActiveConnection + libnm-dbus[96085]: [6464.06459] nmclient[c9bf1eaa1f4b6c99]: [/org/freedesktop/NetworkManager/Devices/mock_WiFi2]: changed-type 0x01 linked + libnm-dbus[96085]: [6464.06459] nmclient[c9bf1eaa1f4b6c99]: [/org/freedesktop/NetworkManager/Devices/mock_WiFi2]: changed-type 0x01 consumed +>>> libnm-dbus[96085]: [6464.06459] nmclient[c9bf1eaa1f4b6c99]: [/org/freedesktop/NetworkManager/ActiveConnection/0]: set D-Bus object state watched-only + libnm-dbus[96085]: [6464.06459] nmclient[c9bf1eaa1f4b6c99]: [/org/freedesktop/NetworkManager/Devices/mock_WiFi2]: changed-type 0x02 linked + libnm-dbus[96085]: [6464.06459] nmclient[c9bf1eaa1f4b6c99]: [/org/freedesktop/NetworkManager]: changed-type 0x02 linked + libnm-dbus[96085]: [6464.06459] nmclient[c9bf1eaa1f4b6c99]: [/org/freedesktop/NetworkManager/Devices/mock_WiFi2]: changed-type 0x02 consumed +>>> libnm-dbus[96085]: [6464.06459] nmclient[c9bf1eaa1f4b6c99]: [/org/freedesktop/NetworkManager/Devices/mock_WiFi2]: property ActiveConnection references /org/freedesktop/NetworkManager/ActiveConnection/0 but object is not present on D-Bus + libnm-dbus[96085]: [6464.06459] nmclient[c9bf1eaa1f4b6c99]: [/org/freedesktop/NetworkManager]: changed-type 0x02 consumed + libnm-dbus[96085]: [6464.06460] nmclient[c9bf1eaa1f4b6c99]: [/org/freedesktop/NetworkManager/Devices/mock_WiFi2]: properties-changed: properties changed for interface org.freedesktop.NetworkManager.Device { {'State': } } + libnm-dbus[96085]: [6464.06460] nmclient[c9bf1eaa1f4b6c99]: [/org/freedesktop/NetworkManager/Devices/mock_WiFi2]: properties-changed: set property org.freedesktop.NetworkManager.Device.State + libnm-dbus[96085]: [6464.06460] nmclient[c9bf1eaa1f4b6c99]: [/org/freedesktop/NetworkManager/Devices/mock_WiFi2]: changed-type 0x01 linked + libnm-dbus[96085]: [6464.06460] nmclient[c9bf1eaa1f4b6c99]: [/org/freedesktop/NetworkManager/Devices/mock_WiFi2]: changed-type 0x01 consumed + libnm-dbus[96085]: [6464.06460] nmclient[c9bf1eaa1f4b6c99]: [/org/freedesktop/NetworkManager/Devices/mock_WiFi2]: changed-type 0x02 linked + libnm-dbus[96085]: [6464.06460] nmclient[c9bf1eaa1f4b6c99]: [/org/freedesktop/NetworkManager]: changed-type 0x02 linked + libnm-dbus[96085]: [6464.06461] nmclient[c9bf1eaa1f4b6c99]: [/org/freedesktop/NetworkManager/Devices/mock_WiFi2]: changed-type 0x02 consumed + libnm-dbus[96085]: [6464.06461] nmclient[c9bf1eaa1f4b6c99]: [/org/freedesktop/NetworkManager]: changed-type 0x02 consumed + libnm-dbus[96085]: [6464.06462] nmclient[c9bf1eaa1f4b6c99]: [/org/freedesktop/NetworkManager/Devices/mock_WiFi2]: properties-changed: properties changed for interface org.freedesktop.NetworkManager.Device { {'StateReason': <(uint32 100, uint32 0)>} } + libnm-dbus[96085]: [6464.06462] nmclient[c9bf1eaa1f4b6c99]: [/org/freedesktop/NetworkManager/Devices/mock_WiFi2]: properties-changed: set property org.freedesktop.NetworkManager.Device.StateReason + libnm-dbus[96085]: [6464.06462] nmclient[c9bf1eaa1f4b6c99]: [/org/freedesktop/NetworkManager/Devices/mock_WiFi2]: changed-type 0x01 linked + libnm-dbus[96085]: [6464.06462] nmclient[c9bf1eaa1f4b6c99]: [/org/freedesktop/NetworkManager/Devices/mock_WiFi2]: changed-type 0x01 consumed + libnm-dbus[96085]: [6464.06462] nmclient[c9bf1eaa1f4b6c99]: [/org/freedesktop/NetworkManager/Devices/mock_WiFi2]: changed-type 0x02 linked + libnm-dbus[96085]: [6464.06462] nmclient[c9bf1eaa1f4b6c99]: [/org/freedesktop/NetworkManager]: changed-type 0x02 linked + libnm-dbus[96085]: [6464.06462] nmclient[c9bf1eaa1f4b6c99]: [/org/freedesktop/NetworkManager/Devices/mock_WiFi2]: changed-type 0x02 consumed + libnm-dbus[96085]: [6464.06462] nmclient[c9bf1eaa1f4b6c99]: [/org/freedesktop/NetworkManager]: changed-type 0x02 consumed +>>> libnm-dbus[96085]: [6464.06465] nmclient[c9bf1eaa1f4b6c99]: [/org/freedesktop/NetworkManager/ActiveConnection/0]: interfaces-added: properties changed for interface org.freedesktop.NetworkManager.Connection.Active { {'Devices': <[objectpath '/org/freedesktop/NetworkManager/Devices/mock_WiFi2']>, 'Default6': , 'Default': , 'Type': <'802-11-wireless'>, 'Vpn': , 'Connection': , 'Master': , 'SpecificObject': , 'Uuid': <'72757a57-8cb6-4052-a18f-4e2be4ba27d9'>, 'State': , 'Id': <'AP_3'>} } +>>> here we lack "set D-Bus object state on-dbus" + libnm-dbus[96085]: [6464.06465] nmclient[c9bf1eaa1f4b6c99]: [/org/freedesktop/NetworkManager/ActiveConnection/0]: interfaces-added: set property org.freedesktop.NetworkManager.Connection.Active.Devices + libnm-dbus[96085]: [6464.06465] nmclient[c9bf1eaa1f4b6c99]: [/org/freedesktop/NetworkManager/ActiveConnection/0]: interfaces-added: set property org.freedesktop.NetworkManager.Connection.Active.Default6 + libnm-dbus[96085]: [6464.06465] nmclient[c9bf1eaa1f4b6c99]: [/org/freedesktop/NetworkManager/ActiveConnection/0]: interfaces-added: set property org.freedesktop.NetworkManager.Connection.Active.Default + libnm-dbus[96085]: [6464.06465] nmclient[c9bf1eaa1f4b6c99]: [/org/freedesktop/NetworkManager/ActiveConnection/0]: interfaces-added: set property org.freedesktop.NetworkManager.Connection.Active.Type + libnm-dbus[96085]: [6464.06465] nmclient[c9bf1eaa1f4b6c99]: [/org/freedesktop/NetworkManager/ActiveConnection/0]: interfaces-added: set property org.freedesktop.NetworkManager.Connection.Active.Vpn + libnm-dbus[96085]: [6464.06465] nmclient[c9bf1eaa1f4b6c99]: [/org/freedesktop/NetworkManager/ActiveConnection/0]: interfaces-added: set property org.freedesktop.NetworkManager.Connection.Active.Connection + libnm-dbus[96085]: [6464.06465] nmclient[c9bf1eaa1f4b6c99]: [/org/freedesktop/NetworkManager/ActiveConnection/0]: interfaces-added: set property org.freedesktop.NetworkManager.Connection.Active.Master + libnm-dbus[96085]: [6464.06465] nmclient[c9bf1eaa1f4b6c99]: [/org/freedesktop/NetworkManager/ActiveConnection/0]: interfaces-added: set property org.freedesktop.NetworkManager.Connection.Active.SpecificObject + libnm-dbus[96085]: [6464.06466] nmclient[c9bf1eaa1f4b6c99]: [/org/freedesktop/NetworkManager/ActiveConnection/0]: interfaces-added: set property org.freedesktop.NetworkManager.Connection.Active.Uuid + libnm-dbus[96085]: [6464.06466] nmclient[c9bf1eaa1f4b6c99]: [/org/freedesktop/NetworkManager/ActiveConnection/0]: interfaces-added: set property org.freedesktop.NetworkManager.Connection.Active.State + libnm-dbus[96085]: [6464.06466] nmclient[c9bf1eaa1f4b6c99]: [/org/freedesktop/NetworkManager/ActiveConnection/0]: interfaces-added: set property org.freedesktop.NetworkManager.Connection.Active.Id + libnm-dbus[96085]: [6464.06466] nmclient[c9bf1eaa1f4b6c99]: [/org/freedesktop/NetworkManager/ActiveConnection/0]: changed-type 0x01 linked + libnm-dbus[96085]: [6464.06466] nmclient[c9bf1eaa1f4b6c99]: [/org/freedesktop/NetworkManager/ActiveConnection/0]: changed-type 0x01 consumed + Bail out! libnm:ERROR:libnm/nm-client.c:2863:_dbus_handle_obj_changed_dbus: assertion failed: (dbobj->obj_state >= NML_DBUS_OBJ_STATE_ON_DBUS) + +Backtrace: + + #3 0x00007f0bd11173bf in g_assertion_message_expr + (domain=domain@entry=0x7f0bd1576018 "libnm", file=file@entry=0x7f0bd1576006 "libnm/nm-client.c", line=line@entry=2863, func=func@entry=0x7f0bd157f1b0 <__func__.170> "_dbus_handle_obj_changed_dbus", expr=expr@entry=0x7f0bd157cba0 "dbobj->obj_state >= NML_DBUS_OBJ_STATE_ON_DBUS") at ../glib/gtestutils.c:2963 + #4 0x00007f0bd14959dd in _dbus_handle_obj_changed_dbus (self=self@entry=0x5612d4f5a130, log_context=) at libnm/nm-client.c:2863 + #5 0x00007f0bd1495c29 in _dbus_handle_changes (self=self@entry=0x5612d4f5a130, log_context=, allow_init_start_check_complete=allow_init_start_check_complete@entry=1) + at libnm/nm-client.c:2909 + #6 0x00007f0bd1497e56 in _dbus_managed_objects_changed_cb + (connection=, sender_name=, arg_object_path=, interface_name=, signal_name=, parameters=0x7f0bb800d720, user_data=0x5612d4f5a130) at libnm/nm-client.c:3172 + #7 0x00007f0bd132a8df in emit_signal_instance_in_idle_cb (data=data@entry=0x7f0bb8003700) at ../gio/gdbusconnection.c:3789 + #8 0x00007f0bd10f1b5b in g_idle_dispatch (source=source@entry=0x7f0bb8012260, callback=0x7f0bd132a860 , user_data=0x7f0bb8003700) at ../glib/gmain.c:5836 + #9 0x00007f0bd10f2a9f in g_main_dispatch (context=0x5612d4f4b630) at ../glib/gmain.c:3325 + #10 g_main_context_dispatch (context=0x5612d4f4b630) at ../glib/gmain.c:4043 + #11 0x00007f0bd1144a98 in g_main_context_iterate.constprop.0 (context=0x5612d4f4b630, block=block@entry=1, dispatch=dispatch@entry=1, self=) at ../glib/gmain.c:4119 + #12 0x00007f0bd10f2163 in g_main_loop_run (loop=0x5612d4f4b720) at ../glib/gmain.c:4317 + #13 0x00005612d44b6543 in main (argc=7, argv=0x7fff4414f1d8) at clients/cli/nmcli.c:1036 + +https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=982613 +https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/issues/662 + +Fixes: ce0e898fb476 ('libnm: refactor caching of D-Bus objects in NMClient') +(cherry picked from commit e1e9abdf041b4cc95fb1936b75ced7669f3d7867) +--- + libnm/nm-client.c | 7 +++++-- + 1 file changed, 5 insertions(+), 2 deletions(-) + +diff --git a/libnm/nm-client.c b/libnm/nm-client.c +index ec79b40..92ad5ef 100644 +--- a/libnm/nm-client.c ++++ b/libnm/nm-client.c +@@ -2950,9 +2950,12 @@ _dbus_handle_properties_changed(NMClient * self, + dbobj = _dbobjs_dbobj_get_r(self, dbus_path); + } + +- if (dbobj) ++ if (dbobj) { ++ nm_assert(dbobj->obj_state >= NML_DBUS_OBJ_STATE_WATCHED_ONLY); + db_iface_data = nml_dbus_object_iface_data_get(dbobj, interface_name, allow_add_iface); +- else if (allow_add_iface) { ++ if (db_iface_data && dbobj->obj_state == NML_DBUS_OBJ_STATE_WATCHED_ONLY) ++ nml_dbus_object_set_obj_state(dbobj, NML_DBUS_OBJ_STATE_ON_DBUS, self); ++ } else if (allow_add_iface) { + dbobj = _dbobjs_dbobj_create(self, g_steal_pointer(&dbus_path)); + nml_dbus_object_set_obj_state(dbobj, NML_DBUS_OBJ_STATE_ON_DBUS, self); + db_iface_data = nml_dbus_object_iface_data_get(dbobj, interface_name, TRUE); diff --git a/debian/patches/libnm-log-PID-in-LIBNM_CLIENT_DEBUG-debug-logging.patch b/debian/patches/libnm-log-PID-in-LIBNM_CLIENT_DEBUG-debug-logging.patch new file mode 100644 index 00000000..cf932651 --- /dev/null +++ b/debian/patches/libnm-log-PID-in-LIBNM_CLIENT_DEBUG-debug-logging.patch @@ -0,0 +1,42 @@ +From: Thomas Haller +Date: Mon, 15 Feb 2021 08:47:16 +0100 +Subject: libnm: log PID in LIBNM_CLIENT_DEBUG debug logging + +(cherry picked from commit 6da5fc59d860913a278f488f0873ce68f038de2b) +--- + libnm/nm-libnm-utils.c | 9 +++++++-- + 1 file changed, 7 insertions(+), 2 deletions(-) + +diff --git a/libnm/nm-libnm-utils.c b/libnm/nm-libnm-utils.c +index 1fb6a47..1000e04 100644 +--- a/libnm/nm-libnm-utils.c ++++ b/libnm/nm-libnm-utils.c +@@ -46,6 +46,7 @@ _nml_dbus_log(NMLDBusLogLevel level, gboolean use_stdout, const char *fmt, ...) + va_list args; + const char * prefix = ""; + gint64 ts; ++ pid_t pid; + + /* we only call _nml_dbus_log() after nml_dbus_log_enabled(), which already does + * an atomic access to the variable. Since the value is only initialized once and +@@ -89,14 +90,18 @@ _nml_dbus_log(NMLDBusLogLevel level, gboolean use_stdout, const char *fmt, ...) + + ts = nm_utils_clock_gettime_nsec(CLOCK_BOOTTIME); + ++ pid = getpid(); ++ + if (use_stdout) { +- g_print("libnm-dbus: %s[%" G_GINT64_FORMAT ".%05" G_GINT64_FORMAT "] %s\n", ++ g_print("libnm-dbus[%lld]: %s[%" G_GINT64_FORMAT ".%05" G_GINT64_FORMAT "] %s\n", ++ (long long) pid, + prefix, + ts / NM_UTILS_NSEC_PER_SEC, + (ts / (NM_UTILS_NSEC_PER_SEC / 10000)) % 10000, + msg); + } else { +- g_printerr("libnm-dbus: %s[%" G_GINT64_FORMAT ".%05" G_GINT64_FORMAT "] %s\n", ++ g_printerr("libnm-dbus[%lld]: %s[%" G_GINT64_FORMAT ".%05" G_GINT64_FORMAT "] %s\n", ++ (long long) pid, + prefix, + ts / NM_UTILS_NSEC_PER_SEC, + (ts / (NM_UTILS_NSEC_PER_SEC / 10000)) % 10000, diff --git a/debian/patches/platform-downgrade-severity-of-message-for-failure-to-cre.patch b/debian/patches/platform-downgrade-severity-of-message-for-failure-to-cre.patch new file mode 100644 index 00000000..c6acda06 --- /dev/null +++ b/debian/patches/platform-downgrade-severity-of-message-for-failure-to-cre.patch @@ -0,0 +1,37 @@ +From: Thomas Haller +Date: Mon, 15 Feb 2021 20:52:55 +0100 +Subject: platform: downgrade severity of message for failure to create + NMPNetns + +Under restricted permissions (like inside a podman container) opening +"/proc/self/ns/net" fails with Permission denied. Consequently we cannot +create our bottom NMPNetns instance. That is mostly fine, however we +would log an error message with severity . + +Note that test "src/core/platform/tests/test-platform-general" asserts +that no and messages get logged. Hence, the test will +fail. + +That is undesirable. Downgrade the message to so that the test +passes. Also, it's not clear that this error message is useful here. +Being unable to open a netns fd is fine and not necessarily an error +condition. + +(cherry picked from commit 0213300dcee438a0b48a3d3a6da3112286ad43d1) +--- + shared/nm-platform/nmp-netns.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/shared/nm-platform/nmp-netns.c b/shared/nm-platform/nmp-netns.c +index 0828f4a..f97339a75 100644 +--- a/shared/nm-platform/nmp-netns.c ++++ b/shared/nm-platform/nmp-netns.c +@@ -171,7 +171,7 @@ _netns_stack_get_impl(void) + netns = _netns_new(&error); + + if (!netns) { +- _LOGE(NULL, "failed to create initial netns: %s", error->message); ++ _LOGD(NULL, "failed to create initial netns: %s", error->message); + return s; + } + diff --git a/debian/patches/platform-ensure-NM_SOCK_ADDR_UNION_INIT_UNSPEC-fully-init.patch b/debian/patches/platform-ensure-NM_SOCK_ADDR_UNION_INIT_UNSPEC-fully-init.patch new file mode 100644 index 00000000..be47404a --- /dev/null +++ b/debian/patches/platform-ensure-NM_SOCK_ADDR_UNION_INIT_UNSPEC-fully-init.patch @@ -0,0 +1,35 @@ +From: Thomas Haller +Date: Sat, 13 Feb 2021 15:45:44 +0100 +Subject: platform: ensure NM_SOCK_ADDR_UNION_INIT_UNSPEC() fully initializes + union + +In C, initialization of a union does not define that excess memory +is initialized. Ensure that, by initializing the largest member of the +NMSockAddrUnion union. + +(cherry picked from commit 7bf2ddf73f8d8c2d882c4932e88b76eef337cd0a) +--- + src/core/platform/nmp-object.h | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) + +diff --git a/src/core/platform/nmp-object.h b/src/core/platform/nmp-object.h +index dc2cc86..19f6bcd 100644 +--- a/src/core/platform/nmp-object.h ++++ b/src/core/platform/nmp-object.h +@@ -34,10 +34,14 @@ typedef union { + struct sockaddr_in6 in6; + } NMSockAddrUnion; + ++G_STATIC_ASSERT(sizeof(NMSockAddrUnion) == sizeof(((NMSockAddrUnion *) NULL)->in6)); ++ ++/* we initialize the largest union member, to ensure that all fields are initialized. */ ++ + #define NM_SOCK_ADDR_UNION_INIT_UNSPEC \ + { \ +- .sa = { \ +- .sa_family = AF_UNSPEC, \ ++ .in6 = { \ ++ .sin6_family = AF_UNSPEC, \ + }, \ + } + diff --git a/debian/patches/platform-reorder-code-in-_netns_stack_get_impl.patch b/debian/patches/platform-reorder-code-in-_netns_stack_get_impl.patch new file mode 100644 index 00000000..d68983af --- /dev/null +++ b/debian/patches/platform-reorder-code-in-_netns_stack_get_impl.patch @@ -0,0 +1,51 @@ +From: Thomas Haller +Date: Mon, 15 Feb 2021 20:45:21 +0100 +Subject: platform: reorder code in _netns_stack_get_impl() + +We should always register the GArray stack with pthread +for cleanup the thread local storage. Do that first, before +creating the NMPNetns instance at the bottom of the stack. + +(cherry picked from commit f9636080ace7d7834083dcb1a3300e08368ee4eb) +--- + shared/nm-platform/nmp-netns.c | 17 +++++++++-------- + 1 file changed, 9 insertions(+), 8 deletions(-) + +diff --git a/shared/nm-platform/nmp-netns.c b/shared/nm-platform/nmp-netns.c +index c7cb617..0828f4a 100644 +--- a/shared/nm-platform/nmp-netns.c ++++ b/shared/nm-platform/nmp-netns.c +@@ -158,9 +158,18 @@ _netns_stack_get_impl(void) + g_array_set_clear_func(s, _netns_stack_clear_cb); + _netns_stack = s; + ++ /* register a destructor function to cleanup the array. If we fail ++ * to do so, we will leak NMPNetns instances (and their file descriptor) when the ++ * thread exits. */ ++ if (pthread_key_create(&key, (void (*)(void *)) g_array_unref) != 0) ++ _LOGE(NULL, "failure to initialize thread-local storage"); ++ else if (pthread_setspecific(key, s) != 0) ++ _LOGE(NULL, "failure to set thread-local storage"); ++ + /* at the bottom of the stack we must try to create a netns instance + * that we never pop. It's the base to which we need to return. */ + netns = _netns_new(&error); ++ + if (!netns) { + _LOGE(NULL, "failed to create initial netns: %s", error->message); + return s; +@@ -169,14 +178,6 @@ _netns_stack_get_impl(void) + /* we leak this instance inside the stack. */ + _stack_push(s, netns, _CLONE_NS_ALL); + +- /* finally, register a destructor function to cleanup the array. If we fail +- * to do so, we will leak NMPNetns instances (and their file descriptor) when the +- * thread exits. */ +- if (pthread_key_create(&key, (void (*)(void *)) g_array_unref) != 0) +- _LOGE(NULL, "failure to initialize thread-local storage"); +- else if (pthread_setspecific(key, s) != 0) +- _LOGE(NULL, "failure to set thread-local storage"); +- + return s; + } + diff --git a/debian/patches/platform-tests-skip-tests-if-unshare-CLONE_NEWNET-CLONE_N.patch b/debian/patches/platform-tests-skip-tests-if-unshare-CLONE_NEWNET-CLONE_N.patch new file mode 100644 index 00000000..027f4f32 --- /dev/null +++ b/debian/patches/platform-tests-skip-tests-if-unshare-CLONE_NEWNET-CLONE_N.patch @@ -0,0 +1,42 @@ +From: Thomas Haller +Date: Mon, 15 Feb 2021 20:36:53 +0100 +Subject: platform/tests: skip tests if "unshare(CLONE_NEWNET|CLONE_NEWNS)" + fails + +Inside a podman container (without `--priviledged`) we don't have +permissions for "unshare(CLONE_NEWNET|CLONE_NEWNS)". + +It's not useful to fail tests in environments where they cannot run. +Skip them. + +(cherry picked from commit ecdbb1ab8458b7a373038a2abd8cabd56e664ceb) +--- + src/core/platform/tests/test-common.c | 15 ++++++++++++++- + 1 file changed, 14 insertions(+), 1 deletion(-) + +diff --git a/src/core/platform/tests/test-common.c b/src/core/platform/tests/test-common.c +index 87e5329..4a117d5 100644 +--- a/src/core/platform/tests/test-common.c ++++ b/src/core/platform/tests/test-common.c +@@ -2563,7 +2563,20 @@ main(int argc, char **argv) + + if (unshare(CLONE_NEWNET | CLONE_NEWNS) != 0) { + errsv = errno; +- g_error("unshare(CLONE_NEWNET|CLONE_NEWNS) failed with %s (%d)", ++ if (errsv == EPERM) { ++#ifdef REQUIRE_ROOT_TESTS ++ g_print("Fail test: unshare(CLONE_NEWNET|CLONE_NEWNS) failed with %s (%d)\n", ++ nm_strerror_native(errsv), ++ errsv); ++ return EXIT_FAILURE; ++#else ++ g_print("Skipping test: unshare(CLONE_NEWNET|CLONE_NEWNS) failed with %s (%d)\n", ++ nm_strerror_native(errsv), ++ errsv); ++ return g_test_run(); ++#endif ++ } ++ g_error("Fail test: unshare(CLONE_NEWNET|CLONE_NEWNS) failed with %s (%d)", + nm_strerror_native(errsv), + errsv); + } diff --git a/debian/patches/series b/debian/patches/series index 4a96b643..6ac615dc 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,2 +1,15 @@ Force-online-state-with-unmanaged-devices.patch -Fix-polkit-agent-helper-1-path.patch +build-make-path-to-polkit-agent-helper-1-binary-configura.patch +iwd-Fix-the-leaks-in-get_agent_request_network_path.patch +libnm-log-PID-in-LIBNM_CLIENT_DEBUG-debug-logging.patch +libnm-avoid-assertion-failure-in-_dbus_handle_properties_.patch +libnm-fix-tracking-object-state-in-NMClient-cache.patch +libnm-add-assertion-in-_dbus_handle_properties_changed.patch +shared-refactor-nm_assert-for-NMRefString.patch +tests-add-bin-sbin-to-PATH-for-unit-tests.patch +platform-tests-skip-tests-if-unshare-CLONE_NEWNET-CLONE_N.patch +platform-reorder-code-in-_netns_stack_get_impl.patch +platform-downgrade-severity-of-message-for-failure-to-cre.patch +platform-ensure-NM_SOCK_ADDR_UNION_INIT_UNSPEC-fully-init.patch +wireguard-prefer-last-resolved-IP-from-resolving-endpoint.patch +build-rename-build-option-with-polkit-agent-helper-1-path.patch diff --git a/debian/patches/shared-refactor-nm_assert-for-NMRefString.patch b/debian/patches/shared-refactor-nm_assert-for-NMRefString.patch new file mode 100644 index 00000000..72d53614 --- /dev/null +++ b/debian/patches/shared-refactor-nm_assert-for-NMRefString.patch @@ -0,0 +1,54 @@ +From: Thomas Haller +Date: Mon, 15 Feb 2021 10:04:52 +0100 +Subject: shared: refactor nm_assert() for NMRefString + +- also check consistency of the string. + +- disable more expensive check unless running with NM_MORE_ASSERTS>10. + +(cherry picked from commit ac1c66eb343693cb63b8624b4be6088e1583670e) +--- + shared/nm-glib-aux/nm-ref-string.c | 24 ++++++++++++++++-------- + 1 file changed, 16 insertions(+), 8 deletions(-) + +diff --git a/shared/nm-glib-aux/nm-ref-string.c b/shared/nm-glib-aux/nm-ref-string.c +index 902f1c8..1084c47 100644 +--- a/shared/nm-glib-aux/nm-ref-string.c ++++ b/shared/nm-glib-aux/nm-ref-string.c +@@ -49,20 +49,28 @@ _ref_string_equal(gconstpointer pa, gconstpointer pb) + static void + _ASSERT(const RefString *rstr0) + { +-#if NM_MORE_ASSERTS + int r; + + nm_assert(rstr0); + +- G_LOCK(gl_lock); +- r = g_atomic_int_get(&rstr0->ref_count); ++ if (NM_MORE_ASSERTS > 0) { ++ r = g_atomic_int_get(&rstr0->ref_count); ++ nm_assert(r > 0); ++ nm_assert(r < G_MAXINT); ++ } + +- nm_assert(r > 0); +- nm_assert(r < G_MAXINT); ++ nm_assert(rstr0->r.str == rstr0->str_data); ++ nm_assert(rstr0->r.str[rstr0->r.len] == '\0'); + +- nm_assert(rstr0 == g_hash_table_lookup(gl_hash, rstr0)); +- G_UNLOCK(gl_lock); +-#endif ++ if (NM_MORE_ASSERTS > 10) { ++ G_LOCK(gl_lock); ++ r = g_atomic_int_get(&rstr0->ref_count); ++ nm_assert(r > 0); ++ nm_assert(r < G_MAXINT); ++ ++ nm_assert(rstr0 == g_hash_table_lookup(gl_hash, rstr0)); ++ G_UNLOCK(gl_lock); ++ } + } + + /** diff --git a/debian/patches/tests-add-bin-sbin-to-PATH-for-unit-tests.patch b/debian/patches/tests-add-bin-sbin-to-PATH-for-unit-tests.patch new file mode 100644 index 00000000..5e0f1733 --- /dev/null +++ b/debian/patches/tests-add-bin-sbin-to-PATH-for-unit-tests.patch @@ -0,0 +1,43 @@ +From: Thomas Haller +Date: Mon, 15 Feb 2021 13:49:19 +0100 +Subject: tests: add "/bin:/sbin" to "$PATH" for unit tests + +We call `tc` from iproute2, which commonly is at "/sbin/tc". +That might not be in the "$PATH" of a regular user, and consequently +we fail to run the test. + +Work around that by always adding "/bin" and "/sbin" to the $PATH. + +(cherry picked from commit f591aa41c6acb9c890e57c822058b5e47b8aeca6) +--- + shared/nm-utils/nm-test-utils.h | 17 +++++++++++++++++ + 1 file changed, 17 insertions(+) + +diff --git a/shared/nm-utils/nm-test-utils.h b/shared/nm-utils/nm-test-utils.h +index 6b41c11..d51f972 100644 +--- a/shared/nm-utils/nm-test-utils.h ++++ b/shared/nm-utils/nm-test-utils.h +@@ -624,6 +624,23 @@ __nmtst_init(int * argc, + g_setenv("G_MESSAGES_DEBUG", "all", TRUE); + } + ++ /* "tc" is in /sbin, which might not be in $PATH of a regular user. Unconditionally ++ * add "/bin" and "/sbin" to $PATH for all tests. */ ++ { ++ static char *path_new; ++ const char * path_old; ++ ++ g_assert(!path_new); ++ ++ path_old = g_getenv("PATH"); ++ path_new = g_strjoin("", ++ path_old ?: "", ++ (nm_str_is_empty(path_old) ? "" : ":"), ++ "/bin:/sbin", ++ NULL); ++ g_setenv("PATH", path_new, TRUE); ++ } ++ + /* Delay messages until we setup logging. */ + for (i = 0; i < debug_messages->len; i++) + __NMTST_LOG(g_message, "%s", g_array_index(debug_messages, const char *, i)); diff --git a/debian/patches/wireguard-prefer-last-resolved-IP-from-resolving-endpoint.patch b/debian/patches/wireguard-prefer-last-resolved-IP-from-resolving-endpoint.patch new file mode 100644 index 00000000..e61dfc25 --- /dev/null +++ b/debian/patches/wireguard-prefer-last-resolved-IP-from-resolving-endpoint.patch @@ -0,0 +1,110 @@ +From: Thomas Haller +Date: Sat, 13 Feb 2021 15:47:31 +0100 +Subject: wireguard: prefer last resolved IP from resolving endpoint from DNS + +We periodically re-resolve the DNS name for entpoints. Since WireGuard +has no concept of being connected, we want to eventually pick up +if the DNS name resolves to a different IP address. + +However, on resolution failure, we will never clear the endpoint we +already have. Thus, resolving names can only give a better endpoint, +not remove an IP address entirely. + +DNS names might do Round-Robin load distribution and the name of the +endpoint might resolve to multiple IP addresses. Improve to stick to +the IP address that we already have -- provided that the IP address +is still among the new resolution result. Otherwise, we continue to +pick the first IP address that was resolved. + +(cherry picked from commit 98348ee5396dde5756fbb82ebf16b90790b6b32d) +--- + src/core/devices/nm-device-wireguard.c | 42 +++++++++++++++++++++------------- + 1 file changed, 26 insertions(+), 16 deletions(-) + +diff --git a/src/core/devices/nm-device-wireguard.c b/src/core/devices/nm-device-wireguard.c +index fd057de..5bee09e 100644 +--- a/src/core/devices/nm-device-wireguard.c ++++ b/src/core/devices/nm-device-wireguard.c +@@ -729,7 +729,7 @@ _peers_resolve_cb(GObject *source_object, GAsyncResult *res, gpointer user_data) + PeerData * peer_data; + gs_free_error GError *resolv_error = NULL; + GList * list; +- gboolean changed = FALSE; ++ gboolean changed; + NMSockAddrUnion sockaddr; + gint64 retry_in_msec; + char s_sockaddr[100]; +@@ -775,36 +775,49 @@ _peers_resolve_cb(GObject *source_object, GAsyncResult *res, gpointer user_data) + } + + sockaddr = (NMSockAddrUnion) NM_SOCK_ADDR_UNION_INIT_UNSPEC; ++ changed = FALSE; + + if (!resolv_error) { + GList *iter; + + for (iter = list; iter; iter = iter->next) { +- GInetAddress *a = iter->data; +- GSocketFamily f = g_inet_address_get_family(a); ++ GInetAddress * a = iter->data; ++ NMSockAddrUnion sockaddr_tmp; ++ NMSockAddrUnion *s; + +- if (f == G_SOCKET_FAMILY_IPV4) { ++ s = sockaddr.sa.sa_family == AF_UNSPEC ? &sockaddr : &sockaddr_tmp; ++ ++ switch (g_inet_address_get_family(a)) { ++ case G_SOCKET_FAMILY_IPV4: + nm_assert(g_inet_address_get_native_size(a) == sizeof(struct in_addr)); +- sockaddr.in = (struct sockaddr_in){ ++ s->in = (struct sockaddr_in){ + .sin_family = AF_INET, + .sin_port = htons(nm_sock_addr_endpoint_get_port( + _nm_wireguard_peer_get_endpoint(peer_data->peer))), + }; +- memcpy(&sockaddr.in.sin_addr, g_inet_address_to_bytes(a), sizeof(struct in_addr)); ++ memcpy(&s->in.sin_addr, g_inet_address_to_bytes(a), sizeof(struct in_addr)); + break; +- } +- if (f == G_SOCKET_FAMILY_IPV6) { ++ case G_SOCKET_FAMILY_IPV6: + nm_assert(g_inet_address_get_native_size(a) == sizeof(struct in6_addr)); +- sockaddr.in6 = (struct sockaddr_in6){ ++ s->in6 = (struct sockaddr_in6){ + .sin6_family = AF_INET6, + .sin6_port = htons(nm_sock_addr_endpoint_get_port( + _nm_wireguard_peer_get_endpoint(peer_data->peer))), + .sin6_scope_id = 0, + .sin6_flowinfo = 0, + }; +- memcpy(&sockaddr.in6.sin6_addr, +- g_inet_address_to_bytes(a), +- sizeof(struct in6_addr)); ++ memcpy(&s->in6.sin6_addr, g_inet_address_to_bytes(a), sizeof(struct in6_addr)); ++ break; ++ default: ++ continue; ++ } ++ ++ changed = TRUE; ++ if (peer_data->ep_resolv.sockaddr.sa.sa_family == AF_UNSPEC) ++ break; ++ ++ if (nm_sock_addr_union_cmp(&peer_data->ep_resolv.sockaddr, &sockaddr) == 0) { ++ changed = FALSE; + break; + } + } +@@ -819,11 +832,8 @@ _peers_resolve_cb(GObject *source_object, GAsyncResult *res, gpointer user_data) + * a possibly good IP address, since WireGuard supports automatic roaming + * anyway. Either the IP address is still good (and we would wrongly + * reject it), or it isn't -- in which case it does not hurt much. */ +- } else { +- if (nm_sock_addr_union_cmp(&peer_data->ep_resolv.sockaddr, &sockaddr) != 0) +- changed = TRUE; ++ } else if (changed) + peer_data->ep_resolv.sockaddr = sockaddr; +- } + + if (resolv_error || peer_data->ep_resolv.sockaddr.sa.sa_family == AF_UNSPEC) { + /* while it technically did not fail, something is probably odd. Retry frequently to diff --git a/debian/rules b/debian/rules index 784ce12d..55e2e500 100755 --- a/debian/rules +++ b/debian/rules @@ -28,6 +28,7 @@ override_dh_auto_configure: --with-iptables=/usr/sbin/iptables \ --with-dnsmasq=/usr/sbin/dnsmasq \ --with-dnssec-trigger=/usr/lib/dnssec-trigger/dnssec-trigger-script \ + --with-polkit-agent-helper-1=/usr/lib/policykit-1/polkit-agent-helper-1 \ --with-systemdsystemunitdir=/lib/systemd/system \ --with-udev-dir=/lib/udev \ --with-dbus-sys-dir=/usr/share/dbus-1/system.d \ -- cgit 1.3.0-6-gf8a5 From 16df93361dd8829fa730e08ce96650b499a59f70 Mon Sep 17 00:00:00 2001 From: Michael Biebl Date: Tue, 16 Feb 2021 22:56:33 +0100 Subject: Release version 1.29.90-2 to unstable --- debian/changelog | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 4cbd4efb..f8bb2014 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,14 @@ +network-manager (1.29.90-2) unstable; urgency=medium + + * Add iproute2 to Build-Depends. + Required by the test suite. Mark as accordingly. + * Cherry-pick fixes from upstream nm-1-30 branch + - Fixes assertion when running the python-dbusmock test suite + (Closes: #982613) + - Replaces our custom polkit-agent-helper-1 patch + + -- Michael Biebl Tue, 16 Feb 2021 22:54:54 +0100 + network-manager (1.29.90-1) unstable; urgency=medium [ Michael Biebl ] -- cgit 1.3.0-6-gf8a5 From b9d19f22a56c92999a7e5cc0af875970c3a6980c Mon Sep 17 00:00:00 2001 From: Michael Biebl Date: Thu, 18 Feb 2021 18:57:12 +0100 Subject: New upstream version 1.30.0 --- debian/changelog | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index f8bb2014..44075d4b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +network-manager (1.30.0-1) UNRELEASED; urgency=medium + + * New upstream version 1.30.0 + + -- Michael Biebl Thu, 18 Feb 2021 18:57:10 +0100 + network-manager (1.29.90-2) unstable; urgency=medium * Add iproute2 to Build-Depends. -- cgit 1.3.0-6-gf8a5 From c89a53be82c3c1caa2fa5e18c3082ecc7603b249 Mon Sep 17 00:00:00 2001 From: Michael Biebl Date: Thu, 18 Feb 2021 18:57:53 +0100 Subject: Rebase patches --- ...to-polkit-agent-helper-1-binary-configura.patch | 169 --------------------- ...ld-option-with-polkit-agent-helper-1-path.patch | 75 --------- ...e-leaks-in-get_agent_request_network_path.patch | 38 ----- ...ertion-in-_dbus_handle_properties_changed.patch | 21 --- ...rtion-failure-in-_dbus_handle_properties_.patch | 32 ---- ...x-tracking-object-state-in-NMClient-cache.patch | 102 ------------- ...g-PID-in-LIBNM_CLIENT_DEBUG-debug-logging.patch | 42 ----- ...de-severity-of-message-for-failure-to-cre.patch | 37 ----- ...NM_SOCK_ADDR_UNION_INIT_UNSPEC-fully-init.patch | 35 ----- ...orm-reorder-code-in-_netns_stack_get_impl.patch | 51 ------- ...kip-tests-if-unshare-CLONE_NEWNET-CLONE_N.patch | 42 ----- debian/patches/series | 14 -- ...shared-refactor-nm_assert-for-NMRefString.patch | 54 ------- ...tests-add-bin-sbin-to-PATH-for-unit-tests.patch | 43 ------ ...-last-resolved-IP-from-resolving-endpoint.patch | 110 -------------- 15 files changed, 865 deletions(-) delete mode 100644 debian/patches/build-make-path-to-polkit-agent-helper-1-binary-configura.patch delete mode 100644 debian/patches/build-rename-build-option-with-polkit-agent-helper-1-path.patch delete mode 100644 debian/patches/iwd-Fix-the-leaks-in-get_agent_request_network_path.patch delete mode 100644 debian/patches/libnm-add-assertion-in-_dbus_handle_properties_changed.patch delete mode 100644 debian/patches/libnm-avoid-assertion-failure-in-_dbus_handle_properties_.patch delete mode 100644 debian/patches/libnm-fix-tracking-object-state-in-NMClient-cache.patch delete mode 100644 debian/patches/libnm-log-PID-in-LIBNM_CLIENT_DEBUG-debug-logging.patch delete mode 100644 debian/patches/platform-downgrade-severity-of-message-for-failure-to-cre.patch delete mode 100644 debian/patches/platform-ensure-NM_SOCK_ADDR_UNION_INIT_UNSPEC-fully-init.patch delete mode 100644 debian/patches/platform-reorder-code-in-_netns_stack_get_impl.patch delete mode 100644 debian/patches/platform-tests-skip-tests-if-unshare-CLONE_NEWNET-CLONE_N.patch delete mode 100644 debian/patches/shared-refactor-nm_assert-for-NMRefString.patch delete mode 100644 debian/patches/tests-add-bin-sbin-to-PATH-for-unit-tests.patch delete mode 100644 debian/patches/wireguard-prefer-last-resolved-IP-from-resolving-endpoint.patch (limited to 'debian') diff --git a/debian/patches/build-make-path-to-polkit-agent-helper-1-binary-configura.patch b/debian/patches/build-make-path-to-polkit-agent-helper-1-binary-configura.patch deleted file mode 100644 index 03f2bc80..00000000 --- a/debian/patches/build-make-path-to-polkit-agent-helper-1-binary-configura.patch +++ /dev/null @@ -1,169 +0,0 @@ -From: Thomas Haller -Date: Fri, 12 Feb 2021 10:17:41 +0100 -Subject: build: make path to polkit-agent-helper-1 binary configurable - -Add new configure option to set the path to "polkit-agent-helper-1". - -The path cannot be obtained from pkg-config and `pkg-config ---variable=prefix polkit-agent-1` is not good enough. - -On Fedora, the path is "/usr/lib/polkit-1/polkit-agent-helper-1". -On Debian Buster, the path is "/usr/lib/policykit-1/polkit-agent-helper-1" -On Debian Sid, the path is "/usr/libexec/polkit-agent-helper-1" (but -currently it is also symlinked from "/usr/lib/policykit-1/polkit-agent-helper-1". - -(cherry picked from commit 801c41a11c2cd37dc1271c026edc0a3292cc69b8) ---- - NEWS | 1 + - clients/common/nm-polkit-listener.c | 2 +- - config.h.meson | 6 +++--- - configure.ac | 28 +++++++++++++++++++--------- - meson.build | 17 ++++++++++++----- - meson_options.txt | 2 +- - 6 files changed, 37 insertions(+), 19 deletions(-) - -diff --git a/NEWS b/NEWS -index 5ba8533..0946800 100644 ---- a/NEWS -+++ b/NEWS -@@ -28,6 +28,7 @@ USE AT YOUR OWN RISK. NOT RECOMMENDED FOR PRODUCTION USE! - * initrd: support new ip method "link6" for IPv6 link-local only. - * ci: use ci-templates for containers on gitlab-ci. - * ci: test build against Alpine Linux on gitlab-ci. -+* build: new configure option to set path to "polkit-agent-helper-1". - * Many bugfixes and improvements. - - ============================================= -diff --git a/clients/common/nm-polkit-listener.c b/clients/common/nm-polkit-listener.c -index db21abf..357e1ef 100644 ---- a/clients/common/nm-polkit-listener.c -+++ b/clients/common/nm-polkit-listener.c -@@ -501,7 +501,7 @@ begin_authentication(AuthRequest *request) - { - int fd_flags; - const char *helper_argv[] = { -- POLKIT_PACKAGE_PREFIX "/lib/polkit-1/polkit-agent-helper-1", -+ POLKIT_AGENT_HELPER_1_PATH, - request->username, - NULL, - }; -diff --git a/config.h.meson b/config.h.meson -index bb5458a..a911dbe 100644 ---- a/config.h.meson -+++ b/config.h.meson -@@ -109,6 +109,9 @@ - /* Define to the full name and version of this package. */ - #mesondefine PACKAGE_STRING - -+/* path to polkit-agent-helper-1 binary */ -+#mesondefine POLKIT_AGENT_HELPER_1_PATH -+ - /* Path to resolvconf */ - #mesondefine RESOLVCONF_PATH - -@@ -218,9 +221,6 @@ - /* Define if you have oFono support (experimental) */ - #mesondefine WITH_OFONO - --/* Define the polkit agent package prefix */ --#mesondefine POLKIT_PACKAGE_PREFIX -- - /* Define if you have PPP support */ - #mesondefine WITH_PPP - -diff --git a/configure.ac b/configure.ac -index 98c2259..5e7d67c 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -642,16 +642,25 @@ fi - AC_DEFINE_UNQUOTED(NM_CONFIG_DEFAULT_MAIN_AUTH_POLKIT, "$enable_polkit", [The default value of the auth-polkit configuration option]) - AC_SUBST(NM_CONFIG_DEFAULT_MAIN_AUTH_POLKIT_TEXT, "$enable_polkit") - --PKG_CHECK_MODULES(POLKIT, [polkit-agent-1 >= 0.97], [have_pk_agent=yes],[have_pk_agent=no]) --if test x"$have_pk_agent" = x"no"; then -- POLKIT_PACKAGE_PREFIX="/usr" --else -- POLKIT_PACKAGE_PREFIX=`$PKG_CONFIG --variable=prefix polkit-agent-1` -+AC_ARG_WITH([polkit-agent-helper-1-path], -+ AS_HELP_STRING([--with-polkit-agent-helper-1-path=PATH], -+ [Path name to the polkit-agent-helper-1 binary from polkit]), -+ POLKIT_AGENT_HELPER_1_PATH="$withval", -+ POLKIT_AGENT_HELPER_1_PATH="") -+if test -z "$POLKIT_AGENT_HELPER_1_PATH" ; then -+ for p in /usr/libexec/polkit-agent-helper-1 \ -+ /usr/lib/polkit-1/polkit-agent-helper-1 \ -+ /usr/lib/policykit-1/polkit-agent-helper-1 ; do -+ if test -f "$p" ; then -+ POLKIT_AGENT_HELPER_1_PATH="$p" -+ break -+ fi -+ done - fi --AC_DEFINE_UNQUOTED([POLKIT_PACKAGE_PREFIX], -- ["$POLKIT_PACKAGE_PREFIX"], -- [polkit-agent package prefix]) -- -+test -z "$POLKIT_AGENT_HELPER_1_PATH" && POLKIT_AGENT_HELPER_1_PATH=/usr/lib/polkit-1/polkit-agent-helper-1 -+AC_DEFINE_UNQUOTED([POLKIT_AGENT_HELPER_1_PATH], -+ ["$POLKIT_AGENT_HELPER_1_PATH"], -+ [path to polkit-agent-helper-1 binary]) - - AC_ARG_ENABLE(modify-system, AS_HELP_STRING([--enable-modify-system], [Allow users to modify system connections])) - if test "${enable_modify_system}" = "yes"; then -@@ -1332,6 +1341,7 @@ if test "${enable_modify_system}" = "yes"; then - else - echo " policykit: main.auth-polkit=${enable_polkit} (restrictive modify.system)" - fi -+echo " polkit-agent-helper-1: $POLKIT_AGENT_HELPER_1_PATH" - echo " selinux: $have_selinux" - echo " systemd-journald: $have_systemd_journal (default: logging.backend=${nm_config_logging_backend_default})" - echo " hostname persist: ${hostname_persist}" -diff --git a/meson.build b/meson.build -index 594fa63..bf6055b 100644 ---- a/meson.build -+++ b/meson.build -@@ -514,12 +514,18 @@ config_h.set_quoted('NM_CONFIG_DEFAULT_MAIN_AUTH_POLKIT', config_auth_polkit_def - - enable_modify_system = get_option('modify_system') - --polkit_agent_dep = dependency('polkit-agent-1', version: '>= 0.97', required : false) --if polkit_agent_dep.found() -- config_h.set_quoted('POLKIT_PACKAGE_PREFIX', polkit_agent_dep.get_pkgconfig_variable('prefix')) --else -- config_h.set_quoted('POLKIT_PACKAGE_PREFIX', '/usr') -+polkit_agent_helper_1_path = get_option('polkit_agent_helper_1_path') -+foreach p : [ '/usr/libexec/polkit-agent-helper-1', -+ '/usr/lib/polkit-1/polkit-agent-helper-1', -+ '/usr/lib/policykit-1/polkit-agent-helper-1' ] -+ if polkit_agent_helper_1_path == '' and run_command('test', '-f', p).returncode() == 0 -+ polkit_agent_helper_1_path = p -+ endif -+endforeach -+if polkit_agent_helper_1_path == '' -+ polkit_agent_helper_1_path = '/usr/lib/polkit-1/polkit-agent-helper-1' - endif -+config_h.set_quoted('POLKIT_AGENT_HELPER_1_PATH', polkit_agent_helper_1_path) - - - crypto = get_option('crypto') -@@ -1016,6 +1022,7 @@ if enable_polkit - output += ' modify.system)' - endif - output += '\n' -+output += ' polkit-agent-helper-1: ' + polkit_agent_helper_1_path + '\n' - output += ' selinux: ' + enable_selinux.to_string() + '\n' - output += ' systemd-journald: ' + enable_systemd_journal.to_string() + ' (default: logging.backend=' + config_logging_backend_default + ')\n' - output += ' hostname persist: ' + hostname_persist + '\n' -diff --git a/meson_options.txt b/meson_options.txt -index d4f6282..71de320 100644 ---- a/meson_options.txt -+++ b/meson_options.txt -@@ -16,7 +16,7 @@ option('suspend_resume', type: 'combo', choices: ['upower', 'systemd', 'elogind' - option('polkit', type: 'boolean', value: true, description: 'User auth-polkit configuration option.') - option('config_auth_polkit_default', type: 'combo', choices: ['default', 'true', 'false', 'root-only'], value: 'default', description: 'Default value for configuration main.auth-polkit.') - option('modify_system', type: 'boolean', value: false, description: 'Allow users to modify system connections') --option('polkit_agent', type: 'boolean', value: false, description: 'enable polkit agent for clients') -+option('polkit_agent_helper_1_path', type: 'string', value: '', description: 'Path name to the polkit-agent-helper-1 binary from polkit') - option('selinux', type: 'boolean', value: true, description: 'Build with SELinux') - option('systemd_journal', type: 'boolean', value: true, description: 'Use systemd journal for logging') - option('config_logging_backend_default', type: 'combo', choices: ['default', 'syslog', 'journal'], value: 'default', description: 'Default value for logging.backend') diff --git a/debian/patches/build-rename-build-option-with-polkit-agent-helper-1-path.patch b/debian/patches/build-rename-build-option-with-polkit-agent-helper-1-path.patch deleted file mode 100644 index 6693f3cb..00000000 --- a/debian/patches/build-rename-build-option-with-polkit-agent-helper-1-path.patch +++ /dev/null @@ -1,75 +0,0 @@ -From: Thomas Haller -Date: Tue, 16 Feb 2021 21:33:30 +0100 -Subject: build: rename build option "--with-polkit-agent-helper-1{-path,}" - -Suggested-by: Michael Biebl -(cherry picked from commit d9968b133b32fbfbc5e726a8fc96e38cc044c831) ---- - configure.ac | 9 ++++++--- - meson.build | 5 ++++- - meson_options.txt | 2 +- - 3 files changed, 11 insertions(+), 5 deletions(-) - -diff --git a/configure.ac b/configure.ac -index 5e7d67c..9d37ce6 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -642,9 +642,9 @@ fi - AC_DEFINE_UNQUOTED(NM_CONFIG_DEFAULT_MAIN_AUTH_POLKIT, "$enable_polkit", [The default value of the auth-polkit configuration option]) - AC_SUBST(NM_CONFIG_DEFAULT_MAIN_AUTH_POLKIT_TEXT, "$enable_polkit") - --AC_ARG_WITH([polkit-agent-helper-1-path], -- AS_HELP_STRING([--with-polkit-agent-helper-1-path=PATH], -- [Path name to the polkit-agent-helper-1 binary from polkit]), -+AC_ARG_WITH([polkit-agent-helper-1], -+ AS_HELP_STRING([--with-polkit-agent-helper-1=/path/to/polkit-agent-helper-1], -+ [Path to the polkit-agent-helper-1 binary from polkit]), - POLKIT_AGENT_HELPER_1_PATH="$withval", - POLKIT_AGENT_HELPER_1_PATH="") - if test -z "$POLKIT_AGENT_HELPER_1_PATH" ; then -@@ -658,6 +658,9 @@ if test -z "$POLKIT_AGENT_HELPER_1_PATH" ; then - done - fi - test -z "$POLKIT_AGENT_HELPER_1_PATH" && POLKIT_AGENT_HELPER_1_PATH=/usr/lib/polkit-1/polkit-agent-helper-1 -+if test "$POLKIT_AGENT_HELPER_1_PATH" = "${POLKIT_AGENT_HELPER_1_PATH#/}" ; then -+ AC_MSG_ERROR(["polkit_agent_helper_1 must be an absolute path, but is '$POLKIT_AGENT_HELPER_1_PATH'"]) -+fi - AC_DEFINE_UNQUOTED([POLKIT_AGENT_HELPER_1_PATH], - ["$POLKIT_AGENT_HELPER_1_PATH"], - [path to polkit-agent-helper-1 binary]) -diff --git a/meson.build b/meson.build -index bf6055b..1bfe202 100644 ---- a/meson.build -+++ b/meson.build -@@ -514,7 +514,7 @@ config_h.set_quoted('NM_CONFIG_DEFAULT_MAIN_AUTH_POLKIT', config_auth_polkit_def - - enable_modify_system = get_option('modify_system') - --polkit_agent_helper_1_path = get_option('polkit_agent_helper_1_path') -+polkit_agent_helper_1_path = get_option('polkit_agent_helper_1') - foreach p : [ '/usr/libexec/polkit-agent-helper-1', - '/usr/lib/polkit-1/polkit-agent-helper-1', - '/usr/lib/policykit-1/polkit-agent-helper-1' ] -@@ -525,6 +525,9 @@ endforeach - if polkit_agent_helper_1_path == '' - polkit_agent_helper_1_path = '/usr/lib/polkit-1/polkit-agent-helper-1' - endif -+if polkit_agent_helper_1_path[0] != '/' -+ error('polkit_agent_helper_1 must be an absolute path, but is ' + polkit_agent_helper_1_path) -+endif - config_h.set_quoted('POLKIT_AGENT_HELPER_1_PATH', polkit_agent_helper_1_path) - - -diff --git a/meson_options.txt b/meson_options.txt -index 71de320..5100ed7 100644 ---- a/meson_options.txt -+++ b/meson_options.txt -@@ -16,7 +16,7 @@ option('suspend_resume', type: 'combo', choices: ['upower', 'systemd', 'elogind' - option('polkit', type: 'boolean', value: true, description: 'User auth-polkit configuration option.') - option('config_auth_polkit_default', type: 'combo', choices: ['default', 'true', 'false', 'root-only'], value: 'default', description: 'Default value for configuration main.auth-polkit.') - option('modify_system', type: 'boolean', value: false, description: 'Allow users to modify system connections') --option('polkit_agent_helper_1_path', type: 'string', value: '', description: 'Path name to the polkit-agent-helper-1 binary from polkit') -+option('polkit_agent_helper_1', type: 'string', value: '', description: 'Path name to the polkit-agent-helper-1 binary from polkit') - option('selinux', type: 'boolean', value: true, description: 'Build with SELinux') - option('systemd_journal', type: 'boolean', value: true, description: 'Use systemd journal for logging') - option('config_logging_backend_default', type: 'combo', choices: ['default', 'syslog', 'journal'], value: 'default', description: 'Default value for logging.backend') diff --git a/debian/patches/iwd-Fix-the-leaks-in-get_agent_request_network_path.patch b/debian/patches/iwd-Fix-the-leaks-in-get_agent_request_network_path.patch deleted file mode 100644 index 31e60ae1..00000000 --- a/debian/patches/iwd-Fix-the-leaks-in-get_agent_request_network_path.patch +++ /dev/null @@ -1,38 +0,0 @@ -From: Andrew Zaborowski -Date: Fri, 12 Feb 2021 11:04:26 +0100 -Subject: iwd: Fix the leaks in get_agent_request_network_path - -Don't request new copies of strings from g_variant_get() to avoid -leaking memory as pointed out by Thomas Haller. - -Fixes: dc0e31fb7014 ('iwd: Add the wifi.iwd.autoconnect setting') -(cherry picked from commit 5ccb8ce17a161fa7e926a1644a4c1aadbf74c002) ---- - src/core/devices/wifi/nm-device-iwd.c | 12 +++++------- - 1 file changed, 5 insertions(+), 7 deletions(-) - -diff --git a/src/core/devices/wifi/nm-device-iwd.c b/src/core/devices/wifi/nm-device-iwd.c -index f0de90d..95ade44 100644 ---- a/src/core/devices/wifi/nm-device-iwd.c -+++ b/src/core/devices/wifi/nm-device-iwd.c -@@ -1282,15 +1282,13 @@ get_agent_request_network_path(GDBusMethodInvocation *invocation) - const char *network_path = NULL; - - if (nm_streq(method_name, "RequestPassphrase")) -- g_variant_get(params, "(o)", &network_path); -+ g_variant_get(params, "(&o)", &network_path); - else if (nm_streq(method_name, "RequestPrivateKeyPassphrase")) -- g_variant_get(params, "(o)", &network_path); -+ g_variant_get(params, "(&o)", &network_path); - else if (nm_streq(method_name, "RequestUserNameAndPassword")) -- g_variant_get(params, "(o)", &network_path); -- else if (nm_streq(method_name, "RequestUserPassword")) { -- const char *user; -- g_variant_get(params, "(os)", &network_path, &user); -- } -+ g_variant_get(params, "(&o)", &network_path); -+ else if (nm_streq(method_name, "RequestUserPassword")) -+ g_variant_get(params, "(&os)", &network_path, NULL); - - return network_path; - } diff --git a/debian/patches/libnm-add-assertion-in-_dbus_handle_properties_changed.patch b/debian/patches/libnm-add-assertion-in-_dbus_handle_properties_changed.patch deleted file mode 100644 index 1cfefd48..00000000 --- a/debian/patches/libnm-add-assertion-in-_dbus_handle_properties_changed.patch +++ /dev/null @@ -1,21 +0,0 @@ -From: Thomas Haller -Date: Mon, 15 Feb 2021 09:59:53 +0100 -Subject: libnm: add assertion in _dbus_handle_properties_changed() - -(cherry picked from commit 3ceec9c6ac399b849fcabc52cf58e9001a6b8684) ---- - libnm/nm-client.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/libnm/nm-client.c b/libnm/nm-client.c -index 92ad5ef..f1b2597 100644 ---- a/libnm/nm-client.c -+++ b/libnm/nm-client.c -@@ -2959,6 +2959,7 @@ _dbus_handle_properties_changed(NMClient * self, - dbobj = _dbobjs_dbobj_create(self, g_steal_pointer(&dbus_path)); - nml_dbus_object_set_obj_state(dbobj, NML_DBUS_OBJ_STATE_ON_DBUS, self); - db_iface_data = nml_dbus_object_iface_data_get(dbobj, interface_name, TRUE); -+ nm_assert(db_iface_data); - } - - NM_SET_OUT(inout_dbobj, dbobj); diff --git a/debian/patches/libnm-avoid-assertion-failure-in-_dbus_handle_properties_.patch b/debian/patches/libnm-avoid-assertion-failure-in-_dbus_handle_properties_.patch deleted file mode 100644 index e6f9209a..00000000 --- a/debian/patches/libnm-avoid-assertion-failure-in-_dbus_handle_properties_.patch +++ /dev/null @@ -1,32 +0,0 @@ -From: Thomas Haller -Date: Mon, 15 Feb 2021 09:11:42 +0100 -Subject: libnm: avoid assertion failure in _dbus_handle_properties_changed() - for logging no properties - -(cherry picked from commit 1f9622358a691aa97b72b3df118feac7970769c4) ---- - libnm/nm-client.c | 8 ++++++-- - 1 file changed, 6 insertions(+), 2 deletions(-) - -diff --git a/libnm/nm-client.c b/libnm/nm-client.c -index 2c77519..ec79b40 100644 ---- a/libnm/nm-client.c -+++ b/libnm/nm-client.c -@@ -2930,11 +2930,15 @@ _dbus_handle_properties_changed(NMClient * self, - gs_free char *ss = NULL; - - NML_NMCLIENT_LOG_T(self, -- "[%s]: %s: properties changed for interface %s { %s }", -+ "[%s]: %s: properties changed for interface %s %s%s%s", - object_path, - log_context, - interface_name, -- (ss = g_variant_print(changed_properties, TRUE))); -+ NM_PRINT_FMT_QUOTED(changed_properties, -+ "{ ", -+ (ss = g_variant_print(changed_properties, TRUE)), -+ " }", -+ "(no changed properties)")); - } - - if (inout_dbobj) { diff --git a/debian/patches/libnm-fix-tracking-object-state-in-NMClient-cache.patch b/debian/patches/libnm-fix-tracking-object-state-in-NMClient-cache.patch deleted file mode 100644 index 722e7fef..00000000 --- a/debian/patches/libnm-fix-tracking-object-state-in-NMClient-cache.patch +++ /dev/null @@ -1,102 +0,0 @@ -From: Thomas Haller -Date: Mon, 15 Feb 2021 09:17:07 +0100 -Subject: libnm: fix tracking object state in NMClient cache - -NMClient has a NMLDBusObject instance for each D-Bus object -that it sees. This object can be in different states, like that we -already saw it on D-Bus or that it is only referred to by another -property. Due to a bug, we would wrongly not update the state and -trigger an assertion. - -Reproduce with python-dbusmock (commit e89e28bf1bc0254a1eb71b71cf68ef7a97d11e5b) -by running `pytest -v -s tests/test_networkmanager.py -k test_one_wifi_with_accesspoints`. -With LIBNM_CLIENT_DEBUG we get: - ->>> libnm-dbus[96085]: [6464.06459] nmclient[c9bf1eaa1f4b6c99]: [/org/freedesktop/NetworkManager/Devices/mock_WiFi2]: properties-changed: properties changed for interface org.freedesktop.NetworkManager.Device { {'ActiveConnection': } } - libnm-dbus[96085]: [6464.06459] nmclient[c9bf1eaa1f4b6c99]: [/org/freedesktop/NetworkManager/Devices/mock_WiFi2]: properties-changed: set property org.freedesktop.NetworkManager.Device.ActiveConnection - libnm-dbus[96085]: [6464.06459] nmclient[c9bf1eaa1f4b6c99]: [/org/freedesktop/NetworkManager/Devices/mock_WiFi2]: changed-type 0x01 linked - libnm-dbus[96085]: [6464.06459] nmclient[c9bf1eaa1f4b6c99]: [/org/freedesktop/NetworkManager/Devices/mock_WiFi2]: changed-type 0x01 consumed ->>> libnm-dbus[96085]: [6464.06459] nmclient[c9bf1eaa1f4b6c99]: [/org/freedesktop/NetworkManager/ActiveConnection/0]: set D-Bus object state watched-only - libnm-dbus[96085]: [6464.06459] nmclient[c9bf1eaa1f4b6c99]: [/org/freedesktop/NetworkManager/Devices/mock_WiFi2]: changed-type 0x02 linked - libnm-dbus[96085]: [6464.06459] nmclient[c9bf1eaa1f4b6c99]: [/org/freedesktop/NetworkManager]: changed-type 0x02 linked - libnm-dbus[96085]: [6464.06459] nmclient[c9bf1eaa1f4b6c99]: [/org/freedesktop/NetworkManager/Devices/mock_WiFi2]: changed-type 0x02 consumed ->>> libnm-dbus[96085]: [6464.06459] nmclient[c9bf1eaa1f4b6c99]: [/org/freedesktop/NetworkManager/Devices/mock_WiFi2]: property ActiveConnection references /org/freedesktop/NetworkManager/ActiveConnection/0 but object is not present on D-Bus - libnm-dbus[96085]: [6464.06459] nmclient[c9bf1eaa1f4b6c99]: [/org/freedesktop/NetworkManager]: changed-type 0x02 consumed - libnm-dbus[96085]: [6464.06460] nmclient[c9bf1eaa1f4b6c99]: [/org/freedesktop/NetworkManager/Devices/mock_WiFi2]: properties-changed: properties changed for interface org.freedesktop.NetworkManager.Device { {'State': } } - libnm-dbus[96085]: [6464.06460] nmclient[c9bf1eaa1f4b6c99]: [/org/freedesktop/NetworkManager/Devices/mock_WiFi2]: properties-changed: set property org.freedesktop.NetworkManager.Device.State - libnm-dbus[96085]: [6464.06460] nmclient[c9bf1eaa1f4b6c99]: [/org/freedesktop/NetworkManager/Devices/mock_WiFi2]: changed-type 0x01 linked - libnm-dbus[96085]: [6464.06460] nmclient[c9bf1eaa1f4b6c99]: [/org/freedesktop/NetworkManager/Devices/mock_WiFi2]: changed-type 0x01 consumed - libnm-dbus[96085]: [6464.06460] nmclient[c9bf1eaa1f4b6c99]: [/org/freedesktop/NetworkManager/Devices/mock_WiFi2]: changed-type 0x02 linked - libnm-dbus[96085]: [6464.06460] nmclient[c9bf1eaa1f4b6c99]: [/org/freedesktop/NetworkManager]: changed-type 0x02 linked - libnm-dbus[96085]: [6464.06461] nmclient[c9bf1eaa1f4b6c99]: [/org/freedesktop/NetworkManager/Devices/mock_WiFi2]: changed-type 0x02 consumed - libnm-dbus[96085]: [6464.06461] nmclient[c9bf1eaa1f4b6c99]: [/org/freedesktop/NetworkManager]: changed-type 0x02 consumed - libnm-dbus[96085]: [6464.06462] nmclient[c9bf1eaa1f4b6c99]: [/org/freedesktop/NetworkManager/Devices/mock_WiFi2]: properties-changed: properties changed for interface org.freedesktop.NetworkManager.Device { {'StateReason': <(uint32 100, uint32 0)>} } - libnm-dbus[96085]: [6464.06462] nmclient[c9bf1eaa1f4b6c99]: [/org/freedesktop/NetworkManager/Devices/mock_WiFi2]: properties-changed: set property org.freedesktop.NetworkManager.Device.StateReason - libnm-dbus[96085]: [6464.06462] nmclient[c9bf1eaa1f4b6c99]: [/org/freedesktop/NetworkManager/Devices/mock_WiFi2]: changed-type 0x01 linked - libnm-dbus[96085]: [6464.06462] nmclient[c9bf1eaa1f4b6c99]: [/org/freedesktop/NetworkManager/Devices/mock_WiFi2]: changed-type 0x01 consumed - libnm-dbus[96085]: [6464.06462] nmclient[c9bf1eaa1f4b6c99]: [/org/freedesktop/NetworkManager/Devices/mock_WiFi2]: changed-type 0x02 linked - libnm-dbus[96085]: [6464.06462] nmclient[c9bf1eaa1f4b6c99]: [/org/freedesktop/NetworkManager]: changed-type 0x02 linked - libnm-dbus[96085]: [6464.06462] nmclient[c9bf1eaa1f4b6c99]: [/org/freedesktop/NetworkManager/Devices/mock_WiFi2]: changed-type 0x02 consumed - libnm-dbus[96085]: [6464.06462] nmclient[c9bf1eaa1f4b6c99]: [/org/freedesktop/NetworkManager]: changed-type 0x02 consumed ->>> libnm-dbus[96085]: [6464.06465] nmclient[c9bf1eaa1f4b6c99]: [/org/freedesktop/NetworkManager/ActiveConnection/0]: interfaces-added: properties changed for interface org.freedesktop.NetworkManager.Connection.Active { {'Devices': <[objectpath '/org/freedesktop/NetworkManager/Devices/mock_WiFi2']>, 'Default6': , 'Default': , 'Type': <'802-11-wireless'>, 'Vpn': , 'Connection': , 'Master': , 'SpecificObject': , 'Uuid': <'72757a57-8cb6-4052-a18f-4e2be4ba27d9'>, 'State': , 'Id': <'AP_3'>} } ->>> here we lack "set D-Bus object state on-dbus" - libnm-dbus[96085]: [6464.06465] nmclient[c9bf1eaa1f4b6c99]: [/org/freedesktop/NetworkManager/ActiveConnection/0]: interfaces-added: set property org.freedesktop.NetworkManager.Connection.Active.Devices - libnm-dbus[96085]: [6464.06465] nmclient[c9bf1eaa1f4b6c99]: [/org/freedesktop/NetworkManager/ActiveConnection/0]: interfaces-added: set property org.freedesktop.NetworkManager.Connection.Active.Default6 - libnm-dbus[96085]: [6464.06465] nmclient[c9bf1eaa1f4b6c99]: [/org/freedesktop/NetworkManager/ActiveConnection/0]: interfaces-added: set property org.freedesktop.NetworkManager.Connection.Active.Default - libnm-dbus[96085]: [6464.06465] nmclient[c9bf1eaa1f4b6c99]: [/org/freedesktop/NetworkManager/ActiveConnection/0]: interfaces-added: set property org.freedesktop.NetworkManager.Connection.Active.Type - libnm-dbus[96085]: [6464.06465] nmclient[c9bf1eaa1f4b6c99]: [/org/freedesktop/NetworkManager/ActiveConnection/0]: interfaces-added: set property org.freedesktop.NetworkManager.Connection.Active.Vpn - libnm-dbus[96085]: [6464.06465] nmclient[c9bf1eaa1f4b6c99]: [/org/freedesktop/NetworkManager/ActiveConnection/0]: interfaces-added: set property org.freedesktop.NetworkManager.Connection.Active.Connection - libnm-dbus[96085]: [6464.06465] nmclient[c9bf1eaa1f4b6c99]: [/org/freedesktop/NetworkManager/ActiveConnection/0]: interfaces-added: set property org.freedesktop.NetworkManager.Connection.Active.Master - libnm-dbus[96085]: [6464.06465] nmclient[c9bf1eaa1f4b6c99]: [/org/freedesktop/NetworkManager/ActiveConnection/0]: interfaces-added: set property org.freedesktop.NetworkManager.Connection.Active.SpecificObject - libnm-dbus[96085]: [6464.06466] nmclient[c9bf1eaa1f4b6c99]: [/org/freedesktop/NetworkManager/ActiveConnection/0]: interfaces-added: set property org.freedesktop.NetworkManager.Connection.Active.Uuid - libnm-dbus[96085]: [6464.06466] nmclient[c9bf1eaa1f4b6c99]: [/org/freedesktop/NetworkManager/ActiveConnection/0]: interfaces-added: set property org.freedesktop.NetworkManager.Connection.Active.State - libnm-dbus[96085]: [6464.06466] nmclient[c9bf1eaa1f4b6c99]: [/org/freedesktop/NetworkManager/ActiveConnection/0]: interfaces-added: set property org.freedesktop.NetworkManager.Connection.Active.Id - libnm-dbus[96085]: [6464.06466] nmclient[c9bf1eaa1f4b6c99]: [/org/freedesktop/NetworkManager/ActiveConnection/0]: changed-type 0x01 linked - libnm-dbus[96085]: [6464.06466] nmclient[c9bf1eaa1f4b6c99]: [/org/freedesktop/NetworkManager/ActiveConnection/0]: changed-type 0x01 consumed - Bail out! libnm:ERROR:libnm/nm-client.c:2863:_dbus_handle_obj_changed_dbus: assertion failed: (dbobj->obj_state >= NML_DBUS_OBJ_STATE_ON_DBUS) - -Backtrace: - - #3 0x00007f0bd11173bf in g_assertion_message_expr - (domain=domain@entry=0x7f0bd1576018 "libnm", file=file@entry=0x7f0bd1576006 "libnm/nm-client.c", line=line@entry=2863, func=func@entry=0x7f0bd157f1b0 <__func__.170> "_dbus_handle_obj_changed_dbus", expr=expr@entry=0x7f0bd157cba0 "dbobj->obj_state >= NML_DBUS_OBJ_STATE_ON_DBUS") at ../glib/gtestutils.c:2963 - #4 0x00007f0bd14959dd in _dbus_handle_obj_changed_dbus (self=self@entry=0x5612d4f5a130, log_context=) at libnm/nm-client.c:2863 - #5 0x00007f0bd1495c29 in _dbus_handle_changes (self=self@entry=0x5612d4f5a130, log_context=, allow_init_start_check_complete=allow_init_start_check_complete@entry=1) - at libnm/nm-client.c:2909 - #6 0x00007f0bd1497e56 in _dbus_managed_objects_changed_cb - (connection=, sender_name=, arg_object_path=, interface_name=, signal_name=, parameters=0x7f0bb800d720, user_data=0x5612d4f5a130) at libnm/nm-client.c:3172 - #7 0x00007f0bd132a8df in emit_signal_instance_in_idle_cb (data=data@entry=0x7f0bb8003700) at ../gio/gdbusconnection.c:3789 - #8 0x00007f0bd10f1b5b in g_idle_dispatch (source=source@entry=0x7f0bb8012260, callback=0x7f0bd132a860 , user_data=0x7f0bb8003700) at ../glib/gmain.c:5836 - #9 0x00007f0bd10f2a9f in g_main_dispatch (context=0x5612d4f4b630) at ../glib/gmain.c:3325 - #10 g_main_context_dispatch (context=0x5612d4f4b630) at ../glib/gmain.c:4043 - #11 0x00007f0bd1144a98 in g_main_context_iterate.constprop.0 (context=0x5612d4f4b630, block=block@entry=1, dispatch=dispatch@entry=1, self=) at ../glib/gmain.c:4119 - #12 0x00007f0bd10f2163 in g_main_loop_run (loop=0x5612d4f4b720) at ../glib/gmain.c:4317 - #13 0x00005612d44b6543 in main (argc=7, argv=0x7fff4414f1d8) at clients/cli/nmcli.c:1036 - -https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=982613 -https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/issues/662 - -Fixes: ce0e898fb476 ('libnm: refactor caching of D-Bus objects in NMClient') -(cherry picked from commit e1e9abdf041b4cc95fb1936b75ced7669f3d7867) ---- - libnm/nm-client.c | 7 +++++-- - 1 file changed, 5 insertions(+), 2 deletions(-) - -diff --git a/libnm/nm-client.c b/libnm/nm-client.c -index ec79b40..92ad5ef 100644 ---- a/libnm/nm-client.c -+++ b/libnm/nm-client.c -@@ -2950,9 +2950,12 @@ _dbus_handle_properties_changed(NMClient * self, - dbobj = _dbobjs_dbobj_get_r(self, dbus_path); - } - -- if (dbobj) -+ if (dbobj) { -+ nm_assert(dbobj->obj_state >= NML_DBUS_OBJ_STATE_WATCHED_ONLY); - db_iface_data = nml_dbus_object_iface_data_get(dbobj, interface_name, allow_add_iface); -- else if (allow_add_iface) { -+ if (db_iface_data && dbobj->obj_state == NML_DBUS_OBJ_STATE_WATCHED_ONLY) -+ nml_dbus_object_set_obj_state(dbobj, NML_DBUS_OBJ_STATE_ON_DBUS, self); -+ } else if (allow_add_iface) { - dbobj = _dbobjs_dbobj_create(self, g_steal_pointer(&dbus_path)); - nml_dbus_object_set_obj_state(dbobj, NML_DBUS_OBJ_STATE_ON_DBUS, self); - db_iface_data = nml_dbus_object_iface_data_get(dbobj, interface_name, TRUE); diff --git a/debian/patches/libnm-log-PID-in-LIBNM_CLIENT_DEBUG-debug-logging.patch b/debian/patches/libnm-log-PID-in-LIBNM_CLIENT_DEBUG-debug-logging.patch deleted file mode 100644 index cf932651..00000000 --- a/debian/patches/libnm-log-PID-in-LIBNM_CLIENT_DEBUG-debug-logging.patch +++ /dev/null @@ -1,42 +0,0 @@ -From: Thomas Haller -Date: Mon, 15 Feb 2021 08:47:16 +0100 -Subject: libnm: log PID in LIBNM_CLIENT_DEBUG debug logging - -(cherry picked from commit 6da5fc59d860913a278f488f0873ce68f038de2b) ---- - libnm/nm-libnm-utils.c | 9 +++++++-- - 1 file changed, 7 insertions(+), 2 deletions(-) - -diff --git a/libnm/nm-libnm-utils.c b/libnm/nm-libnm-utils.c -index 1fb6a47..1000e04 100644 ---- a/libnm/nm-libnm-utils.c -+++ b/libnm/nm-libnm-utils.c -@@ -46,6 +46,7 @@ _nml_dbus_log(NMLDBusLogLevel level, gboolean use_stdout, const char *fmt, ...) - va_list args; - const char * prefix = ""; - gint64 ts; -+ pid_t pid; - - /* we only call _nml_dbus_log() after nml_dbus_log_enabled(), which already does - * an atomic access to the variable. Since the value is only initialized once and -@@ -89,14 +90,18 @@ _nml_dbus_log(NMLDBusLogLevel level, gboolean use_stdout, const char *fmt, ...) - - ts = nm_utils_clock_gettime_nsec(CLOCK_BOOTTIME); - -+ pid = getpid(); -+ - if (use_stdout) { -- g_print("libnm-dbus: %s[%" G_GINT64_FORMAT ".%05" G_GINT64_FORMAT "] %s\n", -+ g_print("libnm-dbus[%lld]: %s[%" G_GINT64_FORMAT ".%05" G_GINT64_FORMAT "] %s\n", -+ (long long) pid, - prefix, - ts / NM_UTILS_NSEC_PER_SEC, - (ts / (NM_UTILS_NSEC_PER_SEC / 10000)) % 10000, - msg); - } else { -- g_printerr("libnm-dbus: %s[%" G_GINT64_FORMAT ".%05" G_GINT64_FORMAT "] %s\n", -+ g_printerr("libnm-dbus[%lld]: %s[%" G_GINT64_FORMAT ".%05" G_GINT64_FORMAT "] %s\n", -+ (long long) pid, - prefix, - ts / NM_UTILS_NSEC_PER_SEC, - (ts / (NM_UTILS_NSEC_PER_SEC / 10000)) % 10000, diff --git a/debian/patches/platform-downgrade-severity-of-message-for-failure-to-cre.patch b/debian/patches/platform-downgrade-severity-of-message-for-failure-to-cre.patch deleted file mode 100644 index c6acda06..00000000 --- a/debian/patches/platform-downgrade-severity-of-message-for-failure-to-cre.patch +++ /dev/null @@ -1,37 +0,0 @@ -From: Thomas Haller -Date: Mon, 15 Feb 2021 20:52:55 +0100 -Subject: platform: downgrade severity of message for failure to create - NMPNetns - -Under restricted permissions (like inside a podman container) opening -"/proc/self/ns/net" fails with Permission denied. Consequently we cannot -create our bottom NMPNetns instance. That is mostly fine, however we -would log an error message with severity . - -Note that test "src/core/platform/tests/test-platform-general" asserts -that no and messages get logged. Hence, the test will -fail. - -That is undesirable. Downgrade the message to so that the test -passes. Also, it's not clear that this error message is useful here. -Being unable to open a netns fd is fine and not necessarily an error -condition. - -(cherry picked from commit 0213300dcee438a0b48a3d3a6da3112286ad43d1) ---- - shared/nm-platform/nmp-netns.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/shared/nm-platform/nmp-netns.c b/shared/nm-platform/nmp-netns.c -index 0828f4a..f97339a75 100644 ---- a/shared/nm-platform/nmp-netns.c -+++ b/shared/nm-platform/nmp-netns.c -@@ -171,7 +171,7 @@ _netns_stack_get_impl(void) - netns = _netns_new(&error); - - if (!netns) { -- _LOGE(NULL, "failed to create initial netns: %s", error->message); -+ _LOGD(NULL, "failed to create initial netns: %s", error->message); - return s; - } - diff --git a/debian/patches/platform-ensure-NM_SOCK_ADDR_UNION_INIT_UNSPEC-fully-init.patch b/debian/patches/platform-ensure-NM_SOCK_ADDR_UNION_INIT_UNSPEC-fully-init.patch deleted file mode 100644 index be47404a..00000000 --- a/debian/patches/platform-ensure-NM_SOCK_ADDR_UNION_INIT_UNSPEC-fully-init.patch +++ /dev/null @@ -1,35 +0,0 @@ -From: Thomas Haller -Date: Sat, 13 Feb 2021 15:45:44 +0100 -Subject: platform: ensure NM_SOCK_ADDR_UNION_INIT_UNSPEC() fully initializes - union - -In C, initialization of a union does not define that excess memory -is initialized. Ensure that, by initializing the largest member of the -NMSockAddrUnion union. - -(cherry picked from commit 7bf2ddf73f8d8c2d882c4932e88b76eef337cd0a) ---- - src/core/platform/nmp-object.h | 8 ++++++-- - 1 file changed, 6 insertions(+), 2 deletions(-) - -diff --git a/src/core/platform/nmp-object.h b/src/core/platform/nmp-object.h -index dc2cc86..19f6bcd 100644 ---- a/src/core/platform/nmp-object.h -+++ b/src/core/platform/nmp-object.h -@@ -34,10 +34,14 @@ typedef union { - struct sockaddr_in6 in6; - } NMSockAddrUnion; - -+G_STATIC_ASSERT(sizeof(NMSockAddrUnion) == sizeof(((NMSockAddrUnion *) NULL)->in6)); -+ -+/* we initialize the largest union member, to ensure that all fields are initialized. */ -+ - #define NM_SOCK_ADDR_UNION_INIT_UNSPEC \ - { \ -- .sa = { \ -- .sa_family = AF_UNSPEC, \ -+ .in6 = { \ -+ .sin6_family = AF_UNSPEC, \ - }, \ - } - diff --git a/debian/patches/platform-reorder-code-in-_netns_stack_get_impl.patch b/debian/patches/platform-reorder-code-in-_netns_stack_get_impl.patch deleted file mode 100644 index d68983af..00000000 --- a/debian/patches/platform-reorder-code-in-_netns_stack_get_impl.patch +++ /dev/null @@ -1,51 +0,0 @@ -From: Thomas Haller -Date: Mon, 15 Feb 2021 20:45:21 +0100 -Subject: platform: reorder code in _netns_stack_get_impl() - -We should always register the GArray stack with pthread -for cleanup the thread local storage. Do that first, before -creating the NMPNetns instance at the bottom of the stack. - -(cherry picked from commit f9636080ace7d7834083dcb1a3300e08368ee4eb) ---- - shared/nm-platform/nmp-netns.c | 17 +++++++++-------- - 1 file changed, 9 insertions(+), 8 deletions(-) - -diff --git a/shared/nm-platform/nmp-netns.c b/shared/nm-platform/nmp-netns.c -index c7cb617..0828f4a 100644 ---- a/shared/nm-platform/nmp-netns.c -+++ b/shared/nm-platform/nmp-netns.c -@@ -158,9 +158,18 @@ _netns_stack_get_impl(void) - g_array_set_clear_func(s, _netns_stack_clear_cb); - _netns_stack = s; - -+ /* register a destructor function to cleanup the array. If we fail -+ * to do so, we will leak NMPNetns instances (and their file descriptor) when the -+ * thread exits. */ -+ if (pthread_key_create(&key, (void (*)(void *)) g_array_unref) != 0) -+ _LOGE(NULL, "failure to initialize thread-local storage"); -+ else if (pthread_setspecific(key, s) != 0) -+ _LOGE(NULL, "failure to set thread-local storage"); -+ - /* at the bottom of the stack we must try to create a netns instance - * that we never pop. It's the base to which we need to return. */ - netns = _netns_new(&error); -+ - if (!netns) { - _LOGE(NULL, "failed to create initial netns: %s", error->message); - return s; -@@ -169,14 +178,6 @@ _netns_stack_get_impl(void) - /* we leak this instance inside the stack. */ - _stack_push(s, netns, _CLONE_NS_ALL); - -- /* finally, register a destructor function to cleanup the array. If we fail -- * to do so, we will leak NMPNetns instances (and their file descriptor) when the -- * thread exits. */ -- if (pthread_key_create(&key, (void (*)(void *)) g_array_unref) != 0) -- _LOGE(NULL, "failure to initialize thread-local storage"); -- else if (pthread_setspecific(key, s) != 0) -- _LOGE(NULL, "failure to set thread-local storage"); -- - return s; - } - diff --git a/debian/patches/platform-tests-skip-tests-if-unshare-CLONE_NEWNET-CLONE_N.patch b/debian/patches/platform-tests-skip-tests-if-unshare-CLONE_NEWNET-CLONE_N.patch deleted file mode 100644 index 027f4f32..00000000 --- a/debian/patches/platform-tests-skip-tests-if-unshare-CLONE_NEWNET-CLONE_N.patch +++ /dev/null @@ -1,42 +0,0 @@ -From: Thomas Haller -Date: Mon, 15 Feb 2021 20:36:53 +0100 -Subject: platform/tests: skip tests if "unshare(CLONE_NEWNET|CLONE_NEWNS)" - fails - -Inside a podman container (without `--priviledged`) we don't have -permissions for "unshare(CLONE_NEWNET|CLONE_NEWNS)". - -It's not useful to fail tests in environments where they cannot run. -Skip them. - -(cherry picked from commit ecdbb1ab8458b7a373038a2abd8cabd56e664ceb) ---- - src/core/platform/tests/test-common.c | 15 ++++++++++++++- - 1 file changed, 14 insertions(+), 1 deletion(-) - -diff --git a/src/core/platform/tests/test-common.c b/src/core/platform/tests/test-common.c -index 87e5329..4a117d5 100644 ---- a/src/core/platform/tests/test-common.c -+++ b/src/core/platform/tests/test-common.c -@@ -2563,7 +2563,20 @@ main(int argc, char **argv) - - if (unshare(CLONE_NEWNET | CLONE_NEWNS) != 0) { - errsv = errno; -- g_error("unshare(CLONE_NEWNET|CLONE_NEWNS) failed with %s (%d)", -+ if (errsv == EPERM) { -+#ifdef REQUIRE_ROOT_TESTS -+ g_print("Fail test: unshare(CLONE_NEWNET|CLONE_NEWNS) failed with %s (%d)\n", -+ nm_strerror_native(errsv), -+ errsv); -+ return EXIT_FAILURE; -+#else -+ g_print("Skipping test: unshare(CLONE_NEWNET|CLONE_NEWNS) failed with %s (%d)\n", -+ nm_strerror_native(errsv), -+ errsv); -+ return g_test_run(); -+#endif -+ } -+ g_error("Fail test: unshare(CLONE_NEWNET|CLONE_NEWNS) failed with %s (%d)", - nm_strerror_native(errsv), - errsv); - } diff --git a/debian/patches/series b/debian/patches/series index 6ac615dc..a2d7e06d 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,15 +1 @@ Force-online-state-with-unmanaged-devices.patch -build-make-path-to-polkit-agent-helper-1-binary-configura.patch -iwd-Fix-the-leaks-in-get_agent_request_network_path.patch -libnm-log-PID-in-LIBNM_CLIENT_DEBUG-debug-logging.patch -libnm-avoid-assertion-failure-in-_dbus_handle_properties_.patch -libnm-fix-tracking-object-state-in-NMClient-cache.patch -libnm-add-assertion-in-_dbus_handle_properties_changed.patch -shared-refactor-nm_assert-for-NMRefString.patch -tests-add-bin-sbin-to-PATH-for-unit-tests.patch -platform-tests-skip-tests-if-unshare-CLONE_NEWNET-CLONE_N.patch -platform-reorder-code-in-_netns_stack_get_impl.patch -platform-downgrade-severity-of-message-for-failure-to-cre.patch -platform-ensure-NM_SOCK_ADDR_UNION_INIT_UNSPEC-fully-init.patch -wireguard-prefer-last-resolved-IP-from-resolving-endpoint.patch -build-rename-build-option-with-polkit-agent-helper-1-path.patch diff --git a/debian/patches/shared-refactor-nm_assert-for-NMRefString.patch b/debian/patches/shared-refactor-nm_assert-for-NMRefString.patch deleted file mode 100644 index 72d53614..00000000 --- a/debian/patches/shared-refactor-nm_assert-for-NMRefString.patch +++ /dev/null @@ -1,54 +0,0 @@ -From: Thomas Haller -Date: Mon, 15 Feb 2021 10:04:52 +0100 -Subject: shared: refactor nm_assert() for NMRefString - -- also check consistency of the string. - -- disable more expensive check unless running with NM_MORE_ASSERTS>10. - -(cherry picked from commit ac1c66eb343693cb63b8624b4be6088e1583670e) ---- - shared/nm-glib-aux/nm-ref-string.c | 24 ++++++++++++++++-------- - 1 file changed, 16 insertions(+), 8 deletions(-) - -diff --git a/shared/nm-glib-aux/nm-ref-string.c b/shared/nm-glib-aux/nm-ref-string.c -index 902f1c8..1084c47 100644 ---- a/shared/nm-glib-aux/nm-ref-string.c -+++ b/shared/nm-glib-aux/nm-ref-string.c -@@ -49,20 +49,28 @@ _ref_string_equal(gconstpointer pa, gconstpointer pb) - static void - _ASSERT(const RefString *rstr0) - { --#if NM_MORE_ASSERTS - int r; - - nm_assert(rstr0); - -- G_LOCK(gl_lock); -- r = g_atomic_int_get(&rstr0->ref_count); -+ if (NM_MORE_ASSERTS > 0) { -+ r = g_atomic_int_get(&rstr0->ref_count); -+ nm_assert(r > 0); -+ nm_assert(r < G_MAXINT); -+ } - -- nm_assert(r > 0); -- nm_assert(r < G_MAXINT); -+ nm_assert(rstr0->r.str == rstr0->str_data); -+ nm_assert(rstr0->r.str[rstr0->r.len] == '\0'); - -- nm_assert(rstr0 == g_hash_table_lookup(gl_hash, rstr0)); -- G_UNLOCK(gl_lock); --#endif -+ if (NM_MORE_ASSERTS > 10) { -+ G_LOCK(gl_lock); -+ r = g_atomic_int_get(&rstr0->ref_count); -+ nm_assert(r > 0); -+ nm_assert(r < G_MAXINT); -+ -+ nm_assert(rstr0 == g_hash_table_lookup(gl_hash, rstr0)); -+ G_UNLOCK(gl_lock); -+ } - } - - /** diff --git a/debian/patches/tests-add-bin-sbin-to-PATH-for-unit-tests.patch b/debian/patches/tests-add-bin-sbin-to-PATH-for-unit-tests.patch deleted file mode 100644 index 5e0f1733..00000000 --- a/debian/patches/tests-add-bin-sbin-to-PATH-for-unit-tests.patch +++ /dev/null @@ -1,43 +0,0 @@ -From: Thomas Haller -Date: Mon, 15 Feb 2021 13:49:19 +0100 -Subject: tests: add "/bin:/sbin" to "$PATH" for unit tests - -We call `tc` from iproute2, which commonly is at "/sbin/tc". -That might not be in the "$PATH" of a regular user, and consequently -we fail to run the test. - -Work around that by always adding "/bin" and "/sbin" to the $PATH. - -(cherry picked from commit f591aa41c6acb9c890e57c822058b5e47b8aeca6) ---- - shared/nm-utils/nm-test-utils.h | 17 +++++++++++++++++ - 1 file changed, 17 insertions(+) - -diff --git a/shared/nm-utils/nm-test-utils.h b/shared/nm-utils/nm-test-utils.h -index 6b41c11..d51f972 100644 ---- a/shared/nm-utils/nm-test-utils.h -+++ b/shared/nm-utils/nm-test-utils.h -@@ -624,6 +624,23 @@ __nmtst_init(int * argc, - g_setenv("G_MESSAGES_DEBUG", "all", TRUE); - } - -+ /* "tc" is in /sbin, which might not be in $PATH of a regular user. Unconditionally -+ * add "/bin" and "/sbin" to $PATH for all tests. */ -+ { -+ static char *path_new; -+ const char * path_old; -+ -+ g_assert(!path_new); -+ -+ path_old = g_getenv("PATH"); -+ path_new = g_strjoin("", -+ path_old ?: "", -+ (nm_str_is_empty(path_old) ? "" : ":"), -+ "/bin:/sbin", -+ NULL); -+ g_setenv("PATH", path_new, TRUE); -+ } -+ - /* Delay messages until we setup logging. */ - for (i = 0; i < debug_messages->len; i++) - __NMTST_LOG(g_message, "%s", g_array_index(debug_messages, const char *, i)); diff --git a/debian/patches/wireguard-prefer-last-resolved-IP-from-resolving-endpoint.patch b/debian/patches/wireguard-prefer-last-resolved-IP-from-resolving-endpoint.patch deleted file mode 100644 index e61dfc25..00000000 --- a/debian/patches/wireguard-prefer-last-resolved-IP-from-resolving-endpoint.patch +++ /dev/null @@ -1,110 +0,0 @@ -From: Thomas Haller -Date: Sat, 13 Feb 2021 15:47:31 +0100 -Subject: wireguard: prefer last resolved IP from resolving endpoint from DNS - -We periodically re-resolve the DNS name for entpoints. Since WireGuard -has no concept of being connected, we want to eventually pick up -if the DNS name resolves to a different IP address. - -However, on resolution failure, we will never clear the endpoint we -already have. Thus, resolving names can only give a better endpoint, -not remove an IP address entirely. - -DNS names might do Round-Robin load distribution and the name of the -endpoint might resolve to multiple IP addresses. Improve to stick to -the IP address that we already have -- provided that the IP address -is still among the new resolution result. Otherwise, we continue to -pick the first IP address that was resolved. - -(cherry picked from commit 98348ee5396dde5756fbb82ebf16b90790b6b32d) ---- - src/core/devices/nm-device-wireguard.c | 42 +++++++++++++++++++++------------- - 1 file changed, 26 insertions(+), 16 deletions(-) - -diff --git a/src/core/devices/nm-device-wireguard.c b/src/core/devices/nm-device-wireguard.c -index fd057de..5bee09e 100644 ---- a/src/core/devices/nm-device-wireguard.c -+++ b/src/core/devices/nm-device-wireguard.c -@@ -729,7 +729,7 @@ _peers_resolve_cb(GObject *source_object, GAsyncResult *res, gpointer user_data) - PeerData * peer_data; - gs_free_error GError *resolv_error = NULL; - GList * list; -- gboolean changed = FALSE; -+ gboolean changed; - NMSockAddrUnion sockaddr; - gint64 retry_in_msec; - char s_sockaddr[100]; -@@ -775,36 +775,49 @@ _peers_resolve_cb(GObject *source_object, GAsyncResult *res, gpointer user_data) - } - - sockaddr = (NMSockAddrUnion) NM_SOCK_ADDR_UNION_INIT_UNSPEC; -+ changed = FALSE; - - if (!resolv_error) { - GList *iter; - - for (iter = list; iter; iter = iter->next) { -- GInetAddress *a = iter->data; -- GSocketFamily f = g_inet_address_get_family(a); -+ GInetAddress * a = iter->data; -+ NMSockAddrUnion sockaddr_tmp; -+ NMSockAddrUnion *s; - -- if (f == G_SOCKET_FAMILY_IPV4) { -+ s = sockaddr.sa.sa_family == AF_UNSPEC ? &sockaddr : &sockaddr_tmp; -+ -+ switch (g_inet_address_get_family(a)) { -+ case G_SOCKET_FAMILY_IPV4: - nm_assert(g_inet_address_get_native_size(a) == sizeof(struct in_addr)); -- sockaddr.in = (struct sockaddr_in){ -+ s->in = (struct sockaddr_in){ - .sin_family = AF_INET, - .sin_port = htons(nm_sock_addr_endpoint_get_port( - _nm_wireguard_peer_get_endpoint(peer_data->peer))), - }; -- memcpy(&sockaddr.in.sin_addr, g_inet_address_to_bytes(a), sizeof(struct in_addr)); -+ memcpy(&s->in.sin_addr, g_inet_address_to_bytes(a), sizeof(struct in_addr)); - break; -- } -- if (f == G_SOCKET_FAMILY_IPV6) { -+ case G_SOCKET_FAMILY_IPV6: - nm_assert(g_inet_address_get_native_size(a) == sizeof(struct in6_addr)); -- sockaddr.in6 = (struct sockaddr_in6){ -+ s->in6 = (struct sockaddr_in6){ - .sin6_family = AF_INET6, - .sin6_port = htons(nm_sock_addr_endpoint_get_port( - _nm_wireguard_peer_get_endpoint(peer_data->peer))), - .sin6_scope_id = 0, - .sin6_flowinfo = 0, - }; -- memcpy(&sockaddr.in6.sin6_addr, -- g_inet_address_to_bytes(a), -- sizeof(struct in6_addr)); -+ memcpy(&s->in6.sin6_addr, g_inet_address_to_bytes(a), sizeof(struct in6_addr)); -+ break; -+ default: -+ continue; -+ } -+ -+ changed = TRUE; -+ if (peer_data->ep_resolv.sockaddr.sa.sa_family == AF_UNSPEC) -+ break; -+ -+ if (nm_sock_addr_union_cmp(&peer_data->ep_resolv.sockaddr, &sockaddr) == 0) { -+ changed = FALSE; - break; - } - } -@@ -819,11 +832,8 @@ _peers_resolve_cb(GObject *source_object, GAsyncResult *res, gpointer user_data) - * a possibly good IP address, since WireGuard supports automatic roaming - * anyway. Either the IP address is still good (and we would wrongly - * reject it), or it isn't -- in which case it does not hurt much. */ -- } else { -- if (nm_sock_addr_union_cmp(&peer_data->ep_resolv.sockaddr, &sockaddr) != 0) -- changed = TRUE; -+ } else if (changed) - peer_data->ep_resolv.sockaddr = sockaddr; -- } - - if (resolv_error || peer_data->ep_resolv.sockaddr.sa.sa_family == AF_UNSPEC) { - /* while it technically did not fail, something is probably odd. Retry frequently to -- cgit 1.3.0-6-gf8a5 From fd80297a396cc4dd7da4da20208fb360aa369aa7 Mon Sep 17 00:00:00 2001 From: Michael Biebl Date: Thu, 18 Feb 2021 19:25:51 +0100 Subject: Release version 1.30.0-1 to unstable --- debian/changelog | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 44075d4b..44ae3264 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,9 @@ -network-manager (1.30.0-1) UNRELEASED; urgency=medium +network-manager (1.30.0-1) unstable; urgency=medium * New upstream version 1.30.0 + * Rebase patches - -- Michael Biebl Thu, 18 Feb 2021 18:57:10 +0100 + -- Michael Biebl Thu, 18 Feb 2021 19:25:36 +0100 network-manager (1.29.90-2) unstable; urgency=medium -- cgit 1.3.0-6-gf8a5