Bug 215812 - Document namespace PID interpretation with respect to cap_get_pid()
Summary: Document namespace PID interpretation with respect to cap_get_pid()
Status: RESOLVED DOCUMENTED
Alias: None
Product: Tools
Classification: Unclassified
Component: libcap (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: Andrew G. Morgan
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-04-06 16:44 UTC by Andrew G. Morgan
Modified: 2022-04-29 04:43 UTC (History)
1 user (show)

See Also:
Kernel Version: n/a
Subsystem:
Regression: No
Bisected commit-id:


Attachments

Description Andrew G. Morgan 2022-04-06 16:44:58 UTC
I've received a request to clarify the semantics of the pid argument to cap_get_pid() when invoked from within a namespace. I'm filing this bug to make sure I do this.

My belief at present is that within the namespace, the caller can only see the pid view visible within that namespace.
Comment 1 Andrew G. Morgan 2022-04-07 14:30:26 UTC
I chatted with Serge Hallyn and he confirms that the pid argument is interpreted "relative to the caller's pid_ns".
Comment 3 Andrew G. Morgan 2022-04-19 02:30:33 UTC
This man page needs some discussion of the returned capabilities too, in the case of querying a PID inside some other namespace.

Note You need to log in before you can comment on or make changes to this bug.