mirror of
https://github.com/containers/skopeo.git
synced 2025-09-13 05:23:05 +00:00
Bump github.com/containers/storage from 1.41.0 to 1.42.0
Bumps [github.com/containers/storage](https://github.com/containers/storage) from 1.41.0 to 1.42.0. - [Release notes](https://github.com/containers/storage/releases) - [Changelog](https://github.com/containers/storage/blob/main/docs/containers-storage-changes.md) - [Commits](https://github.com/containers/storage/compare/v1.41.0...v1.42.0) --- updated-dependencies: - dependency-name: github.com/containers/storage dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
This commit is contained in:
16
vendor/github.com/containers/storage/userns.go
generated
vendored
16
vendor/github.com/containers/storage/userns.go
generated
vendored
@@ -1,6 +1,7 @@
|
||||
package storage
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"os/user"
|
||||
"path/filepath"
|
||||
@@ -11,7 +12,6 @@ import (
|
||||
"github.com/containers/storage/pkg/unshare"
|
||||
"github.com/containers/storage/types"
|
||||
libcontainerUser "github.com/opencontainers/runc/libcontainer/user"
|
||||
"github.com/pkg/errors"
|
||||
"github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
@@ -124,7 +124,7 @@ func parseMountedFiles(containerMount, passwdFile, groupFile string) uint32 {
|
||||
|
||||
// getMaxSizeFromImage returns the maximum ID used by the specified image.
|
||||
// The layer stores must be already locked.
|
||||
func (s *store) getMaxSizeFromImage(id string, image *Image, passwdFile, groupFile string) (uint32, error) {
|
||||
func (s *store) getMaxSizeFromImage(image *Image, passwdFile, groupFile string) (uint32, error) {
|
||||
lstore, err := s.LayerStore()
|
||||
if err != nil {
|
||||
return 0, err
|
||||
@@ -164,7 +164,7 @@ outer:
|
||||
}
|
||||
continue outer
|
||||
}
|
||||
return 0, errors.Errorf("cannot find layer %q", layerName)
|
||||
return 0, fmt.Errorf("cannot find layer %q", layerName)
|
||||
}
|
||||
|
||||
rlstore, err := s.LayerStore()
|
||||
@@ -183,7 +183,7 @@ outer:
|
||||
|
||||
// We need to create a temporary layer so we can mount it and lookup the
|
||||
// maximum IDs used.
|
||||
clayer, err := rlstore.Create(id, topLayer, nil, "", nil, layerOptions, false)
|
||||
clayer, err := rlstore.Create("", topLayer, nil, "", nil, layerOptions, false)
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
@@ -211,7 +211,7 @@ outer:
|
||||
}
|
||||
|
||||
// getAutoUserNS creates an automatic user namespace
|
||||
func (s *store) getAutoUserNS(id string, options *types.AutoUserNsOptions, image *Image) ([]idtools.IDMap, []idtools.IDMap, error) {
|
||||
func (s *store) getAutoUserNS(options *types.AutoUserNsOptions, image *Image) ([]idtools.IDMap, []idtools.IDMap, error) {
|
||||
requestedSize := uint32(0)
|
||||
initialSize := uint32(1)
|
||||
if options.Size > 0 {
|
||||
@@ -223,7 +223,7 @@ func (s *store) getAutoUserNS(id string, options *types.AutoUserNsOptions, image
|
||||
|
||||
availableUIDs, availableGIDs, err := s.getAvailableIDs()
|
||||
if err != nil {
|
||||
return nil, nil, errors.Wrapf(err, "cannot read mappings")
|
||||
return nil, nil, fmt.Errorf("cannot read mappings: %w", err)
|
||||
}
|
||||
|
||||
// Look every container that is using a user namespace and store
|
||||
@@ -250,7 +250,7 @@ func (s *store) getAutoUserNS(id string, options *types.AutoUserNsOptions, image
|
||||
size = s.autoNsMinSize
|
||||
}
|
||||
if image != nil {
|
||||
sizeFromImage, err := s.getMaxSizeFromImage(id, image, options.PasswdFile, options.GroupFile)
|
||||
sizeFromImage, err := s.getMaxSizeFromImage(image, options.PasswdFile, options.GroupFile)
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
@@ -259,7 +259,7 @@ func (s *store) getAutoUserNS(id string, options *types.AutoUserNsOptions, image
|
||||
}
|
||||
}
|
||||
if s.autoNsMaxSize > 0 && size > s.autoNsMaxSize {
|
||||
return nil, nil, errors.Errorf("the container needs a user namespace with size %q that is bigger than the maximum value allowed with userns=auto %q", size, s.autoNsMaxSize)
|
||||
return nil, nil, fmt.Errorf("the container needs a user namespace with size %q that is bigger than the maximum value allowed with userns=auto %q", size, s.autoNsMaxSize)
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user