Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
halo
system_security
Commits
7a4dd551
Commit
7a4dd551
authored
10 years ago
by
Chad Brubaker
Committed by
Gerrit Code Review
10 years ago
Browse files
Options
Download
Plain Diff
Merge "Flush the auth token table on resetUid"
parents
9484bb01
bbc7648d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
0 deletions
+9
-0
keystore/auth_token_table.cpp
keystore/auth_token_table.cpp
+4
-0
keystore/auth_token_table.h
keystore/auth_token_table.h
+2
-0
keystore/keystore.cpp
keystore/keystore.cpp
+3
-0
No files found.
keystore/auth_token_table.cpp
View file @
7a4dd551
...
...
@@ -140,6 +140,10 @@ void AuthTokenTable::RemoveEntriesSupersededBy(const Entry& entry) {
entries_
.
end
());
}
void
AuthTokenTable
::
Clear
()
{
entries_
.
clear
();
}
bool
AuthTokenTable
::
IsSupersededBySomeEntry
(
const
Entry
&
entry
)
{
return
std
::
any_of
(
entries_
.
begin
(),
entries_
.
end
(),
[
&
](
Entry
&
e
)
{
return
e
.
Supersedes
(
entry
);
});
...
...
This diff is collapsed.
Click to expand it.
keystore/auth_token_table.h
View file @
7a4dd551
...
...
@@ -95,6 +95,8 @@ class AuthTokenTable {
*/
void
MarkCompleted
(
const
keymaster_operation_handle_t
op_handle
);
void
Clear
();
size_t
size
()
{
return
entries_
.
size
();
}
private:
...
...
This diff is collapsed.
Click to expand it.
keystore/keystore.cpp
View file @
7a4dd551
...
...
@@ -2245,6 +2245,9 @@ public:
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
;
}
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment