Ethereal-dev: Re: [Ethereal-dev] [Patch] asn1 plugin

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Guy Harris <guy@xxxxxxxxxxxx>
Date: Mon, 3 Nov 2003 02:34:03 -0800
On Sun, Nov 02, 2003 at 02:12:28PM +0100, Gisle Vanem wrote:
> * Added a new function get_file_in_temp() to
>   epan/filesystem.c. This because of asn1.dll plugin which 
>   had code to write to a log-file "c:\temp\ethereal.log". I feel 
>   this patch makes this safer; I don't even have a c:\temp dir.

At least some versions of Windows have it; NT 5.x has a per-user
tempfile directory, as I remember, and perhaps some of them lack the
global c:\temp directory.

Perhaps "get_tempfile_path()" should default to "c:\temp" if it exists,
and "c:\" if it doesn't.

Also, note that there's a routine "create_tempfile()" in "util.c" - but,
on UNIX, it defaults to "/var/tmp" rather than "/tmp".  Should it use
"get_tempfile_path()"?  And should "get_tempfile_path()" default to
"/tmp" or "/var/tmp" on UNIX?  The former is often cleaned on reboot,
which might be a bug or a feature; on SunOS 5.x, it's implemented as an
in-virtual-memory file system, which means it might run faster than
"/var/tmp".  However, "/var/tmp" is often on a file system with more
space than "/tmp", so *large* temporary files should perhaps go in
"/var/tmp".