Skip to content

Commit

Permalink
Merge #771
Browse files Browse the repository at this point in the history
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?
  • Loading branch information
bors[bot] committed Nov 8, 2017
2 parents 6a2feaa + 313d2e3 commit d54d874
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ This project adheres to [Semantic Versioning](http://semver.org/).
([#768](https:://github.com/nix-rust/nix/pull/768))
- Added `nix::unistd::mkfifo`.
([#602](https://github.com/nix-rust/nix/pull/774))
- Added `ptrace::Options::PTRACE_O_EXITKILL` on Linux and Android.
([#771](https://github.com/nix-rust/nix/pull/771))

### Changed
- Renamed existing `ptrace` wrappers to encourage namespacing ([#692](https://github.com/nix-rust/nix/pull/692))
Expand Down
4 changes: 4 additions & 0 deletions src/sys/ptrace.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}

Expand Down

0 comments on commit d54d874

Please sign in to comment.