From: serge@hallyn.com (Serge E. Hallyn)
To: linux-security-module@vger.kernel.org
Subject: [manpages PATCH] capabilities.7: describe namespaced file capabilities
Date: Thu, 19 Apr 2018 18:57:34 -0500 [thread overview]
Message-ID: <20180419235733.GA8785@mail.hallyn.com> (raw)
In-Reply-To: <CAG48ez2zb2XgKKRpg=mrhG8_C0p+3gKaNeXyRR_ru5=FLB5pNg@mail.gmail.com>
Quoting Jann Horn (jannh at google.com):
> On Fri, Apr 13, 2018 at 9:26 PM, Michael Kerrisk (man-pages)
> <mtk.manpages@gmail.com> wrote:
> > Hello Serge, Jann,
> [...]
> >>> Likewise,
> >>> +.BR getxattr(2)
> >>> +results will be converted and simplified to show a VFS_CAP_REVISION_2
> >>> +extended attribute, if a VFS_CAP_REVISION_3 applies to the caller's
> >>> +namespace, or to map the VFS_CAP_REVISION_3 root user ID into the
> >>> +caller's namespace.
> >
> > I haven't captured that last paragraph in my text. I'm not sure I
> > understand the idea being presented. Serge, could you elaborate?
>
> Summary: When you read a capability attribute with getxattr(), the
> kernel will rewrite the returned value such that it looks the way it
> would have to look if the filesystem was mounted in your user
> namespace; just like how, when the attribute is written, the caller
> provides an attribute value written as if the filesystem was mounted
> in the caller's user namespace.
> Conceptually, this is mostly the same as the UID conversions applied
> by chown() and stat().
Right. If it is a V3, and the .rootid maps to a valid uid in your
namespace besides 0, then .rootid will be mapped to the valid user in your
namespace; if it is 0, then a V2 capability xattr will be presented.
If the real xattr is a V2, then a V2 is presented.
--
To unsubscribe from this list: send the line "unsubscribe linux-security-module" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2018-04-19 23:57 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-09 18:52 [manpages PATCH] capabilities.7: describe namespaced file capabilities Serge E. Hallyn
2018-01-14 9:40 ` Michael Kerrisk (man-pages)
2018-01-15 4:31 ` Serge E. Hallyn
2018-01-16 17:26 ` Jann Horn
2018-01-16 17:38 ` Serge E. Hallyn
2018-01-17 23:44 ` Michael Kerrisk (man-pages)
2018-04-13 19:29 ` Michael Kerrisk (man-pages)
2018-04-15 19:22 ` Serge E. Hallyn
2018-04-22 16:46 ` Michael Kerrisk (man-pages)
2018-04-23 17:57 ` Serge E. Hallyn
2018-04-24 15:13 ` Eric W. Biederman
2018-04-13 19:26 ` Michael Kerrisk (man-pages)
2018-04-16 14:10 ` Jann Horn
2018-04-19 23:57 ` Serge E. Hallyn [this message]
2018-05-04 15:10 ` Michael Kerrisk (man-pages)
2018-04-20 0:04 ` 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=20180419235733.GA8785@mail.hallyn.com \
--to=serge@hallyn.com \
--cc=linux-security-module@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).