diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2022-12-14 13:40:53 +0100 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2022-12-14 22:12:44 +0100 |
commit | 61ef30515b44c478cf1aa1155d5b306f09c9dc5a (patch) | |
tree | cb73188ec7553fa1b5dab2b9c6f659e6ecb7173c /src/test/test-mount-util.c | |
parent | 7c76e1812d2c6de1e597e2fc2db288c1ac9656a3 (diff) | |
download | systemd-61ef30515b44c478cf1aa1155d5b306f09c9dc5a.tar.gz |
shared: add new safe_fork flag FORK_PRIVATE_TMP
If the flag is set, we mount /tmp/ in a way that is suitable for generators and
other quick jobs.
Unfortunately I had to move some code from shared/mount-util.c to
basic/mountpoint-util.c. The functions that are moved are very thin wrappers
around mount(2), so this doesn't actually change much in the code split between
libbasic and libshared.
Implications for the host would be weird if a private mount namespace is not
used, so assert on FORK_NEW_MOUNTNS when the flag is used.
Diffstat (limited to 'src/test/test-mount-util.c')
-rw-r--r-- | src/test/test-mount-util.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/test/test-mount-util.c b/src/test/test-mount-util.c index 7e06fc419c..926f806957 100644 --- a/src/test/test-mount-util.c +++ b/src/test/test-mount-util.c @@ -11,6 +11,7 @@ #include "missing_mount.h" #include "mkdir.h" #include "mount-util.h" +#include "mountpoint-util.h" #include "namespace-util.h" #include "path-util.h" #include "process-util.h" |