mirror of
https://github.com/containers/podman.git
synced 2025-11-13 09:38:05 +08:00
update buildah to latest and use new network stack
Make sure buildah uses the new network stack. Signed-off-by: Paul Holzinger <pholzing@redhat.com>
This commit is contained in:
27
vendor/github.com/containers/buildah/chroot/seccomp.go
generated
vendored
27
vendor/github.com/containers/buildah/chroot/seccomp.go
generated
vendored
@@ -3,6 +3,9 @@
|
||||
package chroot
|
||||
|
||||
import (
|
||||
"io/ioutil"
|
||||
|
||||
"github.com/containers/common/pkg/seccomp"
|
||||
specs "github.com/opencontainers/runtime-spec/specs-go"
|
||||
"github.com/pkg/errors"
|
||||
libseccomp "github.com/seccomp/libseccomp-golang"
|
||||
@@ -171,3 +174,27 @@ func setSeccomp(spec *specs.Spec) error {
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func setupSeccomp(spec *specs.Spec, seccompProfilePath string) error {
|
||||
switch seccompProfilePath {
|
||||
case "unconfined":
|
||||
spec.Linux.Seccomp = nil
|
||||
case "":
|
||||
seccompConfig, err := seccomp.GetDefaultProfile(spec)
|
||||
if err != nil {
|
||||
return errors.Wrapf(err, "loading default seccomp profile failed")
|
||||
}
|
||||
spec.Linux.Seccomp = seccompConfig
|
||||
default:
|
||||
seccompProfile, err := ioutil.ReadFile(seccompProfilePath)
|
||||
if err != nil {
|
||||
return errors.Wrapf(err, "opening seccomp profile (%s) failed", seccompProfilePath)
|
||||
}
|
||||
seccompConfig, err := seccomp.LoadProfile(string(seccompProfile), spec)
|
||||
if err != nil {
|
||||
return errors.Wrapf(err, "loading seccomp profile (%s) failed", seccompProfilePath)
|
||||
}
|
||||
spec.Linux.Seccomp = seccompConfig
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user