summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNick Kralevich <nnk@google.com>2014-07-14 20:40:23 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2014-07-14 17:20:33 +0000
commit787bdb33f6cdffd810dd243eedfbc0aed2c0abed (patch)
tree4eccc859bfaa8faad980358be82ccc69d958d488
parentb7a88e3101d2d871f1d90c08806577a859f1ea12 (diff)
parent6868e986044a23cd3592f03b3937978175ebad53 (diff)
downloadframeworks_av-787bdb33f6cdffd810dd243eedfbc0aed2c0abed.zip
frameworks_av-787bdb33f6cdffd810dd243eedfbc0aed2c0abed.tar.gz
frameworks_av-787bdb33f6cdffd810dd243eedfbc0aed2c0abed.tar.bz2
Merge "Fix Externally reported security issue"
-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() {