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

Issue 98603007: Launches a privileged utility process. (Closed)

Created:
7 years ago by Drew Haven
Modified:
6 years, 10 months ago
CC:
chromium-reviews, joi+watch-content_chromium.org, darin-cc_chromium.org, erikwright+watch_chromium.org, jam, stephenlin1, rsesek+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

Creates a way to launch the utility process with elevated privileges on Windows systems for the rare operations that require administrator access. IPCs to the utility process will be filtered when it is running elevated. BUG=331881 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=250409

Patch Set 1 #

Patch Set 2 : Actually works now. Removes unnecessary logging. #

Total comments: 3

Patch Set 3 : Moves elevation logic to a completely separate logic path. #

Patch Set 4 : Removes some unnecessary changes, adds some documentation. #

Patch Set 5 : Adds missing child_process_launcher files. #

Total comments: 18

Patch Set 6 : A bit of cleanup. #

Patch Set 7 : Added message filtering. #

Patch Set 8 : Mostly test cleanup. #

Total comments: 45

Patch Set 9 : Cleans up edge cases and error handling. Fixes nits. #

Total comments: 4

Patch Set 10 : Adds launch failure notification chains. #

Patch Set 11 : Cleans up formatting and removes some unnecessary functions. Adds an additional non-elevated white… #

Total comments: 6

Patch Set 12 : Cleans up ChildProcessLauncher implementations. #

Total comments: 18

Patch Set 13 : Resolves review feedback. #

Total comments: 6

Patch Set 14 : Removes unnecessary casts, extra tests and cleans up launch.cc #

Total comments: 5

Patch Set 15 : Moves whitelist to a new file, adds new OWNERS reviewers for that file. Also fixes ordering of met… #

Total comments: 14

Patch Set 16 : Adds OWNERS file and fixes nits. #

Patch Set 17 : Resync #

Patch Set 18 : Updates calls to BrowserChildProcessHost::Launch from NaCl code. #

Patch Set 19 : Makes content switches available in ChromeContentUtilityClient to non-windows builds. #

Patch Set 20 : Adds the elevation flag to the utility process. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+224 lines, -17 lines) Patch
M base/process/launch.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +10 lines, -0 lines 0 comments Download
M base/process/launch_win.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 2 chunks +36 lines, -0 lines 0 comments Download
M chrome/chrome.gyp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/service/service_utility_process_host.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +1 line, -0 lines 0 comments Download
M chrome/service/service_utility_process_host.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +4 lines, -0 lines 0 comments Download
A chrome/utility/OWNERS View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +13 lines, -0 lines 0 comments Download
M chrome/utility/chrome_content_utility_client.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +5 lines, -0 lines 0 comments Download
M chrome/utility/chrome_content_utility_client.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 5 chunks +16 lines, -2 lines 0 comments Download
A chrome/utility/chrome_content_utility_ipc_whitelist.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +21 lines, -0 lines 0 comments Download
A chrome/utility/chrome_content_utility_ipc_whitelist.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +12 lines, -0 lines 0 comments Download
M components/nacl/browser/nacl_broker_host_win.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +3 lines, -1 line 0 comments Download
M components/nacl/browser/nacl_process_host.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/browser_child_process_host_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 3 chunks +9 lines, -10 lines 0 comments Download
M content/browser/browser_child_process_host_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 3 chunks +7 lines, -0 lines 0 comments Download
M content/browser/child_process_launcher.h View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +3 lines, -0 lines 0 comments Download
M content/browser/child_process_launcher.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 7 chunks +19 lines, -3 lines 0 comments Download
M content/browser/gpu/gpu_process_host.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/plugin_process_host.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/ppapi_plugin_process_host.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/renderer_host/render_process_host_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/utility_process_host_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 3 chunks +9 lines, -0 lines 0 comments Download
M content/browser/utility_process_host_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 5 chunks +24 lines, -0 lines 0 comments Download
M content/browser/worker_host/worker_process_host.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +1 line, -0 lines 0 comments Download
M content/common/child_process_host_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +3 lines, -1 line 0 comments Download
M content/public/browser/browser_child_process_host.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +1 line, -0 lines 0 comments Download
M content/public/browser/browser_child_process_host_delegate.h View 1 2 3 4 5 6 7 8 9 1 chunk +4 lines, -0 lines 0 comments Download
M content/public/browser/utility_process_host.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +5 lines, -0 lines 0 comments Download
M content/public/browser/utility_process_host_client.h View 1 2 3 4 5 6 7 8 9 1 chunk +3 lines, -0 lines 0 comments Download
M content/public/common/child_process_host_delegate.h View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +5 lines, -0 lines 0 comments Download
M content/public/common/content_switches.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +1 line, -0 lines 0 comments Download
M content/public/common/content_switches.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 38 (0 generated)
mef
Looks pretty good! https://codereview.chromium.org/98603007/diff/20001/base/process/launch_win.cc File base/process/launch_win.cc (right): https://codereview.chromium.org/98603007/diff/20001/base/process/launch_win.cc#newcode148 base/process/launch_win.cc:148: shex_info.hwnd = NULL; We may have ...
7 years ago (2013-12-10 15:25:18 UTC) #1
mef
Hi Drew, I'm just curious about your plans in regards to this CL. I'm very ...
7 years ago (2013-12-18 21:02:10 UTC) #2
Drew Haven
My plan right now is that I'm finishing up some ChromeOS and platform-agnostic stuff for ...
7 years ago (2013-12-18 21:38:40 UTC) #3
Drew Haven
Alright, I addressed some comments and did some clean up. I also integrated the message ...
6 years, 11 months ago (2014-01-09 01:15:13 UTC) #4
mef
https://codereview.chromium.org/98603007/diff/140001/base/process/launch.h File base/process/launch.h (right): https://codereview.chromium.org/98603007/diff/140001/base/process/launch.h#newcode224 base/process/launch.h:224: // option that is supported from LaunchOptions is start_hidden. ...
6 years, 11 months ago (2014-01-10 18:22:54 UTC) #5
Drew Haven
There are still a few things I need to work on around UAC cancelling and ...
6 years, 11 months ago (2014-01-16 02:52:04 UTC) #6
mef
Drew, thanks! I am very excited to see it coming together. Did you actually upload ...
6 years, 11 months ago (2014-01-16 16:22:31 UTC) #7
Drew Haven
Oops, I did forget to finish the upload. It's up now. On 2014/01/16 16:22:31, mef ...
6 years, 11 months ago (2014-01-16 20:13:44 UTC) #8
mef
Looks pretty good to me. I can't wait to try it out. https://codereview.chromium.org/98603007/diff/300001/content/browser/child_process_launcher.h File content/browser/child_process_launcher.h ...
6 years, 11 months ago (2014-01-17 16:57:06 UTC) #9
Drew Haven
Alright, things are starting to look good. I'm going to start looping in some security ...
6 years, 11 months ago (2014-01-22 23:14:24 UTC) #10
mef
On 2014/01/22 23:14:24, Drew Haven wrote: > Alright, things are starting to look good. I'm ...
6 years, 11 months ago (2014-01-23 16:08:45 UTC) #11
jam
some initial comments based on a quick look https://codereview.chromium.org/98603007/diff/600001/chrome/service/service_utility_process_host.cc File chrome/service/service_utility_process_host.cc (right): https://codereview.chromium.org/98603007/diff/600001/chrome/service/service_utility_process_host.cc#newcode210 chrome/service/service_utility_process_host.cc:210: return ...
6 years, 11 months ago (2014-01-24 22:14:02 UTC) #12
Drew Haven
https://codereview.chromium.org/98603007/diff/600001/chrome/service/service_utility_process_host.cc File chrome/service/service_utility_process_host.cc (right): https://codereview.chromium.org/98603007/diff/600001/chrome/service/service_utility_process_host.cc#newcode210 chrome/service/service_utility_process_host.cc:210: return handle_; On 2014/01/24 22:14:03, jam wrote: > I ...
6 years, 11 months ago (2014-01-27 21:43:51 UTC) #13
jam
https://codereview.chromium.org/98603007/diff/600001/chrome/service/service_utility_process_host.cc File chrome/service/service_utility_process_host.cc (right): https://codereview.chromium.org/98603007/diff/600001/chrome/service/service_utility_process_host.cc#newcode210 chrome/service/service_utility_process_host.cc:210: return handle_; On 2014/01/27 21:43:51, Drew Haven wrote: > ...
6 years, 11 months ago (2014-01-27 21:55:44 UTC) #14
Drew Haven
On 2014/01/27 21:55:44, jam wrote: > https://codereview.chromium.org/98603007/diff/600001/chrome/service/service_utility_process_host.cc > File chrome/service/service_utility_process_host.cc (right): > > https://codereview.chromium.org/98603007/diff/600001/chrome/service/service_utility_process_host.cc#newcode210 > ...
6 years, 10 months ago (2014-01-29 01:07:48 UTC) #15
jam
apologies for the delay, I just saw this. in the future please feel free to ...
6 years, 10 months ago (2014-01-30 21:41:02 UTC) #16
Drew Haven
Alright, I think I got all the sync issues fixed and resolved feedback. One or ...
6 years, 10 months ago (2014-01-31 20:00:11 UTC) #17
jam
https://codereview.chromium.org/98603007/diff/760001/chrome/utility/chrome_content_utility_client.h File chrome/utility/chrome_content_utility_client.h (right): https://codereview.chromium.org/98603007/diff/760001/chrome/utility/chrome_content_utility_client.h#newcode45 chrome/utility/chrome_content_utility_client.h:45: void AddHandler(UtilityMessageHandler* handler); On 2014/01/31 20:00:12, Drew Haven wrote: ...
6 years, 10 months ago (2014-02-01 01:09:10 UTC) #18
Jorge Lucangeli Obes
What will be needed in the future to whitelist a message? If it's a code ...
6 years, 10 months ago (2014-02-03 22:14:57 UTC) #19
Robert Sesek
(not adding myself as a reviewer, just observed this since I watch base/process) https://codereview.chromium.org/98603007/diff/840001/base/process/launch.h File ...
6 years, 10 months ago (2014-02-03 22:30:21 UTC) #20
Drew Haven
Alright, I removed those other tests that weren't really testing much and cleaned a few ...
6 years, 10 months ago (2014-02-04 21:25:54 UTC) #21
jam
lgtm https://codereview.chromium.org/98603007/diff/1030001/chrome/utility/chrome_content_utility_client.cc File chrome/utility/chrome_content_utility_client.cc (right): https://codereview.chromium.org/98603007/diff/1030001/chrome/utility/chrome_content_utility_client.cc#newcode73 chrome/utility/chrome_content_utility_client.cc:73: static const size_t kMessageWhitelistSize = arraysize(kMessageWhitelist); since you ...
6 years, 10 months ago (2014-02-04 23:29:06 UTC) #22
Jorge Lucangeli Obes
https://codereview.chromium.org/98603007/diff/1030001/chrome/utility/chrome_content_utility_client.cc File chrome/utility/chrome_content_utility_client.cc (right): https://codereview.chromium.org/98603007/diff/1030001/chrome/utility/chrome_content_utility_client.cc#newcode73 chrome/utility/chrome_content_utility_client.cc:73: static const size_t kMessageWhitelistSize = arraysize(kMessageWhitelist); On 2014/02/04 23:29:06, ...
6 years, 10 months ago (2014-02-05 00:15:55 UTC) #23
Drew Haven
I'm looking for someone to LGTM the changes to base/process. Otherwise things are looking good ...
6 years, 10 months ago (2014-02-05 02:36:30 UTC) #24
Nico
lgtm, but please expand the CL description so that someone who's not familiar with this ...
6 years, 10 months ago (2014-02-05 05:38:10 UTC) #25
mef
lgtm https://codereview.chromium.org/98603007/diff/1110001/base/process/launch.h File base/process/launch.h (right): https://codereview.chromium.org/98603007/diff/1110001/base/process/launch.h#newcode157 base/process/launch.h:157: BASE_EXPORT bool LaunchElevatedProcess(const CommandLine& cmdline, nit: Currently only ...
6 years, 10 months ago (2014-02-05 16:28:14 UTC) #26
Jorge Lucangeli Obes
not lgtm. did you forget to git add the OWNERS file? I don't see it ...
6 years, 10 months ago (2014-02-05 16:58:22 UTC) #27
Robert Sesek
https://codereview.chromium.org/98603007/diff/1110001/base/process/launch.h File base/process/launch.h (left): https://codereview.chromium.org/98603007/diff/1110001/base/process/launch.h#oldcode217 base/process/launch.h:217: nit: please restore/diff noise
6 years, 10 months ago (2014-02-05 17:11:49 UTC) #28
Drew Haven
Yep, I forgot to add the OWNERS file. jorgelo: can you double-check that OWNERS file? ...
6 years, 10 months ago (2014-02-05 20:13:20 UTC) #29
Drew Haven
Oops, uploaded a bad patchset. I'll replace it but it has a "std::string16" instead of ...
6 years, 10 months ago (2014-02-05 20:14:52 UTC) #30
Drew Haven
On 2014/02/05 20:14:52, Drew Haven wrote: > Oops, uploaded a bad patchset. I'll replace it ...
6 years, 10 months ago (2014-02-05 20:22:17 UTC) #31
cpu_(ooo_6.6-7.5)
lgtm
6 years, 10 months ago (2014-02-05 21:08:44 UTC) #32
Jorge Lucangeli Obes
On 2014/02/05 21:08:44, cpu wrote: > lgtm lgtm
6 years, 10 months ago (2014-02-05 23:14:49 UTC) #33
Drew Haven
jvoung, I added a flag to BrowserChildProcessHost::Launch on Windows to launch a process with elevated ...
6 years, 10 months ago (2014-02-08 19:29:53 UTC) #34
jvoung (off chromium)
lgtm
6 years, 10 months ago (2014-02-10 15:00:42 UTC) #35
Drew Haven
The CQ bit was checked by haven@chromium.org
6 years, 10 months ago (2014-02-11 08:27:07 UTC) #36
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/haven@chromium.org/98603007/1790001
6 years, 10 months ago (2014-02-11 08:27:28 UTC) #37
commit-bot: I haz the power
6 years, 10 months ago (2014-02-11 14:45:39 UTC) #38
Message was sent while issue was closed.
Change committed as 250409

Powered by Google App Engine
This is Rietveld 408576698