diff options
author | Jeff Tinker <jtinker@google.com> | 2014-06-17 16:45:46 -0700 |
---|---|---|
committer | Riley Spahn <rileyspahn@google.com> | 2014-07-11 09:18:11 -0700 |
commit | 6868e986044a23cd3592f03b3937978175ebad53 (patch) | |
tree | 7a73fe45500e09bf55fdb3917c7b4f927b5a94a2 /drm | |
parent | 0bffd2e60f644c8b8650c48d320c8cc22deb8ab6 (diff) | |
download | frameworks_av-6868e986044a23cd3592f03b3937978175ebad53.zip frameworks_av-6868e986044a23cd3592f03b3937978175ebad53.tar.gz frameworks_av-6868e986044a23cd3592f03b3937978175ebad53.tar.bz2 |
Fix Externally reported security issue
bug: 12724697
Change-Id: I57f37dbb3b01c0c3d3256be67c395352dd6ada13
Diffstat (limited to 'drm')
-rw-r--r-- | drm/drmserver/DrmManagerService.cpp | 13 |
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() { |