]> git.ipfire.org Git - thirdparty/util-linux.git/commit
libmount: don't canonicalize symlinks for bind operation
authorKarel Zak <kzak@redhat.com>
Thu, 3 Aug 2023 09:43:28 +0000 (11:43 +0200)
committerKarel Zak <kzak@redhat.com>
Thu, 3 Aug 2023 09:58:22 +0000 (11:58 +0200)
commit1b2d8187360157b00b47f52522fc039d82e34e6b
tree4c93a51038d529206b83678ea5a850f7f66226c6
parenta6dd313bf2f5bc901ddc65262807075587ecb895
libmount: don't canonicalize symlinks for bind operation

The new kernel mount API can bind over symlink by default.

Unfortunately, libmount always canonicalizes all paths (due to
backward compatibility, search in mountinfo, search in fstab, etc.).

Possible workaround is -c, --no-canonicalize but it disable all paths
canonicalization, tags to paths conversions etc.

This patch disables the canonicalization only for the target path
(if symlink) on bind operation.

Fixes: https://github.com/util-linux/util-linux/issues/2370
Signed-off-by: Karel Zak <kzak@redhat.com>
libmount/src/context_mount.c
sys-utils/mount.8.adoc