OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_host.h" | 5 #include "sandbox/linux/suid/client/setuid_sandbox_host.h" |
6 | 6 |
7 #include <fcntl.h> | 7 #include <fcntl.h> |
8 #include <stddef.h> | |
9 #include <stdlib.h> | 8 #include <stdlib.h> |
10 #include <sys/stat.h> | 9 #include <sys/stat.h> |
11 #include <unistd.h> | 10 #include <unistd.h> |
12 | 11 |
13 #include <string> | 12 #include <string> |
14 #include <utility> | 13 #include <utility> |
15 | 14 |
16 #include "base/command_line.h" | 15 #include "base/command_line.h" |
17 #include "base/environment.h" | 16 #include "base/environment.h" |
18 #include "base/files/file_path.h" | 17 #include "base/files/file_path.h" |
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
187 // kZygoteIdFd. Fixing this requires a sandbox API change. :( | 186 // kZygoteIdFd. Fixing this requires a sandbox API change. :( |
188 fds_to_remap->push_back(std::make_pair(dummy_fd->get(), kZygoteIdFd)); | 187 fds_to_remap->push_back(std::make_pair(dummy_fd->get(), kZygoteIdFd)); |
189 } | 188 } |
190 | 189 |
191 void SetuidSandboxHost::SetupLaunchEnvironment() { | 190 void SetuidSandboxHost::SetupLaunchEnvironment() { |
192 SaveSUIDUnsafeEnvironmentVariables(env_.get()); | 191 SaveSUIDUnsafeEnvironmentVariables(env_.get()); |
193 SetSandboxAPIEnvironmentVariable(env_.get()); | 192 SetSandboxAPIEnvironmentVariable(env_.get()); |
194 } | 193 } |
195 | 194 |
196 } // namespace sandbox | 195 } // namespace sandbox |
OLD | NEW |