From 408bd67facd69841faec42914a7d990f93d6523b Mon Sep 17 00:00:00 2001 From: edef Date: Thu, 3 Feb 2022 20:56:39 +0000 Subject: ripple/minitrace: don't permit tracee escape if the tracer dies Change-Id: If2c0262b82e072a600f9b8dfe7efdf3556f0e16a --- ripple/minitrace/src/main.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'ripple/minitrace') diff --git a/ripple/minitrace/src/main.rs b/ripple/minitrace/src/main.rs index 3f846b6..b8d6eee 100644 --- a/ripple/minitrace/src/main.rs +++ b/ripple/minitrace/src/main.rs @@ -108,7 +108,9 @@ fn main() -> anyhow::Result<()> { cmd })?; - let options = ptrace::Options::PTRACE_O_TRACESYSGOOD | ptrace::Options::PTRACE_O_TRACECLONE; + let options = ptrace::Options::PTRACE_O_TRACESYSGOOD + | ptrace::Options::PTRACE_O_TRACECLONE + | ptrace::Options::PTRACE_O_EXITKILL; ptrace::setoptions(process.tgid.as_pid(), options)?; // this is always equal to tgid for now, -- cgit 1.4.1