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

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

Issue 1923653002: Wire up process launch error codes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix debug and clang Created 4 years, 7 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
« no previous file with comments | « sandbox/win/src/sandbox_policy_base.cc ('k') | sandbox/win/src/target_process.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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #ifndef SANDBOX_WIN_SRC_SANDBOX_TYPES_H_ 5 #ifndef SANDBOX_WIN_SRC_SANDBOX_TYPES_H_
6 #define SANDBOX_WIN_SRC_SANDBOX_TYPES_H_ 6 #define SANDBOX_WIN_SRC_SANDBOX_TYPES_H_
7 7
8 #include "base/process/launch.h"
9
8 namespace sandbox { 10 namespace sandbox {
9 11
10 // Operation result codes returned by the sandbox API. 12 // Operation result codes returned by the sandbox API.
11 enum ResultCode { 13 //
14 // Note: These codes are listed in a histogram and any new codes should be added
15 // at the end.
16 //
17 enum ResultCode : int {
12 SBOX_ALL_OK = 0, 18 SBOX_ALL_OK = 0,
13 // Error is originating on the win32 layer. Call GetlastError() for more 19 // Error is originating on the win32 layer. Call GetlastError() for more
14 // information. 20 // information.
15 SBOX_ERROR_GENERIC = 1, 21 SBOX_ERROR_GENERIC = 1,
16 // An invalid combination of parameters was given to the API. 22 // An invalid combination of parameters was given to the API.
17 SBOX_ERROR_BAD_PARAMS = 2, 23 SBOX_ERROR_BAD_PARAMS = 2,
18 // The desired operation is not supported at this time. 24 // The desired operation is not supported at this time.
19 SBOX_ERROR_UNSUPPORTED = 3, 25 SBOX_ERROR_UNSUPPORTED = 3,
20 // The request requires more memory that allocated or available. 26 // The request requires more memory that allocated or available.
21 SBOX_ERROR_NO_SPACE = 4, 27 SBOX_ERROR_NO_SPACE = 4,
(...skipping 18 matching lines...) Expand all
40 // The supplied AppContainer is not valid. 46 // The supplied AppContainer is not valid.
41 SBOX_ERROR_INVALID_APP_CONTAINER = 14, 47 SBOX_ERROR_INVALID_APP_CONTAINER = 14,
42 // The supplied capability is not valid. 48 // The supplied capability is not valid.
43 SBOX_ERROR_INVALID_CAPABILITY = 15, 49 SBOX_ERROR_INVALID_CAPABILITY = 15,
44 // There is a failure initializing the AppContainer. 50 // There is a failure initializing the AppContainer.
45 SBOX_ERROR_CANNOT_INIT_APPCONTAINER = 16, 51 SBOX_ERROR_CANNOT_INIT_APPCONTAINER = 16,
46 // Initializing or updating ProcThreadAttributes failed. 52 // Initializing or updating ProcThreadAttributes failed.
47 SBOX_ERROR_PROC_THREAD_ATTRIBUTES = 17, 53 SBOX_ERROR_PROC_THREAD_ATTRIBUTES = 17,
48 // Error in creating process. 54 // Error in creating process.
49 SBOX_ERROR_CREATE_PROCESS = 18, 55 SBOX_ERROR_CREATE_PROCESS = 18,
56 // Failure calling delegate PreSpawnTarget.
57 SBOX_ERROR_DELEGATE_PRE_SPAWN = 19,
58 // Could not assign process to job object.
59 SBOX_ERROR_ASSIGN_PROCESS_TO_JOB_OBJECT = 20,
60 // Could not assign process to job object.
61 SBOX_ERROR_SET_THREAD_TOKEN = 21,
62 // Could not get thread context of new process.
63 SBOX_ERROR_GET_THREAD_CONTEXT = 22,
64 // Could not duplicate target info of new process.
65 SBOX_ERROR_DUPLICATE_TARGET_INFO = 23,
66 // Could not set low box token.
67 SBOX_ERROR_SET_LOW_BOX_TOKEN = 24,
68 // Could not create file mapping for IPC dispatcher.
69 SBOX_ERROR_CREATE_FILE_MAPPING = 25,
70 // Could not duplicate shared section into target process for IPC dispatcher.
71 SBOX_ERROR_DUPLICATE_SHARED_SECTION = 26,
72 // Could not map view of shared memory in broker.
73 SBOX_ERROR_MAP_VIEW_OF_SHARED_SECTION = 27,
74 // Could not apply ASLR mitigations to target process.
75 SBOX_ERROR_APPLY_ASLR_MITIGATIONS = 28,
76 // Could not setup one of the required interception services.
77 SBOX_ERROR_SETUP_BASIC_INTERCEPTIONS = 29,
78 // Could not setup basic interceptions.
79 SBOX_ERROR_SETUP_INTERCEPTION_SERVICE = 30,
80 // Could not initialize interceptions. This usually means 3rd party software
81 // is stomping on our hooks, or can sometimes mean the syscall format has
82 // changed.
83 SBOX_ERROR_INITIALIZE_INTERCEPTIONS = 31,
84 // Could not setup the imports for ntdll in target process.
85 SBOX_ERROR_SETUP_NTDLL_IMPORTS = 32,
86 // Could not setup the handle closer in target process.
87 SBOX_ERROR_SETUP_HANDLE_CLOSER = 33,
50 // Placeholder for last item of the enum. 88 // Placeholder for last item of the enum.
51 SBOX_ERROR_LAST 89 SBOX_ERROR_LAST
52 }; 90 };
53 91
54 // If the sandbox cannot create a secure environment for the target, the 92 // If the sandbox cannot create a secure environment for the target, the
55 // target will be forcibly terminated. These are the process exit codes. 93 // target will be forcibly terminated. These are the process exit codes.
56 enum TerminationCodes { 94 enum TerminationCodes {
57 SBOX_FATAL_INTEGRITY = 7006, // Could not set the integrity level. 95 SBOX_FATAL_INTEGRITY = 7006, // Could not set the integrity level.
58 SBOX_FATAL_DROPTOKEN = 7007, // Could not lower the token. 96 SBOX_FATAL_DROPTOKEN = 7007, // Could not lower the token.
59 SBOX_FATAL_FLUSHANDLES = 7008, // Failed to flush registry handles. 97 SBOX_FATAL_FLUSHANDLES = 7008, // Failed to flush registry handles.
(...skipping 26 matching lines...) Expand all
86 INTERCEPTION_EAT, 124 INTERCEPTION_EAT,
87 INTERCEPTION_SIDESTEP, // Preamble patch 125 INTERCEPTION_SIDESTEP, // Preamble patch
88 INTERCEPTION_SMART_SIDESTEP, // Preamble patch but bypass internal calls 126 INTERCEPTION_SMART_SIDESTEP, // Preamble patch but bypass internal calls
89 INTERCEPTION_UNLOAD_MODULE, // Unload the module (don't patch) 127 INTERCEPTION_UNLOAD_MODULE, // Unload the module (don't patch)
90 INTERCEPTION_LAST // Placeholder for last item in the enumeration 128 INTERCEPTION_LAST // Placeholder for last item in the enumeration
91 }; 129 };
92 130
93 } // namespace sandbox 131 } // namespace sandbox
94 132
95 #endif // SANDBOX_WIN_SRC_SANDBOX_TYPES_H_ 133 #endif // SANDBOX_WIN_SRC_SANDBOX_TYPES_H_
OLDNEW
« no previous file with comments | « sandbox/win/src/sandbox_policy_base.cc ('k') | sandbox/win/src/target_process.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698