lkml.org 
[lkml]   [1999]   [Jun]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [RFC] Bug in mkdir(2)
Date
Wolfgang Walter writes ("Re: [RFC] Bug in mkdir(2)"):
> On Wed, Jun 16, 1999 at 10:11:00PM +0100, Alan Cox wrote:
> >
> > You can demonstrate the link following race for O_EXCL|O_CREAT is insoluble.
>
> Yes. But it is possible to reduce it to a practical minimal risk by using
> a long enough really random filename and if this succeeds, to rename it to
> the wished name.

Using directories in /tmp is a common way for portable shell scripts
to create temporary files safely. A portable shell script cannot use
mktemp or noclobber, and I really don't want to have to implement a
cryptographically strong RNG in shell script!

Peter

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:52    [W:0.084 / U:0.308 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site