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@google.com>
Wed, 2 Nov 2016 22:06:28 +0000 (22:06 +0000)
commit6b0079d3bc970d48e71cf9211d178e447f7f8a7c
tree9ca7c0ce655604184dc101ee11ef1ff679f1fca7
parent336791758a3003a2068b3063f562c978b8bf1e4d
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