From: ebiederm-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org (Eric W. Biederman)
To: Gao feng <gaofeng-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>
Cc: linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH] userns: allow privileged user to operate locked mount
Date: Thu, 14 Nov 2013 17:38:48 -0800 [thread overview]
Message-ID: <871u2i30lz.fsf@xmission.com> (raw)
In-Reply-To: <52856F0D.8090206-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org> (Gao feng's message of "Fri, 15 Nov 2013 08:47:09 +0800")
Gao feng <gaofeng-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org> writes:
> On 11/15/2013 07:50 AM, Eric W. Biederman wrote:
>> Gao feng <gaofeng-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org> writes:
>>
>>> Privileged user should have rights to mount/umount/move
>>> these even locked mount.
>>
>> Hmm. This is pretty much a can't happen case, as the only exist in mount
>> namespaces where the global root isn't the root. How are you getting
>> into this situation? Using setns() ?
>>
>
> Before, priviged user can use setns to set his mount namespace to the
> container's mount namespace, and change container's mount directly.
> this patch just gives back host the control of container.
Having thought about this patch a little more I really don't like it.
There are other ways for a privileged user to get around the limitations
when the mount namespace is being created or the mounts are being
propagated.
This approach would require more then a signgle bit of accounting to
work in the nested user namespace case.
The lock says one or several mounts are mounted as a unit and need to
stay that way.
If there are real advantages to splitting things up I might be persuaded
to change my mind. But right now it looks like you are introducing
extra complexity for a very corner edge case that we don't want to
encourage people to use.
Eric
prev parent reply other threads:[~2013-11-15 1:38 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-13 7:27 [PATCH] userns: allow privileged user to operate locked mount Gao feng
[not found] ` <1384327663-12032-1-git-send-email-gaofeng-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>
2013-11-14 23:50 ` Eric W. Biederman
[not found] ` <874n7e4k78.fsf-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org>
2013-11-15 0:47 ` Gao feng
[not found] ` <52856F0D.8090206-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>
2013-11-15 1:38 ` Eric W. Biederman [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=871u2i30lz.fsf@xmission.com \
--to=ebiederm-as9lmozglivwk0htik3j/w@public.gmane.org \
--cc=containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
--cc=gaofeng-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org \
--cc=linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.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