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

Mark P. Line mark at polymathix.com
Wed Feb 2 20:18:49 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.

getenv(3) gets you the value of a shell variable from the surrounding
context, and returns NULL if the variable you're looking for isn't defined
there.


-- Mark

Mark P. Line
Polymathix
San Antonio, TX




More information about the grass-dev mailing list