lkml.org 
[lkml]   [1999]   [Jan]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subject2.2.0pre7: O_DIRECTORY|O_NOFOLLOW broken
Linus,

The bug is that this will successfully open a regular file, despite the
O_DIRECTORY assertion.

The combination O_NOFOLLOW | O_DIRECTORY is actually quite useful, for
programs that search directory trees.

The form O_DIRECTORY _without_ O_NOFOLLOW is equivalent to appending "/"
to the path name, so that is far less useful. But there is no good
equivalent to O_NOFOLLOW | O_DIRECTORY that works.

The bug is in fs/namei.c:lookup_dentry(), and quite obvious. Do you
want me to write a patch?

-- Jamie

-
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:49    [W:0.029 / U:0.172 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site