mirror of
https://github.com/containers/podman.git
synced 2025-12-13 02:09:16 +08:00
Bump github.com/containers/storage from 1.21.2 to 1.23.0
Bumps [github.com/containers/storage](https://github.com/containers/storage) from 1.21.2 to 1.23.0. - [Release notes](https://github.com/containers/storage/releases) - [Changelog](https://github.com/containers/storage/blob/master/docs/containers-storage-changes.md) - [Commits](https://github.com/containers/storage/compare/v1.21.2...v1.23.0) Signed-off-by: dependabot-preview[bot] <support@dependabot.com> Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
This commit is contained in:
committed by
Daniel J Walsh
parent
87e8f91c00
commit
fec8a29e91
7
vendor/github.com/containers/storage/pkg/archive/archive.go
generated
vendored
7
vendor/github.com/containers/storage/pkg/archive/archive.go
generated
vendored
@@ -602,7 +602,7 @@ func (ta *tarAppender) addTarFile(path, name string) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func createTarFile(path, extractDir string, hdr *tar.Header, reader io.Reader, Lchown bool, chownOpts *idtools.IDPair, inUserns, ignoreChownErrors bool) error {
|
||||
func createTarFile(path, extractDir string, hdr *tar.Header, reader io.Reader, Lchown bool, chownOpts *idtools.IDPair, inUserns, ignoreChownErrors bool, buffer []byte) error {
|
||||
// hdr.Mode is in linux format, which we can use for sycalls,
|
||||
// but for os.Foo() calls we need the mode converted to os.FileMode,
|
||||
// so use hdrInfo.Mode() (they differ for e.g. setuid bits)
|
||||
@@ -626,7 +626,7 @@ func createTarFile(path, extractDir string, hdr *tar.Header, reader io.Reader, L
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if _, err := io.Copy(file, reader); err != nil {
|
||||
if _, err := io.CopyBuffer(file, reader, buffer); err != nil {
|
||||
file.Close()
|
||||
return err
|
||||
}
|
||||
@@ -942,6 +942,7 @@ func Unpack(decompressedArchive io.Reader, dest string, options *TarOptions) err
|
||||
idMappings := idtools.NewIDMappingsFromMaps(options.UIDMaps, options.GIDMaps)
|
||||
rootIDs := idMappings.RootPair()
|
||||
whiteoutConverter := getWhiteoutConverter(options.WhiteoutFormat, options.WhiteoutData)
|
||||
buffer := make([]byte, 1<<20)
|
||||
|
||||
// Iterate through the files in the archive.
|
||||
loop:
|
||||
@@ -1038,7 +1039,7 @@ loop:
|
||||
chownOpts = &idtools.IDPair{UID: hdr.Uid, GID: hdr.Gid}
|
||||
}
|
||||
|
||||
if err := createTarFile(path, dest, hdr, trBuf, !options.NoLchown, chownOpts, options.InUserNS, options.IgnoreChownErrors); err != nil {
|
||||
if err := createTarFile(path, dest, hdr, trBuf, !options.NoLchown, chownOpts, options.InUserNS, options.IgnoreChownErrors, buffer); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
|
||||
8
vendor/github.com/containers/storage/pkg/archive/changes_unix.go
generated
vendored
8
vendor/github.com/containers/storage/pkg/archive/changes_unix.go
generated
vendored
@@ -18,9 +18,11 @@ func statDifferent(oldStat *system.StatT, oldInfo *FileInfo, newStat *system.Sta
|
||||
if cuid, cgid, err := newInfo.idMappings.ToContainer(idtools.IDPair{UID: int(uid), GID: int(gid)}); err == nil {
|
||||
uid = uint32(cuid)
|
||||
gid = uint32(cgid)
|
||||
if oldcuid, oldcgid, err := oldInfo.idMappings.ToContainer(idtools.IDPair{UID: int(oldUID), GID: int(oldGID)}); err == nil {
|
||||
oldUID = uint32(oldcuid)
|
||||
oldGID = uint32(oldcgid)
|
||||
if oldInfo != nil {
|
||||
if oldcuid, oldcgid, err := oldInfo.idMappings.ToContainer(idtools.IDPair{UID: int(oldUID), GID: int(oldGID)}); err == nil {
|
||||
oldUID = uint32(oldcuid)
|
||||
oldGID = uint32(oldcgid)
|
||||
}
|
||||
}
|
||||
}
|
||||
ownerChanged := uid != oldUID || gid != oldGID
|
||||
|
||||
5
vendor/github.com/containers/storage/pkg/archive/diff.go
generated
vendored
5
vendor/github.com/containers/storage/pkg/archive/diff.go
generated
vendored
@@ -37,6 +37,7 @@ func UnpackLayer(dest string, layer io.Reader, options *TarOptions) (size int64,
|
||||
|
||||
aufsTempdir := ""
|
||||
aufsHardlinks := make(map[string]*tar.Header)
|
||||
buffer := make([]byte, 1<<20)
|
||||
|
||||
// Iterate through the files in the archive.
|
||||
for {
|
||||
@@ -105,7 +106,7 @@ func UnpackLayer(dest string, layer io.Reader, options *TarOptions) (size int64,
|
||||
}
|
||||
defer os.RemoveAll(aufsTempdir)
|
||||
}
|
||||
if err := createTarFile(filepath.Join(aufsTempdir, basename), dest, hdr, tr, true, nil, options.InUserNS, options.IgnoreChownErrors); err != nil {
|
||||
if err := createTarFile(filepath.Join(aufsTempdir, basename), dest, hdr, tr, true, nil, options.InUserNS, options.IgnoreChownErrors, buffer); err != nil {
|
||||
return 0, err
|
||||
}
|
||||
}
|
||||
@@ -196,7 +197,7 @@ func UnpackLayer(dest string, layer io.Reader, options *TarOptions) (size int64,
|
||||
return 0, err
|
||||
}
|
||||
|
||||
if err := createTarFile(path, dest, srcHdr, srcData, true, nil, options.InUserNS, options.IgnoreChownErrors); err != nil {
|
||||
if err := createTarFile(path, dest, srcHdr, srcData, true, nil, options.InUserNS, options.IgnoreChownErrors, buffer); err != nil {
|
||||
return 0, err
|
||||
}
|
||||
|
||||
|
||||
2
vendor/github.com/containers/storage/pkg/fileutils/fileutils.go
generated
vendored
2
vendor/github.com/containers/storage/pkg/fileutils/fileutils.go
generated
vendored
@@ -262,7 +262,7 @@ func (p *Pattern) compile() error {
|
||||
}
|
||||
}
|
||||
|
||||
regStr += "(/.*)?$"
|
||||
regStr += "(" + escSL + ".*)?$"
|
||||
|
||||
re, err := regexp.Compile(regStr)
|
||||
if err != nil {
|
||||
|
||||
13
vendor/github.com/containers/storage/pkg/stringutils/stringutils.go
generated
vendored
13
vendor/github.com/containers/storage/pkg/stringutils/stringutils.go
generated
vendored
@@ -56,13 +56,24 @@ func Truncate(s string, maxlen int) string {
|
||||
// Comparison is case insensitive
|
||||
func InSlice(slice []string, s string) bool {
|
||||
for _, ss := range slice {
|
||||
if strings.ToLower(s) == strings.ToLower(ss) {
|
||||
if strings.EqualFold(s, ss) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
// RemoveFromSlice removes a string from a slice. The string can be present
|
||||
// multiple times. The entire slice is iterated.
|
||||
func RemoveFromSlice(slice []string, s string) (ret []string) {
|
||||
for _, ss := range slice {
|
||||
if !strings.EqualFold(s, ss) {
|
||||
ret = append(ret, ss)
|
||||
}
|
||||
}
|
||||
return ret
|
||||
}
|
||||
|
||||
func quote(word string, buf *bytes.Buffer) {
|
||||
// Bail out early for "simple" strings
|
||||
if word != "" && !strings.ContainsAny(word, "\\'\"`${[|&;<>()~*?! \t\n") {
|
||||
|
||||
1
vendor/github.com/containers/storage/pkg/unshare/unshare.c
generated
vendored
1
vendor/github.com/containers/storage/pkg/unshare/unshare.c
generated
vendored
@@ -292,6 +292,7 @@ static int containers_reexec(int flags) {
|
||||
fprintf(stderr, "Error during reexec(...): %m\n");
|
||||
return -1;
|
||||
}
|
||||
close(fd);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user