]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
Manual pages: unshare.1: clarify description and example for --mount=<path>
authorMichael Kerrisk (man-pages) <mtk.manpages@gmail.com>
Wed, 3 Jun 2020 07:40:56 +0000 (09:40 +0200)
committerKarel Zak <kzak@redhat.com>
Wed, 3 Jun 2020 15:03:56 +0000 (17:03 +0200)
The existing text is not quite accurate, and I recently injected an
error into the EXAMPLES. This patch fixes both issues.

The text in DESCRIPTION incorrectly states that the propagation type of
the parent mount must be "private". This is not accurate.  Rather, the
propagation type must be something *other than "shared"* (i.e.,
"private", "slave", or "unbindable").

In the EXAMPLES section, I added text that implies that if the
propagation type of the parent mount is "shared", then the child mount
created by --mount=<path> might propagate to another namespace.
Rather, in this situation, an error would result. Clarify that.

Signed-off-by: Michael Kerrisk (man-pages) <mtk.manpages@gmail.com>
sys-utils/unshare.1

index a260d02e32d17ce02e97992d63df4ab9a6af3008..443aac658b7924c8d6ff060701a6efb3631ed9c3 100644 (file)
@@ -104,8 +104,9 @@ namespace is created by a bind mount.
 .BR \-m , " \-\-mount" [ =\fIfile ]
 Unshare the mount namespace.  If \fIfile\fP is specified, then a persistent
 namespace is created by a bind mount.
-Note that \fIfile\fP has to be located on a filesystem with the propagation
-flag set to \fBprivate\fP.  Use the command \fBfindmnt \-o+PROPAGATION\fP
+Note that \fIfile\fP must be located on a mount whose propagation type
+is not \fBshared\fP (or an error results).
+Use the command \fBfindmnt \-o+PROPAGATION\fP
 when not sure about the current setting.  See also the examples below.
 .TP
 .BR \-n , " \-\-net" [ =\fIfile ]
@@ -307,13 +308,11 @@ FOO
 The following commands
 establish a persistent mount namespace referenced by the bind mount
 .IR /root/namespaces/mnt .
-In order to ensure that this bind mount does not get propagated
-to other mount namespaces,
+In order to ensure that the creation of that bind mount succeeds,
 the parent directory
 .RI ( /root/namespaces )
-is first made a bind mount with
-.I private
-propagation.
+is made a bind mount whose propagation type is not
+.BR shared .
 .PP
 .in +4n
 .EX