1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/security/sandbox/win/src/registry_dispatcher.h Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,39 @@ 1.4 +// Copyright (c) 2010 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_REGISTRY_DISPATCHER_H_ 1.9 +#define SANDBOX_SRC_REGISTRY_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 registry-related IPC calls. 1.18 +class RegistryDispatcher : public Dispatcher { 1.19 + public: 1.20 + explicit RegistryDispatcher(PolicyBase* policy_base); 1.21 + ~RegistryDispatcher() {} 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 NtCreateKey in the target. 1.28 + bool NtCreateKey(IPCInfo* ipc, std::wstring* name, DWORD attributes, 1.29 + HANDLE root, DWORD desired_access, 1.30 + DWORD title_index, DWORD create_options); 1.31 + 1.32 + // Processes IPC requests coming from calls to NtOpenKey in the target. 1.33 + bool NtOpenKey(IPCInfo* ipc, std::wstring* name, DWORD attributes, 1.34 + HANDLE root, DWORD desired_access); 1.35 + 1.36 + PolicyBase* policy_base_; 1.37 + DISALLOW_COPY_AND_ASSIGN(RegistryDispatcher); 1.38 +}; 1.39 + 1.40 +} // namespace sandbox 1.41 + 1.42 +#endif // SANDBOX_SRC_REGISTRY_DISPATCHER_H_