Messages in this thread | | | Date | Mon, 6 Mar 2000 08:20:47 -0500 (EST) | From | Alexander Viro <> | Subject | Re: bug: mount on an open directory succeeds |
| |
On Mon, 6 Mar 2000, Werner Almesberger wrote:
> Alexander Viro wrote: > > However, it operates on object, not on the name. So valid description is > > "if result of lookup is a mountpoint you must go upwards", not "if the > > name of component is the name mountpoint you should go to the root of > > mounted tree instead of doing lookup". > > Ah, I see where the problem is. Don't forget that, according to POSIX, > "foo" and "./foo" are _identical_. > > (Which is interesting - I can imagine that some implementations actually > read the inode of ".", so if the permissions have changed since the > chdir, they'd be non-compliant. POSIX normally carefully avoids making > such strong assertions in similar cases ;-)
Oh? Please, try to do the following: mkdir /tmp/foo cd /tmp/foo chmod a-x . strace ls . 2>&1|more and watch for lstat(".") - you will be surprised. Now do cd /tmp ls foo to prove that problem is _not_ in the object - it's lookup complaining about access permissions. And here we agree with damn next to everything. I'm too lazy to dig out the Lions Book or build Supnik's emulator and boot the thing, but I seriously suspect that v6 gave the same behaviour.
- 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/
| |