diff options
author | Daniel Rosenberg <drosen@google.com> | 2020-06-12 04:11:38 -0700 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2021-01-27 23:35:15 -0500 |
commit | 79661036b427a890b1d3d435ffab7c811ec9e5f4 (patch) | |
tree | 814de95a695dce8501c1a1eca3ae74ea1e08c15b /tests | |
parent | b437e1ed5f7446b832e25ce9ca1f0ef89b7329ed (diff) | |
download | e2fsprogs-79661036b427a890b1d3d435ffab7c811ec9e5f4.tar.gz |
AOSP: ANDROID: e2fsck: Do not mutate encrypted names
We can't mutate a name without the key, as this will at best cause the
name to become gibberish, and at worst may introduce invalid characters
or even fail to be unique after decoding, so drop duplicates instead.
Files lost in this way will be reconnected to lost+found
Fixes: dbff534ec685 ("e2fsck: suppress bad name checks for encrypted directories")
Signed-off-by: Daniel Rosenberg <drosen@google.com>
Google-Bug-Id: 138322712
Test: f_dup_de_crypt
Change-Id: I8d6cc3984872868a845fafabc554abdd86351fcc
From AOSP commit: 80b85f8a0b2ba7090a927f692ff9d2097ffd8d1f
Diffstat (limited to 'tests')
-rw-r--r-- | tests/f_dup_de_crypt/expect.1 | 18 | ||||
-rw-r--r-- | tests/f_dup_de_crypt/expect.2 | 7 | ||||
-rw-r--r-- | tests/f_dup_de_crypt/image.gz | bin | 0 -> 3039 bytes | |||
-rw-r--r-- | tests/f_dup_de_crypt/name | 1 |
4 files changed, 26 insertions, 0 deletions
diff --git a/tests/f_dup_de_crypt/expect.1 b/tests/f_dup_de_crypt/expect.1 new file mode 100644 index 00000000..03e0ad6c --- /dev/null +++ b/tests/f_dup_de_crypt/expect.1 @@ -0,0 +1,18 @@ +Pass 1: Checking inodes, blocks, and sizes +Pass 2: Checking directory structure +Duplicate entry '+M-^AT^EM-1M-^CM-/)*M-L^RM-^L^@M-WM-)M-+' found. + Marking /test (12) to be rebuilt. + +Pass 3: Checking directory connectivity +Pass 3A: Optimizing directories +Duplicate filename entry '+M-^AT^EM-1M-^CM-/)*M-L^RM-^L^@M-WM-)M-+' in /test (12) found. Clear? yes + +Pass 4: Checking reference counts +Unattached inode 13 +Connect to /lost+found? yes + +Pass 5: Checking group summary information + +test_filesys: ***** FILE SYSTEM WAS MODIFIED ***** +test_filesys: 14/16 files (0.0% non-contiguous), 26/60 blocks +Exit status is 1 diff --git a/tests/f_dup_de_crypt/expect.2 b/tests/f_dup_de_crypt/expect.2 new file mode 100644 index 00000000..cfca772d --- /dev/null +++ b/tests/f_dup_de_crypt/expect.2 @@ -0,0 +1,7 @@ +Pass 1: Checking inodes, blocks, and sizes +Pass 2: Checking directory structure +Pass 3: Checking directory connectivity +Pass 4: Checking reference counts +Pass 5: Checking group summary information +test_filesys: 14/16 files (0.0% non-contiguous), 26/60 blocks +Exit status is 0 diff --git a/tests/f_dup_de_crypt/image.gz b/tests/f_dup_de_crypt/image.gz Binary files differnew file mode 100644 index 00000000..07a44d7c --- /dev/null +++ b/tests/f_dup_de_crypt/image.gz diff --git a/tests/f_dup_de_crypt/name b/tests/f_dup_de_crypt/name new file mode 100644 index 00000000..aff30a8f --- /dev/null +++ b/tests/f_dup_de_crypt/name @@ -0,0 +1 @@ +duplicate directory entries for encrypted dirs |