mirror of
https://github.com/containers/podman.git
synced 2025-12-06 05:37:49 +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:
10
vendor/github.com/containers/common/pkg/secrets/secrets.go
generated
vendored
10
vendor/github.com/containers/common/pkg/secrets/secrets.go
generated
vendored
@@ -5,6 +5,7 @@ import (
|
||||
"fmt"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/containers/common/pkg/secrets/define"
|
||||
@@ -12,7 +13,6 @@ import (
|
||||
"github.com/containers/common/pkg/secrets/passdriver"
|
||||
"github.com/containers/common/pkg/secrets/shelldriver"
|
||||
"github.com/containers/storage/pkg/lockfile"
|
||||
"github.com/containers/storage/pkg/regexp"
|
||||
"github.com/containers/storage/pkg/stringid"
|
||||
"golang.org/x/exp/maps"
|
||||
)
|
||||
@@ -50,10 +50,6 @@ var errDataSize = errors.New("secret data must be larger than 0 and less than 51
|
||||
// secretsFile is the name of the file that the secrets database will be stored in
|
||||
var secretsFile = "secrets.json"
|
||||
|
||||
// secretNameRegexp matches valid secret names
|
||||
// Allowed: 253 characters, excluding ,/=\0
|
||||
var secretNameRegexp = regexp.Delayed("^[^,/=\000]+$")
|
||||
|
||||
// SecretsManager holds information on handling secrets
|
||||
//
|
||||
// revive does not like the name because the package is already called secrets
|
||||
@@ -320,9 +316,7 @@ func (s *SecretsManager) LookupSecretData(nameOrID string) (*Secret, []byte, err
|
||||
|
||||
// validateSecretName checks if the secret name is valid.
|
||||
func validateSecretName(name string) error {
|
||||
if len(name) == 0 ||
|
||||
len(name) > 253 ||
|
||||
!secretNameRegexp.MatchString(name) {
|
||||
if len(name) == 0 || len(name) > 253 || strings.ContainsAny(name, ",/=\000") {
|
||||
return fmt.Errorf("secret name %q can not include '=', '/', ',', or the '\\0' (NULL) and be between 1 and 253 characters: %w", name, errInvalidSecretName)
|
||||
}
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user