vendor in latests containers/(storage, common, build, image)

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
This commit is contained in:
Daniel J Walsh
2023-01-18 13:09:44 -05:00
parent ac1530b14e
commit f65d79f4c7
383 changed files with 66625 additions and 138 deletions

View File

@@ -1 +1 @@
1.45.1
1.45.2-dev

View File

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

View File

@@ -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
}
}