From 499f3a2aed549a354367587d5c15fbef617098be Mon Sep 17 00:00:00 2001 From: Luis Hector Chavez Date: Wed, 13 Jun 2018 07:35:24 -0700 Subject: [PATCH] logd: Stop calling prctl(PR_SET_KEEPCAPS, 1) This change removes the call to prctl(PR_SET_KEEPCAPS, 1), because now that logd is being run with ambient capabilities, init will set the KEEP_CAPS / KEEP_CAPS_LOCKED securebits. Bug: 110127913 Test: liblog-unit-tests, logd-unit-tests, logcat-unit-tests (on an aosp_sailfish-userdebug) Change-Id: I72b6a49c5cd1552085f9ad44cb19a7333a13eeea --- logd/main.cpp | 5 ----- 1 file changed, 5 deletions(-) diff --git a/logd/main.cpp b/logd/main.cpp index 606aa6341..5a588bea8 100644 --- a/logd/main.cpp +++ b/logd/main.cpp @@ -115,11 +115,6 @@ static int drop_privs(bool klogd, bool auditd) { return -1; } - if (prctl(PR_SET_KEEPCAPS, 1) < 0) { - android::prdebug("failed to set PR_SET_KEEPCAPS"); - if (!eng) return -1; - } - std::unique_ptr caps(cap_init(), cap_free); if (cap_clear(caps.get()) < 0) return -1;