Skip to main content

check_command_dests

Function check_command_dests 

Source
pub fn check_command_dests(
    command: &str,
    root: &Path,
    policy: &DenyPolicy,
) -> Result<(), CheckDestError>
Expand description

Join extracted command dests under root and dest-deny each.

Absolute dests stay as given. Empty tokens are skipped. Flag-looking peeled tokens are skipped except an attached --flag=.env / -f=.env suffix or a GNU glued short dest (-a.env, clustered -la.env), which is dest-denied via check_dest. After peeling, an env/env.exe token dest-denies the following tokens with the same env-flag dest check used for argv0 env.