mirror of
https://github.com/containers/podman.git
synced 2025-12-03 11:49:18 +08:00
Bump Buidah to v1.42.0 for Podman v5.7
Vendor Buildah v1.42.0 into Podman for v5.7.0. This will also drag in: go.podman.io/common v0.66.0 go.podman.io/image v5.38.0 go.podman.io/storage v1.61.0 Signed-off-by: tomsweeneyredhat <tsweeney@redhat.com>
This commit is contained in:
10
vendor/github.com/containers/buildah/copier/xattrs.go
generated
vendored
10
vendor/github.com/containers/buildah/copier/xattrs.go
generated
vendored
@@ -21,6 +21,7 @@ const (
|
||||
|
||||
var (
|
||||
relevantAttributes = []string{"security.capability", imaXattr, "user.*"} // the attributes that we preserve - we discard others
|
||||
irrelevantAttributes = []string{"user.overlay.*"} // the attributes that we discard, even from the relevantAttributes list
|
||||
initialXattrListSize = 64 * 1024
|
||||
initialXattrValueSize = 64 * 1024
|
||||
)
|
||||
@@ -33,6 +34,13 @@ func isRelevantXattr(attribute string) bool {
|
||||
if err != nil || !matched {
|
||||
continue
|
||||
}
|
||||
for _, irrelevant := range irrelevantAttributes {
|
||||
matched, err := filepath.Match(irrelevant, attribute)
|
||||
if err != nil || !matched {
|
||||
continue
|
||||
}
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
return false
|
||||
@@ -65,7 +73,7 @@ func Lgetxattrs(path string) (map[string]string, error) {
|
||||
return nil, fmt.Errorf("unable to read list of attributes for %q: size would have been too big", path)
|
||||
}
|
||||
m := make(map[string]string)
|
||||
for _, attribute := range strings.Split(string(list), string('\000')) {
|
||||
for attribute := range strings.SplitSeq(string(list), string('\000')) {
|
||||
if isRelevantXattr(attribute) {
|
||||
attributeSize := initialXattrValueSize
|
||||
var attributeValue []byte
|
||||
|
||||
Reference in New Issue
Block a user