Tue May 17 04:23:44 PDT 2011 Duncan Coutts
* 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 -3 +8
M ./Distribution/Simple/Utils.hs -10 +49
View patch online:
http://darcs.haskell.org/cgi-bin/darcsweb.cgi?r=cabal;a=darcs_commitdiff;h=2...