summaryrefslogtreecommitdiffstats
path: root/debuggerd
diff options
context:
space:
mode:
Diffstat (limited to 'debuggerd')
-rw-r--r--debuggerd/backtrace.cpp4
-rw-r--r--[-rwxr-xr-x]debuggerd/tombstone.cpp4
2 files changed, 4 insertions, 4 deletions
diff --git a/debuggerd/backtrace.cpp b/debuggerd/backtrace.cpp
index c4a2143..e49ef9b 100644
--- a/debuggerd/backtrace.cpp
+++ b/debuggerd/backtrace.cpp
@@ -49,13 +49,13 @@ static void dump_process_header(log_t* log, pid_t pid) {
struct tm tm;
localtime_r(&t, &tm);
char timestr[64];
- _LOG(log, logtype::BACKTRACE, "\n\nABI: '%s'\n", ABI_STRING);
strftime(timestr, sizeof(timestr), "%F %T", &tm);
- _LOG(log, logtype::BACKTRACE, "\n----- pid %d at %s -----\n", pid, timestr);
+ _LOG(log, logtype::BACKTRACE, "\n\n----- pid %d at %s -----\n", pid, timestr);
if (procname) {
_LOG(log, logtype::BACKTRACE, "Cmd line: %s\n", procname);
}
+ _LOG(log, logtype::BACKTRACE, "ABI: '%s'\n", ABI_STRING);
}
static void dump_process_footer(log_t* log, pid_t pid) {
diff --git a/debuggerd/tombstone.cpp b/debuggerd/tombstone.cpp
index 32f0eca..a7e1524 100755..100644
--- a/debuggerd/tombstone.cpp
+++ b/debuggerd/tombstone.cpp
@@ -681,7 +681,7 @@ static char* find_and_open_tombstone(int* fd) {
if (errno != ENOENT)
continue;
- *fd = open(path, O_CREAT | O_EXCL | O_WRONLY, 0600);
+ *fd = open(path, O_CREAT | O_EXCL | O_WRONLY | O_NOFOLLOW | O_CLOEXEC, 0600);
if (*fd < 0)
continue; // raced ?
@@ -696,7 +696,7 @@ static char* find_and_open_tombstone(int* fd) {
// we didn't find an available file, so we clobber the oldest one
snprintf(path, sizeof(path), TOMBSTONE_TEMPLATE, oldest);
- *fd = open(path, O_CREAT | O_TRUNC | O_WRONLY, 0600);
+ *fd = open(path, O_CREAT | O_TRUNC | O_WRONLY | O_NOFOLLOW | O_CLOEXEC, 0600);
if (*fd < 0) {
ALOGE("failed to open tombstone file '%s': %s\n", path, strerror(errno));
return NULL;