From f17340833282fdc7713b110355e26cc19dfac124 Mon Sep 17 00:00:00 2001 From: "S. Ganesh" Date: Wed, 23 May 2018 03:34:07 +0000 Subject: [PATCH] Initial Chrome service for recovery component elevation. * Service module and COM registration implementation. * Various entry points and build files. Design document: Design document link will be added to the linked bug soon. Bug: 833687 Change-Id: I195a42786e60b2565ba49ba4dd87e5ae4288af7f Reviewed-on: https://chromium-review.googlesource.com/1014723 Commit-Queue: S. Ganesh Reviewed-by: Nico Weber Reviewed-by: Sorin Jianu Reviewed-by: Greg Thompson Cr-Commit-Position: refs/heads/master@{#560923} --- BUILD.gn | 1 + chrome/BUILD.gn | 1 + chrome/elevation_service/BUILD.gn | 111 +++++++ chrome/elevation_service/DEPS | 4 + chrome/elevation_service/OWNERS | 3 + chrome/elevation_service/README.md | 4 + chrome/elevation_service/elevation_service.cc | 53 +++ chrome/elevation_service/elevation_service.rc | 37 +++ .../elevation_service_exe.ver | 2 + .../elevation_service_idl.idl | 36 ++ chrome/elevation_service/elevator.cc | 198 +++++++++++ chrome/elevation_service/elevator.h | 36 ++ chrome/elevation_service/run_all_unittests.cc | 18 + chrome/elevation_service/service_main.cc | 248 ++++++++++++++ chrome/elevation_service/service_main.h | 103 ++++++ .../service_main_unittest.cc | 65 ++++ .../install_static/chromium_install_modes.cc | 6 +- .../google_chrome_install_modes.cc | 24 +- chrome/install_static/install_constants.h | 3 + chrome/install_static/install_details.h | 3 + .../install_static/install_modes_unittest.cc | 3 + chrome/install_static/install_util.cc | 4 + chrome/install_static/install_util.h | 3 + .../install_static/install_util_unittest.cc | 58 ++++ testing/buildbot/chromium.clang.json | 113 +++++++ testing/buildbot/chromium.fyi.json | 18 + testing/buildbot/chromium.win.json | 30 ++ testing/buildbot/gn_isolate_map.pyl | 4 + testing/buildbot/test_suites.pyl | 1 + .../x64/elevation_service_idl.dlldata.c | 37 +++ .../x64/elevation_service_idl.h | 177 ++++++++++ .../x64/elevation_service_idl.tlb | Bin 0 -> 1884 bytes .../x64/elevation_service_idl_i.c | 82 +++++ .../x64/elevation_service_idl_p.c | 299 +++++++++++++++++ .../x86/elevation_service_idl.dlldata.c | 37 +++ .../x86/elevation_service_idl.h | 177 ++++++++++ .../x86/elevation_service_idl.tlb | Bin 0 -> 1884 bytes .../x86/elevation_service_idl_i.c | 82 +++++ .../x86/elevation_service_idl_p.c | 309 ++++++++++++++++++ 39 files changed, 2385 insertions(+), 5 deletions(-) create mode 100644 chrome/elevation_service/BUILD.gn create mode 100644 chrome/elevation_service/DEPS create mode 100644 chrome/elevation_service/OWNERS create mode 100644 chrome/elevation_service/README.md create mode 100644 chrome/elevation_service/elevation_service.cc create mode 100644 chrome/elevation_service/elevation_service.rc create mode 100644 chrome/elevation_service/elevation_service_exe.ver create mode 100644 chrome/elevation_service/elevation_service_idl.idl create mode 100644 chrome/elevation_service/elevator.cc create mode 100644 chrome/elevation_service/elevator.h create mode 100644 chrome/elevation_service/run_all_unittests.cc create mode 100644 chrome/elevation_service/service_main.cc create mode 100644 chrome/elevation_service/service_main.h create mode 100644 chrome/elevation_service/service_main_unittest.cc create mode 100644 third_party/win_build_output/midl/chrome/elevation_service/x64/elevation_service_idl.dlldata.c create mode 100644 third_party/win_build_output/midl/chrome/elevation_service/x64/elevation_service_idl.h create mode 100644 third_party/win_build_output/midl/chrome/elevation_service/x64/elevation_service_idl.tlb create mode 100644 third_party/win_build_output/midl/chrome/elevation_service/x64/elevation_service_idl_i.c create mode 100644 third_party/win_build_output/midl/chrome/elevation_service/x64/elevation_service_idl_p.c create mode 100644 third_party/win_build_output/midl/chrome/elevation_service/x86/elevation_service_idl.dlldata.c create mode 100644 third_party/win_build_output/midl/chrome/elevation_service/x86/elevation_service_idl.h create mode 100644 third_party/win_build_output/midl/chrome/elevation_service/x86/elevation_service_idl.tlb create mode 100644 third_party/win_build_output/midl/chrome/elevation_service/x86/elevation_service_idl_i.c create mode 100644 third_party/win_build_output/midl/chrome/elevation_service/x86/elevation_service_idl_p.c diff --git a/BUILD.gn b/BUILD.gn index 41638ba4d5bfe6..b756572190964c 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -577,6 +577,7 @@ group("gn_all") { deps += [ "//base:pe_image_test", "//chrome/chrome_cleaner:chrome_cleaner_unittests", + "//chrome/elevation_service:elevation_service_unittests", "//chrome/install_static:install_static_unittests", "//chrome/installer/gcapi", "//chrome/installer/setup:setup_unittests", diff --git a/chrome/BUILD.gn b/chrome/BUILD.gn index 6dc9d2789f1147..395d16c7cef214 100644 --- a/chrome/BUILD.gn +++ b/chrome/BUILD.gn @@ -215,6 +215,7 @@ if (!is_android && !is_mac) { ] data_deps = [ "//chrome/app/version_assembly:version_assembly_manifest", + "//chrome/elevation_service", "//chrome/notification_helper", ] diff --git a/chrome/elevation_service/BUILD.gn b/chrome/elevation_service/BUILD.gn new file mode 100644 index 00000000000000..5db0d3a255ba53 --- /dev/null +++ b/chrome/elevation_service/BUILD.gn @@ -0,0 +1,111 @@ +# Copyright 2018 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. + +import("//build/config/chrome_build.gni") +import("//build/toolchain/win/midl.gni") +import("//chrome/process_version_rc_template.gni") +import("//testing/test.gni") + +midl("elevation_service_idl") { + sources = [ + "elevation_service_idl.idl", + ] +} + +# Must be in a config because of how GN orders flags (otherwise /W4 will appear +# after this, and turn it back on). +config("no-missing-braces") { + # Macros invoked by WRL CoCreatableClass omit optional braces. + cflags = [ "-Wno-missing-braces" ] +} + +# This service needs to work with Windows 7, so explicitly setting the defines +# to reflect this. Otherwise, WRL uses APIs that are only available in later +# Windows versions. +config("winver") { + defines = [ + "NTDDI_VERSION=NTDDI_WIN7", + "_WIN32_WINNT=_WIN32_WINNT_WIN7", + "WINVER=_WIN32_WINNT_WIN7", + ] +} + +executable("elevation_service") { + sources = [ + "elevation_service.cc", + "elevation_service.rc", + ] + + configs -= [ "//build/config/win:console" ] + configs += [ "//build/config/win:windowed" ] + configs += [ ":no-missing-braces" ] + configs -= [ "//build/config/win:winver" ] + configs += [ ":winver" ] + + deps = [ + ":lib", + ":version_resources", + "//base", + "//build/win:default_exe_manifest", + "//chrome/install_static:primary_module", + ] + +} + +source_set("lib") { + visibility = [ ":*" ] + + public = [ + "elevator.h", + "service_main.h", + ] + + sources = [ + "elevator.cc", + "service_main.cc", + ] + + configs += [ ":no-missing-braces" ] + configs -= [ "//build/config/win:winver" ] + configs += [ ":winver" ] + + public_deps = [ + ":elevation_service_idl", + "//base", + ] + + deps = [ + "//chrome/install_static:install_static_util", + ] +} + +process_version_rc_template("version_resources") { + sources = [ + "elevation_service_exe.ver", + ] + output = "$target_gen_dir/elevation_service_exe.rc" +} + +test("elevation_service_unittests") { + sources = [ + "run_all_unittests.cc", + "service_main_unittest.cc", + ] + + configs -= [ "//build/config/win:winver" ] + configs += [ ":winver" ] + + deps = [ + ":lib", + "//base", + "//base/test:test_support", + "//chrome/install_static:install_static_util", + "//chrome/install_static/test:test_support", + "//testing/gtest", + ] + + data_deps = [ + ":elevation_service", + ] +} diff --git a/chrome/elevation_service/DEPS b/chrome/elevation_service/DEPS new file mode 100644 index 00000000000000..933a67384a2d18 --- /dev/null +++ b/chrome/elevation_service/DEPS @@ -0,0 +1,4 @@ +include_rules = [ + "+base", + "+chrome/install_static", +] diff --git a/chrome/elevation_service/OWNERS b/chrome/elevation_service/OWNERS new file mode 100644 index 00000000000000..340ca38231f5a2 --- /dev/null +++ b/chrome/elevation_service/OWNERS @@ -0,0 +1,3 @@ +ganesh@chromium.org +xiaolingbao@chromium.org +sorin@chromium.org diff --git a/chrome/elevation_service/README.md b/chrome/elevation_service/README.md new file mode 100644 index 00000000000000..1c24a31bd92dd5 --- /dev/null +++ b/chrome/elevation_service/README.md @@ -0,0 +1,4 @@ +This directory contains the code for a COM server that handles elevation +requests. This code is compiled into an executable named elevation_service.exe. + +This is a standalone executable. diff --git a/chrome/elevation_service/elevation_service.cc b/chrome/elevation_service/elevation_service.cc new file mode 100644 index 00000000000000..0d3d8ec5e348da --- /dev/null +++ b/chrome/elevation_service/elevation_service.cc @@ -0,0 +1,53 @@ +// Copyright 2018 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 + +#include "base/at_exit.h" +#include "base/command_line.h" +#include "base/logging.h" +#include "base/process/memory.h" +#include "base/win/process_startup_helper.h" +#include "base/win/scoped_com_initializer.h" +#include "chrome/elevation_service/service_main.h" +#include "chrome/install_static/product_install_details.h" + +extern "C" int WINAPI wWinMain(HINSTANCE instance, + HINSTANCE prev_instance, + base::char16* command_line, + int show_command) { + // Initialize the CommandLine singleton from the environment. + base::CommandLine::Init(0, nullptr); + + logging::LoggingSettings settings; + settings.logging_dest = logging::LOG_TO_SYSTEM_DEBUG_LOG; + logging::InitLogging(settings); + + // The exit manager is in charge of calling the dtors of singletons. + base::AtExitManager exit_manager; + + install_static::InitializeProductDetailsForPrimaryModule(); + + // Make sure the process exits cleanly on unexpected errors. + base::EnableTerminationOnHeapCorruption(); + base::EnableTerminationOnOutOfMemory(); + base::win::RegisterInvalidParamHandler(); + base::win::SetupCRT(*base::CommandLine::ForCurrentProcess()); + + // Initialize COM for the current thread. + base::win::ScopedCOMInitializer com_initializer( + base::win::ScopedCOMInitializer::kMTA); + if (!com_initializer.Succeeded()) { + PLOG(ERROR) << "Failed to initialize COM"; + return -1; + } + + // Run the COM service. + elevation_service::ServiceMain* service = + elevation_service::ServiceMain::GetInstance(); + if (!service->InitWithCommandLine(base::CommandLine::ForCurrentProcess())) + return -1; + + return service->Start(); +} diff --git a/chrome/elevation_service/elevation_service.rc b/chrome/elevation_service/elevation_service.rc new file mode 100644 index 00000000000000..6cf742ed246573 --- /dev/null +++ b/chrome/elevation_service/elevation_service.rc @@ -0,0 +1,37 @@ +// Microsoft Visual C++ generated resource script. +// + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// +#include "winres.h" +#include "verrsrc.h" + +///////////////////////////////////////////////////////////////////////////// +#undef APSTUDIO_READONLY_SYMBOLS + +///////////////////////////////////////////////////////////////////////////// +// English (United States) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE +BEGIN + "#include ""winres.h""\r\n" + "#include ""verrsrc.h""\r\n" + "\0" +END + +#endif // APSTUDIO_INVOKED + +#endif // English (United States) resources +///////////////////////////////////////////////////////////////////////////// \ No newline at end of file diff --git a/chrome/elevation_service/elevation_service_exe.ver b/chrome/elevation_service/elevation_service_exe.ver new file mode 100644 index 00000000000000..7f98760d0c1ece --- /dev/null +++ b/chrome/elevation_service/elevation_service_exe.ver @@ -0,0 +1,2 @@ +INTERNAL_NAME=elevation_service_exe +ORIGINAL_FILENAME=elevation_service.exe \ No newline at end of file diff --git a/chrome/elevation_service/elevation_service_idl.idl b/chrome/elevation_service/elevation_service_idl.idl new file mode 100644 index 00000000000000..4963bdab40c63f --- /dev/null +++ b/chrome/elevation_service/elevation_service_idl.idl @@ -0,0 +1,36 @@ +// Copyright 2018 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. + +import "oaidl.idl"; +import "ocidl.idl"; + +[ + object, + oleautomation, + uuid(A949CB4E-C4F9-44C4-B213-6BF8AA9AC69C), + helpstring("IRegisteredCommandElevator Interface"), + pointer_default(unique) +] +interface IRegisteredCommandElevator : IUnknown +{ + // Runs a command elevated. + // + // @param event_id Unique id for the command + // @param caller_proc_id The process id of the calling process + // @param proc_handle The process handle valid in the caller's context + HRESULT LaunchCommand([in, string] const WCHAR* cmd_id, + [in] DWORD caller_proc_id, + [out] ULONG_PTR* proc_handle); +}; + +[ + uuid(0014D784-7012-4A79-8AB6-ADDB8193A06E), + version(1.0), + helpstring("Elevator 1.0 Type Library") +] +library ElevatorLib { + importlib("stdole2.tlb"); + + interface IRegisteredCommandElevator; +}; diff --git a/chrome/elevation_service/elevator.cc b/chrome/elevation_service/elevator.cc new file mode 100644 index 00000000000000..01275cc03199e7 --- /dev/null +++ b/chrome/elevation_service/elevator.cc @@ -0,0 +1,198 @@ +// Copyright 2018 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 "chrome/elevation_service/elevator.h" + +#include "base/files/file_util.h" +#include "base/process/process.h" +#include "base/win/registry.h" +#include "base/win/scoped_handle.h" +#include "base/win/scoped_process_information.h" +#include "chrome/install_static/install_util.h" + +namespace elevation_service { + +namespace { + +// This registry key contains the commands that the Elevator can run. +constexpr base::char16 kCommandsRegistryKey[] = L"Commands"; +constexpr base::char16 kPathAndName[] = L"PathAndName"; +constexpr base::char16 kArguments[] = L"Arguments"; + +HRESULT HRESULTFromLastError() { + const DWORD error_code = ::GetLastError(); + return (error_code != ERROR_SUCCESS) ? HRESULT_FROM_WIN32(error_code) : + E_FAIL; +} + +// TODO(ganesh): we need to have the installer write into the proper key for the +// bitness (i.e., no KEY_WOW64 specifier) and make sure it deletes a stale value +// in the opposite bitness hive to cover cases where a 32-bit install is updated +// to 64-bit. +HRESULT GetCommandToLaunch(base::StringPiece16 cmd_id, + base::FilePath* path_and_name, + base::string16* args) { + base::win::RegKey key; + + auto registry_key_path = + install_static::GetRegistryPath() + L"\\" + kCommandsRegistryKey + L"\\"; + cmd_id.AppendToString(®istry_key_path); + + LONG result = + key.Open(HKEY_LOCAL_MACHINE, registry_key_path.c_str(), KEY_QUERY_VALUE); + if (result != ERROR_SUCCESS) + return HRESULT_FROM_WIN32(result); + + base::string16 string_path_and_name; + result = key.ReadValue(kPathAndName, &string_path_and_name); + if (result != ERROR_SUCCESS) + return HRESULT_FROM_WIN32(result); + + *path_and_name = base::FilePath(string_path_and_name); + if (!path_and_name->IsAbsolute()) + return HRESULT_FROM_WIN32(ERROR_PATH_NOT_FOUND); + + result = key.ReadValue(kArguments, args); + if (result != ERROR_FILE_NOT_FOUND) + return HRESULT_FROM_WIN32(result); + + return S_OK; +} + +HRESULT StartProcess(const base::FilePath& path_and_name, + const base::string16& args, + PROCESS_INFORMATION* pi) { + DCHECK(pi); + + STARTUPINFO si = {sizeof(si)}; + si.dwFlags = STARTF_FORCEOFFFEEDBACK; + + // We have had problems in the past with subprocs preventing chrome from being + // uninstalled because their cwd was within Google\Chrome\Application\. Hence, + // making the starting directory the Temp directory. This should be + // \\Windows\\Temp for the Service. + const base::char16* starting_directory = nullptr; + base::FilePath temp_dir; + if (base::GetTempDir(&temp_dir)) + starting_directory = temp_dir.value().c_str(); + + base::string16 command_line = L"\"" + path_and_name.value() + L"\" " + args; + command_line.push_back(L'\0'); + bool success = + ::CreateProcess(path_and_name.value().c_str(), // Application path/name + &command_line[0], // Command line + nullptr, // Process handle not inheritable + nullptr, // Thread handle not inheritable + false, // Set handle inheritance to FALSE + 0, // No creation flags + nullptr, // Use parent's environment block + starting_directory, // Use TMP + &si, // Pointer to STARTUPINFO struct + pi); // Pointer to PROCESS_INFORMATION structure + + if (!success) { + HRESULT hr = HRESULTFromLastError(); + LOG(ERROR) << "StartProcess::CreateProcess failed; hr: " << hr + << ", command_line: " << path_and_name << ", args:" << args; + return hr; + } + + return S_OK; +} + +HRESULT OpenCallingProcess(DWORD proc_id, base::Process* process) { + DCHECK(process); + + HRESULT hr = ::CoImpersonateClient(); + if (FAILED(hr)) + return hr; + + *process = base::Process::OpenWithAccess(proc_id, PROCESS_DUP_HANDLE); + hr = process->IsValid() ? S_OK : HRESULTFromLastError(); + + ::CoRevertToSelf(); + return hr; +} + +HRESULT LaunchCmd(const base::FilePath& path_and_name, + const base::string16& args, + const base::Process& calling_process, + base::win::ScopedHandle* proc_handle) { + DCHECK(!path_and_name.empty()); + DCHECK(proc_handle); + + PROCESS_INFORMATION process_info = {}; + HRESULT hr = StartProcess(path_and_name, args, &process_info); + if (FAILED(hr)) { + LOG(ERROR) << "failed to launch app: " << path_and_name << ", args:" << args + << "; hr: " << hr; + return hr; + } + base::win::ScopedProcessInformation pi(process_info); + + // DuplicateHandle call will close the source handle regardless of any error + // status returned. + DCHECK(pi.process_handle()); + + HANDLE duplicate_proc_handle = nullptr; + + constexpr DWORD desired_access = + PROCESS_QUERY_LIMITED_INFORMATION | SYNCHRONIZE; + bool res = ::DuplicateHandle( + ::GetCurrentProcess(), // Current process. + pi.TakeProcessHandle(), // Process handle to duplicate. + calling_process.Handle(), // Process receiving the handle. + &duplicate_proc_handle, // Duplicated handle. + desired_access, // Access requested for the new handle. + FALSE, // Don't inherit the new handle. + DUPLICATE_CLOSE_SOURCE) != 0; // Closes the source handle. + if (!res) { + hr = HRESULTFromLastError(); + LOG(ERROR) << "failed to duplicate the handle; hr: " << hr; + return hr; + } + + proc_handle->Set(duplicate_proc_handle); + + return S_OK; +} + +} // namespace + +IFACEMETHODIMP Elevator::LaunchCommand(const WCHAR* cmd_id, + DWORD caller_proc_id, + ULONG_PTR* proc_handle) { + DCHECK(cmd_id); + DCHECK(proc_handle); + + const base::StringPiece16 id = cmd_id; + if (id.empty() || id.find(L'\\') != base::StringPiece16::npos || !proc_handle) + return E_INVALIDARG; + + base::Process calling_process; + HRESULT hr = OpenCallingProcess(caller_proc_id, &calling_process); + if (FAILED(hr)) { + LOG(ERROR) << "failed to open caller's handle; hr: " << hr + << ", cmd_id: " << cmd_id << ", pid: " << caller_proc_id; + return hr; + } + + base::FilePath path_and_name; + base::string16 args; + hr = GetCommandToLaunch(id, &path_and_name, &args); + if (FAILED(hr)) + return hr; + + base::win::ScopedHandle scoped_proc_handle; + hr = LaunchCmd(path_and_name, args, calling_process, &scoped_proc_handle); + if (FAILED(hr)) + return hr; + + *proc_handle = reinterpret_cast(scoped_proc_handle.Take()); + return hr; +} + +Elevator::~Elevator() = default; + +} // namespace elevation_service diff --git a/chrome/elevation_service/elevator.h b/chrome/elevation_service/elevator.h new file mode 100644 index 00000000000000..75eca65430bd8e --- /dev/null +++ b/chrome/elevation_service/elevator.h @@ -0,0 +1,36 @@ +// Copyright 2018 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. + +#ifndef CHROME_ELEVATION_SERVICE_ELEVATOR_H_ +#define CHROME_ELEVATION_SERVICE_ELEVATOR_H_ + +#include + +#include +#include + +#include "base/macros.h" +#include "chrome/elevation_service/elevation_service_idl.h" + +namespace elevation_service { + +class Elevator + : public Microsoft::WRL::RuntimeClass< + Microsoft::WRL::RuntimeClassFlags, + IRegisteredCommandElevator> { + public: + Elevator() = default; + + IFACEMETHOD(LaunchCommand) + (const WCHAR* cmd_id, DWORD caller_proc_id, ULONG_PTR* proc_handle); + + private: + ~Elevator() override; + + DISALLOW_COPY_AND_ASSIGN(Elevator); +}; + +} // namespace elevation_service + +#endif // CHROME_ELEVATION_SERVICE_ELEVATOR_H_ diff --git a/chrome/elevation_service/run_all_unittests.cc b/chrome/elevation_service/run_all_unittests.cc new file mode 100644 index 00000000000000..d38e1c1d89f7d0 --- /dev/null +++ b/chrome/elevation_service/run_all_unittests.cc @@ -0,0 +1,18 @@ +// Copyright 2018 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 "base/bind.h" +#include "base/test/launcher/unit_test_launcher.h" +#include "base/test/test_suite.h" +#include "chrome/install_static/test/scoped_install_details.h" + +int main(int argc, char** argv) { + base::TestSuite test_suite(argc, argv); + install_static::ScopedInstallDetails scoped_install_details; + + return base::LaunchUnitTestsSerially( + argc, argv, + base::BindRepeating(&base::TestSuite::Run, + base::Unretained(&test_suite))); +} diff --git a/chrome/elevation_service/service_main.cc b/chrome/elevation_service/service_main.cc new file mode 100644 index 00000000000000..13165af80e313d --- /dev/null +++ b/chrome/elevation_service/service_main.cc @@ -0,0 +1,248 @@ +// Copyright 2018 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. + +// This macro is used in . Since only the COM functionality is +// used here (while WinRT isn't being used), define this macro to optimize +// compilation of for COM-only. +#ifndef __WRL_CLASSIC_COM_STRICT__ +#define __WRL_CLASSIC_COM_STRICT__ +#endif // __WRL_CLASSIC_COM_STRICT__ + +#include "chrome/elevation_service/service_main.h" + +#include +#include +#include + +#include "base/command_line.h" +#include "base/stl_util.h" +#include "base/win/scoped_com_initializer.h" +#include "chrome/elevation_service/elevator.h" +#include "chrome/install_static/install_util.h" + +namespace elevation_service { + +namespace { + +// Command line switch "--console" runs the service interactively for +// debugging purposes. +constexpr char kConsoleSwitchName[] = "console"; +constexpr base::char16 kWindowsServiceName[] = L"ChromeElevationService"; + +} // namespace + +ServiceMain* ServiceMain::GetInstance() { + static base::NoDestructor instance; + return instance.get(); +} + +bool ServiceMain::InitWithCommandLine(const base::CommandLine* command_line) { + const base::CommandLine::StringVector args = command_line->GetArgs(); + if (!args.empty()) { + LOG(ERROR) << "No positional parameters expected."; + return false; + } + + // Run interactively if needed. + if (command_line->HasSwitch(kConsoleSwitchName)) + run_routine_ = &ServiceMain::RunInteractive; + + return true; +} + +// Start() is the entry point called by WinMain. +int ServiceMain::Start() { + return (this->*run_routine_)(); +} + +// When _ServiceMain gets called, it initializes COM, and then calls Run(). +// Run initializes security, then registers the COM objects. +HRESULT ServiceMain::RegisterClassObjects() { + // Create an out-of-proc COM module with caching disabled. + auto& module = Microsoft::WRL::Module::Create( + this, &ServiceMain::SignalExit); + + // We hand-register a unique CLSID for each Chrome channel. + Microsoft::WRL::ComPtr factory; + unsigned int flags = Microsoft::WRL::ModuleType::OutOfProc; + + HRESULT hr = Microsoft::WRL::Details::CreateClassFactory< + Microsoft::WRL::SimpleClassFactory>( + &flags, nullptr, __uuidof(IClassFactory), &factory); + if (FAILED(hr)) { + LOG(ERROR) << "Factory creation failed; hr: " << hr; + return hr; + } + + Microsoft::WRL::ComPtr class_factory; + hr = factory.As(&class_factory); + if (FAILED(hr)) { + LOG(ERROR) << "IClassFactory object creation failed; hr: " << hr; + return hr; + } + + // The pointer in this array is unowned. Do not release it. + IClassFactory* class_factories[] = {class_factory.Get()}; + static_assert(base::size(decltype(cookies_){}) == + base::size(class_factories), + "Arrays cookies_ and class_factories must be the same size."); + + IID class_ids[] = {install_static::GetElevatorClsid()}; + DCHECK_EQ(base::size(cookies_), base::size(class_ids)); + static_assert(base::size(decltype(cookies_){}) == base::size(class_ids), + "Arrays cookies_ and class_ids must be the same size."); + + hr = module.RegisterCOMObject(nullptr, class_ids, class_factories, cookies_, + base::size(cookies_)); + if (FAILED(hr)) { + LOG(ERROR) << "NotificationActivator registration failed; hr: " << hr; + return hr; + } + + return hr; +} + +void ServiceMain::UnregisterClassObjects() { + auto& module = Microsoft::WRL::Module::GetModule(); + const HRESULT hr = + module.UnregisterCOMObject(nullptr, cookies_, base::size(cookies_)); + if (FAILED(hr)) + LOG(ERROR) << "NotificationActivator unregistration failed; hr: " << hr; +} + +bool ServiceMain::IsExitSignaled() { + return exit_signal_.IsSignaled(); +} + +ServiceMain::ServiceMain() + : run_routine_(&ServiceMain::RunAsService), + service_status_handle_(nullptr), + service_status_(), + cookies_(), + exit_signal_(base::WaitableEvent::ResetPolicy::MANUAL, + base::WaitableEvent::InitialState::NOT_SIGNALED) { + service_status_.dwServiceType = SERVICE_WIN32_OWN_PROCESS; + service_status_.dwCurrentState = SERVICE_STOPPED; + service_status_.dwControlsAccepted = SERVICE_ACCEPT_STOP; +} + +ServiceMain::~ServiceMain() = default; + +int ServiceMain::RunAsService() { + static constexpr SERVICE_TABLE_ENTRY dispatch_table[] = { + {const_cast(kWindowsServiceName), &ServiceMain::ServiceMainEntry}, + {nullptr, nullptr}}; + + if (!::StartServiceCtrlDispatcher(dispatch_table)) { + service_status_.dwWin32ExitCode = ::GetLastError(); + PLOG(ERROR) << "Failed to connect to the service control manager"; + } + + return service_status_.dwWin32ExitCode; +} + +void ServiceMain::ServiceMainImpl() { + service_status_handle_ = ::RegisterServiceCtrlHandler( + kWindowsServiceName, &ServiceMain::ServiceControlHandler); + if (service_status_handle_ == nullptr) { + PLOG(ERROR) << "RegisterServiceCtrlHandler failed"; + return; + } + SetServiceStatus(SERVICE_RUNNING); + + service_status_.dwWin32ExitCode = ERROR_SUCCESS; + service_status_.dwCheckPoint = 0; + service_status_.dwWaitHint = 0; + + // Initialize COM for the current thread. + base::win::ScopedCOMInitializer com_initializer( + base::win::ScopedCOMInitializer::kMTA); + if (!com_initializer.Succeeded()) { + PLOG(ERROR) << "Failed to initialize COM"; + SetServiceStatus(SERVICE_STOPPED); + return; + } + + // When the Run function returns, the service has stopped. + const HRESULT hr = Run(); + if (FAILED(hr)) { + service_status_.dwWin32ExitCode = ERROR_SERVICE_SPECIFIC_ERROR; + service_status_.dwServiceSpecificExitCode = hr; + } + + SetServiceStatus(SERVICE_STOPPED); +} + +int ServiceMain::RunInteractive() { + return Run(); +} + +// static +void ServiceMain::ServiceControlHandler(DWORD control) { + ServiceMain* self = ServiceMain::GetInstance(); + switch (control) { + case SERVICE_CONTROL_STOP: + self->SetServiceStatus(SERVICE_STOP_PENDING); + self->SignalExit(); + break; + + default: + break; + } +} + +// static +void WINAPI ServiceMain::ServiceMainEntry(DWORD argc, base::char16* argv[]) { + ServiceMain::GetInstance()->ServiceMainImpl(); +} + +void ServiceMain::SetServiceStatus(DWORD state) { + ::InterlockedExchange(&service_status_.dwCurrentState, state); + ::SetServiceStatus(service_status_handle_, &service_status_); +} + +HRESULT ServiceMain::Run() { + HRESULT hr = InitializeComSecurity(); + if (FAILED(hr)) + return hr; + + hr = RegisterClassObjects(); + if (SUCCEEDED(hr)) { + WaitForExitSignal(); + UnregisterClassObjects(); + } + + return hr; +} + +// static +HRESULT ServiceMain::InitializeComSecurity() { + CDacl dacl; + constexpr BYTE com_rights_execute_local = + COM_RIGHTS_EXECUTE | COM_RIGHTS_EXECUTE_LOCAL; + dacl.AddAllowedAce(Sids::System(), com_rights_execute_local); + dacl.AddAllowedAce(Sids::Admins(), com_rights_execute_local); + dacl.AddAllowedAce(Sids::Interactive(), com_rights_execute_local); + + CSecurityDesc sd; + sd.SetDacl(dacl); + sd.MakeAbsolute(); + sd.SetOwner(Sids::Admins()); + sd.SetGroup(Sids::Admins()); + + return ::CoInitializeSecurity( + const_cast(sd.GetPSECURITY_DESCRIPTOR()), -1, + nullptr, nullptr, RPC_C_AUTHN_LEVEL_PKT_PRIVACY, RPC_C_IMP_LEVEL_IDENTIFY, + nullptr, EOAC_DYNAMIC_CLOAKING | EOAC_NO_CUSTOM_MARSHAL, nullptr); +} + +void ServiceMain::WaitForExitSignal() { + exit_signal_.Wait(); +} + +void ServiceMain::SignalExit() { + exit_signal_.Signal(); +} + +} // namespace elevation_service diff --git a/chrome/elevation_service/service_main.h b/chrome/elevation_service/service_main.h new file mode 100644 index 00000000000000..60084d7b3051b2 --- /dev/null +++ b/chrome/elevation_service/service_main.h @@ -0,0 +1,103 @@ +// Copyright 2018 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. + +#ifndef CHROME_ELEVATION_SERVICE_SERVICE_MAIN_H_ +#define CHROME_ELEVATION_SERVICE_SERVICE_MAIN_H_ + +#include + +#include "base/no_destructor.h" +#include "base/synchronization/waitable_event.h" + +namespace base { + +class CommandLine; + +} // namespace base + +namespace elevation_service { + +class ServiceMain { + public: + static ServiceMain* GetInstance(); + + // This function parses the command line and selects the action routine. + bool InitWithCommandLine(const base::CommandLine* command_line); + + // Start() is the entry point called by WinMain. + int Start(); + + // The following methods are public for the sake of testing. + + // Registers the Service COM objects so other applications can connect to + // them. Returns the registration status. + HRESULT RegisterClassObjects(); + + // Unregisters the Service COM objects. + void UnregisterClassObjects(); + + // Returns true when the last object is released, or if the service is asked + // to exit. + bool IsExitSignaled(); + + private: + ServiceMain(); + ~ServiceMain(); + + // This function handshakes with the service control manager and starts + // the service. + int RunAsService(); + + // Runs the service on the service thread. + void ServiceMainImpl(); + + // Runs as a local server for testing purposes. RunInteractive returns an + // HRESULT, not a Win32 error code. + int RunInteractive(); + + // The control handler of the service. + static void WINAPI ServiceControlHandler(DWORD control); + + // The main service entry point. + static void WINAPI ServiceMainEntry(DWORD argc, base::char16* argv[]); + + // Calls ::SetServiceStatus(). + void SetServiceStatus(DWORD state); + + // Handles object registration, message loop, and unregistration. Returns + // when all registered objects are released. + HRESULT Run(); + + // Calls ::CoInitializeSecurity to allow all users to create COM objects + // within the server. + static HRESULT InitializeComSecurity(); + + // Waits until the last object is released or until the service is asked to + // exit. + void WaitForExitSignal(); + + // Called when the last object is released or if the service is asked to exit. + void SignalExit(); + + // The action routine to be executed. + int (ServiceMain::*run_routine_)(); + + SERVICE_STATUS_HANDLE service_status_handle_; + SERVICE_STATUS service_status_; + + // Identifier of registered class objects used for unregistration. + DWORD cookies_[1]; + + // This event is signaled when the last COM instance is released, or if the + // service control manager asks the service to exit. + base::WaitableEvent exit_signal_; + + friend class base::NoDestructor; + + DISALLOW_COPY_AND_ASSIGN(ServiceMain); +}; + +} // namespace elevation_service + +#endif // CHROME_ELEVATION_SERVICE_SERVICE_MAIN_H_ diff --git a/chrome/elevation_service/service_main_unittest.cc b/chrome/elevation_service/service_main_unittest.cc new file mode 100644 index 00000000000000..0afcdc09e3727f --- /dev/null +++ b/chrome/elevation_service/service_main_unittest.cc @@ -0,0 +1,65 @@ +// Copyright 2018 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 "chrome/elevation_service/service_main.h" + +#include +#include + +#include "base/win/scoped_com_initializer.h" +#include "chrome/elevation_service/elevation_service_idl.h" +#include "chrome/install_static/install_util.h" +#include "testing/gtest/include/gtest/gtest.h" + +class ServiceMainTest : public testing::Test { + protected: + ServiceMainTest() = default; + + void SetUp() override { + com_initializer_ = std::make_unique(); + ASSERT_TRUE(com_initializer_->Succeeded()); + + service_main_ = elevation_service::ServiceMain::GetInstance(); + HRESULT hr = service_main_->RegisterClassObjects(); + if (SUCCEEDED(hr)) + class_registration_succeeded_ = true; + + ASSERT_HRESULT_SUCCEEDED(hr); + } + + void TearDown() override { + if (class_registration_succeeded_) + service_main_->UnregisterClassObjects(); + + com_initializer_.reset(); + } + + elevation_service::ServiceMain* service_main() { return service_main_; } + + private: + elevation_service::ServiceMain* service_main_ = nullptr; + std::unique_ptr com_initializer_; + bool class_registration_succeeded_ = false; + + DISALLOW_COPY_AND_ASSIGN(ServiceMainTest); +}; + +TEST_F(ServiceMainTest, ExitSignalTest) { + // The waitable event starts unsignaled. + ASSERT_FALSE(service_main()->IsExitSignaled()); + + Microsoft::WRL::ComPtr elevator; + ASSERT_HRESULT_SUCCEEDED( + ::CoCreateInstance(install_static::GetElevatorClsid(), nullptr, + CLSCTX_LOCAL_SERVER, IID_PPV_ARGS(&elevator))); + + // An object instance has been created upon the request, and is held by the + // server module. Therefore, the waitable event remains unsignaled. + ASSERT_FALSE(service_main()->IsExitSignaled()); + + // Release the instance object. Now that the last (and the only) instance + // object of the module is released, the event becomes signaled. + elevator.Reset(); + ASSERT_TRUE(service_main()->IsExitSignaled()); +} diff --git a/chrome/install_static/chromium_install_modes.cc b/chrome/install_static/chromium_install_modes.cc index 1ba8cefa0770a6..ccb6021bf5ee91 100644 --- a/chrome/install_static/chromium_install_modes.cc +++ b/chrome/install_static/chromium_install_modes.cc @@ -43,7 +43,11 @@ const InstallConstants kInstallModes[] = { 0x4EC9, {0xBD, 0x14, 0x8A, 0x0F, 0xDE, 0x97, 0x51, 0x59}}, // Toast Activator CLSID. - L"", // Empty default channel name since no update integration. + {0xD133B120, + 0x6DB4, + 0x4D6B, + {0x8B, 0xFE, 0x83, 0xBF, 0x8C, 0xA1, 0xB1, 0xB0}}, // Elevator CLSID. + L"", // Empty default channel name since no update integration. ChannelStrategy::UNSUPPORTED, true, // Supports system-level installs. true, // Supports in-product set as default browser UX. diff --git a/chrome/install_static/google_chrome_install_modes.cc b/chrome/install_static/google_chrome_install_modes.cc index 2640587c7a32cf..d9ab56ecda7294 100644 --- a/chrome/install_static/google_chrome_install_modes.cc +++ b/chrome/install_static/google_chrome_install_modes.cc @@ -43,7 +43,11 @@ const InstallConstants kInstallModes[] = { 0x425C, {0xAC, 0xB7, 0x6D, 0x19, 0xD6, 0x44, 0x28, 0xCD}}, // Toast Activator CLSID. - L"", // The empty string means "stable". + {0x708860E0, + 0xF641, + 0x4611, + {0x88, 0x95, 0x7D, 0x86, 0x7D, 0xD3, 0x67, 0x5B}}, // Elevator CLSID. + L"", // The empty string means "stable". ChannelStrategy::ADDITIONAL_PARAMETERS, true, // Supports system-level installs. true, // Supports in-product set as default browser UX. @@ -71,7 +75,11 @@ const InstallConstants kInstallModes[] = { 0x4AE2, {0x98, 0xC4, 0x63, 0x73, 0xEA, 0xA1, 0xEA, 0x4D}}, // Toast Activator CLSID. - L"beta", // Forced channel name. + {0xDD2646BA, + 0x3707, + 0x4BF8, + {0xB9, 0xA7, 0x3, 0x86, 0x91, 0xA6, 0x8F, 0xC2}}, // Elevator CLSID. + L"beta", // Forced channel name. ChannelStrategy::FIXED, true, // Supports system-level installs. true, // Supports in-product set as default browser UX. @@ -99,7 +107,11 @@ const InstallConstants kInstallModes[] = { 0x4C83, {0x8D, 0x7A, 0x90, 0x27, 0x71, 0xE7, 0x32, 0xFA}}, // Toast Activator CLSID. - L"dev", // Forced channel name. + {0xDA7FDCA5, + 0x2CAA, + 0x4637, + {0xAA, 0x17, 0x7, 0x40, 0x58, 0x4D, 0xE7, 0xDA}}, // Elevator CLSID. + L"dev", // Forced channel name. ChannelStrategy::FIXED, true, // Supports system-level installs. true, // Supports in-product set as default browser UX. @@ -126,7 +138,11 @@ const InstallConstants kInstallModes[] = { 0x149F, 0x4E95, {0x83, 0x2D, 0x8F, 0x69, 0x8D, 0x40, 0xAD, - 0x7F}}, // Toast Activator CLSID. + 0x7F}}, // Toast Activator CLSID. + {0x704C2872, + 0x2049, + 0x435E, + {0xA4, 0x69, 0xA, 0x53, 0x43, 0x13, 0xC4, 0x2B}}, // Elevator CLSID. L"canary", // Forced channel name. ChannelStrategy::FIXED, false, // Does not support system-level installs. diff --git a/chrome/install_static/install_constants.h b/chrome/install_static/install_constants.h index a7ea7bba0918af..60bb3b67721e62 100644 --- a/chrome/install_static/install_constants.h +++ b/chrome/install_static/install_constants.h @@ -97,6 +97,9 @@ struct InstallConstants { // Center. CLSID toast_activator_clsid; + // The CLSID of the COM server that provides silent elevation functionality. + CLSID elevator_clsid; + // The default name for this mode's update channel. const wchar_t* default_channel_name; diff --git a/chrome/install_static/install_details.h b/chrome/install_static/install_details.h index 5f04e66f2188a2..5ea352885229b7 100644 --- a/chrome/install_static/install_details.h +++ b/chrome/install_static/install_details.h @@ -111,6 +111,9 @@ class InstallDetails { return payload_->mode->toast_activator_clsid; } + // The CLSID of the COM server that provides silent elevation functionality. + const CLSID& elevator_clsid() const { return payload_->mode->elevator_clsid; } + // Returns the unsuffixed portion of the AppUserModelId. The AppUserModelId is // used to group an app's windows together on the Windows taskbar along with // its corresponding shortcuts; see diff --git a/chrome/install_static/install_modes_unittest.cc b/chrome/install_static/install_modes_unittest.cc index fefe9b16f0d138..c23b90f67aaa75 100644 --- a/chrome/install_static/install_modes_unittest.cc +++ b/chrome/install_static/install_modes_unittest.cc @@ -94,6 +94,9 @@ TEST(InstallModes, VerifyModes) { // Every mode must have a toast activator CLSID. ASSERT_THAT(mode.toast_activator_clsid, Ne(CLSID_NULL)); + // Every mode must have an elevator CLSID. + ASSERT_THAT(mode.elevator_clsid, Ne(CLSID_NULL)); + // UNSUPPORTED and kUseGoogleUpdateIntegration are mutually exclusive. if (kUseGoogleUpdateIntegration) ASSERT_THAT(mode.channel_strategy, Ne(ChannelStrategy::UNSUPPORTED)); diff --git a/chrome/install_static/install_util.cc b/chrome/install_static/install_util.cc index 73b38a84d81d26..fa3e47a248c87e 100644 --- a/chrome/install_static/install_util.cc +++ b/chrome/install_static/install_util.cc @@ -381,6 +381,10 @@ const CLSID& GetToastActivatorClsid() { return InstallDetails::Get().toast_activator_clsid(); } +const CLSID& GetElevatorClsid() { + return InstallDetails::Get().elevator_clsid(); +} + std::wstring GetBaseAppName() { return InstallDetails::Get().mode().base_app_name; } diff --git a/chrome/install_static/install_util.h b/chrome/install_static/install_util.h index d48663ad074d0e..b856a122bebd1e 100644 --- a/chrome/install_static/install_util.h +++ b/chrome/install_static/install_util.h @@ -82,6 +82,9 @@ const wchar_t* GetAppGuid(); // the Windows OS. const CLSID& GetToastActivatorClsid(); +// The CLSID of the COM server that provides silent elevation functionality. +const CLSID& GetElevatorClsid(); + // Returns the unsuffixed application name of this program. This is the base of // the name registered with Default Programs. IMPORTANT: This must only be // called by the installer. diff --git a/chrome/install_static/install_util_unittest.cc b/chrome/install_static/install_util_unittest.cc index fe6bf14b4cff29..8294c7780d5f19 100644 --- a/chrome/install_static/install_util_unittest.cc +++ b/chrome/install_static/install_util_unittest.cc @@ -9,6 +9,7 @@ #include #include "base/macros.h" +#include "base/stl_util.h" #include "base/test/test_reg_util_win.h" #include "chrome/install_static/install_details.h" #include "chrome/install_static/install_modes.h" @@ -514,6 +515,63 @@ TEST_P(InstallStaticUtilTest, GetToastActivatorClsid) { StrCaseEq(kToastActivatorClsidsString[std::get<0>(GetParam())])); } +TEST_P(InstallStaticUtilTest, GetElevatorClsid) { +#if defined(GOOGLE_CHROME_BUILD) + // The Elevator CLSIDs, one for each of the kInstallModes. + static constexpr CLSID kElevatorClsids[] = { + {0x708860E0, + 0xF641, + 0x4611, + {0x88, 0x95, 0x7D, 0x86, 0x7D, 0xD3, 0x67, 0x5B}}, // Google Chrome. + {0xDD2646BA, + 0x3707, + 0x4BF8, + {0xB9, 0xA7, 0x3, 0x86, 0x91, 0xA6, 0x8F, 0xC2}}, // Google Chrome Beta. + {0xDA7FDCA5, + 0x2CAA, + 0x4637, + {0xAA, 0x17, 0x7, 0x40, 0x58, 0x4D, 0xE7, 0xDA}}, // Google Chrome Dev. + {0x704C2872, + 0x2049, + 0x435E, + {0xA4, 0x69, 0xA, 0x53, 0x43, 0x13, 0xC4, + 0x2B}}, // Google Chrome SxS (Canary). + }; + + // The string representation of the CLSIDs above. + static constexpr const wchar_t* kElevatorClsidsString[] = { + L"{708860E0-F641-4611-8895-7D867DD3675B}", // Google Chrome. + L"{DD2646BA-3707-4BF8-B9A7-038691A68FC2}", // Google Chrome Beta. + L"{DA7FDCA5-2CAA-4637-AA17-0740584DE7DA}", // Google Chrome Dev. + L"{704C2872-2049-435E-A469-0A534313C42B}", // Google Chrome SxS (Canary). + }; +#else + // The Elevator CLSIDs, one for each of the kInstallModes. + static constexpr CLSID kElevatorClsids[] = { + {0xD133B120, + 0x6DB4, + 0x4D6B, + {0x8B, 0xFE, 0x83, 0xBF, 0x8C, 0xA1, 0xB1, 0xB0}}, // Chromium. + }; + + // The string representation of the CLSIDs above. + static constexpr const wchar_t* kElevatorClsidsString[] = { + L"{D133B120-6DB4-4D6B-8BFE-83BF8CA1B1B0}", // Chromium. + }; +#endif + static_assert(base::size(kElevatorClsids) == NUM_INSTALL_MODES, + "kElevatorClsids needs to be updated for any new modes."); + + EXPECT_EQ(GetElevatorClsid(), kElevatorClsids[std::get<0>(GetParam())]); + + constexpr int kCLSIDSize = 39; + wchar_t clsid_str[kCLSIDSize] = {}; + ASSERT_EQ(::StringFromGUID2(GetElevatorClsid(), clsid_str, kCLSIDSize), + kCLSIDSize); + EXPECT_THAT(clsid_str, + StrCaseEq(kElevatorClsidsString[std::get<0>(GetParam())])); +} + TEST_P(InstallStaticUtilTest, UsageStatsAbsent) { EXPECT_FALSE(GetCollectStatsConsent()); } diff --git a/testing/buildbot/chromium.clang.json b/testing/buildbot/chromium.clang.json index 4f9b59746f8617..90280d058c481a 100644 --- a/testing/buildbot/chromium.clang.json +++ b/testing/buildbot/chromium.clang.json @@ -1076,6 +1076,12 @@ }, "test": "display_unittests" }, + { + "swarming": { + "can_use_on_swarming_builders": true + }, + "test": "elevation_service_unittests" + }, { "swarming": { "can_use_on_swarming_builders": true @@ -1528,6 +1534,12 @@ }, "test": "display_unittests" }, + { + "swarming": { + "can_use_on_swarming_builders": true + }, + "test": "elevation_service_unittests" + }, { "swarming": { "can_use_on_swarming_builders": true @@ -1973,6 +1985,12 @@ }, "test": "display_unittests" }, + { + "swarming": { + "can_use_on_swarming_builders": true + }, + "test": "elevation_service_unittests" + }, { "swarming": { "can_use_on_swarming_builders": true @@ -2425,6 +2443,12 @@ }, "test": "display_unittests" }, + { + "swarming": { + "can_use_on_swarming_builders": true + }, + "test": "elevation_service_unittests" + }, { "swarming": { "can_use_on_swarming_builders": true @@ -2877,6 +2901,12 @@ }, "test": "display_unittests" }, + { + "swarming": { + "can_use_on_swarming_builders": true + }, + "test": "elevation_service_unittests" + }, { "swarming": { "can_use_on_swarming_builders": true @@ -3329,6 +3359,12 @@ }, "test": "display_unittests" }, + { + "swarming": { + "can_use_on_swarming_builders": true + }, + "test": "elevation_service_unittests" + }, { "swarming": { "can_use_on_swarming_builders": true @@ -3781,6 +3817,12 @@ }, "test": "display_unittests" }, + { + "swarming": { + "can_use_on_swarming_builders": true + }, + "test": "elevation_service_unittests" + }, { "swarming": { "can_use_on_swarming_builders": true @@ -10393,6 +10435,12 @@ }, "test": "display_unittests" }, + { + "swarming": { + "can_use_on_swarming_builders": true + }, + "test": "elevation_service_unittests" + }, { "swarming": { "can_use_on_swarming_builders": true @@ -10845,6 +10893,12 @@ }, "test": "display_unittests" }, + { + "swarming": { + "can_use_on_swarming_builders": true + }, + "test": "elevation_service_unittests" + }, { "swarming": { "can_use_on_swarming_builders": true @@ -11297,6 +11351,12 @@ }, "test": "display_unittests" }, + { + "swarming": { + "can_use_on_swarming_builders": true + }, + "test": "elevation_service_unittests" + }, { "swarming": { "can_use_on_swarming_builders": true @@ -11749,6 +11809,12 @@ }, "test": "display_unittests" }, + { + "swarming": { + "can_use_on_swarming_builders": true + }, + "test": "elevation_service_unittests" + }, { "swarming": { "can_use_on_swarming_builders": true @@ -12201,6 +12267,12 @@ }, "test": "display_unittests" }, + { + "swarming": { + "can_use_on_swarming_builders": true + }, + "test": "elevation_service_unittests" + }, { "swarming": { "can_use_on_swarming_builders": true @@ -12653,6 +12725,12 @@ }, "test": "display_unittests" }, + { + "swarming": { + "can_use_on_swarming_builders": true + }, + "test": "elevation_service_unittests" + }, { "swarming": { "can_use_on_swarming_builders": true @@ -13105,6 +13183,12 @@ }, "test": "display_unittests" }, + { + "swarming": { + "can_use_on_swarming_builders": true + }, + "test": "elevation_service_unittests" + }, { "swarming": { "can_use_on_swarming_builders": true @@ -13557,6 +13641,12 @@ }, "test": "display_unittests" }, + { + "swarming": { + "can_use_on_swarming_builders": true + }, + "test": "elevation_service_unittests" + }, { "swarming": { "can_use_on_swarming_builders": true @@ -14009,6 +14099,12 @@ }, "test": "display_unittests" }, + { + "swarming": { + "can_use_on_swarming_builders": true + }, + "test": "elevation_service_unittests" + }, { "swarming": { "can_use_on_swarming_builders": true @@ -14461,6 +14557,12 @@ }, "test": "display_unittests" }, + { + "swarming": { + "can_use_on_swarming_builders": true + }, + "test": "elevation_service_unittests" + }, { "swarming": { "can_use_on_swarming_builders": true @@ -15454,6 +15556,17 @@ }, "test": "display_unittests" }, + { + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "os": "Windows-10" + } + ] + }, + "test": "elevation_service_unittests" + }, { "swarming": { "can_use_on_swarming_builders": true, diff --git a/testing/buildbot/chromium.fyi.json b/testing/buildbot/chromium.fyi.json index 591b91169602a9..8d93ee260332e3 100644 --- a/testing/buildbot/chromium.fyi.json +++ b/testing/buildbot/chromium.fyi.json @@ -2740,6 +2740,12 @@ }, "test": "display_unittests" }, + { + "swarming": { + "can_use_on_swarming_builders": true + }, + "test": "elevation_service_unittests" + }, { "swarming": { "can_use_on_swarming_builders": true @@ -5869,6 +5875,12 @@ }, "test": "display_unittests" }, + { + "swarming": { + "can_use_on_swarming_builders": true + }, + "test": "elevation_service_unittests" + }, { "swarming": { "can_use_on_swarming_builders": true @@ -6619,6 +6631,12 @@ }, "test": "display_unittests" }, + { + "swarming": { + "can_use_on_swarming_builders": false + }, + "test": "elevation_service_unittests" + }, { "swarming": { "can_use_on_swarming_builders": false diff --git a/testing/buildbot/chromium.win.json b/testing/buildbot/chromium.win.json index 2df484b8df4079..aca54d27671b5c 100644 --- a/testing/buildbot/chromium.win.json +++ b/testing/buildbot/chromium.win.json @@ -219,6 +219,12 @@ }, "test": "display_unittests" }, + { + "swarming": { + "can_use_on_swarming_builders": true + }, + "test": "elevation_service_unittests" + }, { "swarming": { "can_use_on_swarming_builders": true @@ -839,6 +845,12 @@ }, "test": "display_unittests" }, + { + "swarming": { + "can_use_on_swarming_builders": true + }, + "test": "elevation_service_unittests" + }, { "swarming": { "can_use_on_swarming_builders": true @@ -1359,6 +1371,12 @@ }, "test": "display_unittests" }, + { + "swarming": { + "can_use_on_swarming_builders": true + }, + "test": "elevation_service_unittests" + }, { "swarming": { "can_use_on_swarming_builders": true @@ -1970,6 +1988,12 @@ }, "test": "display_unittests" }, + { + "swarming": { + "can_use_on_swarming_builders": true + }, + "test": "elevation_service_unittests" + }, { "swarming": { "can_use_on_swarming_builders": true @@ -2604,6 +2628,12 @@ }, "test": "crypto_unittests" }, + { + "swarming": { + "can_use_on_swarming_builders": true + }, + "test": "elevation_service_unittests" + }, { "swarming": { "can_use_on_swarming_builders": true diff --git a/testing/buildbot/gn_isolate_map.pyl b/testing/buildbot/gn_isolate_map.pyl index 237b0b887dac44..ba49b231fba167 100644 --- a/testing/buildbot/gn_isolate_map.pyl +++ b/testing/buildbot/gn_isolate_map.pyl @@ -531,6 +531,10 @@ "label": "//third_party/breakpad:dump_syms", "type": "additional_compile_target", }, + "elevation_service_unittests": { + "label": "//chrome/elevation_service:elevation_service_unittests", + "type": "windowed_test_launcher", + }, "empty_main": { "label": "//testing:empty_main", "type": "additional_compile_target", diff --git a/testing/buildbot/test_suites.pyl b/testing/buildbot/test_suites.pyl index 731312f1168aad..e653c057209c87 100644 --- a/testing/buildbot/test_suites.pyl +++ b/testing/buildbot/test_suites.pyl @@ -1706,6 +1706,7 @@ 'chrome_elf_import_unittests': {}, 'chrome_elf_unittests': {}, 'courgette_unittests': {}, + 'elevation_service_unittests': {}, 'install_static_unittests': {}, 'installer_util_unittests': { 'swarming': { diff --git a/third_party/win_build_output/midl/chrome/elevation_service/x64/elevation_service_idl.dlldata.c b/third_party/win_build_output/midl/chrome/elevation_service/x64/elevation_service_idl.dlldata.c new file mode 100644 index 00000000000000..cfe06f7e26cab7 --- /dev/null +++ b/third_party/win_build_output/midl/chrome/elevation_service/x64/elevation_service_idl.dlldata.c @@ -0,0 +1,37 @@ +/********************************************************* + DllData file -- generated by MIDL compiler + + DO NOT ALTER THIS FILE + + This file is regenerated by MIDL on every IDL file compile. + + To completely reconstruct this file, delete it and rerun MIDL + on all the IDL files in this DLL, specifying this file for the + /dlldata command line option + +*********************************************************/ + + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +EXTERN_PROXY_FILE( elevation_service_idl ) + + +PROXYFILE_LIST_START +/* Start of list */ + REFERENCE_PROXY_FILE( elevation_service_idl ), +/* End of list */ +PROXYFILE_LIST_END + + +DLLDATA_ROUTINES( aProxyFileList, GET_DLL_CLSID ) + +#ifdef __cplusplus +} /*extern "C" */ +#endif + +/* end of generated dlldata file */ diff --git a/third_party/win_build_output/midl/chrome/elevation_service/x64/elevation_service_idl.h b/third_party/win_build_output/midl/chrome/elevation_service/x64/elevation_service_idl.h new file mode 100644 index 00000000000000..5e54b53d3a6a89 --- /dev/null +++ b/third_party/win_build_output/midl/chrome/elevation_service/x64/elevation_service_idl.h @@ -0,0 +1,177 @@ + + +/* this ALWAYS GENERATED file contains the definitions for the interfaces */ + + + /* File created by MIDL compiler version 8.xx.xxxx */ +/* at a redacted point in time + */ +/* Compiler settings for ../../chrome/elevation_service/elevation_service_idl.idl: + Oicf, W1, Zp8, env=Win64 (32b run), target_arch=AMD64 8.xx.xxxx + protocol : dce , ms_ext, c_ext, robust + error checks: allocation ref bounds_check enum stub_data + VC __declspec() decoration level: + __declspec(uuid()), __declspec(selectany), __declspec(novtable) + DECLSPEC_UUID(), MIDL_INTERFACE() +*/ +/* @@MIDL_FILE_HEADING( ) */ + +#pragma warning( disable: 4049 ) /* more than 64k source lines */ + + +/* verify that the version is high enough to compile this file*/ +#ifndef __REQUIRED_RPCNDR_H_VERSION__ +#define __REQUIRED_RPCNDR_H_VERSION__ 475 +#endif + +#include "rpc.h" +#include "rpcndr.h" + +#ifndef __RPCNDR_H_VERSION__ +#error this stub requires an updated version of +#endif /* __RPCNDR_H_VERSION__ */ + +#ifndef COM_NO_WINDOWS_H +#include "windows.h" +#include "ole2.h" +#endif /*COM_NO_WINDOWS_H*/ + +#ifndef __elevation_service_idl_h__ +#define __elevation_service_idl_h__ + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +#pragma once +#endif + +/* Forward Declarations */ + +#ifndef __IRegisteredCommandElevator_FWD_DEFINED__ +#define __IRegisteredCommandElevator_FWD_DEFINED__ +typedef interface IRegisteredCommandElevator IRegisteredCommandElevator; + +#endif /* __IRegisteredCommandElevator_FWD_DEFINED__ */ + + +#ifndef __IRegisteredCommandElevator_FWD_DEFINED__ +#define __IRegisteredCommandElevator_FWD_DEFINED__ +typedef interface IRegisteredCommandElevator IRegisteredCommandElevator; + +#endif /* __IRegisteredCommandElevator_FWD_DEFINED__ */ + + +/* header files for imported files */ +#include "oaidl.h" +#include "ocidl.h" + +#ifdef __cplusplus +extern "C"{ +#endif + + +#ifndef __IRegisteredCommandElevator_INTERFACE_DEFINED__ +#define __IRegisteredCommandElevator_INTERFACE_DEFINED__ + +/* interface IRegisteredCommandElevator */ +/* [unique][helpstring][uuid][oleautomation][object] */ + + +EXTERN_C const IID IID_IRegisteredCommandElevator; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("A949CB4E-C4F9-44C4-B213-6BF8AA9AC69C") + IRegisteredCommandElevator : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE LaunchCommand( + /* [string][in] */ const WCHAR *cmd_id, + /* [in] */ DWORD caller_proc_id, + /* [out] */ ULONG_PTR *proc_handle) = 0; + + }; + + +#else /* C style interface */ + + typedef struct IRegisteredCommandElevatorVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IRegisteredCommandElevator * This, + /* [in] */ REFIID riid, + /* [annotation][iid_is][out] */ + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IRegisteredCommandElevator * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IRegisteredCommandElevator * This); + + HRESULT ( STDMETHODCALLTYPE *LaunchCommand )( + IRegisteredCommandElevator * This, + /* [string][in] */ const WCHAR *cmd_id, + /* [in] */ DWORD caller_proc_id, + /* [out] */ ULONG_PTR *proc_handle); + + END_INTERFACE + } IRegisteredCommandElevatorVtbl; + + interface IRegisteredCommandElevator + { + CONST_VTBL struct IRegisteredCommandElevatorVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IRegisteredCommandElevator_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define IRegisteredCommandElevator_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define IRegisteredCommandElevator_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define IRegisteredCommandElevator_LaunchCommand(This,cmd_id,caller_proc_id,proc_handle) \ + ( (This)->lpVtbl -> LaunchCommand(This,cmd_id,caller_proc_id,proc_handle) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __IRegisteredCommandElevator_INTERFACE_DEFINED__ */ + + + +#ifndef __ElevatorLib_LIBRARY_DEFINED__ +#define __ElevatorLib_LIBRARY_DEFINED__ + +/* library ElevatorLib */ +/* [helpstring][version][uuid] */ + + + +EXTERN_C const IID LIBID_ElevatorLib; +#endif /* __ElevatorLib_LIBRARY_DEFINED__ */ + +/* Additional Prototypes for ALL interfaces */ + +/* end of Additional Prototypes */ + +#ifdef __cplusplus +} +#endif + +#endif + + diff --git a/third_party/win_build_output/midl/chrome/elevation_service/x64/elevation_service_idl.tlb b/third_party/win_build_output/midl/chrome/elevation_service/x64/elevation_service_idl.tlb new file mode 100644 index 0000000000000000000000000000000000000000..8b6f1008f3998ede6c560611ad09c61c872d0e24 GIT binary patch literal 1884 zcmc&#J7`l;82(dhO|8~PTCm090jp!Ib;(eqG_f|CR;`gMA|yBWUTrYB3Afiafj}cT zh;$ID4$?uzK?Ro%4&u~d`_<#4&9*YsQpg%c}?>qnN{^yb5^MlC- z3J|2Z(HSVpgUb*#xYSy|jc1oURAbr4bHT034cNES87COL_4r*pCbtmnkZ_vuehI^# zq2mYoZ5+HR;k%6IC0t>9BnUg`SGE$pmewOpL@^0h81I(w#(2}bo|M+VFz%7?M*WTW z-~jtafjmKa5Wglaa{Dv}UO@dIsDm%?8z4bJCSV&N*Aw`|0|C1Hix|GGJVGD1-y?kt z*zIwM(N67E4?4BH!vMN}BWcODB+X@CL(Jp5pGxaIbz-94Hy7JzZ?Syp_RAL^Z_GS2 zS3P6n)#Rtjx%Yb>e;`_(>|64EYIS(M4nOiP{%mDoAvPDfw*36To7uJ4jeM9`=AE7f zfe^!m>pb=ZeAiIhN@g~CdZvGA?(3m&3LJ!Y%-Jy15jB9o*AW`G^+L|*4coblqA0HR zpZD-r&kA+D_?z{5cAMd!a6J1T$J|W5u)Xyk^6jq^vxQpC6FFl-wF_1vn^9QJ+278{ zz3=f+<7#%?HY`Jr7V>%3)O}4w(LKH9NM-Rt;>^g&)Y;@HpDW*fC*6OPP_LWXm}e@T zxh6U`tmXAoR$o7dt@JspskxkCrHWQT`)RF(dcQg37^jdkln(Oq5J$s3B3UjPf^)Z2 ztE_ZW{j5dYrs y#CLicI(!6M*5ByH$oc~2!=mWG`!#T(O4^gO!GlY4N8}5MndIZwAe~=#sz0cGD literal 0 HcmV?d00001 diff --git a/third_party/win_build_output/midl/chrome/elevation_service/x64/elevation_service_idl_i.c b/third_party/win_build_output/midl/chrome/elevation_service/x64/elevation_service_idl_i.c new file mode 100644 index 00000000000000..b0a5b98ec28124 --- /dev/null +++ b/third_party/win_build_output/midl/chrome/elevation_service/x64/elevation_service_idl_i.c @@ -0,0 +1,82 @@ + + +/* this ALWAYS GENERATED file contains the IIDs and CLSIDs */ + +/* link this file in with the server and any clients */ + + + /* File created by MIDL compiler version 8.xx.xxxx */ +/* at a redacted point in time + */ +/* Compiler settings for ../../chrome/elevation_service/elevation_service_idl.idl: + Oicf, W1, Zp8, env=Win64 (32b run), target_arch=AMD64 8.xx.xxxx + protocol : dce , ms_ext, c_ext, robust + error checks: allocation ref bounds_check enum stub_data + VC __declspec() decoration level: + __declspec(uuid()), __declspec(selectany), __declspec(novtable) + DECLSPEC_UUID(), MIDL_INTERFACE() +*/ +/* @@MIDL_FILE_HEADING( ) */ + +#pragma warning( disable: 4049 ) /* more than 64k source lines */ + + +#ifdef __cplusplus +extern "C"{ +#endif + + +#include +#include + +#ifdef _MIDL_USE_GUIDDEF_ + +#ifndef INITGUID +#define INITGUID +#include +#undef INITGUID +#else +#include +#endif + +#define MIDL_DEFINE_GUID(type,name,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) \ + DEFINE_GUID(name,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) + +#else // !_MIDL_USE_GUIDDEF_ + +#ifndef __IID_DEFINED__ +#define __IID_DEFINED__ + +typedef struct _IID +{ + unsigned long x; + unsigned short s1; + unsigned short s2; + unsigned char c[8]; +} IID; + +#endif // __IID_DEFINED__ + +#ifndef CLSID_DEFINED +#define CLSID_DEFINED +typedef IID CLSID; +#endif // CLSID_DEFINED + +#define MIDL_DEFINE_GUID(type,name,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) \ + EXTERN_C __declspec(selectany) const type name = {l,w1,w2,{b1,b2,b3,b4,b5,b6,b7,b8}} + +#endif // !_MIDL_USE_GUIDDEF_ + +MIDL_DEFINE_GUID(IID, IID_IRegisteredCommandElevator,0xA949CB4E,0xC4F9,0x44C4,0xB2,0x13,0x6B,0xF8,0xAA,0x9A,0xC6,0x9C); + + +MIDL_DEFINE_GUID(IID, LIBID_ElevatorLib,0x0014D784,0x7012,0x4A79,0x8A,0xB6,0xAD,0xDB,0x81,0x93,0xA0,0x6E); + +#undef MIDL_DEFINE_GUID + +#ifdef __cplusplus +} +#endif + + + diff --git a/third_party/win_build_output/midl/chrome/elevation_service/x64/elevation_service_idl_p.c b/third_party/win_build_output/midl/chrome/elevation_service/x64/elevation_service_idl_p.c new file mode 100644 index 00000000000000..b16d77510721a6 --- /dev/null +++ b/third_party/win_build_output/midl/chrome/elevation_service/x64/elevation_service_idl_p.c @@ -0,0 +1,299 @@ + + +/* this ALWAYS GENERATED file contains the proxy stub code */ + + + /* File created by MIDL compiler version 8.xx.xxxx */ +/* at a redacted point in time + */ +/* Compiler settings for ../../chrome/elevation_service/elevation_service_idl.idl: + Oicf, W1, Zp8, env=Win64 (32b run), target_arch=AMD64 8.xx.xxxx + protocol : dce , ms_ext, c_ext, robust + error checks: allocation ref bounds_check enum stub_data + VC __declspec() decoration level: + __declspec(uuid()), __declspec(selectany), __declspec(novtable) + DECLSPEC_UUID(), MIDL_INTERFACE() +*/ +/* @@MIDL_FILE_HEADING( ) */ + +#if defined(_M_AMD64) + + +#pragma warning( disable: 4049 ) /* more than 64k source lines */ +#if _MSC_VER >= 1200 +#pragma warning(push) +#endif + +#pragma warning( disable: 4211 ) /* redefine extern to static */ +#pragma warning( disable: 4232 ) /* dllimport identity*/ +#pragma warning( disable: 4024 ) /* array to pointer mapping*/ +#pragma warning( disable: 4152 ) /* function/data pointer conversion in expression */ + +#define USE_STUBLESS_PROXY + + +/* verify that the version is high enough to compile this file*/ +#ifndef __REDQ_RPCPROXY_H_VERSION__ +#define __REQUIRED_RPCPROXY_H_VERSION__ 475 +#endif + + +#include "rpcproxy.h" +#ifndef __RPCPROXY_H_VERSION__ +#error this stub requires an updated version of +#endif /* __RPCPROXY_H_VERSION__ */ + + +#include "elevation_service_idl.h" + +#define TYPE_FORMAT_STRING_SIZE 11 +#define PROC_FORMAT_STRING_SIZE 51 +#define EXPR_FORMAT_STRING_SIZE 1 +#define TRANSMIT_AS_TABLE_SIZE 0 +#define WIRE_MARSHAL_TABLE_SIZE 0 + +typedef struct _elevation_service_idl_MIDL_TYPE_FORMAT_STRING + { + short Pad; + unsigned char Format[ TYPE_FORMAT_STRING_SIZE ]; + } elevation_service_idl_MIDL_TYPE_FORMAT_STRING; + +typedef struct _elevation_service_idl_MIDL_PROC_FORMAT_STRING + { + short Pad; + unsigned char Format[ PROC_FORMAT_STRING_SIZE ]; + } elevation_service_idl_MIDL_PROC_FORMAT_STRING; + +typedef struct _elevation_service_idl_MIDL_EXPR_FORMAT_STRING + { + long Pad; + unsigned char Format[ EXPR_FORMAT_STRING_SIZE ]; + } elevation_service_idl_MIDL_EXPR_FORMAT_STRING; + + +static const RPC_SYNTAX_IDENTIFIER _RpcTransferSyntax = +{{0x8A885D04,0x1CEB,0x11C9,{0x9F,0xE8,0x08,0x00,0x2B,0x10,0x48,0x60}},{2,0}}; + + +extern const elevation_service_idl_MIDL_TYPE_FORMAT_STRING elevation_service_idl__MIDL_TypeFormatString; +extern const elevation_service_idl_MIDL_PROC_FORMAT_STRING elevation_service_idl__MIDL_ProcFormatString; +extern const elevation_service_idl_MIDL_EXPR_FORMAT_STRING elevation_service_idl__MIDL_ExprFormatString; + + +extern const MIDL_STUB_DESC Object_StubDesc; + + +extern const MIDL_SERVER_INFO IRegisteredCommandElevator_ServerInfo; +extern const MIDL_STUBLESS_PROXY_INFO IRegisteredCommandElevator_ProxyInfo; + + + +#if !defined(__RPC_WIN64__) +#error Invalid build platform for this stub. +#endif + +static const elevation_service_idl_MIDL_PROC_FORMAT_STRING elevation_service_idl__MIDL_ProcFormatString = + { + 0, + { + + /* Procedure LaunchCommand */ + + 0x33, /* FC_AUTO_HANDLE */ + 0x6c, /* Old Flags: object, Oi2 */ +/* 2 */ NdrFcLong( 0x0 ), /* 0 */ +/* 6 */ NdrFcShort( 0x3 ), /* 3 */ +/* 8 */ NdrFcShort( 0x28 ), /* X64 Stack size/offset = 40 */ +/* 10 */ NdrFcShort( 0x8 ), /* 8 */ +/* 12 */ NdrFcShort( 0x24 ), /* 36 */ +/* 14 */ 0x46, /* Oi2 Flags: clt must size, has return, has ext, */ + 0x4, /* 4 */ +/* 16 */ 0xa, /* 10 */ + 0x1, /* Ext Flags: new corr desc, */ +/* 18 */ NdrFcShort( 0x0 ), /* 0 */ +/* 20 */ NdrFcShort( 0x0 ), /* 0 */ +/* 22 */ NdrFcShort( 0x0 ), /* 0 */ +/* 24 */ NdrFcShort( 0x0 ), /* 0 */ + + /* Parameter cmd_id */ + +/* 26 */ NdrFcShort( 0x10b ), /* Flags: must size, must free, in, simple ref, */ +/* 28 */ NdrFcShort( 0x8 ), /* X64 Stack size/offset = 8 */ +/* 30 */ NdrFcShort( 0x4 ), /* Type Offset=4 */ + + /* Parameter caller_proc_id */ + +/* 32 */ NdrFcShort( 0x48 ), /* Flags: in, base type, */ +/* 34 */ NdrFcShort( 0x10 ), /* X64 Stack size/offset = 16 */ +/* 36 */ 0x8, /* FC_LONG */ + 0x0, /* 0 */ + + /* Parameter proc_handle */ + +/* 38 */ NdrFcShort( 0x2150 ), /* Flags: out, base type, simple ref, srv alloc size=8 */ +/* 40 */ NdrFcShort( 0x18 ), /* X64 Stack size/offset = 24 */ +/* 42 */ 0xb9, /* FC_UINT3264 */ + 0x0, /* 0 */ + + /* Return value */ + +/* 44 */ NdrFcShort( 0x70 ), /* Flags: out, return, base type, */ +/* 46 */ NdrFcShort( 0x20 ), /* X64 Stack size/offset = 32 */ +/* 48 */ 0x8, /* FC_LONG */ + 0x0, /* 0 */ + + 0x0 + } + }; + +static const elevation_service_idl_MIDL_TYPE_FORMAT_STRING elevation_service_idl__MIDL_TypeFormatString = + { + 0, + { + NdrFcShort( 0x0 ), /* 0 */ +/* 2 */ + 0x11, 0x8, /* FC_RP [simple_pointer] */ +/* 4 */ + 0x25, /* FC_C_WSTRING */ + 0x5c, /* FC_PAD */ +/* 6 */ + 0x11, 0xc, /* FC_RP [alloced_on_stack] [simple_pointer] */ +/* 8 */ 0xb9, /* FC_UINT3264 */ + 0x5c, /* FC_PAD */ + + 0x0 + } + }; + + +/* Object interface: IUnknown, ver. 0.0, + GUID={0x00000000,0x0000,0x0000,{0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x46}} */ + + +/* Object interface: IRegisteredCommandElevator, ver. 0.0, + GUID={0xA949CB4E,0xC4F9,0x44C4,{0xB2,0x13,0x6B,0xF8,0xAA,0x9A,0xC6,0x9C}} */ + +#pragma code_seg(".orpc") +static const unsigned short IRegisteredCommandElevator_FormatStringOffsetTable[] = + { + 0 + }; + +static const MIDL_STUBLESS_PROXY_INFO IRegisteredCommandElevator_ProxyInfo = + { + &Object_StubDesc, + elevation_service_idl__MIDL_ProcFormatString.Format, + &IRegisteredCommandElevator_FormatStringOffsetTable[-3], + 0, + 0, + 0 + }; + + +static const MIDL_SERVER_INFO IRegisteredCommandElevator_ServerInfo = + { + &Object_StubDesc, + 0, + elevation_service_idl__MIDL_ProcFormatString.Format, + &IRegisteredCommandElevator_FormatStringOffsetTable[-3], + 0, + 0, + 0, + 0}; +CINTERFACE_PROXY_VTABLE(4) _IRegisteredCommandElevatorProxyVtbl = +{ + &IRegisteredCommandElevator_ProxyInfo, + &IID_IRegisteredCommandElevator, + IUnknown_QueryInterface_Proxy, + IUnknown_AddRef_Proxy, + IUnknown_Release_Proxy , + (void *) (INT_PTR) -1 /* IRegisteredCommandElevator::LaunchCommand */ +}; + +const CInterfaceStubVtbl _IRegisteredCommandElevatorStubVtbl = +{ + &IID_IRegisteredCommandElevator, + &IRegisteredCommandElevator_ServerInfo, + 4, + 0, /* pure interpreted */ + CStdStubBuffer_METHODS +}; + +static const MIDL_STUB_DESC Object_StubDesc = + { + 0, + NdrOleAllocate, + NdrOleFree, + 0, + 0, + 0, + 0, + 0, + elevation_service_idl__MIDL_TypeFormatString.Format, + 1, /* -error bounds_check flag */ + 0x50002, /* Ndr library version */ + 0, + 0x801026e, /* MIDL Version 8.1.622 */ + 0, + 0, + 0, /* notify & notify_flag routine table */ + 0x1, /* MIDL flag */ + 0, /* cs routines */ + 0, /* proxy/server info */ + 0 + }; + +const CInterfaceProxyVtbl * const _elevation_service_idl_ProxyVtblList[] = +{ + ( CInterfaceProxyVtbl *) &_IRegisteredCommandElevatorProxyVtbl, + 0 +}; + +const CInterfaceStubVtbl * const _elevation_service_idl_StubVtblList[] = +{ + ( CInterfaceStubVtbl *) &_IRegisteredCommandElevatorStubVtbl, + 0 +}; + +PCInterfaceName const _elevation_service_idl_InterfaceNamesList[] = +{ + "IRegisteredCommandElevator", + 0 +}; + + +#define _elevation_service_idl_CHECK_IID(n) IID_GENERIC_CHECK_IID( _elevation_service_idl, pIID, n) + +int __stdcall _elevation_service_idl_IID_Lookup( const IID * pIID, int * pIndex ) +{ + + if(!_elevation_service_idl_CHECK_IID(0)) + { + *pIndex = 0; + return 1; + } + + return 0; +} + +const ExtendedProxyFileInfo elevation_service_idl_ProxyFileInfo = +{ + (PCInterfaceProxyVtblList *) & _elevation_service_idl_ProxyVtblList, + (PCInterfaceStubVtblList *) & _elevation_service_idl_StubVtblList, + (const PCInterfaceName * ) & _elevation_service_idl_InterfaceNamesList, + 0, /* no delegation */ + & _elevation_service_idl_IID_Lookup, + 1, + 2, + 0, /* table of [async_uuid] interfaces */ + 0, /* Filler1 */ + 0, /* Filler2 */ + 0 /* Filler3 */ +}; +#if _MSC_VER >= 1200 +#pragma warning(pop) +#endif + + +#endif /* defined(_M_AMD64)*/ + diff --git a/third_party/win_build_output/midl/chrome/elevation_service/x86/elevation_service_idl.dlldata.c b/third_party/win_build_output/midl/chrome/elevation_service/x86/elevation_service_idl.dlldata.c new file mode 100644 index 00000000000000..cfe06f7e26cab7 --- /dev/null +++ b/third_party/win_build_output/midl/chrome/elevation_service/x86/elevation_service_idl.dlldata.c @@ -0,0 +1,37 @@ +/********************************************************* + DllData file -- generated by MIDL compiler + + DO NOT ALTER THIS FILE + + This file is regenerated by MIDL on every IDL file compile. + + To completely reconstruct this file, delete it and rerun MIDL + on all the IDL files in this DLL, specifying this file for the + /dlldata command line option + +*********************************************************/ + + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +EXTERN_PROXY_FILE( elevation_service_idl ) + + +PROXYFILE_LIST_START +/* Start of list */ + REFERENCE_PROXY_FILE( elevation_service_idl ), +/* End of list */ +PROXYFILE_LIST_END + + +DLLDATA_ROUTINES( aProxyFileList, GET_DLL_CLSID ) + +#ifdef __cplusplus +} /*extern "C" */ +#endif + +/* end of generated dlldata file */ diff --git a/third_party/win_build_output/midl/chrome/elevation_service/x86/elevation_service_idl.h b/third_party/win_build_output/midl/chrome/elevation_service/x86/elevation_service_idl.h new file mode 100644 index 00000000000000..b59226dded6054 --- /dev/null +++ b/third_party/win_build_output/midl/chrome/elevation_service/x86/elevation_service_idl.h @@ -0,0 +1,177 @@ + + +/* this ALWAYS GENERATED file contains the definitions for the interfaces */ + + + /* File created by MIDL compiler version 8.xx.xxxx */ +/* at a redacted point in time + */ +/* Compiler settings for ../../chrome/elevation_service/elevation_service_idl.idl: + Oicf, W1, Zp8, env=Win32 (32b run), target_arch=X86 8.xx.xxxx + protocol : dce , ms_ext, c_ext, robust + error checks: allocation ref bounds_check enum stub_data + VC __declspec() decoration level: + __declspec(uuid()), __declspec(selectany), __declspec(novtable) + DECLSPEC_UUID(), MIDL_INTERFACE() +*/ +/* @@MIDL_FILE_HEADING( ) */ + +#pragma warning( disable: 4049 ) /* more than 64k source lines */ + + +/* verify that the version is high enough to compile this file*/ +#ifndef __REQUIRED_RPCNDR_H_VERSION__ +#define __REQUIRED_RPCNDR_H_VERSION__ 475 +#endif + +#include "rpc.h" +#include "rpcndr.h" + +#ifndef __RPCNDR_H_VERSION__ +#error this stub requires an updated version of +#endif /* __RPCNDR_H_VERSION__ */ + +#ifndef COM_NO_WINDOWS_H +#include "windows.h" +#include "ole2.h" +#endif /*COM_NO_WINDOWS_H*/ + +#ifndef __elevation_service_idl_h__ +#define __elevation_service_idl_h__ + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +#pragma once +#endif + +/* Forward Declarations */ + +#ifndef __IRegisteredCommandElevator_FWD_DEFINED__ +#define __IRegisteredCommandElevator_FWD_DEFINED__ +typedef interface IRegisteredCommandElevator IRegisteredCommandElevator; + +#endif /* __IRegisteredCommandElevator_FWD_DEFINED__ */ + + +#ifndef __IRegisteredCommandElevator_FWD_DEFINED__ +#define __IRegisteredCommandElevator_FWD_DEFINED__ +typedef interface IRegisteredCommandElevator IRegisteredCommandElevator; + +#endif /* __IRegisteredCommandElevator_FWD_DEFINED__ */ + + +/* header files for imported files */ +#include "oaidl.h" +#include "ocidl.h" + +#ifdef __cplusplus +extern "C"{ +#endif + + +#ifndef __IRegisteredCommandElevator_INTERFACE_DEFINED__ +#define __IRegisteredCommandElevator_INTERFACE_DEFINED__ + +/* interface IRegisteredCommandElevator */ +/* [unique][helpstring][uuid][oleautomation][object] */ + + +EXTERN_C const IID IID_IRegisteredCommandElevator; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("A949CB4E-C4F9-44C4-B213-6BF8AA9AC69C") + IRegisteredCommandElevator : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE LaunchCommand( + /* [string][in] */ const WCHAR *cmd_id, + /* [in] */ DWORD caller_proc_id, + /* [out] */ ULONG_PTR *proc_handle) = 0; + + }; + + +#else /* C style interface */ + + typedef struct IRegisteredCommandElevatorVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IRegisteredCommandElevator * This, + /* [in] */ REFIID riid, + /* [annotation][iid_is][out] */ + _COM_Outptr_ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IRegisteredCommandElevator * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IRegisteredCommandElevator * This); + + HRESULT ( STDMETHODCALLTYPE *LaunchCommand )( + IRegisteredCommandElevator * This, + /* [string][in] */ const WCHAR *cmd_id, + /* [in] */ DWORD caller_proc_id, + /* [out] */ ULONG_PTR *proc_handle); + + END_INTERFACE + } IRegisteredCommandElevatorVtbl; + + interface IRegisteredCommandElevator + { + CONST_VTBL struct IRegisteredCommandElevatorVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IRegisteredCommandElevator_QueryInterface(This,riid,ppvObject) \ + ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) + +#define IRegisteredCommandElevator_AddRef(This) \ + ( (This)->lpVtbl -> AddRef(This) ) + +#define IRegisteredCommandElevator_Release(This) \ + ( (This)->lpVtbl -> Release(This) ) + + +#define IRegisteredCommandElevator_LaunchCommand(This,cmd_id,caller_proc_id,proc_handle) \ + ( (This)->lpVtbl -> LaunchCommand(This,cmd_id,caller_proc_id,proc_handle) ) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __IRegisteredCommandElevator_INTERFACE_DEFINED__ */ + + + +#ifndef __ElevatorLib_LIBRARY_DEFINED__ +#define __ElevatorLib_LIBRARY_DEFINED__ + +/* library ElevatorLib */ +/* [helpstring][version][uuid] */ + + + +EXTERN_C const IID LIBID_ElevatorLib; +#endif /* __ElevatorLib_LIBRARY_DEFINED__ */ + +/* Additional Prototypes for ALL interfaces */ + +/* end of Additional Prototypes */ + +#ifdef __cplusplus +} +#endif + +#endif + + diff --git a/third_party/win_build_output/midl/chrome/elevation_service/x86/elevation_service_idl.tlb b/third_party/win_build_output/midl/chrome/elevation_service/x86/elevation_service_idl.tlb new file mode 100644 index 0000000000000000000000000000000000000000..133038c2450a0502f598cfd32e9e50a22c782577 GIT binary patch literal 1884 zcmc&#O-NKx6h32Sn*EQ9l%!i(y9Tq(EF=skb857*i5C&fym{}HkKVi)o-dt&0Vik? z;UchFgo}z66|`~DB3ihR2wJrg3aVA$rnb7#&i8)wCQVR69p>J1zw`gj{h5LDed#)i z5U8o%V|1LEFCnV)MJw|rUR?^%GShBe3m#P-z@eYcIK|*?Am7eBy@6nccB_v#7yhFlk^G&cmE$P27?v(Ia`?dJM zevXd@1%&cIVNZPI&si{5pno9rAtc0&aHaJufNzBSNRS`e7op3)$PxO=9QMFHfiT2? z9f1rvq7IKW_in&%!Q54_$ z&u7G|<%Pap{Efbr-+JUvIG_8EbFQae_}=;t_4d@r*-YE)6P7Wmx&Z|8)8-0#xs%05Yrsx#3pLEUC_01Cwa|xEAv{G1yI1=j=>2lE!T)U$> zWu=2^S1pn@f6NtCGZdwrmdEi8ZOl<~BOT+p*D+Mr&_%8+29k-C7&V*`vtWyOtW@G( zsU%casDc}!YOpI7OxqQvEnG8iY>uLH^a_+golXm2Bmo5{|N68 w-{}e1bn_acm0GLJSZ{g%i@4BxX=xef9QPk@Ce9GnjXZD%{MRFr#r*^Q0MmKTX8-^I literal 0 HcmV?d00001 diff --git a/third_party/win_build_output/midl/chrome/elevation_service/x86/elevation_service_idl_i.c b/third_party/win_build_output/midl/chrome/elevation_service/x86/elevation_service_idl_i.c new file mode 100644 index 00000000000000..ca613cac53282e --- /dev/null +++ b/third_party/win_build_output/midl/chrome/elevation_service/x86/elevation_service_idl_i.c @@ -0,0 +1,82 @@ + + +/* this ALWAYS GENERATED file contains the IIDs and CLSIDs */ + +/* link this file in with the server and any clients */ + + + /* File created by MIDL compiler version 8.xx.xxxx */ +/* at a redacted point in time + */ +/* Compiler settings for ../../chrome/elevation_service/elevation_service_idl.idl: + Oicf, W1, Zp8, env=Win32 (32b run), target_arch=X86 8.xx.xxxx + protocol : dce , ms_ext, c_ext, robust + error checks: allocation ref bounds_check enum stub_data + VC __declspec() decoration level: + __declspec(uuid()), __declspec(selectany), __declspec(novtable) + DECLSPEC_UUID(), MIDL_INTERFACE() +*/ +/* @@MIDL_FILE_HEADING( ) */ + +#pragma warning( disable: 4049 ) /* more than 64k source lines */ + + +#ifdef __cplusplus +extern "C"{ +#endif + + +#include +#include + +#ifdef _MIDL_USE_GUIDDEF_ + +#ifndef INITGUID +#define INITGUID +#include +#undef INITGUID +#else +#include +#endif + +#define MIDL_DEFINE_GUID(type,name,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) \ + DEFINE_GUID(name,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) + +#else // !_MIDL_USE_GUIDDEF_ + +#ifndef __IID_DEFINED__ +#define __IID_DEFINED__ + +typedef struct _IID +{ + unsigned long x; + unsigned short s1; + unsigned short s2; + unsigned char c[8]; +} IID; + +#endif // __IID_DEFINED__ + +#ifndef CLSID_DEFINED +#define CLSID_DEFINED +typedef IID CLSID; +#endif // CLSID_DEFINED + +#define MIDL_DEFINE_GUID(type,name,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) \ + EXTERN_C __declspec(selectany) const type name = {l,w1,w2,{b1,b2,b3,b4,b5,b6,b7,b8}} + +#endif // !_MIDL_USE_GUIDDEF_ + +MIDL_DEFINE_GUID(IID, IID_IRegisteredCommandElevator,0xA949CB4E,0xC4F9,0x44C4,0xB2,0x13,0x6B,0xF8,0xAA,0x9A,0xC6,0x9C); + + +MIDL_DEFINE_GUID(IID, LIBID_ElevatorLib,0x0014D784,0x7012,0x4A79,0x8A,0xB6,0xAD,0xDB,0x81,0x93,0xA0,0x6E); + +#undef MIDL_DEFINE_GUID + +#ifdef __cplusplus +} +#endif + + + diff --git a/third_party/win_build_output/midl/chrome/elevation_service/x86/elevation_service_idl_p.c b/third_party/win_build_output/midl/chrome/elevation_service/x86/elevation_service_idl_p.c new file mode 100644 index 00000000000000..ec23e877373eae --- /dev/null +++ b/third_party/win_build_output/midl/chrome/elevation_service/x86/elevation_service_idl_p.c @@ -0,0 +1,309 @@ + + +/* this ALWAYS GENERATED file contains the proxy stub code */ + + + /* File created by MIDL compiler version 8.xx.xxxx */ +/* at a redacted point in time + */ +/* Compiler settings for ../../chrome/elevation_service/elevation_service_idl.idl: + Oicf, W1, Zp8, env=Win32 (32b run), target_arch=X86 8.xx.xxxx + protocol : dce , ms_ext, c_ext, robust + error checks: allocation ref bounds_check enum stub_data + VC __declspec() decoration level: + __declspec(uuid()), __declspec(selectany), __declspec(novtable) + DECLSPEC_UUID(), MIDL_INTERFACE() +*/ +/* @@MIDL_FILE_HEADING( ) */ + +#if !defined(_M_IA64) && !defined(_M_AMD64) && !defined(_ARM_) + + +#pragma warning( disable: 4049 ) /* more than 64k source lines */ +#if _MSC_VER >= 1200 +#pragma warning(push) +#endif + +#pragma warning( disable: 4211 ) /* redefine extern to static */ +#pragma warning( disable: 4232 ) /* dllimport identity*/ +#pragma warning( disable: 4024 ) /* array to pointer mapping*/ +#pragma warning( disable: 4152 ) /* function/data pointer conversion in expression */ +#pragma warning( disable: 4100 ) /* unreferenced arguments in x86 call */ + +#pragma optimize("", off ) + +#define USE_STUBLESS_PROXY + + +/* verify that the version is high enough to compile this file*/ +#ifndef __REDQ_RPCPROXY_H_VERSION__ +#define __REQUIRED_RPCPROXY_H_VERSION__ 475 +#endif + + +#include "rpcproxy.h" +#ifndef __RPCPROXY_H_VERSION__ +#error this stub requires an updated version of +#endif /* __RPCPROXY_H_VERSION__ */ + + +#include "elevation_service_idl.h" + +#define TYPE_FORMAT_STRING_SIZE 11 +#define PROC_FORMAT_STRING_SIZE 49 +#define EXPR_FORMAT_STRING_SIZE 1 +#define TRANSMIT_AS_TABLE_SIZE 0 +#define WIRE_MARSHAL_TABLE_SIZE 0 + +typedef struct _elevation_service_idl_MIDL_TYPE_FORMAT_STRING + { + short Pad; + unsigned char Format[ TYPE_FORMAT_STRING_SIZE ]; + } elevation_service_idl_MIDL_TYPE_FORMAT_STRING; + +typedef struct _elevation_service_idl_MIDL_PROC_FORMAT_STRING + { + short Pad; + unsigned char Format[ PROC_FORMAT_STRING_SIZE ]; + } elevation_service_idl_MIDL_PROC_FORMAT_STRING; + +typedef struct _elevation_service_idl_MIDL_EXPR_FORMAT_STRING + { + long Pad; + unsigned char Format[ EXPR_FORMAT_STRING_SIZE ]; + } elevation_service_idl_MIDL_EXPR_FORMAT_STRING; + + +static const RPC_SYNTAX_IDENTIFIER _RpcTransferSyntax = +{{0x8A885D04,0x1CEB,0x11C9,{0x9F,0xE8,0x08,0x00,0x2B,0x10,0x48,0x60}},{2,0}}; + + +extern const elevation_service_idl_MIDL_TYPE_FORMAT_STRING elevation_service_idl__MIDL_TypeFormatString; +extern const elevation_service_idl_MIDL_PROC_FORMAT_STRING elevation_service_idl__MIDL_ProcFormatString; +extern const elevation_service_idl_MIDL_EXPR_FORMAT_STRING elevation_service_idl__MIDL_ExprFormatString; + + +extern const MIDL_STUB_DESC Object_StubDesc; + + +extern const MIDL_SERVER_INFO IRegisteredCommandElevator_ServerInfo; +extern const MIDL_STUBLESS_PROXY_INFO IRegisteredCommandElevator_ProxyInfo; + + + +#if !defined(__RPC_WIN32__) +#error Invalid build platform for this stub. +#endif + +#if !(TARGET_IS_NT50_OR_LATER) +#error You need Windows 2000 or later to run this stub because it uses these features: +#error /robust command line switch. +#error However, your C/C++ compilation flags indicate you intend to run this app on earlier systems. +#error This app will fail with the RPC_X_WRONG_STUB_VERSION error. +#endif + + +static const elevation_service_idl_MIDL_PROC_FORMAT_STRING elevation_service_idl__MIDL_ProcFormatString = + { + 0, + { + + /* Procedure LaunchCommand */ + + 0x33, /* FC_AUTO_HANDLE */ + 0x6c, /* Old Flags: object, Oi2 */ +/* 2 */ NdrFcLong( 0x0 ), /* 0 */ +/* 6 */ NdrFcShort( 0x3 ), /* 3 */ +/* 8 */ NdrFcShort( 0x14 ), /* x86 Stack size/offset = 20 */ +/* 10 */ NdrFcShort( 0x8 ), /* 8 */ +/* 12 */ NdrFcShort( 0x24 ), /* 36 */ +/* 14 */ 0x46, /* Oi2 Flags: clt must size, has return, has ext, */ + 0x4, /* 4 */ +/* 16 */ 0x8, /* 8 */ + 0x1, /* Ext Flags: new corr desc, */ +/* 18 */ NdrFcShort( 0x0 ), /* 0 */ +/* 20 */ NdrFcShort( 0x0 ), /* 0 */ +/* 22 */ NdrFcShort( 0x0 ), /* 0 */ + + /* Parameter cmd_id */ + +/* 24 */ NdrFcShort( 0x10b ), /* Flags: must size, must free, in, simple ref, */ +/* 26 */ NdrFcShort( 0x4 ), /* x86 Stack size/offset = 4 */ +/* 28 */ NdrFcShort( 0x4 ), /* Type Offset=4 */ + + /* Parameter caller_proc_id */ + +/* 30 */ NdrFcShort( 0x48 ), /* Flags: in, base type, */ +/* 32 */ NdrFcShort( 0x8 ), /* x86 Stack size/offset = 8 */ +/* 34 */ 0x8, /* FC_LONG */ + 0x0, /* 0 */ + + /* Parameter proc_handle */ + +/* 36 */ NdrFcShort( 0x2150 ), /* Flags: out, base type, simple ref, srv alloc size=8 */ +/* 38 */ NdrFcShort( 0xc ), /* x86 Stack size/offset = 12 */ +/* 40 */ 0x8, /* FC_LONG */ + 0x0, /* 0 */ + + /* Return value */ + +/* 42 */ NdrFcShort( 0x70 ), /* Flags: out, return, base type, */ +/* 44 */ NdrFcShort( 0x10 ), /* x86 Stack size/offset = 16 */ +/* 46 */ 0x8, /* FC_LONG */ + 0x0, /* 0 */ + + 0x0 + } + }; + +static const elevation_service_idl_MIDL_TYPE_FORMAT_STRING elevation_service_idl__MIDL_TypeFormatString = + { + 0, + { + NdrFcShort( 0x0 ), /* 0 */ +/* 2 */ + 0x11, 0x8, /* FC_RP [simple_pointer] */ +/* 4 */ + 0x25, /* FC_C_WSTRING */ + 0x5c, /* FC_PAD */ +/* 6 */ + 0x11, 0xc, /* FC_RP [alloced_on_stack] [simple_pointer] */ +/* 8 */ 0x8, /* FC_LONG */ + 0x5c, /* FC_PAD */ + + 0x0 + } + }; + + +/* Object interface: IUnknown, ver. 0.0, + GUID={0x00000000,0x0000,0x0000,{0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x46}} */ + + +/* Object interface: IRegisteredCommandElevator, ver. 0.0, + GUID={0xA949CB4E,0xC4F9,0x44C4,{0xB2,0x13,0x6B,0xF8,0xAA,0x9A,0xC6,0x9C}} */ + +#pragma code_seg(".orpc") +static const unsigned short IRegisteredCommandElevator_FormatStringOffsetTable[] = + { + 0 + }; + +static const MIDL_STUBLESS_PROXY_INFO IRegisteredCommandElevator_ProxyInfo = + { + &Object_StubDesc, + elevation_service_idl__MIDL_ProcFormatString.Format, + &IRegisteredCommandElevator_FormatStringOffsetTable[-3], + 0, + 0, + 0 + }; + + +static const MIDL_SERVER_INFO IRegisteredCommandElevator_ServerInfo = + { + &Object_StubDesc, + 0, + elevation_service_idl__MIDL_ProcFormatString.Format, + &IRegisteredCommandElevator_FormatStringOffsetTable[-3], + 0, + 0, + 0, + 0}; +CINTERFACE_PROXY_VTABLE(4) _IRegisteredCommandElevatorProxyVtbl = +{ + &IRegisteredCommandElevator_ProxyInfo, + &IID_IRegisteredCommandElevator, + IUnknown_QueryInterface_Proxy, + IUnknown_AddRef_Proxy, + IUnknown_Release_Proxy , + (void *) (INT_PTR) -1 /* IRegisteredCommandElevator::LaunchCommand */ +}; + +const CInterfaceStubVtbl _IRegisteredCommandElevatorStubVtbl = +{ + &IID_IRegisteredCommandElevator, + &IRegisteredCommandElevator_ServerInfo, + 4, + 0, /* pure interpreted */ + CStdStubBuffer_METHODS +}; + +static const MIDL_STUB_DESC Object_StubDesc = + { + 0, + NdrOleAllocate, + NdrOleFree, + 0, + 0, + 0, + 0, + 0, + elevation_service_idl__MIDL_TypeFormatString.Format, + 1, /* -error bounds_check flag */ + 0x50002, /* Ndr library version */ + 0, + 0x801026e, /* MIDL Version 8.1.622 */ + 0, + 0, + 0, /* notify & notify_flag routine table */ + 0x1, /* MIDL flag */ + 0, /* cs routines */ + 0, /* proxy/server info */ + 0 + }; + +const CInterfaceProxyVtbl * const _elevation_service_idl_ProxyVtblList[] = +{ + ( CInterfaceProxyVtbl *) &_IRegisteredCommandElevatorProxyVtbl, + 0 +}; + +const CInterfaceStubVtbl * const _elevation_service_idl_StubVtblList[] = +{ + ( CInterfaceStubVtbl *) &_IRegisteredCommandElevatorStubVtbl, + 0 +}; + +PCInterfaceName const _elevation_service_idl_InterfaceNamesList[] = +{ + "IRegisteredCommandElevator", + 0 +}; + + +#define _elevation_service_idl_CHECK_IID(n) IID_GENERIC_CHECK_IID( _elevation_service_idl, pIID, n) + +int __stdcall _elevation_service_idl_IID_Lookup( const IID * pIID, int * pIndex ) +{ + + if(!_elevation_service_idl_CHECK_IID(0)) + { + *pIndex = 0; + return 1; + } + + return 0; +} + +const ExtendedProxyFileInfo elevation_service_idl_ProxyFileInfo = +{ + (PCInterfaceProxyVtblList *) & _elevation_service_idl_ProxyVtblList, + (PCInterfaceStubVtblList *) & _elevation_service_idl_StubVtblList, + (const PCInterfaceName * ) & _elevation_service_idl_InterfaceNamesList, + 0, /* no delegation */ + & _elevation_service_idl_IID_Lookup, + 1, + 2, + 0, /* table of [async_uuid] interfaces */ + 0, /* Filler1 */ + 0, /* Filler2 */ + 0 /* Filler3 */ +}; +#if _MSC_VER >= 1200 +#pragma warning(pop) +#endif + + +#endif /* !defined(_M_IA64) && !defined(_M_AMD64) && !defined(_ARM_) */ +