diff options
author | Calin Juravle <calin@google.com> | 2019-05-23 13:14:35 -0700 |
---|---|---|
committer | Vasyl Gello <vasek.gello@gmail.com> | 2019-08-06 20:31:53 +0000 |
commit | 8806236ac203393173b3fe5959bc54d15bb6983b (patch) | |
tree | 89f7ff6a49e1b971ec8264c4557e2d482a0f3154 | |
parent | 8b0b7302c8c24e12a840de15f0c8b7b95d42ab6b (diff) | |
download | art-cm-14.1.tar.gz art-cm-14.1.tar.bz2 art-cm-14.1.zip |
Use conservative permissions when creating files in ARTcm-14.1
Use 644 permissions by default so that only the owner has write-rights.
Bug: 130821293
Test: host run-test & gtest
Merged-In: Ic4dae399a5bfe862aff3d8614c45b38044d805db
Merged-In: I09eab9749d1ce5872ecaf7d5a80fc45c9c708853
Change-Id: I09eab9749d1ce5872ecaf7d5a80fc45c9c708853
(cherry picked from commit e69642936ef28e09970e8a3abb36f31e3d7d17bf)
-rw-r--r-- | runtime/os_linux.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/runtime/os_linux.cc b/runtime/os_linux.cc index f45e9f6030..b628846d66 100644 --- a/runtime/os_linux.cc +++ b/runtime/os_linux.cc @@ -54,7 +54,7 @@ File* OS::CreateEmptyFileWriteOnly(const char* name) { File* OS::OpenFileWithFlags(const char* name, int flags) { CHECK(name != nullptr); std::unique_ptr<File> file(new File); - if (!file->Open(name, flags, 0666)) { + if (!file->Open(name, flags, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH)) { return nullptr; } return file.release(); |