installd: only delete contents of user's CE and DE dirs
The /data/user/$userId, /data/user_de/$userId, and /data/media/$userId directories (or their /mnt/expand equivalents) are created by vold, so they should be deleted by vold as well, and in fact that would already happen except that installd deletes them recursively before vold gets to it. Change installd 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. Bug: 156305599 Change-Id: I93f0f86df10829818d0becb65af31190dd008b3c
Loading
Please register or sign in to comment