Merge "Remove /data/misc/vold/user_keys/ce/${user_id} when no longer needed" am: 67db7b9786
am: 7ece899507
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/1721850 Change-Id: Id39d7e567dc2484b859efb10a4d3b2cd696172ba
This commit is contained in:
commit
883908791b
1 changed files with 4 additions and 1 deletions
|
@ -569,9 +569,12 @@ bool fscrypt_destroy_user_key(userid_t user_id) {
|
||||||
if (it != s_ephemeral_users.end()) {
|
if (it != s_ephemeral_users.end()) {
|
||||||
s_ephemeral_users.erase(it);
|
s_ephemeral_users.erase(it);
|
||||||
} else {
|
} else {
|
||||||
for (auto const path : get_ce_key_paths(get_ce_key_directory_path(user_id))) {
|
auto ce_path = get_ce_key_directory_path(user_id);
|
||||||
|
for (auto const path : get_ce_key_paths(ce_path)) {
|
||||||
success &= android::vold::destroyKey(path);
|
success &= android::vold::destroyKey(path);
|
||||||
}
|
}
|
||||||
|
success &= destroy_dir(ce_path);
|
||||||
|
|
||||||
auto de_key_path = get_de_key_path(user_id);
|
auto de_key_path = get_de_key_path(user_id);
|
||||||
if (android::vold::pathExists(de_key_path)) {
|
if (android::vold::pathExists(de_key_path)) {
|
||||||
success &= android::vold::destroyKey(de_key_path);
|
success &= android::vold::destroyKey(de_key_path);
|
||||||
|
|
Loading…
Reference in a new issue