aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Kerrisk <mtk.manpages@gmail.com>2020-06-15 12:01:31 +0200
committerMichael Kerrisk <mtk.manpages@gmail.com>2020-06-15 15:57:48 +0200
commit7f52c11c3750e276e666be235c39d5d194c7fc1d (patch)
tree8528f9ccbc23a1f4c96ab0bbf6fbae1c15fe571d
parentbe1db87e414e3546ee1cd7bb442e4bb24fb82e39 (diff)
downloadman-pages-7f52c11c3750e276e666be235c39d5d194c7fc1d.tar.gz
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 <mtk.manpages@gmail.com>
-rw-r--r--man2/setns.22
1 files changed, 1 insertions, 1 deletions
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).