From 4e9297776517c4e11f8e39720a15bb44011d3f8f Mon Sep 17 00:00:00 2001 From: Laszlo Nagy Date: Sat, 19 Oct 2024 08:52:09 +1100 Subject: [PATCH] rust: remove parent pid from execution report --- rust/intercept/src/bin/wrapper.rs | 1 - rust/intercept/src/lib.rs | 1 - rust/intercept/tests/test.rs | 1 - 3 files changed, 3 deletions(-) diff --git a/rust/intercept/src/bin/wrapper.rs b/rust/intercept/src/bin/wrapper.rs index 79cac808..e2580a16 100644 --- a/rust/intercept/src/bin/wrapper.rs +++ b/rust/intercept/src/bin/wrapper.rs @@ -60,7 +60,6 @@ fn report_execution(path_buf: &PathBuf) { // Report the execution let execution = intercept::Event::Started { pid: intercept::ProcessId(std::process::id() as u32), - ppid: intercept::ProcessId(std::os::unix::process::parent_id() as u32), // FIXME: This is Unix specific execution: intercept::Execution { executable: path_buf.clone(), arguments: std::env::args().collect(), diff --git a/rust/intercept/src/lib.rs b/rust/intercept/src/lib.rs index e3317ff3..8dec287f 100644 --- a/rust/intercept/src/lib.rs +++ b/rust/intercept/src/lib.rs @@ -55,7 +55,6 @@ pub struct Execution { pub enum Event { Started { pid: ProcessId, - ppid: ProcessId, execution: Execution, }, Terminated { diff --git a/rust/intercept/tests/test.rs b/rust/intercept/tests/test.rs index 062154a1..cb8dea5a 100644 --- a/rust/intercept/tests/test.rs +++ b/rust/intercept/tests/test.rs @@ -82,7 +82,6 @@ mod test { timestamp: 0, event: Event::Started { pid: ProcessId(1), - ppid: ProcessId(0), execution: Execution { executable: PathBuf::from("/usr/bin/ls"), arguments: vec!["ls".to_string(), "-l".to_string()],