From 800d11c36cd97da2122eae5369939818d50f491d Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Wed, 19 Nov 2025 17:23:58 +0100 Subject: [PATCH] nspawn: load three libraries we'll need later before we fork() a child --- src/nspawn/meson.build | 1 + src/nspawn/nspawn.c | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/src/nspawn/meson.build b/src/nspawn/meson.build index 98bbb48b093..815b74cb157 100644 --- a/src/nspawn/meson.build +++ b/src/nspawn/meson.build @@ -47,6 +47,7 @@ executables += [ include_directories('.') ], 'dependencies' : [ + libmount_cflags, libseccomp_cflags, libselinux_cflags, ], diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c index e4bf8159358..4f9cd4dbdc7 100644 --- a/src/nspawn/nspawn.c +++ b/src/nspawn/nspawn.c @@ -58,6 +58,7 @@ #include "image-policy.h" #include "in-addr-util.h" #include "io-util.h" +#include "libmount-util.h" #include "log.h" #include "loop-util.h" #include "loopback-setup.h" @@ -5965,6 +5966,10 @@ static int run(int argc, char *argv[]) { if (arg_cleanup) return do_cleanup(); + (void) dlopen_libmount(); + (void) dlopen_libseccomp(); + (void) dlopen_libselinux(); + r = cg_has_legacy(); if (r < 0) goto finish; -- 2.47.3