| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 <dlfcn.h> | 5 #include <dlfcn.h> |
| 6 #include <fcntl.h> | 6 #include <fcntl.h> |
| 7 #include <pthread.h> | 7 #include <pthread.h> |
| 8 #include <sys/epoll.h> | 8 #include <sys/epoll.h> |
| 9 #include <sys/prctl.h> | 9 #include <sys/prctl.h> |
| 10 #include <sys/signal.h> | 10 #include <sys/signal.h> |
| 11 #include <sys/socket.h> | 11 #include <sys/socket.h> |
| 12 #include <sys/stat.h> | 12 #include <sys/stat.h> |
| 13 #include <sys/types.h> | 13 #include <sys/types.h> |
| 14 #include <sys/wait.h> | 14 #include <sys/wait.h> |
| 15 #include <unistd.h> | 15 #include <unistd.h> |
| 16 | 16 |
| 17 #if defined(CHROMIUM_SELINUX) | 17 #if defined(CHROMIUM_SELINUX) |
| 18 #include <selinux/selinux.h> | 18 #include <selinux/selinux.h> |
| 19 #include <selinux/context.h> | 19 #include <selinux/context.h> |
| 20 #endif | 20 #endif |
| 21 | 21 |
| 22 #include "content/browser/zygote_host_linux.h" |
| 23 |
| 22 #include "base/basictypes.h" | 24 #include "base/basictypes.h" |
| 23 #include "base/command_line.h" | 25 #include "base/command_line.h" |
| 24 #include "base/eintr_wrapper.h" | 26 #include "base/eintr_wrapper.h" |
| 25 #include "base/file_path.h" | 27 #include "base/file_path.h" |
| 26 #include "base/global_descriptors_posix.h" | 28 #include "base/global_descriptors_posix.h" |
| 27 #include "base/hash_tables.h" | 29 #include "base/hash_tables.h" |
| 28 #include "base/linux_util.h" | 30 #include "base/linux_util.h" |
| 29 #include "base/path_service.h" | 31 #include "base/path_service.h" |
| 30 #include "base/pickle.h" | 32 #include "base/pickle.h" |
| 31 #include "base/process_util.h" | 33 #include "base/process_util.h" |
| 32 #include "base/rand_util.h" | 34 #include "base/rand_util.h" |
| 33 #include "base/scoped_ptr.h" | 35 #include "base/scoped_ptr.h" |
| 34 #include "base/sys_info.h" | 36 #include "base/sys_info.h" |
| 35 #include "build/build_config.h" | 37 #include "build/build_config.h" |
| 36 #include "chrome/browser/zygote_host_linux.h" | |
| 37 #include "chrome/common/chrome_descriptors.h" | 38 #include "chrome/common/chrome_descriptors.h" |
| 38 #include "chrome/common/chrome_switches.h" | 39 #include "chrome/common/chrome_switches.h" |
| 39 #include "chrome/common/font_config_ipc_linux.h" | 40 #include "chrome/common/font_config_ipc_linux.h" |
| 40 #include "chrome/common/main_function_params.h" | 41 #include "chrome/common/main_function_params.h" |
| 41 #include "chrome/common/pepper_plugin_registry.h" | 42 #include "chrome/common/pepper_plugin_registry.h" |
| 42 #include "chrome/common/process_watcher.h" | 43 #include "chrome/common/process_watcher.h" |
| 43 #include "chrome/common/result_codes.h" | 44 #include "chrome/common/result_codes.h" |
| 44 #include "chrome/common/sandbox_methods_linux.h" | 45 #include "chrome/common/sandbox_methods_linux.h" |
| 45 #include "chrome/common/set_process_title.h" | 46 #include "chrome/common/set_process_title.h" |
| 46 #include "chrome/common/unix_domain_socket_posix.h" | 47 #include "chrome/common/unix_domain_socket_posix.h" |
| (...skipping 696 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 743 VLOG(1) << "Enabling experimental Seccomp sandbox."; | 744 VLOG(1) << "Enabling experimental Seccomp sandbox."; |
| 744 sandbox_flags |= ZygoteHost::kSandboxSeccomp; | 745 sandbox_flags |= ZygoteHost::kSandboxSeccomp; |
| 745 } | 746 } |
| 746 } | 747 } |
| 747 #endif // SECCOMP_SANDBOX | 748 #endif // SECCOMP_SANDBOX |
| 748 | 749 |
| 749 Zygote zygote(sandbox_flags); | 750 Zygote zygote(sandbox_flags); |
| 750 // This function call can return multiple times, once per fork(). | 751 // This function call can return multiple times, once per fork(). |
| 751 return zygote.ProcessRequests(); | 752 return zygote.ProcessRequests(); |
| 752 } | 753 } |
| OLD | NEW |