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.