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

UserDataPreparer: only delete contents of user's system CE and DE dirs

The /data/system_ce/$userId and /data/system_de/$userId directories are
created by vold, so they should be deleted by vold as well, and in fact
that would already happen except that system_server deletes them
recursively before vold gets to it.  Change system_server to delete just
the contents of these directories.

This is a prerequisite to locking down the ability to create these
directories (https://r.android.com/2078213), which is needed to stop
subdirectories from accidentally being created too early.  Technically
we could achieve this goal without limiting delete access, as it's
create access that really matters, but having the operations be paired
properly is much cleaner.

Test: Created and deleted a user, and verified that all their
      directories still got deleted.
Test: atest UserDataPreparerTest
Bug: 156305599
Change-Id: Iec908e1bc15a00c7179fcd1d80321c315682d339
parent 14fff66f
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