about summary refs log tree commit diff
path: root/tests/codegen/src-hash-algorithm/src-hash-algorithm-sha1.rs
diff options
context:
space:
mode:
authorJosh Triplett <josh@joshtriplett.org>2025-02-27 22:00:15 +0000
committerJosh Triplett <josh@joshtriplett.org>2025-05-20 18:25:05 +0200
commita3cf6f640828647e34afe96a626b3b4f6bbb22b1 (patch)
treed358007b1f6aa3b6d79eaac3abe480c2f0958b1a /tests/codegen/src-hash-algorithm/src-hash-algorithm-sha1.rs
parentf8e9e7636aabcbc29345d9614432d15b3c0c4ec7 (diff)
downloadrust-a3cf6f640828647e34afe96a626b3b4f6bbb22b1.tar.gz
rust-a3cf6f640828647e34afe96a626b3b4f6bbb22b1.zip
Add `std::os::unix::process::CommandExt::chroot` to safely chroot a child process
This adds a `chroot` method to the `CommandExt` extension trait for the
`Command` builder, to set a directory to chroot into. This will chroot
the child process into that directory right before calling chdir for the
`Command`'s working directory.

To avoid allowing a process to have a working directory outside of the
chroot, if the `Command` does not yet have a working directory set,
`chroot` will set its working directory to "/".
Diffstat (limited to 'tests/codegen/src-hash-algorithm/src-hash-algorithm-sha1.rs')
0 files changed, 0 insertions, 0 deletions