about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMartin Bravenboer <martin.bravenboer@logicblox.com>2006-08-15T21·37+0000
committerMartin Bravenboer <martin.bravenboer@logicblox.com>2006-08-15T21·37+0000
commit3e5b68068bf5cfdc671a2900eeb0dc70fae49cf6 (patch)
tree23b752afca5a67e2a9c4e94c153e4246e2dd39f0
parent7455fd88356fdb58db3fbf01c68de86b06c18747 (diff)
On cygwin, disable the check that the output is not group or world
writable. File permissions on Cygwin are rather complex, and in this
case this check introduced a problem with build jobs invoke from
outside of Cygwin (MSYS). It seemed almost impossible to fix the
permissions of the directory, so for now this safety check is disabled
on Cygwin.


-rw-r--r--src/libstore/build.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/libstore/build.cc b/src/libstore/build.cc
index c80b3dfe9706..c953707a5126 100644
--- a/src/libstore/build.cc
+++ b/src/libstore/build.cc
@@ -1400,6 +1400,7 @@ void DerivationGoal::computeClosure()
                     % path % algo % printHash(h) % printHash(h2));
         }
 
+#ifndef __CYGWIN__
         /* Check that the output is not group or world writable, as
            that means that someone else can have interfered with the
            build.  Also, the output should be owned by the build
@@ -1407,6 +1408,7 @@ void DerivationGoal::computeClosure()
         if ((st.st_mode & (S_IWGRP | S_IWOTH)) ||
             (buildUser.getUID() != 0 && st.st_uid != buildUser.getUID()))
             throw Error(format("suspicious ownership or permission on `%1%'; rejecting this build output") % path);
+#endif
 
         /* Get rid of all weird permissions. */
 	canonicalisePathMetaData(path);