]> git.ipfire.org Git - thirdparty/man-pages.git/commitdiff
man/man7/mount_namespaces.7: Fix an incorrect path in an example
authorGöran Uddeborg <goeran@uddeborg.se>
Sun, 16 Feb 2025 18:59:50 +0000 (19:59 +0100)
committerAlejandro Colomar <alx@kernel.org>
Sun, 16 Feb 2025 19:29:42 +0000 (20:29 +0100)
In the example showing how locked mounts in a less privileged mount
namespace can not be split, first </etc/shadow> is bind mounted, then an
attempt is done to unmount </mnt/dir>, which gives an error complaining
that </etc/shadow> is not mounted.  The unmount should also refer to
</etc/shadow>.

Fixes: 906ab4945cd3 (2021-08-20; "mount_namespaces.7: Rewrite locked mounts examples to use/etc/shadow")
Closes: <https://bugzilla.kernel.org/show_bug.cgi?id=217709>
Signed-off-by: Göran Uddeborg <goeran@uddeborg.se>
Cc: Rajesh <r.pandian@gmail.com>
Message-ID: <26546.13734.573762.288144@gargle.gargle.HOWL>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
man/man7/mount_namespaces.7

index a1645e9e27c12241900cc5dfc3c10c5aeecf6fab..0e1223f99a033bf68a5bed60b36a13055b8918ae 100644 (file)
@@ -1128,7 +1128,7 @@ in the following step:
 .EX
 # \fBunshare \-\-user \-\-map\-root\-user \-\-mount \[rs]\fP
                \fBstrace \-o /tmp/log \[rs]\fP
-               \fBumount /mnt/dir\fP
+               \fBumount /etc/shadow\fP
 umount: /etc/shadow: not mounted.
 # \fBgrep \[aq]\[ha]umount\[aq] /tmp/log\fP
 umount2("/etc/shadow", 0)     = \-1 EINVAL (Invalid argument)