logd: crash dumps on userdebug only

Test: none
Change-Id: I98ff8743d787b8edc013e49380b6321dfbd9b660
This commit is contained in:
Mark Salyzyn 2018-08-15 12:17:18 -07:00
parent 895c13fe22
commit 4b42ea523a
1 changed files with 2 additions and 1 deletions

View File

@ -104,7 +104,8 @@ static int drop_privs(bool klogd, bool auditd) {
return -1;
}
if (__android_logger_property_get_bool("ro.debuggable", BOOL_DEFAULT_FALSE) &&
if (!__android_logger_property_get_bool("ro.debuggable",
BOOL_DEFAULT_FALSE) &&
prctl(PR_SET_DUMPABLE, 0) == -1) {
android::prdebug("failed to clear PR_SET_DUMPABLE");
return -1;