MCPcopy Create free account
hub / github.com/NVIDIA/OpenShell / pid_matches_openshell_ssh_forward

Function pid_matches_openshell_ssh_forward

crates/openshell-core/src/forward.rs:105–111  ·  view source on GitHub ↗

Validate that a PID belongs to the expected `OpenShell` SSH forward.

(pid: u32, port: u16, sandbox_id: Option<&str>)

Source from the content-addressed store, hash-verified

103
104/// Validate that a PID belongs to the expected `OpenShell` SSH forward.
105pub 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///

Callers 3

find_ssh_forward_pidFunction · 0.85
stop_forwardFunction · 0.85
list_forwardsFunction · 0.85

Calls 2

args_match_ssh_forwardFunction · 0.85

Tested by

no test coverage detected