OLD | NEW |
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 #include "base/linux_util.h" | 5 #include "base/linux_util.h" |
6 | 6 |
7 #include <dirent.h> | 7 #include <dirent.h> |
8 #include <errno.h> | 8 #include <errno.h> |
9 #include <fcntl.h> | 9 #include <fcntl.h> |
10 #include <stdlib.h> | 10 #include <stdlib.h> |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 *inode_out = inode_ul; | 119 *inode_out = inode_ul; |
120 return true; | 120 return true; |
121 } | 121 } |
122 | 122 |
123 } // namespace | 123 } // namespace |
124 | 124 |
125 namespace base { | 125 namespace base { |
126 | 126 |
127 const char kFindInodeSwitch[] = "--find-inode"; | 127 const char kFindInodeSwitch[] = "--find-inode"; |
128 | 128 |
129 // This should be kept in sync with sandbox/linux/suid/sandbox.c | |
130 const long kSUIDSandboxApiNumber = 1; | |
131 const char kSandboxEnvironmentApiRequest[] = "SBX_CHROME_API_RQ"; | |
132 const char kSandboxEnvironmentApiProvides[] = "SBX_CHROME_API_PRV"; | |
133 | |
134 // Account for the terminating null character. | 129 // Account for the terminating null character. |
135 static const int kDistroSize = 128 + 1; | 130 static const int kDistroSize = 128 + 1; |
136 | 131 |
137 // We use this static string to hold the Linux distro info. If we | 132 // We use this static string to hold the Linux distro info. If we |
138 // crash, the crash handler code will send this in the crash dump. | 133 // crash, the crash handler code will send this in the crash dump. |
139 char g_linux_distro[kDistroSize] = | 134 char g_linux_distro[kDistroSize] = |
140 #if defined(OS_CHROMEOS) && defined(USE_AURA) | 135 #if defined(OS_CHROMEOS) && defined(USE_AURA) |
141 "CrOS Aura"; | 136 "CrOS Aura"; |
142 #elif defined(OS_CHROMEOS) | 137 #elif defined(OS_CHROMEOS) |
143 "CrOS"; | 138 "CrOS"; |
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
302 | 297 |
303 if (0 == strncmp(expected_data.c_str(), syscall_data.get(), | 298 if (0 == strncmp(expected_data.c_str(), syscall_data.get(), |
304 expected_data.length())) { | 299 expected_data.length())) { |
305 return current_tid; | 300 return current_tid; |
306 } | 301 } |
307 } | 302 } |
308 return -1; | 303 return -1; |
309 } | 304 } |
310 | 305 |
311 } // namespace base | 306 } // namespace base |
OLD | NEW |