diff options
author | Nick Kralevich <nnk@google.com> | 2014-07-14 20:46:00 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2014-07-14 20:46:00 +0000 |
commit | 10fad6adce755808a21c02e1c4b94df7bf84e8b1 (patch) | |
tree | ea785fca1dfeae5cefb238b9d7c1420476b21914 | |
parent | 24a5a7c30ad041971ca511f4c7f784936090dfc6 (diff) | |
parent | 787bdb33f6cdffd810dd243eedfbc0aed2c0abed (diff) | |
download | frameworks_av-10fad6adce755808a21c02e1c4b94df7bf84e8b1.zip frameworks_av-10fad6adce755808a21c02e1c4b94df7bf84e8b1.tar.gz frameworks_av-10fad6adce755808a21c02e1c4b94df7bf84e8b1.tar.bz2 |
am 787bdb33: Merge "Fix Externally reported security issue"
* commit '787bdb33f6cdffd810dd243eedfbc0aed2c0abed':
Fix Externally reported security issue
-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() { |