Skip to content

Commit

Permalink
Merge "Make tombstones 664." into main
Browse files Browse the repository at this point in the history
  • Loading branch information
fmayer authored and Gerrit Code Review committed Feb 26, 2024
2 parents 3289747 + 877d1f6 commit d3fb7a6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions debuggerd/tombstoned/tombstoned.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,11 @@ class CrashQueue {

result.temporary_path = std::move(tmp_filename);
}
// We need to fchmodat after creating to avoid getting the umask applied.
std::string fd_path = StringPrintf("/proc/self/fd/%d", result.fd.get());
if (fchmodat(dir_fd_, fd_path.c_str(), 0664, 0) != 0) {
PLOG(ERROR) << "Failed to make tombstone world-readable";
}

return std::move(result);
}
Expand Down
2 changes: 1 addition & 1 deletion rootdir/init.rc
Original file line number Diff line number Diff line change
Expand Up @@ -709,7 +709,7 @@ on post-fs-data

# Start tombstoned early to be able to store tombstones.
mkdir /data/anr 0775 system system encryption=Require
mkdir /data/tombstones 0771 system system encryption=Require
mkdir /data/tombstones 0775 system system encryption=Require
mkdir /data/vendor/tombstones 0771 root root
mkdir /data/vendor/tombstones/wifi 0771 wifi wifi
start tombstoned
Expand Down

0 comments on commit d3fb7a6

Please sign in to comment.