Validate that a PID belongs to the expected `OpenShell` SSH forward.
(pid: u32, port: u16, sandbox_id: Option<&str>)
| 103 | |
| 104 | /// Validate that a PID belongs to the expected `OpenShell` SSH forward. |
| 105 | pub fn pid_matches_openshell_ssh_forward(pid: u32, port: u16, sandbox_id: Option<&str>) -> bool { |
| 106 | let Some(argv) = process_forward_match_tokens(pid) else { |
| 107 | return false; |
| 108 | }; |
| 109 | let tokens: Vec<&str> = argv.iter().map(String::as_str).collect(); |
| 110 | args_match_ssh_forward(&tokens, port, sandbox_id) |
| 111 | } |
| 112 | |
| 113 | /// Read a process command line as matcher tokens. |
| 114 | /// |
no test coverage detected