diff options
Diffstat (limited to 'debuggerd/tombstone.cpp')
-rw-r--r--[-rwxr-xr-x] | debuggerd/tombstone.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/debuggerd/tombstone.cpp b/debuggerd/tombstone.cpp index 2b9d093..df982a9 100755..100644 --- a/debuggerd/tombstone.cpp +++ b/debuggerd/tombstone.cpp @@ -684,7 +684,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 ? @@ -699,7 +699,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; |