fix: Remove cache dir mount and mount only the cache executable (Rust, C#) (#5270)

This commit is contained in:
wendrul
2025-02-11 16:08:19 +01:00
committed by GitHub
parent 69c316576c
commit 6357ed3d5e
4 changed files with 6 additions and 6 deletions
@@ -104,10 +104,9 @@ mount {
iface_no_lo: true
mount {
src: "{CACHE_DIR}"
dst: "/tmp/.cache/csharp"
src: "{CACHE_DIR}/{CACHE_HASH}"
dst: "/tmp/.cache/csharp/{CACHE_HASH}"
is_bind: true
rw: true
mandatory: false
}
@@ -97,10 +97,9 @@ mount {
iface_no_lo: true
mount {
src: "{CACHE_DIR}"
dst: "/tmp/.cache/rust"
src: "{CACHE_DIR}/{CACHE_HASH}"
dst: "/tmp/.cache/rust/{CACHE_HASH}"
is_bind: true
rw: true
mandatory: false
}
@@ -543,6 +543,7 @@ pub async fn handle_csharp_job(
&NSJAIL_CONFIG_RUN_CSHARP_CONTENT
.replace("{JOB_DIR}", job_dir)
.replace("{CACHE_DIR}", CSHARP_CACHE_DIR)
.replace("{CACHE_HASH}", &hash)
.replace("{CLONE_NEWUSER}", &(!*DISABLE_NUSER).to_string())
.replace("{SHARED_MOUNT}", shared_mount),
)?;
@@ -353,6 +353,7 @@ pub async fn handle_rust_job(
&NSJAIL_CONFIG_RUN_RUST_CONTENT
.replace("{JOB_DIR}", job_dir)
.replace("{CACHE_DIR}", RUST_CACHE_DIR)
.replace("{CACHE_HASH}", &hash)
.replace("{CLONE_NEWUSER}", &(!*DISABLE_NUSER).to_string())
.replace("{SHARED_MOUNT}", shared_mount),
)?;