about summary refs log tree commit diff
path: root/src/libstore/build.cc
diff options
context:
space:
mode:
authorWill Dietz <w@wdtz.org>2018-04-20T16·55-0500
committerWill Dietz <w@wdtz.org>2018-04-20T17·24-0500
commit6d9129014d443bcec23c6665f00fc020e1a9405b (patch)
tree08b8fa3eb7252238a9fad5da459238ae1c8a0315 /src/libstore/build.cc
parenta8c61cef2624ce39abb446e7c46064917f6f6b78 (diff)
build.cc: fix bind-mount of /dev/{pts,ptmx} fallback
Don't bind-mount these to themselves,
mount them into the chroot directory.

Fixes pty issues when using sandbox on CentOS 7.4.
(build of perlPackages.IOTty fails before this change)
Diffstat (limited to 'src/libstore/build.cc')
-rw-r--r--src/libstore/build.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libstore/build.cc b/src/libstore/build.cc
index e5285ad9a938..416c775a35d2 100644
--- a/src/libstore/build.cc
+++ b/src/libstore/build.cc
@@ -2699,8 +2699,8 @@ void DerivationGoal::runChild()
                 } else {
                     if (errno != EINVAL)
                         throw SysError("mounting /dev/pts");
-                    doBind("/dev/pts", "/dev/pts");
-                    doBind("/dev/ptmx", "/dev/ptmx");
+                    doBind("/dev/pts", chrootRootDir + "/dev/pts");
+                    doBind("/dev/ptmx", chrootRootDir + "/dev/ptmx");
                 }
             }