From 7f52c11c3750e276e666be235c39d5d194c7fc1d Mon Sep 17 00:00:00 2001 From: Michael Kerrisk Date: Mon, 15 Jun 2020 12:01:31 +0200 Subject: [PATCH] setns.2: It is possible to setns() to the caller's current PID namespace The page currently incorrectly says that 'fd' must refer to a descendant PID namespace. However, 'fd' can also refer to the caller's current PID namespace. Verified by experiment, and also comments in kernel/pid_namespace.c (Linux 5.8-rc1). Signed-off-by: Michael Kerrisk --- man2/setns.2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/man2/setns.2 b/man2/setns.2 index 0cfbfb3915..ba22b3e6c0 100644 --- a/man2/setns.2 +++ b/man2/setns.2 @@ -167,7 +167,7 @@ Reassociating with a PID namespace is allowed only if the PID namespace specified by .IR fd is a descendant (child, grandchild, etc.) -of the PID namespace of the caller. +of, or is the same as, the current PID namespace of the caller. .IP For further details on PID namespaces, see .BR pid_namespaces (7). -- 2.47.2