| 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 "sandbox/linux/suid/client/setuid_sandbox_client.h" | 5 #include "sandbox/linux/suid/client/setuid_sandbox_client.h" |
| 6 | 6 |
| 7 #include <fcntl.h> | 7 #include <fcntl.h> |
| 8 #include <stdlib.h> | 8 #include <stdlib.h> |
| 9 #include <sys/socket.h> | 9 #include <sys/socket.h> |
| 10 #include <sys/stat.h> | 10 #include <sys/stat.h> |
| 11 #include <sys/types.h> | 11 #include <sys/types.h> |
| 12 #include <sys/wait.h> | 12 #include <sys/wait.h> |
| 13 #include <unistd.h> | 13 #include <unistd.h> |
| 14 | 14 |
| 15 #include "base/command_line.h" | 15 #include "base/command_line.h" |
| 16 #include "base/environment.h" | 16 #include "base/environment.h" |
| 17 #include "base/file_util.h" | |
| 18 #include "base/files/file_path.h" | 17 #include "base/files/file_path.h" |
| 18 #include "base/files/file_util.h" |
| 19 #include "base/files/scoped_file.h" | 19 #include "base/files/scoped_file.h" |
| 20 #include "base/logging.h" | 20 #include "base/logging.h" |
| 21 #include "base/macros.h" | 21 #include "base/macros.h" |
| 22 #include "base/memory/scoped_ptr.h" | 22 #include "base/memory/scoped_ptr.h" |
| 23 #include "base/path_service.h" | 23 #include "base/path_service.h" |
| 24 #include "base/posix/eintr_wrapper.h" | 24 #include "base/posix/eintr_wrapper.h" |
| 25 #include "base/process/launch.h" | 25 #include "base/process/launch.h" |
| 26 #include "base/process/process_metrics.h" | 26 #include "base/process/process_metrics.h" |
| 27 #include "base/strings/string_number_conversions.h" | 27 #include "base/strings/string_number_conversions.h" |
| 28 #include "sandbox/linux/services/init_process_reaper.h" | 28 #include "sandbox/linux/services/init_process_reaper.h" |
| (...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 310 // kZygoteIdFd. Fixing this requires a sandbox API change. :( | 310 // kZygoteIdFd. Fixing this requires a sandbox API change. :( |
| 311 fds_to_remap->push_back(std::make_pair(dummy_fd->get(), kZygoteIdFd)); | 311 fds_to_remap->push_back(std::make_pair(dummy_fd->get(), kZygoteIdFd)); |
| 312 } | 312 } |
| 313 | 313 |
| 314 void SetuidSandboxClient::SetupLaunchEnvironment() { | 314 void SetuidSandboxClient::SetupLaunchEnvironment() { |
| 315 SaveSUIDUnsafeEnvironmentVariables(env_); | 315 SaveSUIDUnsafeEnvironmentVariables(env_); |
| 316 SetSandboxAPIEnvironmentVariable(env_); | 316 SetSandboxAPIEnvironmentVariable(env_); |
| 317 } | 317 } |
| 318 | 318 |
| 319 } // namespace sandbox | 319 } // namespace sandbox |
| OLD | NEW |