diff options
author | openshift-ci[bot] <75433959+openshift-ci[bot]@users.noreply.github.com> | 2021-08-03 12:33:59 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-03 12:33:59 +0000 |
commit | e93661f5e765d84893e2ad5a488682c0a67412d0 (patch) | |
tree | e4b3892449ebc578d4cadc0307559f14ba235967 /test | |
parent | d25f8d07b3bbc11be1caa0838a031f0e5dc223a8 (diff) | |
parent | 985c717085be3692bb25b498cdc8016ac00d5640 (diff) | |
download | podman-e93661f5e765d84893e2ad5a488682c0a67412d0.tar.gz podman-e93661f5e765d84893e2ad5a488682c0a67412d0.tar.bz2 podman-e93661f5e765d84893e2ad5a488682c0a67412d0.zip |
Merge pull request #11101 from rhatdan/selinux
Fix handling of user specified container labels
Diffstat (limited to 'test')
-rw-r--r-- | test/system/410-selinux.bats | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/system/410-selinux.bats b/test/system/410-selinux.bats index 4ef9c8b30..5ee0e0715 100644 --- a/test/system/410-selinux.bats +++ b/test/system/410-selinux.bats @@ -50,6 +50,18 @@ function check_label() { check_label "--systemd=always" "container_init_t" } +@test "podman selinux: init container with --security-opt type" { + check_label "--systemd=always --security-opt=label=type:spc_t" "spc_t" +} + +@test "podman selinux: init container with --security-opt level&type" { + check_label "--systemd=always --security-opt=label=level:s0:c1,c2 --security-opt=label=type:spc_t" "spc_t" "s0:c1,c2" +} + +@test "podman selinux: init container with --security-opt level" { + check_label "--systemd=always --security-opt=label=level:s0:c1,c2" "container_init_t" "s0:c1,c2" +} + @test "podman selinux: pid=host" { # FIXME this test fails when run rootless with runc: # Error: container_linux.go:367: starting container process caused: process_linux.go:495: container init caused: readonly path /proc/asound: operation not permitted: OCI permission denied |