]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
libmount: fix --no-canonicalize regression
authorKarel Zak <kzak@redhat.com>
Mon, 24 Mar 2025 13:31:05 +0000 (14:31 +0100)
committerKarel Zak <kzak@redhat.com>
Mon, 24 Mar 2025 13:39:32 +0000 (14:39 +0100)
Fixes: https://github.com/util-linux/util-linux/issues/3474
Signed-off-by: Karel Zak <kzak@redhat.com>
libmount/src/context.c
sys-utils/mount.8.adoc

index 0323cb23d3425528a9036742e283eeb2297412a6..15a8ad3bbd0f5173f869834ddfce5dbd87bf5c3a 100644 (file)
@@ -530,9 +530,6 @@ int mnt_context_is_xnocanonicalize(
        assert(cxt);
        assert(type);
 
-       if (mnt_context_is_nocanonicalize(cxt))
-               return 1;
-
        ol = mnt_context_get_optlist(cxt);
        if (!ol)
                return 0;
index 4f23f8d1f0e267e759f3040f9fe6cfaa2f7aec4d..5103b91c578df3847492ed6ec15399d762dd1afa 100644 (file)
@@ -756,7 +756,7 @@ Allow to make a target directory (mountpoint) if it does not exist yet. The opti
 *X-mount.nocanonicalize*[**=**_type_]::
 Allows disabling of canonicalization for mount source and target paths. By default, the `mount` command resolves all paths to their absolute paths without symlinks. However, this behavior may not be desired in certain situations, such as when binding a mount over a symlink, or a symlink over a directory or another symlink. The optional argument _type_ can be either "source" or "target" (mountpoint). If no _type_ is specified, then canonicalization is disabled for both types. This mount option does not affect the conversion of source tags (e.g. LABEL= or UUID=) and fstab processing.
 +
-The command line option *--no-canonicalize* overrides this mount option and affects all path and tag conversions in all situations, but it does not modify flags for open_tree syscalls.
+The command-line option *--no-canonicalize* overrides this mount option and affects all path and tag conversions in all situations, but for backward compatibility, it does not modify open_tree syscall flags and does not allow the bind-mount over a symlink use case.
 +
 Note that *mount*(8) still sanitizes and canonicalizes the source and target paths specified on the command line by non-root users, regardless of the X-mount.nocanonicalize setting.