diff options
author | Calin Juravle <calin@google.com> | 2019-06-03 14:28:27 -0700 |
---|---|---|
committer | Nikoli Cartagena <dargeren@google.com> | 2019-06-10 14:53:01 -0700 |
commit | e23b90862397fb65f1a0c3320fcbd11d15809ac1 (patch) | |
tree | 69b68b7a0093ccd68f7c3084e0ddd05d63f89b9e | |
parent | 699cb9a11b1dce1515a4f591274b90269962cfec (diff) | |
download | art-security-oc-release.tar.gz |
Merge commit '67c932ce050e80b9bf23b15b24d9aed1a2ee209d' into art-file-createandroid-security-8.0.0_r54android-security-8.0.0_r53android-security-8.0.0_r52android-8.0.0_r51android-8.0.0_r50android-8.0.0_r49android-8.0.0_r48android-8.0.0_r47android-8.0.0_r46android-8.0.0_r45android-8.0.0_r44android-8.0.0_r43android-8.0.0_r42android-8.0.0_r41android-8.0.0_r40android-8.0.0_r39android-8.0.0_r38android-8.0.0_r37security-oc-releaseoreo-security-release
* commit '67c932ce050e80b9bf23b15b24d9aed1a2ee209d':
Use conservative permissions when creating files in ART
Bug: 130821293
Test: host run-test & gtest
Merged-In: Ic4dae399a5bfe862aff3d8614c45b38044d805db
Merged-In: I09eab9749d1ce5872ecaf7d5a80fc45c9c708853
Change-Id: Ic4dae399a5bfe862aff3d8614c45b38044d805db
(cherry picked from commit 7b1b6673e3535d6975ad86c3969bef35ba59a077)
-rw-r--r-- | runtime/os_linux.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/runtime/os_linux.cc b/runtime/os_linux.cc index 0add4965d1..ae86a2f5b1 100644 --- a/runtime/os_linux.cc +++ b/runtime/os_linux.cc @@ -55,7 +55,8 @@ File* OS::OpenFileWithFlags(const char* name, int flags, bool auto_flush) { CHECK(name != nullptr); bool read_only = ((flags & O_ACCMODE) == O_RDONLY); bool check_usage = !read_only && auto_flush; - std::unique_ptr<File> file(new File(name, flags, 0666, check_usage)); + std::unique_ptr<File> file( + new File(name, flags, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH, check_usage)); if (!file->IsOpened()) { return nullptr; } |