Whamcloud - gitweb
AOSP: ANDROID: e2fsck: Do not mutate encrypted names
authorDaniel Rosenberg <drosen@google.com>
Fri, 12 Jun 2020 11:11:38 +0000 (04:11 -0700)
committerTheodore Ts'o <tytso@mit.edu>
Thu, 28 Jan 2021 04:35:15 +0000 (23:35 -0500)
commit79661036b427a890b1d3d435ffab7c811ec9e5f4
tree814de95a695dce8501c1a1eca3ae74ea1e08c15b
parentb437e1ed5f7446b832e25ce9ca1f0ef89b7329ed
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
e2fsck/problem.c
e2fsck/problem.h
e2fsck/rehash.c
tests/f_dup_de_crypt/expect.1 [new file with mode: 0644]
tests/f_dup_de_crypt/expect.2 [new file with mode: 0644]
tests/f_dup_de_crypt/image.gz [new file with mode: 0644]
tests/f_dup_de_crypt/name [new file with mode: 0644]