security/sandbox/win/src/process_thread_dispatcher.h

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/security/sandbox/win/src/process_thread_dispatcher.h	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,47 @@
     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_PROCESS_THREAD_DISPATCHER_H_
     1.9 +#define SANDBOX_SRC_PROCESS_THREAD_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 process and thread-related IPC calls.
    1.18 +class ThreadProcessDispatcher : public Dispatcher {
    1.19 + public:
    1.20 +  explicit ThreadProcessDispatcher(PolicyBase* policy_base);
    1.21 +  ~ThreadProcessDispatcher() {}
    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 NtOpenThread() in the target.
    1.28 +  bool NtOpenThread(IPCInfo* ipc, DWORD desired_access, DWORD thread_id);
    1.29 +
    1.30 +  // Processes IPC requests coming from calls to NtOpenProcess() in the target.
    1.31 +  bool NtOpenProcess(IPCInfo* ipc, DWORD desired_access, DWORD process_id);
    1.32 +
    1.33 +  // Processes IPC requests from calls to NtOpenProcessToken() in the target.
    1.34 +  bool NtOpenProcessToken(IPCInfo* ipc, HANDLE process, DWORD desired_access);
    1.35 +
    1.36 +  // Processes IPC requests from calls to NtOpenProcessTokenEx() in the target.
    1.37 +  bool NtOpenProcessTokenEx(IPCInfo* ipc, HANDLE process, DWORD desired_access,
    1.38 +                            DWORD attributes);
    1.39 +
    1.40 +  // Processes IPC requests coming from calls to CreateProcessW() in the target.
    1.41 +  bool CreateProcessW(IPCInfo* ipc, std::wstring* name, std::wstring* cmd_line,
    1.42 +                      std::wstring* cur_dir, CountedBuffer* info);
    1.43 +
    1.44 +  PolicyBase* policy_base_;
    1.45 +  DISALLOW_COPY_AND_ASSIGN(ThreadProcessDispatcher);
    1.46 +};
    1.47 +
    1.48 +}  // namespace sandbox
    1.49 +
    1.50 +#endif  // SANDBOX_SRC_PROCESS_THREAD_DISPATCHER_H_

mercurial