Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(216)

Unified Diff: content/common/sandbox_policy.cc

Issue 10039001: NaCl: Supply Windows handle-passing function (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix + comment Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/renderer/chrome_ppapi_interfaces.cc ('k') | content/public/common/sandbox_init.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/sandbox_policy.cc
diff --git a/content/common/sandbox_policy.cc b/content/common/sandbox_policy.cc
index da359a8816b7443dc93c8b1fff1369a0d603a56e..91f2c83178711aa2779c5e9ee70923b0f79efca3 100644
--- a/content/common/sandbox_policy.cc
+++ b/content/common/sandbox_policy.cc
@@ -403,6 +403,14 @@ bool AddPolicyForRenderer(sandbox::TargetPolicy* policy) {
if (result != sandbox::SBOX_ALL_OK)
return false;
+ // Renderers need to send named pipe handles and shared memory
+ // segment handles to NaCl loader processes.
+ result = policy->AddRule(sandbox::TargetPolicy::SUBSYS_HANDLES,
+ sandbox::TargetPolicy::HANDLES_DUP_ANY,
+ L"File");
+ if (result != sandbox::SBOX_ALL_OK)
+ return false;
+
policy->SetJobLevel(sandbox::JOB_LOCKDOWN, 0);
sandbox::TokenLevel initial_token = sandbox::USER_UNPROTECTED;
@@ -691,4 +699,8 @@ bool BrokerDuplicateHandle(HANDLE source_handle,
return false;
}
+bool BrokerAddTargetPeer(HANDLE peer_process) {
+ return g_broker_services->AddTargetPeer(peer_process) == sandbox::SBOX_ALL_OK;
+}
+
} // namespace content
« no previous file with comments | « chrome/renderer/chrome_ppapi_interfaces.cc ('k') | content/public/common/sandbox_init.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698