[18133] in bugtraq

home help back first fref pref prev next nref lref last post

Re: /tmp topic

daemon@ATHENA.MIT.EDU (Brad Cavanagh)
Mon Dec 18 18:15:57 2000

Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Message-Id:  <5BC28CAF315BBD44AE76EA844EBF14210A74FC@exchange.internal.success-info.com>
Date:         Fri, 15 Dec 2000 16:19:58 -0800
Reply-To: brad@success-info.com
From: Brad Cavanagh <brad@SUCCESS-INFO.COM>
To: BUGTRAQ@SECURITYFOCUS.COM
In-Reply-To:  <5BC28CAF315BBD44AE76EA844EBF142109F5B6@exchange.internal.success-info.com>

> Is there a standard or a guide or a "HOWTO" <g> on using tmp
> directories safely? About using mkstemp(), assigning correct
> permissions, erasing the file at program termination, etc.

Well, Tim Jenness wrote the File::Temp module for Perl which returns the
filehandle and filename together, which helps guarantee that a race condition
cannot occur between checking for the existence of the file and its opening.

http://search.cpan.org/search?dist=File-Temp

The readme has a small smattering of information on temporary file creation and
the like, so it could be of interest to some people.

---
Brad Cavanagh, Success Information Systems
phone: (250) 381-8811  fax: (250) 381-8815
web: http://www.success-info.com

home help back first fref pref prev next nref lref last post