mirror of
https://github.com/containers/skopeo.git
synced 2025-09-14 22:10:00 +00:00
Update module github.com/containers/storage to v1.45.3
Signed-off-by: Renovate Bot <bot@renovateapp.com>
This commit is contained in:
committed by
Miloslav Trmač
parent
a98c137243
commit
850bc49d27
10
vendor/github.com/containers/storage/userns.go
generated
vendored
10
vendor/github.com/containers/storage/userns.go
generated
vendored
@@ -78,6 +78,10 @@ func (s *store) getAvailableIDs() (*idSet, *idSet, error) {
|
||||
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
|
||||
// /etc/group files.
|
||||
func parseMountedFiles(containerMount, passwdFile, groupFile string) uint32 {
|
||||
@@ -98,10 +102,10 @@ func parseMountedFiles(containerMount, passwdFile, groupFile string) uint32 {
|
||||
if u.Name == "nobody" {
|
||||
continue
|
||||
}
|
||||
if u.Uid > size {
|
||||
if u.Uid > size && u.Uid != nobodyUser {
|
||||
size = u.Uid
|
||||
}
|
||||
if u.Gid > size {
|
||||
if u.Gid > size && u.Gid != nobodyUser {
|
||||
size = u.Gid
|
||||
}
|
||||
}
|
||||
@@ -113,7 +117,7 @@ func parseMountedFiles(containerMount, passwdFile, groupFile string) uint32 {
|
||||
if g.Name == "nobody" {
|
||||
continue
|
||||
}
|
||||
if g.Gid > size {
|
||||
if g.Gid > size && g.Gid != nobodyUser {
|
||||
size = g.Gid
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user