From: "W. Trevor King" <wking@tremily.us>
To: "Michael Kerrisk (man-pages)" <mtk.manpages@gmail.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>,
"Serge E. Hallyn" <serge@hallyn.com>,
linux-api@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-fsdevel@vger.kernel.org, Andrey Vagin <avagin@openvz.org>,
James Bottomley <James.Bottomley@hansenpartnership.com>,
Alexander Viro <viro@zeniv.linux.org.uk>
Subject: Re: [PATCH v3 2/2] nsfs: Add an ioctl() to return owner UID of a userns
Date: Mon, 16 Jan 2017 17:19:48 -0800 [thread overview]
Message-ID: <20170117011948.GC10810@odin.tremily.us> (raw)
In-Reply-To: <daac6f7d-bc1e-bd61-355b-e47cf93e2535@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 843 bytes --]
On Tue, Jan 17, 2017 at 02:03:29PM +1300, Michael Kerrisk (man-pages) wrote:
> + case NS_GET_OWNER_UID:
> + if (ns->ops->type != CLONE_NEWUSER)
> + return -EINVAL;
> + user_ns = container_of(ns, struct user_namespace, ns);
> + argp = (unsigned int __user *) arg;
> + uid = from_kuid_munged(current_user_ns(), user_ns->owner);
> + return put_user(uid, argp);
> …
> +/* Get owner UID for a user namespace */
> +#define NS_GET_OWNER_UID _IO(NSIO, 0x4)
The comment here should probably be:
Get owner UID (in the current user namespace) for a user namespace
or some such, to convey that current_user_ns is being passed to
from_kuid_munged.
Cheers,
Trevor
--
This email may be signed or encrypted with GnuPG (http://www.gnupg.org).
For more information, see http://en.wikipedia.org/wiki/Pretty_Good_Privacy
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2017-01-17 1:19 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <69550fe9-5347-309c-b421-79c16a6300f6@gmail.com>
2017-01-17 1:03 ` [PATCH v3 1/2] nsfs: Add an ioctl() to return the namespace type Michael Kerrisk (man-pages)
2017-01-17 1:03 ` [PATCH v3 2/2] nsfs: Add an ioctl() to return owner UID of a userns Michael Kerrisk (man-pages)
2017-01-17 1:19 ` W. Trevor King [this message]
2017-01-19 2:12 ` Michael Kerrisk (man-pages)
2017-01-24 22:35 ` Eric W. Biederman
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=20170117011948.GC10810@odin.tremily.us \
--to=wking@tremily.us \
--cc=James.Bottomley@hansenpartnership.com \
--cc=avagin@openvz.org \
--cc=ebiederm@xmission.com \
--cc=linux-api@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mtk.manpages@gmail.com \
--cc=serge@hallyn.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).