signed_dispatcher.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. // Copyright 2019 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #ifndef SANDBOX_WIN_SRC_SIGNED_DISPATCHER_H_
  5. #define SANDBOX_WIN_SRC_SIGNED_DISPATCHER_H_
  6. #include <stdint.h>
  7. #include "base/memory/raw_ptr.h"
  8. #include "sandbox/win/src/crosscall_server.h"
  9. #include "sandbox/win/src/interception.h"
  10. #include "sandbox/win/src/ipc_tags.h"
  11. #include "sandbox/win/src/sandbox_policy_base.h"
  12. namespace sandbox {
  13. // This class handles signed-binary related IPC calls.
  14. class SignedDispatcher : public Dispatcher {
  15. public:
  16. explicit SignedDispatcher(PolicyBase* policy_base);
  17. SignedDispatcher(const SignedDispatcher&) = delete;
  18. SignedDispatcher& operator=(const SignedDispatcher&) = delete;
  19. ~SignedDispatcher() override {}
  20. // Dispatcher interface.
  21. bool SetupService(InterceptionManager* manager, IpcTag service) override;
  22. private:
  23. // Processes IPC requests coming from calls to CreateSection in the target.
  24. bool CreateSection(IPCInfo* ipc, HANDLE file_handle);
  25. raw_ptr<PolicyBase> policy_base_;
  26. };
  27. } // namespace sandbox
  28. #endif // SANDBOX_WIN_SRC_SIGNED_DISPATCHER_H_