summaryrefslogtreecommitdiff
path: root/libpod/util.go
diff options
context:
space:
mode:
authorDaniel J Walsh <dwalsh@redhat.com>2019-10-29 17:08:15 -0400
committerDaniel J Walsh <dwalsh@redhat.com>2019-11-05 04:09:01 -0500
commit65ed81993223e96243e0380b34afa40296ea11b3 (patch)
treea0a1ccd29f5f5ed0f1a57e6924c22751995ec18c /libpod/util.go
parentcc19b09b44634fe689c2a8b2e9b0102adf47c419 (diff)
downloadpodman-65ed81993223e96243e0380b34afa40296ea11b3.tar.gz
podman-65ed81993223e96243e0380b34afa40296ea11b3.tar.bz2
podman-65ed81993223e96243e0380b34afa40296ea11b3.zip
Set SELinux labels based on the security context in the kube.yaml
If the kube.yaml specifieds the SELinux type or Level, we need the container to be launched with the correct label. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Diffstat (limited to 'libpod/util.go')
-rw-r--r--libpod/util.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/libpod/util.go b/libpod/util.go
index 7bd834e30..bae2f4eb8 100644
--- a/libpod/util.go
+++ b/libpod/util.go
@@ -187,6 +187,9 @@ func programVersion(mountProgram string) (string, error) {
return strings.TrimSuffix(output, "\n"), nil
}
+// DefaultSeccompPath returns the path to the default seccomp.json file
+// if it exists, first it checks OverrideSeccomp and then default.
+// If neither exist function returns ""
func DefaultSeccompPath() (string, error) {
_, err := os.Stat(config.SeccompOverridePath)
if err == nil {