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

LCOW: Check OS in takeLayerReference

Signed-off-by: John Howard <jhoward@microsoft.com>
This commit is contained in:
John Howard 2018-03-13 09:46:21 -07:00
parent 592a15b7a9
commit d8dbba14fd

View file

@ -158,6 +158,9 @@ func (l *tarexporter) takeLayerReference(id image.ID, imgDescr *imageDescriptor)
if os == "" {
os = runtime.GOOS
}
if !system.IsOSSupported(os) {
return fmt.Errorf("os %q is not supported", os)
}
layer, err := l.lss[os].Get(topLayerID)
if err != nil {
return err