Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit b2079255 authored by Eric Biggers's avatar Eric Biggers
Browse files

Fix deleteSyntheticPasswordState() to take mFileWriteLock

The cache consistency model in LockSettingsStorage requires that
mFileWriteLock be held during file writes and deletions.
deleteSyntheticPasswordState() forgot to take this lock.  Fix it by
making it just call deleteFile().

Make deleteFile() zeroize the file before unlinking it, so that the
zeroization that deleteSyntheticPasswordState() did isn't lost, and so
that the zeroization is applied to the other locksettings files too.

Found by code review; this bug isn't known to have been causing any
real-world problems.

Test: atest com.android.server.locksettings
Change-Id: I8b4c8468a4ab533164b5750e109e2426f74c9110
parent 2515cd5c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment