about summary refs log tree commit diff
path: root/src/libnm-client-impl
diff options
context:
space:
mode:
Diffstat (limited to 'src/libnm-client-impl')
-rw-r--r--src/libnm-client-impl/README.md14
-rw-r--r--src/libnm-client-impl/libnm.ver25
-rw-r--r--src/libnm-client-impl/meson.build13
-rw-r--r--src/libnm-client-impl/nm-conn-utils.c4
-rw-r--r--src/libnm-client-impl/nm-device-ethernet.c14
-rw-r--r--src/libnm-client-impl/tests/meson.build4
-rw-r--r--src/libnm-client-impl/tests/test-libnm.c8
-rw-r--r--src/libnm-client-impl/tests/test-nm-client.c2
8 files changed, 61 insertions, 23 deletions
diff --git a/src/libnm-client-impl/README.md b/src/libnm-client-impl/README.md
new file mode 100644
index 00000000..1ec481c1
--- /dev/null
+++ b/src/libnm-client-impl/README.md
@@ -0,0 +1,14 @@
+libnm-client-impl
+=================
+
+libnm is NetworkManager's client API.
+This API consists of two parts:
+
+- the handling of connections (`NMConnection`), implemented
+  by libnm-core-impl.
+- the caching of D-Bus API (`NMClient`), implemented by
+  libnm-client-impl.
+
+This directory contains the implementation of the second part.
+As such, it will be statically linked with libnm-core-impl
+to make libnm. Also, it cannot be used by the daemon.
diff --git a/src/libnm-client-impl/libnm.ver b/src/libnm-client-impl/libnm.ver
index 5442377a..666a22a8 100644
--- a/src/libnm-client-impl/libnm.ver
+++ b/src/libnm-client-impl/libnm.ver
@@ -1958,6 +1958,7 @@ global:
 	nm_ethtool_optname_is_eee;
 	nm_setting_connection_get_autoconnect_ports;
 	nm_setting_connection_get_controller;
+	nm_setting_connection_get_down_on_poweroff;
 	nm_setting_connection_get_port_type;
 	nm_setting_generic_get_device_handler;
 	nm_setting_get_enum_property_type;
@@ -1977,3 +1978,27 @@ global:
 	nm_sriov_eswitch_inline_mode_get_type;
 	nm_sriov_eswitch_mode_get_type;
 } libnm_1_44_0;
+
+libnm_1_48_0 {
+global:
+	nm_setting_connection_down_on_poweroff_get_type;
+	nm_setting_connection_get_down_on_poweroff;
+	nm_setting_ip6_config_get_temp_preferred_lifetime;
+	nm_setting_ip6_config_get_temp_valid_lifetime;
+	nm_setting_ip_config_get_dhcp_send_release;
+	nm_setting_wired_add_mac_denylist_item;
+	nm_setting_wired_clear_mac_denylist_items;
+	nm_setting_wired_get_mac_address_denylist;
+	nm_setting_wired_get_mac_denylist_item;
+	nm_setting_wired_get_num_mac_denylist_items;
+	nm_setting_wired_remove_mac_denylist_item;
+	nm_setting_wired_remove_mac_denylist_item_by_value;
+	nm_setting_wireless_add_mac_denylist_item;
+	nm_setting_wireless_clear_mac_denylist_items;
+	nm_setting_wireless_get_mac_address_denylist;
+	nm_setting_wireless_get_mac_denylist_item;
+	nm_setting_wireless_get_num_mac_denylist_items;
+	nm_setting_wireless_remove_mac_denylist_item;
+	nm_setting_wireless_remove_mac_denylist_item_by_value;
+	nm_setting_802_1x_get_openssl_ciphers;
+} libnm_1_46_0;
diff --git a/src/libnm-client-impl/meson.build b/src/libnm-client-impl/meson.build
index 79ac9559..3dd2338a 100644
--- a/src/libnm-client-impl/meson.build
+++ b/src/libnm-client-impl/meson.build
@@ -158,7 +158,6 @@ if enable_introspection
     namespace: 'NM',
     identifier_prefix: nm_id_prefix,
     symbol_prefix: nm_id_prefix.to_lower(),
