linux-api.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Documentation patch for namespaced file capabilities
@ 2017-11-20  9:36 Michael Kerrisk (man-pages)
       [not found] ` <CAKgNAkiAeqbD=G6hnExh4cC84nA2mU6xdLzzS0F2x1wviEPgHg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  2017-11-29 17:58 ` Serge E. Hallyn
  0 siblings, 2 replies; 4+ messages in thread
From: Michael Kerrisk (man-pages) @ 2017-11-20  9:36 UTC (permalink / raw)
  To: Serge E. Hallyn
  Cc: Amir Goldstein, Stefan Berger, Eric W. Biederman,
	Linux Containers, lkp, xiaolong.ye, linux-kernel, Mimi Zohar,
	Tycho Andersen, James Bottomley, christian.brauner, Vivek Goyal,
	LSM List, Casey Schaufler, Linux API, Michael Kerrisk

Hi Serge,

At the moment man-pages lacks documentation of the namespaced file
capability feature that you added with commit
8db6c34f1dbc8e06aa016a9b829b06902c3e1340. Would you be able to send a
patch describing the feature?

Presumably, the patch would be for the capabilities(7) page (or
perhaps for the user_namespaces(7) page, if that seems more
appropriate), As well as documenting the semantics, it would be good
to include an example or two of the notation that is used for the
xattr names.

Presumably also there will be some changes in userspace tools
(setcap/getcap?). Do you know anything about what's happening there?

Cheers,

Michael


-- 
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Documentation patch for namespaced file capabilities
       [not found] ` <CAKgNAkiAeqbD=G6hnExh4cC84nA2mU6xdLzzS0F2x1wviEPgHg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2017-11-20 16:03   ` Eric W. Biederman
  0 siblings, 0 replies; 4+ messages in thread
From: Eric W. Biederman @ 2017-11-20 16:03 UTC (permalink / raw)
  To: Michael Kerrisk (man-pages)
  Cc: Serge E. Hallyn, Amir Goldstein, Stefan Berger, Linux Containers,
	lkp-JC7UmRfGjtg, xiaolong.ye-ral2JQCrhuEAvxtiuMwx3w,
	linux-kernel, Mimi Zohar, Tycho Andersen, James Bottomley,
	christian.brauner-cl+VPiYnx/1AfugRpC6u6w, Vivek Goyal, LSM List,
	Casey Schaufler, Linux API

"Michael Kerrisk (man-pages)" <mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:

> Hi Serge,
>
> At the moment man-pages lacks documentation of the namespaced file
> capability feature that you added with commit
> 8db6c34f1dbc8e06aa016a9b829b06902c3e1340. Would you be able to send a
> patch describing the feature?
>
> Presumably, the patch would be for the capabilities(7) page (or
> perhaps for the user_namespaces(7) page, if that seems more
> appropriate), As well as documenting the semantics, it would be good
> to include an example or two of the notation that is used for the
> xattr names.
>
> Presumably also there will be some changes in userspace tools
> (setcap/getcap?). Do you know anything about what's happening there?


Just a quick summary.

- The capability name does not change.

- From inside a user namespace the capability works as for ``root'' as
  existing tools expect.  (AKA the capability is mapped into the current
  user namespace).

- From outside a user namespace the version of the capability is
  incremented, and a uid of the root user in a user namespace is added
  at the end in the new version of the capability.

So for the capabilities(7) manpage I would add to the File capablities
section:

Since Kernel v4.14 the kernel supports setting file capabilities inside
a user namespace.  In which case an additional uid is stored indicating
the root user of the user namespace the file capabilitity is active in.

When a file is executed and it has a file capability limited to a user
namespace, the kernel takes the uid from the capability and if that uid
matches the uid of the root user of the user namespace or the root user
of an ancestor namespace the capability is applied.  Otherwise the
capability is ignored.

