Bug 215812

Summary: Document namespace PID interpretation with respect to cap_get_pid()
Product: Tools Reporter: Andrew G. Morgan (morgan)
Component: libcapAssignee: Andrew G. Morgan (morgan)
Status: RESOLVED DOCUMENTED    
Severity: normal CC: nemonemo
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: n/a Subsystem:
Regression: No Bisected commit-id:

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.