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 "components/nacl/zygote/nacl_fork_delegate_linux.h" | 5 #include "components/nacl/zygote/nacl_fork_delegate_linux.h" |
6 | 6 |
7 #include <signal.h> | 7 #include <signal.h> |
8 #include <stdlib.h> | 8 #include <stdlib.h> |
9 #include <sys/resource.h> | 9 #include <sys/resource.h> |
10 #include <sys/socket.h> | 10 #include <sys/socket.h> |
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
181 // sandbox on those. | 181 // sandbox on those. |
182 use_nacl_bootstrap = NonZeroSegmentBaseIsSlow(); | 182 use_nacl_bootstrap = NonZeroSegmentBaseIsSlow(); |
183 #else | 183 #else |
184 use_nacl_bootstrap = true; | 184 use_nacl_bootstrap = true; |
185 #endif | 185 #endif |
186 } | 186 } |
187 | 187 |
188 status_ = kNaClHelperUnused; | 188 status_ = kNaClHelperUnused; |
189 base::FilePath helper_exe; | 189 base::FilePath helper_exe; |
190 base::FilePath helper_bootstrap_exe; | 190 base::FilePath helper_bootstrap_exe; |
191 if (!PathService::Get(nacl::FILE_NACL_HELPER, &helper_exe)) { | 191 if (!PathService::Get( |
| 192 nonsfi_mode_ ? nacl::FILE_NACL_HELPER_NONSFI : nacl::FILE_NACL_HELPER, |
| 193 &helper_exe)) { |
192 status_ = kNaClHelperMissing; | 194 status_ = kNaClHelperMissing; |
193 } else if (use_nacl_bootstrap && | 195 } else if (use_nacl_bootstrap && |
194 !PathService::Get(nacl::FILE_NACL_HELPER_BOOTSTRAP, | 196 !PathService::Get(nacl::FILE_NACL_HELPER_BOOTSTRAP, |
195 &helper_bootstrap_exe)) { | 197 &helper_bootstrap_exe)) { |
196 status_ = kNaClHelperBootstrapMissing; | 198 status_ = kNaClHelperBootstrapMissing; |
197 } else if (RunningOnValgrind()) { | 199 } else if (RunningOnValgrind()) { |
198 status_ = kNaClHelperValgrind; | 200 status_ = kNaClHelperValgrind; |
199 } else { | 201 } else { |
200 CommandLine::StringVector argv_to_launch; | 202 CommandLine::StringVector argv_to_launch; |
201 { | 203 { |
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
434 pass_through_vars.push_back(kNaClVerbosity); | 436 pass_through_vars.push_back(kNaClVerbosity); |
435 pass_through_vars.push_back(sandbox::kSandboxEnvironmentApiRequest); | 437 pass_through_vars.push_back(sandbox::kSandboxEnvironmentApiRequest); |
436 for (size_t i = 0; i < pass_through_vars.size(); ++i) { | 438 for (size_t i = 0; i < pass_through_vars.size(); ++i) { |
437 std::string temp; | 439 std::string temp; |
438 if (env->GetVar(pass_through_vars[i].c_str(), &temp)) | 440 if (env->GetVar(pass_through_vars[i].c_str(), &temp)) |
439 options->environ[pass_through_vars[i]] = temp; | 441 options->environ[pass_through_vars[i]] = temp; |
440 } | 442 } |
441 } | 443 } |
442 | 444 |
443 } // namespace nacl | 445 } // namespace nacl |
OLD | NEW |