summaryrefslogtreecommitdiff
path: root/pkg/spec/config_linux.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2019-07-03 15:58:26 +0200
committerGitHub <noreply@github.com>2019-07-03 15:58:26 +0200
commita22a32a0a5507811168e0251a92122cf3e74ef51 (patch)
tree28f9cd8cfb7b45bf94e5c84b0cb19136c95c6749 /pkg/spec/config_linux.go
parentbf7d5a9ce8455e4480b5e0ef92b02099f119ee71 (diff)
parent473d0604546ef472f167ee671fdf1110bf74eb63 (diff)
downloadpodman-a22a32a0a5507811168e0251a92122cf3e74ef51.tar.gz
podman-a22a32a0a5507811168e0251a92122cf3e74ef51.tar.bz2
podman-a22a32a0a5507811168e0251a92122cf3e74ef51.zip
Merge pull request #3437 from giuseppe/fix-nocgo
build: allow to build without cgo on RISC-V
Diffstat (limited to 'pkg/spec/config_linux.go')
-rw-r--r--pkg/spec/config_linux.go25
1 files changed, 0 insertions, 25 deletions
diff --git a/pkg/spec/config_linux.go b/pkg/spec/config_linux.go
index eb2acf984..9f6a4a058 100644
--- a/pkg/spec/config_linux.go
+++ b/pkg/spec/config_linux.go
@@ -4,12 +4,10 @@ package createconfig
import (
"fmt"
- "io/ioutil"
"os"
"path/filepath"
"strings"
- "github.com/docker/docker/profiles/seccomp"
"github.com/opencontainers/runc/libcontainer/configs"
"github.com/opencontainers/runc/libcontainer/devices"
spec "github.com/opencontainers/runtime-spec/specs-go"
@@ -130,29 +128,6 @@ func (c *CreateConfig) addPrivilegedDevices(g *generate.Generator) error {
return nil
}
-func getSeccompConfig(config *CreateConfig, configSpec *spec.Spec) (*spec.LinuxSeccomp, error) {
- var seccompConfig *spec.LinuxSeccomp
- var err error
-
- if config.SeccompProfilePath != "" {
- seccompProfile, err := ioutil.ReadFile(config.SeccompProfilePath)
- if err != nil {
- return nil, errors.Wrapf(err, "opening seccomp profile (%s) failed", config.SeccompProfilePath)
- }
- seccompConfig, err = seccomp.LoadProfile(string(seccompProfile), configSpec)
- if err != nil {
- return nil, errors.Wrapf(err, "loading seccomp profile (%s) failed", config.SeccompProfilePath)
- }
- } else {
- seccompConfig, err = seccomp.GetDefaultProfile(configSpec)
- if err != nil {
- return nil, errors.Wrapf(err, "loading seccomp profile (%s) failed", config.SeccompProfilePath)
- }
- }
-
- return seccompConfig, nil
-}
-
func (c *CreateConfig) createBlockIO() (*spec.LinuxBlockIO, error) {
var ret *spec.LinuxBlockIO
bio := &spec.LinuxBlockIO{}