summaryrefslogtreecommitdiff
path: root/libpod
diff options
context:
space:
mode:
authorDaniel J Walsh <dwalsh@redhat.com>2021-03-03 08:28:29 -0500
committerDaniel J Walsh <dwalsh@redhat.com>2021-03-03 16:49:51 -0500
commit252aec1c9ae7e7ed01a4b72cf208e3c0130eb7e7 (patch)
tree2aba6df6f8320f0b475120cf722956d21503daa7 /libpod
parent87e20560ac885c541784af1341098ce8e1e7a940 (diff)
downloadpodman-252aec1c9ae7e7ed01a4b72cf208e3c0130eb7e7.tar.gz
podman-252aec1c9ae7e7ed01a4b72cf208e3c0130eb7e7.tar.bz2
podman-252aec1c9ae7e7ed01a4b72cf208e3c0130eb7e7.zip
Check for supportsKVM based on basename of the runtime
Fixes: https://github.com/containers/podman/issues/9582 This PR also adds tests to make sure SELinux labels match the runtime, or if init is specified works with the correct label. Add tests for selinux kvm/init labels Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Diffstat (limited to 'libpod')
-rw-r--r--libpod/oci_conmon_linux.go8
1 files changed, 5 insertions, 3 deletions
diff --git a/libpod/oci_conmon_linux.go b/libpod/oci_conmon_linux.go
index 492bc807a..ef5f6fb0c 100644
--- a/libpod/oci_conmon_linux.go
+++ b/libpod/oci_conmon_linux.go
@@ -113,9 +113,11 @@ func newConmonOCIRuntime(name string, paths []string, conmonPath string, runtime
// TODO: probe OCI runtime for feature and enable automatically if
// available.
- runtime.supportsJSON = supportsJSON[name]
- runtime.supportsNoCgroups = supportsNoCgroups[name]
- runtime.supportsKVM = supportsKVM[name]
+
+ base := filepath.Base(name)
+ runtime.supportsJSON = supportsJSON[base]
+ runtime.supportsNoCgroups = supportsNoCgroups[base]
+ runtime.supportsKVM = supportsKVM[base]
foundPath := false
for _, path := range paths {