Hi!
We have bumped into a problem with busybox mount, which does not handle
remounts very well if there are lines in /proc/mounts that are longer
than 504 bytes.
This happens in docker on fedora 43, which has the longest line of 591 bytes.
This can be reproduce with this patch:
diff --git a/util-linux/mount.c b/util-linux/mount.c
index d0f0ae1ad..9115207c5 100644
--- a/util-linux/mount.c
+++ b/util-linux/mount.c
@@ -2385,6 +2385,8 @@ int mount_main(int argc UNUSED_PARAM, char **argv)
// take -o opts from mtab (takes only mount source).
fstabname = bb_path_mtab_file;
}
+ // DEBUG
+ fstabname = "/tmp/fake-mounts";
fstab = setmntent(fstabname, "r");
if (!fstab)
bb_perror_msg_and_die("can't read '%s'", fstabname);
and then create a /tmp/fake-mounts:
cat > /tmp/fake-mounts