lkml.org 
[lkml]   [2000]   [Mar]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: bug: mount on an open directory succeeds
Date
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/

\
 
 \ /
  Last update: 2005-03-22 13:56    [from the cache]
©2003-2014 Jasper Spaans. Advertise on this site