Browse Source

Fix validation of plugins without rootfs in config

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Tonis Tiigi 8 years ago
parent
commit
6c7cb52009
1 changed files with 4 additions and 0 deletions
  1. 4 0
      plugin/manager.go

+ 4 - 0
plugin/manager.go

@@ -301,6 +301,10 @@ func configToRootFS(c []byte) (*image.RootFS, error) {
 	if err := json.Unmarshal(c, &pluginConfig); err != nil {
 		return nil, err
 	}
+	// validation for empty rootfs is in distribution code
+	if pluginConfig.Rootfs == nil {
+		return nil, nil
+	}
 
 	return rootFSFromPlugin(pluginConfig.Rootfs), nil
 }