lkml.org 
[lkml]   [1999]   [Jun]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [RFC] Bug in mkdir(2)
Date
From
> > 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.

> For temporary files in /tmp which do not need a well known name it is probably
> the best to just choose such real random numbers, anyway. This solves i.e.
> often some denial of service attack possibilties. But this is my very private
> opinion and this method seems not to be used often.

What everyone else relies on is the modern unix guarantee that mkdir does
not follow links. Whats more some packages test for this property and compile
differently if the mkdir is sane. Linux packages assume it is sane, so we
_must_ preserve this property

Alan


-
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.069 / U:0.600 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site