[GHC] #9324: GHCi permission checks should ignore root user

GHC ghc-devs at haskell.org
Sun Jul 20 21:56:31 UTC 2014


#9324: GHCi permission checks should ignore root user
-------------------------------------+-------------------------------------
              Reporter:  mboes       |             Owner:
                  Type:  bug         |            Status:  patch
              Priority:  normal      |         Milestone:
             Component:  Compiler    |           Version:  7.8.2
            Resolution:              |          Keywords:
Differential Revisions:  Phab:D75    |  Operating System:  POSIX
          Architecture:              |   Type of failure:  None/Unknown
  Unknown/Multiple                   |         Test Case:
            Difficulty:  Unknown     |          Blocking:
            Blocked By:              |
       Related Tickets:              |
-------------------------------------+-------------------------------------

Comment (by Austin Seipp <austin@…>):

 In [changeset:"fb936e0db55b0522ddcabd39833c99c7c2871170/ghc"]:
 {{{
 #!CommitTicketReference repository="ghc"
 revision="fb936e0db55b0522ddcabd39833c99c7c2871170"
 Make GHCi permissions checks ignore root user.

 Summary:
 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
 }}}

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/9324#comment:3>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list