Update module github.com/containers/storage to v1.45.3

Signed-off-by: Renovate Bot <bot@renovateapp.com>
This commit is contained in:
renovate[bot] 2023-01-20 13:10:14 +00:00 committed by Miloslav Trmač
parent a98c137243
commit 850bc49d27
6 changed files with 15 additions and 8 deletions

2
go.mod
View File

@ -6,7 +6,7 @@ require (
github.com/containers/common v0.50.1 github.com/containers/common v0.50.1
github.com/containers/image/v5 v5.23.1-0.20230113185223-cf9ccfb4d9b1 github.com/containers/image/v5 v5.23.1-0.20230113185223-cf9ccfb4d9b1
github.com/containers/ocicrypt v1.1.7 github.com/containers/ocicrypt v1.1.7
github.com/containers/storage v1.45.1 github.com/containers/storage v1.45.3
github.com/docker/distribution v2.8.1+incompatible github.com/docker/distribution v2.8.1+incompatible
github.com/opencontainers/go-digest v1.0.0 github.com/opencontainers/go-digest v1.0.0
github.com/opencontainers/image-spec v1.1.0-rc2 github.com/opencontainers/image-spec v1.1.0-rc2

4
go.sum
View File

@ -935,8 +935,8 @@ github.com/containers/ocicrypt v1.1.7 h1:thhNr4fu2ltyGz8aMx8u48Ae0Pnbip3ePP9/mzk
github.com/containers/ocicrypt v1.1.7/go.mod h1:7CAhjcj2H8AYp5YvEie7oVSK2AhBY8NscCYRawuDNtw= github.com/containers/ocicrypt v1.1.7/go.mod h1:7CAhjcj2H8AYp5YvEie7oVSK2AhBY8NscCYRawuDNtw=
github.com/containers/storage v1.43.0/go.mod h1:uZ147thiIFGdVTjMmIw19knttQnUCl3y9zjreHrg11s= github.com/containers/storage v1.43.0/go.mod h1:uZ147thiIFGdVTjMmIw19knttQnUCl3y9zjreHrg11s=
github.com/containers/storage v1.45.0/go.mod h1:OdRUYHrq1HP6iAo79VxqtYuJzC5j4eA2I60jKOoCT7g= github.com/containers/storage v1.45.0/go.mod h1:OdRUYHrq1HP6iAo79VxqtYuJzC5j4eA2I60jKOoCT7g=
github.com/containers/storage v1.45.1 h1:hsItObigGLm77Dn4ebUxQ68EfE6nMrwGcIdMRqzgclI= github.com/containers/storage v1.45.3 h1:GbtTvTtp3GW2/tcFg5VhgHXcYMwVn2KfZKiHjf9FAOM=
github.com/containers/storage v1.45.1/go.mod h1:OdRUYHrq1HP6iAo79VxqtYuJzC5j4eA2I60jKOoCT7g= github.com/containers/storage v1.45.3/go.mod h1:OdRUYHrq1HP6iAo79VxqtYuJzC5j4eA2I60jKOoCT7g=
github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= 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.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE=
github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE=

View File

@ -1 +1 @@
1.45.1 1.45.3

View File

@ -173,6 +173,9 @@ func DefaultConfigFile(rootless bool) (string, error) {
return path, nil return path, nil
} }
if !rootless { if !rootless {
if _, err := os.Stat(defaultOverrideConfigFile); err == nil {
return defaultOverrideConfigFile, nil
}
return defaultConfigFile, nil return defaultConfigFile, nil
} }

View File

@ -78,6 +78,10 @@ func (s *store) getAvailableIDs() (*idSet, *idSet, error) {
return u, g, nil return u, g, nil
} }
// nobodyUser returns the UID and GID of the "nobody" user. Hardcode its value
// for simplicity.
const nobodyUser = 65534
// parseMountedFiles returns the maximum UID and GID found in the /etc/passwd and // parseMountedFiles returns the maximum UID and GID found in the /etc/passwd and
// /etc/group files. // /etc/group files.
func parseMountedFiles(containerMount, passwdFile, groupFile string) uint32 { func parseMountedFiles(containerMount, passwdFile, groupFile string) uint32 {
@ -98,10 +102,10 @@ func parseMountedFiles(containerMount, passwdFile, groupFile string) uint32 {
if u.Name == "nobody" { if u.Name == "nobody" {
continue continue
} }
if u.Uid > size { if u.Uid > size && u.Uid != nobodyUser {
size = u.Uid size = u.Uid
} }
if u.Gid > size { if u.Gid > size && u.Gid != nobodyUser {
size = u.Gid size = u.Gid
} }
} }
@ -113,7 +117,7 @@ func parseMountedFiles(containerMount, passwdFile, groupFile string) uint32 {
if g.Name == "nobody" { if g.Name == "nobody" {
continue continue
} }
if g.Gid > size { if g.Gid > size && g.Gid != nobodyUser {
size = g.Gid size = g.Gid
} }
} }

2
vendor/modules.txt vendored
View File

@ -149,7 +149,7 @@ github.com/containers/ocicrypt/keywrap/pkcs7
github.com/containers/ocicrypt/spec github.com/containers/ocicrypt/spec
github.com/containers/ocicrypt/utils github.com/containers/ocicrypt/utils
github.com/containers/ocicrypt/utils/keyprovider github.com/containers/ocicrypt/utils/keyprovider
# github.com/containers/storage v1.45.1 # github.com/containers/storage v1.45.3
## explicit; go 1.17 ## explicit; go 1.17
github.com/containers/storage github.com/containers/storage
github.com/containers/storage/drivers github.com/containers/storage/drivers