diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2012-08-20T19·27-0400 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2012-08-20T19·27-0400 |
commit | f0eab0636b73a4f16b7639d30956d9072d5573cb (patch) | |
tree | 405de20734a595e20fdfc874f7efd7d95ffd605a /src/libstore | |
parent | 862c4c5ec509e05815d99fb4b80558974148b8c5 (diff) |
Don't bind-mount /proc since we mount our own
Diffstat (limited to 'src/libstore')
-rw-r--r-- | src/libstore/build.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libstore/build.cc b/src/libstore/build.cc index a7aea164c0a4..9da8084bf5c7 100644 --- a/src/libstore/build.cc +++ b/src/libstore/build.cc @@ -1859,16 +1859,16 @@ void DerivationGoal::initChild() foreach (PathSet::iterator, i, dirsInChroot) { Path source = *i; Path target = chrootRootDir + source; + if (source == "/proc") continue; // backwards compatibility debug(format("bind mounting `%1%' to `%2%'") % source % target); - createDirs(target); - if (mount(source.c_str(), target.c_str(), "", MS_BIND, 0) == -1) throw SysError(format("bind mount from `%1%' to `%2%' failed") % source % target); } /* Bind a new instance of procfs on /proc to reflect our private PID namespace. */ + createDirs(chrootRootDir + "/proc"); if (mount("none", (chrootRootDir + "/proc").c_str(), "proc", 0, 0) == -1) throw SysError("mounting /proc"); |