diff options
author | jschuh@chromium.org <jschuh@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-02-12 17:39:42 +0000 |
---|---|---|
committer | jschuh@chromium.org <jschuh@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-02-12 17:39:42 +0000 |
commit | 8decaf56e746307c5758cd6d5c93e22081922adf (patch) | |
tree | a6b827d295034d7b5c09a776b1109c30862105a4 /sandbox | |
parent | f37d7a06dfde6258c3726e6172c8bb4029cdad10 (diff) | |
download | chromium_src-8decaf56e746307c5758cd6d5c93e22081922adf.zip chromium_src-8decaf56e746307c5758cd6d5c93e22081922adf.tar.gz chromium_src-8decaf56e746307c5758cd6d5c93e22081922adf.tar.bz2 |
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
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@250744 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'sandbox')
-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, 2 insertions, 5 deletions
diff --git a/sandbox/win/src/handle_dispatcher.cc b/sandbox/win/src/handle_dispatcher.cc index 26b8fc3..893f102 100644 --- a/sandbox/win/src/handle_dispatcher.cc +++ b/sandbox/win/src/handle_dispatcher.cc @@ -78,8 +78,7 @@ bool HandleDispatcher::DuplicateHandleProxy(IPCInfo* ipc, EvalResult eval = policy_base_->EvalPolicy(IPC_DUPLICATEHANDLEPROXY_TAG, params.GetBase()); ipc->return_info.win32_result = - HandlePolicy::DuplicateHandleProxyAction(eval, *ipc->client_info, - source_handle, + HandlePolicy::DuplicateHandleProxyAction(eval, 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 718376e..f5f1c27 100644 --- a/sandbox/win/src/handle_policy.cc +++ b/sandbox/win/src/handle_policy.cc @@ -52,7 +52,6 @@ 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, @@ -81,7 +80,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(client_info.process, source_handle, target_process, + if (!::DuplicateHandle(::GetCurrentProcess(), 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 d91a039..ffe54b8 100644 --- a/sandbox/win/src/handle_policy.h +++ b/sandbox/win/src/handle_policy.h @@ -27,7 +27,6 @@ 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, |