lkml.org 
[lkml]   [1998]   [Jun]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: mount(2) bug found
On Tue, 16 Jun 1998, Chris Wedgwood wrote:
> On Mon, Jun 15, 1998 at 04:38:33PM +0200, Rik van Riel wrote:
> >
> > The directory gets mounted correctly, however the status
> > in /proc/mounts is _not_ displayed correctly. After I've
> > installed Stampede, I'll investigate the bug and correct
> > it for both 2.0 and 2.1 kernels...
>
> 'Thats not a bug - its a feature' <tm>.

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

\
 
 \ /
  Last update: 2005-03-22 13:43    [W:0.180 / U:3.424 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site