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>
Mon, 4 May 2015 23:08:00 +0000 (16:08 -0700)
Bug: 19483574
Change-Id: Iee89138520a657df9a02bc98217c311d8c5a9262

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;
 }