OSDN Git Service

Change the encoded file's mode to be readable by GMS core.
authorDehao Chen <dehao@google.com>
Mon, 4 May 2015 23:08:00 +0000 (16:08 -0700)
committerDehao Chen <dehao@google.com>
Tue, 5 May 2015 17:37:13 +0000 (10:37 -0700)
Bug: 19483574

(cherry picked from commit adc45b2517a336e152aaa8ffbf19a505547f7d77)

Change-Id: I0ec40f7571d9b400bc37f2ebe7a268d1cb8dfe82

perfprofd/perfprofdcore.cc

index 69db208..f77fa57 100644 (file)
@@ -555,6 +555,8 @@ PROFILE_RESULT encode_to_proto(const std::string &data_file_path,
     return ERR_WRITE_ENCODED_FILE_FAILED;
   }
   fclose(fp);
+  chmod(encoded_file_path.c_str(),
+        S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH);
 
   return OK_PROFILE_COLLECTION;
 }