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 1347 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1358 // TODO(jln): figure out what to do with non-Flash PPAPI | 1358 // TODO(jln): figure out what to do with non-Flash PPAPI |
1359 // out-of-process plug-ins. | 1359 // out-of-process plug-ins. |
1360 return FlashProcessPolicy_x86_64; | 1360 return FlashProcessPolicy_x86_64; |
1361 } | 1361 } |
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) { |
| 1369 return BlacklistDebugAndNumaPolicy; |
| 1370 } |
| 1371 |
1368 NOTREACHED(); | 1372 NOTREACHED(); |
1369 // This will be our default if we need one. | 1373 // This will be our default if we need one. |
1370 return AllowAllPolicy; | 1374 return AllowAllPolicy; |
1371 #else | 1375 #else |
1372 // On other architectures (currently IA32 or ARM), | 1376 // On other architectures (currently IA32 or ARM), |
1373 // we only have a small blacklist at the moment. | 1377 // we only have a small blacklist at the moment. |
1374 (void) process_type; | 1378 (void) process_type; |
1375 return BlacklistDebugAndNumaPolicy; | 1379 return BlacklistDebugAndNumaPolicy; |
1376 #endif // __x86_64__ | 1380 #endif // __x86_64__ |
1377 } | 1381 } |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1440 // Process-specific policy. | 1444 // Process-specific policy. |
1441 ShouldEnableSeccompBpf(process_type) && | 1445 ShouldEnableSeccompBpf(process_type) && |
1442 SupportsSandbox()) { | 1446 SupportsSandbox()) { |
1443 return StartBpfSandbox(command_line, process_type); | 1447 return StartBpfSandbox(command_line, process_type); |
1444 } | 1448 } |
1445 #endif | 1449 #endif |
1446 return false; | 1450 return false; |
1447 } | 1451 } |
1448 | 1452 |
1449 } // namespace content | 1453 } // namespace content |
OLD | NEW |