Skip to content

Commit 9961699

Browse files
committed
security_context: do not rely on /etc/hosts
It depends on runtime and CNI plugin used when testing. This patch uses /etc/passwd which should be always available instead. Signed-off-by: Antonio Murdaca <[email protected]>
1 parent 973eaea commit 9961699

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/validate/security_context.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -482,7 +482,7 @@ var _ = framework.KubeDescribe("Security Context", func() {
482482
podID, containerID = seccompTestContainer(rc, ic, localhost+blockchmodProfilePath)
483483

484484
By("verify seccomp profile")
485-
verifySeccomp(rc, containerID, []string{"chmod", "400", "/etc/hosts"}, true, "Operation not permitted") // seccomp denied
485+
verifySeccomp(rc, containerID, []string{"chmod", "400", "/"}, true, "Operation not permitted") // seccomp denied
486486
})
487487

488488
It("should support seccomp default which is unconfined on the container", func() {

0 commit comments

Comments
 (0)