Skip to content

Commit

Permalink
security_context: do not rely on /etc/hosts
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
runcom committed Oct 19, 2017
1 parent 973eaea commit a0ee862
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/validate/security_context.go
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,7 @@ var _ = framework.KubeDescribe("Security Context", func() {
podID, containerID = seccompTestContainer(rc, ic, localhost+blockchmodProfilePath)

By("verify seccomp profile")
verifySeccomp(rc, containerID, []string{"chmod", "400", "/etc/hosts"}, true, "Operation not permitted") // seccomp denied
verifySeccomp(rc, containerID, []string{"chmod", "400", "/etc/passwd"}, true, "Operation not permitted") // seccomp denied
})

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

0 comments on commit a0ee862

Please sign in to comment.