We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hello,
i am wondering if it is possible to isolate an external command using gaol.
i tryed something like this:
fn handle_child() { let cmd = env::args().skip(2).next().expect("cmd ..."); let args = env::args().skip(3).map(|v| v.to_string()).collect::<Vec<_>>(); println!("??? {}, {:?}", &cmd, &args); ChildSandbox::new( profile()).activate().unwrap(); ::std::process::Command::new(&cmd) .args(&args) .stdin(Stdio::inherit()) .stdout(Stdio::inherit()) .spawn() .expect("command failed") ; } fn main() { if env::args().skip(1).next().is_some() && env::args().skip(1).next().expect("...") == "child" { return handle_child(); } println!("???"); let sandbox = Sandbox::new( profile()); let args = env::args().skip(2).map(|v| v.to_string()).collect::<Vec<_>>(); let res = sandbox.start( Command::me().unwrap() .arg("child") .arg("/usr/bin/true") // .args(&args) ).unwrap().wait(); }
i don't want to give the child the ability to run ::std::process::Command::new(&cmd).
::std::process::Command::new(&cmd)
thanks for any kind of help :)
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hello,
i am wondering if it is possible to isolate an external command using gaol.
i tryed something like this:
i don't want to give the child the ability to run
::std::process::Command::new(&cmd)
.thanks for any kind of help :)
The text was updated successfully, but these errors were encountered: