From 686241825c304a335c4d77c5fecdbeea3c014df1 Mon Sep 17 00:00:00 2001 From: Will Dietz Date: Fri, 20 Apr 2018 11:55:04 -0500 Subject: [PATCH] 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) (cherry picked from commit 6d9129014d443bcec23c6665f00fc020e1a9405b) --- src/libstore/build.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libstore/build.cc b/src/libstore/build.cc index 6b7748c83..df0cde038 100644 --- a/src/libstore/build.cc +++ b/src/libstore/build.cc @@ -2691,8 +2691,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"); } }