LCOW: Check OS in takeLayerReference

Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: d8dbba14fd6a1be91e88082d4d4ba9aafd8c880a
Component: engine
This commit is contained in:
John Howard
2018-03-14 11:46:35 -07:00
parent 6d58bd7ffc
commit 47c7cacdf3
@@ -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