[Fwd: Bug#94739: ./.ghci -- isn't it dangerous?]

Simon Marlow simonmar at microsoft.com
Mon Apr 30 07:49:23 EDT 2001


The problem is that both ~/.ghci and ./.ghci are useful:  I use ~/.ghci
to do things like :set +s, and define some useful macros.  Whereas
./.ghci is great for doing things like:

	:set -iFoo:Bar
	:set -fglasgow-exts
	:load Main

(the only drawback is that you can't add package flags this way).

Cheers,
	Simon

> -----Original Message-----
> From: BENNETT,ANDY (HP-Unitedkingdom,ex1) 
> [mailto:andy_bennett at hp.com] 
> Sent: Monday, April 30, 2001 12:28 PM
> To: Simon Marlow; Michael Weber; GHC Bugs list
> Cc: Michal Politowski; 94739-forwarded at bugs.debian.org
> Subject: RE: [Fwd: Bug#94739: ./.ghci -- isn't it dangerous?]
> 
> 
> Why not have an environment variable for its location. If it 
> isn't set, just
> have it default to looking for .ghci in the user's home 
> directory, if it is
> use that path instead.
> 
> Regards,
> Andy.
> 
> > -----Original Message-----
> > From: Simon Marlow [mailto:simonmar at microsoft.com]
> > Sent: 30 April 2001 12:20
> > To: Michael Weber; GHC Bugs list
> > Cc: Michal Politowski; 94739-forwarded at bugs.debian.org
> > Subject: RE: [Fwd: Bug#94739: ./.ghci -- isn't it dangerous?]
> > 
> > 
> > > 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
> > 
> > I've thought about this a bit more.  It's not enough to 
> just check the
> > owner and permissions of .ghci if the current *directory* is world
> > writable.  Therefore I'm thinking of backing off to the approach of
> > never reading ./.ghci by default.
> > 
> > Cheers,
> > 	Simon
> > 
> > _______________________________________________
> > Glasgow-haskell-bugs mailing list
> > Glasgow-haskell-bugs at haskell.org
> > http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
> > 
> 




More information about the Glasgow-haskell-bugs mailing list