Re: bug: mount on an open directory succeeds

From: V Ganesh (ganesh@veritas.com)
Date: Mon Mar 06 2000 - 05:03:56 EST


> > On Mon, 06 Mar 2000, Alexander Viro wrote:
> > > On Mon, 6 Mar 2000, Amit S. Kale wrote:
> > >
> > > > Hi,
> > > > mount on an open directory succeeds.
> > >
> > > Yes, it does. WTF makes you think that it's a bug?
> >
> > If allowing mount on open directory is correct, readdir and lookup on
> > mountpoint should have consistency. As I had pointed out:
>
> They have. ls(1) is buggy, that's it. If you want the listing of "." -
> fine, open ".", but then you must care to call stat() on ./name. Yes,
> there is no way to open the mountpoint. So?

so it breaks the assumption that . == pwd.
$ ls
foo bar
$ cat foo
foo: no such file or directory
$ cat ./foo
FOO
$

cat foo ought to have worked. anything else is a gross violation of the least
surprise principle, if not any actual standard.

ganesh

-
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/



This archive was generated by hypermail 2b29 : Tue Mar 07 2000 - 21:00:19 EST