From 38e417120d9045534e77bfa20a27c293b718ffd8 Mon Sep 17 00:00:00 2001 From: aszlig Date: Mon, 2 Jul 2018 05:26:22 +0200 Subject: pkgs/sandbox: Expose get_mount_target() I'm going to use the sandboxing implementation as the basis for something else where I'm going to do additional mounts on top of the existing ones. This is just to make it easier to find the mount target. Signed-off-by: aszlig --- pkgs/build-support/build-sandbox/src/setup.c | 2 +- pkgs/build-support/build-sandbox/src/setup.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/build-support/build-sandbox/src/setup.c b/pkgs/build-support/build-sandbox/src/setup.c index 18b288d9..e4304b1f 100644 --- a/pkgs/build-support/build-sandbox/src/setup.c +++ b/pkgs/build-support/build-sandbox/src/setup.c @@ -120,7 +120,7 @@ static bool makedirs(const char *path, bool do_cache) return true; } -static char *get_mount_target(const char *path) +char *get_mount_target(const char *path) { size_t pathlen = strlen(path), rootdir_len = strlen(FS_ROOT_DIR); char *target; diff --git a/pkgs/build-support/build-sandbox/src/setup.h b/pkgs/build-support/build-sandbox/src/setup.h index 2ef05482..6d9dd0a3 100644 --- a/pkgs/build-support/build-sandbox/src/setup.h +++ b/pkgs/build-support/build-sandbox/src/setup.h @@ -5,6 +5,7 @@ #include #include "nix-query.h" +char *get_mount_target(const char *path); bool write_maps(pid_t parent_pid); bool bind_mount(const char *path, bool rdonly, bool restricted, bool resolve); bool extra_mount(const char *path, bool is_required); -- cgit 1.4.1