aboutsummaryrefslogtreecommitdiff
path: root/vendor/github.com/fsouza/go-dockerclient/internal/archive/archive.go
diff options
context:
space:
mode:
authorTomSweeneyRedHat <tsweeney@redhat.com>2019-03-13 11:40:24 -0400
committerTomSweeneyRedHat <tsweeney@redhat.com>2019-03-13 11:40:39 -0400
commit8f418f1568b2735fdeea9a84afc354e1f8cbc94c (patch)
treefc6b218409181bbe49c7c315bcba16ab160d49f4 /vendor/github.com/fsouza/go-dockerclient/internal/archive/archive.go
parent8b3f759800ebd6e53e0a807728ede633aa9bdb36 (diff)
downloadpodman-8f418f1568b2735fdeea9a84afc354e1f8cbc94c.tar.gz
podman-8f418f1568b2735fdeea9a84afc354e1f8cbc94c.tar.bz2
podman-8f418f1568b2735fdeea9a84afc354e1f8cbc94c.zip
Vendor docker/docker, fsouza and more #2
Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com> Vendors in fsouza/docker-client, docker/docker and a few more related. Of particular note, changes to the TweakCapabilities() function from docker/docker along with the parse.IDMappingOptions() function from Buildah. Please pay particular attention to the related changes in the call from libpod to those functions during the review. Passes baseline tests.
Diffstat (limited to 'vendor/github.com/fsouza/go-dockerclient/internal/archive/archive.go')
-rw-r--r--vendor/github.com/fsouza/go-dockerclient/internal/archive/archive.go26
1 files changed, 13 insertions, 13 deletions
diff --git a/vendor/github.com/fsouza/go-dockerclient/internal/archive/archive.go b/vendor/github.com/fsouza/go-dockerclient/internal/archive/archive.go
index a13ee7cca..7d7cf496a 100644
--- a/vendor/github.com/fsouza/go-dockerclient/internal/archive/archive.go
+++ b/vendor/github.com/fsouza/go-dockerclient/internal/archive/archive.go
@@ -71,7 +71,7 @@ type TarOptions struct {
NoLchown bool
UIDMaps []idtools.IDMap
GIDMaps []idtools.IDMap
- ChownOpts *idtools.IDPair
+ ChownOpts *idtools.Identity
IncludeSourceDir bool
// WhiteoutFormat is the expected on disk format for whiteout files.
// This format will be converted to the standard format on pack
@@ -292,9 +292,9 @@ type tarAppender struct {
Buffer *bufio.Writer
// for hardlink mapping
- SeenFiles map[uint64]string
- IDMappings *idtools.IDMappings
- ChownOpts *idtools.IDPair
+ SeenFiles map[uint64]string
+ IdentityMapping *idtools.IdentityMapping
+ ChownOpts *idtools.Identity
// For packing and unpacking whiteout files in the
// non standard format. The whiteout files defined
@@ -303,13 +303,13 @@ type tarAppender struct {
WhiteoutConverter tarWhiteoutConverter
}
-func newTarAppender(idMapping *idtools.IDMappings, writer io.Writer, chownOpts *idtools.IDPair) *tarAppender {
+func newTarAppender(idMapping *idtools.IdentityMapping, writer io.Writer, chownOpts *idtools.Identity) *tarAppender {
return &tarAppender{
- SeenFiles: make(map[uint64]string),
- TarWriter: tar.NewWriter(writer),
- Buffer: pools.BufioWriter32KPool.Get(nil),
- IDMappings: idMapping,
- ChownOpts: chownOpts,
+ SeenFiles: make(map[uint64]string),
+ TarWriter: tar.NewWriter(writer),
+ Buffer: pools.BufioWriter32KPool.Get(nil),
+ IdentityMapping: idMapping,
+ ChownOpts: chownOpts,
}
}
@@ -364,12 +364,12 @@ func (ta *tarAppender) addTarFile(path, name string) error {
//by the kernel and already have proper ownership relative to the host
if !isOverlayWhiteout &&
!strings.HasPrefix(filepath.Base(hdr.Name), WhiteoutPrefix) &&
- !ta.IDMappings.Empty() {
- fileIDPair, err := getFileUIDGID(fi.Sys())
+ !ta.IdentityMapping.Empty() {
+ fileIdentity, err := getFileIdentity(fi.Sys())
if err != nil {
return err
}
- hdr.Uid, hdr.Gid, err = ta.IDMappings.ToContainer(fileIDPair)
+ hdr.Uid, hdr.Gid, err = ta.IdentityMapping.ToContainer(fileIdentity)
if err != nil {
return err
}