diff options
author | Marius Bakke <mbakke@fastmail.com> | 2017-08-21 02:40:37 +0200 |
---|---|---|
committer | Marius Bakke <mbakke@fastmail.com> | 2017-08-21 02:40:37 +0200 |
commit | 2718a9cd096d0f5ae4b23cc0814a42aee5cf3c4d (patch) | |
tree | 334bed3ef9be203d77065a75380696c2537ede92 /nix/libstore/build.cc | |
parent | 9c4ce3afac2ad42c832dc7a9f0932744b5fd8892 (diff) | |
parent | e904de7ec1789e243e830b19187b5ef550b2eefa (diff) | |
download | patches-2718a9cd096d0f5ae4b23cc0814a42aee5cf3c4d.tar patches-2718a9cd096d0f5ae4b23cc0814a42aee5cf3c4d.tar.gz |
Merge branch 'master' into core-updates
Diffstat (limited to 'nix/libstore/build.cc')
-rw-r--r-- | nix/libstore/build.cc | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/nix/libstore/build.cc b/nix/libstore/build.cc index 63540ddfc1..d68e8b2bc0 100644 --- a/nix/libstore/build.cc +++ b/nix/libstore/build.cc @@ -2086,12 +2086,8 @@ void DerivationGoal::runChild() outside of the namespace. Making a subtree private is local to the namespace, though, so setting MS_PRIVATE does not affect the outside world. */ - Strings mounts = tokenizeString<Strings>(readFile("/proc/self/mountinfo", true), "\n"); - foreach (Strings::iterator, i, mounts) { - vector<string> fields = tokenizeString<vector<string> >(*i, " "); - string fs = decodeOctalEscaped(fields.at(4)); - if (mount(0, fs.c_str(), 0, MS_PRIVATE, 0) == -1) - throw SysError(format("unable to make filesystem `%1%' private") % fs); + if (mount(0, "/", 0, MS_REC|MS_PRIVATE, 0) == -1) { + throw SysError("unable to make ‘/’ private mount"); } /* Bind-mount chroot directory to itself, to treat it as a |