Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(469)

Issue 2568983004: Fixing CRD curtain mode connection failures on Win8+ official builds (Closed)

Created:
4 years ago by joedow
Modified:
4 years ago
Reviewers:
Sergey Ulanov
CC:
chromium-reviews, chromoting-reviews_chromium.org, Sam McNally
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fixing CRD curtain mode connection failures on Win8+ official builds I've root caused this and the problem was introduced in this CL: https://codereview.chromium.org/2446053002 That CL moved the logic which reported the worker process launch from the IPC Channel Connected method to an IO completion port listener. This works fine on un-official builds, however it breaks on official builds. The reason for the failure is that the remoting_desktop process on official builds are signed and include 'UiAccess' in their manifest. When the launcher process uses ShellExecuteEx to launch the worker process in this scenario, we actually see two processes get launched sequentially. The first starts and exists with error code 'STATUS_ELEVATION_REQUIRED' and the second launches with the correct permissions. This behavior worked fine before as we listened for the connection to the IPC channel which was done by the second, successful process launch. With the new code, we observed the first process launch, set up the Mojo channel for it, and tried waiting on its process handle which exits immediately. The second process then starts and fails to connect to the Mojo channel. I investigated whether UiAccess is truly required for the desktop binary and I think that it is. For the Ctrl+Alt+Del scenario, there are registry keys that can be set which will require that flag. For Alt+Tab, it is possible that some windows might not be accessible if they have a high high enough integrity level (+ UiAccess themselves). So instead of removing the UiAccess flag, my approach is to listen for the worker process creation and exit events. I store the value of the last seen worker process id and use that in our process launch detection code once the launcher process exits. This allows both un-official builds (which do not require the extra permissions hop) and official builds will work consistently. BUG=666992 Committed: https://crrev.com/1cdb04810de9689ba0ea5ab7e70bd35ce5477063 Cr-Commit-Position: refs/heads/master@{#438077}

Patch Set 1 #

Total comments: 4

Patch Set 2 : Addressing CR Feedback #

Unified diffs Side-by-side diffs Delta from patch set Stats (+52 lines, -15 lines) Patch
M remoting/host/desktop_session_win.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M remoting/host/win/BUILD.gn View 1 chunk +1 line, -1 line 0 comments Download
M remoting/host/win/wts_session_process_delegate.cc View 1 7 chunks +49 lines, -12 lines 0 comments Download

Messages

Total messages: 19 (13 generated)
joedow
PTAL! Thanks, Joe
4 years ago (2016-12-12 23:40:48 UTC) #4
Sergey Ulanov
lgtm https://codereview.chromium.org/2568983004/diff/1/remoting/host/win/wts_session_process_delegate.cc File remoting/host/win/wts_session_process_delegate.cc (right): https://codereview.chromium.org/2568983004/diff/1/remoting/host/win/wts_session_process_delegate.cc#newcode314 remoting/host/win/wts_session_process_delegate.cc:314: static_cast<base::ProcessId>(reinterpret_cast<uintptr_t>(context)); nit: move this above the switch statement ...
4 years ago (2016-12-13 01:10:37 UTC) #7
joedow
Thanks! https://codereview.chromium.org/2568983004/diff/1/remoting/host/win/wts_session_process_delegate.cc File remoting/host/win/wts_session_process_delegate.cc (right): https://codereview.chromium.org/2568983004/diff/1/remoting/host/win/wts_session_process_delegate.cc#newcode314 remoting/host/win/wts_session_process_delegate.cc:314: static_cast<base::ProcessId>(reinterpret_cast<uintptr_t>(context)); On 2016/12/13 01:10:37, Sergey Ulanov wrote: > ...
4 years ago (2016-12-13 03:52:42 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2568983004/20001
4 years ago (2016-12-13 05:49:38 UTC) #14
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years ago (2016-12-13 06:11:46 UTC) #17
commit-bot: I haz the power
4 years ago (2016-12-13 06:14:44 UTC) #19
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/1cdb04810de9689ba0ea5ab7e70bd35ce5477063
Cr-Commit-Position: refs/heads/master@{#438077}

Powered by Google App Engine
This is Rietveld 408576698