Index: sandbox/linux/seccomp-bpf/trap.cc |
diff --git a/sandbox/linux/seccomp-bpf/trap.cc b/sandbox/linux/seccomp-bpf/trap.cc |
index 145e62469cacca37c07aa40916c1d27795082c11..c87bb006129d15d006034daf36323f434b51ff6a 100644 |
--- a/sandbox/linux/seccomp-bpf/trap.cc |
+++ b/sandbox/linux/seccomp-bpf/trap.cc |
@@ -251,6 +251,10 @@ |
} |
} |
+uint16_t Trap::MakeTrap(TrapFnc fnc, const void* aux, bool safe) { |
+ return Registry()->Add(fnc, aux, safe); |
+} |
+ |
uint16_t Trap::Add(TrapFnc fnc, const void* aux, bool safe) { |
if (!safe && !SandboxDebuggingAllowedByUser()) { |
// Unless the user set the CHROME_SANDBOX_DEBUGGING environment variable, |
@@ -349,9 +353,13 @@ |
return id; |
} |
-bool Trap::SandboxDebuggingAllowedByUser() { |
+bool Trap::SandboxDebuggingAllowedByUser() const { |
const char* debug_flag = getenv(kSandboxDebuggingEnv); |
return debug_flag && *debug_flag; |
+} |
+ |
+bool Trap::EnableUnsafeTrapsInSigSysHandler() { |
+ return Registry()->EnableUnsafeTraps(); |
} |
bool Trap::EnableUnsafeTraps() { |