Package: e2fsprogs / 1.47.2-3~bpo12+1

0006-fuse2fs-refuse-unsupported-features.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
From: "Darrick J. Wong" <djwong@kernel.org>
Subject: fuse2fs: refuse unsupported features

Don't mount a filesystem with superblock features that we don't actually
know how to support.

Origin: upstream, https://github.com/tytso/e2fsprogs/commit/ccbc6f24fed095b28f9faa7b575159e49787fae0
---
 misc/fuse2fs.c | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/misc/fuse2fs.c b/misc/fuse2fs.c
index a6390ab5d..2e0463201 100644
--- a/misc/fuse2fs.c
+++ b/misc/fuse2fs.c
@@ -3863,6 +3863,26 @@ int main(int argc, char *argv[])
 
 	ret = 3;
 
+	if (ext2fs_has_feature_quota(global_fs->super)) {
+		printf(_("%s: quotas not supported."), fctx.device);
+		goto out;
+	}
+	if (ext2fs_has_feature_verity(global_fs->super)) {
+		printf(_("%s: verity not supported."), fctx.device);
+		goto out;
+	}
+	if (ext2fs_has_feature_encrypt(global_fs->super)) {
+		printf(_("%s: encryption not supported."), fctx.device);
+		goto out;
+	}
+	if (ext2fs_has_feature_casefold(global_fs->super)) {
+		printf(_("%s: casefolding not supported."), fctx.device);
+		goto out;
+	}
+
+	if (ext2fs_has_feature_shared_blocks(global_fs->super))
+		fctx.ro = 1;
+
 	if (ext2fs_has_feature_journal_needs_recovery(global_fs->super)) {
 		if (fctx.norecovery) {
 			printf(_("%s: mounting read-only without "
-- 
2.47.2