[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <87d2m2t612.fsf@xmission.com>
Date: Fri, 15 Nov 2013 00:37:13 -0800
From: ebiederm@...ssion.com (Eric W. Biederman)
To: Gao feng <gaofeng@...fujitsu.com>
Cc: Andy Lutomirski <luto@...capital.net>,
Linux Containers <containers@...ts.linux-foundation.org>,
"Serge E. Hallyn" <serge@...lyn.com>,
Linux FS Devel <linux-fsdevel@...r.kernel.org>,
"linux-kernel\@vger.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [REVIEW][PATCH 1/2] userns: Better restrictions on when proc and sysfs can be mounted
Gao feng <gaofeng@...fujitsu.com> writes:
> Ok,I agree with you that we should make container security by default.
>
> What's your idea that introduces option MS_NOT_A_LOCK just like Andy's
> advisement?
It might be doable but it is unnecessary.
> In libvirt, host creates dev and devpts directories for container,then
> mount devpts, tmpfs on them and create device nodes inside these dirs
> for container. and then in container, these filesystems are moved to
> container's /dev/ /dev/pts directory. We really have no need to lock
> these mounts. they are just created for container.
If the global root creates the namespace and performs all of the mounts
it is unnecessary.
Now I believe you can create those directories for the most part as
non-root in libvirt and gain some interesting applications.
That said if you don't want locked mounts you just just be able to
create a temporary mount namespace as the global root, and do your prep
work.
Then create your unprivileged mount namespace and bind mount the
directories where you want them, and then pivot_root away the bits you
don't want.
There is already more mechanism than I like to deal with the mount
namespace I would really rather not invent/debug/support any more.
Eric
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists