|
@@ -18,7 +18,7 @@ to STDOUT_FILENO/STD_OUTPUT_HANDLE and STDERR_FILENO/STD_ERROR_HANDLE allowing t
|
|
|
parent process to read from the pipe.
|
|
|
|
|
|
diff --git a/content/browser/child_process_launcher.h b/content/browser/child_process_launcher.h
|
|
|
-index 613feee88115d32905a3f8889cdf51d71cd5b4ec..da2fefd7b6e93a6f8b6eb008ebaac976f4ce64ea 100644
|
|
|
+index e3bc6f02cffcdbc0954173e4033a43437e3d5c37..7a7d8931759479021c14b9e014622a742bdbbe21 100644
|
|
|
--- a/content/browser/child_process_launcher.h
|
|
|
+++ b/content/browser/child_process_launcher.h
|
|
|
@@ -32,6 +32,7 @@
|
|
@@ -29,7 +29,7 @@ index 613feee88115d32905a3f8889cdf51d71cd5b4ec..da2fefd7b6e93a6f8b6eb008ebaac976
|
|
|
#endif
|
|
|
|
|
|
#if BUILDFLAG(IS_POSIX)
|
|
|
-@@ -165,7 +166,10 @@ struct ChildProcessLauncherFileData {
|
|
|
+@@ -169,7 +170,10 @@ struct ChildProcessLauncherFileData {
|
|
|
delete;
|
|
|
~ChildProcessLauncherFileData();
|
|
|
|
|
@@ -41,7 +41,7 @@ index 613feee88115d32905a3f8889cdf51d71cd5b4ec..da2fefd7b6e93a6f8b6eb008ebaac976
|
|
|
// Files opened by the browser and passed as corresponding file descriptors
|
|
|
// in the child process. If a FilePath is provided, the file will be opened
|
|
|
// and the descriptor cached for future process launches. If a ScopedFD is
|
|
|
-@@ -180,6 +184,15 @@ struct ChildProcessLauncherFileData {
|
|
|
+@@ -184,6 +188,15 @@ struct ChildProcessLauncherFileData {
|
|
|
std::map<std::string, absl::variant<base::FilePath, base::ScopedFD>>
|
|
|
files_to_preload;
|
|
|
#endif
|
|
@@ -628,10 +628,10 @@ index cb43aa14c9742f3788ae58c3e49b890cd532f327..6a738f7aade504f2ff3bb6647a0da8f8
|
|
|
#if BUILDFLAG(IS_MAC)
|
|
|
// Whether or not to disclaim TCC responsibility for the process, defaults to
|
|
|
diff --git a/sandbox/policy/win/sandbox_win.cc b/sandbox/policy/win/sandbox_win.cc
|
|
|
-index 459e6b31d7c10e4725e2b9140a2c66472261d725..ddff9f18dfb593fdd9b8cee7a3910a4324438a47 100644
|
|
|
+index a26c541c46a02d6b2e1566ad99d7cefdfba83b4b..b76568415a5845ef0b414e4cde9f241b6b86af01 100644
|
|
|
--- a/sandbox/policy/win/sandbox_win.cc
|
|
|
+++ b/sandbox/policy/win/sandbox_win.cc
|
|
|
-@@ -688,11 +688,9 @@ base::win::ScopedHandle CreateUnsandboxedJob() {
|
|
|
+@@ -694,11 +694,9 @@ base::win::ScopedHandle CreateUnsandboxedJob() {
|
|
|
// command line flag.
|
|
|
ResultCode LaunchWithoutSandbox(
|
|
|
const base::CommandLine& cmd_line,
|
|
@@ -644,7 +644,7 @@ index 459e6b31d7c10e4725e2b9140a2c66472261d725..ddff9f18dfb593fdd9b8cee7a3910a43
|
|
|
// Network process runs in a job even when unsandboxed. This is to ensure it
|
|
|
// does not outlive the browser, which could happen if there is a lot of I/O
|
|
|
// on process shutdown, in which case TerminateProcess can fail. See
|
|
|
-@@ -923,7 +921,7 @@ bool SandboxWin::InitTargetServices(TargetServices* target_services) {
|
|
|
+@@ -929,7 +927,7 @@ bool SandboxWin::InitTargetServices(TargetServices* target_services) {
|
|
|
ResultCode SandboxWin::GeneratePolicyForSandboxedProcess(
|
|
|
const base::CommandLine& cmd_line,
|
|
|
const std::string& process_type,
|
|
@@ -653,7 +653,7 @@ index 459e6b31d7c10e4725e2b9140a2c66472261d725..ddff9f18dfb593fdd9b8cee7a3910a43
|
|
|
SandboxDelegate* delegate,
|
|
|
TargetPolicy* policy) {
|
|
|
const base::CommandLine& launcher_process_command_line =
|
|
|
-@@ -937,7 +935,7 @@ ResultCode SandboxWin::GeneratePolicyForSandboxedProcess(
|
|
|
+@@ -943,7 +941,7 @@ ResultCode SandboxWin::GeneratePolicyForSandboxedProcess(
|
|
|
}
|
|
|
|
|
|
// Add any handles to be inherited to the policy.
|
|
@@ -662,7 +662,7 @@ index 459e6b31d7c10e4725e2b9140a2c66472261d725..ddff9f18dfb593fdd9b8cee7a3910a43
|
|
|
policy->AddHandleToShare(handle);
|
|
|
|
|
|
if (!policy->GetConfig()->IsConfigured()) {
|
|
|
-@@ -952,6 +950,13 @@ ResultCode SandboxWin::GeneratePolicyForSandboxedProcess(
|
|
|
+@@ -958,6 +956,13 @@ ResultCode SandboxWin::GeneratePolicyForSandboxedProcess(
|
|
|
// have no effect. These calls can fail with SBOX_ERROR_BAD_PARAMS.
|
|
|
policy->SetStdoutHandle(GetStdHandle(STD_OUTPUT_HANDLE));
|
|
|
policy->SetStderrHandle(GetStdHandle(STD_ERROR_HANDLE));
|
|
@@ -676,7 +676,7 @@ index 459e6b31d7c10e4725e2b9140a2c66472261d725..ddff9f18dfb593fdd9b8cee7a3910a43
|
|
|
#endif
|
|
|
|
|
|
if (!delegate->PreSpawnTarget(policy))
|
|
|
-@@ -964,7 +969,7 @@ ResultCode SandboxWin::GeneratePolicyForSandboxedProcess(
|
|
|
+@@ -970,7 +975,7 @@ ResultCode SandboxWin::GeneratePolicyForSandboxedProcess(
|
|
|
ResultCode SandboxWin::StartSandboxedProcess(
|
|
|
const base::CommandLine& cmd_line,
|
|
|
const std::string& process_type,
|
|
@@ -685,7 +685,7 @@ index 459e6b31d7c10e4725e2b9140a2c66472261d725..ddff9f18dfb593fdd9b8cee7a3910a43
|
|
|
SandboxDelegate* delegate,
|
|
|
base::Process* process) {
|
|
|
SandboxLaunchTimer timer;
|
|
|
-@@ -972,7 +977,7 @@ ResultCode SandboxWin::StartSandboxedProcess(
|
|
|
+@@ -978,7 +983,7 @@ ResultCode SandboxWin::StartSandboxedProcess(
|
|
|
// Avoid making a policy if we won't use it.
|
|
|
if (IsUnsandboxedProcess(delegate->GetSandboxType(), cmd_line,
|
|
|
*base::CommandLine::ForCurrentProcess())) {
|
|
@@ -694,7 +694,7 @@ index 459e6b31d7c10e4725e2b9140a2c66472261d725..ddff9f18dfb593fdd9b8cee7a3910a43
|
|
|
process);
|
|
|
}
|
|
|
|
|
|
-@@ -980,7 +985,7 @@ ResultCode SandboxWin::StartSandboxedProcess(
|
|
|
+@@ -986,7 +991,7 @@ ResultCode SandboxWin::StartSandboxedProcess(
|
|
|
timer.OnPolicyCreated();
|
|
|
|
|
|
ResultCode result = GeneratePolicyForSandboxedProcess(
|