mirror of
https://github.com/containers/podman.git
synced 2025-11-14 01:57:58 +08:00
Vendor in containers/(storage,image, common, buildah)
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
This commit is contained in:
5
vendor/github.com/containers/buildah/selinux.go
generated
vendored
5
vendor/github.com/containers/buildah/selinux.go
generated
vendored
@@ -9,7 +9,6 @@ import (
|
||||
|
||||
"github.com/opencontainers/runtime-tools/generate"
|
||||
selinux "github.com/opencontainers/selinux/go-selinux"
|
||||
"github.com/pkg/errors"
|
||||
)
|
||||
|
||||
func selinuxGetEnabled() bool {
|
||||
@@ -30,12 +29,12 @@ func runLabelStdioPipes(stdioPipe [][]int, processLabel, mountLabel string) erro
|
||||
}
|
||||
pipeContext, err := selinux.ComputeCreateContext(processLabel, mountLabel, "fifo_file")
|
||||
if err != nil {
|
||||
return errors.Wrapf(err, "computing file creation context for pipes")
|
||||
return fmt.Errorf("computing file creation context for pipes: %w", err)
|
||||
}
|
||||
for i := range stdioPipe {
|
||||
pipeFdName := fmt.Sprintf("/proc/self/fd/%d", stdioPipe[i][0])
|
||||
if err := selinux.SetFileLabel(pipeFdName, pipeContext); err != nil && !os.IsNotExist(err) {
|
||||
return errors.Wrapf(err, "setting file label on %q", pipeFdName)
|
||||
return fmt.Errorf("setting file label on %q: %w", pipeFdName, err)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user