File tree 1 file changed +15
-0
lines changed
1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -428,6 +428,14 @@ class WorkerRunner final : public WorkerRunnerService::Service {
428
428
return absl::InternalError (absl::StrCat (
429
429
" Failed to create " , binary_dir.native (), " : " , ec.message ()));
430
430
}
431
+ std::error_code ec;
432
+ if (std::filesystem::permissions (binary_dir,
433
+ std::filesystem::perms::owner_all, ec);
434
+ ec) {
435
+ return absl::InternalError (
436
+ absl::StrCat (" Failed to modify permissions for " , binary_dir.native (),
437
+ " : " , ec.message ()));
438
+ }
431
439
std::filesystem::path binary_path = binary_dir / *kBinaryExe ;
432
440
if (request.has_binary_content ()) {
433
441
PS_RETURN_IF_ERROR (SaveNewBinary (binary_path, request.binary_content ()));
@@ -561,6 +569,13 @@ int main(int argc, char** argv) {
561
569
LOG (ERROR) << " Failed to create " << prog_dir << " : " << ec;
562
570
return -1 ;
563
571
}
572
+ std::error_code ec;
573
+ if (std::filesystem::permissions (prog_dir, std::filesystem::perms::owner_all,
574
+ ec);
575
+ ec) {
576
+ LOG (ERROR) << " Failed to modify permission for " << prog_dir << " : " << ec;
577
+ return -1 ;
578
+ }
564
579
absl::Cleanup progdir_cleanup = [&prog_dir] {
565
580
if (absl::Status status =
566
581
::privacy_sandbox::server_common::byob::RemoveDirectories (prog_dir);
You can’t perform that action at this time.
0 commit comments