From: "Roman V. Shaposhnik" <rvs@sun.com>
To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net>
Subject: Re: [9fans] several things
Date: Wed, 15 Oct 2008 02:42:22 -0700 [thread overview]
Message-ID: <1224063742.4463.145.camel@goose.sun.com> (raw)
In-Reply-To: <26c1814ccfc8559a96987385a144c4e7@quanstro.net>
On Mon, 2008-10-13 at 18:35 -0400, erik quanstrom wrote:
> > 4) What is the sense of
> > bind 'sth' 'the_same_sth'
> > ? (like 'bind / /' or 'bind /usr/ruda/a /usr/ruda/a')
>
> i believe this is a noop. in the case of "bind / /", look
> at /lib/namespace. consider the case where $rootdir
> isn't nil.
I have always thought, that the only reason for "bind <foo> <foo>"
is so that subsequent "bind -a/-b" would work:
http://groups.google.com/group/comp.os.plan9/browse_thread/thread/c6cc9fb882978983/5067403b25124bac?hl=en&lnk=gst&q=bind+#5067403b25124bac
I would really love to be educated is there's something more
subtle to it.
> > 5) When I do
> >
> > cd
> > mkdir a
> > mntgen a
> > bind lib a/b
> > unmount a
> >
> > all these command finish ok, but I am left with
> >
> > bind /usr/ruda/lib /usr/ruda/a/b
> >
> > in the namespace (see the result of the 'ns' command; there you can also
> > spot that after issueing the 'mntgen' command a line
> > 'bind /usr/ruda/a /usr/ruda/a/' appears; that relates to my 4th question;
> > this bind is the one removed by the 'unmount' command).
> > How can I get rid of that then?
>
> i don't think any pruning of inaccessable bits of
> the namespace is ever done. consider a program
> like ftpd which via /lib/namespace.ftp (sic) typically
> binds something like /usr/ftp/ onto /. while everything
> above /usr/ftp is unaccessable, it's not removed from
> the namespace and you can't touch it.
>
> ; mntgen a
> ; bind /env a/env
> ; bind /bin a/bin
> ; bind /proc a/proc
> ; bind a /
> ; ns
>
> consider it a security feature.
Be it as it may, I still can't quite follow why *manual* pruning
of the entries from the namespace would be forbidden. unmount(2)
takes two strings as arguments, right? It doesn't even need an fd.
Thanks,
Roman.
next prev parent reply other threads:[~2008-10-15 9:42 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-13 21:35 Rudolf Sykora
2008-10-13 22:35 ` erik quanstrom
2008-10-14 8:10 ` Rudolf Sykora
2008-10-14 9:30 ` Steve Simon
2008-10-14 12:22 ` Yaroslav
2008-10-14 13:15 ` Charles Forsyth
2008-10-14 21:44 ` Derek Fawcus
2008-10-14 22:28 ` Charles Forsyth
2008-10-15 9:42 ` Roman V. Shaposhnik [this message]
2008-10-15 12:17 ` erik quanstrom
2008-10-18 7:26 ` Roman V. Shaposhnik
2008-10-20 14:09 ` Yaroslav
2008-10-20 17:21 ` Roman V. Shaposhnik
2008-10-13 22:51 ` Pietro Gagliardi
2008-10-14 3:07 erik quanstrom
2008-10-14 13:03 erik quanstrom
2008-10-14 14:07 ` Kernel Panic
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=1224063742.4463.145.camel@goose.sun.com \
--to=rvs@sun.com \
--cc=9fans@9fans.net \
/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).