I wrote:
> Sigh, a new system call then :-(
Done ;-) I've attached the patch for pre-2.3.41-3 (also works with
2.3.40) and pivot_root.c . The complete package with examples is at
ftp://icaftp.epfl.ch/pub/people/almesber/misc/umount-root-6.tar.gz
Changes: /proc/mounts skips unreachable mount points, and quota is "dumb"
again. Umount flags are gone. Instead, there's a pivot_root system call
(with implicit global chroot), similar to what Peter suggested.
Concerning unreachable mount points: you can still get them by pivoting a
directory which is not a mount point itself, e.g. if you mount /iRoot and
/iRoot/opaque_office_beige, and then you pivot_root to
/iRoot/transp_light_yellow, /proc/mounts doesn't show
/iRoot/opaque_office_beige anymore. However, it "knows" that /iRoot is
special and shows it as /. I you pivot_root /sth /sth/junk again, all
that mess comes back under /junk/iRoot, as it should. So basically all
cases that make any sense in real life look pretty normal.
Cheers, 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 : Mon Jan 31 2000 - 21:00:16 EST