server: add RO and masked paths on container creation
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
This commit is contained in:
parent
81cfba283a
commit
1d455a31a9
1 changed files with 21 additions and 0 deletions
|
@ -462,6 +462,27 @@ func (s *Server) createSandboxContainer(ctx context.Context, containerID string,
|
||||||
specgen.SetProcessSelinuxLabel(sb.processLabel)
|
specgen.SetProcessSelinuxLabel(sb.processLabel)
|
||||||
specgen.SetLinuxMountLabel(sb.mountLabel)
|
specgen.SetLinuxMountLabel(sb.mountLabel)
|
||||||
|
|
||||||
|
for _, mp := range []string{
|
||||||
|
"/proc/kcore",
|
||||||
|
"/proc/latency_stats",
|
||||||
|
"/proc/timer_list",
|
||||||
|
"/proc/timer_stats",
|
||||||
|
"/proc/sched_debug",
|
||||||
|
"/sys/firmware",
|
||||||
|
} {
|
||||||
|
specgen.AddLinuxMaskedPaths(mp)
|
||||||
|
}
|
||||||
|
|
||||||
|
for _, rp := range []string{
|
||||||
|
"/proc/asound",
|
||||||
|
"/proc/bus",
|
||||||
|
"/proc/fs",
|
||||||
|
"/proc/irq",
|
||||||
|
"/proc/sys",
|
||||||
|
"/proc/sysrq-trigger",
|
||||||
|
} {
|
||||||
|
specgen.AddLinuxReadonlyPaths(rp)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// Join the namespace paths for the pod sandbox container.
|
// Join the namespace paths for the pod sandbox container.
|
||||||
podInfraState := s.runtime.ContainerStatus(sb.infraContainer)
|
podInfraState := s.runtime.ContainerStatus(sb.infraContainer)
|
||||||
|
|
Loading…
Reference in a new issue