| 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 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 202 base::CommandLine::StringVector argv_to_launch; | 202 base::CommandLine::StringVector argv_to_launch; |
| 203 { | 203 { |
| 204 base::CommandLine cmd_line(base::CommandLine::NO_PROGRAM); | 204 base::CommandLine cmd_line(base::CommandLine::NO_PROGRAM); |
| 205 if (use_nacl_bootstrap) | 205 if (use_nacl_bootstrap) |
| 206 cmd_line.SetProgram(helper_bootstrap_exe); | 206 cmd_line.SetProgram(helper_bootstrap_exe); |
| 207 else | 207 else |
| 208 cmd_line.SetProgram(helper_exe); | 208 cmd_line.SetProgram(helper_exe); |
| 209 | 209 |
| 210 // Append any switches that need to be forwarded to the NaCl helper. | 210 // Append any switches that need to be forwarded to the NaCl helper. |
| 211 static const char* kForwardSwitches[] = { | 211 static const char* kForwardSwitches[] = { |
| 212 switches::kAllowSandboxDebugging, |
| 212 switches::kDisableSeccompFilterSandbox, | 213 switches::kDisableSeccompFilterSandbox, |
| 213 switches::kEnableNaClDebug, | 214 switches::kEnableNaClDebug, |
| 214 switches::kNaClDangerousNoSandboxNonSfi, | 215 switches::kNaClDangerousNoSandboxNonSfi, |
| 215 switches::kNoSandbox, | 216 switches::kNoSandbox, |
| 216 }; | 217 }; |
| 217 const base::CommandLine& current_cmd_line = | 218 const base::CommandLine& current_cmd_line = |
| 218 *base::CommandLine::ForCurrentProcess(); | 219 *base::CommandLine::ForCurrentProcess(); |
| 219 cmd_line.CopySwitchesFrom(current_cmd_line, kForwardSwitches, | 220 cmd_line.CopySwitchesFrom(current_cmd_line, kForwardSwitches, |
| 220 arraysize(kForwardSwitches)); | 221 arraysize(kForwardSwitches)); |
| 221 | 222 |
| (...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 435 pass_through_vars.push_back(kNaClVerbosity); | 436 pass_through_vars.push_back(kNaClVerbosity); |
| 436 pass_through_vars.push_back(sandbox::kSandboxEnvironmentApiRequest); | 437 pass_through_vars.push_back(sandbox::kSandboxEnvironmentApiRequest); |
| 437 for (size_t i = 0; i < pass_through_vars.size(); ++i) { | 438 for (size_t i = 0; i < pass_through_vars.size(); ++i) { |
| 438 std::string temp; | 439 std::string temp; |
| 439 if (env->GetVar(pass_through_vars[i].c_str(), &temp)) | 440 if (env->GetVar(pass_through_vars[i].c_str(), &temp)) |
| 440 options->environ[pass_through_vars[i]] = temp; | 441 options->environ[pass_through_vars[i]] = temp; |
| 441 } | 442 } |
| 442 } | 443 } |
| 443 | 444 |
| 444 } // namespace nacl | 445 } // namespace nacl |
| OLD | NEW |