Process isolation

This commit is contained in:
strNophix 2022-06-23 16:16:16 +02:00
parent 5e73e7d33e
commit 9f33ac46b2

View File

@ -29,6 +29,10 @@ fn main() {
// ensure that directory changed to root of jail
std::env::set_current_dir("/").expect("Failed to change to root dir");
unsafe {
libc::unshare(libc::CLONE_NEWPID);
}
let output = std::process::Command::new(command)
.args(command_args)
.output()