summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeff Tinker <jtinker@google.com>2014-06-17 16:45:46 -0700
committerJeff Tinker <jtinker@google.com>2014-06-20 10:12:12 -0700
commitb710094cc9fe5eaf4b00b091ba024e2a6837a7c3 (patch)
tree424038dc821e4b9b310051eeabfed3c30f590efe
parentab5cdbaf65ca509681d2726aacdf3ac8bfb6b3fa (diff)
downloadframeworks_av-b710094cc9fe5eaf4b00b091ba024e2a6837a7c3.zip
frameworks_av-b710094cc9fe5eaf4b00b091ba024e2a6837a7c3.tar.gz
frameworks_av-b710094cc9fe5eaf4b00b091ba024e2a6837a7c3.tar.bz2
Fix Externally reported security issue
bug: 12724697 Change-Id: I57f37dbb3b01c0c3d3256be67c395352dd6ada13
-rw-r--r--drm/drmserver/DrmManagerService.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/drm/drmserver/DrmManagerService.cpp b/drm/drmserver/DrmManagerService.cpp
index 2b71904..63341e0 100644
--- a/drm/drmserver/DrmManagerService.cpp
+++ b/drm/drmserver/DrmManagerService.cpp
@@ -34,7 +34,18 @@ using namespace android;
static Vector<uid_t> trustedUids;
static bool isProtectedCallAllowed() {
- return true;
+ // TODO
+ // Following implementation is just for reference.
+ // Each OEM manufacturer should implement/replace with their own solutions.
+ IPCThreadState* ipcState = IPCThreadState::self();
+ uid_t uid = ipcState->getCallingUid();
+
+ for (unsigned int i = 0; i < trustedUids.size(); ++i) {
+ if (trustedUids[i] == uid) {
+ return true;
+ }
+ }
+ return false;
}
void DrmManagerService::instantiate() {