Without setting up the file mode explicitly its impossible to read the
logs by users in OBS.
Change-Id: Icaa540b434fc6266cbd0b1ad3391e21b8cbb692f
Signed-off-by: Slava Barinov <v.barinov@samsung.com>
#include <fcntl.h>
#include <signal.h>
#include <sys/mman.h>
+#include <sys/stat.h>
#if SANITIZER_LINUX
#include <sys/utsname.h>
static const char *kWriteError =
"ReportFile::Write() can't output requested buffer!\n";
ReopenIfNecessary();
+ fchmod(fd, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
if (length != internal_write(fd, buffer, length)) {
internal_write(fd, kWriteError, internal_strlen(kWriteError));
Die();