Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Shayne Fletcher
Glasgow Haskell Compiler
Commits
f3c0c257
Commit
f3c0c257
authored
May 04, 2001
by
simonmar
Browse files
[project @ 2001-05-04 16:36:38 by simonmar]
comment explaining why we check the perms on . before reading ./.ghci.
parent
dea9b472
Changes
1
Hide whitespace changes
Inline
Side-by-side
ghc/compiler/ghci/InteractiveUI.hs
View file @
f3c0c257
-----------------------------------------------------------------------------
-- $Id: InteractiveUI.hs,v 1.6
5
2001/05/04 1
4:56:53
simonmar Exp $
-- $Id: InteractiveUI.hs,v 1.6
6
2001/05/04 1
6:36:38
simonmar Exp $
--
-- GHC Interactive User Interface
--
...
...
@@ -188,8 +188,14 @@ runGHCi = do
-- NOTE: We only read .ghci files if they are owned by the current user,
-- and aren't world writable. Otherwise, we could be accidentally
-- running code planted by a malicious third party.
-- and aren't world writable. Otherwise, we could be accidentally
-- running code planted by a malicious third party.
-- Furthermore, We only read ./.ghci if both . and ./.ghci are
-- owned by the current user and aren't writable by anyone else. I
-- think this is sufficient: we don't need to check .. and
-- ../.. etc. because "." always refers to the same directory while a
-- process is running.
checkPerms
::
String
->
IO
Bool
checkPerms
name
=
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment