1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Merge pull request #35794 from estesp/fix-overlay2-untarinuserns

Fix overlay2 storage driver inside a user namespace
This commit is contained in:
Sebastiaan van Stijn 2017-12-15 23:25:15 -08:00 committed by GitHub
commit 0862014431
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -31,6 +31,7 @@ import (
"github.com/docker/docker/pkg/parsers/kernel" "github.com/docker/docker/pkg/parsers/kernel"
"github.com/docker/docker/pkg/system" "github.com/docker/docker/pkg/system"
"github.com/docker/go-units" "github.com/docker/go-units"
rsystem "github.com/opencontainers/runc/libcontainer/system"
"github.com/opencontainers/selinux/go-selinux/label" "github.com/opencontainers/selinux/go-selinux/label"
"github.com/sirupsen/logrus" "github.com/sirupsen/logrus"
"golang.org/x/sys/unix" "golang.org/x/sys/unix"
@ -704,6 +705,7 @@ func (d *Driver) ApplyDiff(id string, parent string, diff io.Reader) (size int64
UIDMaps: d.uidMaps, UIDMaps: d.uidMaps,
GIDMaps: d.gidMaps, GIDMaps: d.gidMaps,
WhiteoutFormat: archive.OverlayWhiteoutFormat, WhiteoutFormat: archive.OverlayWhiteoutFormat,
InUserNS: rsystem.RunningInUserNS(),
}); err != nil { }); err != nil {
return 0, err return 0, err
} }