diff options
author | sorin@chromium.org <sorin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-02-07 21:28:37 +0000 |
---|---|---|
committer | sorin@chromium.org <sorin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-02-07 21:28:37 +0000 |
commit | 1d5541509d24eb016f775703fd7d1ed68b6bbe21 (patch) | |
tree | 4abe99d20dd3df25312759fbd8fd6ea50ba9d309 /remoting/host/daemon_process_win.cc | |
parent | 96207ee7fc78a6e49361e7b2e0e9fcaacfd0fa9f (diff) | |
download | chromium_src-1d5541509d24eb016f775703fd7d1ed68b6bbe21.zip chromium_src-1d5541509d24eb016f775703fd7d1ed68b6bbe21.tar.gz chromium_src-1d5541509d24eb016f775703fd7d1ed68b6bbe21.tar.bz2 |
Revert 249772 "Enabled pairing registry in the me2me host on Win..."
Reason for revert:
Failed the Win Builder:
http://build.chromium.org/p/chromium.win/builders/Win%20Builder/builds/17703
FAILED: c:\b\depot_tools\python276_bin\python.exe gyp-win-tool action-wrapper environment.x86 remoting_host_installation_target_zip2msi_8db1a48e4b92f6b189ab857368bcb580.9ab5556ec4f5c984131997731f005d9c.rsp ..\..\remoting
..\third_party\wix\light -nologo -dOfficialBuild=0 -dBranding=Chromium -dVersion=34.0.1829.0 -dControllerClsid={ae106047-4150-5a9e-8b08-f1577ad23da1} -dRdpDesktopSessionClsid={f05374ca-01bb-555f-b6bb-7a700f8a01e9} -ext ..\third_party\wix\WixFirewallExtension.dll -ext ..\third_party\wix\WixUIExtension.dll -ext ..\third_party\wix\WixUtilExtension.dll -cultures:en-us -sw1076 -b ..\out\Release\obj\remoting\remoting_host_installation.gen/installation\remoting-me2me-host-win\files -out ..\out\Release/chromoting.msi ..\out\Release\obj\remoting\remoting_host_installation.gen/installation\remoting-me2me-host-win.wixobj
c:\b\build\slave\cr-win-rel\build\src\out\Release\obj\remoting\remoting_host_installation.gen\installation\remoting-me2me-host-win\chromoting.wxs(490) : error LGHT0204 : ICE03: _Validation table: Invalid category string; Table: MsiLockPermissionsEx, Column: SDDLText, Key(s): reg07405C1A9AF51BEF27E1A9E37EC20A0A
..\third_party\wix\light returned 204
ninja: build stopped: subcommand failed.
> Enabled pairing registry in the me2me host on Windows.
> This CL is based on https://chromiumcodereview.appspot.com/23440071/.
>
> TBR=jschuh@chromium.org
>
> BUG=325567
>
> Review URL: https://codereview.chromium.org/139803008
TBR=weitaosu@chromium.org
Review URL: https://codereview.chromium.org/157733003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@249787 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/host/daemon_process_win.cc')
-rw-r--r-- | remoting/host/daemon_process_win.cc | 102 |
1 files changed, 0 insertions, 102 deletions
diff --git a/remoting/host/daemon_process_win.cc b/remoting/host/daemon_process_win.cc index fa91cb6..a365f3e 100644 --- a/remoting/host/daemon_process_win.cc +++ b/remoting/host/daemon_process_win.cc @@ -16,7 +16,6 @@ #include "base/strings/utf_string_conversions.h" #include "base/time/time.h" #include "base/timer/timer.h" -#include "base/win/registry.h" #include "base/win/scoped_handle.h" #include "ipc/ipc_message.h" #include "ipc/ipc_message_macros.h" @@ -36,31 +35,6 @@ using base::win::ScopedHandle; using base::TimeDelta; -namespace { - -#if defined(OFFICIAL_BUILD) -const wchar_t kPairingRegistryKeyName[] = - L"SOFTWARE\\Google\\Chrome Remote Desktop\\paired-clients"; -#else -const wchar_t kPairingRegistryKeyName[] = - L"SOFTWARE\\Chromoting\\paired-clients"; -#endif - -const wchar_t kPrivilegedKeyName[] = L"secrets"; -const wchar_t kUnprivilegedKeyName[] = L"clients"; - -// Duplicates |key| into |target_process| and returns the value that can be sent -// over IPC. -IPC::PlatformFileForTransit GetRegistryKeyForTransit( - base::ProcessHandle target_process, - const base::win::RegKey& key) { - base::PlatformFile handle = - reinterpret_cast<base::PlatformFile>(key.Handle()); - return IPC::GetFileHandleForProcess(handle, target_process, false); -} - -} // namespace - namespace remoting { class WtsTerminalMonitor; @@ -101,22 +75,12 @@ class DaemonProcessWin : public DaemonProcess { // Changes the service start type to 'manual'. void DisableAutoStart(); - // Initializes the pairing registry on the host side by sending - // ChromotingDaemonNetworkMsg_InitializePairingRegistry message. - bool InitializePairingRegistry(); - - // Opens the pairing registry keys. - bool OpenPairingRegistry(); - private: scoped_ptr<WorkerProcessLauncher> network_launcher_; // Handle of the network process. ScopedHandle network_process_; - base::win::RegKey pairing_registry_privileged_key_; - base::win::RegKey pairing_registry_unprivileged_key_; - DISALLOW_COPY_AND_ASSIGN(DaemonProcessWin); }; @@ -138,11 +102,6 @@ void DaemonProcessWin::OnChannelConnected(int32 peer_pid) { return; } - if (!InitializePairingRegistry()) { - CrashNetworkProcess(FROM_HERE); - return; - } - DaemonProcess::OnChannelConnected(peer_pid); } @@ -281,65 +240,4 @@ void DaemonProcessWin::DisableAutoStart() { } } -bool DaemonProcessWin::InitializePairingRegistry() { - if (!pairing_registry_privileged_key_.Valid()) { - if (!OpenPairingRegistry()) - return false; - } - - // Duplicate handles to the network process. - IPC::PlatformFileForTransit privileged_key = GetRegistryKeyForTransit( - network_process_, pairing_registry_privileged_key_); - IPC::PlatformFileForTransit unprivileged_key = GetRegistryKeyForTransit( - network_process_, pairing_registry_unprivileged_key_); - if (!(privileged_key && unprivileged_key)) - return false; - - // Initialize the pairing registry in the network process. This has to be done - // before the host configuration is sent, otherwise the host will not use - // the passed handles. - SendToNetwork(new ChromotingDaemonNetworkMsg_InitializePairingRegistry( - privileged_key, unprivileged_key)); - return true; -} - -bool DaemonProcessWin::OpenPairingRegistry() { - DCHECK(!pairing_registry_privileged_key_.Valid()); - DCHECK(!pairing_registry_unprivileged_key_.Valid()); - - // Open the root of the pairing registry. - base::win::RegKey root; - LONG result = root.Open(HKEY_LOCAL_MACHINE, kPairingRegistryKeyName, - KEY_READ); - if (result != ERROR_SUCCESS) { - SetLastError(result); - PLOG(ERROR) << "Failed to open HKLM\\" << kPairingRegistryKeyName; - return false; - } - - base::win::RegKey privileged; - result = privileged.Open(root.Handle(), kPrivilegedKeyName, - KEY_READ | KEY_WRITE); - if (result != ERROR_SUCCESS) { - SetLastError(result); - PLOG(ERROR) << "Failed to open HKLM\\" << kPairingRegistryKeyName << "\\" - << kPrivilegedKeyName; - return false; - } - - base::win::RegKey unprivileged; - result = unprivileged.Open(root.Handle(), kUnprivilegedKeyName, - KEY_READ | KEY_WRITE); - if (result != ERROR_SUCCESS) { - SetLastError(result); - PLOG(ERROR) << "Failed to open HKLM\\" << kUnprivilegedKeyName << "\\" - << kUnprivilegedKeyName; - return false; - } - - pairing_registry_privileged_key_.Set(privileged.Take()); - pairing_registry_unprivileged_key_.Set(unprivileged.Take()); - return true; -} - } // namespace remoting |