OLD | NEW |
---|---|
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/win_utils.h" | 5 #include "sandbox/win/src/win_utils.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <map> | 9 #include <map> |
10 | 10 |
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
191 error != ERROR_PATH_NOT_FOUND && | 191 error != ERROR_PATH_NOT_FOUND && |
192 error != ERROR_INVALID_NAME) { | 192 error != ERROR_INVALID_NAME) { |
193 // Unexpected error. | 193 // Unexpected error. |
194 if (passed_once && added_implied_device && | 194 if (passed_once && added_implied_device && |
195 (path.rfind(L'\\') == kNTDotPrefixLen - 1)) { | 195 (path.rfind(L'\\') == kNTDotPrefixLen - 1)) { |
196 break; | 196 break; |
197 } | 197 } |
198 NOTREACHED_NT(); | 198 NOTREACHED_NT(); |
199 return error; | 199 return error; |
200 } | 200 } |
201 } else if (FILE_ATTRIBUTE_REPARSE_POINT & attributes) { | 201 }/* else if (FILE_ATTRIBUTE_REPARSE_POINT & attributes) { |
202 // This is a reparse point. | 202 // This is a reparse point. |
203 return ERROR_SUCCESS; | 203 return ERROR_SUCCESS; |
204 } | 204 }*/ |
kylix_rd
2016/03/17 23:49:31
According to this: https://bugs.chromium.org/p/pro
Will Harris
2016/03/18 05:17:04
I think we should leave this check in.
jschuh
2016/03/18 07:03:23
kylix_rd - Sorry, I should have paid closer atten
kylix_rd
2016/03/18 14:08:53
Ok, that makes sense.
Something to think about; W
| |
205 | 205 |
206 passed_once = true; | 206 passed_once = true; |
207 last_pos = path.rfind(L'\\'); | 207 last_pos = path.rfind(L'\\'); |
208 } while (last_pos > 2); // Skip root dir. | 208 } while (last_pos > 2); // Skip root dir. |
209 | 209 |
210 return ERROR_NOT_A_REPARSE_POINT; | 210 return ERROR_NOT_A_REPARSE_POINT; |
211 } | 211 } |
212 | 212 |
213 // We get a |full_path| of the forms accepted by IsReparsePoint(), and the name | 213 // We get a |full_path| of the forms accepted by IsReparsePoint(), and the name |
214 // we'll get from |handle| will be \device\harddiskvolume1\some\foo\bar. | 214 // we'll get from |handle| will be \device\harddiskvolume1\some\foo\bar. |
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
419 ::InterlockedCompareExchangePointer( | 419 ::InterlockedCompareExchangePointer( |
420 reinterpret_cast<PVOID volatile*>(&ntdll), ntdll_local, NULL); | 420 reinterpret_cast<PVOID volatile*>(&ntdll), ntdll_local, NULL); |
421 | 421 |
422 } | 422 } |
423 | 423 |
424 CHECK_NT(ntdll); | 424 CHECK_NT(ntdll); |
425 FARPROC* function_ptr = reinterpret_cast<FARPROC*>(ptr); | 425 FARPROC* function_ptr = reinterpret_cast<FARPROC*>(ptr); |
426 *function_ptr = ::GetProcAddress(ntdll, name); | 426 *function_ptr = ::GetProcAddress(ntdll, name); |
427 CHECK_NT(*function_ptr); | 427 CHECK_NT(*function_ptr); |
428 } | 428 } |
OLD | NEW |