From 684f13b9ca916a254ecbcc74e044c22c62e126ba Mon Sep 17 00:00:00 2001 From: LeChatP Date: Thu, 20 Jun 2024 18:18:02 +0200 Subject: [PATCH] Add logs when failing to get capable map --- capable/src/main.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/capable/src/main.rs b/capable/src/main.rs index a3c3725..fd82096 100644 --- a/capable/src/main.rs +++ b/capable/src/main.rs @@ -172,7 +172,10 @@ where let mut graph = std::collections::HashMap::new(); let mut init = CapSet::empty(); for key in capabilities_map.keys() { - let pid = key?; + let pid = key.inspect_err(|err| { + eprintln!("Failed to get pid : {:?}", err.to_string()); + exit(-1); + })?; let pinum_inum = pnsid_nsid_map.get(&pid, 0).unwrap_or(0); let child = pinum_inum as u32; let parent = (pinum_inum >> 32) as u32;