mirror of
https://github.com/containers/podman.git
synced 2025-10-17 11:14:40 +08:00
vendor: update c/{common,buildah} to main
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
This commit is contained in:
3
vendor/github.com/containers/buildah/chroot/selinux.go
generated
vendored
3
vendor/github.com/containers/buildah/chroot/selinux.go
generated
vendored
@ -7,7 +7,6 @@ import (
|
||||
|
||||
"github.com/opencontainers/runtime-spec/specs-go"
|
||||
selinux "github.com/opencontainers/selinux/go-selinux"
|
||||
"github.com/opencontainers/selinux/go-selinux/label"
|
||||
"github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
@ -15,7 +14,7 @@ import (
|
||||
func setSelinuxLabel(spec *specs.Spec) error {
|
||||
logrus.Debugf("setting selinux label")
|
||||
if spec.Process.SelinuxLabel != "" && selinux.GetEnabled() {
|
||||
if err := label.SetProcessLabel(spec.Process.SelinuxLabel); err != nil {
|
||||
if err := selinux.SetExecLabel(spec.Process.SelinuxLabel); err != nil {
|
||||
return fmt.Errorf("setting process label to %q: %w", spec.Process.SelinuxLabel, err)
|
||||
}
|
||||
}
|
||||
|
11
vendor/github.com/containers/buildah/imagebuildah/build.go
generated
vendored
11
vendor/github.com/containers/buildah/imagebuildah/build.go
generated
vendored
@ -418,17 +418,6 @@ func buildDockerfilesOnce(ctx context.Context, store storage.Store, logger *logr
|
||||
if options.SystemContext.VariantChoice != "" {
|
||||
builtinArgDefaults["TARGETPLATFORM"] += "/" + options.SystemContext.VariantChoice
|
||||
}
|
||||
} else {
|
||||
// fill them in using values for the default platform
|
||||
defaultPlatform := platforms.DefaultSpec()
|
||||
builtinArgDefaults["TARGETOS"] = defaultPlatform.OS
|
||||
builtinArgDefaults["TARGETVARIANT"] = defaultPlatform.Variant
|
||||
builtinArgDefaults["TARGETARCH"] = defaultPlatform.Architecture
|
||||
builtinArgDefaults["TARGETPLATFORM"] = defaultPlatform.OS + "/" + defaultPlatform.Architecture
|
||||
builtinArgDefaults["TARGETPLATFORM"] = defaultPlatform.OS + "/" + defaultPlatform.Architecture
|
||||
if defaultPlatform.Variant != "" {
|
||||
builtinArgDefaults["TARGETPLATFORM"] += "/" + defaultPlatform.Variant
|
||||
}
|
||||
}
|
||||
delete(options.Args, "TARGETPLATFORM")
|
||||
|
||||
|
6
vendor/github.com/containers/buildah/util.go
generated
vendored
6
vendor/github.com/containers/buildah/util.go
generated
vendored
@ -17,7 +17,7 @@ import (
|
||||
"github.com/containers/storage/pkg/reexec"
|
||||
v1 "github.com/opencontainers/image-spec/specs-go/v1"
|
||||
rspec "github.com/opencontainers/runtime-spec/specs-go"
|
||||
"github.com/opencontainers/selinux/go-selinux/label"
|
||||
"github.com/opencontainers/selinux/go-selinux"
|
||||
"github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
@ -154,9 +154,7 @@ func ReserveSELinuxLabels(store storage.Store, id string) error {
|
||||
return err
|
||||
}
|
||||
// Prevent different containers from using same MCS label
|
||||
if err := label.ReserveLabel(b.ProcessLabel); err != nil {
|
||||
return fmt.Errorf("reserving SELinux label %q: %w", b.ProcessLabel, err)
|
||||
}
|
||||
selinux.ReserveLabel(b.ProcessLabel)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
|
Reference in New Issue
Block a user