aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/pathlocks.hh
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2016-06-03 15:45:11 +0200
committerEelco Dolstra <eelco.dolstra@logicblox.com>2016-06-03 15:59:28 +0200
commit5e51ffb1c265e16486fcdd888ce4a04db9e5552b (patch)
treeb19ff139061396af8c3013fd5522223c4b43f020 /src/libstore/pathlocks.hh
parent2f8b0e557b300f9b59f0b06778f6bc26aed6ba3f (diff)
Support sandbox builds by non-root users
This allows an unprivileged user to perform builds on a diverted store (i.e. where the physical store location differs from the logical location). Example: $ NIX_LOG_DIR=/tmp/log NIX_REMOTE="local?real=/tmp/store&state=/tmp/var" nix-build -E \ 'with import <nixpkgs> {}; runCommand "foo" { buildInputs = [procps nettools]; } "id; ps; ifconfig; echo $out > $out"' will do a build in the Nix store physically in /tmp/store but logically in /nix/store (and thus using substituters for the latter).
Diffstat (limited to 'src/libstore/pathlocks.hh')
-rw-r--r--src/libstore/pathlocks.hh1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/libstore/pathlocks.hh b/src/libstore/pathlocks.hh
index 8a6b1450d..40103c393 100644
--- a/src/libstore/pathlocks.hh
+++ b/src/libstore/pathlocks.hh
@@ -39,6 +39,7 @@ public:
};
+// FIXME: not thread-safe!
bool pathIsLockedByMe(const Path & path);