refactor(workdir): simplify review follow-ups

Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>
This commit is contained in:
Matthew Grossman
2026-08-11 11:32:49 -07:00
parent 0df87cd3e0
commit b26333aec2
3 changed files with 1 additions and 8 deletions
@@ -2195,7 +2195,6 @@ fn build_environment_for_oci_user(
user_env.extend(template.environment.clone());
}
user_env.extend(spec.environment.clone());
user_env.remove(openshell_core::sandbox_env::OCI_WORKSPACE_IDENTITY);
environment.extend(user_env.clone());
if !user_env.is_empty()
&& let Ok(json) = serde_json::to_string(&user_env)
@@ -522,7 +522,6 @@ fn build_env(
user_env.insert(k.clone(), v.clone());
}
}
user_env.remove(openshell_core::sandbox_env::OCI_WORKSPACE_IDENTITY);
env.extend(user_env.clone());
if !user_env.is_empty()
&& let Ok(json) = serde_json::to_string(&user_env)
@@ -1409,12 +1409,7 @@ pub fn validate_oci_workspace_as_process_identity(
supplementary_gids.dedup();
if nix::unistd::geteuid().is_root() {
#[cfg(not(any(
target_os = "macos",
target_os = "ios",
target_os = "haiku",
target_os = "redox"
)))]
#[cfg(target_os = "linux")]
nix::unistd::setgroups(&supplementary_gids).into_diagnostic()?;
nix::unistd::setgid(gid).into_diagnostic()?;
nix::unistd::setuid(uid).into_diagnostic()?;