X Tutup
Skip to content

Commit 7c4bca5

Browse files
authored
Merge pull request containerd#1600 from AkihiroSuda/defaultspec
spec: set MaskedPaths and ReadOnlyPaths by default
2 parents 72a3a01 + d7b0e52 commit 7c4bca5

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

spec_unix.go

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,24 @@ func createDefaultSpec() (*specs.Spec, error) {
136136
},
137137
},
138138
Linux: &specs.Linux{
139+
// TODO (AkihiroSuda): unmask /sys/firmware on Windows daemon for LCOW support?
140+
// https://github.com/moby/moby/pull/33241/files#diff-a1f5051ce84e711a2ee688ab9ded5e74R215
141+
MaskedPaths: []string{
142+
"/proc/kcore",
143+
"/proc/latency_stats",
144+
"/proc/timer_list",
145+
"/proc/timer_stats",
146+
"/proc/sched_debug",
147+
"/sys/firmware",
148+
},
149+
ReadonlyPaths: []string{
150+
"/proc/asound",
151+
"/proc/bus",
152+
"/proc/fs",
153+
"/proc/irq",
154+
"/proc/sys",
155+
"/proc/sysrq-trigger",
156+
},
139157
// TODO (@crosbymichael) make sure we don't have have two containers in the same cgroup
140158
Resources: &specs.LinuxResources{
141159
Devices: []specs.LinuxDeviceCgroup{

0 commit comments

Comments
 (0)
X Tutup