mirror of
https://github.com/containers/podman.git
synced 2025-12-01 02:27:13 +08:00
Bump github.com/docker/docker
Bumps [github.com/docker/docker](https://github.com/docker/docker) from 20.10.6+incompatible to 20.10.7+incompatible. - [Release notes](https://github.com/docker/docker/releases) - [Changelog](https://github.com/moby/moby/blob/master/CHANGELOG.md) - [Commits](https://github.com/docker/docker/compare/v20.10.6...v20.10.7) --- updated-dependencies: - dependency-name: github.com/docker/docker dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
This commit is contained in:
16
vendor/github.com/docker/docker/pkg/archive/archive.go
generated
vendored
16
vendor/github.com/docker/docker/pkg/archive/archive.go
generated
vendored
@@ -402,10 +402,24 @@ func fillGo18FileTypeBits(mode int64, fi os.FileInfo) int64 {
|
||||
// ReadSecurityXattrToTarHeader reads security.capability xattr from filesystem
|
||||
// to a tar header
|
||||
func ReadSecurityXattrToTarHeader(path string, hdr *tar.Header) error {
|
||||
const (
|
||||
// Values based on linux/include/uapi/linux/capability.h
|
||||
xattrCapsSz2 = 20
|
||||
versionOffset = 3
|
||||
vfsCapRevision2 = 2
|
||||
vfsCapRevision3 = 3
|
||||
)
|
||||
capability, _ := system.Lgetxattr(path, "security.capability")
|
||||
if capability != nil {
|
||||
length := len(capability)
|
||||
if capability[versionOffset] == vfsCapRevision3 {
|
||||
// Convert VFS_CAP_REVISION_3 to VFS_CAP_REVISION_2 as root UID makes no
|
||||
// sense outside the user namespace the archive is built in.
|
||||
capability[versionOffset] = vfsCapRevision2
|
||||
length = xattrCapsSz2
|
||||
}
|
||||
hdr.Xattrs = make(map[string]string)
|
||||
hdr.Xattrs["security.capability"] = string(capability)
|
||||
hdr.Xattrs["security.capability"] = string(capability[:length])
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user