mirror of
https://github.com/containers/podman.git
synced 2025-12-14 11:00:10 +08:00
vendor: update docker v28 and c/{common,image}
Update to the latest c/{common,image} which inclused an update to
docker v28, that update is NOT backwards compatible so I had to fix a
few types.
NOTE: handler.ExecCreateConfig is used directly by the bindings. Thus
this is an API break for pkg/bindings. Including docker types as part of
any stable pkg/bindings API was a very bad idea.
I see no way to avoid that unless we never want to docker v28, which is
not easy as the update comes in from c/image and maybe other packages.
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
This commit is contained in:
19
vendor/github.com/containers/common/pkg/config/config.go
generated
vendored
19
vendor/github.com/containers/common/pkg/config/config.go
generated
vendored
@@ -12,7 +12,6 @@ import (
|
||||
|
||||
"github.com/containers/common/internal/attributedstring"
|
||||
"github.com/containers/common/libnetwork/types"
|
||||
"github.com/containers/common/pkg/capabilities"
|
||||
"github.com/containers/storage/pkg/fileutils"
|
||||
"github.com/containers/storage/pkg/homedir"
|
||||
"github.com/containers/storage/pkg/unshare"
|
||||
@@ -979,24 +978,6 @@ func (c *Config) GetDefaultEnvEx(envHost, httpProxy bool) []string {
|
||||
return append(env, c.Containers.Env.Get()...)
|
||||
}
|
||||
|
||||
// Capabilities returns the capabilities parses the Add and Drop capability
|
||||
// list from the default capabilities for the container
|
||||
func (c *Config) Capabilities(user string, addCapabilities, dropCapabilities []string) ([]string, error) {
|
||||
userNotRoot := func(user string) bool {
|
||||
if user == "" || user == "root" || user == "0" {
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
defaultCapabilities := c.Containers.DefaultCapabilities.Get()
|
||||
if userNotRoot(user) {
|
||||
defaultCapabilities = []string{}
|
||||
}
|
||||
|
||||
return capabilities.MergeCapabilities(defaultCapabilities, addCapabilities, dropCapabilities)
|
||||
}
|
||||
|
||||
// Device parses device mapping string to a src, dest & permissions string
|
||||
// Valid values for device looklike:
|
||||
//
|
||||
|
||||
19
vendor/github.com/containers/common/pkg/config/config_linux.go
generated
vendored
19
vendor/github.com/containers/common/pkg/config/config_linux.go
generated
vendored
@@ -1,6 +1,7 @@
|
||||
package config
|
||||
|
||||
import (
|
||||
"github.com/containers/common/pkg/capabilities"
|
||||
selinux "github.com/opencontainers/selinux/go-selinux"
|
||||
)
|
||||
|
||||
@@ -26,3 +27,21 @@ var defaultHelperBinariesDir = []string{
|
||||
"/usr/libexec/podman",
|
||||
"/usr/lib/podman",
|
||||
}
|
||||
|
||||
// Capabilities returns the capabilities parses the Add and Drop capability
|
||||
// list from the default capabilities for the container
|
||||
func (c *Config) Capabilities(user string, addCapabilities, dropCapabilities []string) ([]string, error) {
|
||||
userNotRoot := func(user string) bool {
|
||||
if user == "" || user == "root" || user == "0" {
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
defaultCapabilities := c.Containers.DefaultCapabilities.Get()
|
||||
if userNotRoot(user) {
|
||||
defaultCapabilities = []string{}
|
||||
}
|
||||
|
||||
return capabilities.MergeCapabilities(defaultCapabilities, addCapabilities, dropCapabilities)
|
||||
}
|
||||
|
||||
7
vendor/github.com/containers/common/pkg/config/config_local.go
generated
vendored
7
vendor/github.com/containers/common/pkg/config/config_local.go
generated
vendored
@@ -6,7 +6,7 @@ import (
|
||||
"fmt"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"regexp"
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"github.com/containers/storage/pkg/fileutils"
|
||||
@@ -97,8 +97,9 @@ func (c *ContainersConfig) validateTZ() error {
|
||||
}
|
||||
|
||||
func (c *ContainersConfig) validateUmask() error {
|
||||
validUmask := regexp.MustCompile(`^[0-7]{1,4}$`)
|
||||
if !validUmask.MatchString(c.Umask) {
|
||||
// Valid values are 0 to 7777 octal.
|
||||
_, err := strconv.ParseUint(c.Umask, 8, 12)
|
||||
if err != nil {
|
||||
return fmt.Errorf("not a valid umask %s", c.Umask)
|
||||
}
|
||||
return nil
|
||||
|
||||
6
vendor/github.com/containers/common/pkg/config/config_unsupported.go
generated
vendored
6
vendor/github.com/containers/common/pkg/config/config_unsupported.go
generated
vendored
@@ -5,3 +5,9 @@ package config
|
||||
func selinuxEnabled() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// Capabilities returns the capabilities parses the Add and Drop capability
|
||||
// list from the default capabilities for the container
|
||||
func (c *Config) Capabilities(user string, addCapabilities, dropCapabilities []string) ([]string, error) {
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
2
vendor/github.com/containers/common/pkg/config/default.go
generated
vendored
2
vendor/github.com/containers/common/pkg/config/default.go
generated
vendored
@@ -539,7 +539,7 @@ func (c *Config) NetNS() string {
|
||||
return c.Containers.NetNS
|
||||
}
|
||||
|
||||
func (c EngineConfig) EventsLogMaxSize() uint64 {
|
||||
func (c *EngineConfig) EventsLogMaxSize() uint64 {
|
||||
return uint64(c.EventsLogFileMaxSize)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user