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 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
159 { | 159 { |
160 CommandLine cmd_line(CommandLine::NO_PROGRAM); | 160 CommandLine cmd_line(CommandLine::NO_PROGRAM); |
161 if (kUseNaClBootstrap) | 161 if (kUseNaClBootstrap) |
162 cmd_line.SetProgram(helper_bootstrap_exe); | 162 cmd_line.SetProgram(helper_bootstrap_exe); |
163 else | 163 else |
164 cmd_line.SetProgram(helper_exe); | 164 cmd_line.SetProgram(helper_exe); |
165 | 165 |
166 // Append any switches that need to be forwarded to the NaCl helper. | 166 // Append any switches that need to be forwarded to the NaCl helper. |
167 static const char* kForwardSwitches[] = { | 167 static const char* kForwardSwitches[] = { |
168 switches::kDisableSeccompFilterSandbox, | 168 switches::kDisableSeccompFilterSandbox, |
| 169 switches::kNaClDangerousNoSandboxNonSfi, |
169 switches::kNoSandbox, | 170 switches::kNoSandbox, |
170 }; | 171 }; |
171 const CommandLine& current_cmd_line = *CommandLine::ForCurrentProcess(); | 172 const CommandLine& current_cmd_line = *CommandLine::ForCurrentProcess(); |
172 cmd_line.CopySwitchesFrom(current_cmd_line, kForwardSwitches, | 173 cmd_line.CopySwitchesFrom(current_cmd_line, kForwardSwitches, |
173 arraysize(kForwardSwitches)); | 174 arraysize(kForwardSwitches)); |
174 | 175 |
175 // The command line needs to be tightly controlled to use | 176 // The command line needs to be tightly controlled to use |
176 // |helper_bootstrap_exe|. So from now on, argv_to_launch should be | 177 // |helper_bootstrap_exe|. So from now on, argv_to_launch should be |
177 // modified directly. | 178 // modified directly. |
178 argv_to_launch = cmd_line.argv(); | 179 argv_to_launch = cmd_line.argv(); |
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
349 int remote_exit_code; | 350 int remote_exit_code; |
350 if (!iter.ReadInt(&remote_exit_code)) { | 351 if (!iter.ReadInt(&remote_exit_code)) { |
351 LOG(ERROR) << "GetTerminationStatus: pickle failed"; | 352 LOG(ERROR) << "GetTerminationStatus: pickle failed"; |
352 return false; | 353 return false; |
353 } | 354 } |
354 | 355 |
355 *status = static_cast<base::TerminationStatus>(termination_status); | 356 *status = static_cast<base::TerminationStatus>(termination_status); |
356 *exit_code = remote_exit_code; | 357 *exit_code = remote_exit_code; |
357 return true; | 358 return true; |
358 } | 359 } |
OLD | NEW |