summaryrefslogtreecommitdiffstats
path: root/cmds/content
diff options
context:
space:
mode:
authorDianne Hackborn <hackbod@google.com>2014-11-19 10:59:01 -0800
committerDianne Hackborn <hackbod@google.com>2014-11-19 14:29:10 -0800
commitff17024e583b170312d82089fd358d278ce16c9a (patch)
tree8c88e1081fe932f64fbae35b87fad3bb6f4ddd93 /cmds/content
parent9522055f1d10b30158b772885bf4befe06fb2a08 (diff)
downloadframeworks_base-ff17024e583b170312d82089fd358d278ce16c9a.zip
frameworks_base-ff17024e583b170312d82089fd358d278ce16c9a.tar.gz
frameworks_base-ff17024e583b170312d82089fd358d278ce16c9a.tar.bz2
Fix issue with call backs from media process.
All but a few lines of this is for issue #16013164, which allowed apps to do some operations as the media uid by having it call back to them to open a file. The problem here is with the tempory identity stuff in the activity manager, allowing us to make the open call as the original caller... ideally we should figure out a way to just get rid of all of that, but the solution here is actually easier (even though it doesn't look it) -- we now hand a token over to the openFile() call that it can use when doing permission checks to say "yes I would like the check to be against whoever is responsible for the open". This allows us to do the uid remapping for only this one specific set of permission checks, and nothing else. Also fix issue #17487348: Isolated services can access system services they shouldn't be able to. Don't send any system service IBinder objects down for the first initialization of an isolated process. Change-Id: I3c70e16e0899d7eef0bae458e83958b41ed2b75e
Diffstat (limited to 'cmds/content')
-rw-r--r--cmds/content/src/com/android/commands/content/Content.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmds/content/src/com/android/commands/content/Content.java b/cmds/content/src/com/android/commands/content/Content.java
index 948c9a2..bd34a9c 100644
--- a/cmds/content/src/com/android/commands/content/Content.java
+++ b/cmds/content/src/com/android/commands/content/Content.java
@@ -501,7 +501,7 @@ public class Content {
@Override
public void onExecute(IContentProvider provider) throws Exception {
- final ParcelFileDescriptor fd = provider.openFile(null, mUri, "r", null);
+ final ParcelFileDescriptor fd = provider.openFile(null, mUri, "r", null, null);
copy(new FileInputStream(fd.getFileDescriptor()), System.out);
}