diff options
author | Max Goltzsche <max.goltzsche@gmail.com> | 2021-01-02 00:20:10 +0100 |
---|---|---|
committer | Max Goltzsche <max.goltzsche@gmail.com> | 2021-01-02 01:38:19 +0100 |
commit | bd35792b0c1372aacd344e324f04529f16cf0711 (patch) | |
tree | a0584a82e356bb15eb915174601c62cdcc57a469 /test | |
parent | 39b1cb496766ec3be248f178375d663bc0a14f4a (diff) | |
download | podman-bd35792b0c1372aacd344e324f04529f16cf0711.tar.gz podman-bd35792b0c1372aacd344e324f04529f16cf0711.tar.bz2 podman-bd35792b0c1372aacd344e324f04529f16cf0711.zip |
fix: disable seccomp by default when privileged.
When running a privileged container and `SeccompProfilePath` is empty no seccomp profile should be applied.
(Previously this was the case only if `SeccompProfilePath` was set to a non-empty default path.)
Closes #8849
Signed-off-by: Max Goltzsche <max.goltzsche@gmail.com>
Diffstat (limited to 'test')
-rw-r--r-- | test/e2e/run_privileged_test.go | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/e2e/run_privileged_test.go b/test/e2e/run_privileged_test.go index 760de55b6..623a160a6 100644 --- a/test/e2e/run_privileged_test.go +++ b/test/e2e/run_privileged_test.go @@ -110,6 +110,15 @@ var _ = Describe("Podman privileged container tests", func() { Expect("0000000000000000").To(Equal(capEff[1])) }) + It("podman privileged should disable seccomp by default", func() { + hostSeccomp := SystemExec("grep", []string{"-Ei", "^Seccomp:\\s+0$", "/proc/self/status"}) + Expect(hostSeccomp.ExitCode()).To(Equal(0)) + + session := podmanTest.Podman([]string{"run", "--privileged", ALPINE, "grep", "-Ei", "^Seccomp:\\s+0$", "/proc/self/status"}) + session.WaitWithDefaultTimeout() + Expect(session.ExitCode()).To(Equal(0)) + }) + It("podman non-privileged should have very few devices", func() { session := podmanTest.Podman([]string{"run", "-t", "busybox", "ls", "-l", "/dev"}) session.WaitWithDefaultTimeout() |