Android-x86
Fork
Donation


Commit MetaInfo

Revisión8602edae3cf122792fa0e9063c0b0b0e1f4bc61d (tree)
Tiempo2019-06-11 03:35:23
AutorCalin Juravle <calin@goog...>
CommiterNikoli Cartagena

Log Message

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)

Cambiar Resumen

Diferencia

--- a/runtime/os_linux.cc
+++ b/runtime/os_linux.cc
@@ -54,7 +54,7 @@ File* OS::CreateEmptyFileWriteOnly(const char* name) {
5454 File* OS::OpenFileWithFlags(const char* name, int flags) {
5555 CHECK(name != nullptr);
5656 std::unique_ptr<File> file(new File);
57- if (!file->Open(name, flags, 0666)) {
57+ if (!file->Open(name, flags, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH)) {
5858 return nullptr;
5959 }
6060 return file.release();
Show on old repository browser