diff --git a/0052-fuse2fs-don-t-try-to-mount-after-option-parsing-erro.patch b/0052-fuse2fs-don-t-try-to-mount-after-option-parsing-erro.patch new file mode 100644 index 0000000000000000000000000000000000000000..e118216385f3c068dbb2274601f4535bae65b2c6 --- /dev/null +++ b/0052-fuse2fs-don-t-try-to-mount-after-option-parsing-erro.patch @@ -0,0 +1,40 @@ +From e7774d8fef39d16eb96f1e55cf2f33d3acb14d88 Mon Sep 17 00:00:00 2001 +From: "Darrick J. Wong" +Date: Sun, 6 Jul 2025 11:32:50 -0700 +Subject: [PATCH] fuse2fs: don't try to mount after option parsing errors + +Actually check the outcome of parsing CLI options before trying to +mount. + +Signed-off-by: Darrick J. Wong +Link: https://lore.kernel.org/r/175182663113.1984706.10460295274868313866.stgit@frogsfrogsfrogs +Signed-off-by: Theodore Ts'o +--- + misc/fuse2fs.c | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/misc/fuse2fs.c b/misc/fuse2fs.c +index c595721..5219739 100644 +--- a/misc/fuse2fs.c ++++ b/misc/fuse2fs.c +@@ -3727,13 +3727,15 @@ int main(int argc, char *argv[]) + errcode_t err; + char *logfile; + char extra_args[BUFSIZ]; +- int ret = 0; ++ int ret; + int flags = EXT2_FLAG_64BITS | EXT2_FLAG_THREADS | EXT2_FLAG_EXCLUSIVE; + + memset(&fctx, 0, sizeof(fctx)); + fctx.magic = FUSE2FS_MAGIC; + +- fuse_opt_parse(&args, &fctx, fuse2fs_opts, fuse2fs_opt_proc); ++ ret = fuse_opt_parse(&args, &fctx, fuse2fs_opts, fuse2fs_opt_proc); ++ if (ret) ++ exit(1); + if (fctx.device == NULL) { + fprintf(stderr, "Missing ext4 device/image\n"); + fprintf(stderr, "See '%s -h' for usage\n", argv[0]); +-- +2.33.0 + diff --git a/e2fsprogs.spec b/e2fsprogs.spec index e0e64c18f8c515ebe60d8b94815b536fdad2b733..4b79a1ef9bf352dfbd9a172e90edbdc9ba742810 100644 --- a/e2fsprogs.spec +++ b/e2fsprogs.spec @@ -1,6 +1,6 @@ Name: e2fsprogs Version: 1.46.4 -Release: 29 +Release: 30 Summary: Second extended file system management tools License: GPLv2+ and LGPLv2 and MIT URL: http://e2fsprogs.sourceforge.net/ @@ -58,6 +58,7 @@ Patch48: 0048-reisze2fs-sanity-check-free-block-group-counts-when-.patch Patch49: 0049-fsck-fix-memory-leak-on-an-error-exit.patch Patch50: 0050-e2fsck-update-quota-accounting-after-directory-optim.patch Patch51: 0051-e2fsck-update-quota-when-deallocating-a-bad-inode.patch +Patch52: 0052-fuse2fs-don-t-try-to-mount-after-option-parsing-erro.patch BuildRequires: gcc pkgconfig texinfo BuildRequires: fuse-devel libblkid-devel libuuid-devel @@ -198,6 +199,9 @@ exit 0 %{_mandir}/man8/* %changelog +* Wed Nov 19 2025 xuchenchen - 1.46.4-30 +- fuse2fs: don't try to mount after option parsing errors + * Fri Jul 19 2024 zhangjian - 1.46.4-29 - backport patches for fixing quota bugs