Reject empty HOME envvar

This commit is contained in:
2026-03-20 21:43:08 +01:00
parent 4112288a30
commit ada9da7ae7
5 changed files with 30 additions and 3 deletions
+1 -1
View File
@@ -75,7 +75,7 @@ fn add_blacklist_mode(cmd: &mut Command) -> Result<(), SandboxError> {
}
fn add_whitelist_mode(cmd: &mut Command) -> Result<(), SandboxError> {
let home = std::env::var("HOME").map_err(|_| SandboxError::HomeNotSet)?;
let home = crate::require_home()?;
cmd.args(["--ro-bind", "/usr", "/usr"]);
for path in ["/lib", "/lib64", "/lib32", "/bin", "/sbin"] {