security: track kubectl/docker exec session using pid_namespace field

Add a field to the pid_namespace to check if a process is linked to the
container creation or a dedicated session kubectl/docker exec (also
used for liveness probes).

BUG=b:148390640
TEST=Ran all internal testing.
SOURCE=KTD

Signed-off-by: Thomas Garnier <thgarnie@chromium.org>
Change-Id: Id8ec642d42a382be586135c6344af200b68b6d5d
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/lakitu-kernel/+/2062510
Commit-Queue: Vaibhav Rustagi <vaibhavrustagi@google.com>
Reviewed-by: Peter Martincic <martincic@google.com>
Reviewed-by: Vaibhav Rustagi <vaibhavrustagi@google.com>
Tested-by: Vaibhav Rustagi <vaibhavrustagi@google.com>
1 file changed