wukenaihe / google-breakpad

Automatically exported from code.google.com/p/google-breakpad
0 stars 0 forks source link

fix permissions on dump file in MinidumpFileWriter #175

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
It does this:
 file_ = open(path, O_WRONLY | O_CREAT | O_TRUNC, 0666);

That's not appropriate if we wind up writing a minidump to /tmp.

Original issue reported on code.google.com by ted.mielczarek on 21 May 2007 at 6:12

GoogleCodeExporter commented 9 years ago
We want O_EXCL and a mode no more permissive than 0600 for this.  We should do 
this
on all platforms that we create minidump files with POSIX APIs for.

We should probably apply the same principle to our use of CreateFile in the 
Windows
handler.

Original comment by mmento...@gmail.com on 21 May 2007 at 6:15

GoogleCodeExporter commented 9 years ago
This patch fixes the call to open in MinidumpFileWriter::Open.

Original comment by ted.mielczarek on 5 Jul 2007 at 9:24

Attachments:

GoogleCodeExporter commented 9 years ago
This changes the CreateFile call in the Windows exception handler slightly.  
Actually
setting up an ACL to deny access to anyone but the owner is pretty complicated, 
so I
punted on that.

Original comment by ted.mielczarek on 5 Jul 2007 at 9:30

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by ted.mielczarek on 5 Jul 2007 at 10:13