Use conservative permissions when creating files in ART

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)
diff --git a/runtime/os_linux.cc b/runtime/os_linux.cc
index f45e9f6..b628846 100644
--- a/runtime/os_linux.cc
+++ b/runtime/os_linux.cc
@@ -54,7 +54,7 @@
 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();