Eric

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Documentation patch for namespaced file capabilities
  2017-11-20  9:36 Documentation patch for namespaced file capabilities Michael Kerrisk (man-pages)
       [not found] ` <CAKgNAkiAeqbD=G6hnExh4cC84nA2mU6xdLzzS0F2x1wviEPgHg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2017-11-29 17:58 ` Serge E. Hallyn
  2017-12-19 15:33   ` Michael Kerrisk (man-pages)
  1 sibling, 1 reply; 4+ messages in thread
From: Serge E. Hallyn @ 2017-11-29 17:58 UTC (permalink / raw)
  To: Michael Kerrisk (man-pages)
  Cc: Serge E. Hallyn, Amir Goldstein, Stefan Berger,
	Eric W. Biederman, Linux Containers, lkp, xiaolong.ye,
	linux-kernel, Mimi Zohar, Tycho Andersen, James Bottomley,
	christian.brauner, Vivek Goyal, LSM List, Casey Schaufler,
	Linux API

Quoting Michael Kerrisk (man-pages) (mtk.manpages@gmail.com):
> Hi Serge,
> 
> At the moment man-pages lacks documentation of the namespaced file
> capability feature that you added with commit
> 8db6c34f1dbc8e06aa016a9b829b06902c3e1340. Would you be able to send a
> patch describing the feature?

Sorry.  I'm adding this to my todo list, so I should get to it soon.

> Presumably, the patch would be for the capabilities(7) page (or
> perhaps for the user_namespaces(7) page, if that seems more
> appropriate), As well as documenting the semantics, it would be good
> to include an example or two of the notation that is used for the
> xattr names.
> 
> Presumably also there will be some changes in userspace tools
> (setcap/getcap?). Do you know anything about what's happening there?
> 
> Cheers,
> 
> Michael
> 
> 
> -- 
> Michael Kerrisk
> Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
> Linux/UNIX System Programming Training: http://man7.org/training/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Documentation patch for namespaced file capabilities
  2017-11-29 17:58 ` Serge E. Hallyn
@ 2017-12-19 15:33   ` Michael Kerrisk (man-pages)
  0 siblings, 0 replies; 4+ messages in thread
From: Michael Kerrisk (man-pages) @ 2017-12-19 15:33 UTC (permalink / raw)
  To: Serge E. Hallyn
  Cc: Amir Goldstein, Stefan Berger, Eric W. Biederman,
	Linux Containers, lkp, xiaolong.ye, linux-kernel, Mimi Zohar,
	Tycho Andersen, James Bottomley, christian.brauner, Vivek Goyal,
	LSM List, Casey Schaufler, Linux API

Hi Serge,

On 29 November 2017 at 18:58, Serge E. Hallyn <serge@hallyn.com> wrote:
> Quoting Michael Kerrisk (man-pages) (mtk.manpages@gmail.com):
>> Hi Serge,
>>
>> At the moment man-pages lacks documentation of the namespaced file
>> capability feature that you added with commit
>> 8db6c34f1dbc8e06aa016a9b829b06902c3e1340. Would you be able to send a
>> patch describing the feature?
>
> Sorry.  I'm adding this to my todo list, so I should get to it soon.

A gentle ping...

Cheers,

Michael

>> Presumably, the patch would be for the capabilities(7) page (or
>> perhaps for the user_namespaces(7) page, if that seems more
>> appropriate), As well as documenting the semantics, it would be good
>> to include an example or two of the notation that is used for the
>> xattr names.
>>
>> Presumably also there will be some changes in userspace tools
>> (setcap/getcap?). Do you know anything about what's happening there?
>>
>> Cheers,
>>
>> Michael
>>
>>
>> --
>> Michael Kerrisk
>> Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
>> Linux/UNIX System Programming Training: http://man7.org/training/



-- 
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-12-19 15:33 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-20  9:36 Documentation patch for namespaced file capabilities Michael Kerrisk (man-pages)
     [not found] ` <CAKgNAkiAeqbD=G6hnExh4cC84nA2mU6xdLzzS0F2x1wviEPgHg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-11-20 16:03   ` Eric W. Biederman
2017-11-29 17:58 ` Serge E. Hallyn
2017-12-19 15:33   ` Michael Kerrisk (man-pages)

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).