All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Mickaël Salaün" <mic@digikod.net>
To: "Eric W. Biederman" <ebiederm@xmission.com>,
	Jann Horn <jannh@google.com>
Cc: Christoph Lameter <cl@linux.com>,
	Kees Cook <keescook@chromium.org>,
	linux-kernel@vger.kernel.org,
	Linux Containers <containers@lists.linux-foundation.org>,
	Oleg Nesterov <oleg@redhat.com>,
	Calvin Owens <calvinowens@fb.com>,
	Seth Forshee <seth.forshee@canonical.com>,
	John Stultz <john.stultz@linaro.org>,
	Al Viro <viro@zeniv.linux.org.uk>,
	Andy Lutomirski <luto@kernel.org>,
	Cyrill Gorcunov <gorcunov@openvz.org>, Jann Horn <jann@thejh.net>,
	Andrew Morton <akpm@linux-foundation.org>,
	Janis Danisevskis <jdanis@google.com>,
	Alexey Dobriyan <adobriyan@gmail.com>,
	Michael Kerrisk <mtk.manpages@gmail.com>
Subject: Re: [PATCH v2 2/2] namespaces: add transparent user namespaces
Date: Tue, 12 Jul 2016 22:11:17 +0200	[thread overview]
Message-ID: <57854EE5.1030707@digikod.net> (raw)
In-Reply-To: <87mvm6y8g9.fsf@x220.int.ebiederm.org>


[-- Attachment #1.1: Type: text/plain, Size: 2863 bytes --]

Hi,

I have been looking for this kind of feature for StemJail [1]. One of the main idea is to being able to create mount points inside a jail as an unprivileged user but to keep as much as possible the same environment from outside the jail. For now, I can only create a mapping for the current user, so when a process list any files belonging to another user/group it get "nobody", which seems weird from a user point of view :)

Regards,
Mickaël


1. https://github.com/stemjail/stemjail


On 27/06/2016 17:09, Eric W. Biederman wrote:
> 
> Added a few more relevant cc's.
> 
> Jann Horn <jannh@google.com> writes:
> 
>> This allows the admin of a user namespace to mark the namespace as
>> transparent. All other namespaces, by default, are opaque.
> 
> 
> I have just skimmed through this and at a high level this doesn't seem
> too scary.  Having an identity mapped user namespace that just limits
> you to using a subset of uids and gids while allowing displaying the
> full range of uids and gids.
> 
> I don't quite get the use case and I would like to a little better
> but in the long term this shouldn't cause any significant maintenance
> issues, so I don't have any objects.
> 
> At the same time this isn't quite the time to merge this.  I am in the
> process of slowly going through Seth's vfs changes to support things
> such as truly unprivileged fuse support.  Those changes alter which
> places can always be assumed to be init_user_ns (many fewer), and also
> slightly change the set of from_kuid calls being made.
> 
> The changes that have made it through my review currently reside at:
> 
>     git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace.git for-next
> 
> Those vfs changes make it conceivable and simple from an infrastructure
> standpoint to transition fileystems to unprivileged user namespace
> mounts, with perhaps as little work as just setting FS_USER_NS.  At the
> same time that won't be recommend because of the difficulty verifying
> evil filesystem contents can't cause fs implementations to do bad things
> is difficult.
> 
> That change means your first patch that just zaps all from_kuid_munged
> users in init_user_ns isn't a particularly good idea.  I don't think it
> is a good idea to have one set of rules for things that will always be
> init_user_ns and another set of rules for code that will change.
> 
> The long and short of this is I am asking you to wait a week or so and
> rebase this on my for-next branch so that we can confirm this change
> interacts nicely will all of the other on-going work.
> 
> Thank you,
> Eric Biederman
> _______________________________________________
> Containers mailing list
> Containers@lists.linux-foundation.org
> https://lists.linuxfoundation.org/mailman/listinfo/containers
> 




[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 455 bytes --]

  reply	other threads:[~2016-07-12 20:19 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-23 11:11 [PATCH] namespaces: add transparent user namespaces Jann Horn
2016-06-23 18:50 ` Eric W. Biederman
2016-06-23 20:02   ` Jann Horn
2016-06-23 20:04     ` Eric W. Biederman
2016-06-25  0:23     ` [PATCH v2 1/2] namespaces: don't use from_k*id_munged() with init_user_ns Jann Horn
2016-06-25  0:23       ` [PATCH v2 2/2] namespaces: add transparent user namespaces Jann Horn
2016-06-27  3:34         ` Michael Kerrisk
2016-06-27  3:34           ` Michael Kerrisk
     [not found]         ` <1466814210-3778-2-git-send-email-jannh-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
2016-06-27 15:09           ` Eric W. Biederman
2016-06-27 15:09             ` Eric W. Biederman
2016-07-12 20:11             ` Mickaël Salaün [this message]
     [not found]               ` <57854EE5.1030707-WFhQfpSGs3bR7s880joybQ@public.gmane.org>
2016-07-12 22:32                 ` Eric W. Biederman
2016-07-12 22:32                   ` Eric W. Biederman
     [not found]             ` <87mvm6y8g9.fsf-JOvCrm2gF+uungPnsOpG7nhyD016LWXt@public.gmane.org>
2016-07-12 20:11               ` Mickaël Salaün

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=57854EE5.1030707@digikod.net \
    --to=mic@digikod.net \
    --cc=adobriyan@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=calvinowens@fb.com \
    --cc=cl@linux.com \
    --cc=containers@lists.linux-foundation.org \
    --cc=ebiederm@xmission.com \
    --cc=gorcunov@openvz.org \
    --cc=jann@thejh.net \
    --cc=jannh@google.com \
    --cc=jdanis@google.com \
    --cc=john.stultz@linaro.org \
    --cc=keescook@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@kernel.org \
    --cc=mtk.manpages@gmail.com \
    --cc=oleg@redhat.com \
    --cc=seth.forshee@canonical.com \
    --cc=viro@zeniv.linux.org.uk \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.