summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin F. Haggerty <haggertk@lineageos.org>2019-08-05 17:21:19 -0600
committerKevin F. Haggerty <haggertk@lineageos.org>2019-08-05 17:21:19 -0600
commit3ff04a70bf0171cdacd311e1eedfaa0debbdbb7b (patch)
tree567ca33371a6af69353b13837729c8960bb0abaa
parent8f0ff544d9e7af1a0cd3d86be4aafe443a27d4c2 (diff)
parentc69fda3b92bfb926b16f73efa6cf80bc91ab5847 (diff)
downloadart-lineage-16.0.tar.gz
art-lineage-16.0.tar.bz2
art-lineage-16.0.zip
Merge tag 'android-9.0.0_r46' into staging/lineage-16.0_merge-android-9.0.0_r46lineage-16.0
Android 9.0.0 Release 46 (PQ3A.190801.002) * tag 'android-9.0.0_r46': Use conservative permissions when creating files in ART am: d224e964bd Change-Id: Iddc0ec67fd54989807a8b23db0e0f20e841572e2
-rw-r--r--libartbase/base/os_linux.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/libartbase/base/os_linux.cc b/libartbase/base/os_linux.cc
index cb228bd853..c972f8f95c 100644
--- a/libartbase/base/os_linux.cc
+++ b/libartbase/base/os_linux.cc
@@ -57,7 +57,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;
}