cri-o/server
Antonio Murdaca a11b8cd8ec
sandbox, ctr: SELinux fixes
server: fix selinux labels for pod and containers

Signed-off-by: Antonio Murdaca <runcom@redhat.com>

sandbox: set selinux labels from request, not defaults

Signed-off-by: Antonio Murdaca <runcom@redhat.com>

container_create: use sandbox's selinux if container's nil

Signed-off-by: Antonio Murdaca <runcom@redhat.com>

sandbox: correctly init selinux labels

First, we weren't correctly initializing selinux labels. If any of
(level, user, role, type) was missing from kube selinux options, we
were erroring out. This is wrong as kube sends just `level=s0`
sometimes and docker itself allows `--security-opt label=level:s0`.
This patch directly initializes selinux labels, correctly, and adds a
test to verify it.

Signed-off-by: Antonio Murdaca <runcom@redhat.com>

test: testdata: use container_runtime_t selinux type

RHEL SELinux policy doesn't have `container_t` type but we're using it
in our fixtures. That means Fedora integration tests pass because
`container_t` is in Fedora's container policy but RHEL is broken.
Fix it by using `container_runtime_t` which is aliased in Fedora policy
to `container_t`.

Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2017-09-17 22:40:17 +02:00
..
apparmor Rename ocid to crio. 2017-05-12 09:56:06 -04:00
seccomp seccomp: use Prctl() from x/sys/unix 2017-07-18 15:34:23 +02:00
config.go Make kpod parse configuration file 2017-09-01 11:14:40 -05:00
container_attach.go *: update kube vendor to v1.7.4 2017-08-22 17:32:14 +02:00
container_create.go sandbox, ctr: SELinux fixes 2017-09-17 22:40:17 +02:00
container_exec.go *: update kube vendor to v1.7.4 2017-08-22 17:32:14 +02:00
container_execsync.go *: update kube vendor to v1.7.4 2017-08-22 17:32:14 +02:00
container_list.go *: update kube vendor to v1.7.4 2017-08-22 17:32:14 +02:00
container_portforward.go *: update kube vendor to v1.7.4 2017-08-22 17:32:14 +02:00
container_remove.go Implement kpod rm 2017-09-05 14:35:36 -04:00
container_start.go *: update kube vendor to v1.7.4 2017-08-22 17:32:14 +02:00
container_stats.go *: update kube vendor to v1.7.4 2017-08-22 17:32:14 +02:00
container_stats_list.go *: update kube vendor to v1.7.4 2017-08-22 17:32:14 +02:00
container_status.go oci: wait a while for exit file to show up 2017-08-29 11:25:51 +02:00
container_stop.go Implement kpod rm 2017-09-05 14:35:36 -04:00
container_updateruntimeconfig.go *: update kube vendor to v1.7.4 2017-08-22 17:32:14 +02:00
image_fs_info.go *: update kube vendor to v1.7.4 2017-08-22 17:32:14 +02:00
image_list.go server: image_list: report image size 2017-08-31 17:50:25 +02:00
image_pull.go *: update kube vendor to v1.7.4 2017-08-22 17:32:14 +02:00
image_remove.go *: update kube vendor to v1.7.4 2017-08-22 17:32:14 +02:00
image_status.go *: update kube vendor to v1.7.4 2017-08-22 17:32:14 +02:00
inspect.go server: add inspect unit test 2017-09-17 10:19:29 +02:00
inspect_test.go test: add inspect integration tests 2017-09-17 10:19:31 +02:00
naming.go server: Rename infra container to POD 2017-09-01 08:47:55 -07:00
runtime_status.go *: update kube vendor to v1.7.4 2017-08-22 17:32:14 +02:00
sandbox_list.go *: update kube vendor to v1.7.4 2017-08-22 17:32:14 +02:00
sandbox_network.go server: clean up sandbox network when running the sandbox fails 2017-09-11 14:19:27 -05:00
sandbox_remove.go server: Add special k8s label to infra containers 2017-09-01 10:25:04 -07:00
sandbox_run.go sandbox, ctr: SELinux fixes 2017-09-17 22:40:17 +02:00
sandbox_status.go *: store sandbox IP 2017-09-02 02:05:12 +02:00
sandbox_stop.go server: clean up sandbox network when running the sandbox fails 2017-09-11 14:19:27 -05:00
server.go Merge pull request #852 from runcom/fixies-42 2017-09-07 07:37:37 -07:00
utils.go container_create: handle cap add/drop ALL 2017-09-07 16:43:33 +02:00
version.go *: update kube vendor to v1.7.4 2017-08-22 17:32:14 +02:00