OSDN Git Service

Add app's own UID to the default ACL.
authorMartijn Coenen <maco@google.com>
Tue, 16 Jun 2020 12:58:52 +0000 (14:58 +0200)
committerMartijn Coenen <maco@google.com>
Tue, 16 Jun 2020 13:16:18 +0000 (15:16 +0200)
commit1129b81071f624c638c45aae68f8285b20b151df
treeffc19b8a6b9a9c5b76264151fad639ae87ebfd99
parentcbb69e548a927b4ec2933e1033f955d88004db25
Add app's own UID to the default ACL.

On devices without sdcardfs, /Android/data/com.foo and
/Android/obb/com.foo can be written by other processes (eg installers);
in those cases, file ownership may be wrong. To ensure that the original
app always has access to the files contained in this directory, add a
group to the default ACL that matches the UID of the app. Since all apps
have their own UID also as their group ID, this ensures that things keep
working correctly.

Bug: 157530951
Test: atest
android.appsecurity.cts.ExternalStorageHostTest#testExternalStorageUnsharedObb
Change-Id: I829a2a7c7b578a8328643f38681e68796adcd6b2

Change-Id: Ibbc333fb395507363830dfcf5dc6f1cfd55f008d
Utils.cpp