OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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/src/restricted_token.h" | 5 #include "sandbox/win/src/restricted_token.h" |
6 #include "sandbox/src/restricted_token_utils.h" | 6 #include "sandbox/win/src/restricted_token_utils.h" |
7 #include "sandbox/tools/finder/finder.h" | 7 #include "sandbox/win/tools/finder/finder.h" |
8 #include "sandbox/tools/finder/ntundoc.h" | 8 #include "sandbox/win/tools/finder/ntundoc.h" |
9 | 9 |
10 #define BUFFER_SIZE 0x800 | 10 #define BUFFER_SIZE 0x800 |
11 #define CHECKPTR(x) if (!x) return ::GetLastError() | 11 #define CHECKPTR(x) if (!x) return ::GetLastError() |
12 | 12 |
13 // NT API | 13 // NT API |
14 NTQUERYDIRECTORYOBJECT NtQueryDirectoryObject; | 14 NTQUERYDIRECTORYOBJECT NtQueryDirectoryObject; |
15 NTOPENDIRECTORYOBJECT NtOpenDirectoryObject; | 15 NTOPENDIRECTORYOBJECT NtOpenDirectoryObject; |
16 NTOPENEVENT NtOpenEvent; | 16 NTOPENEVENT NtOpenEvent; |
17 NTOPENJOBOBJECT NtOpenJobObject; | 17 NTOPENJOBOBJECT NtOpenJobObject; |
18 NTOPENKEYEDEVENT NtOpenKeyedEvent; | 18 NTOPENKEYEDEVENT NtOpenKeyedEvent; |
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
239 else if (type == L"SymbolicLink") func = NtOpenSymbolicLinkObject; | 239 else if (type == L"SymbolicLink") func = NtOpenSymbolicLinkObject; |
240 else if (type == L"Directory") func = NtOpenDirectoryObject; | 240 else if (type == L"Directory") func = NtOpenDirectoryObject; |
241 | 241 |
242 if (func) { | 242 if (func) { |
243 *func_to_call = func; | 243 *func_to_call = func; |
244 return true; | 244 return true; |
245 } | 245 } |
246 | 246 |
247 return false; | 247 return false; |
248 } | 248 } |
OLD | NEW |