From 44f2a6b8cd2a0268a7de98e4ebc1761126a77f03 Mon Sep 17 00:00:00 2001 From: Michael Kerrisk Date: Tue, 17 Aug 2021 04:19:48 +0200 Subject: [PATCH] mount_namespaces.7: Repair earlier text after injection of new list item in previous commit The previous commit injected a large block of text into a list, separating one example in the previous list item from a "continuation" in the following list item. repair that. Signed-off-by: Michael Kerrisk --- man7/mount_namespaces.7 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/man7/mount_namespaces.7 b/man7/mount_namespaces.7 index 98cdb0dd9..13dfb078c 100644 --- a/man7/mount_namespaces.7 +++ b/man7/mount_namespaces.7 @@ -298,7 +298,7 @@ when propagated from a more privileged to a less privileged mount namespace, and may not be changed in the less privileged mount namespace. .IP -This point can be illustrated by a continuation of the previous example. +This point can be illustrated by a variation on an earlier example. In that example, the bind mount was marked as read-only. For security reasons, it should not be possible to make the mount writable in @@ -308,6 +308,9 @@ as illustrated by the following: .RS .in +4n .EX +$ \fBsudo mkdir /mnt/dir\fP +$ \fBsudo sh \-c \(aqecho "aaaaaa" > /mnt/dir/a\(aq\fP +$ \fBsudo mount \-\-bind \-o ro /some/path /mnt/dir\fP $ \fBsudo unshare \-\-user \-\-map\-root\-user \-\-mount \e\fP \fBmount \-o remount,rw /mnt/dir\fP mount: /mnt/dir: permission denied.