-
-
Notifications
You must be signed in to change notification settings - Fork 18.1k
util-linux: fix mount regression #405952
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
util-linux: fix mount regression #405952
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| From 7dbfe31a83f45d5aef2b508697e9511c569ffbc8 Mon Sep 17 00:00:00 2001 | ||
| From: Karel Zak <kzak@redhat.com> | ||
| Date: Mon, 24 Mar 2025 14:31:05 +0100 | ||
| Subject: [PATCH] libmount: fix --no-canonicalize regression | ||
|
|
||
| Fixes: https://github.com/util-linux/util-linux/issues/3474 | ||
| Signed-off-by: Karel Zak <kzak@redhat.com> | ||
| --- | ||
| libmount/src/context.c | 3 --- | ||
| sys-utils/mount.8.adoc | 2 +- | ||
| 2 files changed, 1 insertion(+), 4 deletions(-) | ||
|
|
||
| diff --git a/libmount/src/context.c b/libmount/src/context.c | ||
| index 0323cb23d34..15a8ad3bbd0 100644 | ||
| --- a/libmount/src/context.c | ||
| +++ b/libmount/src/context.c | ||
| @@ -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; | ||
| diff --git a/sys-utils/mount.8.adoc b/sys-utils/mount.8.adoc | ||
| index 4f23f8d1f0e..5103b91c578 100644 | ||
| --- a/sys-utils/mount.8.adoc | ||
| +++ b/sys-utils/mount.8.adoc | ||
| @@ -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. | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.