Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit d8451a74 authored by Dipankar Bhardwaj's avatar Dipankar Bhardwaj
Browse files

Clear calling identity before call to UserManagerService

UserManagerService requires calling uid to have query or create users permission to fetch user info. When a volume is ejected from DocumentsUI, ejectRoot call is triggered to ExternalStorageProvider which further calls into StorageManagerService unmount. StorageManagerService checks for permission "android.permission.MOUNT_UNMOUNT_FILESYSTEMS" which ExternalStorageProvider has. For further call into UserManagerService, ExternalStorageProvider's identity is used, which fails as ExternalStorageProvider does not CREATE_USERS or QUERY_USERS permission. Call from StorageManagerService should be made with its own identity in this case given unmount() does not require caller to hold QUERY/CREATE user permission.

Bug: 209931583
Bug: 267955224
Change-Id: I9d00c7892b75345e1c4e83f1ec819fd9f4c36922
Test: locally
parent fc7c11e0
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