| 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> |
| (...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 375 SeccompSandboxSetProcSelfMaps(proc_self_maps); | 375 SeccompSandboxSetProcSelfMaps(proc_self_maps); |
| 376 } | 376 } |
| 377 close(g_proc_fd); | 377 close(g_proc_fd); |
| 378 g_proc_fd = -1; | 378 g_proc_fd = -1; |
| 379 } | 379 } |
| 380 #endif | 380 #endif |
| 381 | 381 |
| 382 close(kBrowserDescriptor); // our socket from the browser | 382 close(kBrowserDescriptor); // our socket from the browser |
| 383 if (g_suid_sandbox_active) | 383 if (g_suid_sandbox_active) |
| 384 close(kZygoteIdDescriptor); // another socket from the browser | 384 close(kZygoteIdDescriptor); // another socket from the browser |
| 385 Singleton<base::GlobalDescriptors>()->Reset(mapping); | 385 base::GlobalDescriptors::GetInstance()->Reset(mapping); |
| 386 | 386 |
| 387 #if defined(CHROMIUM_SELINUX) | 387 #if defined(CHROMIUM_SELINUX) |
| 388 SELinuxTransitionToTypeOrDie("chromium_renderer_t"); | 388 SELinuxTransitionToTypeOrDie("chromium_renderer_t"); |
| 389 #endif | 389 #endif |
| 390 | 390 |
| 391 // Reset the process-wide command line to our new command line. | 391 // Reset the process-wide command line to our new command line. |
| 392 CommandLine::Reset(); | 392 CommandLine::Reset(); |
| 393 CommandLine::Init(0, NULL); | 393 CommandLine::Init(0, NULL); |
| 394 CommandLine::ForCurrentProcess()->InitFromArgv(args); | 394 CommandLine::ForCurrentProcess()->InitFromArgv(args); |
| 395 CommandLine::SetProcTitle(); | 395 CommandLine::SetProcTitle(); |
| (...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 739 VLOG(1) << "Enabling experimental Seccomp sandbox."; | 739 VLOG(1) << "Enabling experimental Seccomp sandbox."; |
| 740 sandbox_flags |= ZygoteHost::kSandboxSeccomp; | 740 sandbox_flags |= ZygoteHost::kSandboxSeccomp; |
| 741 } | 741 } |
| 742 } | 742 } |
| 743 #endif // SECCOMP_SANDBOX | 743 #endif // SECCOMP_SANDBOX |
| 744 | 744 |
| 745 Zygote zygote(sandbox_flags); | 745 Zygote zygote(sandbox_flags); |
| 746 // This function call can return multiple times, once per fork(). | 746 // This function call can return multiple times, once per fork(). |
| 747 return zygote.ProcessRequests(); | 747 return zygote.ProcessRequests(); |
| 748 } | 748 } |
| OLD | NEW |