| Index: sandbox/linux/seccomp-bpf/demo.cc
|
| diff --git a/sandbox/linux/seccomp-bpf/demo.cc b/sandbox/linux/seccomp-bpf/demo.cc
|
| index ebedcbe99061b9d9df4740f8db15aa9f0d4ecb0f..9c1ca8b2ed31592f5fa1aec3da6bc2ab4c96d9f8 100644
|
| --- a/sandbox/linux/seccomp-bpf/demo.cc
|
| +++ b/sandbox/linux/seccomp-bpf/demo.cc
|
| @@ -28,6 +28,7 @@
|
| #include "sandbox/linux/seccomp-bpf/sandbox_bpf.h"
|
| #include "sandbox/linux/seccomp-bpf/util.h"
|
|
|
| +using playground2::ErrorCode;
|
| using playground2::Sandbox;
|
| using playground2::Util;
|
|
|
| @@ -135,7 +136,7 @@ static intptr_t defaultHandler(const struct arch_seccomp_data& data,
|
| return -ERR;
|
| }
|
|
|
| -static Sandbox::ErrorCode evaluator(int sysno) {
|
| +static ErrorCode evaluator(int sysno) {
|
| switch (sysno) {
|
| #if defined(__NR_accept)
|
| case __NR_accept: case __NR_accept4:
|
| @@ -220,7 +221,7 @@ static Sandbox::ErrorCode evaluator(int sysno) {
|
| case __NR_time:
|
| case __NR_uname:
|
| case __NR_write: case __NR_writev:
|
| - return Sandbox::SB_ALLOWED;
|
| + return ErrorCode::ERR_ALLOWED;
|
|
|
| // The following system calls are temporarily permitted. This must be
|
| // tightened later. But we currently don't implement enough of the sandboxing
|
| @@ -252,11 +253,11 @@ static Sandbox::ErrorCode evaluator(int sysno) {
|
| case __NR_clone:
|
| case __NR_munmap: case __NR_mprotect: case __NR_madvise:
|
| case __NR_remap_file_pages:
|
| - return Sandbox::SB_ALLOWED;
|
| + return ErrorCode::ERR_ALLOWED;
|
|
|
| // Everything that isn't explicitly allowed is denied.
|
| default:
|
| - return Sandbox::ErrorCode(defaultHandler, NULL);
|
| + return Sandbox::Trap(defaultHandler, NULL);
|
| }
|
| }
|
|
|
|
|