Hi Göran, On Sun, Feb 16, 2025 at 07:59:50PM +0100, Göran Uddeborg wrote: > 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. > > Signed-off-by: Göran Uddeborg <goeran@xxxxxxxxxxx> Thanks! I've applied the patch. I applied some tweaks to it. As you suggested, I added a tag for linking to the bugzilla entry. I also added a tag that shows the commit that introduced the bug. <https://www.alejandro-colomar.es/src/alx/linux/man-pages/man-pages.git/commit/?h=contrib&id=4b307134ee68cd0f3568a3d2d9c2119bd5a8adf6> commit 4b307134ee68cd0f3568a3d2d9c2119bd5a8adf6 Author: Göran Uddeborg <goeran@xxxxxxxxxxx> Date: Sun Feb 16 19:59:50 2025 +0100 man/man7/mount_namespaces.7: Fix an incorrect path in an example 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@xxxxxxxxxxx> Cc: Rajesh <r.pandian@xxxxxxxxx> Message-ID: <26546.13734.573762.288144@xxxxxxxxxxxxxxxxxx> Signed-off-by: Alejandro Colomar <alx@xxxxxxxxxx> Have a lovely night! Alex > --- > man/man7/mount_namespaces.7 | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/man/man7/mount_namespaces.7 b/man/man7/mount_namespaces.7 > index a1645e9e2..0e1223f99 100644 > --- a/man/man7/mount_namespaces.7 > +++ b/man/man7/mount_namespaces.7 > @@ -1128,7 +1128,7 @@ .SS Restrictions on mount namespaces > .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) > -- > 2.40.1 -- <https://www.alejandro-colomar.es/>
Attachment:
signature.asc
Description: PGP signature