about summary refs log tree commit diff
path: root/pkgs/build-support
diff options
context:
space:
mode:
authoraszlig <aszlig@nix.build>2018-07-02 05:26:22 +0200
committeraszlig <aszlig@nix.build>2018-07-02 05:26:22 +0200
commit38e417120d9045534e77bfa20a27c293b718ffd8 (patch)
treee59a4ce2a8e3a42d36755afbca08e7d76f4a9ded /pkgs/build-support
parente05f98c7af4f4ad36e6566c8a6f3343138cff255 (diff)
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 <aszlig@nix.build>
Diffstat (limited to 'pkgs/build-support')
-rw-r--r--pkgs/build-support/build-sandbox/src/setup.c2
-rw-r--r--pkgs/build-support/build-sandbox/src/setup.h1
2 files changed, 2 insertions, 1 deletions
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 <sys/types.h>
 #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);