diff options
| author | 2022-07-07 19:00:52 +0000 | |
|---|---|---|
| committer | 2022-07-07 19:00:52 +0000 | |
| commit | b20792558e9d9d22fb04cb8994d2a4cc0ce9103e (patch) | |
| tree | c787ef30d5dcaf6eb2fe2a305fcf7b7172397ede /libs/androidfw/StringPool.cpp | |
| parent | 2515cd5c161e7fd3686b16c9e04596892272cb1f (diff) | |
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
Diffstat (limited to 'libs/androidfw/StringPool.cpp')
0 files changed, 0 insertions, 0 deletions