Index: sandbox/win/src/lpc_interception.h |
diff --git a/sandbox/win/src/lpc_interception.h b/sandbox/win/src/lpc_interception.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..e34c2b29139a3500fdfe8e4a0602e5d8fef94fbb |
--- /dev/null |
+++ b/sandbox/win/src/lpc_interception.h |
@@ -0,0 +1,47 @@ |
+// Copyright (c) 2015 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#include "sandbox/win/src/nt_internals.h" |
+#include "sandbox/win/src/sandbox_types.h" |
+ |
+#ifndef SANDBOX_SRC_LPC_INTERCEPTION_H__ |
+#define SANDBOX_SRC_LPC_INTERCEPTION_H__ |
+ |
+namespace sandbox { |
+ |
+extern "C" { |
+ |
+typedef NTSTATUS (WINAPI* NtAlpcConnectPortFunction) ( |
+ PHANDLE port_handle, |
+ PUNICODE_STRING port_name, |
+ POBJECT_ATTRIBUTES object_attributes, |
+ PALPC_PORT_ATTRIBUTES port_attributes, |
+ ULONG flags, |
+ void* sid, |
+ void* connection_message, |
+ ULONG* buffer_length, |
+ void* out_message_attributes, |
+ void* in_message_attributes, |
+ PLARGE_INTEGER timeout); |
+ |
+// Interceptor for NtAlpcConnectPort |
+SANDBOX_INTERCEPT NTSTATUS WINAPI TargetNtAlpcConnectPort( |
+ NtAlpcConnectPortFunction orig_AlpcConnectPort, |
+ PHANDLE port_handle, |
+ PUNICODE_STRING port_name, |
+ POBJECT_ATTRIBUTES object_attributes, |
+ PALPC_PORT_ATTRIBUTES port_attributes, |
+ ULONG flags, |
+ void* sid, |
+ void* connection_message, |
+ ULONG* buffer_length, |
+ void* out_message_attributes, |
+ void* in_message_attributes, |
+ PLARGE_INTEGER timeout); |
+ |
+} // extern "C" |
+ |
+} // namespace sandbox |
+ |
+#endif // SANDBOX_SRC_SYNC_INTERCEPTION_H__ |