Revert "zygote: don't drop CAP_SYS_PTRACE from the bounding set."

This reverts commit 59972218f8.

Bug: http://b/34853272
Test: debuggerd -b `pidof system_server`
Change-Id: I440932210b6e84647c2848bab2e082a58338fb1e
This commit is contained in:
Josh Gao
2017-02-01 13:19:56 -08:00
parent 9be24a3040
commit 0a2d61505a

View File

@@ -247,11 +247,6 @@ static void EnableKeepCapabilities(JNIEnv* env) {
static void DropCapabilitiesBoundingSet(JNIEnv* env) {
for (int i = 0; prctl(PR_CAPBSET_READ, i, 0, 0, 0) >= 0; i++) {
// Keep CAP_SYS_PTRACE in our bounding set so crash_dump can gain it.
if (i == CAP_SYS_PTRACE) {
continue;
}
int rc = prctl(PR_CAPBSET_DROP, i, 0, 0, 0);
if (rc == -1) {
if (errno == EINVAL) {