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