bug-enscript
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug-enscript] enscript and temp file location


From: Tapani Tarvainen
Subject: Re: [bug-enscript] enscript and temp file location
Date: Fri, 25 Apr 2008 11:50:37 +0300
User-agent: Mutt/1.5.15+20070412 (2007-04-11)

On Fri, Apr 25, 2008 at 10:15:05AM +0200, Giulio Orsero (address@hidden) wrote:

> On Fri, 25 Apr 2008 00:22:40 +0100, Tim Retout <address@hidden> wrote:

> >enscript currently uses the tmpfile() function from glibc to create
> >temporary files:

Which, as you know, has file location hardwired, usually at /tmp.

> >It might be possible to use mkstemp() instead with a configurable
> >location, but it seems a bit complicated to me.
> >
> >I would recommend that you free some space in /tmp, to be honest - are
> >these files really that large?

Since the temporary files' size grows with user-supplied input, they 
can get arbitrarily big, and many systems have fairly small /tmp
(in particular, often /tmp is a ramdisk for speed reasons).

My vote goes to using mkstemp() despite the extra code required,
preferably using TMPDIR environment variable. See, e.g., the
example function smart_create_tempfile at
http://www.dwheeler.com/secure-programs/Secure-Programs-HOWTO/avoid-race.html

-- 
Tapani Tarvainen




reply via email to

[Prev in Thread] Current Thread [Next in Thread]