linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christopher Allen Wing <wingc@engin.umich.edu>
To: "John Anthony Kazos Jr." <jakj@j-a-k-j.com>
Cc: linux-fsdevel@vger.kernel.org
Subject: Re: Direct VFS/SB Access and Private Submounting
Date: Wed, 21 Mar 2007 10:51:05 -0400 (EDT)	[thread overview]
Message-ID: <Pine.LNX.4.63.0703211035200.32478@gx620.engin.umich.edu> (raw)

Hello,

not sure if someone has written you back about this already, but what you 
are trying to do (look 'underneath' a mount point) can be done easily 
without kernel modifications.

You can bind mount an existing filesystem to a new location, and examine 
its contents without following existing mount points.

e.g. suppose you want to look at the directory on your root filesystem 
upon which /proc is mounted:

 	# mount |grep 'on /proc type proc'
 	none on /proc type proc (rw)

this is what the root of the /proc filesystem looks like:

 	# ls -ld /proc
 	dr-xr-xr-x  200 root root 0 Mar  1 18:06 /proc


Now, temporarily bind mount the root to someplace else:

 	# mkdir /tmp/look
 	# mount --bind / /tmp/look


Now you can examine the directory underlying /proc in the root:

 	# ls -ld /tmp/look/proc
 	drwxr-xr-x  2 root root 4096 Sep 26  2005 /tmp/look/proc

 	# umount /tmp/look



In general I would assume that a package manager shouldn't be concerned 
about these types of things, since permanent mountpoints should always be 
mounted when a system is in its normal state, thus there would be no 
reason to care about what's 'underneath' a mountpoint.  (If someone had 
root access, they could be hiding stuff there, but it they had root access 
they could do a whole lot of other bad things)


-Chris Wing
wingc@engin.umich.edu

             reply	other threads:[~2007-03-21 15:22 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-21 14:51 Christopher Allen Wing [this message]
  -- strict thread matches above, loose matches on Subject: below --
2007-03-18 11:40 Direct VFS/SB Access and Private Submounting John Anthony Kazos Jr.

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.63.0703211035200.32478@gx620.engin.umich.edu \
    --to=wingc@engin.umich.edu \
    --cc=jakj@j-a-k-j.com \
    --cc=linux-fsdevel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).