Bugtraq mailing list archives

Re: /tmp topic


From: Brad Cavanagh <brad () success-info com>
Date: Fri, 15 Dec 2000 16:19:58 -0800

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


Current thread: