Skip to content

Commit

Permalink
Fix perms on diagnostic files (#57177)
Browse files Browse the repository at this point in the history
  • Loading branch information
hoyosjs committed Aug 11, 2021
1 parent 37d6d80 commit 4ea7dc4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/coreclr/debug/createdump/crashreportwriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ CrashReportWriter::WriteSysctl(const char* sysctlname, const char* valueName)

void
CrashReportWriter::WriteStackFrame(const StackFrame& frame)
{
{
OpenObject();
WriteValueBool("is_managed", frame.IsManaged());
WriteValue64("module_address", frame.ModuleAddress());
Expand Down Expand Up @@ -252,7 +252,7 @@ CrashReportWriter::WriteStackFrame(const StackFrame& frame)
bool
CrashReportWriter::OpenWriter(const char* fileName)
{
m_fd = open(fileName, O_WRONLY|O_CREAT|O_TRUNC, 0664);
m_fd = open(fileName, O_WRONLY|O_CREAT|O_TRUNC, S_IWUSR | S_IRUSR);
if (m_fd == -1)
{
fprintf(stderr, "Could not create json file %s: %d %s\n", fileName, errno, strerror(errno));
Expand Down
2 changes: 1 addition & 1 deletion src/coreclr/debug/createdump/dumpwriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ DumpWriter::~DumpWriter()
bool
DumpWriter::OpenDump(const char* dumpFileName)
{
m_fd = open(dumpFileName, O_WRONLY|O_CREAT|O_TRUNC, 0664);
m_fd = open(dumpFileName, O_WRONLY|O_CREAT|O_TRUNC, S_IWUSR | S_IRUSR);
if (m_fd == -1)
{
fprintf(stderr, "Could not open output %s: %d %s\n", dumpFileName, errno, strerror(errno));
Expand Down

0 comments on commit 4ea7dc4

Please sign in to comment.