mirror of
https://github.com/yuzu-emu/breakpad.git
synced 2025-02-02 11:41:02 +00:00
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
This commit is contained in:
parent
8408a209cd
commit
b62d01462c
|
@ -53,7 +53,7 @@ MinidumpFileWriter::~MinidumpFileWriter() {
|
||||||
|
|
||||||
bool MinidumpFileWriter::Open(const char *path) {
|
bool MinidumpFileWriter::Open(const char *path) {
|
||||||
assert(file_ == -1);
|
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;
|
return file_ != -1;
|
||||||
}
|
}
|
||||||
|
|
|
@ -452,9 +452,9 @@ bool ExceptionHandler::WriteMinidumpWithException(
|
||||||
if (minidump_write_dump_) {
|
if (minidump_write_dump_) {
|
||||||
HANDLE dump_file = CreateFile(next_minidump_path_c_,
|
HANDLE dump_file = CreateFile(next_minidump_path_c_,
|
||||||
GENERIC_WRITE,
|
GENERIC_WRITE,
|
||||||
FILE_SHARE_WRITE,
|
0, // no sharing
|
||||||
NULL,
|
NULL,
|
||||||
CREATE_ALWAYS,
|
CREATE_NEW, // fail if exists
|
||||||
FILE_ATTRIBUTE_NORMAL,
|
FILE_ATTRIBUTE_NORMAL,
|
||||||
NULL);
|
NULL);
|
||||||
if (dump_file != INVALID_HANDLE_VALUE) {
|
if (dump_file != INVALID_HANDLE_VALUE) {
|
||||||
|
|
Loading…
Reference in a new issue