| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 // A mini-zygote specifically for Native Client. | 5 // A mini-zygote specifically for Native Client. |
| 6 | 6 |
| 7 #include "components/nacl/loader/nacl_helper_linux.h" | 7 #include "components/nacl/loader/nacl_helper_linux.h" |
| 8 | 8 |
| 9 #include <errno.h> | 9 #include <errno.h> |
| 10 #include <fcntl.h> | 10 #include <fcntl.h> |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 #include "base/process/process_handle.h" | 33 #include "base/process/process_handle.h" |
| 34 #include "base/rand_util.h" | 34 #include "base/rand_util.h" |
| 35 #include "build/build_config.h" | 35 #include "build/build_config.h" |
| 36 #include "components/nacl/common/nacl_switches.h" | 36 #include "components/nacl/common/nacl_switches.h" |
| 37 #include "components/nacl/loader/sandbox_linux/nacl_sandbox_linux.h" | 37 #include "components/nacl/loader/sandbox_linux/nacl_sandbox_linux.h" |
| 38 #include "content/public/common/content_descriptors.h" | 38 #include "content/public/common/content_descriptors.h" |
| 39 #include "content/public/common/mojo_channel_switches.h" | 39 #include "content/public/common/mojo_channel_switches.h" |
| 40 #include "content/public/common/send_zygote_child_ping_linux.h" | 40 #include "content/public/common/send_zygote_child_ping_linux.h" |
| 41 #include "content/public/common/zygote_fork_delegate_linux.h" | 41 #include "content/public/common/zygote_fork_delegate_linux.h" |
| 42 #include "ipc/ipc_descriptors.h" | 42 #include "ipc/ipc_descriptors.h" |
| 43 #include "ipc/ipc_switches.h" | |
| 44 #include "mojo/edk/embedder/embedder.h" | 43 #include "mojo/edk/embedder/embedder.h" |
| 45 #include "sandbox/linux/services/credentials.h" | 44 #include "sandbox/linux/services/credentials.h" |
| 46 #include "sandbox/linux/services/namespace_sandbox.h" | 45 #include "sandbox/linux/services/namespace_sandbox.h" |
| 47 | 46 |
| 48 #if defined(OS_NACL_NONSFI) | 47 #if defined(OS_NACL_NONSFI) |
| 49 #include "components/nacl/loader/nonsfi/nonsfi_listener.h" | 48 #include "components/nacl/loader/nonsfi/nonsfi_listener.h" |
| 50 #include "native_client/src/public/nonsfi/irt_exception_handling.h" | 49 #include "native_client/src/public/nonsfi/irt_exception_handling.h" |
| 51 #else | 50 #else |
| 52 #include <link.h> | 51 #include <link.h> |
| 53 #include "components/nacl/loader/nacl_listener.h" | 52 #include "components/nacl/loader/nacl_listener.h" |
| (...skipping 414 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 468 // Now handle requests from the Zygote. | 467 // Now handle requests from the Zygote. |
| 469 while (true) { | 468 while (true) { |
| 470 bool request_handled = HandleZygoteRequest( | 469 bool request_handled = HandleZygoteRequest( |
| 471 kNaClZygoteDescriptor, system_info, nacl_sandbox.get()); | 470 kNaClZygoteDescriptor, system_info, nacl_sandbox.get()); |
| 472 // Do not turn this into a CHECK() without thinking about robustness | 471 // Do not turn this into a CHECK() without thinking about robustness |
| 473 // against malicious IPC requests. | 472 // against malicious IPC requests. |
| 474 DCHECK(request_handled); | 473 DCHECK(request_handled); |
| 475 } | 474 } |
| 476 NOTREACHED(); | 475 NOTREACHED(); |
| 477 } | 476 } |
| OLD | NEW |