skip empty networks in plugin install

Signed-off-by: Victor Vieux <vieux@docker.com>
Upstream-commit: 04e35a01fcc7292272d688599ed23d829b85f46b
Component: engine
This commit is contained in:
Victor Vieux
2016-12-13 17:46:01 -08:00
parent e8408eec28
commit 126764baf1
+1 -1
View File
@@ -125,7 +125,7 @@ func computePrivileges(pd distribution.PullData) (types.PluginPrivileges, error)
}
var privileges types.PluginPrivileges
if c.Network.Type != "null" && c.Network.Type != "bridge" {
if c.Network.Type != "null" && c.Network.Type != "bridge" && c.Network.Type != "" {
privileges = append(privileges, types.PluginPrivilege{
Name: "network",
Description: "permissions to access a network",