Merge pull request #15744 from dfr/vendor

update c/storage to latest
This commit is contained in:
OpenShift Merge Robot
2022-09-12 13:35:11 +02:00
committed by GitHub
6 changed files with 16 additions and 14 deletions

2
go.mod
View File

@ -17,7 +17,7 @@ require (
github.com/containers/image/v5 v5.22.1-0.20220907162003-651744379993
github.com/containers/ocicrypt v1.1.5
github.com/containers/psgo v1.7.3
github.com/containers/storage v1.42.1-0.20220909095216-b32188140319
github.com/containers/storage v1.42.1-0.20220911223137-e11b246de159
github.com/coreos/go-systemd/v22 v22.3.2
github.com/coreos/stream-metadata-go v0.0.0-20210225230131-70edb9eb47b3
github.com/cyphar/filepath-securejoin v0.2.3

4
go.sum
View File

@ -445,8 +445,8 @@ github.com/containers/psgo v1.7.3/go.mod h1:PfaNzzHmMb8M9/blPgyD4BB3ZEj/0ApZIxN6
github.com/containers/storage v1.37.0/go.mod h1:kqeJeS0b7DO2ZT1nVWs0XufrmPFbgV3c+Q/45RlH6r4=
github.com/containers/storage v1.42.0/go.mod h1:JiUJwOgOo1dr2DdOUc1MRe2GCAXABYoYmOdPF8yvH78=
github.com/containers/storage v1.42.1-0.20220907083030-5aff7f62e8d0/go.mod h1:nj2fW3rgwkr6toBVFzv5OqUYs1kowX+AMiPjgv2UXN0=
github.com/containers/storage v1.42.1-0.20220909095216-b32188140319 h1:39KnMhYzk3fFH3njZgZogEHPagPQn8JlLZEWIUQQZ1I=
github.com/containers/storage v1.42.1-0.20220909095216-b32188140319/go.mod h1:nj2fW3rgwkr6toBVFzv5OqUYs1kowX+AMiPjgv2UXN0=
github.com/containers/storage v1.42.1-0.20220911223137-e11b246de159 h1:euFlaTBhuBLuUUQK4wGXjruNUh24ZbdQLREvLz15r9o=
github.com/containers/storage v1.42.1-0.20220911223137-e11b246de159/go.mod h1:nj2fW3rgwkr6toBVFzv5OqUYs1kowX+AMiPjgv2UXN0=
github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk=
github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE=
github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE=

View File

@ -344,6 +344,14 @@ func (r *layerStore) layerspath() string {
func (r *layerStore) Load() error {
shouldSave := false
rpath := r.layerspath()
info, err := os.Stat(rpath)
if err != nil {
if !os.IsNotExist(err) {
return err
}
} else {
r.layerspathModified = info.ModTime()
}
data, err := ioutil.ReadFile(rpath)
if err != nil && !os.IsNotExist(err) {
return err
@ -423,15 +431,6 @@ func (r *layerStore) Load() error {
}
}
info, statErr := os.Stat(r.layerspath())
if statErr != nil && !os.IsNotExist(statErr) {
return statErr
}
if info != nil {
r.layerspathModified = info.ModTime()
}
return err
}

View File

@ -4,6 +4,7 @@
package system
import (
"errors"
"fmt"
"unsafe"

View File

@ -394,7 +394,9 @@ func hasFullUsersMappings() (bool, error) {
if err != nil {
return false, err
}
// if the uid_map contains 4294967295, the entire IDs space is available in the
// The kernel rejects attempts to create mappings where either starting
// point is (u32)-1: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/kernel/user_namespace.c?id=af3e9579ecfb#n1006 .
// So, if the uid_map contains 4294967295, the entire IDs space is available in the
// user namespace, so it is likely the initial user namespace.
return bytes.Contains(content, []byte("4294967295")), nil
}

2
vendor/modules.txt vendored
View File

@ -255,7 +255,7 @@ github.com/containers/psgo/internal/dev
github.com/containers/psgo/internal/host
github.com/containers/psgo/internal/proc
github.com/containers/psgo/internal/process
# github.com/containers/storage v1.42.1-0.20220909095216-b32188140319
# github.com/containers/storage v1.42.1-0.20220911223137-e11b246de159
## explicit
github.com/containers/storage
github.com/containers/storage/drivers