> The problem is with directories like /tmp, or more generally
> directories, which are not under the user's immediate control.
> 
>       $ echo ':! some-evil-script.sh' > /tmp/.ghci
> 
> Then wait, until somebody steps into the boobie trap: if one cd's to
> /tmp and executes ghci (to test stuff, for example; i do this
> frequently) there the script gets executed.  I think that was
> Michal's original point.
> 
> BTW: not allowing :! isn't enough, you can still use other tricks to
> (over)write files or even start programs...  

I agree, GHCi is far too flexible to try to close the hole this way.
We'd never cover all the possibilities.

> So, I think a safe solution is to ensure that the .ghci file belongs
> to the user.  Checking for decent permissions would increase security,
> but well, IMO it's the users' fault, if he creates a 777 .ghci :-P

Ok, that's what I'll do.  Any objections?

Cheers,
        Simon

_______________________________________________
Glasgow-haskell-bugs mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to