]> git.ipfire.org Git - thirdparty/man-pages.git/commitdiff
setns.2: It is possible to setns() to the caller's current PID namespace
authorMichael Kerrisk <mtk.manpages@gmail.com>
Mon, 15 Jun 2020 10:01:31 +0000 (12:01 +0200)
committerMichael Kerrisk <mtk.manpages@gmail.com>
Mon, 15 Jun 2020 13:57:48 +0000 (15:57 +0200)
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 <mtk.manpages@gmail.com>
man2/setns.2

index 0cfbfb3915c04dc129178d147ad6917ea8da0307..ba22b3e6c0ee52e1014363a50dedbaee6e59665c 100644 (file)
@@ -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).