From 6ff4b156476a06e6691b7b9c04ab134491eabd1f Mon Sep 17 00:00:00 2001 From: Michael Kerrisk Date: Sat, 23 May 2020 08:43:19 +0200 Subject: [PATCH] Manual pages: nsenter.1, unshare.1: remove repeated references to clone(2) Back in commits f85b9777c2965671cd and 894efece9eb894, in the description of each namespace type, I added repeated cross references to clone(2). Drop these references. The Section 7 namespaces pages, which are already noted in the nsenter(1) and unshare(1) manual pages, provide much more relevant information. Furthermore, pointing the reader at clone(2) is perhaps a little misleading, since the system call underlying nsenter(1) is setns(2) and the system call underlying unshare(1) is unshare(2). Signed-off-by: Michael Kerrisk --- sys-utils/nsenter.1 | 39 ++++++--------------------------------- sys-utils/unshare.1 | 45 ++++++++------------------------------------- 2 files changed, 14 insertions(+), 70 deletions(-) diff --git a/sys-utils/nsenter.1 b/sys-utils/nsenter.1 index 2991076091..ea924f9095 100644 --- a/sys-utils/nsenter.1 +++ b/sys-utils/nsenter.1 @@ -27,22 +27,14 @@ flag in .B UTS namespace Setting hostname or domainname will not affect the rest of the system. For further details, see -.BR uts_namespaces (7) -and the discussion of the -.B CLONE_NEWUTS -flag in -.BR clone (2). +.BR uts_namespaces (7). .TP .B IPC namespace The process will have an independent namespace for POSIX message queues as well as System V message queues, semaphore sets and shared memory segments. For further details, see -.BR ipc_namespaces (7) -and the discussion of the -.B CLONE_NEWIPC -flag in -.BR clone (2). +.BR ipc_namespaces (7). .TP .B network namespace The process will have independent IPv4 and IPv6 stacks, IP routing tables, @@ -52,11 +44,7 @@ and .I /sys\:/class\:/net directory trees, sockets, etc. For further details, see -.BR network_namespaces (7) -and the discussion of the -.B CLONE_NEWNET -flag in -.BR clone (2). +.BR network_namespaces (7). .TP .B PID namespace Children will have a set of PID to process mappings separate from the @@ -67,31 +55,18 @@ will fork by default if changing the PID namespace, so that the new program and its children share the same PID namespace and are visible to each other. If \fB\-\-no\-fork\fP is used, the new program will be exec'ed without forking. For further details, see -.BR pid_namespaces (7) -and -the discussion of the -.B CLONE_NEWPID -flag in -.BR clone (2). +.BR pid_namespaces (7). .TP .B user namespace The process will have a distinct set of UIDs, GIDs and capabilities. For further details, see -.BR user_namespaces (7) -and the discussion of the -.B CLONE_NEWUSER -flag in -.BR clone (2). +.BR user_namespaces (7). .TP .B cgroup namespace The process will have a virtualized view of \fI/proc\:/self\:/cgroup\fP, and new cgroup mounts will be rooted at the namespace cgroup root. For further details, see -.BR cgroup_namespaces (7) -and the discussion of the -.B CLONE_NEWCGROUP -flag in -.BR clone (2). +.BR cgroup_namespaces (7). .TP .B time namespace The process can have a distinct view of @@ -101,8 +76,6 @@ and/or which can be changed using \fI/proc/self/timens_offsets\fP. For further details, see .BR time_namespaces (7). -.TP -See \fBclone\fP(2) for the exact semantics of the flags. .SH OPTIONS Various of the options below that relate to namespaces take an optional .I file diff --git a/sys-utils/unshare.1 b/sys-utils/unshare.1 index db67b0d4c2..fb769d6073 100644 --- a/sys-utils/unshare.1 +++ b/sys-utils/unshare.1 @@ -32,12 +32,8 @@ except for filesystems which are explicitly marked as shared (with \fBmount \-\-make-shared\fP; see \fI/proc/self/mountinfo\fP or \fBfindmnt \-o+PROPAGATION\fP for the \fBshared\fP flags). For further details, see -.BR mount_namespaces (7) -and the discussion of the -.B CLONE_NEWNS -flag in -.BR clone (2). -.sp +.BR mount_namespaces (7). +.IP .B unshare since util-linux version 2.27 automatically sets propagation to \fBprivate\fP in a new mount namespace to make sure that the new namespace is really @@ -48,62 +44,37 @@ Note that \fBprivate\fP is the kernel default. .B UTS namespace Setting hostname or domainname will not affect the rest of the system. For further details, see -.BR uts_namespaces (7) -and the discussion of the -.B CLONE_NEWUTS -flag in -.BR clone (2). +.BR uts_namespaces (7). .TP .B IPC namespace The process will have an independent namespace for POSIX message queues as well as System V \%message queues, semaphore sets and shared memory segments. For further details, see -.BR ipc_namespaces (7) -and the discussion of the -.B CLONE_NEWIPC -flag in -.BR clone (2). +.BR ipc_namespaces (7). .TP .B network namespace The process will have independent IPv4 and IPv6 stacks, IP routing tables, firewall rules, the \fI/proc/net\fP and \fI/sys/class/net\fP directory trees, sockets, etc. For further details, see -.BR network_namespaces (7) -and the discussion of the -.B CLONE_NEWNET -flag in -.BR clone (2). +.BR network_namespaces (7). .TP .B PID namespace Children will have a distinct set of PID-to-process mappings from their parent. For further details, see -.BR pid_namespaces (7) -and -the discussion of the -.B CLONE_NEWPID -flag in -.BR clone (2). +.BR pid_namespaces (7). .TP .B cgroup namespace The process will have a virtualized view of \fI/proc\:/self\:/cgroup\fP, and new cgroup mounts will be rooted at the namespace cgroup root. For further details, see -.BR cgroup_namespaces (7) -and the discussion of the -.B CLONE_NEWCGROUP -flag in -.BR clone (2). +.BR cgroup_namespaces (7). .TP .B user namespace The process will have a distinct set of UIDs, GIDs and capabilities. For further details, see -.BR user_namespaces (7) -and the discussion of the -.B CLONE_NEWUSER -flag in -.BR clone (2). +.BR user_namespaces (7). .TP .B time namespace The process can have a distinct view of -- 2.39.2