Skip to content

Commit

Permalink
Merge pull request #9 from ThibF/thibf/allow_tmp_overlay
Browse files Browse the repository at this point in the history
virtme-ng-init: allow /tmp to be mounted from host
  • Loading branch information
Andrea Righi authored May 24, 2024
2 parents 9f75983 + 91d4387 commit 8a051da
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,6 @@ const KERNEL_MOUNTS: &[MountInfo] = &[
flags: (libc::MS_NOSUID | libc::MS_NOEXEC | libc::MS_NODEV) as usize,
fsdata: "",
},
MountInfo {
source: "tmpfs",
target: "/tmp",
fs_type: "tmpfs",
flags: 0,
fsdata: "",
},
MountInfo {
source: "run",
target: "/run",
Expand Down Expand Up @@ -428,9 +421,10 @@ fn mount_cgroupfs() {
}

fn mount_virtme_overlays() {
utils::do_mkdir("/run/tmp/");
for (key, path) in env::vars() {
if key.starts_with("virtme_rw_overlay") {
let dir = &format!("/tmp/{}", key);
let dir = &format!("/run/tmp/{}", key);
let upperdir = &format!("{}/upper", dir);
let workdir = &format!("{}/work", dir);
let mnt_opts = &format!(
Expand Down

0 comments on commit 8a051da

Please sign in to comment.