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

Unified Diff: src/shared/imc/nacl_imc_c.h

Issue 9960060: Handle-passing: Allow a handle-passing function to be supplied by Chromium (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client
Patch Set: Review 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 | « no previous file | src/shared/imc/win/nacl_imc.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/shared/imc/nacl_imc_c.h
diff --git a/src/shared/imc/nacl_imc_c.h b/src/shared/imc/nacl_imc_c.h
index ceae9f642f4982652086ea849633e37294f6aab2..a6b2e2e40a6af68b4661f324ef06d000c4d21370 100644
--- a/src/shared/imc/nacl_imc_c.h
+++ b/src/shared/imc/nacl_imc_c.h
@@ -236,6 +236,27 @@ typedef NaClHandle (*NaClCreateMemoryObjectFunc)(size_t length, int executable);
*/
void NaClSetCreateMemoryObjectFunc(NaClCreateMemoryObjectFunc func);
+#if NACL_WINDOWS
+/*
+ * Type of function supplied to NaClSetBrokerDuplicateHandleFunc().
+ * Such a function copies a Windows handle into the target process
+ * with the given process ID. This is a more restricted version of
+ * Windows' DuplicateHandle() that can send handles but not retrieve
+ * them.
+ */
+typedef int (*NaClBrokerDuplicateHandleFunc)(NaClHandle source_handle,
+ uint32_t target_process_id,
+ NaClHandle *target_handle,
+ uint32_t desired_access,
+ uint32_t options);
+
+/*
+ * This allows a replacement for Windows' DuplicateHandle() to be
+ * provided that works in an outer sandbox.
+ */
+void NaClSetBrokerDuplicateHandleFunc(NaClBrokerDuplicateHandleFunc func);
+#endif
+
/*
* Creates a memory object of length bytes.
*
« no previous file with comments | « no previous file | src/shared/imc/win/nacl_imc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698