From da98133cc0b88e5a545c5f588ff5a7e6a6f75bef Mon Sep 17 00:00:00 2001 From: Steve Fung Date: Sun, 23 Aug 2015 17:18:23 -0700 Subject: [PATCH] crash_reporter: Fix tmp directory location It is unsafe to use /data/local/tmp. Use our own temporary directory under /data/misc/crash_reporter. Bug: 23430484 Change-Id: I186ba6b146bd884064177a3bb29b18b8edcc0b62 --- crash_reporter/init.crash_reporter.rc | 1 - crash_reporter/user_collector.cc | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/crash_reporter/init.crash_reporter.rc b/crash_reporter/init.crash_reporter.rc index f65371a2f..6882b771d 100644 --- a/crash_reporter/init.crash_reporter.rc +++ b/crash_reporter/init.crash_reporter.rc @@ -12,7 +12,6 @@ on boot # Create crash directories. mkdir /data/misc/crash_reporter 0700 root root - mkdir /data/local/tmp/crash_reporter 0700 root root service crash_reporter /system/bin/crash_reporter --init class late_start diff --git a/crash_reporter/user_collector.cc b/crash_reporter/user_collector.cc index 6bf912099..416c1df45 100644 --- a/crash_reporter/user_collector.cc +++ b/crash_reporter/user_collector.cc @@ -33,7 +33,7 @@ static const char kCoreToMinidumpConverterPath[] = "/system/bin/core2md"; static const char kStatePrefix[] = "State:\t"; -static const char kCoreTempFolder[] = "/data/local/tmp/crash_reporter"; +static const char kCoreTempFolder[] = "/data/misc/crash_reporter/tmp"; // Define an otherwise invalid value that represents an unknown UID. static const uid_t kUnknownUid = -1;