nspawn: load three libraries we'll need later before we fork() a child

This commit is contained in:
Lennart Poettering
2025-11-19 17:23:58 +01:00
parent 2c7bdaf9f1
commit 800d11c36c
2 changed files with 6 additions and 0 deletions

View File

@@ -47,6 +47,7 @@ executables += [
include_directories('.')
],
'dependencies' : [
libmount_cflags,
libseccomp_cflags,
libselinux_cflags,
],

View File

@@ -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;