From: James Bottomley <James.Bottomley@HansenPartnership.com>
To: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Linux Containers <containers@lists.linux-foundation.org>,
util-linux@vger.kernel.org
Subject: Re: bind mounting namespace inodes for unprivileged users
Date: Wed, 04 May 2016 14:00:53 -0400 [thread overview]
Message-ID: <1462384853.14310.87.camel@HansenPartnership.com> (raw)
In-Reply-To: <87futx3eid.fsf@x220.int.ebiederm.org>
On Wed, 2016-05-04 at 12:43 -0500, Eric W. Biederman wrote:
> James Bottomley <James.Bottomley@HansenPartnership.com> writes:
> > On Wed, 2016-05-04 at 09:38 -0500, Eric W. Biederman wrote:
> > > James Bottomley <James.Bottomley@HansenPartnership.com> writes:
> > > > So, does anyone have any strong (or even weak) opinions about
> > > > this before I start coding patches?
> > >
> > > The mount namespace is complex and getting it right is a pain in
> > > the rear. So adding yet another path and piece in to the
> > > existing complexity makes me cringe a little.
> >
> > Yes, well which is worse: having no way to bind unprivileged
> > containers without spawning a long running process or having a way
> > to bind them which may lead to unremovable files. Since I just use
> > sudo mount --bind anyway for my containers, I don't see the file
> > removal argument as too daunting.
>
> So far with setns support I haven't felt the need to bind mount
> containers. So I am not certain it is an either or choice.
>
> And of course the other side of the craziness is having a mount point
> on a filesystem makes that filesystem unmountable (except for lazy
> unmounts). So getting this wrong could affect clean shutdowns and
> reboots.
OK, I by this argument a little. It could be circumvented by having
the shutdown script remove all container bindings, though. This seems
to work
umount -t nsfs -a
> Which suggests it may be wise to limit this kind of thing
> to a tmpfs like /run/user/<uid>/.
>
> Mostly this is my way of say tread carefully because there be dragons
> here.
Understood. Even though fixing the pinned filesystem issue can be
done, I do agree that it makes the problem knottier.
James
prev parent reply other threads:[~2016-05-04 18:00 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-03 18:20 bind mounting namespace inodes for unprivileged users James Bottomley
2016-05-03 21:22 ` Serge Hallyn
2016-05-04 11:15 ` James Bottomley
2016-05-04 8:44 ` Karel Zak
2016-05-04 13:16 ` James Bottomley
2016-05-04 14:38 ` Eric W. Biederman
2016-05-04 17:28 ` James Bottomley
2016-05-04 17:43 ` Eric W. Biederman
2016-05-04 18:00 ` James Bottomley [this message]
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=1462384853.14310.87.camel@HansenPartnership.com \
--to=james.bottomley@hansenpartnership.com \
--cc=containers@lists.linux-foundation.org \
--cc=ebiederm@xmission.com \
--cc=util-linux@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