patch applied (cabal-branches/cabal-1.10): "Reimplement createDirectoryIfMissingVerbose to use sensible file permissions"
Duncan Coutts
duncan.coutts at googlemail.com
Tue May 17 14:09:42 CEST 2011
Tue May 17 05:01:05 PDT 2011 Duncan Coutts <duncan at community.haskell.org>
* Reimplement createDirectoryIfMissingVerbose to use sensible file permissions
Hopefully should fix ghc ticket #4982.
The problem was permissions on directories: previously we used ordinary
createDirectory and on unix this creates dirs using the current user's
umask. If the root user has a silly umask then someone doing sudo
install will end up with dirs that are not readable by non-root users.
So the solution is to do the same as we do with files: override the
umask and explicitly set the file permissions based on the kind of
file: ordinary file, executable file and now also directory.
Sadly we also had to re-implement createDirectoryIfMissing to use our
new createDirectory wrapper function.
M ./Distribution/Compat/CopyFile.hs -1 +4
M ./Distribution/Compat/Exception.hs -1 +1
M ./Distribution/Simple/Utils.hs -10 +50
View patch online:
http://darcs.haskell.org/cgi-bin/darcsweb.cgi?r=cabal-branches/cabal-1.10;a=darcs_commitdiff;h=20110517120105-5c91e-ac174a4a43bc35d5010b8def7100be6c7a46e609.gz
More information about the cabal-devel
mailing list