summaryrefslogtreecommitdiffstats
path: root/debuggerd
diff options
context:
space:
mode:
authorJosh Gao <jmgao@google.com>2016-02-16 15:01:43 -0800
committerThe Android Automerger <android-build@google.com>2016-02-26 16:56:25 -0800
commite1d784619a3c5de9073465645eb98ea6595a4507 (patch)
tree635c5e2a191cae8c2262b29fed22d483e1dadedd /debuggerd
parente2965141716530898964afcc0cc03d72be190b21 (diff)
downloadsystem_core-e1d784619a3c5de9073465645eb98ea6595a4507.zip
system_core-e1d784619a3c5de9073465645eb98ea6595a4507.tar.gz
system_core-e1d784619a3c5de9073465645eb98ea6595a4507.tar.bz2
Don't create tombstone directory.
Partial backport of cf79748. Bug: http://b/26403620 Change-Id: Ib877ab6cfab6aef079830c5a50ba81141ead35ee
Diffstat (limited to 'debuggerd')
-rw-r--r--debuggerd/tombstone.cpp15
1 files changed, 1 insertions, 14 deletions
diff --git a/debuggerd/tombstone.cpp b/debuggerd/tombstone.cpp
index b0ad274..aeffc66 100644
--- a/debuggerd/tombstone.cpp
+++ b/debuggerd/tombstone.cpp
@@ -788,21 +788,8 @@ char* engrave_tombstone(pid_t pid, pid_t tid, int signal, int original_si_code,
log.current_tid = tid;
log.crashed_tid = tid;
- if ((mkdir(TOMBSTONE_DIR, 0755) == -1) && (errno != EEXIST)) {
- _LOG(&log, logtype::ERROR, "failed to create %s: %s\n", TOMBSTONE_DIR, strerror(errno));
- }
-
- if (chown(TOMBSTONE_DIR, AID_SYSTEM, AID_SYSTEM) == -1) {
- _LOG(&log, logtype::ERROR, "failed to change ownership of %s: %s\n", TOMBSTONE_DIR, strerror(errno));
- }
-
int fd = -1;
- char* path = NULL;
- if (selinux_android_restorecon(TOMBSTONE_DIR, 0) == 0) {
- path = find_and_open_tombstone(&fd);
- } else {
- _LOG(&log, logtype::ERROR, "Failed to restore security context, not writing tombstone.\n");
- }
+ char* path = find_and_open_tombstone(&fd);
if (fd < 0) {
_LOG(&log, logtype::ERROR, "Skipping tombstone write, nothing to do.\n");