lkml.org 
[lkml]   [2004]   [Aug]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: silent semantic changes with reiser4
On Thu, Aug 26, 2004 at 01:43:59AM -0700, Hans Reiser wrote:
> >Again, O_DIRECTORY was added to solve a real-world race, not just for
> >the sake of it.
> >
> Can you supply more details and we will try to reply concretely? Thanks.

It's really userland programming 101 :)

you need to fstat after open to really check that no one swtiched the
path below you to a fifo or device, O_DIRECTORY gets that directly in
the open call, with the additional benefit of making sure you don't
get any of the sideeffects at all that would happen if you're opening
a device file.

the current reiser4 semantics break that and as soon as you're having a
world-writeable (e.g. /tmp) dir on it and someone is doing an opendir
on it he's lost.

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

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