Re: bug: mount on an open directory succeeds

From: Werner Almesberger (almesber@lrc.epfl.ch)
Date: Mon Mar 06 2000 - 07:27:16 EST


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 ;-)

I don't mind if you want to change pwd as such from the mount point to
the root of the mounted file system, but I don't seen any justification
for "foo" and "./foo" to yield different results in POSIX (except, of
course the not very helpful interpretation that mount may catapult you
out of POSIX space entirely).

I.e. pwd should be either "on top" or "below", but not at both places at
once. That is, unless you mount with -o schroedinger ;-)

- Werner

-- 
  _________________________________________________________________________
 / Werner Almesberger, ICA, EPFL, CH       werner.almesberger@ica.epfl.ch /
/_IN_N_032__Tel_+41_21_693_6621__Fax_+41_21_693_6610_____________________/

- 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