mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-07-21 10:51:05 +00:00
runtime: virtcontainers: make rootfs image read-only
Improve security by making rootfs image read-only, nobody will be able to modify it from the guest. fixes #1916 Signed-off-by: Julio Montes <julio.montes@intel.com>
This commit is contained in:
parent
6456cb282b
commit
d3bab50496
@ -153,6 +153,7 @@ func TestQemuAmd64AppendImage(t *testing.T) {
|
|||||||
ID: "mem0",
|
ID: "mem0",
|
||||||
MemPath: f.Name(),
|
MemPath: f.Name(),
|
||||||
Size: (uint64)(imageStat.Size()),
|
Size: (uint64)(imageStat.Size()),
|
||||||
|
ReadOnly: true,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -378,6 +378,7 @@ func (q *qemuArchBase) appendNvdimmImage(devices []govmmQemu.Device, path string
|
|||||||
ID: "mem0",
|
ID: "mem0",
|
||||||
MemPath: path,
|
MemPath: path,
|
||||||
Size: (uint64)(imageStat.Size()),
|
Size: (uint64)(imageStat.Size()),
|
||||||
|
ReadOnly: true,
|
||||||
}
|
}
|
||||||
|
|
||||||
devices = append(devices, object)
|
devices = append(devices, object)
|
||||||
|
Loading…
Reference in New Issue
Block a user