-    header: 'NetworkManager.h',
     export_packages: libnm_name,
     extra_args: [
       '-DNETWORKMANAGER_COMPILATION',
@@ -166,20 +165,20 @@ if enable_introspection
     install: true,
   )
 
-  gi_typelib_path = run_command('printenv', 'GI_TYPELIB_PATH').stdout()
+  gi_typelib_path = run_command('printenv', 'GI_TYPELIB_PATH', check: false).stdout()
   if gi_typelib_path != ''
     gi_typelib_path = ':' + gi_typelib_path
   endif
   gi_typelib_path = meson.current_build_dir() + gi_typelib_path
 
-  ld_library_path = run_command('printenv', 'LD_LIBRARY_PATH').stdout()
+  ld_library_path = run_command('printenv', 'LD_LIBRARY_PATH', check: false).stdout()
   if ld_library_path != ''
     ld_library_path = ':' + ld_library_path
   endif
   ld_library_path = meson.current_build_dir() + ld_library_path
 
-  gen_infos_cmd = join_paths(meson.source_root(), 'tools', 'generate-docs-nm-property-infos.py')
-  gen_gir_cmd = join_paths(meson.source_root(), 'tools', 'generate-docs-nm-settings-docs-gir.py')
+  gen_infos_cmd = files(source_root / 'tools' / 'generate-docs-nm-property-infos.py')
+  gen_gir_cmd = files(source_root / 'tools' / 'generate-docs-nm-settings-docs-gir.py')
 
   names = [ 'dbus', 'nmcli', 'keyfile' ]
   if enable_ifcfg_rh
