Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8830c95d authored by Josh Gao's avatar Josh Gao
Browse files

tombstoned: create tombstones with 0640 permissions.

Make tombstones group readable to allow them to be picked up by the
dropbox service.

Bug: http://b/35979630
Test: killall -ABRT rild; dumpsys dropbox
Change-Id: If57cc17563c80d5b5c4887b0937905bffef6b231
parent 22cc398d
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -116,7 +116,7 @@ static unique_fd get_tombstone_fd() {
  }

  result.reset(
    openat(tombstone_directory_fd, buf, O_CREAT | O_EXCL | O_WRONLY | O_APPEND | O_CLOEXEC, 0700));
    openat(tombstone_directory_fd, buf, O_CREAT | O_EXCL | O_WRONLY | O_APPEND | O_CLOEXEC, 0640));
  if (result == -1) {
    PLOG(FATAL) << "failed to create tombstone at " << kTombstoneDirectory << buf;
  }
@@ -254,6 +254,8 @@ fail:
}

int main(int, char* []) {
  umask(0137);

  tombstone_directory_fd = open(kTombstoneDirectory, O_DIRECTORY | O_RDONLY | O_CLOEXEC);
  if (tombstone_directory_fd == -1) {
    PLOG(FATAL) << "failed to open tombstone directory";