]> git.ipfire.org Git - thirdparty/man-pages.git/commitdiff
man/man2/setns.2: Add missing info about time ns
authorMichal Clapinski <mclapinski@google.com>
Tue, 7 Jan 2025 13:57:00 +0000 (14:57 +0100)
committerAlejandro Colomar <alx@kernel.org>
Tue, 7 Jan 2025 14:07:17 +0000 (15:07 +0100)
Only singlethreaded processes can setns into time ns.

Link: <https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/kernel/time/namespace.c?h=v6.12#n309>
Signed-off-by: Michal Clapinski <mclapinski@google.com>
Message-ID: <20250107135700.3995936-1-mclapinski@google.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
man/man2/setns.2

index f32a91bd8f0af37d1c6adb318c4944771880c6f7..619717b77d35bdf9aee4f01175a77a06b8d09a13 100644 (file)
@@ -237,7 +237,17 @@ Using
 to change the caller's cgroup namespace does not change
 the caller's cgroup memberships.
 .TP
-Network, IPC, time, and UTS namespaces
+Time namespaces
+In order to reassociate itself with a new time namespace,
+the caller must have the
+.B CAP_SYS_ADMIN
+capability both in its own user namespace and in the user namespace
+that owns the target namespace.
+.IP
+A multithreaded process may not change time namespace with
+.BR setns ().
+.TP
+Network, IPC, and UTS namespaces
 In order to reassociate itself with a new network, IPC, time, or UTS namespace,
 the caller must have the
 .B CAP_SYS_ADMIN