From 3e5b68068bf5cfdc671a2900eeb0dc70fae49cf6 Mon Sep 17 00:00:00 2001 From: Martin Bravenboer Date: Tue, 15 Aug 2006 21:37:48 +0000 Subject: 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. --- src/libstore/build.cc | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') diff --git a/src/libstore/build.cc b/src/libstore/build.cc index c80b3dfe97..c953707a51 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); -- cgit 1.4.1