Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(333)

Side by Side Diff: sandbox/win/src/nt_internals.h

Issue 10907217: Revert 156550 - Add sandbox support for Windows process mitigations (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « sandbox/win/src/dep_test.cc ('k') | sandbox/win/src/process_mitigations.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2010 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 // This file holds definitions related to the ntdll API. 5 // This file holds definitions related to the ntdll API.
6 6
7 #ifndef SANDBOX_WIN_SRC_NT_INTERNALS_H__ 7 #ifndef SANDBOX_SRC_NT_INTERNALS_H__
8 #define SANDBOX_WIN_SRC_NT_INTERNALS_H__ 8 #define SANDBOX_SRC_NT_INTERNALS_H__
9 9
10 #include <windows.h> 10 #include <windows.h>
11 11
12 typedef LONG NTSTATUS; 12 typedef LONG NTSTATUS;
13 #define NT_SUCCESS(st) (st >= 0) 13 #define NT_SUCCESS(st) (st >= 0)
14 14
15 #define STATUS_SUCCESS ((NTSTATUS)0x00000000L) 15 #define STATUS_SUCCESS ((NTSTATUS)0x00000000L)
16 #define STATUS_BUFFER_OVERFLOW ((NTSTATUS)0x80000005L) 16 #define STATUS_BUFFER_OVERFLOW ((NTSTATUS)0x80000005L)
17 #define STATUS_UNSUCCESSFUL ((NTSTATUS)0xC0000001L) 17 #define STATUS_UNSUCCESSFUL ((NTSTATUS)0xC0000001L)
18 #define STATUS_NOT_IMPLEMENTED ((NTSTATUS)0xC0000002L) 18 #define STATUS_NOT_IMPLEMENTED ((NTSTATUS)0xC0000002L)
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 } NT_THREAD_INFORMATION_CLASS, *PNT_THREAD_INFORMATION_CLASS; 285 } NT_THREAD_INFORMATION_CLASS, *PNT_THREAD_INFORMATION_CLASS;
286 286
287 typedef NTSTATUS (WINAPI *NtSetInformationThreadFunction) ( 287 typedef NTSTATUS (WINAPI *NtSetInformationThreadFunction) (
288 IN HANDLE ThreadHandle, 288 IN HANDLE ThreadHandle,
289 IN NT_THREAD_INFORMATION_CLASS ThreadInformationClass, 289 IN NT_THREAD_INFORMATION_CLASS ThreadInformationClass,
290 IN PVOID ThreadInformation, 290 IN PVOID ThreadInformation,
291 IN ULONG ThreadInformationLength); 291 IN ULONG ThreadInformationLength);
292 292
293 // Partial definition only: 293 // Partial definition only:
294 typedef enum _PROCESSINFOCLASS { 294 typedef enum _PROCESSINFOCLASS {
295 ProcessBasicInformation = 0, 295 ProcessBasicInformation = 0
296 ProcessExecuteFlags = 0x22
297 } PROCESSINFOCLASS; 296 } PROCESSINFOCLASS;
298 297
299 typedef PVOID PPEB; 298 typedef PVOID PPEB;
300 typedef PVOID KPRIORITY; 299 typedef PVOID KPRIORITY;
301 300
302 typedef struct _PROCESS_BASIC_INFORMATION { 301 typedef struct _PROCESS_BASIC_INFORMATION {
303 NTSTATUS ExitStatus; 302 NTSTATUS ExitStatus;
304 PPEB PebBaseAddress; 303 PPEB PebBaseAddress;
305 KAFFINITY AffinityMask; 304 KAFFINITY AffinityMask;
306 KPRIORITY BasePriority; 305 KPRIORITY BasePriority;
307 ULONG UniqueProcessId; 306 ULONG UniqueProcessId;
308 ULONG InheritedFromUniqueProcessId; 307 ULONG InheritedFromUniqueProcessId;
309 } PROCESS_BASIC_INFORMATION, *PPROCESS_BASIC_INFORMATION; 308 } PROCESS_BASIC_INFORMATION, *PPROCESS_BASIC_INFORMATION;
310 309
311 typedef NTSTATUS (WINAPI *NtQueryInformationProcessFunction)( 310 typedef NTSTATUS (WINAPI *NtQueryInformationProcessFunction)(
312 IN HANDLE ProcessHandle, 311 IN HANDLE ProcessHandle,
313 IN PROCESSINFOCLASS ProcessInformationClass, 312 IN PROCESSINFOCLASS ProcessInformationClass,
314 OUT PVOID ProcessInformation, 313 OUT PVOID ProcessInformation,
315 IN ULONG ProcessInformationLength, 314 IN ULONG ProcessInformationLength,
316 OUT PULONG ReturnLength OPTIONAL); 315 OUT PULONG ReturnLength OPTIONAL);
317 316
318 typedef NTSTATUS (WINAPI *NtSetInformationProcessFunction)(
319 HANDLE ProcessHandle,
320 IN PROCESSINFOCLASS ProcessInformationClass,
321 IN PVOID ProcessInformation,
322 IN ULONG ProcessInformationLength);
323
324 typedef NTSTATUS (WINAPI *NtOpenThreadTokenFunction) ( 317 typedef NTSTATUS (WINAPI *NtOpenThreadTokenFunction) (
325 IN HANDLE ThreadHandle, 318 IN HANDLE ThreadHandle,
326 IN ACCESS_MASK DesiredAccess, 319 IN ACCESS_MASK DesiredAccess,
327 IN BOOLEAN OpenAsSelf, 320 IN BOOLEAN OpenAsSelf,
328 OUT PHANDLE TokenHandle); 321 OUT PHANDLE TokenHandle);
329 322
330 typedef NTSTATUS (WINAPI *NtOpenThreadTokenExFunction) ( 323 typedef NTSTATUS (WINAPI *NtOpenThreadTokenExFunction) (
331 IN HANDLE ThreadHandle, 324 IN HANDLE ThreadHandle,
332 IN ACCESS_MASK DesiredAccess, 325 IN ACCESS_MASK DesiredAccess,
333 IN BOOLEAN OpenAsSelf, 326 IN BOOLEAN OpenAsSelf,
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
608 601
609 typedef LONG (WINAPI *RtlCompareUnicodeStringFunction)( 602 typedef LONG (WINAPI *RtlCompareUnicodeStringFunction)(
610 IN PCUNICODE_STRING String1, 603 IN PCUNICODE_STRING String1,
611 IN PCUNICODE_STRING String2, 604 IN PCUNICODE_STRING String2,
612 IN BOOLEAN CaseInSensitive); 605 IN BOOLEAN CaseInSensitive);
613 606
614 typedef VOID (WINAPI *RtlInitUnicodeStringFunction) ( 607 typedef VOID (WINAPI *RtlInitUnicodeStringFunction) (
615 IN OUT PUNICODE_STRING DestinationString, 608 IN OUT PUNICODE_STRING DestinationString,
616 IN PCWSTR SourceString); 609 IN PCWSTR SourceString);
617 610
618 #endif // SANDBOX_WIN_SRC_NT_INTERNALS_H__ 611 #endif // SANDBOX_SRC_NT_INTERNALS_H__
619
OLDNEW
« no previous file with comments | « sandbox/win/src/dep_test.cc ('k') | sandbox/win/src/process_mitigations.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698