summary refs log tree commit diff
path: root/src/libnm-client-impl
diff options
context:
space:
mode:
authorMichael Biebl <biebl@debian.org>2025-12-13 13:48:57 +0100
committerMichael Biebl <biebl@debian.org>2025-12-13 13:48:57 +0100
commit6de29285e533f4fec22a219013f3687edb6b7399 (patch)
tree4b1627413f2e8fc8e3ccfa1496a79a04b8a71bde /src/libnm-client-impl
parent01609e485803fa250413385ae209660fb7b30a2e (diff)
New upstream version 1.54.3 upstream/1.54.3
Diffstat (limited to 'src/libnm-client-impl')
-rw-r--r--src/libnm-client-impl/libnm.ver6
-rw-r--r--src/libnm-client-impl/tests/meson.build16
-rw-r--r--src/libnm-client-impl/tests/test-copy-cert-as-user.c32
-rwxr-xr-xsrc/libnm-client-impl/tests/test-gir.py2
4 files changed, 50 insertions, 6 deletions
diff --git a/src/libnm-client-impl/libnm.ver b/src/libnm-client-impl/libnm.ver
index 040d6829..bd66e61d 100644
--- a/src/libnm-client-impl/libnm.ver
+++ b/src/libnm-client-impl/libnm.ver
@@ -2083,3 +2083,9 @@ global:
 	nm_setting_hsr_get_protocol_version;
 	nm_setting_hsr_protocol_version_get_type;
 } libnm_1_54_0;
+
+libnm_1_54_3 {
+global:
+	nm_utils_copy_cert_as_user;
+	nm_vpn_plugin_info_supports_safe_private_file_access;
+} libnm_1_54_2;
diff --git a/src/libnm-client-impl/tests/meson.build b/src/libnm-client-impl/tests/meson.build
index 42e9883e..500504db 100644
--- a/src/libnm-client-impl/tests/meson.build
+++ b/src/libnm-client-impl/tests/meson.build
@@ -5,6 +5,7 @@ test_units = [
   'test-nm-client',
   'test-remote-settings-client',
   'test-secret-agent',
+  'test-copy-cert-as-user'
 ]
 
 foreach test_unit: test_units
@@ -37,12 +38,15 @@ foreach test_unit: test_units
     ],
   )
 
-  test(
-    'src/libnm-client-impl/tests/' + test_unit,
-    test_script,
-    timeout: 90,
-    args: test_args + [exe.full_path()],
-  )
+  # test-copy-cert-as-user is a manual test, don't run it automatically
+  if test_unit != 'test-copy-cert-as-user'
+    test(
+      'src/libnm-client-impl/tests/' + test_unit,
+      test_script,
+      timeout: 90,
+      args: test_args + [exe.full_path()],
+    )
+  endif
 endforeach
 
 if enable_introspection
diff --git a/src/libnm-client-impl/tests/test-copy-cert-as-user.c b/src/libnm-client-impl/tests/test-copy-cert-as-user.c
new file mode 100644
index 00000000..b2ef9de6
--- /dev/null
+++ b/src/libnm-client-impl/tests/test-copy-cert-as-user.c
@@ -0,0 +1,32 @@
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
+
+/* 
+ * This is a program to manually test the
+ * nm_utils_copy_cert_as_user() libnm function.
+ */
+
+#include "libnm-client-impl/nm-default-libnm.h"
+
+#include "nm-utils.h"
+
+int
+main(int argc, char **argv)
+{
+    gs_free_error GError *error    = NULL;
+    gs_free char         *filename = NULL;
+
+    if (argc != 3) {
+        g_printerr("Usage: %s <FILE> <USER>\n", argv[0]);
+        return 1;
+    }
+
+    filename = nm_utils_copy_cert_as_user(argv[1], argv[2], &error);
+    if (!filename) {
+        g_printerr("Error: %s\n", error->message);
+        return 1;
+    }
+
+    g_print("%s\n", filename);
+
+    return 0;
+}
diff --git a/src/libnm-client-impl/tests/test-gir.py b/src/libnm-client-impl/tests/test-gir.py
index 554080fa..81518e37 100755
--- a/src/libnm-client-impl/tests/test-gir.py
+++ b/src/libnm-client-impl/tests/test-gir.py
@@ -93,6 +93,8 @@ def syms_from_ver(verfile):
     # hardcode it.
     c_syms["nm_ethtool_optname_is_feature"] = "1.20"
     c_syms["nm_setting_bond_port_get_prio"] = "1.44"
+    c_syms["nm_utils_copy_cert_as_user"] = "1.56"
+    c_syms["nm_vpn_plugin_info_supports_safe_private_file_access"] = "1.56"
 
     return c_syms