Give database settings kOwnerOnly permissions

Bug: b/145240822
Change-Id: Id3720471ce67edd981c35b62cf1d8f810899646c
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/1940848
Reviewed-by: Mark Mentovai <mark@chromium.org>
This commit is contained in:
Joshua Peraza 2019-11-27 11:49:15 -08:00
parent 74490f00a4
commit 7fd5226a97

View File

@ -226,10 +226,10 @@ Settings::ScopedLockedFileHandle Settings::OpenForReadingAndWriting(
FileHandle handle;
if (log_open_error) {
handle = LoggingOpenFileForReadAndWrite(
file_path(), mode, FilePermissions::kWorldReadable);
file_path(), mode, FilePermissions::kOwnerOnly);
} else {
handle = OpenFileForReadAndWrite(
file_path(), mode, FilePermissions::kWorldReadable);
file_path(), mode, FilePermissions::kOwnerOnly);
}
return MakeScopedLockedFileHandle(