Chromium Code Reviews| Index: remoting/host/win/launch_process_with_token.cc |
| diff --git a/remoting/host/win/launch_process_with_token.cc b/remoting/host/win/launch_process_with_token.cc |
| index 1320e2a3dd911fa932d1c3fafc93f62109e045f1..c531ff967c3a6850a84a6d5ff2b5a193d616cf3b 100644 |
| --- a/remoting/host/win/launch_process_with_token.cc |
| +++ b/remoting/host/win/launch_process_with_token.cc |
| @@ -32,11 +32,6 @@ const WINSTATIONINFOCLASS kCreateProcessPipeNameClass = |
| const int kPipeBusyWaitTimeoutMs = 2000; |
| const int kPipeConnectMaxAttempts = 3; |
| -// The minimum and maximum delays between attempts to inject host process into |
| -// a session. |
| -const int kMaxLaunchDelaySeconds = 60; |
| -const int kMinLaunchDelaySeconds = 1; |
| - |
| // Name of the default session desktop. |
| const char kDefaultDesktopName[] = "winsta0\\default"; |
| @@ -292,6 +287,32 @@ bool CreateRemoteSessionProcess( |
| << response.process_information.dwProcessId; |
| return false; |
| } |
| + |
| + // N.B. THREAD_ALL_ACCESS is different in XP and Vista+ versions of |
| + // the SDK. |desired_access| below is effectively THREAD_ALL_ACCESS from |
| + // the XP version of the SDK. |
| + desired_access = |
|
alexeypa (please no reviews)
2012/10/05 17:46:22
This is a part of https://chromiumcodereview.appsp
|
| + STANDARD_RIGHTS_REQUIRED | |
| + SYNCHRONIZE | |
| + THREAD_TERMINATE | |
| + THREAD_SUSPEND_RESUME | |
| + THREAD_GET_CONTEXT | |
| + THREAD_SET_CONTEXT | |
| + THREAD_QUERY_INFORMATION | |
| + THREAD_SET_INFORMATION | |
| + THREAD_SET_THREAD_TOKEN | |
| + THREAD_IMPERSONATE | |
| + THREAD_DIRECT_IMPERSONATION; |
| + response.process_information.hThread = |
| + OpenThread(desired_access, |
| + FALSE, |
| + response.process_information.dwThreadId); |
| + if (!response.process_information.hThread) { |
| + LOG_GETLASTERROR(ERROR) << "Failed to open thread " |
| + << response.process_information.dwThreadId; |
| + CloseHandle(response.process_information.hProcess); |
| + return false; |
| + } |
| } |
| *process_information_out = response.process_information; |