]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
portabled: load a bunch of libs before we fork off a dissector child processes
authorLennart Poettering <lennart@poettering.net>
Fri, 21 Nov 2025 07:53:14 +0000 (08:53 +0100)
committerLennart Poettering <lennart@poettering.net>
Mon, 24 Nov 2025 10:56:47 +0000 (11:56 +0100)
src/portable/meson.build
src/portable/portable.c

index 9c9d04c4614896f2527a17907a413c6ef19483c6..d9c266ff9e1a9596f8e85ef984901c9c08e84bb3 100644 (file)
@@ -29,6 +29,8 @@ executables += [
                 'sources' : systemd_portabled_sources,
                 'link_with' : portabled_link_with,
                 'dependencies' : [
+                        libcryptsetup_cflags,
+                        libmount_cflags,
                         libselinux_cflags,
                         threads,
                 ],
index 503b5b08a266b1d208d1ff3a13e5afe675fcfbb7..7dfe1aa99cc869d403e91a627167f9317e14aaa6 100644 (file)
@@ -12,6 +12,7 @@
 #include "chase.h"
 #include "conf-files.h"
 #include "copy.h"
+#include "cryptsetup-util.h"
 #include "data-fd-util.h"
 #include "dirent-util.h"
 #include "discover-image.h"
@@ -28,6 +29,7 @@
 #include "glyph-util.h"
 #include "install.h"
 #include "iovec-util.h"
+#include "libmount-util.h"
 #include "log-context.h"
 #include "log.h"
 #include "loop-util.h"
@@ -420,6 +422,10 @@ static int portable_extract_by_path(
 
                 BLOCK_SIGNALS(SIGCHLD);
 
+                /* Load some libraries before we fork workers off that want to use them */
+                (void) dlopen_cryptsetup();
+                (void) dlopen_libmount();
+
                 r = mkdtemp_malloc("/tmp/inspect-XXXXXX", &tmpdir);
                 if (r < 0)
                         return log_debug_errno(r, "Failed to create temporary directory: %m");