From e683dce1f1747de2fd48bfd67849cbb70a13c47c Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Fri, 21 Nov 2025 08:53:14 +0100 Subject: [PATCH] portabled: load a bunch of libs before we fork off a dissector child processes --- src/portable/meson.build | 2 ++ src/portable/portable.c | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/src/portable/meson.build b/src/portable/meson.build index 9c9d04c4614..d9c266ff9e1 100644 --- a/src/portable/meson.build +++ b/src/portable/meson.build @@ -29,6 +29,8 @@ executables += [ 'sources' : systemd_portabled_sources, 'link_with' : portabled_link_with, 'dependencies' : [ + libcryptsetup_cflags, + libmount_cflags, libselinux_cflags, threads, ], diff --git a/src/portable/portable.c b/src/portable/portable.c index 503b5b08a26..7dfe1aa99cc 100644 --- a/src/portable/portable.c +++ b/src/portable/portable.c @@ -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"); -- 2.47.3