aboutsummaryrefslogtreecommitdiffstats
path: root/libmount/src
diff options
context:
space:
mode:
authorKarel Zak <kzak@redhat.com>2024-02-13 19:54:08 +0100
committerKarel Zak <kzak@redhat.com>2024-02-13 19:54:08 +0100
commitc19ae2094e865f1a153e25b865315bd68edf075b (patch)
tree2273889fbbabd73c73f2e62a03f280d30016444d /libmount/src
parent26e778a790fb016f639af5919d08f9affa677f23 (diff)
downloadutil-linux-c19ae2094e865f1a153e25b865315bd68edf075b.tar.gz
Revert "libmount: don't canonicalize symlinks for bind operation"
This reverts commit 1b2d8187360157b00b47f52522fc039d82e34e6b. Unfortunately, this new feature introduces a regression. We need a better solution (probably mount options option to enable the feature) rather than enable it by default. Fixes: https://github.com/util-linux/util-linux/issues/2773 References: https://github.com/util-linux/util-linux/issues/2370
Diffstat (limited to 'libmount/src')
-rw-r--r--libmount/src/context_mount.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/libmount/src/context_mount.c b/libmount/src/context_mount.c
index 9beac17c01..b8302f9fc7 100644
--- a/libmount/src/context_mount.c
+++ b/libmount/src/context_mount.c
@@ -674,7 +674,6 @@ static int prepare_target(struct libmnt_context *cxt)
const char *tgt, *prefix;
int rc = 0;
struct libmnt_ns *ns_old;
- struct stat st;
assert(cxt);
assert(cxt->fs);
@@ -714,10 +713,7 @@ static int prepare_target(struct libmnt_context *cxt)
return -MNT_ERR_NAMESPACE;
/* canonicalize the path */
- if (rc == 0 &&
- !(cxt->optlist && mnt_optlist_is_bind(cxt->optlist)
- && mnt_safe_lstat(tgt, &st) == 0 && S_ISLNK(st.st_mode))) {
-
+ if (rc == 0) {
struct libmnt_cache *cache = mnt_context_get_cache(cxt);
if (cache) {