• Mathieu Boespflug's avatar
    Make GHCi permissions checks ignore root user. · fb936e0d
    Mathieu Boespflug authored
    As a security precaution, GHCi helpfully refuses to run a .ghci file if it is owned by another user. But if the that other user is root, then arguably GHCi should not refuse to interpret the file, because if root really was malicious, then the user would be having a bad day anyways.
    This means that .ghci files installed in a global location, say under /usr/local/, can now be read.
    Fixes #9324
    Test Plan:
    $ sudo touch .ghci
    $ ghci
    Notice that the warning about the file being owned by someone else is now gone.
    Reviewers: austin
    Reviewed By: austin
    Subscribers: phaskell, simonmar, carter, nomeata, relrod
    Projects: #ghc
    Differential Revision: https://phabricator.haskell.org/D75
InteractiveUI.hs 123 KB