From: Nathan Lynch <ntl@pobox.com>
To: "Serge E. Hallyn" <serge@hallyn.com>
Cc: containers@lists.linux-foundation.org,
kernel list <linux-kernel@vger.kernel.org>,
dhowells@redhat.com, LSM <linux-security-module@vger.kernel.org>,
Michael Kerrisk <mtk.manpages@gmail.com>,
"Eric W. Biederman" <ebiederm@xmission.com>
Subject: Re: [PATCH 09/10] userns: check user namespace for task->file uid equivalence checks
Date: Tue, 01 Mar 2011 16:24:41 -0600 [thread overview]
Message-ID: <1299018281.461.16.camel@tp-t61> (raw)
In-Reply-To: <20110224150315.GI8262@mail.hallyn.com>
On Thu, 2011-02-24 at 15:03 +0000, Serge E. Hallyn wrote:
> --- a/include/linux/fs.h
> +++ b/include/linux/fs.h
> @@ -1446,8 +1446,13 @@ enum {
> #define put_fs_excl() atomic_dec(¤t->fs_excl)
> #define has_fs_excl() atomic_read(¤t->fs_excl)
>
> -#define is_owner_or_cap(inode) \
> - ((current_fsuid() == (inode)->i_uid) || capable(CAP_FOWNER))
> +/*
> + * until VFS tracks user namespaces for inodes, just make all files
> + * belong to init_user_ns
> + */
> +extern struct user_namespace init_user_ns;
init_user_ns gets declared in fs.h in this patch, utsname.h in patch #1,
capability.h in #2, ipc_namespace.h in #7. Could this declaration be
kept to a single header?
next prev parent reply other threads:[~2011-03-01 22:25 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-24 15:01 [PATCH 01/10] Add a user_namespace as creator/owner of uts_namespace Serge E. Hallyn
2011-02-24 15:02 ` [PATCH 02/10] security: Make capabilities relative to the user namespace Serge E. Hallyn
2011-02-24 15:02 ` [PATCH 03/10] allow sethostname in a container Serge E. Hallyn
2011-02-24 15:02 ` [PATCH 04/10] allow killing tasks in your own or child userns Serge E. Hallyn
2011-02-24 15:02 ` [PATCH 05/10] Allow ptrace from non-init user namespaces Serge E. Hallyn
2011-02-24 16:57 ` David Howells
2011-02-24 15:02 ` [PATCH 06/10] user namespaces: convert all capable checks in kernel/sys.c Serge E. Hallyn
2011-02-24 15:03 ` [PATCH 07/10] add a user namespace owner of ipc ns Serge E. Hallyn
2011-02-24 15:03 ` [PATCH 08/10] user namespaces: convert several capable() calls Serge E. Hallyn
2011-02-24 15:03 ` [PATCH 09/10] userns: check user namespace for task->file uid equivalence checks Serge E. Hallyn
2011-03-01 22:24 ` Nathan Lynch [this message]
2011-03-01 23:07 ` Serge E. Hallyn
2011-02-24 15:03 ` [PATCH 10/10] rename is_owner_or_cap to inode_owner_or_capable Serge E. Hallyn
2011-02-24 17:03 ` [PATCH 01/10] Add a user_namespace as creator/owner of uts_namespace David Howells
2011-03-01 0:28 ` Andrew Morton
2011-03-01 5:37 ` Serge E. Hallyn
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=1299018281.461.16.camel@tp-t61 \
--to=ntl@pobox.com \
--cc=containers@lists.linux-foundation.org \
--cc=dhowells@redhat.com \
--cc=ebiederm@xmission.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-security-module@vger.kernel.org \
--cc=mtk.manpages@gmail.com \
--cc=serge@hallyn.com \
/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