diff options
author | ted.mielczarek <ted.mielczarek@4c0a9323-5329-0410-9bdc-e9ce6186880e> | 2007-07-05 22:13:02 +0000 |
---|---|---|
committer | ted.mielczarek <ted.mielczarek@4c0a9323-5329-0410-9bdc-e9ce6186880e> | 2007-07-05 22:13:02 +0000 |
commit | b62d01462c23676335eb09c0e0b988967d67b387 (patch) | |
tree | f04f1db072d94b41312577209a64053f49a04738 /src/client | |
parent | issue 151 - Crash when processing file names less than 4 bytes. r=me (diff) | |
download | breakpad-b62d01462c23676335eb09c0e0b988967d67b387.tar.xz |
Issue 175 - fix permissions on dump file in MinidumpFileWriter. r=mento
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@197 4c0a9323-5329-0410-9bdc-e9ce6186880e
Diffstat (limited to 'src/client')
-rw-r--r-- | src/client/minidump_file_writer.cc | 2 | ||||
-rw-r--r-- | src/client/windows/handler/exception_handler.cc | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/client/minidump_file_writer.cc b/src/client/minidump_file_writer.cc index a4816d1a..fdd59198 100644 --- a/src/client/minidump_file_writer.cc +++ b/src/client/minidump_file_writer.cc @@ -53,7 +53,7 @@ MinidumpFileWriter::~MinidumpFileWriter() { bool MinidumpFileWriter::Open(const char *path) { assert(file_ == -1); - file_ = open(path, O_WRONLY | O_CREAT | O_TRUNC, 0666); + file_ = open(path, O_WRONLY | O_CREAT | O_EXCL, 0600); return file_ != -1; } diff --git a/src/client/windows/handler/exception_handler.cc b/src/client/windows/handler/exception_handler.cc index 9a9d5266..4bb67b21 100644 --- a/src/client/windows/handler/exception_handler.cc +++ b/src/client/windows/handler/exception_handler.cc @@ -452,9 +452,9 @@ bool ExceptionHandler::WriteMinidumpWithException( if (minidump_write_dump_) { HANDLE dump_file = CreateFile(next_minidump_path_c_, GENERIC_WRITE, - FILE_SHARE_WRITE, + 0, // no sharing NULL, - CREATE_ALWAYS, + CREATE_NEW, // fail if exists FILE_ATTRIBUTE_NORMAL, NULL); if (dump_file != INVALID_HANDLE_VALUE) { |