Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(102)

Unified Diff: client/settings.cc

Issue 997613002: Fix Settings::OpenForReadingAndWriting using O_CREAT with no mode. (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | client/settings_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: client/settings.cc
diff --git a/client/settings.cc b/client/settings.cc
index 8a087b9701e19d0b1f75aa3cd6c1640e839f90ff..f10421a81924296689351209aa32902f2ee920d4 100644
--- a/client/settings.cc
+++ b/client/settings.cc
@@ -30,15 +30,15 @@ namespace crashpad {
struct ALIGNAS(4) Settings::Data {
static const uint16_t kSettingsVersion = 1;
+ enum Options : uint32_t {
+ kUploadsEnabled = 1 << 0,
+ };
+
Data() : version(kSettingsVersion),
options(0),
last_upload_attempt_time(0),
client_id() {}
- enum Options : uint32_t {
- kUploadsEnabled = 1 << 0,
- };
-
uint32_t version;
uint32_t options;
uint64_t last_upload_attempt_time; // time_t
@@ -152,7 +152,7 @@ ScopedFileHandle Settings::OpenForReading() {
ScopedFileHandle Settings::OpenForReadingAndWriting() {
ScopedFileHandle handle(HANDLE_EINTR(
- open(file_path(), O_RDWR | O_EXLOCK | O_CREAT)));
+ open(file_path(), O_RDWR | O_EXLOCK | O_CREAT, 0644)));
PLOG_IF(ERROR, !handle.is_valid()) << "open for writing";
return handle.Pass();
}
« no previous file with comments | « no previous file | client/settings_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698