summary refs log tree commit diff
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2015-04-02 16:59:40 +0200
committerLudovic Courtès <ludo@gnu.org>2015-06-03 22:03:54 +0200
commit44f1b1851ccf836411ca09f5ebc50fc08d92e7e8 (patch)
treee9d5d4eaf978e996d16681534f734596427eac40
parentb6ecbd266f614288db3468f9f054abea694105b1 (diff)
downloadguix-44f1b1851ccf836411ca09f5ebc50fc08d92e7e8.tar.gz
Chroot builds: Provide world-readable /nix/store
This was causing NixOS VM tests to fail mysteriously since
5ce50cd99e740d0d0f18c30327ae687be9356553. Nscd could (sometimes) no
longer read /etc/hosts:

open("/etc/hosts", O_RDONLY|O_CLOEXEC) = -1 EACCES (Permission denied)

Probably there was some wacky interaction between the guest kernel and
the 9pfs implementation in QEMU.
-rw-r--r--nix/libstore/build.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/nix/libstore/build.cc b/nix/libstore/build.cc
index 9a69a795e8..f3a4a459eb 100644
--- a/nix/libstore/build.cc
+++ b/nix/libstore/build.cc
@@ -1826,7 +1826,7 @@ void DerivationGoal::startBuilder()
            build user. */
         Path chrootStoreDir = chrootRootDir + settings.nixStore;
         createDirs(chrootStoreDir);
-        chmod_(chrootStoreDir, 0730);
+        chmod_(chrootStoreDir, 0735);
 
         if (chown(chrootStoreDir.c_str(), 0, buildUser.getGID()) == -1)
             throw SysError(format("cannot change ownership of ‘%1%’") % chrootStoreDir);