lkml.org 
[lkml]   [2000]   [Mar]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: bug: mount on an open directory succeeds
Date
Guest section DW wrote:
> So, I think we have to change. But it would be strange to
> have . point at the old directory, and ./a/.. at the
> mounted filesystem.

Besides, this may violate POSIX too ;-) It says something like "dot-dot
is the parent of the predecessor" (don't have The Book with me right
now).

> So, . must point at the mounted filesystem as well, precisely as we
> already do today. But then the best way to get rid of the fact that
> foo and ./foo may differ is to do like Unix6 did and return EBUSY if
> the mount point is the cwd of some process.

Hmm, this can create a subtle DoS attack for user-accessible mount:

Bad guy Good guy
cd /home/goodguy/floppy
# sits there with an evil mount ~/floppy -> EBUSY
# smile and waits fuser -k ~/floppy -> EPERM (*)
Mail -s "heeeelllp" root
...

(* or doesn't see the processes in the first place, depending on
/proc permissions)

It may also be quite inconvenient in the incremental construction of
a fully functional system environment where you launch some demons
on a partial system, then mount more stuff. E.g. PCMCIA vs. NFS.
This is admittedly somewhat exotic.

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