mkstemp in Haskell

Peter Simons simons@cryp.to
27 May 2003 12:38:49 +0200


Martin Sjögren writes:

 > [...] there is a race between testing whether the name exists and
 > opening the file, every use of mktemp() is a security risk. The
 > race is avoided by mkstemp(3).

That's true (unless you start looking at file systems like NFS, etc.),
but if I _need_ to create a temporary directory, it's not like I have
an alternative. :-|

Peter