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

Side by Side Diff: sandbox/linux/suid/common/sandbox.h

Issue 569533002: Remove --find-inode-switch hack from chrome-sandbox (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Revert API number bump and merge remainder of linux_util.h into sandbox.h Created 6 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
« no previous file with comments | « sandbox/linux/sandbox_linux.gypi ('k') | sandbox/linux/suid/linux_util.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_LINUX_SUID_SANDBOX_H_ 5 #ifndef SANDBOX_LINUX_SUID_SANDBOX_H_
6 #define SANDBOX_LINUX_SUID_SANDBOX_H_ 6 #define SANDBOX_LINUX_SUID_SANDBOX_H_
7 7
8 #if defined(__cplusplus) 8 #if defined(__cplusplus)
9 namespace sandbox { 9 namespace sandbox {
10 #endif 10 #endif
11 11
12 // These are command line switches that may be used by other programs 12 // These are command line switches that may be used by other programs
13 // (e.g. Chrome) to construct a command line for the sandbox. 13 // (e.g. Chrome) to construct a command line for the sandbox.
14 static const char kSuidSandboxGetApiSwitch[] = "--get-api";
14 static const char kAdjustOOMScoreSwitch[] = "--adjust-oom-score"; 15 static const char kAdjustOOMScoreSwitch[] = "--adjust-oom-score";
15 16
16 static const char kSandboxDescriptorEnvironmentVarName[] = "SBX_D"; 17 static const char kSandboxDescriptorEnvironmentVarName[] = "SBX_D";
17 static const char kSandboxHelperPidEnvironmentVarName[] = "SBX_HELPER_PID"; 18 static const char kSandboxHelperPidEnvironmentVarName[] = "SBX_HELPER_PID";
18 19
19 static const long kSUIDSandboxApiNumber = 1; 20 static const long kSUIDSandboxApiNumber = 1;
20 static const char kSandboxEnvironmentApiRequest[] = "SBX_CHROME_API_RQ"; 21 static const char kSandboxEnvironmentApiRequest[] = "SBX_CHROME_API_RQ";
21 static const char kSandboxEnvironmentApiProvides[] = "SBX_CHROME_API_PRV"; 22 static const char kSandboxEnvironmentApiProvides[] = "SBX_CHROME_API_PRV";
22 23
23 // This number must be kept in sync with common/zygote_commands_linux.h 24 // This number must be kept in sync with common/zygote_commands_linux.h
24 static const int kZygoteIdFd = 7; 25 static const int kZygoteIdFd = 7;
25 26
26 // These are the magic byte values which the sandboxed process uses to request 27 // These are the magic byte values which the sandboxed process uses to request
27 // that it be chrooted. 28 // that it be chrooted.
28 static const char kMsgChrootMe = 'C'; 29 static const char kMsgChrootMe = 'C';
29 static const char kMsgChrootSuccessful = 'O'; 30 static const char kMsgChrootSuccessful = 'O';
30 31
31 // These are set if we have respectively switched to a new PID or NET namespace 32 // These are set if we have respectively switched to a new PID or NET namespace
32 // by going through the setuid binary helper. 33 // by going through the setuid binary helper.
33 static const char kSandboxPIDNSEnvironmentVarName[] = "SBX_PID_NS"; 34 static const char kSandboxPIDNSEnvironmentVarName[] = "SBX_PID_NS";
34 static const char kSandboxNETNSEnvironmentVarName[] = "SBX_NET_NS"; 35 static const char kSandboxNETNSEnvironmentVarName[] = "SBX_NET_NS";
35 36
36 #if defined(__cplusplus) 37 #if defined(__cplusplus)
37 } // namespace sandbox 38 } // namespace sandbox
38 #endif 39 #endif
39 40
40 #endif // SANDBOX_LINUX_SUID_SANDBOX_H_ 41 #endif // SANDBOX_LINUX_SUID_SANDBOX_H_
OLDNEW
« no previous file with comments | « sandbox/linux/sandbox_linux.gypi ('k') | sandbox/linux/suid/linux_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698