patch applied (cabal): "Reimplement createDirectoryIfMissingVerbose to use sensible file permissions"

Duncan Coutts duncan.coutts at googlemail.com
Tue May 17 13:40:07 CEST 2011


Tue May 17 04:23:44 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 -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=20110517112344-5c91e-2495305a28e3737949ae52ec9d2171229fcc12b0.gz




More information about the cabal-devel mailing list