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 <asm/unistd.h> | 5 #include <asm/unistd.h> |
6 #include <dlfcn.h> | 6 #include <dlfcn.h> |
7 #include <errno.h> | 7 #include <errno.h> |
8 #include <fcntl.h> | 8 #include <fcntl.h> |
9 #include <linux/audit.h> | 9 #include <linux/audit.h> |
10 #include <linux/filter.h> | 10 #include <linux/filter.h> |
(...skipping 1351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1362 | 1362 |
1363 if (process_type == switches::kRendererProcess || | 1363 if (process_type == switches::kRendererProcess || |
1364 process_type == switches::kWorkerProcess) { | 1364 process_type == switches::kWorkerProcess) { |
1365 return RendererOrWorkerProcessPolicy_x86_64; | 1365 return RendererOrWorkerProcessPolicy_x86_64; |
1366 } | 1366 } |
1367 | 1367 |
1368 if (process_type == switches::kUtilityProcess) { | 1368 if (process_type == switches::kUtilityProcess) { |
1369 return BlacklistDebugAndNumaPolicy; | 1369 return BlacklistDebugAndNumaPolicy; |
1370 } | 1370 } |
1371 | 1371 |
| 1372 if (process_type == switches::kPluginProcess) { |
| 1373 return AllowAllPolicy; |
| 1374 } |
| 1375 |
1372 NOTREACHED(); | 1376 NOTREACHED(); |
1373 // This will be our default if we need one. | 1377 // This will be our default if we need one. |
1374 return AllowAllPolicy; | 1378 return AllowAllPolicy; |
1375 #else | 1379 #else |
1376 // On other architectures (currently IA32 or ARM), | 1380 // On other architectures (currently IA32 or ARM), |
1377 // we only have a small blacklist at the moment. | 1381 // we only have a small blacklist at the moment. |
1378 (void) process_type; | 1382 (void) process_type; |
1379 return BlacklistDebugAndNumaPolicy; | 1383 return BlacklistDebugAndNumaPolicy; |
1380 #endif // __x86_64__ | 1384 #endif // __x86_64__ |
1381 } | 1385 } |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1444 // Process-specific policy. | 1448 // Process-specific policy. |
1445 ShouldEnableSeccompBpf(process_type) && | 1449 ShouldEnableSeccompBpf(process_type) && |
1446 SupportsSandbox()) { | 1450 SupportsSandbox()) { |
1447 return StartBpfSandbox(command_line, process_type); | 1451 return StartBpfSandbox(command_line, process_type); |
1448 } | 1452 } |
1449 #endif | 1453 #endif |
1450 return false; | 1454 return false; |
1451 } | 1455 } |
1452 | 1456 |
1453 } // namespace content | 1457 } // namespace content |
OLD | NEW |