logd: clear DUMPABLE
Do not allow anyone to see logd memory. Test: gTest logd-unit-tests, liblog-unit-tests and logcat-unit-tests Bug: 32450474 Change-Id: Ic7377efcb7e1d3cd91b50741061037a0fb589045
This commit is contained in:
parent
3a724a8f5d
commit
6a70ded7bf
1 changed files with 5 additions and 0 deletions
|
|
@ -106,6 +106,11 @@ static int drop_privs() {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (prctl(PR_SET_DUMPABLE, 0) < 0) {
|
||||||
|
android::prdebug("failed to clear PR_SET_DUMPABLE");
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
gid_t groups[] = { AID_READPROC };
|
gid_t groups[] = { AID_READPROC };
|
||||||
ScopedMinijail j(minijail_new());
|
ScopedMinijail j(minijail_new());
|
||||||
minijail_set_supplementary_gids(j.get(), arraysize(groups), groups);
|
minijail_set_supplementary_gids(j.get(), arraysize(groups), groups);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue