Skip to content
Snippets Groups Projects
Commit 78aa5385 authored by Josh Gao's avatar Josh Gao Committed by The Android Automerger
Browse files

Don't create tombstone directory.

Partial backport of cf79748.

Bug: http://b/26403620
Change-Id: Ib877ab6cfab6aef079830c5a50ba81141ead35ee
parent 1435a02f
Branches
Tags
No related merge requests found
...@@ -788,21 +788,8 @@ char* engrave_tombstone(pid_t pid, pid_t tid, int signal, int original_si_code, ...@@ -788,21 +788,8 @@ char* engrave_tombstone(pid_t pid, pid_t tid, int signal, int original_si_code,
log.current_tid = tid; log.current_tid = tid;
log.crashed_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; int fd = -1;
char* path = NULL; char* path = find_and_open_tombstone(&fd);
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");
}
if (fd < 0) { if (fd < 0) {
_LOG(&log, logtype::ERROR, "Skipping tombstone write, nothing to do.\n"); _LOG(&log, logtype::ERROR, "Skipping tombstone write, nothing to do.\n");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment