summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Rubin Xu <rubinxu@google.com> 2017-09-15 11:56:53 +0100
committer Rubin Xu <rubinxu@google.com> 2017-11-15 14:32:31 +0000
commit2f22ee4d16c591b233423ef2940a657670ff3e65 (patch)
treecd922dc3e84c5deaa2ce5f097f6e76866f3eec39
parent718a25159b6131881091b0d24e3a8b4305a1f3c8 (diff)
Delete synthetic password keystore keys when user is removed.
Bug: 65718620 Test: Add user, remove user, look at "adb shell su 1000 keystore_cli_v2 list" and make sure nothing remains. Change-Id: I2cf862c35117faed38fdfe5c43ceece4e8dbc3c4
-rw-r--r--services/core/java/com/android/server/locksettings/SyntheticPasswordManager.java8
1 files changed, 3 insertions, 5 deletions
diff --git a/services/core/java/com/android/server/locksettings/SyntheticPasswordManager.java b/services/core/java/com/android/server/locksettings/SyntheticPasswordManager.java
index ca6c9e78d0a2..1a1aa569b249 100644
--- a/services/core/java/com/android/server/locksettings/SyntheticPasswordManager.java
+++ b/services/core/java/com/android/server/locksettings/SyntheticPasswordManager.java
@@ -390,11 +390,9 @@ public class SyntheticPasswordManager {
}
public void removeUser(int userId) {
- if (isWeaverAvailable()) {
- for (long handle : mStorage.listSyntheticPasswordHandlesForUser(WEAVER_SLOT_NAME,
- userId)) {
- destroyWeaverSlot(handle, userId);
- }
+ for (long handle : mStorage.listSyntheticPasswordHandlesForUser(SP_BLOB_NAME, userId)) {
+ destroyWeaverSlot(handle, userId);
+ destroySPBlobKey(getHandleName(handle));
}
}