Commit 491f2b69 authored by Lei Zhang's avatar Lei Zhang Committed by Commit Bot

Use |kPdfConversion| sandbox type for Cloud Print utility process.

As is, the utility processes launched by the Cloud Print service process
are generic utility processes. This worked fine for Cloud Print on
Windows until https://crrev.com/748400 limited the sandbox types to do
gdi32.dll patching for. To resume gdi32.dll patching, update the utility
processes to be of type |kPdfConversion|, which better reflects what
they do.

Bug: 1128450
Change-Id: Ib2f3bfb688891d628ba798965f3e137ec4490c28
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2423543Reviewed-by: default avatarWill Harris <wfh@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/master@{#809426}
parent 0e7a3e9e
......@@ -92,7 +92,7 @@ class ServiceSandboxedProcessLauncherDelegate
}
sandbox::policy::SandboxType GetSandboxType() override {
return sandbox::policy::SandboxType::kUtility;
return sandbox::policy::SandboxType::kPdfConversion;
}
private:
......@@ -340,7 +340,12 @@ bool ServiceUtilityProcessHost::Launch(base::CommandLine* cmd_line,
base::HandlesToInheritVector handles;
channel.PrepareToPassRemoteEndpoint(&handles, cmd_line);
// Need to call SetCommandLineFlagsForSandboxType() here, as this process
// launch path bypasses content::UtilityProcessHost::StartProcess().
ServiceSandboxedProcessLauncherDelegate delegate;
sandbox::policy::SetCommandLineFlagsForSandboxType(
cmd_line, delegate.GetSandboxType());
base::Process process;
sandbox::ResultCode result = content::StartSandboxedProcess(
&delegate, cmd_line, handles, &process);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment