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
diff --git a/init.crash_reporter.rc b/init.crash_reporter.rc index f65371a..6882b77 100644 --- a/init.crash_reporter.rc +++ b/init.crash_reporter.rc
@@ -12,7 +12,6 @@ # 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/user_collector.cc b/user_collector.cc index 6bf9120..416c1df 100644 --- a/user_collector.cc +++ b/user_collector.cc
@@ -33,7 +33,7 @@ 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;