add aid check when writting into logd stats buffer. For now we require
aid to be system. Change-Id: I9e701a3146c3269d7e3f315c1182391de5e8cc63 Test: will add tests later
This commit is contained in:
parent
379c255178
commit
ec0c886da6
1 changed files with 8 additions and 0 deletions
|
|
@ -101,6 +101,14 @@ bool LogListener::onDataAvailable(SocketClient* cli) {
|
|||
return false;
|
||||
}
|
||||
|
||||
if (header->id == LOG_ID_STATS) {
|
||||
// Only accept logging from *ManagerService in system server
|
||||
// Will add more later as we see fit.
|
||||
if (cred->uid != AID_SYSTEM && cred->gid != AID_SYSTEM) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// Check credential validity, acquire corrected details if not supplied.
|
||||
if (cred->pid == 0) {
|
||||
cred->pid = logbuf ? logbuf->tidToPid(header->tid)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue