Process isolation
This commit is contained in:
parent
5e73e7d33e
commit
9f33ac46b2
@ -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()
|
||||
|
Loading…
x
Reference in New Issue
Block a user