@@ -191,7 +190,7 @@ if enable_introspection
       input: [gen_infos_cmd, libnm_gir[0]] + libnm_core_settings_sources,
       output: 'nm-property-infos-' + name + '.xml',
       command: [
-        python.path(),
+        python_path,
         gen_infos_cmd,
         name,
         '@OUTPUT@',
@@ -207,7 +206,7 @@ if enable_introspection
         'env',
         'GI_TYPELIB_PATH=' + gi_typelib_path,
         'LD_LIBRARY_PATH=' + ld_library_path,
-        python.path(),
+        python_path,
         gen_gir_cmd,
         '--lib-path', meson.current_build_dir(),
         '--gir', libnm_gir[0],
diff --git a/src/libnm-client-impl/nm-conn-utils.c b/src/libnm-client-impl/nm-conn-utils.c
index 08f8403c..e548a961 100644
--- a/src/libnm-client-impl/nm-conn-utils.c
+++ b/src/libnm-client-impl/nm-conn-utils.c
@@ -194,8 +194,8 @@ nm_conn_wireguard_import(const char *filename, GError **error)
      * This code here instead generates a NetworkManager connection profile so that
      * NetworkManager will apply a similar configuration when later activating the profile. */
 
-#define _TABLE_AUTO ((gint64) -1)
-#define _TABLE_OFF  ((gint64) -2)
+#define _TABLE_AUTO ((gint64) - 1)
+#define _TABLE_OFF  ((gint64) - 2)
 
     data_table = _TABLE_AUTO;
 
diff --git a/src/libnm-client-impl/nm-device-ethernet.c b/src/libnm-client-impl/nm-device-ethernet.c
index 42b7262d..f51e4992 100644
--- a/src/libnm-client-impl/nm-device-ethernet.c
+++ b/src/libnm-client-impl/nm-device-ethernet.c
@@ -195,7 +195,7 @@ connection_compatible(NMDevice *device, NMConnection *connection, GError **error
     if (s_wired) {
         const char        *perm_addr, *s_mac;
         gboolean           try_mac = TRUE;
-        const char *const *mac_blacklist;
+        const char *const *mac_denylist;
         int                i;
 
         /* Check s390 subchannels */
@@ -232,20 +232,20 @@ connection_compatible(NMDevice *device, NMConnection *connection, GError **error
                 return FALSE;
             }
 
-            /* Check for MAC address blacklist */
-            mac_blacklist = nm_setting_wired_get_mac_address_blacklist(s_wired);
-            for (i = 0; mac_blacklist[i]; i++) {
-                if (!nm_utils_hwaddr_valid(mac_blacklist[i], ETH_ALEN)) {
+            /* Check for MAC address denylist */
+            mac_denylist = nm_setting_wired_get_mac_address_denylist(s_wired);
+            for (i = 0; mac_denylist[i]; i++) {
+                if (!nm_utils_hwaddr_valid(mac_denylist[i], ETH_ALEN)) {
                     g_warn_if_reached();
                     g_set_error(error,
                                 NM_DEVICE_ERROR,
                                 NM_DEVICE_ERROR_INCOMPATIBLE_CONNECTION,
                                 _("Invalid MAC in the blacklist: %s."),
-                                mac_blacklist[i]);
+                                mac_denylist[i]);
                     return FALSE;
                 }
 
-                if (nm_utils_hwaddr_matches(mac_blacklist[i], -1, perm_addr, -1)) {
+                if (nm_utils_hwaddr_matches(mac_denylist[i], -1, perm_addr, -1)) {
                     g_set_error(error,
                                 NM_DEVICE_ERROR,
                                 NM_DEVICE_ERROR_INCOMPATIBLE_CONNECTION,
diff --git a/src/libnm-client-impl/tests/meson.build b/src/libnm-client-impl/tests/meson.build
index 0c0e188b..42e9883e 100644
--- a/src/libnm-client-impl/tests/meson.build
+++ b/src/libnm-client-impl/tests/meson.build
@@ -50,9 +50,9 @@ if enable_introspection
     'check-local-libnm-gir',
     python,
     args: [
-      join_paths(meson.source_root(), 'src', 'libnm-client-impl', 'tests', 'test-gir.py'),
+      join_paths(source_root, 'src', 'libnm-client-impl', 'tests', 'test-gir.py'),
       '--gir', libnm_gir[0],
-      '--ver', join_paths(meson.source_root(), 'src', 'libnm-client-impl', 'libnm.ver'),
+      '--ver', join_paths(source_root, 'src', 'libnm-client-impl', 'libnm.ver'),
     ],
   )
 endif
diff --git a/src/libnm-client-impl/tests/test-libnm.c b/src/libnm-client-impl/tests/test-libnm.c
index 59774f96..687e6c17 100644
--- a/src/libnm-client-impl/tests/test-libnm.c
+++ b/src/libnm-client-impl/tests/test-libnm.c
@@ -2397,10 +2397,10 @@ _do_read_vpn_details_impl1(const char              *file,
 
         g_print(">>>> n_read=%zd;  \"%s\"",
                 n_read,
-                n_read > 0 ? (
-                    ss = nm_utils_buf_utf8safe_escape_cp(read_buf,
-                                                         n_read,
-                                                         NM_UTILS_STR_UTF8_SAFE_FLAG_ESCAPE_CTRL))
+                n_read > 0 ? (ss = nm_utils_buf_utf8safe_escape_cp(
+                                  read_buf,
+                                  n_read,
+                                  NM_UTILS_STR_UTF8_SAFE_FLAG_ESCAPE_CTRL))
                            : "");
     }
 
diff --git a/src/libnm-client-impl/tests/test-nm-client.c b/src/libnm-client-impl/tests/test-nm-client.c
index 216e3e42..3d527324 100644
--- a/src/libnm-client-impl/tests/test-nm-client.c
+++ b/src/libnm-client-impl/tests/test-nm-client.c
@@ -1023,7 +1023,7 @@ _test_connection_invalid_find_connections(gpointer element, gpointer needle, gpo
     G_STMT_START                                                                          \
     {                                                                                     \
         g_assert_cmpint(idx[i], >=, 0);                                                   \
-        g_assert(path##i &&*path##i);                                                     \
+        g_assert(path##i && *path##i);                                                    \
         g_assert(NM_IS_REMOTE_CONNECTION(connections->pdata[idx[i]]));                    \
         g_assert_cmpstr(nm_connection_get_path(connections->pdata[idx[i]]), ==, path##i); \
     }                                                                                     \