Skip to content

Commit d54d874

Browse files
committed
Merge #771
771: ptrace: add PTRACE_O_EXITKILL option r=Susurrus a=bpowers It is a somewhat newer option -- it requires Linux 3.8. Is there a more precise way to specify that?
2 parents 6a2feaa + 313d2e3 commit d54d874

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ This project adheres to [Semantic Versioning](http://semver.org/).
3636
([#768](https:://github.com/nix-rust/nix/pull/768))
3737
- Added `nix::unistd::mkfifo`.
3838
([#602](https://github.com/nix-rust/nix/pull/774))
39+
- Added `ptrace::Options::PTRACE_O_EXITKILL` on Linux and Android.
40+
([#771](https://github.com/nix-rust/nix/pull/771))
3941

4042
### Changed
4143
- Renamed existing `ptrace` wrappers to encourage namespacing ([#692](https://github.com/nix-rust/nix/pull/692))

src/sys/ptrace.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,10 @@ libc_bitflags! {
116116
/// Stop tracee when a SECCOMP_RET_TRACE rule is triggered. See `man seccomp` for more
117117
/// details.
118118
PTRACE_O_TRACESECCOMP;
119+
/// Send a SIGKILL to the tracee if the tracer exits. This is useful
120+
/// for ptrace jailers to prevent tracees from escaping their control.
121+
#[cfg(any(target_os = "android", target_os = "linux"))]
122+
PTRACE_O_EXITKILL;
119123
}
120124
}
121125

0 commit comments

Comments
 (0)