diff options
author | Bobby Powers <bobbypowers@gmail.com> | 2017-09-24 17:30:41 -0400 |
---|---|---|
committer | Bobby Powers <bobbypowers@gmail.com> | 2017-10-30 10:50:28 -0400 |
commit | 2013be14f216081e3ea62b98b79c4ce3e2f17bfa (patch) | |
tree | 2865329b3fa48452bf854b1102430bb257b6f0ff /src/sys | |
parent | 1b9d205c472232c18803b8e9375ef2c6b704148c (diff) | |
download | nix-2013be14f216081e3ea62b98b79c4ce3e2f17bfa.zip |
ptrace: add PTRACE_O_EXITKILL option
It is a somewhat newer option -- it requires Linux 3.8.
Diffstat (limited to 'src/sys')
-rw-r--r-- | src/sys/ptrace.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/sys/ptrace.rs b/src/sys/ptrace.rs index 64b523c3..43a78862 100644 --- a/src/sys/ptrace.rs +++ b/src/sys/ptrace.rs @@ -116,6 +116,10 @@ libc_bitflags! { /// Stop tracee when a SECCOMP_RET_TRACE rule is triggered. See `man seccomp` for more /// details. PTRACE_O_TRACESECCOMP; + /// Send a SIGKILL to the tracee if the tracer exits. This is useful + /// for ptrace jailers to prevent tracees from escaping their control. + #[cfg(any(target_os = "android", target_os = "linux"))] + PTRACE_O_EXITKILL; } } |