It _is_ a bug. Just look at the following scenario:
mirkwood:# df
/dev/root / <blahblahblah>
/dev/sda4 /stampede <blahblahblah>
mirkwood:# chroot /stampede /bin/bash
chroot:# mount /dev/sda1 /mnt
chroot:# mount -t proc none /proc
<flip to other console>
mirkwood:# cat /proc/mounts
/dev/root / <blah>
/dev/sda4 /stampede <blah>
none /proc <blah>
/dev/sda1 /mnt <blah> <-- mounted on /stampede/mnt
none /proc <blah> <-- mounted on /stampede/proc
So you see, it _is_ a bug... This is mainly because
programs like 'df' depend on the fact that the FSes
are correctly listed.
The above setup clearly breaks 'df' and other programs.
Furthermore, it would be nice to have chroot() in such
a way that you can't see you're chroot()ed...
The security buffs would probably like such a setup
too :-)
Rik.
+-------------------------------------------------------------------+
| Linux memory management tour guide. H.H.vanRiel@phys.uu.nl |
| Scouting Vries cubscout leader. http://www.phys.uu.nl/~riel/ |
+-------------------------------------------------------------------+
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu