]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
repart: load libraries before forking off child
authorLennart Poettering <lennart@poettering.net>
Fri, 21 Nov 2025 16:09:21 +0000 (17:09 +0100)
committerLennart Poettering <lennart@poettering.net>
Mon, 24 Nov 2025 10:56:47 +0000 (11:56 +0100)
src/repart/meson.build
src/repart/repart.c

index 1478ae278a97a92aa4b65fe5342f14441df16768..b922ecb7130f87172ead4af187190ccb2ea8468d 100644 (file)
@@ -16,6 +16,7 @@ executables += [
                 'dependencies' : [
                         libblkid_cflags,
                         libfdisk,
+                        libmount_cflags,
                         libopenssl,
                         threads,
                 ],
@@ -35,6 +36,7 @@ executables += [
                 'dependencies' : [
                         libblkid_cflags,
                         libfdisk,
+                        libmount_cflags,
                         libopenssl,
                         threads,
                 ],
index ea44775eece9671c1b559233c8693273a0d0428e..497654d012d03ed5470eee5cfd71d51db6062773 100644 (file)
@@ -50,6 +50,7 @@
 #include "initrd-util.h"
 #include "io-util.h"
 #include "json-util.h"
+#include "libmount-util.h"
 #include "list.h"
 #include "loop-util.h"
 #include "main-func.h"
@@ -6616,6 +6617,8 @@ static int partition_populate_filesystem(Context *context, Partition *p, const c
          * appear in the host namespace. Hence we fork a child that has its own file system namespace and
          * detached mount propagation. */
 
+        (void) dlopen_libmount();
+
         r = safe_fork("(sd-copy)", FORK_DEATHSIG_SIGTERM|FORK_LOG|FORK_WAIT|FORK_NEW_MOUNTNS|FORK_MOUNTNS_SLAVE, NULL);
         if (r < 0)
                 return r;