From: Michael Kerrisk Date: Mon, 15 Jun 2020 10:01:31 +0000 (+0200) Subject: setns.2: It is possible to setns() to the caller's current PID namespace X-Git-Tag: man-pages-5.08~154 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=7f52c11c3750e276e666be235c39d5d194c7fc1d;p=thirdparty%2Fman-pages.git 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 --- 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).