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
Loading
Please register or sign in to comment