[GRASS5] [bug #2961] (grass) lib/gis/unix_socks.c fails unless $TMPDIR is /tmp

Hamish hamish_nospam at yahoo.com
Mon Feb 7 18:26:59 EST 2005


> > I just did a little audit and I think my recenct security fix to
> > init.sh introduced a bug. I'd like to fix it ASAP - if not I'll
> > remove the $TMPDIR capability and revert to always using /tmp (maybe
> > in the next 24 hours).
> > 
> > The bug is this:
> > 
> > init.sh now uses $TMPDIR (if it exists) to place the temporary
> > session files in. If $TMPDIR doesn't exist it uses /tmp. Now
> > lib/gis/unix_socks.c has "/tmp" hardcoded and I don't know how to do
> > the 'if(! $TMPDIR) then "/tmp"' test in C.
> 
> unix_socks.c should always use /tmp; using $TMPDIR (which is typically
> a subdirectory of $HOME) might exceed the limit for a Unix-domain
> socket.


Ok, in that case init.sh & socks/pipes will always be /tmp and ignore
any $TMPDIR.

I think the test-compiles do honor $TMPDIR already and that this is ok?


Hamish




More information about the grass-dev mailing list