OSDN Git Service

Public volumes belong to a single user.
authorJeff Sharkey <jsharkey@android.com>
Wed, 2 Nov 2016 21:26:01 +0000 (15:26 -0600)
committerJeff Sharkey <jsharkey@android.com>
Wed, 2 Nov 2016 22:04:38 +0000 (16:04 -0600)
commit3a062a67fa5954584c754d2cf0bb326841432e3e
tree38a1b1d8bc445185f6ef859b8a994727af2cb2dd
parentaa394dd42c049479bface1991f11b863dc1a0922
Public volumes belong to a single user.

When a public (vfat) device is inserted, it's strongly associated
with the current foreground user, and no other users should be able
to access it, since otherwise that would be a cross-user data leak.

To use the device under a different user, switch users and then
eject/remount the device.

Test: verified user isolation of USB drive
Bug: 32523490
Change-Id: I590c791996f1fea8d78f625dc942d149f1f41614
packages/ExternalStorageProvider/src/com/android/externalstorage/ExternalStorageProvider.java
services/core/java/com/android/server/MountService.java