mirror of
https://github.com/containers/podman.git
synced 2025-09-28 17:25:31 +08:00
Bump github.com/containers/common from 0.35.3 to 0.35.4
Bumps [github.com/containers/common](https://github.com/containers/common) from 0.35.3 to 0.35.4. - [Release notes](https://github.com/containers/common/releases) - [Commits](https://github.com/containers/common/compare/v0.35.3...v0.35.4) Signed-off-by: dependabot[bot] <support@github.com>
This commit is contained in:
2
go.mod
2
go.mod
@ -11,7 +11,7 @@ require (
|
|||||||
github.com/containernetworking/cni v0.8.1
|
github.com/containernetworking/cni v0.8.1
|
||||||
github.com/containernetworking/plugins v0.9.1
|
github.com/containernetworking/plugins v0.9.1
|
||||||
github.com/containers/buildah v1.19.8
|
github.com/containers/buildah v1.19.8
|
||||||
github.com/containers/common v0.35.3
|
github.com/containers/common v0.35.4
|
||||||
github.com/containers/conmon v2.0.20+incompatible
|
github.com/containers/conmon v2.0.20+incompatible
|
||||||
github.com/containers/image/v5 v5.10.5
|
github.com/containers/image/v5 v5.10.5
|
||||||
github.com/containers/ocicrypt v1.1.0
|
github.com/containers/ocicrypt v1.1.0
|
||||||
|
4
go.sum
4
go.sum
@ -179,8 +179,8 @@ github.com/containernetworking/plugins v0.9.1/go.mod h1:xP/idU2ldlzN6m4p5LmGiwRD
|
|||||||
github.com/containers/buildah v1.19.8 h1:4TzmetfKPQF5hh6GgMwbAfrD50j+PAcsRiWDnx+gCI8=
|
github.com/containers/buildah v1.19.8 h1:4TzmetfKPQF5hh6GgMwbAfrD50j+PAcsRiWDnx+gCI8=
|
||||||
github.com/containers/buildah v1.19.8/go.mod h1:VnyHWgNmfR1d89/zJ/F4cbwOzaQS+6sBky46W7dCo3E=
|
github.com/containers/buildah v1.19.8/go.mod h1:VnyHWgNmfR1d89/zJ/F4cbwOzaQS+6sBky46W7dCo3E=
|
||||||
github.com/containers/common v0.33.4/go.mod h1:PhgL71XuC4jJ/1BIqeP7doke3aMFkCP90YBXwDeUr9g=
|
github.com/containers/common v0.33.4/go.mod h1:PhgL71XuC4jJ/1BIqeP7doke3aMFkCP90YBXwDeUr9g=
|
||||||
github.com/containers/common v0.35.3 h1:6tEBSIHlJzpmt35zA1ZcjBqbtUilAHDWaa7buPvaqWY=
|
github.com/containers/common v0.35.4 h1:szyWRncsHkBwCVpu1dkEOXUjkwCetlfcLmKJTwo1Sp8=
|
||||||
github.com/containers/common v0.35.3/go.mod h1:rMzxgD7nMGw++cEbsp+NZv0UJO4rgXbm7F7IbJPTwIE=
|
github.com/containers/common v0.35.4/go.mod h1:rMzxgD7nMGw++cEbsp+NZv0UJO4rgXbm7F7IbJPTwIE=
|
||||||
github.com/containers/conmon v2.0.20+incompatible h1:YbCVSFSCqFjjVwHTPINGdMX1F6JXHGTUje2ZYobNrkg=
|
github.com/containers/conmon v2.0.20+incompatible h1:YbCVSFSCqFjjVwHTPINGdMX1F6JXHGTUje2ZYobNrkg=
|
||||||
github.com/containers/conmon v2.0.20+incompatible/go.mod h1:hgwZ2mtuDrppv78a/cOBNiCm6O0UMWGx1mu7P00nu5I=
|
github.com/containers/conmon v2.0.20+incompatible/go.mod h1:hgwZ2mtuDrppv78a/cOBNiCm6O0UMWGx1mu7P00nu5I=
|
||||||
github.com/containers/image/v5 v5.10.1/go.mod h1:JlRLJZv7elVbtHaaaR6Kz8i6G3k2ttj4t7fubwxD9Hs=
|
github.com/containers/image/v5 v5.10.1/go.mod h1:JlRLJZv7elVbtHaaaR6Kz8i6G3k2ttj4t7fubwxD9Hs=
|
||||||
|
49
vendor/github.com/containers/common/pkg/capabilities/capabilities.go
generated
vendored
49
vendor/github.com/containers/common/pkg/capabilities/capabilities.go
generated
vendored
@ -7,6 +7,7 @@ package capabilities
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"strings"
|
"strings"
|
||||||
|
"sync"
|
||||||
|
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
"github.com/syndtr/gocapability/capability"
|
"github.com/syndtr/gocapability/capability"
|
||||||
@ -27,7 +28,7 @@ var (
|
|||||||
ContainerImageLabels = []string{"io.containers.capabilities"}
|
ContainerImageLabels = []string{"io.containers.capabilities"}
|
||||||
)
|
)
|
||||||
|
|
||||||
// All is a special value used to add/drop all known capababilities.
|
// All is a special value used to add/drop all known capabilities.
|
||||||
// Useful on the CLI for `--cap-add=all` etc.
|
// Useful on the CLI for `--cap-add=all` etc.
|
||||||
const All = "ALL"
|
const All = "ALL"
|
||||||
|
|
||||||
@ -60,24 +61,36 @@ func stringInSlice(s string, sl []string) bool {
|
|||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var (
|
||||||
|
boundingSetOnce sync.Once
|
||||||
|
boundingSetRet []string
|
||||||
|
boundingSetErr error
|
||||||
|
)
|
||||||
|
|
||||||
// BoundingSet returns the capabilities in the current bounding set
|
// BoundingSet returns the capabilities in the current bounding set
|
||||||
func BoundingSet() ([]string, error) {
|
func BoundingSet() ([]string, error) {
|
||||||
currentCaps, err := capability.NewPid2(0)
|
boundingSetOnce.Do(func() {
|
||||||
if err != nil {
|
currentCaps, err := capability.NewPid2(0)
|
||||||
return nil, err
|
if err != nil {
|
||||||
}
|
boundingSetErr = err
|
||||||
err = currentCaps.Load()
|
return
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
var r []string
|
|
||||||
for _, c := range capsList {
|
|
||||||
if !currentCaps.Get(capability.BOUNDING, c) {
|
|
||||||
continue
|
|
||||||
}
|
}
|
||||||
r = append(r, getCapName(c))
|
err = currentCaps.Load()
|
||||||
}
|
if err != nil {
|
||||||
return r, nil
|
boundingSetErr = err
|
||||||
|
return
|
||||||
|
}
|
||||||
|
var r []string
|
||||||
|
for _, c := range capsList {
|
||||||
|
if !currentCaps.Get(capability.BOUNDING, c) {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
r = append(r, getCapName(c))
|
||||||
|
}
|
||||||
|
boundingSetRet = r
|
||||||
|
boundingSetErr = err
|
||||||
|
})
|
||||||
|
return boundingSetRet, boundingSetErr
|
||||||
}
|
}
|
||||||
|
|
||||||
// AllCapabilities returns all known capabilities.
|
// AllCapabilities returns all known capabilities.
|
||||||
@ -116,7 +129,7 @@ func ValidateCapabilities(caps []string) error {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// MergeCapabilities computes a set of capabilities by adding capapbitilities
|
// MergeCapabilities computes a set of capabilities by adding capabilities
|
||||||
// to or dropping them from base.
|
// to or dropping them from base.
|
||||||
//
|
//
|
||||||
// Note that:
|
// Note that:
|
||||||
@ -150,7 +163,7 @@ func MergeCapabilities(base, adds, drops []string) ([]string, error) {
|
|||||||
|
|
||||||
if stringInSlice(All, capAdd) {
|
if stringInSlice(All, capAdd) {
|
||||||
// "Add" all capabilities;
|
// "Add" all capabilities;
|
||||||
return capabilityList, nil
|
return BoundingSet()
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, add := range capAdd {
|
for _, add := range capAdd {
|
||||||
|
2
vendor/github.com/containers/common/pkg/config/default.go
generated
vendored
2
vendor/github.com/containers/common/pkg/config/default.go
generated
vendored
@ -45,7 +45,7 @@ var (
|
|||||||
// DefaultInitPath is the default path to the container-init binary
|
// DefaultInitPath is the default path to the container-init binary
|
||||||
DefaultInitPath = "/usr/libexec/podman/catatonit"
|
DefaultInitPath = "/usr/libexec/podman/catatonit"
|
||||||
// DefaultInfraImage to use for infra container
|
// DefaultInfraImage to use for infra container
|
||||||
DefaultInfraImage = "k8s.gcr.io/pause:3.4.1"
|
DefaultInfraImage = "k8s.gcr.io/pause:3.5"
|
||||||
// DefaultRootlessSHMLockPath is the default path for rootless SHM locks
|
// DefaultRootlessSHMLockPath is the default path for rootless SHM locks
|
||||||
DefaultRootlessSHMLockPath = "/libpod_rootless_lock"
|
DefaultRootlessSHMLockPath = "/libpod_rootless_lock"
|
||||||
// DefaultDetachKeys is the default keys sequence for detaching a
|
// DefaultDetachKeys is the default keys sequence for detaching a
|
||||||
|
95
vendor/github.com/containers/common/pkg/seccomp/supported.go
generated
vendored
95
vendor/github.com/containers/common/pkg/seccomp/supported.go
generated
vendored
@ -3,72 +3,47 @@
|
|||||||
package seccomp
|
package seccomp
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"bufio"
|
"sync"
|
||||||
"errors"
|
|
||||||
"os"
|
|
||||||
"strings"
|
|
||||||
|
|
||||||
perrors "github.com/pkg/errors"
|
|
||||||
"golang.org/x/sys/unix"
|
"golang.org/x/sys/unix"
|
||||||
)
|
)
|
||||||
|
|
||||||
const statusFilePath = "/proc/self/status"
|
var (
|
||||||
|
supported bool
|
||||||
|
supOnce sync.Once
|
||||||
|
)
|
||||||
|
|
||||||
// IsSupported returns true if the system has been configured to support
|
// IsSupported returns true if the system has been configured to support
|
||||||
// seccomp.
|
// seccomp (including the check for CONFIG_SECCOMP_FILTER kernel option).
|
||||||
func IsSupported() bool {
|
func IsSupported() bool {
|
||||||
// Since Linux 3.8, the Seccomp field of the /proc/[pid]/status file
|
// Excerpts from prctl(2), section ERRORS:
|
||||||
// provides a method of obtaining the same information, without the risk
|
//
|
||||||
// that the process is killed; see proc(5).
|
// EACCES
|
||||||
status, err := parseStatusFile(statusFilePath)
|
// option is PR_SET_SECCOMP and arg2 is SECCOMP_MODE_FILTER, but
|
||||||
if err == nil {
|
// the process does not have the CAP_SYS_ADMIN capability or has
|
||||||
_, ok := status["Seccomp"]
|
// not set the no_new_privs attribute <...>.
|
||||||
return ok
|
// <...>
|
||||||
}
|
// EFAULT
|
||||||
|
// option is PR_SET_SECCOMP, arg2 is SECCOMP_MODE_FILTER, the
|
||||||
|
// system was built with CONFIG_SECCOMP_FILTER, and arg3 is an
|
||||||
|
// invalid address.
|
||||||
|
// <...>
|
||||||
|
// EINVAL
|
||||||
|
// option is PR_SET_SECCOMP or PR_GET_SECCOMP, and the kernel
|
||||||
|
// was not configured with CONFIG_SECCOMP.
|
||||||
|
//
|
||||||
|
// EINVAL
|
||||||
|
// option is PR_SET_SECCOMP, arg2 is SECCOMP_MODE_FILTER,
|
||||||
|
// and the kernel was not configured with CONFIG_SECCOMP_FILTER.
|
||||||
|
// <end of quote>
|
||||||
|
//
|
||||||
|
// Meaning, in case these kernel options are set (this is what we check
|
||||||
|
// for here), we will get some other error (most probably EACCES or
|
||||||
|
// EFAULT). IOW, EINVAL means "seccomp not supported", any other error
|
||||||
|
// means it is supported.
|
||||||
|
|
||||||
// PR_GET_SECCOMP (since Linux 2.6.23)
|
supOnce.Do(func() {
|
||||||
// Return (as the function result) the secure computing mode of the calling
|
supported = unix.Prctl(unix.PR_SET_SECCOMP, unix.SECCOMP_MODE_FILTER, 0, 0, 0) != unix.EINVAL
|
||||||
// thread. If the caller is not in secure computing mode, this operation
|
})
|
||||||
// returns 0; if the caller is in strict secure computing mode, then the
|
return supported
|
||||||
// prctl() call will cause a SIGKILL signal to be sent to the process. If
|
|
||||||
// the caller is in filter mode, and this system call is allowed by the
|
|
||||||
// seccomp filters, it returns 2; otherwise, the process is killed with a
|
|
||||||
// SIGKILL signal. This operation is available only if the kernel is
|
|
||||||
// configured with CONFIG_SECCOMP enabled.
|
|
||||||
if err := unix.Prctl(unix.PR_GET_SECCOMP, 0, 0, 0, 0); !errors.Is(err, unix.EINVAL) {
|
|
||||||
// Make sure the kernel has CONFIG_SECCOMP_FILTER.
|
|
||||||
if err := unix.Prctl(unix.PR_SET_SECCOMP, unix.SECCOMP_MODE_FILTER, 0, 0, 0); !errors.Is(err, unix.EINVAL) {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// parseStatusFile reads the provided `file` into a map of strings.
|
|
||||||
func parseStatusFile(file string) (map[string]string, error) {
|
|
||||||
f, err := os.Open(file)
|
|
||||||
if err != nil {
|
|
||||||
return nil, perrors.Wrapf(err, "open status file %s", file)
|
|
||||||
}
|
|
||||||
defer f.Close()
|
|
||||||
|
|
||||||
status := make(map[string]string)
|
|
||||||
scanner := bufio.NewScanner(f)
|
|
||||||
for scanner.Scan() {
|
|
||||||
text := scanner.Text()
|
|
||||||
parts := strings.SplitN(text, ":", 2)
|
|
||||||
|
|
||||||
if len(parts) <= 1 {
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
|
|
||||||
status[strings.TrimSpace(parts[0])] = strings.TrimSpace(parts[1])
|
|
||||||
}
|
|
||||||
|
|
||||||
if err := scanner.Err(); err != nil {
|
|
||||||
return nil, perrors.Wrapf(err, "scan status file %s", file)
|
|
||||||
}
|
|
||||||
|
|
||||||
return status, nil
|
|
||||||
}
|
}
|
||||||
|
2
vendor/github.com/containers/common/version/version.go
generated
vendored
2
vendor/github.com/containers/common/version/version.go
generated
vendored
@ -1,4 +1,4 @@
|
|||||||
package version
|
package version
|
||||||
|
|
||||||
// Version is the version of the build.
|
// Version is the version of the build.
|
||||||
const Version = "0.35.3"
|
const Version = "0.35.4"
|
||||||
|
2
vendor/modules.txt
vendored
2
vendor/modules.txt
vendored
@ -93,7 +93,7 @@ github.com/containers/buildah/pkg/parse
|
|||||||
github.com/containers/buildah/pkg/rusage
|
github.com/containers/buildah/pkg/rusage
|
||||||
github.com/containers/buildah/pkg/supplemented
|
github.com/containers/buildah/pkg/supplemented
|
||||||
github.com/containers/buildah/util
|
github.com/containers/buildah/util
|
||||||
# github.com/containers/common v0.35.3
|
# github.com/containers/common v0.35.4
|
||||||
github.com/containers/common/pkg/apparmor
|
github.com/containers/common/pkg/apparmor
|
||||||
github.com/containers/common/pkg/apparmor/internal/supported
|
github.com/containers/common/pkg/apparmor/internal/supported
|
||||||
github.com/containers/common/pkg/auth
|
github.com/containers/common/pkg/auth
|
||||||
|
Reference in New Issue
Block a user