about summary refs log tree commit diff
path: root/src/libstore/build.cc
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2012-09-29T01·39-0400
committerEelco Dolstra <eelco.dolstra@logicblox.com>2012-09-29T01·39-0400
commite666e1156fba936dce93ccfa2486f67369a97129 (patch)
tree78bb14c66b321796e598cba4d7def419fa04379d /src/libstore/build.cc
parentf406288cc7cf648001a40b0a96cb97c31347cc5a (diff)
Handle octal escapes in /proc/self/mountinfo
Diffstat (limited to 'src/libstore/build.cc')
-rw-r--r--src/libstore/build.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/libstore/build.cc b/src/libstore/build.cc
index ca66be3b41..fecee04d54 100644
--- a/src/libstore/build.cc
+++ b/src/libstore/build.cc
@@ -1914,8 +1914,9 @@ void DerivationGoal::initChild()
             Strings mounts = tokenizeString<Strings>(readFile("/proc/self/mountinfo", true), "\n");
             foreach (Strings::iterator, i, mounts) {
                 vector<string> fields = tokenizeString<vector<string> >(*i, " ");
-                if (mount(0, fields.at(4).c_str(), 0, MS_PRIVATE, 0) == -1)
-                    throw SysError(format("unable to make filesystem `%1%' private") % fields.at(4));
+                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);
             }
 
             /* Bind-mount all the directories from the "host"