OLD | NEW |
---|---|
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 #include "content/common/sandbox_linux/bpf_gpu_policy_linux.h" | 5 #include "content/common/sandbox_linux/bpf_gpu_policy_linux.h" |
6 | 6 |
7 #include <dlfcn.h> | 7 #include <dlfcn.h> |
8 #include <errno.h> | 8 #include <errno.h> |
9 #include <fcntl.h> | 9 #include <fcntl.h> |
10 #include <sys/socket.h> | 10 #include <sys/socket.h> |
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
213 std::vector<std::string>(), // No extra files in whitelist. | 213 std::vector<std::string>(), // No extra files in whitelist. |
214 std::vector<std::string>()); | 214 std::vector<std::string>()); |
215 | 215 |
216 if (IsArchitectureX86_64() || IsArchitectureI386()) { | 216 if (IsArchitectureX86_64() || IsArchitectureI386()) { |
217 // Accelerated video decode dlopen()'s some shared objects | 217 // Accelerated video decode dlopen()'s some shared objects |
218 // inside the sandbox, so preload them now. | 218 // inside the sandbox, so preload them now. |
219 if (IsAcceleratedVideoDecodeEnabled()) { | 219 if (IsAcceleratedVideoDecodeEnabled()) { |
220 const char* I965DrvVideoPath = NULL; | 220 const char* I965DrvVideoPath = NULL; |
221 | 221 |
222 if (IsArchitectureX86_64()) { | 222 if (IsArchitectureX86_64()) { |
223 I965DrvVideoPath = "/usr/lib64/va/drivers/i965_drv_video.so"; | 223 I965DrvVideoPath = "/usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so"; |
danakj
2014/06/19 15:56:26
and here?
| |
224 } else if (IsArchitectureI386()) { | 224 } else if (IsArchitectureI386()) { |
225 I965DrvVideoPath = "/usr/lib/va/drivers/i965_drv_video.so"; | 225 I965DrvVideoPath = "/usr/lib/va/drivers/i965_drv_video.so"; |
226 } | 226 } |
227 | 227 |
228 dlopen(I965DrvVideoPath, RTLD_NOW|RTLD_GLOBAL|RTLD_NODELETE); | 228 dlopen(I965DrvVideoPath, RTLD_NOW|RTLD_GLOBAL|RTLD_NODELETE); |
229 dlopen("libva.so.1", RTLD_NOW|RTLD_GLOBAL|RTLD_NODELETE); | 229 dlopen("libva.so.1", RTLD_NOW|RTLD_GLOBAL|RTLD_NODELETE); |
230 dlopen("libva-x11.so.1", RTLD_NOW|RTLD_GLOBAL|RTLD_NODELETE); | 230 dlopen("libva-x11.so.1", RTLD_NOW|RTLD_GLOBAL|RTLD_NODELETE); |
231 } | 231 } |
232 } | 232 } |
233 | 233 |
(...skipping 28 matching lines...) Expand all Loading... | |
262 broker_process_ = new BrokerProcess(GetFSDeniedErrno(), | 262 broker_process_ = new BrokerProcess(GetFSDeniedErrno(), |
263 read_whitelist, | 263 read_whitelist, |
264 write_whitelist); | 264 write_whitelist); |
265 // The initialization callback will perform generic initialization and then | 265 // The initialization callback will perform generic initialization and then |
266 // call broker_sandboxer_callback. | 266 // call broker_sandboxer_callback. |
267 CHECK(broker_process_->Init(base::Bind(&UpdateProcessTypeAndEnableSandbox, | 267 CHECK(broker_process_->Init(base::Bind(&UpdateProcessTypeAndEnableSandbox, |
268 broker_sandboxer_allocator))); | 268 broker_sandboxer_allocator))); |
269 } | 269 } |
270 | 270 |
271 } // namespace content | 271 } // namespace content |
OLD | NEW |