summaryrefslogtreecommitdiff
path: root/libpod
diff options
context:
space:
mode:
authorGiuseppe Scrivano <gscrivan@redhat.com>2020-06-24 14:12:53 +0200
committerGiuseppe Scrivano <gscrivan@redhat.com>2020-06-29 17:51:55 +0200
commit688cc0aee3f031661b930811b2d95df1d6c601ac (patch)
tree14cbbdd708ef2cf14fbe5d44a4032fe331231fe5 /libpod
parent35cca198b31582b75304e3614f8942b83a38422e (diff)
downloadpodman-688cc0aee3f031661b930811b2d95df1d6c601ac.tar.gz
podman-688cc0aee3f031661b930811b2d95df1d6c601ac.tar.bz2
podman-688cc0aee3f031661b930811b2d95df1d6c601ac.zip
libpod: volume copyup honors namespace mappings
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Diffstat (limited to 'libpod')
-rw-r--r--libpod/container_internal.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/libpod/container_internal.go b/libpod/container_internal.go
index db64f5eeb..2ae894139 100644
--- a/libpod/container_internal.go
+++ b/libpod/container_internal.go
@@ -1854,8 +1854,8 @@ func (c *Container) unmount(force bool) error {
// this should be from chrootarchive.
// Container MUST be mounted before calling.
func (c *Container) copyWithTarFromImage(source, dest string) error {
- a := archive.NewDefaultArchiver()
-
+ mappings := idtools.NewIDMappingsFromMaps(c.config.IDMappings.UIDMap, c.config.IDMappings.GIDMap)
+ a := archive.NewArchiver(mappings)
if err := c.copyOwnerAndPerms(source, dest); err != nil {
return err
}