diff options
author | Doug Rabson <dfr@rabson.org> | 2022-09-12 08:11:41 +0100 |
---|---|---|
committer | Doug Rabson <dfr@rabson.org> | 2022-09-12 08:11:46 +0100 |
commit | d935e9799472f176e9ab6852afee0d80c1fba78d (patch) | |
tree | b653c4f44b5da2c3604d81eef62856dd758fe7ba /vendor/github.com | |
parent | 1635fe8620fa454647cf7db2af9ed0c9b52eacfb (diff) | |
download | podman-d935e9799472f176e9ab6852afee0d80c1fba78d.tar.gz podman-d935e9799472f176e9ab6852afee0d80c1fba78d.tar.bz2 podman-d935e9799472f176e9ab6852afee0d80c1fba78d.zip |
update c/storage to latest
Signed-off-by: Doug Rabson <dfr@rabson.org>
Diffstat (limited to 'vendor/github.com')
3 files changed, 12 insertions, 10 deletions
diff --git a/vendor/github.com/containers/storage/layers.go b/vendor/github.com/containers/storage/layers.go index 8929d0a40..0863648ae 100644 --- a/vendor/github.com/containers/storage/layers.go +++ b/vendor/github.com/containers/storage/layers.go @@ -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 } diff --git a/vendor/github.com/containers/storage/pkg/system/meminfo_freebsd.go b/vendor/github.com/containers/storage/pkg/system/meminfo_freebsd.go index 85dd52bad..46cb40291 100644 --- a/vendor/github.com/containers/storage/pkg/system/meminfo_freebsd.go +++ b/vendor/github.com/containers/storage/pkg/system/meminfo_freebsd.go @@ -4,6 +4,7 @@ package system import ( + "errors" "fmt" "unsafe" diff --git a/vendor/github.com/containers/storage/pkg/unshare/unshare_linux.go b/vendor/github.com/containers/storage/pkg/unshare/unshare_linux.go index f29c93dba..b7ad1e19e 100644 --- a/vendor/github.com/containers/storage/pkg/unshare/unshare_linux.go +++ b/vendor/github.com/containers/storage/pkg/unshare/unshare_linux.go @@ -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 } |