summary refs log tree commit diff
diff options
context:
space:
mode:
authoredef <edef@unfathomable.blue>2022-02-03 20:56:39 +0000
committeredef <edef@unfathomable.blue>2022-02-03 20:56:39 +0000
commit408bd67facd69841faec42914a7d990f93d6523b (patch)
tree71005910ab5bcb5cc8186adccf95aa203a37e7cb
parentad805893d25eeb9cf36312363765fdb233bb2959 (diff)
downloadunf-legacy-408bd67facd69841faec42914a7d990f93d6523b.tar.zst
ripple/minitrace: don't permit tracee escape if the tracer dies
Change-Id: If2c0262b82e072a600f9b8dfe7efdf3556f0e16a
-rw-r--r--ripple/minitrace/src/main.rs4
1 files changed, 3 insertions, 1 deletions
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,