resolve merge conflicts of 9515c23e16 to klp-modular-dev
Change-Id: I4b39875ce57bb1ea55898db3ffc004a491bbeaa4
diff --git a/debuggerd/tombstone.cpp b/debuggerd/tombstone.cpp
index c9a2376..08e1101 100644
--- a/debuggerd/tombstone.cpp
+++ b/debuggerd/tombstone.cpp
@@ -687,7 +687,7 @@
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 ?
@@ -697,7 +697,7 @@
// we didn't find an available file, so we clobber the oldest one
snprintf(path, sizeof(path), TOMBSTONE_DIR"/tombstone_%02d", 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) {
LOG("failed to open tombstone file '%s': %s\n", path, strerror(errno));
return NULL;