summaryrefslogtreecommitdiff
path: root/libpod/util.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2019-10-29 20:58:51 +0100
committerGitHub <noreply@github.com>2019-10-29 20:58:51 +0100
commite7540d0406c49b22de245246d16ebc6e1778df37 (patch)
treed25a5f8d259d19f2c0017d9987e93d065e577f89 /libpod/util.go
parent5918f3a5f1d11862fbaaca94ff25f1d9cc1309e2 (diff)
parent66c126d6dee178f96f8a120f13372802d46ea9b5 (diff)
downloadpodman-e7540d0406c49b22de245246d16ebc6e1778df37.tar.gz
podman-e7540d0406c49b22de245246d16ebc6e1778df37.tar.bz2
podman-e7540d0406c49b22de245246d16ebc6e1778df37.zip
Merge pull request #4310 from nalind/manifest-lists
Move to containers/image v5, support manifest lists
Diffstat (limited to 'libpod/util.go')
-rw-r--r--libpod/util.go17
1 files changed, 17 insertions, 0 deletions
diff --git a/libpod/util.go b/libpod/util.go
index 84fd490bf..5ae5ab491 100644
--- a/libpod/util.go
+++ b/libpod/util.go
@@ -189,3 +189,20 @@ func programVersion(mountProgram string) (string, error) {
}
return strings.TrimSuffix(output, "\n"), nil
}
+
+func DefaultSeccompPath() (string, error) {
+ _, err := os.Stat(SeccompOverridePath)
+ if err == nil {
+ return SeccompOverridePath, nil
+ }
+ if !os.IsNotExist(err) {
+ return "", errors.Wrapf(err, "can't check if %q exists", SeccompOverridePath)
+ }
+ if _, err := os.Stat(SeccompDefaultPath); err != nil {
+ if !os.IsNotExist(err) {
+ return "", errors.Wrapf(err, "can't check if %q exists", SeccompDefaultPath)
+ }
+ return "", nil
+ }
+ return SeccompDefaultPath, nil
+}