[GRASS5] [bug #2961] (grass) lib/gis/unix_socks.c fails unless $TMPDIR is /tmp
Request Tracker
grass-bugs at intevation.de
Wed Feb 2 18:38:09 EST 2005
this bug's URL: http://intevation.de/rt/webrt?serial_num=2961
-------------------------------------------------------------------------
Subject: lib/gis/unix_socks.c fails unless $TMPDIR is /tmp
Platform: GNU/Linux/i386
grass obtained from: CVS
grass binary for platform: Compiled from Sources
GRASS Version: 5.7-cvs-feb05
Hi,
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.
It might still work, but would leave files scattered about, reintroduce the security issues, etc..
Can someone show me how to do this?
unix_socks.c:
http://freegis.org/cgi-bin/viewcvs.cgi/grass51/lib/gis/unix_socks.c?rev=HEAD&content-type=text/vnd.viewcvs-markup
Also lib/gis/win32_pipes.c always uses "c:/grass-" as a prefix. I'm not sure if this should match what is set as the temporary session directory by init.sh?? I'd prefer that to adding platform heuristics to init.sh.
thanks,
Hamish
-------------------------------------------- Managed by Request Tracker
More information about the grass-dev
mailing list