am 5566d9db
: Merge "Bypass surface flinger permission check for calls from system."
* commit '5566d9db26e656a53ee9a5e87c0af997bb1a10d5': Bypass surface flinger permission check for calls from system.
This commit is contained in:
commit
adb3aff05c
@ -93,7 +93,7 @@ status_t Client::onTransact(
|
|||||||
const int pid = ipc->getCallingPid();
|
const int pid = ipc->getCallingPid();
|
||||||
const int uid = ipc->getCallingUid();
|
const int uid = ipc->getCallingUid();
|
||||||
const int self_pid = getpid();
|
const int self_pid = getpid();
|
||||||
if (CC_UNLIKELY(pid != self_pid && uid != AID_GRAPHICS && uid != 0)) {
|
if (CC_UNLIKELY(pid != self_pid && uid != AID_GRAPHICS && uid != AID_SYSTEM && uid != 0)) {
|
||||||
// we're called from a different process, do the real check
|
// we're called from a different process, do the real check
|
||||||
if (!PermissionCache::checkCallingPermission(sAccessSurfaceFlinger))
|
if (!PermissionCache::checkCallingPermission(sAccessSurfaceFlinger))
|
||||||
{
|
{
|
||||||
|
@ -2807,7 +2807,7 @@ status_t SurfaceFlinger::onTransact(
|
|||||||
IPCThreadState* ipc = IPCThreadState::self();
|
IPCThreadState* ipc = IPCThreadState::self();
|
||||||
const int pid = ipc->getCallingPid();
|
const int pid = ipc->getCallingPid();
|
||||||
const int uid = ipc->getCallingUid();
|
const int uid = ipc->getCallingUid();
|
||||||
if ((uid != AID_GRAPHICS) &&
|
if ((uid != AID_GRAPHICS && uid != AID_SYSTEM) &&
|
||||||
!PermissionCache::checkPermission(sAccessSurfaceFlinger, pid, uid)) {
|
!PermissionCache::checkPermission(sAccessSurfaceFlinger, pid, uid)) {
|
||||||
ALOGE("Permission Denial: "
|
ALOGE("Permission Denial: "
|
||||||
"can't access SurfaceFlinger pid=%d, uid=%d", pid, uid);
|
"can't access SurfaceFlinger pid=%d, uid=%d", pid, uid);
|
||||||
|
Loading…
Reference in New Issue
Block a user