Merge "Verify caller before auto granting slice permission" into qt-dev

This commit is contained in:
TreeHugger Robot
2022-03-09 05:41:31 +00:00
committed by Android (Google) Code Review

View File

@@ -237,6 +237,8 @@ public class SliceManagerService extends ISliceManager.Stub {
if (autoGrantPermissions != null && callingPkg != null) {
// Need to own the Uri to call in with permissions to grant.
enforceOwner(callingPkg, uri, userId);
// b/208232850: Needs to verify caller before granting slice access
verifyCaller(callingPkg);
for (String perm : autoGrantPermissions) {
if (mContext.checkPermission(perm, pid, uid) == PERMISSION_GRANTED) {
int providerUser = ContentProvider.getUserIdFromUri(uri, userId);