Flush the auth token table on resetUid
This prevents old stale auth tokens from sticking around after clearing.
Change-Id: I92e48b6d8cdba92cbc70f718cb45a4d96bd12900
diff --git a/keystore/keystore.cpp b/keystore/keystore.cpp
index 03212ed..8db8dab 100644
--- a/keystore/keystore.cpp
+++ b/keystore/keystore.cpp
@@ -2245,6 +2245,9 @@
if (!checkBinderPermission(P_RESET_UID, targetUid)) {
return ::PERMISSION_DENIED;
}
+ // Flush the auth token table to prevent stale tokens from sticking
+ // around.
+ mAuthTokenTable.Clear();
return mKeyStore->reset(targetUid) ? ::NO_ERROR : ::SYSTEM_ERROR;
}