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