Compare commits

..

1 Commits

Author SHA1 Message Date
ea75e1d744 unshare: mount proc differently depending on root privileges
Some checks failed
CI / build (push) Failing after 32m37s
CI / snap (push) Has been skipped
2026-03-19 10:37:36 +01:00
2 changed files with 0 additions and 16 deletions

View File

@@ -352,18 +352,6 @@ impl Drop for EphemeralContextGuard {
// Check if we're running as root to avoid unnecessary sudo
let is_root = crate::utils::root::is_root().unwrap_or(false);
// Unmount /proc from chroot before removing (ignore errors)
let proc_path = self.chroot_path.join("proc");
let _ = if is_root {
self.base_ctx.command("umount").arg(&proc_path).status()
} else {
self.base_ctx
.command("sudo")
.arg("umount")
.arg(&proc_path)
.status()
};
let result = if is_root {
self.base_ctx
.command("rm")

View File

@@ -344,10 +344,6 @@ mod tests {
/// It is important to ensure that pkh can cross-compile linux-riscv, as
/// for risc-v hardware is still rare and cross-compilation is necessary
/// to debug and test
/// NOTE: Ideally, we want to run this in CI, but it takes more than 1h
/// to fully build the linux-riscv package on an amd64 builder, which is too
/// much time
#[ignore]
#[tokio::test]
#[test_log::test]
#[cfg(target_arch = "x86_64")]