OLD | NEW |
---|---|
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "sandbox/win/src/sync_dispatcher.h" | 5 #include "sandbox/win/src/sync_dispatcher.h" |
6 | 6 |
7 #include "base/win/windows_version.h" | 7 #include "base/win/windows_version.h" |
8 #include "sandbox/win/src/crosscall_client.h" | 8 #include "sandbox/win/src/crosscall_client.h" |
9 #include "sandbox/win/src/interception.h" | 9 #include "sandbox/win/src/interception.h" |
10 #include "sandbox/win/src/interceptors.h" | 10 #include "sandbox/win/src/interceptors.h" |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
45 | 45 |
46 bool SyncDispatcher::CreateEvent(IPCInfo* ipc, base::string16* name, | 46 bool SyncDispatcher::CreateEvent(IPCInfo* ipc, base::string16* name, |
47 DWORD event_type, DWORD initial_state) { | 47 DWORD event_type, DWORD initial_state) { |
48 const wchar_t* event_name = name->c_str(); | 48 const wchar_t* event_name = name->c_str(); |
49 CountedParameterSet<NameBased> params; | 49 CountedParameterSet<NameBased> params; |
50 params[NameBased::NAME] = ParamPickerMake(event_name); | 50 params[NameBased::NAME] = ParamPickerMake(event_name); |
51 | 51 |
52 EvalResult result = policy_base_->EvalPolicy(IPC_CREATEEVENT_TAG, | 52 EvalResult result = policy_base_->EvalPolicy(IPC_CREATEEVENT_TAG, |
53 params.GetBase()); | 53 params.GetBase()); |
54 HANDLE handle = NULL; | 54 HANDLE handle = NULL; |
55 DWORD ret = SyncPolicy::CreateEventAction(result, *ipc->client_info, *name, | |
56 event_type, initial_state, | |
57 &handle); | |
58 // Return operation status on the IPC. | 55 // Return operation status on the IPC. |
59 ipc->return_info.nt_status = ret; | 56 ipc->return_info.nt_status = SyncPolicy::CreateEventAction( |
57 result, *ipc->client_info, *name, event_type, initial_state, &handle); | |
cpu_(ooo_6.6-7.5)
2014/07/10 00:49:34
don't you need 4 spaces before result?
Peter Kasting
2014/07/10 01:19:31
Yes. Oops.
| |
60 ipc->return_info.handle = handle; | 58 ipc->return_info.handle = handle; |
61 return true; | 59 return true; |
62 } | 60 } |
63 | 61 |
64 bool SyncDispatcher::OpenEvent(IPCInfo* ipc, base::string16* name, | 62 bool SyncDispatcher::OpenEvent(IPCInfo* ipc, base::string16* name, |
65 DWORD desired_access) { | 63 DWORD desired_access) { |
66 const wchar_t* event_name = name->c_str(); | 64 const wchar_t* event_name = name->c_str(); |
67 | 65 |
68 CountedParameterSet<OpenEventParams> params; | 66 CountedParameterSet<OpenEventParams> params; |
69 params[OpenEventParams::NAME] = ParamPickerMake(event_name); | 67 params[OpenEventParams::NAME] = ParamPickerMake(event_name); |
70 params[OpenEventParams::ACCESS] = ParamPickerMake(desired_access); | 68 params[OpenEventParams::ACCESS] = ParamPickerMake(desired_access); |
71 | 69 |
72 EvalResult result = policy_base_->EvalPolicy(IPC_OPENEVENT_TAG, | 70 EvalResult result = policy_base_->EvalPolicy(IPC_OPENEVENT_TAG, |
73 params.GetBase()); | 71 params.GetBase()); |
74 HANDLE handle = NULL; | 72 HANDLE handle = NULL; |
75 DWORD ret = SyncPolicy::OpenEventAction(result, *ipc->client_info, *name, | |
76 desired_access, &handle); | |
77 // Return operation status on the IPC. | 73 // Return operation status on the IPC. |
78 ipc->return_info.win32_result = ret; | 74 ipc->return_info.nt_status = SyncPolicy::OpenEventAction( |
75 result, *ipc->client_info, *name, desired_access, &handle); | |
79 ipc->return_info.handle = handle; | 76 ipc->return_info.handle = handle; |
80 return true; | 77 return true; |
81 } | 78 } |
82 | 79 |
83 } // namespace sandbox | 80 } // namespace sandbox |
OLD | NEW |