Mark inherited descriptors close-on-exec so none reach the sandbox

This commit is contained in:
2026-11-04 18:12:04 +01:00
parent 14c4f44a1f
commit f9ac595d63
4 changed files with 66 additions and 0 deletions
+2
View File
@@ -3,6 +3,7 @@ pub mod cli;
pub mod config;
mod env;
mod errors;
mod inherited_fds;
mod memfd;
mod persistent_tmp;
mod preflight;
@@ -99,6 +100,7 @@ fn resolve_run_user_from_proc() -> Option<String> {
}
pub fn run(config: SandboxConfig) -> Result<ExitStatus, SandboxError> {
inherited_fds::keep_out_of_sandbox()?;
preflight::check(&config)?;
let forwarded_signals = ForwardedSignals::detect();