mirror of
https://github.com/opencontainers/runc.git
synced 2026-11-06 05:17:05 +00:00
Merge pull request #3451 from dsouzai/ns_last_pid
Allow mounting of /proc/sys/kernel/ns_last_pid
This commit is contained in:
2 files changed
+9
No files matched your search
@@ -554,6 +554,7 @@ func checkProcMount(rootfs, dest, source string) error {
|
||||
"/proc/loadavg",
|
||||
"/proc/slabinfo",
|
||||
"/proc/net/dev",
|
||||
"/proc/sys/kernel/ns_last_pid",
|
||||
}
|
||||
for _, valid := range validProcMounts {
|
||||
path, err := filepath.Rel(filepath.Join(rootfs, valid), dest)
|
||||
|
||||
@@ -38,6 +38,14 @@ func TestCheckMountDestFalsePositive(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestCheckMountDestNsLastPid(t *testing.T) {
|
||||
dest := "/rootfs/proc/sys/kernel/ns_last_pid"
|
||||
err := checkProcMount("/rootfs", dest, "/proc")
|
||||
if err != nil {
|
||||
t.Fatal("/proc/sys/kernel/ns_last_pid should not return an error")
|
||||
}
|
||||
}
|
||||
|
||||
func TestNeedsSetupDev(t *testing.T) {
|
||||
config := &configs.Config{
|
||||
Mounts: []*configs.Mount{
|
||||
|
||||
Reference in new issue
Block a user