Merge pull request #4705 from dweomer/selinx-relabel-dev-shm-but-not-with-hostipc
cri: selinuxrelabel=false for /dev/shm w/ host ipc
This commit is contained in:
commit
8efb17cc99
@ -102,7 +102,7 @@ func (c *criService) containerMounts(sandboxID string, config *runtime.Container
|
|||||||
ContainerPath: devShm,
|
ContainerPath: devShm,
|
||||||
HostPath: sandboxDevShm,
|
HostPath: sandboxDevShm,
|
||||||
Readonly: false,
|
Readonly: false,
|
||||||
SelinuxRelabel: true,
|
SelinuxRelabel: sandboxDevShm != devShm,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
return mounts
|
return mounts
|
||||||
|
@ -455,9 +455,10 @@ func TestContainerMounts(t *testing.T) {
|
|||||||
Readonly: true,
|
Readonly: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
ContainerPath: "/dev/shm",
|
ContainerPath: "/dev/shm",
|
||||||
HostPath: filepath.Join(testStateDir, sandboxesDir, testSandboxID, "shm"),
|
HostPath: filepath.Join(testStateDir, sandboxesDir, testSandboxID, "shm"),
|
||||||
Readonly: false,
|
Readonly: false,
|
||||||
|
SelinuxRelabel: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -480,9 +481,10 @@ func TestContainerMounts(t *testing.T) {
|
|||||||
Readonly: false,
|
Readonly: false,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
ContainerPath: "/dev/shm",
|
ContainerPath: "/dev/shm",
|
||||||
HostPath: filepath.Join(testStateDir, sandboxesDir, testSandboxID, "shm"),
|
HostPath: filepath.Join(testStateDir, sandboxesDir, testSandboxID, "shm"),
|
||||||
Readonly: false,
|
Readonly: false,
|
||||||
|
SelinuxRelabel: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -553,9 +555,10 @@ func TestContainerMounts(t *testing.T) {
|
|||||||
Readonly: false,
|
Readonly: false,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
ContainerPath: "/dev/shm",
|
ContainerPath: "/dev/shm",
|
||||||
HostPath: filepath.Join(testStateDir, sandboxesDir, testSandboxID, "shm"),
|
HostPath: filepath.Join(testStateDir, sandboxesDir, testSandboxID, "shm"),
|
||||||
Readonly: false,
|
Readonly: false,
|
||||||
|
SelinuxRelabel: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user