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

Merge pull request #16991 from Microsoft/10662-fixuserns

Windows: [TP4] Fix AV due to userns
This commit is contained in:
Tibor Vass 2015-10-13 15:16:36 -07:00
commit 2465ab8814

View file

@ -25,6 +25,13 @@ func UnpackLayer(dest string, layer Reader, options *TarOptions) (size int64, er
defer pools.BufioReader32KPool.Put(trBuf)
var dirs []*tar.Header
if options == nil {
options = &TarOptions{}
}
if options.ExcludePatterns == nil {
options.ExcludePatterns = []string{}
}
remappedRootUID, remappedRootGID, err := idtools.GetRootUIDGID(options.UIDMaps, options.GIDMaps)
if err != nil {
return 0, err