logd: Audit the privileged access to logd
Whenever there is a privileged access to logd via READ_LOGS
permission, the logd will suspend the client thread and notify
the LogcatManagerService (on system_server). We exempt the thread
if it only reads event logs.
The LogcatMangerService records the access event and sends a
decision to the logd. An approval will resume the suspending thread.
A refusal will revode the suspending thread.
The logd and LogcatManagerService communicate with each other
through binders. The logd establishes a binder service called "logd".
On the other side, the LogcatManagerService maintains a binder
service called "logcat".
Bug: 197901557
Test: CtsLiblogTestCases
Ignore-AOSP-First: pending fix for logcat privacy issue
Change-Id: I464b3d3fdf2f0f26c95682d19dc637d0ce40a2ad
20 files changed