Minidump file permission

47 views
Skip to first unread message

S Ma

unread,
Jun 22, 2018, 10:06:42 AM6/22/18
to google-breakpad-dev
Dear Breakpad developers,

Currently the munidump file is written with the permission flag default to "0600" -- which prevents user from moving/deleting minidump files when they are no longer needed. Instead, we have to manually edit the source file to change the permission flag to build the package. Is it possible to have it set to "0666" as the default in the source file (in src/client/minidump_file_writer.cc), or make it available as a user option at build time?

Regards,
Shelton


 

Mike Frysinger

unread,
Jun 22, 2018, 11:30:36 AM6/22/18
to google-br...@googlegroups.com
to be clear, the process that creates the minidump is free to chmod/chown/whatever it wants on the file it just created.  so i don't buy the argument that breakpad is making this overtly difficult.  if you're expecting a dumping process running as one user to create reports that anyone on the system can access/modify, then that's unreasonable.  along those lines, it seems unlikely we'd change the default to 0666.
(i'm aware of umask and related arguments, but i don't find them compelling.)

if you wanted to post a patch that extended the Open API to take an optional mode argument (which still defaulted to 0600), as well as adding Chown/Chmod helpers (which would operate on the file_ handle), then feel free.  then callers would be free to implement whatever policy they like w/out worrying about TOCTOU races, and the default can remain sane.
-mike

--
You received this message because you are subscribed to the Google Groups "google-breakpad-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-breakpad...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

S Ma

unread,
Jun 22, 2018, 1:36:29 PM6/22/18
to google-breakpad-dev
Sorry I didn't realize that minidump is allowed to chmod within the process that invoke the crash report.
Thank you for pointing to this. Issue resolved.

Regards,
Shelton
To unsubscribe from this group and stop receiving emails from it, send an email to google-breakpad-dev+unsub...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages