diff options
author | sergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-02-12 19:53:22 +0000 |
---|---|---|
committer | sergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-02-12 19:53:22 +0000 |
commit | f7670318d01f066b46dd199e11e18b4d13428b01 (patch) | |
tree | de8bb5f2aa8c4bbd3362221c309c76bb38218fe8 | |
parent | 55525ed26f1783d4ba392b39693f5b1e8d19768e (diff) | |
download | chromium_src-f7670318d01f066b46dd199e11e18b4d13428b01.zip chromium_src-f7670318d01f066b46dd199e11e18b4d13428b01.tar.gz chromium_src-f7670318d01f066b46dd199e11e18b4d13428b01.tar.bz2 |
Revert 250744 "Use the same handle for checking and duplicating ..."
Broke PPAPIBrokerInfoBarTest.Allowed test:
http://build.chromium.org/p/chromium.win/builders/Win7%20Tests%20%28dbg%29%284%29/builds/24866/steps/browser_tests/logs/Allowed
> Use the same handle for checking and duplicating in DuplicateHandleProxy
>
> BUG=338524
> R=cpu@chromium.org
> NOTRY=true
>
> Review URL: https://codereview.chromium.org/136543008
TBR=jschuh@chromium.org
Review URL: https://codereview.chromium.org/160993002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@250777 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | sandbox/win/src/handle_dispatcher.cc | 3 | ||||
-rw-r--r-- | sandbox/win/src/handle_policy.cc | 3 | ||||
-rw-r--r-- | sandbox/win/src/handle_policy.h | 1 |
3 files changed, 5 insertions, 2 deletions
diff --git a/sandbox/win/src/handle_dispatcher.cc b/sandbox/win/src/handle_dispatcher.cc index 893f102..26b8fc3 100644 --- a/sandbox/win/src/handle_dispatcher.cc +++ b/sandbox/win/src/handle_dispatcher.cc @@ -78,7 +78,8 @@ bool HandleDispatcher::DuplicateHandleProxy(IPCInfo* ipc, EvalResult eval = policy_base_->EvalPolicy(IPC_DUPLICATEHANDLEPROXY_TAG, params.GetBase()); ipc->return_info.win32_result = - HandlePolicy::DuplicateHandleProxyAction(eval, handle, + HandlePolicy::DuplicateHandleProxyAction(eval, *ipc->client_info, + source_handle, target_process_id, &ipc->return_info.handle, desired_access, options); diff --git a/sandbox/win/src/handle_policy.cc b/sandbox/win/src/handle_policy.cc index f5f1c27..718376e 100644 --- a/sandbox/win/src/handle_policy.cc +++ b/sandbox/win/src/handle_policy.cc @@ -52,6 +52,7 @@ bool HandlePolicy::GenerateRules(const wchar_t* type_name, } DWORD HandlePolicy::DuplicateHandleProxyAction(EvalResult eval_result, + const ClientInfo& client_info, HANDLE source_handle, DWORD target_process_id, HANDLE* target_handle, @@ -80,7 +81,7 @@ DWORD HandlePolicy::DuplicateHandleProxyAction(EvalResult eval_result, HANDLE target_process = remote_target_process.IsValid() ? remote_target_process.Get() : ::GetCurrentProcess(); DWORD result = ERROR_SUCCESS; - if (!::DuplicateHandle(::GetCurrentProcess(), source_handle, target_process, + if (!::DuplicateHandle(client_info.process, source_handle, target_process, target_handle, desired_access, FALSE, options)) { return ::GetLastError(); diff --git a/sandbox/win/src/handle_policy.h b/sandbox/win/src/handle_policy.h index ffe54b8..d91a039 100644 --- a/sandbox/win/src/handle_policy.h +++ b/sandbox/win/src/handle_policy.h @@ -27,6 +27,7 @@ class HandlePolicy { // Processes a 'TargetPolicy::DuplicateHandle()' request from the target. static DWORD DuplicateHandleProxyAction(EvalResult eval_result, + const ClientInfo& client_info, HANDLE source_handle, DWORD target_process_id, HANDLE* target_handle, |