OSDN Git Service

Clearing up invalid entries when SyncStorageEngine starts
authorSuprabh Shukla <suprabh@google.com>
Fri, 12 May 2017 22:26:54 +0000 (15:26 -0700)
committerSuprabh Shukla <suprabh@google.com>
Wed, 6 Sep 2017 02:43:46 +0000 (19:43 -0700)
commit5470469d73eefec4cfe87c5642f45ef58ccf49c3
treec4ee087ac8a290c6a20299a9ebbc8a715f4526dc
parent6a7c6a24a770206815d22cd5dd6598737ce0b13d
Clearing up invalid entries when SyncStorageEngine starts

Any app with permission WRITE_SYNC_SETTINGS could write sync settings
for authorities or accounts that are not valid. This results in invalid
data being persisted to disk which can effectively lead to a DOS style
attack. Clearing such entries on boot will make sure that a reboot fixes
any such issues.

Test: cts-tradefed run cts-dev -m CtsSyncContentHostTestCases

Bug: 35028827
Change-Id: I9e206a42508e3cba65d7523bf47fff743f47dcb2
Merged-In: I9e206a42508e3cba65d7523bf47fff743f47dcb2
(cherry picked from commit 042a478b73c3b7f7cd73f5bb1af657cfe07d0571)
services/core/java/com/android/server/content/SyncStorageEngine.java