1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/security/sandbox/win/src/handle_dispatcher.h Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,37 @@ 1.4 +// Copyright (c) 2012 The Chromium Authors. All rights reserved. 1.5 +// Use of this source code is governed by a BSD-style license that can be 1.6 +// found in the LICENSE file. 1.7 + 1.8 +#ifndef SANDBOX_SRC_HANDLE_DISPATCHER_H_ 1.9 +#define SANDBOX_SRC_HANDLE_DISPATCHER_H_ 1.10 + 1.11 +#include "base/basictypes.h" 1.12 +#include "sandbox/win/src/crosscall_server.h" 1.13 +#include "sandbox/win/src/sandbox_policy_base.h" 1.14 + 1.15 +namespace sandbox { 1.16 + 1.17 +// This class handles handle-related IPC calls. 1.18 +class HandleDispatcher : public Dispatcher { 1.19 + public: 1.20 + explicit HandleDispatcher(PolicyBase* policy_base); 1.21 + ~HandleDispatcher() {} 1.22 + 1.23 + // Dispatcher interface. 1.24 + virtual bool SetupService(InterceptionManager* manager, int service); 1.25 + 1.26 + private: 1.27 + // Processes IPC requests coming from calls to 1.28 + // TargetServices::DuplicateHandle() in the target. 1.29 + bool DuplicateHandleProxy(IPCInfo* ipc, HANDLE source_handle, 1.30 + DWORD target_process_id, DWORD desired_access, 1.31 + DWORD options); 1.32 + 1.33 + PolicyBase* policy_base_; 1.34 + DISALLOW_COPY_AND_ASSIGN(HandleDispatcher); 1.35 +}; 1.36 + 1.37 +} // namespace sandbox 1.38 + 1.39 +#endif // SANDBOX_SRC_HANDLE_DISPATCHER_H_ 1.40 +