
I have been playing (for the first time) with ghci and it seems to work. However, if I write my own ".ghci", I obtain: ... Loading package std ... linking ... done *** WARNING: ./.ghci is writable by someone else, IGNORING! After that, it works, but ignores the options that I have set in .ghci NOTE1: I have built my system 2 times (firstly with ghc-4.08 to obtain ghc-5.02 (non interactive) and secondly, with ghc-5.02 again to obtain the interactive version. NOTE2: The contents of the .ghci file by now are: :set +s Best regards, Jose Labra

Jose Emilio Labra Gayo
However, if I write my own ".ghci", I obtain: [...] *** WARNING: ./.ghci is writable by someone else, IGNORING!
Yes, I got bitten by this too! Just a guess, but are you using a system which allocates a unique default group to every user and then sticks with an 002 umask universally? If so, the quick fix is to 'chmod g-w' the relevant .ghci files. If doing this annoys you too much, I guess you could easily fix the checkPerms function (somewhere around line 200 of InteractiveUI.hs) to understand that if you're the only member of a group, it doesn't matter whether or not g+w is set. Cheers, Chris.

On Tue, Jul 10, 2001 at 19:54:11 +0100, Chris Webb wrote:
Jose Emilio Labra Gayo
writes: However, if I write my own ".ghci", I obtain: [...] *** WARNING: ./.ghci is writable by someone else, IGNORING!
If doing this annoys you too much, I guess you could easily fix the checkPerms function (somewhere around line 200 of InteractiveUI.hs) to understand that if you're the only member of a group, it doesn't matter whether or not g+w is set.
erm, how about leaving this intact and setting the umask instead to 022? There was a reason to stick this code there... Cheers, Michael -- () ASCII ribbon campaign | Chair for Computer Science II | GPG: F65C68CD /\ against HTML mail | RWTH Aachen, Germany | PGP: 1D0DD0B9 "I WILL NOT SEND LARD THROUGH THE MAIL" -- Bart Simpson in 2F04

Michael Weber
On Tue, Jul 10, 2001 at 19:54:11 +0100, Chris Webb wrote:
Jose Emilio Labra Gayo
writes: However, if I write my own ".ghci", I obtain: [...] *** WARNING: ./.ghci is writable by someone else, IGNORING!
If doing this annoys you too much, I guess you could easily fix the checkPerms function (somewhere around line 200 of InteractiveUI.hs) to understand that if you're the only member of a group, it doesn't matter whether or not g+w is set.
erm, how about leaving this intact and setting the umask instead to 022? There was a reason to stick this code there...
I'm aware of the intent behind the check, which is why I suggested the poster hack his local ghci to be aware of the (popular) special case rather than removing the code altogether. There are no security issues in allowing g+w if and only if the file group is the user's private group that aren't also problems with the original check. Varying a perfectly sensible local policy to suit the over-enthusiastic permissions checks of a particular piece of software isn't really a nice solution! In practice this test is also broken in the context of source directories shared between different users, which is where it bit me. You might already be running code written by others and hence deliberately trusting them completely, but there's no way to use the shared .ghci files---you can't even explicitly tell ghci that they're okay! Hand-holding w.r.t. 'insecure' file permissions has a nasty habit of becoming a nuisance in unusual cases the original authors hadn't thought of. :-( Cheers, Chris.
participants (3)
-
Chris Webb
-
Jose Emilio Labra Gayo
-
Michael Weber